Skip to content

data source/service: Add a service data source #16641

@YakDriver

Description

@YakDriver

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue 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 issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Description

It would be helpful to have a data source to help with service names such as com.amazonaws.us-east-1.s3. While these components can be composed from existing data sources, a new data source would be convenient for practitioners and provide a way to work backwards from a service name to regions, service prefixes, and service IDs.

This allows practitioners and maintainers to create configurations that can move more easily between partitions. This is a next step following on with data sources such as aws_region and aws_partition.

New or Affected Resource(s)

  • aws_service

Potential Terraform Configuration

resource "aws_vpc" "test" {
  cidr_block = "10.0.0.0/16"

  tags = {
    Name = %[1]q
  }
}

data "aws_service" "s3" {
  service_id = "s3"
}

resource "aws_vpc_endpoint" "test" {
  vpc_id       = aws_vpc.test.id
  service_name = data.aws_service_name.s3.reverse_dns_name
}

References

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementRequests to existing resources that expand the functionality or scope.partition/aws-us-govPertains to the aws-us-gov partition.service/ec2Issues and PRs that pertain to the ec2 service.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions