Created
February 13, 2019 03:05
-
-
Save jsamuel1/83c722a9abc7c0d6b476908808a3c089 to your computer and use it in GitHub Desktop.
Terraform to enable long ARN formats for aws ecs, so that we can use fargate on all our workload accounts.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Ensure we enroll ecs with long resource IDs | |
// Delete after April 1st as all new accounts will be enrolled by default | |
resource "null_resource" "enable_long_ecs_resource_ids" { | |
provisioner "local-exec" { | |
command = <<EOF | |
# $1=account_id, $2=region | |
source ${path.root}/../scripts/assume_role.sh \ | |
${var.workload_account_id} \ | |
${var.workload_provider_region} | |
# enable all ecs long IDs | |
aws ecs put-account-setting-default --name serviceLongArnFormat --value enabled | |
aws ecs put-account-setting-default --name taskLongArnFormat --value enabled | |
aws ecs put-account-setting-default --name containerInstanceLongArnFormat --value enabled | |
EOF | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Still best way to do this hahahahahaha