Skip to content

Conversation

subham-ibmhc
Copy link
Contributor

@subham-ibmhc subham-ibmhc commented Oct 10, 2025

Rollback Plan

If a change needs to be reverted, we will publish an updated version of the library.

Changes to Security Controls

Are there any changes to security controls (access controls, encryption, logging) in this pull request? If so, explain.

Description

  • Add new data source aws_vpn_connection to retrieve information on an EC2 VPN Connection.

Relations

Closes #3593

References

https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeVpnConnections.html

Output from Acceptance Testing

% make testacc TESTS=TestAccEC2VpnConnectionDataSource_ PKG=ec2 make: Verifying source code with gofmt...
==> Checking that code complies with gofmt requirements... make: Running acceptance tests on branch: 🌿 f-aws_ec2_vpn_connection-new-data-source 🌿... TF_ACC=1 go1.24.6 test ./internal/service/ec2/... -v -count 1 -parallel 20 -run='TestAccEC2VpnConnectionDataSource_' -timeout 360m -vet=off 2025/10/09 20:21:06 Creating Terraform AWS Provider (SDKv2-style)... 2025/10/09 20:21:06 Initializing Terraform AWS Provider (SDKv2-style)...
=== RUN TestAccEC2VpnConnectionDataSource_basic
=== PAUSE TestAccEC2VpnConnectionDataSource_basic
=== RUN TestAccEC2VpnConnectionDataSource_byFilter
=== PAUSE TestAccEC2VpnConnectionDataSource_byFilter
=== RUN TestAccEC2VpnConnectionDataSource_nonExistentId
=== PAUSE TestAccEC2VpnConnectionDataSource_nonExistentId
=== RUN TestAccEC2VpnConnectionDataSource_noInput
=== PAUSE TestAccEC2VpnConnectionDataSource_noInput
=== CONT TestAccEC2VpnConnectionDataSource_basic
=== CONT TestAccEC2VpnConnectionDataSource_nonExistentId
=== CONT TestAccEC2VpnConnectionDataSource_noInput
=== CONT TestAccEC2VpnConnectionDataSource_byFilter
--- PASS: TestAccEC2VpnConnectionDataSource_noInput (3.85s)
--- PASS: TestAccEC2VpnConnectionDataSource_nonExistentId (5.41s)
--- PASS: TestAccEC2VpnConnectionDataSource_byFilter (258.74s)
--- PASS: TestAccEC2VpnConnectionDataSource_basic (593.10s)
PASS
ok github.com/hashicorp/terraform-provider-aws/internal/service/ec2 597.880s

% make testacc TESTS=TestAccEC2VpnConnectionDataSource_ PKG=ec2
make: Verifying source code with gofmt...
==> Checking that code complies with gofmt requirements...
make: Running acceptance tests on branch: 🌿 f-aws_ec2_vpn_connection-new-data-source 🌿...
TF_ACC=1 go1.24.6 test ./internal/service/ec2/... -v -count 1 -parallel 20 -run='TestAccEC2VpnConnectionDataSource_'  -timeout 360m -vet=off
2025/10/09 20:21:06 Creating Terraform AWS Provider (SDKv2-style)...
2025/10/09 20:21:06 Initializing Terraform AWS Provider (SDKv2-style)...
=== RUN   TestAccEC2VpnConnectionDataSource_basic
=== PAUSE TestAccEC2VpnConnectionDataSource_basic
=== RUN   TestAccEC2VpnConnectionDataSource_byFilter
=== PAUSE TestAccEC2VpnConnectionDataSource_byFilter
=== RUN   TestAccEC2VpnConnectionDataSource_nonExistentId
=== PAUSE TestAccEC2VpnConnectionDataSource_nonExistentId
=== RUN   TestAccEC2VpnConnectionDataSource_noInput
=== PAUSE TestAccEC2VpnConnectionDataSource_noInput
=== CONT  TestAccEC2VpnConnectionDataSource_basic
=== CONT  TestAccEC2VpnConnectionDataSource_nonExistentId
=== CONT  TestAccEC2VpnConnectionDataSource_noInput
=== CONT  TestAccEC2VpnConnectionDataSource_byFilter
--- PASS: TestAccEC2VpnConnectionDataSource_noInput (3.85s)
--- PASS: TestAccEC2VpnConnectionDataSource_nonExistentId (5.41s)
--- PASS: TestAccEC2VpnConnectionDataSource_byFilter (258.74s)
--- PASS: TestAccEC2VpnConnectionDataSource_basic (593.10s)
PASS
ok      github.com/hashicorp/terraform-provider-aws/internal/service/ec2        597.880s
Copy link
Contributor

Community Guidelines

This comment is added to every new Pull Request to provide quick reference to how the Terraform AWS Provider is maintained. Please review the information below, and thank you for contributing to the community that keeps the provider thriving! 🚀

Voting for Prioritization

  • Please vote on this Pull Request by adding a 👍 reaction to the original post to help the community and maintainers prioritize it.
  • Please see our prioritization guide for additional information on how the maintainers handle prioritization.
  • Please do not leave +1 or other comments that do not add relevant new information or questions; they generate extra noise for others following the Pull Request and do not help prioritize the request.

Pull Request Authors

  • Review the contribution guide relating to the type of change you are making to ensure all of the necessary steps have been taken.
  • Whether or not the branch has been rebased will not impact prioritization, but doing so is always a welcome surprise.

@github-actions github-actions bot added documentation Introduces or discusses updates to documentation. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. generators Relates to code generators. prioritized Part of the maintainer teams immediate focus. To be addressed within the current quarter. size/XL Managed by automation to categorize the size of a PR. labels Oct 10, 2025
@subham-ibmhc subham-ibmhc added the rnd-ind-provider rnd-ind-provider label Oct 11, 2025
subham-ibmhc and others added 5 commits October 14, 2025 03:12
```console
% make t K=ec2 T=TestAccEC2VPNConnectionDataSource_
make: Verifying source code with gofmt...
==> Checking that code complies with gofmt requirements...
make: Running acceptance tests on branch: 🌿 f-aws_ec2_vpn_connection-new-data-source 🌿...
TF_ACC=1 go1.24.8 test ./internal/service/ec2/... -v -count 1 -parallel 20 -run='TestAccEC2VPNConnectionDataSource_'  -timeout 360m -vet=off
2025/10/14 10:23:05 Creating Terraform AWS Provider (SDKv2-style)...
2025/10/14 10:23:05 Initializing Terraform AWS Provider (SDKv2-style)...

--- PASS: TestAccEC2VPNConnectionDataSource_noInput (1.62s)
--- PASS: TestAccEC2VPNConnectionDataSource_nonExistentId (2.57s)
--- PASS: TestAccEC2VPNConnectionDataSource_byFilter (252.11s)
--- PASS: TestAccEC2VPNConnectionDataSource_basic (252.37s)
PASS
ok      github.com/hashicorp/terraform-provider-aws/internal/service/ec2        259.363s
```
@github-actions github-actions bot added the service/vpnsite Issues and PRs that pertain to the vpnsite service. label Oct 14, 2025
@subham-ibmhc subham-ibmhc changed the title [New Data Source]: aws_ec2_vpn_connection: Add new data source to fetch information about an EC2 VPN Connection. [New Data Source]: aws_vpn_connection: Add new data source to fetch information about an EC2 VPN Connection. Oct 14, 2025
@subham-ibmhc subham-ibmhc marked this pull request as ready for review October 14, 2025 20:56
@subham-ibmhc subham-ibmhc requested a review from a team as a code owner October 14, 2025 20:56
jar-b added 3 commits October 15, 2025 15:54
```console
% make t K=ec2 T=TestAccVPNConnectionDataSource_
make: Verifying source code with gofmt...
==> Checking that code complies with gofmt requirements...
make: Running acceptance tests on branch: 🌿 f-aws_ec2_vpn_connection-new-data-source 🌿...
TF_ACC=1 go1.24.8 test ./internal/service/ec2/... -v -count 1 -parallel 20 -run='TestAccVPNConnectionDataSource_'  -timeout 360m -vet=off
2025/10/15 16:51:14 Creating Terraform AWS Provider (SDKv2-style)...
2025/10/15 16:51:14 Initializing Terraform AWS Provider (SDKv2-style)...

--- PASS: TestAccVPNConnectionDataSource_noInput (1.42s)
--- PASS: TestAccVPNConnectionDataSource_nonExistentId (2.32s)
--- PASS: TestAccVPNConnectionDataSource_byFilter (243.04s)
--- PASS: TestAccVPNConnectionDataSource_basic (243.18s)
PASS
ok      github.com/hashicorp/terraform-provider-aws/internal/service/ec2        250.058s
```
```console
% make t K=ec2 T=TestAccVPNConnectionDataSource_
make: Verifying source code with gofmt...
==> Checking that code complies with gofmt requirements...
make: Running acceptance tests on branch: 🌿 f-aws_ec2_vpn_connection-new-data-source 🌿...
TF_ACC=1 go1.24.8 test ./internal/service/ec2/... -v -count 1 -parallel 20 -run='TestAccVPNConnectionDataSource_'  -timeout 360m -vet=off
2025/10/15 17:01:59 Creating Terraform AWS Provider (SDKv2-style)...
2025/10/15 17:01:59 Initializing Terraform AWS Provider (SDKv2-style)...

--- PASS: TestAccVPNConnectionDataSource_noInput (1.61s)
--- PASS: TestAccVPNConnectionDataSource_nonExistentId (2.56s)
--- PASS: TestAccVPNConnectionDataSource_byFilter (298.01s)
--- PASS: TestAccVPNConnectionDataSource_basic (588.72s)
PASS
ok      github.com/hashicorp/terraform-provider-aws/internal/service/ec2        595.637s
```
jar-b
jar-b previously approved these changes Oct 15, 2025
Copy link
Member

@jar-b jar-b left a comment

Choose a reason for hiding this comment

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

LGTM 🚀

% make t K=ec2 T=TestAccVPNConnectionDataSource_
make: Verifying source code with gofmt...
==> Checking that code complies with gofmt requirements...
make: Running acceptance tests on branch: 🌿 f-aws_ec2_vpn_connection-new-data-source 🌿...
TF_ACC=1 go1.24.8 test ./internal/service/ec2/... -v -count 1 -parallel 20 -run='TestAccVPNConnectionDataSource_'  -timeout 360m -vet=off
2025/10/15 17:01:59 Creating Terraform AWS Provider (SDKv2-style)...
2025/10/15 17:01:59 Initializing Terraform AWS Provider (SDKv2-style)...

--- PASS: TestAccVPNConnectionDataSource_noInput (1.61s)
--- PASS: TestAccVPNConnectionDataSource_nonExistentId (2.56s)
--- PASS: TestAccVPNConnectionDataSource_byFilter (298.01s)
--- PASS: TestAccVPNConnectionDataSource_basic (588.72s)
PASS
ok      github.com/hashicorp/terraform-provider-aws/internal/service/ec2        595.637s

Copy link
Member

@johnsonaj johnsonaj left a comment

Choose a reason for hiding this comment

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

LGTM 🚀

@subham-ibmhc subham-ibmhc merged commit d0a5e9c into hashicorp:main Oct 15, 2025
43 checks passed
Copy link
Contributor

Warning

This Issue has been closed, meaning that any additional comments are much easier for the maintainers to miss. Please assume that the maintainers will not see them.

Ongoing conversations amongst community members are welcome, however, the issue will be locked after 30 days. Moving conversations to another venue, such as the AWS Provider forum, is recommended. If you have additional concerns, please open a new issue, referencing this one where needed.

@github-actions github-actions bot added this to the v6.17.0 milestone Oct 15, 2025
@github-actions github-actions bot removed the prioritized Part of the maintainer teams immediate focus. To be addressed within the current quarter. label Oct 16, 2025
Copy link
Contributor

This functionality has been released in v6.17.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. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Introduces or discusses updates to documentation. generators Relates to code generators. rnd-ind-provider rnd-ind-provider service/vpnsite Issues and PRs that pertain to the vpnsite service. size/XL 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.

add data source for aws_vpn_connection

3 participants