Skip to content

Commit

Permalink
Remove warning form terraform plan
Browse files Browse the repository at this point in the history
  • Loading branch information
ian-hoyle committed Dec 4, 2024
1 parent c62bfcb commit e1275b5
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
2 changes: 1 addition & 1 deletion modules/shared-vpc/root.tf
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ resource "aws_route" "internet_access" {
# Create a NAT gateway with an Elastic IP for each private subnet to get internet connectivity
resource "aws_eip" "gw" {
count = var.az_count
vpc = true
domain = "vpc"
depends_on = [aws_internet_gateway.gw]

tags = merge(
Expand Down
15 changes: 11 additions & 4 deletions root_draft_metadata.tf
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,18 @@ module "draft_metadata_api_gateway" {
resource "aws_iam_role" "draft_metadata_api_gateway_execution_role" {
name = "TDRMetadataChecksAPIGatewayExecutionRole${title(local.environment)}"
assume_role_policy = templatefile("./templates/iam_policy/assume_role_policy.json.tpl", { service = "apigateway.amazonaws.com" })
}

inline_policy {
name = "TDRMetadataChecksAPIGatewayStepFunctionExecutionPolicy${title(local.environment)}"
policy = templatefile("./templates/iam_policy/api_gateway_state_machine_policy.json.tpl", { account_id = data.aws_caller_identity.current.account_id, state_machine_arn = module.draft_metadata_checks.step_function_arn })
}
resource "aws_iam_role_policy" "api_gateway_execution_policy" {
name = "TDRMetadataChecksAPIGatewayStepFunctionExecutionPolicy${title(local.environment)}"
role = aws_iam_role.draft_metadata_api_gateway_execution_role.id
policy = templatefile(
"./templates/iam_policy/api_gateway_state_machine_policy.json.tpl",
{
account_id = data.aws_caller_identity.current.account_id,
state_machine_arn = module.draft_metadata_checks.step_function_arn
}
)
}

module "draft_metadata_bucket" {
Expand Down

0 comments on commit e1275b5

Please sign in to comment.