From 9a2581e1d635f97bf1c633f7b0233af4cb191986 Mon Sep 17 00:00:00 2001 From: Benjamin Edwards Date: Wed, 26 Apr 2023 23:08:09 -0400 Subject: [PATCH] fix firehose addon take 2 (#11369) rename aws_iam_policy and aws_iam_policy_attachment resources to use underscore instead of hyphen in their names. Also, change aws_iam_policy_attachment to aws_iam_role_policy_attachment to match the correct resource type. --- .../target-account/iam.tf | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/terraform/addons/byo-firehose-logging-destination/target-account/iam.tf b/terraform/addons/byo-firehose-logging-destination/target-account/iam.tf index b0ea65aaea..60c814101c 100644 --- a/terraform/addons/byo-firehose-logging-destination/target-account/iam.tf +++ b/terraform/addons/byo-firehose-logging-destination/target-account/iam.tf @@ -35,11 +35,11 @@ data "aws_iam_policy_document" "firehose" { } -resource "aws_iam_policy" "fleet-firehose" { +resource "aws_iam_policy" "fleet_firehose" { policy = data.aws_iam_policy_document.firehose.json } -resource "aws_iam_policy_attachment" "fleet-firehose" { - name = aws_iam_role.fleet_role.name - policy_arn = aws_iam_policy.fleet-firehose.arn +resource "aws_iam_role_policy_attachment" "fleet_firehose" { + policy_arn = aws_iam_policy.fleet_firehose.arn + role = aws_iam_role.fleet_role.name } \ No newline at end of file