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

New Data Source: aws_ec2_transit_gateway_vpn_attachment #8071

Merged
merged 1 commit into from
Mar 26, 2019

Conversation

bflad
Copy link
Contributor

@bflad bflad commented Mar 25, 2019

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" comments, they generate extra noise for pull request followers and do not help prioritize the request

Reference: #6884

This is a bare minimum implementation to help operators retrieve a VPN Attachment ID using the Transit Gateway ID and VPN Connection ID. It can be further enhanced in the future.

Output from acceptance testing:

--- PASS: TestAccAWSEc2TransitGatewayVpnAttachmentDataSource_TransitGatewayIdAndVpnConnectionId (462.11s)

Reference: #6884

This is a bare minimum implementation to help operators retrieve a VPN Attachment ID using the Transit Gateway ID and VPN Connection ID. It can be further enhanced in the future.

Output from acceptance testing:

```
--- PASS: TestAccAWSEc2TransitGatewayVpnAttachmentDataSource_TransitGatewayIdAndVpnConnectionId (462.11s)
```
@bflad bflad added new-data-source Introduces a new data source. service/ec2 Issues and PRs that pertain to the ec2 service. labels Mar 25, 2019
@bflad bflad requested a review from a team March 25, 2019 20:14
@ghost ghost added size/L Managed by automation to categorize the size of a PR. documentation Introduces or discusses updates to documentation. provider Pertains to the provider itself, rather than any interaction with AWS. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. labels Mar 25, 2019
Copy link
Contributor

@nywilken nywilken left a comment

Choose a reason for hiding this comment

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

LGTM 🚀

Config: testAccAWSEc2TransitGatewayVpnAttachmentDataSourceConfigTransitGatewayIdAndVpnConnectionId(rBgpAsn),
Check: resource.ComposeTestCheckFunc(
resource.TestCheckResourceAttr(dataSourceName, "tags.%", "0"),
resource.TestCheckResourceAttrPair(dataSourceName, "transit_gateway_id", transitGatewayResourceName, "id"),
Copy link
Contributor

Choose a reason for hiding this comment

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

That's a nice little helper to know about 👍

@bflad bflad added this to the v2.4.0 milestone Mar 26, 2019
@bflad bflad merged commit f9fce44 into master Mar 26, 2019
@bflad bflad deleted the f-aws_ec2_transit_gateway_vpn_attachment branch March 26, 2019 17:04
bflad added a commit that referenced this pull request Mar 26, 2019
@bflad
Copy link
Contributor Author

bflad commented Mar 29, 2019

This has been released in version 2.4.0 of the Terraform AWS provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

@LijieZhou
Copy link

Thanks, @bflad

Is multi-version providers allowed? Specifically, I want to use this specific feature but not sure whether the whole project is ready to upgrade to 2.4 yet. Thus, I added another provider with alias latest and version 2.4 into my global variables. However, I got an error when running terraform init saying

No provider "aws" plugins meet the constraint "1.56,1.56,1.56,1.56,2.40".

The version constraint is derived from the "version" argument within the
provider "aws" block in configuration. Child modules may also apply
provider version constraints. To view the provider versions requested by each
module in the current configuration, run "terraform providers".

To proceed, the version constraints for this provider must be relaxed by
either adjusting or removing the "version" argument in the provider blocks
throughout the configuration.

@bflad
Copy link
Contributor Author

bflad commented Apr 1, 2019

Hi @LijieZhou 👋 Terraform requires resolving all provider versions to a single version, even across aliased providers. This limitation is upstream in Terraform core and not the Terraform AWS Provider itself, so you will need to file an issue there if you would like further explanation of this limitation or the potential feature request: https://github.com/hashicorp/terraform/issues

@gregglowrimore
Copy link

I am still unable to attach a VPN to my transit gateway. Even with the updated aws provider (2.4.0) - I am still getting:

aws_ec2_transit_gateway_vpn_attachment.tgw_vpn_two_attachment: Provider doesn't support resource: aws_ec2_transit_gateway_vpn_attachment

@ghost
Copy link

ghost commented Mar 30, 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 Mar 30, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
documentation Introduces or discusses updates to documentation. new-data-source Introduces a new data source. provider Pertains to the provider itself, rather than any interaction with AWS. service/ec2 Issues and PRs that pertain to the ec2 service. size/L 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
Development

Successfully merging this pull request may close these issues.

4 participants