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

Add support for glue connection vpc availability zones (required currently) #5039

Merged
merged 1 commit into from
Jul 9, 2018

Conversation

narfman0
Copy link
Contributor

Fixes #4762

Changes proposed in this pull request:

Output from acceptance testing:

$ make testacc TESTARGS='-run=TestAccAWSAvailabilityZones'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./... -v -run=TestAccAWSAvailabilityZones -timeout 120m
?   	github.com/terraform-providers/terraform-provider-aws	[no test files]
=== RUN   TestAccAWSAvailabilityZones_basic
--- PASS: TestAccAWSAvailabilityZones_basic (15.28s)
=== RUN   TestAccAWSAvailabilityZones_stateFilter
--- PASS: TestAccAWSAvailabilityZones_stateFilter (14.73s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	30.022s

@ghost ghost added the size/S Managed by automation to categorize the size of a PR. label Jun 30, 2018
@bflad bflad added enhancement Requests to existing resources that expand the functionality or scope. service/glue Issues and PRs that pertain to the glue service. labels Jul 2, 2018
@bflad bflad added this to the v1.27.0 milestone Jul 9, 2018
Copy link
Contributor

@bflad bflad left a 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}"
Copy link
Contributor

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"),

Copy link
Contributor Author

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 ;)

@bflad bflad merged commit e5b717c into hashicorp:master Jul 9, 2018
bflad added a commit that referenced this pull request Jul 9, 2018
@bflad
Copy link
Contributor

bflad commented Jul 11, 2018

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.

@ghost
Copy link

ghost commented Apr 4, 2020

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!

@ghost ghost locked and limited conversation to collaborators Apr 4, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement Requests to existing resources that expand the functionality or scope. service/glue Issues and PRs that pertain to the glue service. size/S Managed by automation to categorize the size of a PR.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Availability Zone should be defined for VPC Glue connections
2 participants