-
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 glue connection vpc availability zones (required currently) #5039
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.
LGTM with one minor testing fix, in a commit after yours. Thanks @narfman0! 🚀
$ make testacc TEST=./aws TESTARGS='-run=TestAccAWSGlueConnection'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws -v -run=TestAccAWSGlueConnection -timeout 120m
=== RUN TestAccAWSGlueConnection_Basic
--- PASS: TestAccAWSGlueConnection_Basic (13.37s)
=== RUN TestAccAWSGlueConnection_Description
--- PASS: TestAccAWSGlueConnection_Description (21.69s)
=== RUN TestAccAWSGlueConnection_MatchCriteria
--- PASS: TestAccAWSGlueConnection_MatchCriteria (27.52s)
=== RUN TestAccAWSGlueConnection_PhysicalConnectionRequirements
--- PASS: TestAccAWSGlueConnection_PhysicalConnectionRequirements (651.64s)
PASS
ok github.com/terraform-providers/terraform-provider-aws/aws 714.249s
@@ -426,6 +426,7 @@ resource "aws_glue_connection" "test" { | |||
name = "%[1]s" | |||
|
|||
physical_connection_requirements { | |||
availability_zone = "${aws_availability_zones.available[0].id}" |
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.
This addition was not working in the acceptance testing:
--- FAIL: TestAccAWSGlueConnection_PhysicalConnectionRequirements (0.91s)
testing.go:518: Step 0 error: Error loading configuration: Error loading /var/folders/v0/_d108fkx1pbbg4_sh864_7740000gn/T/tf-test582550071/main.tf: Error reading config for aws_glue_connection[test]: parse error at 1:38: expected "}" but found "."
Changing it to availability_zone = "${aws_subnet.test.0.availability_zone}"
worked as expected 👍
Also we normally recommend adding a check that a new attribute is at least set in the acceptance testing: resource.TestCheckResourceAttrSet(resourceName, "physical_connection_requirements.0.availability_zone"),
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.
OK excellent thanks for your comments and effort! I'll check this TestCheckResourceAttrSet
further later ;)
This has been released in version 1.27.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 #4762
Changes proposed in this pull request:
AvailabilityZone
, currently required by the PhysicalConnectionRequirements structure per aws apiPhysicalConnectionRequirements
documentationOutput from acceptance testing: