Skip to content

fix: add tags if the default route table association is enabled #52

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

Merged
merged 1 commit into from
Jul 7, 2021

Conversation

michelzanini
Copy link
Contributor

Description

Fixes #51

Motivation and Context

Attempts to fix this error:

Error: error creating EC2 Tag (ops.company.cloud/provisioner) for resource (): error tagging resource (): InvalidParameterValue: Value ( null ) for parameter resourceId is invalid. Null/empty value for resourceId is invalid
	status code: 400, request id: 42192f9f-1546-4714-b9b2-b5b4e948ef64

  on .terraform/modules/tgw/main.tf line 44, in resource "aws_ec2_tag" "this":
  44: resource "aws_ec2_tag" "this" {

This would happen when the transit gateway has enable_default_route_table_association as false.

How Has This Been Tested?

@michelzanini michelzanini changed the title bug fix: Only try to add tags if the default route table association has been created fix: only try to add tags if the default route table association is enabled Jun 23, 2021
@michelzanini
Copy link
Contributor Author

Hi @tfhartmann ,
This PR attempts to fix #51 .
Maybe you would be able to test this works for you?
Thanks.

@bpalermo
Copy link

@antonbabenko can we get a review here? I'm also hitting this issue.

Tks!

@tfhartmann
Copy link
Collaborator

This looks good to me!

Copy link
Collaborator

@tfhartmann tfhartmann left a comment

Choose a reason for hiding this comment

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

🎉

@antonbabenko antonbabenko changed the title fix: only try to add tags if the default route table association is enabled fix: add tags if the default route table association is enabled Jul 7, 2021
@antonbabenko antonbabenko merged commit 3298489 into terraform-aws-modules:master Jul 7, 2021
@michelzanini michelzanini deleted the develop branch May 31, 2022 12:53
@github-actions
Copy link

I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 28, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Error creating EC2 tags when default route table association is false
4 participants