Skip to content

Instantly share code, notes, and snippets.

@jesserobertson
Created August 30, 2018 04:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jesserobertson/864c2ddf8d84a0ddc43a35cfe9568bb8 to your computer and use it in GitHub Desktop.
Save jesserobertson/864c2ddf8d84a0ddc43a35cfe9568bb8 to your computer and use it in GitHub Desktop.
Rendering template file
data "template_file" "batch_policy_template" {
template = "${file("${path.module}/batch_ecs_instance_policy.json.tpl")}"
vars = {
bucket_name = "${module.email_storage.name}"
}
}
resource "aws_iam_role_policy" "test_policy" {
name = "test_policy"
role = "${aws_iam_role.aws_batch_service_role.id}"
policy = "${data.template_file.batch_policy_template.rendered}"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment