-
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
r/aws_customer_gateway: Allow 4-byte ASNs #14030
r/aws_customer_gateway: Allow 4-byte ASNs #14030
Conversation
aws/resource_aws_customer_gateway.go
Outdated
@@ -30,7 +30,7 @@ func resourceAwsCustomerGateway() *schema.Resource { | |||
Type: schema.TypeInt, | |||
Required: true, | |||
ForceNew: true, | |||
ValidateFunc: validation.IntBetween(1, 65534), | |||
ValidateFunc: validation.IntBetween(0, 4294967295), |
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.
Unfortunately this is an esoteric problem that isn't caught by CI (#8988), but we'll need to do something different here to support 32-bit platforms:
$ gox -os='linux darwin windows freebsd openbsd solaris' -arch='386 amd64 arm' -osarch='!darwin/arm !darwin/386' -ldflags '-s -w -X aws/version.ProviderVersion=99.99.99 -X aws/version.ProtocolVersion=4' -output 'results/{{.OS}}_{{.Arch}}/terraform-provider-aws_v99.99.99_x4' .
Number of parallel builds: 15
--> solaris/amd64: github.com/terraform-providers/terraform-provider-aws
--> linux/arm: github.com/terraform-providers/terraform-provider-aws
--> freebsd/arm: github.com/terraform-providers/terraform-provider-aws
--> freebsd/386: github.com/terraform-providers/terraform-provider-aws
--> openbsd/386: github.com/terraform-providers/terraform-provider-aws
--> linux/386: github.com/terraform-providers/terraform-provider-aws
--> linux/amd64: github.com/terraform-providers/terraform-provider-aws
--> windows/amd64: github.com/terraform-providers/terraform-provider-aws
--> darwin/amd64: github.com/terraform-providers/terraform-provider-aws
--> openbsd/amd64: github.com/terraform-providers/terraform-provider-aws
--> windows/386: github.com/terraform-providers/terraform-provider-aws
--> freebsd/amd64: github.com/terraform-providers/terraform-provider-aws
6 errors occurred:
--> openbsd/386 error: exit status 2
Stderr: # github.com/terraform-providers/terraform-provider-aws/aws
aws/resource_aws_customer_gateway.go:33:44: constant 4294967295 overflows int
--> freebsd/arm error: exit status 2
Stderr: # github.com/terraform-providers/terraform-provider-aws/aws
aws/resource_aws_customer_gateway.go:33:44: constant 4294967295 overflows int
--> linux/386 error: exit status 2
Stderr: # github.com/terraform-providers/terraform-provider-aws/aws
aws/resource_aws_customer_gateway.go:33:44: constant 4294967295 overflows int
--> linux/arm error: exit status 2
Stderr: # github.com/terraform-providers/terraform-provider-aws/aws
aws/resource_aws_customer_gateway.go:33:44: constant 4294967295 overflows int
--> windows/386 error: exit status 2
Stderr: # github.com/terraform-providers/terraform-provider-aws/aws
aws/resource_aws_customer_gateway.go:33:44: constant 4294967295 overflows int
--> freebsd/386 error: exit status 2
Stderr: # github.com/terraform-providers/terraform-provider-aws/aws
aws/resource_aws_customer_gateway.go:33:44: constant 4294967295 overflows int
You can check it much quicker without gox
via:
$ GOOS=linux GOARCH=386 go build
# github.com/terraform-providers/terraform-provider-aws/aws
aws/resource_aws_customer_gateway.go:33:44: constant 4294967295 overflows int
We can see how long the cross-compilation testing takes in GitHub Actions, although that was the original blocker for implementing it in TravisCI.
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.
Aah yes, this is similar to #1888.
Is changing the attribute from TypeInt
to TypeString
a breaking change?
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.
In practice it seems not to be.
Changed Acceptance test output: $ make testacc TEST=./aws/ TESTARGS='-run=TestAccAWSCustomerGateway_'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws/ -v -count 1 -parallel 20 -run=TestAccAWSCustomerGateway_ -timeout 120m
=== RUN TestAccAWSCustomerGateway_basic
=== PAUSE TestAccAWSCustomerGateway_basic
=== RUN TestAccAWSCustomerGateway_tags
=== PAUSE TestAccAWSCustomerGateway_tags
=== RUN TestAccAWSCustomerGateway_similarAlreadyExists
=== PAUSE TestAccAWSCustomerGateway_similarAlreadyExists
=== RUN TestAccAWSCustomerGateway_disappears
=== PAUSE TestAccAWSCustomerGateway_disappears
=== RUN TestAccAWSCustomerGateway_4ByteAsn
=== PAUSE TestAccAWSCustomerGateway_4ByteAsn
=== CONT TestAccAWSCustomerGateway_basic
=== CONT TestAccAWSCustomerGateway_disappears
=== CONT TestAccAWSCustomerGateway_similarAlreadyExists
=== CONT TestAccAWSCustomerGateway_tags
=== CONT TestAccAWSCustomerGateway_4ByteAsn
--- PASS: TestAccAWSCustomerGateway_disappears (29.92s)
--- PASS: TestAccAWSCustomerGateway_4ByteAsn (35.95s)
--- PASS: TestAccAWSCustomerGateway_similarAlreadyExists (43.40s)
--- PASS: TestAccAWSCustomerGateway_basic (63.07s)
--- PASS: TestAccAWSCustomerGateway_tags (66.39s)
PASS
ok github.com/terraform-providers/terraform-provider-aws/aws 66.472s |
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 🚀
Output from acceptance testing:
--- PASS: TestAccAWSCustomerGateway_disappears (18.14s)
--- PASS: TestAccAWSCustomerGateway_4ByteAsn (20.38s)
--- PASS: TestAccAWSCustomerGateway_similarAlreadyExists (23.01s)
--- PASS: TestAccAWSCustomerGateway_basic (36.37s)
--- PASS: TestAccAWSCustomerGateway_tags (62.25s)
This has been released in version 2.69.0 of the Terraform AWS provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template for triage. Thanks! |
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! |
Community Note
Closes #14027.
Release note for CHANGELOG:
Output from acceptance testing: