Skip to content

Commit

Permalink
Merge branch 'main' into HEAD
Browse files Browse the repository at this point in the history
# Conflicts:
#	names/data/names_data.csv
  • Loading branch information
ewbankkit committed Jun 17, 2024
2 parents 1441a8b + 6535984 commit 192ac93
Show file tree
Hide file tree
Showing 162 changed files with 13,603 additions and 1,296 deletions.
3 changes: 3 additions & 0 deletions .changelog/37716.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:enhancement
resource/aws_docdb_cluster: Add `restore_to_point_in_time` argument
```
7 changes: 7 additions & 0 deletions .changelog/37891.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
```release-note:enhancement
resource/aws_glue_catalog_table: Add `additional_locations` argument in `storage_descriptor`
```

```release-note:enhancement
data-source/aws_glue_catalog_table: Add `additional_locations` argument in `storage_descriptor`
```
7 changes: 7 additions & 0 deletions .changelog/37991.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
```release-note:bug
resource/aws_dynamodb_table: Fixes perpetual diff when `ttl.attribute_name` is set when `ttl.enabled` is not set.
```

```release-note:enhancement
resource/aws_dynamodb_table: Adds validation for `ttl` values.
```
19 changes: 19 additions & 0 deletions .changelog/38003.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
```release-note:enhancement
resource/aws_launch_template: Add `instance_requirements.max_spot_price_as_percentage_of_optimal_on_demand_price` argument
```

```release-note:enhancement
resource/aws_ec2_fleet: Add `launch_template_config.override.instance_requirements.max_spot_price_as_percentage_of_optimal_on_demand_price` argument
```

```release-note:enhancement
resource/aws_autoscaling_group: Add `mixed_instances_policy.launch_template.override.instance_requirements.max_spot_price_as_percentage_of_optimal_on_demand_price` argument
```

```release-note:enhancement
data-source/aws_autoscaling_group: Add `mixed_instances_policy.launch_template.override.instance_requirements.max_spot_price_as_percentage_of_optimal_on_demand_price` attribute
```

```release-note:enhancement
data-source/aws_launch_template: Add `instance_requirements.max_spot_price_as_percentage_of_optimal_on_demand_price` attribute
```
3 changes: 3 additions & 0 deletions .changelog/38010.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:enhancement
resource/aws_api_gateway_integration: Increase maximum value of `timeout_milliseconds` from `29000` (29 seconds) to `300000` (5 minutes)
```
3 changes: 3 additions & 0 deletions .changelog/38011.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:bug
service/transitgateway: Fix resource Read pagination regression causing `NotFound` errors
```
23 changes: 23 additions & 0 deletions .changelog/38013.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
```release-note:enhancement
data-source/aws_networkmanager_core_network_policy_document: Add `attachment_policies.action.add_to_network_function_group` argument
```

```release-note:enhancement
data-source/aws_networkmanager_core_network_policy_document: Add `send-via` and `send-to` as valid values for `segment_actions.action`
```

```release-note:enhancement
data-source/aws_networkmanager_core_network_policy_document: Add `single-hop` and `dual-hop` as valid values for `segment_actions.mode`
```

```release-note:enhancement
data-source/aws_networkmanager_core_network_policy_document: Add `when_sent_to` and `via` configuration blocks to `segment_actions`
```

```release-note:bug
data-source/aws_networkmanager_core_network_policy_document: Add correct `except` values to the returned JSON document when `segment_actions.share_with_except` is configured
```

```release-note:enhancement
data-source/aws_networkmanager_core_network_policy_document: Add `network_function_groups` configuration block
```
2 changes: 1 addition & 1 deletion .ci/providerlint/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module github.com/hashicorp/terraform-provider-aws/ci/providerlint
go 1.22

require (
github.com/aws/aws-sdk-go v1.54.0
github.com/aws/aws-sdk-go v1.54.2
github.com/bflad/tfproviderlint v0.29.0
github.com/hashicorp/terraform-plugin-sdk/v2 v2.34.0
golang.org/x/tools v0.13.0
Expand Down
4 changes: 2 additions & 2 deletions .ci/providerlint/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ github.com/agext/levenshtein v1.2.2/go.mod h1:JEDfjyjHDjOF/1e4FlBE/PkbqA9OfWu2ki
github.com/apparentlymart/go-textseg/v12 v12.0.0/go.mod h1:S/4uRK2UtaQttw1GenVJEynmyUenKwP++x/+DdGV/Ec=
github.com/apparentlymart/go-textseg/v15 v15.0.0 h1:uYvfpb3DyLSCGWnctWKGj857c6ew1u1fNQOlOtuGxQY=
github.com/apparentlymart/go-textseg/v15 v15.0.0/go.mod h1:K8XmNZdhEBkdlyDdvbmmsvpAG721bKi0joRfFdHIWJ4=
github.com/aws/aws-sdk-go v1.54.0 h1:tGCQ6YS2TepzKtbl+ddXnLIoV8XvWdxMKtuMxdrsa4U=
github.com/aws/aws-sdk-go v1.54.0/go.mod h1:LF8svs817+Nz+DmiMQKTO3ubZ/6IaTpq3TjupRn3Eqk=
github.com/aws/aws-sdk-go v1.54.2 h1:Wo6AVWcleNHrYa48YzfYz60hzxGRqsJrK5s/qePe+3I=
github.com/aws/aws-sdk-go v1.54.2/go.mod h1:eRwEWoyTWFMVYVQzKMNHWP5/RV4xIUGMQfXQHfHkpNU=
github.com/bflad/gopaniccheck v0.1.0 h1:tJftp+bv42ouERmUMWLoUn/5bi/iQZjHPznM00cP/bU=
github.com/bflad/gopaniccheck v0.1.0/go.mod h1:ZCj2vSr7EqVeDaqVsWN4n2MwdROx1YL+LFo47TSWtsA=
github.com/bflad/tfproviderlint v0.29.0 h1:zxKYAAM6IZ4ace1a3LX+uzMRIMP8L+iOtEc+FP2Yoow=
Expand Down
2 changes: 1 addition & 1 deletion .ci/providerlint/vendor/modules.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ github.com/agext/levenshtein
# github.com/apparentlymart/go-textseg/v15 v15.0.0
## explicit; go 1.16
github.com/apparentlymart/go-textseg/v15/textseg
# github.com/aws/aws-sdk-go v1.54.0
# github.com/aws/aws-sdk-go v1.54.2
## explicit; go 1.19
github.com/aws/aws-sdk-go/aws/awserr
github.com/aws/aws-sdk-go/aws/endpoints
Expand Down
7 changes: 7 additions & 0 deletions .ci/semgrep/migrate/paginator.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
rules:
- id: paginator-more-pages
languages: [go]
message: Use `for pages.HasMorePages()`, not `if pages.HasMorePages()`
patterns:
- pattern-regex: 'if\s+pages\.HasMorePages\(\)'
severity: ERROR
3 changes: 3 additions & 0 deletions 37977.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:bug
data-source/aws_ami: Fix `interface conversion: interface {} is types.ProductCodeValues, not string` panic
```
32 changes: 32 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,36 @@
## 5.55.0 (Unreleased)

ENHANCEMENTS:

* data-source/aws_autoscaling_group: Add `mixed_instances_policy.launch_template.override.instance_requirements.max_spot_price_as_percentage_of_optimal_on_demand_price` attribute ([#38003](https://github.com/hashicorp/terraform-provider-aws/issues/38003))
* data-source/aws_glue_catalog_table: Add `additional_locations` argument in `storage_descriptor` ([#37891](https://github.com/hashicorp/terraform-provider-aws/issues/37891))
* data-source/aws_launch_template: Add `instance_requirements.max_spot_price_as_percentage_of_optimal_on_demand_price` attribute ([#38003](https://github.com/hashicorp/terraform-provider-aws/issues/38003))
* data-source/aws_networkmanager_core_network_policy_document: Add `attachment_policies.action.add_to_network_function_group` argument ([#38013](https://github.com/hashicorp/terraform-provider-aws/issues/38013))
* data-source/aws_networkmanager_core_network_policy_document: Add `network_function_groups` configuration block ([#38013](https://github.com/hashicorp/terraform-provider-aws/issues/38013))
* data-source/aws_networkmanager_core_network_policy_document: Add `send-via` and `send-to` as valid values for `segment_actions.action` ([#38013](https://github.com/hashicorp/terraform-provider-aws/issues/38013))
* data-source/aws_networkmanager_core_network_policy_document: Add `single-hop` and `dual-hop` as valid values for `segment_actions.mode` ([#38013](https://github.com/hashicorp/terraform-provider-aws/issues/38013))
* data-source/aws_networkmanager_core_network_policy_document: Add `when_sent_to` and `via` configuration blocks to `segment_actions` ([#38013](https://github.com/hashicorp/terraform-provider-aws/issues/38013))
* resource/aws_api_gateway_integration: Increase maximum value of `timeout_milliseconds` from `29000` (29 seconds) to `300000` (5 minutes) ([#38010](https://github.com/hashicorp/terraform-provider-aws/issues/38010))
* resource/aws_autoscaling_group: Add `mixed_instances_policy.launch_template.override.instance_requirements.max_spot_price_as_percentage_of_optimal_on_demand_price` argument ([#38003](https://github.com/hashicorp/terraform-provider-aws/issues/38003))
* resource/aws_docdb_cluster: Add `restore_to_point_in_time` argument ([#37716](https://github.com/hashicorp/terraform-provider-aws/issues/37716))
* resource/aws_dynamodb_table: Adds validation for `ttl` values. ([#37991](https://github.com/hashicorp/terraform-provider-aws/issues/37991))
* resource/aws_ec2_fleet: Add `launch_template_config.override.instance_requirements.max_spot_price_as_percentage_of_optimal_on_demand_price` argument ([#38003](https://github.com/hashicorp/terraform-provider-aws/issues/38003))
* resource/aws_glue_catalog_table: Add `additional_locations` argument in `storage_descriptor` ([#37891](https://github.com/hashicorp/terraform-provider-aws/issues/37891))
* resource/aws_launch_template: Add `instance_requirements.max_spot_price_as_percentage_of_optimal_on_demand_price` argument ([#38003](https://github.com/hashicorp/terraform-provider-aws/issues/38003))

BUG FIXES:

* data-source/aws_networkmanager_core_network_policy_document: Add correct `except` values to the returned JSON document when `segment_actions.share_with_except` is configured ([#38013](https://github.com/hashicorp/terraform-provider-aws/issues/38013))
* resource/aws_dynamodb_table: Fixes perpetual diff when `ttl.attribute_name` is set when `ttl.enabled` is not set. ([#37991](https://github.com/hashicorp/terraform-provider-aws/issues/37991))
* service/transitgateway: Fix resource Read pagination regression causing `NotFound` errors ([#38011](https://github.com/hashicorp/terraform-provider-aws/issues/38011))

## 5.54.1 (June 14, 2024)

BUG FIXES:

* data-source/aws_ami: Fix `interface conversion: interface {} is types.ProductCodeValues, not string` panic ([#37977](https://github.com/hashicorp/terraform-provider-aws/issues/37977))
* resource/aws_codebuild_project: Increase maximum values of `build_batch_config.timeout_in_mins` and `build_timeout` from `480` (8 hours) to `2160` (36 hours) ([#37970](https://github.com/hashicorp/terraform-provider-aws/issues/37970))

## 5.54.0 (June 14, 2024)

NOTES:
Expand Down
14 changes: 7 additions & 7 deletions docs/add-a-new-service.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,20 +19,20 @@ Before new resources are submitted, please raise a separate pull request contain

To add an AWS SDK for Go service client:

1. Check the file `names/data/names_data.csv` for the service.
1. Check the file `names/data/names_data.hcl` for the service.

1. If the service is there and there is no value in the `NotImplmented` column, you are ready to implement the first [resource](./add-a-new-resource.md) or [data source](./add-a-new-datasource.md).
1. If the service is there and the `not_implemented` attribute does not exist, you are ready to implement the first [resource](./add-a-new-resource.md) or [data source](./add-a-new-datasource.md).

1. If the service is there and there is a value in the `NotImplemented` column, remove it and submit the client pull request as described below.
1. If the service is there and the `not_implemented` attribute is true, remove it and submit the client pull request as described below.

1. Otherwise, determine the service identifier using the rule described in [the Naming Guide](naming.md#service-identifier).

1. In `names/data/names_data.csv`, add a new line with all the requested information for the service following the guidance in the [`names` README](https://github.com/hashicorp/terraform-provider-aws/blob/main/names/README.md).
1. In `names/data/names_data.hcl`, add a new hcl block with all the requested information for the service following the guidance in the [`names` README](https://github.com/hashicorp/terraform-provider-aws/blob/main/names/README.md).

!!! tip
Be very careful when adding or changing data in `names_data.csv`!
Be very careful when adding or changing data in `names_data.hcl`!
The Provider and generators depend on the file being correct.
We strongly recommend using an editor with CSV support.
We strongly recommend using an editor with HCL support.

Once the names data is ready, create a new service directory with the appropriate service name.

Expand Down Expand Up @@ -70,7 +70,7 @@ Once the service client has been added, implement the first [resource](./add-a-n

If an AWS service must be created in a non-standard way, for example, the service API's endpoint must be accessed via a single AWS Region, then:

1. Add an `x` in the **SkipClientGenerate** column for the service in [`names/data/names_data.csv`](https://github.com/hashicorp/terraform-provider-aws/blob/main/names/README.md)
1. Make the `skip_client_generate` attribute `true` for the service in [`names/data/names_data.hcl`](https://github.com/hashicorp/terraform-provider-aws/blob/main/names/README.md)

1. Run `make gen`

Expand Down
11 changes: 8 additions & 3 deletions docs/resource-tagging.md
Original file line number Diff line number Diff line change
Expand Up @@ -480,7 +480,7 @@ If the resource `Update` function applies specific updates to attributes regardl

## Resource Acceptance Tests

Some services, and some resource types within services, have generated acceptance tests for tagging support.
Some services, and some resource or data source types within services, have generated acceptance tests for tagging support.
These tests cover a broad set of tagging behaviors.
New services should use the generated acceptance tests.

Expand All @@ -494,8 +494,9 @@ To enable generated acceptance tests for a service, add the following line to th

#### Controlling Test Generation

Individual resource types can be excluded from generated acceptance tests by adding the annotation `@Testing(tagsTest=false)` to the resource type declaration.
All data source types are excluded.
By default, all resource or data source types which support transparent tagging will have tagging tests generated.
Individual resource or data source types can be excluded from generated acceptance tests by adding the annotation `@Testing(tagsTest=false)` to the resource type declaration.
If a resource or data source type supports tags but does not use transparent tagging, generate the tests by adding the annotion `@Testing(tagsTest=true)`

Additional `@Testing(...)` parameters can be used to control the generated tests.

Expand Down Expand Up @@ -566,6 +567,10 @@ The configuration files are generated from a [Go template](https://pkg.go.dev/te
where `name` is the name of the resource type's implementation file wihtout the `.go` extension.
For example, the ELB v2 Load Balancer's implementation file is `load_balancer.go`, so the template is `testdata/tmpl/load_balancer_tags.gtpl`.

To generate a configuration for a data source test, the generator reuses the configuration for the corresponding resource type.
Add an additional file `testdata/tmpl/<name>_data_source.gtpl` which contains only the data source block populated with the parameters needed to associate it with the resource.
For example, the ELB v2 Load Balancer's data source template is `testdata/tmpl/load_balancer_data_source.gtpl`.

Replace the `tags` attribute with the Go template directive `{{- template "tags" . }}`.
When the configurations are generated, this will be replaced with the appropriate assignment to the `tags` attribute.

Expand Down
14 changes: 7 additions & 7 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ require (
github.com/ProtonMail/go-crypto v1.1.0-alpha.2
github.com/YakDriver/go-version v0.1.0
github.com/YakDriver/regexache v0.23.0
github.com/aws/aws-sdk-go v1.54.0
github.com/aws/aws-sdk-go v1.54.2
github.com/aws/aws-sdk-go-v2 v1.27.2
github.com/aws/aws-sdk-go-v2/config v1.27.18
github.com/aws/aws-sdk-go-v2/credentials v1.17.18
Expand Down Expand Up @@ -46,7 +46,7 @@ require (
github.com/aws/aws-sdk-go-v2/service/cloudformation v1.51.3
github.com/aws/aws-sdk-go-v2/service/cloudfront v1.36.6
github.com/aws/aws-sdk-go-v2/service/cloudfrontkeyvaluestore v1.4.10
github.com/aws/aws-sdk-go-v2/service/cloudhsmv2 v1.21.10
github.com/aws/aws-sdk-go-v2/service/cloudhsmv2 v1.22.0
github.com/aws/aws-sdk-go-v2/service/cloudsearch v1.22.10
github.com/aws/aws-sdk-go-v2/service/cloudtrail v1.40.2
github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.38.6
Expand All @@ -72,7 +72,7 @@ require (
github.com/aws/aws-sdk-go-v2/service/costoptimizationhub v1.4.10
github.com/aws/aws-sdk-go-v2/service/customerprofiles v1.36.10
github.com/aws/aws-sdk-go-v2/service/datasync v1.38.4
github.com/aws/aws-sdk-go-v2/service/datazone v1.8.6
github.com/aws/aws-sdk-go-v2/service/datazone v1.9.0
github.com/aws/aws-sdk-go-v2/service/dax v1.19.10
github.com/aws/aws-sdk-go-v2/service/devicefarm v1.22.10
github.com/aws/aws-sdk-go-v2/service/devopsguru v1.30.10
Expand All @@ -82,7 +82,7 @@ require (
github.com/aws/aws-sdk-go-v2/service/docdbelastic v1.9.9
github.com/aws/aws-sdk-go-v2/service/drs v1.26.6
github.com/aws/aws-sdk-go-v2/service/dynamodb v1.32.8
github.com/aws/aws-sdk-go-v2/service/ec2 v1.164.0
github.com/aws/aws-sdk-go-v2/service/ec2 v1.164.1
github.com/aws/aws-sdk-go-v2/service/ecr v1.28.5
github.com/aws/aws-sdk-go-v2/service/ecrpublic v1.23.10
github.com/aws/aws-sdk-go-v2/service/ecs v1.42.0
Expand Down Expand Up @@ -112,7 +112,7 @@ require (
github.com/aws/aws-sdk-go-v2/service/kendra v1.50.7
github.com/aws/aws-sdk-go-v2/service/keyspaces v1.10.10
github.com/aws/aws-sdk-go-v2/service/kinesis v1.27.10
github.com/aws/aws-sdk-go-v2/service/kms v1.32.3
github.com/aws/aws-sdk-go-v2/service/kms v1.33.0
github.com/aws/aws-sdk-go-v2/service/lakeformation v1.33.3
github.com/aws/aws-sdk-go-v2/service/lambda v1.54.6
github.com/aws/aws-sdk-go-v2/service/launchwizard v1.4.2
Expand All @@ -121,10 +121,10 @@ require (
github.com/aws/aws-sdk-go-v2/service/lookoutmetrics v1.27.10
github.com/aws/aws-sdk-go-v2/service/m2 v1.13.6
github.com/aws/aws-sdk-go-v2/service/mediaconnect v1.28.10
github.com/aws/aws-sdk-go-v2/service/mediaconvert v1.53.7
github.com/aws/aws-sdk-go-v2/service/mediaconvert v1.54.0
github.com/aws/aws-sdk-go-v2/service/medialive v1.52.6
github.com/aws/aws-sdk-go-v2/service/mediapackage v1.30.11
github.com/aws/aws-sdk-go-v2/service/mediapackagev2 v1.11.6
github.com/aws/aws-sdk-go-v2/service/mediapackagev2 v1.12.0
github.com/aws/aws-sdk-go-v2/service/mediastore v1.20.10
github.com/aws/aws-sdk-go-v2/service/mq v1.22.11
github.com/aws/aws-sdk-go-v2/service/mwaa v1.27.4
Expand Down
Loading

0 comments on commit 192ac93

Please sign in to comment.