Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Add tag to SSM param to allow global access #201

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion vpc/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,9 @@ resource "aws_ssm_parameter" "combined_nat_gateway_eips" {
name = "/${var.arg_name}/EGRESS_IPS"
type = "String"
value = join(",", local.nat_gateway_eips)
tags = local.tags
tags = merge(local.tags, {
Copilot-application = "__all__"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be:

Suggested change
Copilot-application = "__all__"
copilot-application = "__all__"

?

})
}


Expand Down
4 changes: 4 additions & 0 deletions vpc/tests/unit.tftest.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,10 @@ run "aws_vpc_unit_test" {
error_message = "Should be: String"
}

assert {
condition = aws_ssm_parameter.combined_nat_gateway_eips.tags.Copilot-application == "__all__"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
condition = aws_ssm_parameter.combined_nat_gateway_eips.tags.Copilot-application == "__all__"
condition = aws_ssm_parameter.combined_nat_gateway_eips.tags.Copilot-application == "__all__"
error message = "Should be: __all__"

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hard to get formatting right in github suggestion, but that's why codebuild terraform-tests is failing. And I think it needs tf lint or whatever running again

}

# aws_ssm_parameter.combined_nat_gateway_eips.value cannot be tested on a plan
}

Expand Down