Commit b1254e56 authored by Beckybrannan's avatar Beckybrannan

Cleaning up syntax for tf version > 0.11

parent f33b92bc
...@@ -25,7 +25,7 @@ variable "admin" { ...@@ -25,7 +25,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"
} }
...@@ -35,19 +35,19 @@ resource "aws_iam_role" "role" { ...@@ -35,19 +35,19 @@ resource "aws_iam_role" "role" {
resource "aws_iam_policy" "steamhaus_apn" { 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" {
role = "${aws_iam_role.role.name}" role = aws_iam_role.role.name
policy_arn = "arn:aws:iam::aws:policy/AdministratorAccess" policy_arn = "arn:aws:iam::aws:policy/AdministratorAccess"
count = "${var.admin}" count = var.admin
} }
\ No newline at end of file
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