Commit f33b92bc authored by Beckybrannan's avatar Beckybrannan

Cleaning up syntax for tf version > 0.11

parent 00168f57
...@@ -24,7 +24,7 @@ variable "admin" { ...@@ -24,7 +24,7 @@ variable "admin" {
############################################################################################################# #############################################################################################################
resource "aws_iam_role" "role" { resource "aws_iam_role" "role" {
name = "${var.name}" name = var.name
assume_role_policy = templatefile("${path.module}/assume_role.json", { source_account_id = var.source_account_id }) assume_role_policy = templatefile("${path.module}/assume_role.json", { source_account_id = var.source_account_id })
tags = { tags = {
TerraformVersion = "> 0.12.0" TerraformVersion = "> 0.12.0"
...@@ -36,14 +36,14 @@ resource "aws_iam_policy" "steamhaus_apn" { ...@@ -36,14 +36,14 @@ resource "aws_iam_policy" "steamhaus_apn" {
name = "SteamhausAPN" name = "SteamhausAPN"
description = "Steamhaus APN policy" description = "Steamhaus APN policy"
policy = "${file("${path.module}/steamhaus_apn_policy.json")}" policy = "${file("${path.module}/steamhaus_apn_policy.json")}"
count = "${var.steamhaus_apn}" count = var.steamhaus_apn
lifecycle { create_before_destroy = true } lifecycle { create_before_destroy = true }
} }
resource "aws_iam_role_policy_attachment" "steamhaus_apn" { resource "aws_iam_role_policy_attachment" "steamhaus_apn" {
role = "${aws_iam_role.role.name}" role = "${aws_iam_role.role.name}"
policy_arn = "${aws_iam_policy.steamhaus_apn[count.index].arn}" policy_arn = "${aws_iam_policy.steamhaus_apn[count.index].arn}"
count = "${var.steamhaus_apn}" count = var.steamhaus_apn
} }
resource "aws_iam_role_policy_attachment" "admin" { resource "aws_iam_role_policy_attachment" "admin" {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment