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.
This commit is contained in:
Benjamin Edwards 2023-04-26 23:08:09 -04:00 committed by GitHub
parent 5f8e78b1f2
commit 9a2581e1d6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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
}