Hello all, hoping someone can point out what I’m doing wrong here, I’m trying to generate endpoints for the AWS provider dynamically so I don’t have to repeat them. However I can’t seem to figure out how to generate the “key” dynamically (since a map is being passed in. Any idea what I’m doing wrong here?
provider "aws" {
region = "us-east-1"
dynamic "endpoints" {
for_each = tomap(local.fips_endpoints_us_east_1)
content {
endpoints.key = endpoints.value
}
}
}
the local looks something like this at the moment:
fips_endpoints_us_east_1 = {
acm = "https://acm-fips.us-east-1.amazonaws.com"
acmpca = "https://acm-pca-fips.us-east-1.amazonaws.com"
apigateway = "https://apigateway-fips.us-east-1.amazonaws.com"
appstream = "https://appstream2-fips.us-east-1.amazonaws.com"
cloudformation = "https://cloudformation-fips.us-east-1.amazonaws.com"
cloudfront = "https://cloudfront-fips.amazonaws.com"
cloudtrail = "https://cloudtrail-fips.us-east-1.amazonaws.com"
}