Search code examples
amazon-web-servicesdeploymentterraform

Is deployment of the terraform module aws_serverlessapplicationrepository_cloudformation_stack region locked to its application_id?


When creating the terraform module aws_serverlessapplicationrepository_cloudformation, there is a required field called application_id. Here you place the ARN of the Serverless Application Repository you wish to deploy, something like this...

application_id = "arn:aws:serverlessrepo:us-east-1:<ACCOUNT_NUMBER>:applications/app"

Im curious if it is possible to deploy the above application to a region other than us-east-1. Or am I region locked to us-east-1?

I've tried deploying multiple times to different regions with admin roles etc. but I always get a permission denied exception saying the SAR ARN cannot be accessed. Perhaps its just better to publish the SAR in the desired region, but I was just curious and wanted to check here first. I'm still a little new to AWS and Terraform so I may be missing something obvious as well, be gentle! Thanks!


Solution

  • Yes, you are region-locked with SAR ARNs, and deploying to another region requires publishing the SAR application in that desired region. If you're planning to deploy the same application in multiple regions, you'll need to have an ARN specific to each of those regions. I guess you havent setup your application in SAR to public after creating as by default its set private. you will find better understanding of publishing appliations in SAR in the following documentation: https://docs.amazonaws.cn/en_us/serverlessrepo/latest/devguide/serverlessrepo-publishing-applications.html