-
Notifications
You must be signed in to change notification settings - Fork 9.2k
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
Add support for tagging aws_dx_lag and aws_dx_connection resources #2990
Conversation
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @ewbankkit
this looks overall very good. Just one question about connection state and a bunch of nitpicks, the former being a blocker.
aws/resource_aws_dx_connection.go
Outdated
log.Printf("[WARN] Direct Connect connection (%s) not found, removing from state", d.Id()) | ||
d.SetId("") | ||
return nil | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd be ok with removing the resource from state if it's in ConnectionStateDeleted
, but I think we should keep it in the state if it's still ConnectionStateDeleting
or ConnectionStateRejected
. The deletion may not finish successfully and rejection != deleted resource, AFAIK?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, agreed. I'll fix.
bandwidth = "1Gbps" | ||
location = "EqSe2" | ||
} | ||
`, n) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nitpick: indentation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed.
Usage = "original" | ||
} | ||
} | ||
`, n) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nitpick: indentation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed.
Usage = "changed" | ||
} | ||
} | ||
`, n) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nitpick: indentation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed.
aws/resource_aws_dx_lag.go
Outdated
} | ||
terminalStates := map[string]bool{ | ||
directconnect.LagStateDeleted: true, | ||
directconnect.LagStateDeleting: true, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As above, I think it would be safer to only catch LagStateDeleted
here.
aws/resource_aws_dx_lag_test.go
Outdated
number_of_connections = 2 | ||
force_destroy = true | ||
} | ||
`, n) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nitpick: Indentation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed.
aws/resource_aws_dx_lag_test.go
Outdated
Usage = "original" | ||
} | ||
} | ||
`, n) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nitpick: Indentation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed.
aws/resource_aws_dx_lag_test.go
Outdated
Usage = "changed" | ||
} | ||
} | ||
`, n) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nitpick: Indentation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed.
Re-ran acceptance tests after the change to
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just removed the check for Deleting
state in LAG too, as discussed and pushed to your branch so we can get this in. I hope you don't mind.
👍
This has been released in version 1.10.0 of the AWS provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks! |
Fixes #2989.
Acceptance tests: