Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make terraform work with govcloud #11

Open
kaiyan-sheng opened this issue Jun 7, 2024 · 1 comment
Open

Make terraform work with govcloud #11

kaiyan-sheng opened this issue Jun 7, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@kaiyan-sheng
Copy link
Contributor

When testing ESF on govcloud, there are the several changes I have to make manually in this terraform repo in order to make it work:

--- a/esf.tf
+++ b/esf.tf
@@ -172,7 +172,7 @@ module "esf-lambda-function" {
 
   attach_policies    = true
   number_of_policies = 1
-  policies           = ["arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole"]
+  policies           = ["arn:aws-us-gov:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole"]
 
   attach_policy_statements = true
 
@@ -182,8 +182,8 @@ module "esf-lambda-function" {
         effect  = "Allow",
         actions = ["s3:GetObject"],
         resources = [
-          "arn:aws:s3:::${local.config-bucket-name}/config.yaml",
-          "arn:aws:s3:::${local.config-bucket-name}/${local.dependencies-file}"
+          "arn:aws-us-gov:s3:::${local.config-bucket-name}/config.yaml",
+          "arn:aws-us-gov:s3:::${local.config-bucket-name}/${local.dependencies-file}"
         ]
       },

Everything else works great!

@kaiyan-sheng kaiyan-sheng added the bug Something isn't working label Jun 7, 2024
@axw
Copy link
Member

axw commented Jun 13, 2024

We should probably use the aws_partition data source: https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/partition

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants