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

d/vpc_endpoint_service: add output of private_dns_names #39659

Merged

Conversation

danielewood
Copy link
Contributor

@danielewood danielewood commented Oct 10, 2024

This PR adds the private_dns_names: [] output to vpc_endpoint_service data source.

This output is already available from the AWS SDK, this PR simply exposes it.

output before:

{
  "acceptance_required" = false
  "arn" = "arn:aws:ec2:us-west-2:1234567890:vpc-endpoint-service/vpce-svc-002f900dc063828a5"
  "availability_zones" = toset([
    "us-west-2a",
    "us-west-2b",
    "us-west-2c",
  ])
  "base_endpoint_dns_names" = toset([
    "kinesis.us-west-2.vpce.amazonaws.com",
  ])
  "filter" = toset(null) /* of object */
  "id" = "4198992239"
  "manages_vpc_endpoints" = false
  "owner" = "amazon"
  "private_dns_name" = "kinesis.us-west-2.amazonaws.com"
  "service" = "kinesis-streams"
  "service_id" = "vpce-svc-002f900dc063828a5"
  "service_name" = "com.amazonaws.us-west-2.kinesis-streams"
  "service_type" = "Interface"
  "supported_ip_address_types" = toset([
    "ipv4",
  ])
  "tags" = tomap({})
  "timeouts" = null /* object */
  "vpc_endpoint_policy_supported" = true
}

output after:

{
  "acceptance_required" = false
  "arn" = "arn:aws:ec2:us-west-2:1234567890:vpc-endpoint-service/vpce-svc-002f900dc063828a5"
  "availability_zones" = toset([
    "us-west-2a",
    "us-west-2b",
    "us-west-2c",
  ])
  "base_endpoint_dns_names" = toset([
    "kinesis.us-west-2.vpce.amazonaws.com",
  ])
  "filter" = toset(null) /* of object */
  "id" = "4198992239"
  "manages_vpc_endpoints" = false
  "owner" = "amazon"
  "private_dns_name" = "kinesis.us-west-2.amazonaws.com"
  "private_dns_names" = toset([
    "*.control-kinesis.us-west-2.amazonaws.com",
    "*.data-kinesis.us-west-2.amazonaws.com",
    "kinesis.us-west-2.amazonaws.com",
  ])
  "service" = "kinesis-streams"
  "service_id" = "vpce-svc-002f900dc063828a5"
  "service_name" = "com.amazonaws.us-west-2.kinesis-streams"
  "service_type" = "Interface"
  "supported_ip_address_types" = toset([
    "ipv4",
  ])
  "tags" = tomap({})
  "timeouts" = null /* object */
  "vpc_endpoint_policy_supported" = true
}

Relations

Closes #39655

References

Output from Acceptance Testing

% make testacc TESTS=TestAccVPCEndpointServiceDataSource PKG=ec2

...

@danielewood danielewood requested a review from a team as a code owner October 10, 2024 02:05
Copy link

Community Note

Voting for Prioritization

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

For Submitters

  • Review the contribution guide relating to the type of change you are making to ensure all of the necessary steps have been taken.
  • For new resources and data sources, use skaff to generate scaffolding with comments detailing common expectations.
  • 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. service/vpc Issues and PRs that pertain to the vpc service. needs-triage Waiting for first response or review from a maintainer. labels Oct 10, 2024
@danielewood danielewood changed the title Update vpc_endpoint_service_data_source to support private_dns_names list d/vpc_endpoint_service: add output of private_dns_names Oct 10, 2024
Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Welcome @danielewood 👋

It looks like this is your first Pull Request submission to the Terraform AWS Provider! If you haven’t already done so please make sure you have checked out our CONTRIBUTOR guide and FAQ to make sure your contribution is adhering to best practice and has all the necessary elements in place for a successful approval.

Also take a look at our FAQ which details how we prioritize Pull Requests for inclusion.

Thanks again, and welcome to the community! 😃

@jar-b jar-b removed the needs-triage Waiting for first response or review from a maintainer. label Oct 10, 2024
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 testacc PKG=vpc TESTS=TestAccVPCEndpointServiceDataSource_
make: Verifying source code with gofmt...
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go1.23.2 test ./internal/service/ec2/... -v -count 1 -parallel 20 -run='TestAccVPCEndpointServiceDataSource_'  -timeout 360m
2024/10/10 10:47:11 Initializing Terraform AWS Provider...

--- PASS: TestAccVPCEndpointServiceDataSource_ServiceType_interface (10.70s)
--- PASS: TestAccVPCEndpointServiceDataSource_ServiceType_gateway (10.83s)
--- PASS: TestAccVPCEndpointServiceDataSource_Custom_filter (220.51s)
--- PASS: TestAccVPCEndpointServiceDataSource_custom (221.16s)
--- PASS: TestAccVPCEndpointServiceDataSource_CustomFilter_tags (228.27s)
PASS
ok      github.com/hashicorp/terraform-provider-aws/internal/service/ec2        234.440s

@jar-b
Copy link
Member

jar-b commented Oct 10, 2024

Thanks for your contribution, @danielewood! 👍

@jar-b jar-b merged commit 2d0d06b into hashicorp:main Oct 10, 2024
41 checks passed
@github-actions github-actions bot added this to the v5.71.0 milestone Oct 10, 2024
Copy link

This functionality has been released in v5.72.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!

Copy link

I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 16, 2024
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. service/vpc Issues and PRs that pertain to the vpc service. 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.

[Enhancement]: aws_vpc_endpoint_service data source does not expose all fields returned by the AWS SDK
2 participants