From 0ec3dbca223f5179047a1bdbdddaa8043f2e8229 Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Wed, 3 Jan 2024 08:27:53 -0500 Subject: [PATCH] d/aws_route53_resolver_endpoint: Add `protocols` attribute. --- .changelog/35098.txt | 6 +++++- internal/service/route53resolver/endpoint_data_source.go | 6 ++++++ .../service/route53resolver/endpoint_data_source_test.go | 1 + website/docs/d/route53_resolver_endpoint.html.markdown | 1 + 4 files changed, 13 insertions(+), 1 deletion(-) diff --git a/.changelog/35098.txt b/.changelog/35098.txt index 772f0887d96..e8cc4dfe622 100644 --- a/.changelog/35098.txt +++ b/.changelog/35098.txt @@ -1,3 +1,7 @@ ```release-note:enhancement -resource/aws_route53_resolver_endpoint: Add `protocols` attribute +resource/aws_route53_resolver_endpoint: Add `protocols` argument +``` + +```release-note:enhancement +data-source/aws_route53_resolver_endpoint: Add `protocols` attribute ``` \ No newline at end of file diff --git a/internal/service/route53resolver/endpoint_data_source.go b/internal/service/route53resolver/endpoint_data_source.go index 8deb06d4048..3cdaf4540fa 100644 --- a/internal/service/route53resolver/endpoint_data_source.go +++ b/internal/service/route53resolver/endpoint_data_source.go @@ -54,6 +54,11 @@ func DataSourceEndpoint() *schema.Resource { Type: schema.TypeString, Computed: true, }, + "protocols": { + Type: schema.TypeSet, + Elem: &schema.Schema{Type: schema.TypeString}, + Computed: true, + }, "resolver_endpoint_id": { Type: schema.TypeString, Optional: true, @@ -115,6 +120,7 @@ func dataSourceEndpointRead(ctx context.Context, d *schema.ResourceData, meta in d.Set("arn", ep.Arn) d.Set("direction", ep.Direction) d.Set("name", ep.Name) + d.Set("protocols", aws.StringValueSlice(ep.Protocols)) d.Set("resolver_endpoint_id", ep.Id) d.Set("status", ep.Status) d.Set("vpc_id", ep.HostVPCId) diff --git a/internal/service/route53resolver/endpoint_data_source_test.go b/internal/service/route53resolver/endpoint_data_source_test.go index c1dae57e518..d3ace3d8a37 100644 --- a/internal/service/route53resolver/endpoint_data_source_test.go +++ b/internal/service/route53resolver/endpoint_data_source_test.go @@ -31,6 +31,7 @@ func TestAccRoute53ResolverEndpointDataSource_basic(t *testing.T) { resource.TestCheckResourceAttrPair(datasourceName, "id", resourceName, "id"), resource.TestCheckResourceAttrPair(datasourceName, "ip_addresses.#", resourceName, "ip_address.#"), resource.TestCheckResourceAttrPair(datasourceName, "name", resourceName, "name"), + resource.TestCheckResourceAttrPair(datasourceName, "protocols.#", resourceName, "protocols.#"), resource.TestCheckResourceAttrPair(datasourceName, "resolver_endpoint_id", resourceName, "id"), resource.TestCheckResourceAttrPair(datasourceName, "vpc_id", resourceName, "host_vpc_id"), ), diff --git a/website/docs/d/route53_resolver_endpoint.html.markdown b/website/docs/d/route53_resolver_endpoint.html.markdown index 0bf248e95f3..02042be1bae 100644 --- a/website/docs/d/route53_resolver_endpoint.html.markdown +++ b/website/docs/d/route53_resolver_endpoint.html.markdown @@ -41,6 +41,7 @@ In addition to all arguments above, the following attributes are exported: * `arn` - Computed ARN of the Route53 Resolver Endpoint. * `direction` - Direction of the queries to or from the Resolver Endpoint . * `ip_addresses` - List of IPaddresses that have been associated with the Resolver Endpoint. +* `protocols` - The protocols used by Resolver endpoint. * `status` - Current status of the Resolver Endpoint. * `vpc_id` - ID of the Host VPC that the Resolver Endpoint resides in.