Skip to content

Commit

Permalink
feat!: added dependencies and use name_prefix
Browse files Browse the repository at this point in the history
  • Loading branch information
farhanangullia committed Jul 25, 2022
1 parent d9e024f commit dae678b
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 4 deletions.
14 changes: 11 additions & 3 deletions examples/mwaa/environment/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -131,11 +131,11 @@ resource "aws_flow_log" "vpc_flow_logs" {
}

resource "aws_cloudwatch_log_group" "vpc_flow_log_group" {
name = "MWAAVPCFlowLogs"
name_prefix = "MWAAVPCFlowLogs"
}

resource "aws_iam_role" "vpc_flow_log_role" {
name = "VPCFlowLogRole"
name_prefix = "VPCFlowLogRole"

assume_role_policy = <<EOF
{
Expand All @@ -155,7 +155,7 @@ EOF
}

resource "aws_iam_role_policy" "vpc_flow_log_role_policy" {
name = "VPCFlowLogRolePolicy"
name_prefix = "VPCFlowLogRolePolicy"
role = aws_iam_role.vpc_flow_log_role.id

policy = <<EOF
Expand Down Expand Up @@ -487,5 +487,13 @@ resource "aws_mwaa_environment" "this" {
weekly_maintenance_window_start = var.weekly_maintenance_window_start

kms_key = var.kms_key_arn

depends_on = [
aws_vpc.mwaa_vpc,
aws_subnet.mwaa_private_subnets,
aws_subnet.mwaa_public_subnets,
aws_route_table_association.prt_associations,
aws_route_table_association.pubrt_associations
]
}

2 changes: 1 addition & 1 deletion examples/mwaa/switch/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ module "mwaa_switch" {

#### (0) Switch Policy for MWAA ####
resource "aws_iam_policy" "mwaa_switch_policy" {
name = "MWAASwitchPolicy"
name_prefix = "MWAASwitchPolicy"
description = "A policy for MWAA operations."

policy = <<EOF
Expand Down
4 changes: 4 additions & 0 deletions examples/mwaa/switch/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,9 @@ terraform {
aws = {
version = ">= 3.0"
}

random = {
version = ">= 3.0"
}
}
}

0 comments on commit dae678b

Please sign in to comment.