From 785fe9cf0e356a73a52b0dd55c1dfbd9d3381e1a Mon Sep 17 00:00:00 2001 From: Aleksandr Moiseenko Date: Tue, 21 May 2024 13:48:09 +0400 Subject: [PATCH 1/2] resource/route53_traffic_policy_document: Add `application-load-balancer` endpoint type --- .changelog/37618.txt | 3 +++ internal/service/route53/traffic_policy_document_model.go | 2 ++ .../d/route53_traffic_policy_document.html.markdown | 4 ++-- 3 files changed, 7 insertions(+), 2 deletions(-) create mode 100644 .changelog/37618.txt diff --git a/.changelog/37618.txt b/.changelog/37618.txt new file mode 100644 index 00000000000..81b4f71dfa4 --- /dev/null +++ b/.changelog/37618.txt @@ -0,0 +1,3 @@ +```release-note:enhancement +resource/route53_traffic_policy_document: Add `application-load-balancer` endpoint type +``` diff --git a/internal/service/route53/traffic_policy_document_model.go b/internal/service/route53/traffic_policy_document_model.go index af8dfeced2d..c785cebb462 100644 --- a/internal/service/route53/traffic_policy_document_model.go +++ b/internal/service/route53/traffic_policy_document_model.go @@ -10,6 +10,7 @@ const ( trafficPolicyDocEndpointElastic trafficPolicyDocEndpointType = "elastic-load-balancer" trafficPolicyDocEndpointS3 trafficPolicyDocEndpointType = "s3-website" trafficPolicyDocEndpointValue trafficPolicyDocEndpointType = "value" // nosemgrep:ci.literal-value-string-constant + trafficPolicyDocEndpointALB trafficPolicyDocEndpointType = "application-load-balancer" ) func (trafficPolicyDocEndpointType) Values() []trafficPolicyDocEndpointType { @@ -18,6 +19,7 @@ func (trafficPolicyDocEndpointType) Values() []trafficPolicyDocEndpointType { trafficPolicyDocEndpointElastic, trafficPolicyDocEndpointS3, trafficPolicyDocEndpointValue, // nosemgrep:ci.literal-value-string-constant + trafficPolicyDocEndpointALB, } } diff --git a/website/docs/cdktf/typescript/d/route53_traffic_policy_document.html.markdown b/website/docs/cdktf/typescript/d/route53_traffic_policy_document.html.markdown index 5494e19acf8..f824e940ce3 100644 --- a/website/docs/cdktf/typescript/d/route53_traffic_policy_document.html.markdown +++ b/website/docs/cdktf/typescript/d/route53_traffic_policy_document.html.markdown @@ -185,7 +185,7 @@ The following arguments are optional: ### `endpoint` * `id` - (Required) ID of an endpoint you want to assign. -* `type` - (Optional) Type of the endpoint. Valid values are `value` , `cloudfront` , `elastic-load-balancer`, `s3-website` +* `type` - (Optional) Type of the endpoint. Valid values are `value` , `cloudfront` , `application-load-balancer`, `elastic-load-balancer`, `s3-website` * `region` - (Optional) To route traffic to an Amazon S3 bucket that is configured as a website endpoint, specify the region in which you created the bucket for `region`. * `value` - (Optional) Value of the `type`. @@ -248,4 +248,4 @@ This data source exports the following attributes in addition to the arguments a * `json` - Standard JSON policy document rendered based on the arguments above. - \ No newline at end of file + From b51163f93b5567581e476b7374cdc92cd8e60878 Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Tue, 21 May 2024 09:24:22 -0400 Subject: [PATCH 2/2] d/aws_route53_traffic_policy_document: Add support for `application-load-balancer, `elastic-beanstalk` and `network-load-balancer` `endpoint.type` values. --- .changelog/37618.txt | 2 +- .../route53/traffic_policy_document_model.go | 20 +++++++++++-------- ...te53_traffic_policy_document.html.markdown | 2 +- 3 files changed, 14 insertions(+), 10 deletions(-) diff --git a/.changelog/37618.txt b/.changelog/37618.txt index 81b4f71dfa4..90924a38c48 100644 --- a/.changelog/37618.txt +++ b/.changelog/37618.txt @@ -1,3 +1,3 @@ ```release-note:enhancement -resource/route53_traffic_policy_document: Add `application-load-balancer` endpoint type +data-source/aws_route53_traffic_policy_document: Add support for `application-load-balancer, `elastic-beanstalk` and `network-load-balancer` `endpoint.type` values ``` diff --git a/internal/service/route53/traffic_policy_document_model.go b/internal/service/route53/traffic_policy_document_model.go index c785cebb462..b0aad69c4b7 100644 --- a/internal/service/route53/traffic_policy_document_model.go +++ b/internal/service/route53/traffic_policy_document_model.go @@ -6,20 +6,24 @@ package route53 type trafficPolicyDocEndpointType string const ( - trafficPolicyDocEndpointCloudFront trafficPolicyDocEndpointType = "cloudfront" - trafficPolicyDocEndpointElastic trafficPolicyDocEndpointType = "elastic-load-balancer" - trafficPolicyDocEndpointS3 trafficPolicyDocEndpointType = "s3-website" - trafficPolicyDocEndpointValue trafficPolicyDocEndpointType = "value" // nosemgrep:ci.literal-value-string-constant - trafficPolicyDocEndpointALB trafficPolicyDocEndpointType = "application-load-balancer" + trafficPolicyDocEndpointALB trafficPolicyDocEndpointType = "application-load-balancer" + trafficPolicyDocEndpointCloudFront trafficPolicyDocEndpointType = "cloudfront" + trafficPolicyDocEndpointElasticBeanstalk trafficPolicyDocEndpointType = "elastic-beanstalk" + trafficPolicyDocEndpointELB trafficPolicyDocEndpointType = "elastic-load-balancer" + trafficPolicyDocEndpointNLB trafficPolicyDocEndpointType = "network-load-balancer" + trafficPolicyDocEndpointS3Website trafficPolicyDocEndpointType = "s3-website" + trafficPolicyDocEndpointValue trafficPolicyDocEndpointType = "value" // nosemgrep:ci.literal-value-string-constant ) func (trafficPolicyDocEndpointType) Values() []trafficPolicyDocEndpointType { return []trafficPolicyDocEndpointType{ + trafficPolicyDocEndpointALB, trafficPolicyDocEndpointCloudFront, - trafficPolicyDocEndpointElastic, - trafficPolicyDocEndpointS3, + trafficPolicyDocEndpointElasticBeanstalk, + trafficPolicyDocEndpointELB, + trafficPolicyDocEndpointNLB, + trafficPolicyDocEndpointS3Website, trafficPolicyDocEndpointValue, // nosemgrep:ci.literal-value-string-constant - trafficPolicyDocEndpointALB, } } diff --git a/website/docs/d/route53_traffic_policy_document.html.markdown b/website/docs/d/route53_traffic_policy_document.html.markdown index 2b474a30122..68f465a5c83 100644 --- a/website/docs/d/route53_traffic_policy_document.html.markdown +++ b/website/docs/d/route53_traffic_policy_document.html.markdown @@ -152,7 +152,7 @@ The following arguments are optional: ### `endpoint` * `id` - (Required) ID of an endpoint you want to assign. -* `type` - (Optional) Type of the endpoint. Valid values are `value` , `cloudfront` , `elastic-load-balancer`, `s3-website` +* `type` - (Optional) Type of the endpoint. Valid values are `value`, `cloudfront`, `elastic-load-balancer`, `s3-website`, `application-load-balancer`, `network-load-balancer` and `elastic-beanstalk` * `region` - (Optional) To route traffic to an Amazon S3 bucket that is configured as a website endpoint, specify the region in which you created the bucket for `region`. * `value` - (Optional) Value of the `type`.