Skip to content

Commit

Permalink
d/aws_route53_resolver_endpoint: Add protocols attribute.
Browse files Browse the repository at this point in the history
  • Loading branch information
ewbankkit committed Jan 3, 2024
1 parent b1aabbb commit 0ec3dbc
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 1 deletion.
6 changes: 5 additions & 1 deletion .changelog/35098.txt
Original file line number Diff line number Diff line change
@@ -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
```
6 changes: 6 additions & 0 deletions internal/service/route53resolver/endpoint_data_source.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"),
),
Expand Down
1 change: 1 addition & 0 deletions website/docs/d/route53_resolver_endpoint.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down

0 comments on commit 0ec3dbc

Please sign in to comment.