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

added appliance_mode_support argument/attribute #16159

Merged
merged 5 commits into from
Nov 12, 2020
Merged

added appliance_mode_support argument/attribute #16159

merged 5 commits into from
Nov 12, 2020

Conversation

philnichol
Copy link
Contributor

Community Note

  • Please vote on this pull request by adding a 👍 reaction to the original pull request comment to help the community and maintainers prioritize this request
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for pull request followers and do not help prioritize the request

Closes #15936

Release note for CHANGELOG:

aws_ec2_transit_gateway_vpc_attachment - added appliance_mode_support argument/attribute to resource and data

Output from acceptance testing:

$ TF_ACC=1 go test ./aws -v -count 1 -parallel 4 -run=TestAccAWSEc2TransitGatewayVpcAttachmentDataSource_ -timeout 60m
=== RUN   TestAccAWSEc2TransitGatewayVpcAttachmentDataSource_Filter
=== PAUSE TestAccAWSEc2TransitGatewayVpcAttachmentDataSource_Filter
=== RUN   TestAccAWSEc2TransitGatewayVpcAttachmentDataSource_ID
=== PAUSE TestAccAWSEc2TransitGatewayVpcAttachmentDataSource_ID
=== CONT  TestAccAWSEc2TransitGatewayVpcAttachmentDataSource_Filter
=== CONT  TestAccAWSEc2TransitGatewayVpcAttachmentDataSource_ID
--- PASS: TestAccAWSEc2TransitGatewayVpcAttachmentDataSource_ID (385.44s)
--- PASS: TestAccAWSEc2TransitGatewayVpcAttachmentDataSource_Filter (385.46s)
PASS
ok      github.com/terraform-providers/terraform-provider-aws/aws       385.501s
$ TF_ACC=1 go test ./aws -v -count 1 -parallel 4 -run=TestAccAWSEc2TransitGatewayVpcAttachment -timeout 60m
=== RUN   TestAccAWSEc2TransitGatewayVpcAttachmentDataSource_Filter
=== PAUSE TestAccAWSEc2TransitGatewayVpcAttachmentDataSource_Filter
=== RUN   TestAccAWSEc2TransitGatewayVpcAttachmentDataSource_ID
=== PAUSE TestAccAWSEc2TransitGatewayVpcAttachmentDataSource_ID
=== RUN   TestAccAWSEc2TransitGatewayVpcAttachmentAccepter_basic
=== PAUSE TestAccAWSEc2TransitGatewayVpcAttachmentAccepter_basic
=== RUN   TestAccAWSEc2TransitGatewayVpcAttachmentAccepter_Tags
=== PAUSE TestAccAWSEc2TransitGatewayVpcAttachmentAccepter_Tags
=== RUN   TestAccAWSEc2TransitGatewayVpcAttachmentAccepter_TransitGatewayDefaultRouteTableAssociationAndPropagation
=== PAUSE TestAccAWSEc2TransitGatewayVpcAttachmentAccepter_TransitGatewayDefaultRouteTableAssociationAndPropagation
=== RUN   TestAccAWSEc2TransitGatewayVpcAttachment_basic
=== PAUSE TestAccAWSEc2TransitGatewayVpcAttachment_basic
=== RUN   TestAccAWSEc2TransitGatewayVpcAttachment_disappears
=== PAUSE TestAccAWSEc2TransitGatewayVpcAttachment_disappears
=== RUN   TestAccAWSEc2TransitGatewayVpcAttachment_ApplianceModeSupport
=== PAUSE TestAccAWSEc2TransitGatewayVpcAttachment_ApplianceModeSupport
=== RUN   TestAccAWSEc2TransitGatewayVpcAttachment_DnsSupport
=== PAUSE TestAccAWSEc2TransitGatewayVpcAttachment_DnsSupport
=== RUN   TestAccAWSEc2TransitGatewayVpcAttachment_Ipv6Support
=== PAUSE TestAccAWSEc2TransitGatewayVpcAttachment_Ipv6Support
=== RUN   TestAccAWSEc2TransitGatewayVpcAttachment_SharedTransitGateway
=== PAUSE TestAccAWSEc2TransitGatewayVpcAttachment_SharedTransitGateway
=== RUN   TestAccAWSEc2TransitGatewayVpcAttachment_SubnetIds
=== PAUSE TestAccAWSEc2TransitGatewayVpcAttachment_SubnetIds
=== RUN   TestAccAWSEc2TransitGatewayVpcAttachment_Tags
=== PAUSE TestAccAWSEc2TransitGatewayVpcAttachment_Tags
=== RUN   TestAccAWSEc2TransitGatewayVpcAttachment_TransitGatewayDefaultRouteTableAssociationAndPropagationDisabled
=== PAUSE TestAccAWSEc2TransitGatewayVpcAttachment_TransitGatewayDefaultRouteTableAssociationAndPropagationDisabled
=== RUN   TestAccAWSEc2TransitGatewayVpcAttachment_TransitGatewayDefaultRouteTableAssociation
=== PAUSE TestAccAWSEc2TransitGatewayVpcAttachment_TransitGatewayDefaultRouteTableAssociation
=== RUN   TestAccAWSEc2TransitGatewayVpcAttachment_TransitGatewayDefaultRouteTablePropagation
=== PAUSE TestAccAWSEc2TransitGatewayVpcAttachment_TransitGatewayDefaultRouteTablePropagation
=== CONT  TestAccAWSEc2TransitGatewayVpcAttachmentDataSource_Filter
=== CONT  TestAccAWSEc2TransitGatewayVpcAttachment_Ipv6Support
=== CONT  TestAccAWSEc2TransitGatewayVpcAttachment_Tags
=== CONT  TestAccAWSEc2TransitGatewayVpcAttachment_SubnetIds
--- PASS: TestAccAWSEc2TransitGatewayVpcAttachment_Tags (343.17s)
=== CONT  TestAccAWSEc2TransitGatewayVpcAttachment_TransitGatewayDefaultRouteTableAssociationAndPropagationDisabled
--- PASS: TestAccAWSEc2TransitGatewayVpcAttachment_Ipv6Support (343.19s)
=== CONT  TestAccAWSEc2TransitGatewayVpcAttachment_TransitGatewayDefaultRouteTablePropagation
--- PASS: TestAccAWSEc2TransitGatewayVpcAttachmentDataSource_Filter (366.36s)
=== CONT  TestAccAWSEc2TransitGatewayVpcAttachment_TransitGatewayDefaultRouteTableAssociation
--- PASS: TestAccAWSEc2TransitGatewayVpcAttachment_SubnetIds (462.11s)
=== CONT  TestAccAWSEc2TransitGatewayVpcAttachment_basic
--- PASS: TestAccAWSEc2TransitGatewayVpcAttachment_TransitGatewayDefaultRouteTableAssociationAndPropagationDisabled (305.30s)
=== CONT  TestAccAWSEc2TransitGatewayVpcAttachment_SharedTransitGateway
    resource_aws_ec2_transit_gateway_vpc_attachment_test.go:256: Step 1/2 error: Error running pre-apply refresh:
        Error: Error describing organization: AWSOrganizationsNotInUseException: Your account is not a member of an organization.


--- FAIL: TestAccAWSEc2TransitGatewayVpcAttachment_SharedTransitGateway (3.14s)
=== CONT  TestAccAWSEc2TransitGatewayVpcAttachment_DnsSupport
--- PASS: TestAccAWSEc2TransitGatewayVpcAttachment_TransitGatewayDefaultRouteTablePropagation (360.25s)
=== CONT  TestAccAWSEc2TransitGatewayVpcAttachment_ApplianceModeSupport
--- PASS: TestAccAWSEc2TransitGatewayVpcAttachment_TransitGatewayDefaultRouteTableAssociation (460.74s)
=== CONT  TestAccAWSEc2TransitGatewayVpcAttachment_disappears
--- PASS: TestAccAWSEc2TransitGatewayVpcAttachment_basic (385.47s)
=== CONT  TestAccAWSEc2TransitGatewayVpcAttachmentAccepter_Tags
    resource_aws_ec2_transit_gateway_vpc_attachment_accepter_test.go:69: Step 1/3 error: Error running apply:
        Error: Error associating principal with RAM resource share: OperationNotPermittedException: The resource you are attempting to share can only be shared within your AWS Organization. This error may also occur if you have not enabled sharing with your AWS organization, or that onboarding process is still in progress.



        Error: error associating RAM Resource Share: OperationNotPermittedException: The resource you are attempting to share can only be shared within your AWS Organization. This error may also occur if you have not enabled sharing with your AWS organization, or that onboarding process is still in progress.


--- PASS: TestAccAWSEc2TransitGatewayVpcAttachment_DnsSupport (380.67s)
=== CONT  TestAccAWSEc2TransitGatewayVpcAttachmentAccepter_TransitGatewayDefaultRouteTableAssociationAndPropagation
--- PASS: TestAccAWSEc2TransitGatewayVpcAttachment_ApplianceModeSupport (361.96s)
=== CONT  TestAccAWSEc2TransitGatewayVpcAttachmentAccepter_basic
--- FAIL: TestAccAWSEc2TransitGatewayVpcAttachmentAccepter_Tags (239.27s)
=== CONT  TestAccAWSEc2TransitGatewayVpcAttachmentDataSource_ID
=== CONT  TestAccAWSEc2TransitGatewayVpcAttachmentAccepter_TransitGatewayDefaultRouteTableAssociationAndPropagation
    resource_aws_ec2_transit_gateway_vpc_attachment_accepter_test.go:138: Step 1/4 error: Error running apply:
        Error: Error associating principal with RAM resource share: OperationNotPermittedException: The resource you are attempting to share can only be shared within your AWS Organization. This error may also occur if you have not enabled sharing with your AWS organization, or that onboarding process is still in progress.



        Error: error associating RAM Resource Share: OperationNotPermittedException: The resource you are attempting to share can only be shared within your AWS Organization. This error may also occur if you have not enabled sharing with your AWS organization, or that onboarding process is still in progress.


=== CONT  TestAccAWSEc2TransitGatewayVpcAttachmentAccepter_basic
    resource_aws_ec2_transit_gateway_vpc_attachment_accepter_test.go:23: Step 1/2 error: Error running apply:
        Error: error associating RAM Resource Share: OperationNotPermittedException: The resource you are attempting to share can only be shared within your AWS Organization. This error may also occur if you have not enabled sharing with your AWS organization, or that onboarding process is still in progress.



        Error: Error associating principal with RAM resource share: OperationNotPermittedException: The resource you are attempting to share can only be shared within your AWS Organization. This error may also occur if you have not enabled sharing with your AWS organization, or that onboarding process is still in progress.


--- PASS: TestAccAWSEc2TransitGatewayVpcAttachment_disappears (362.67s)
--- FAIL: TestAccAWSEc2TransitGatewayVpcAttachmentAccepter_TransitGatewayDefaultRouteTableAssociationAndPropagation (219.07s)
--- FAIL: TestAccAWSEc2TransitGatewayVpcAttachmentAccepter_basic (198.47s)
--- PASS: TestAccAWSEc2TransitGatewayVpcAttachmentDataSource_ID (343.91s)
FAIL
FAIL    github.com/terraform-providers/terraform-provider-aws/aws       1431.197s
FAIL

Some of the acceptance tests failed locally since I don't have an AWS organization or multiple accounts to test this on, hoping if this looks good someone who has this available can run them to make sure it's all good?

Thanks in advance for your review!

Requires AWS SDK v1.35.18:

#15930

@philnichol philnichol requested a review from a team as a code owner November 12, 2020 13:03
@ghost ghost added size/M Managed by automation to categorize the size of a PR. service/ec2 Issues and PRs that pertain to the ec2 service. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. labels Nov 12, 2020
@github-actions github-actions bot added the needs-triage Waiting for first response or review from a maintainer. label Nov 12, 2020
@bflad bflad added enhancement Requests to existing resources that expand the functionality or scope. and removed needs-triage Waiting for first response or review from a maintainer. labels Nov 12, 2020
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.

Hi @philnichol 👋 Overall looks really good, just some minor things then we'll run the testing to verify everything. 👍

aws/resource_aws_ec2_transit_gateway_vpc_attachment.go Outdated Show resolved Hide resolved
@@ -16,6 +16,10 @@ func dataSourceAwsEc2TransitGatewayVpcAttachment() *schema.Resource {
Read: dataSourceAwsEc2TransitGatewayVpcAttachmentRead,

Schema: map[string]*schema.Schema{
"appliance_mode_support": {
Copy link
Contributor

Choose a reason for hiding this comment

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

Needs documentation in website/docs/d/ec2_transit_gateway_vpc_attachment.html.markdown 👍

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good spot, completely forgot that! Have updated the doc

@bflad bflad added this to the v3.15.0 milestone Nov 12, 2020
@bflad bflad self-assigned this Nov 12, 2020
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.

Looks fantastic, thanks @philnichol 🚀

Output from acceptance testing (ignoring RAM-related failures):

--- PASS: TestAccAWSEc2TransitGatewayVpcAttachment_ApplianceModeSupport (432.34s)
--- PASS: TestAccAWSEc2TransitGatewayVpcAttachment_basic (424.94s)
--- PASS: TestAccAWSEc2TransitGatewayVpcAttachment_disappears (408.65s)
--- PASS: TestAccAWSEc2TransitGatewayVpcAttachment_DnsSupport (431.95s)
--- PASS: TestAccAWSEc2TransitGatewayVpcAttachment_Ipv6Support (424.15s)
--- PASS: TestAccAWSEc2TransitGatewayVpcAttachment_SubnetIds (547.74s)
--- PASS: TestAccAWSEc2TransitGatewayVpcAttachment_Tags (427.05s)
--- PASS: TestAccAWSEc2TransitGatewayVpcAttachment_TransitGatewayDefaultRouteTableAssociation (543.11s)
--- PASS: TestAccAWSEc2TransitGatewayVpcAttachment_TransitGatewayDefaultRouteTableAssociationAndPropagationDisabled (305.43s)
--- PASS: TestAccAWSEc2TransitGatewayVpcAttachment_TransitGatewayDefaultRouteTablePropagation (485.59s)

--- PASS: TestAccAWSEc2TransitGatewayVpcAttachmentDataSource_Filter (370.83s)
--- PASS: TestAccAWSEc2TransitGatewayVpcAttachmentDataSource_ID (433.38s)

@bflad bflad merged commit 276a95e into hashicorp:master Nov 12, 2020
@philnichol
Copy link
Contributor Author

Cheers @bflad and thanks for the review!

@philnichol philnichol deleted the e-adding-appliance-mode branch November 12, 2020 14:57
bflad added a commit that referenced this pull request Nov 12, 2020
@nckbnv
Copy link
Contributor

nckbnv commented Nov 12, 2020

That was super fast - thank you both @philnichol and @bflad

@ghost
Copy link

ghost commented Nov 12, 2020

This has been released in version 3.15.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!

@ghost
Copy link

ghost commented Dec 12, 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 as resolved and limited conversation to collaborators Dec 12, 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/ec2 Issues and PRs that pertain to the ec2 service. size/M Managed by automation to categorize the size of a PR. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure.
Projects
None yet
3 participants