Accessing variable from another module

I’m using a module to create aws sns resources, another module to create aws cloudwatch alarm resources, and trying to to access the value of the sns topic arn of the former from the latter.

In modules/sns/outputs.tf I’ve output the sns topic arn that the module creates:

output "sns_topic_arn" {
    value = aws_sns_topic.sns_topic.arn
}

Then in modules/cloudwatch-alarms/main.tf I’ve called a variable declared as “sns_topic_arn”:
alarm_actions = [var.sns_topic_arn]

And finally, in the tf file where I’m calling cloudwatch-alarms module (located in a repository where I’m also calling the sns module), I’ve tried to pass in a value for sns_topic_arn by attempting to access the output of modules/sns:
sns_topic_arn = "${module.sns.sns_topic_arn}"

But in doing so I get the following error:

Unsupported attribute.
This object (module.sns) does not have an attribute named "sns_topic_arn".

I’m wondering why I’m unable to access the output value from modules/sns/outputs.tf, or if there’s another way of accessing that value from the repo where I’m calling the cloudwatch-alarms module?