Skip to content

Commit 42c640f

Browse files
committed
Merge commit '79407e6c33a3576480ba6f5e1b25664768e5a4e1' into f-aws_bedrockagent_knowledge_base-enhancements
2 parents 983c75d + 79407e6 commit 42c640f

33 files changed

+1443
-60
lines changed

.changelog/45400.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
```release-note:new-list-resource
2+
aws_codebuild_project
3+
```

.changelog/45401.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
```release-note:new-list-resource
2+
aws_batch_job_definition
3+
```

.changelog/45449.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
```release-note:enhancement
2+
resource/aws_bedrockagent_agent: Add `session_summary_configuration.max_recent_sessions` argument
3+
```

.changelog/45456.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
```release-note:enhancement
2+
resource/aws_lambda_capacity_provider: Add resource identity support
3+
```

.changelog/45462.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
```release-note:bug
2+
resource/aws_ec2_transit_gateway: Fix potential crash when setting `encryption_support`. This addresses a regression introduced in [v6.25.0](https://github.com/hashicorp/terraform-provider-aws/blob/main/CHANGELOG.md#6250-december-4-2025).
3+
```
4+
5+
```release-note:bug
6+
data-source/aws_ec2_transit_gateway: Fix potential crash when reading `encryption_support`. This addresses a regression introduced in [v6.25.0](https://github.com/hashicorp/terraform-provider-aws/blob/main/CHANGELOG.md#6250-december-4-2025).
7+
```

.changelog/45468.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
```release-note:enhancement
2+
resource/aws_bedrockagent_knowledge_base: Add storage_configuration.s3_vectors_configuration block
3+
```

.github/workflows/provider.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ jobs:
148148
path: ~/go/pkg/mod
149149
key: ${{ runner.os }}-go-pkg-mod-${{ hashFiles('go.sum') }}
150150
- name: Go Test
151-
run: go test ./...
151+
run: go test -parallel 16 ./...
152152

153153
import-lint:
154154
needs: [go_build]
@@ -276,7 +276,7 @@ jobs:
276276
277277
tfproviderdocs:
278278
needs: [terraform_providers_schema]
279-
runs-on: ubuntu-latest
279+
runs-on: custom-ubuntu-22.04-large
280280
steps:
281281
- uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1
282282
- uses: actions/setup-go@4dc6199c7b1a012772edbd06daecab0f50c9053c # v6.1.0

.github/workflows/website.yml

Lines changed: 32 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -142,45 +142,40 @@ jobs:
142142

143143
- run: tflint --config .ci/.tflint.hcl --init
144144

145+
- run: sudo apt-get update && sudo apt-get install -y parallel
146+
145147
- run: |
146-
exit_code=0
147-
148-
# Configure the rules for tflint.
149-
# The *_invalid_* rules disabled here prevent evaluation of expressions.
150-
# Do not disable *_invalid_name rules, since these are good checks for e.g. "%s" formatting verbs
151-
# being carried over from test cases.
152-
shared_rules=(
153-
"--disable-rule=aws_cloudwatch_event_target_invalid_arn"
154-
"--disable-rule=aws_db_instance_default_parameter_group"
155-
"--disable-rule=aws_elasticache_cluster_default_parameter_group"
156-
"--disable-rule=aws_elasticache_replication_group_default_parameter_group"
157-
"--disable-rule=aws_iam_policy_sid_invalid_characters"
158-
"--disable-rule=aws_iam_saml_provider_invalid_saml_metadata_document"
159-
"--disable-rule=aws_iam_server_certificate_invalid_certificate_body"
160-
"--disable-rule=aws_iam_server_certificate_invalid_private_key"
161-
"--disable-rule=aws_iot_certificate_invalid_csr"
162-
"--disable-rule=aws_lb_invalid_load_balancer_type"
163-
"--disable-rule=aws_lb_target_group_invalid_protocol"
164-
"--disable-rule=aws_networkfirewall_rule_group_invalid_rules"
165-
"--disable-rule=aws_s3_object_copy_invalid_source"
166-
"--disable-rule=aws_servicecatalog_portfolio_share_invalid_type"
167-
"--disable-rule=aws_transfer_ssh_key_invalid_body"
168-
"--disable-rule=terraform_unused_declarations"
169-
"--disable-rule=terraform_typed_variables"
170-
)
171-
while read -r filename; do
148+
validate_file() {
149+
filename=$1
150+
151+
# Configure the rules for tflint.
152+
shared_rules=(
153+
"--disable-rule=aws_cloudwatch_event_target_invalid_arn"
154+
"--disable-rule=aws_db_instance_default_parameter_group"
155+
"--disable-rule=aws_elasticache_cluster_default_parameter_group"
156+
"--disable-rule=aws_elasticache_replication_group_default_parameter_group"
157+
"--disable-rule=aws_iam_policy_sid_invalid_characters"
158+
"--disable-rule=aws_iam_saml_provider_invalid_saml_metadata_document"
159+
"--disable-rule=aws_iam_server_certificate_invalid_certificate_body"
160+
"--disable-rule=aws_iam_server_certificate_invalid_private_key"
161+
"--disable-rule=aws_iot_certificate_invalid_csr"
162+
"--disable-rule=aws_lb_invalid_load_balancer_type"
163+
"--disable-rule=aws_lb_target_group_invalid_protocol"
164+
"--disable-rule=aws_networkfirewall_rule_group_invalid_rules"
165+
"--disable-rule=aws_s3_object_copy_invalid_source"
166+
"--disable-rule=aws_servicecatalog_portfolio_share_invalid_type"
167+
"--disable-rule=aws_transfer_ssh_key_invalid_body"
168+
"--disable-rule=terraform_unused_declarations"
169+
"--disable-rule=terraform_typed_variables"
170+
)
171+
172172
rules=("${shared_rules[@]}")
173173
if [[ "$filename" == "./website/docs/guides/version-2-upgrade.html.markdown" ]]; then
174-
# ./website/docs/guides/version-2-upgrade.html.markdown should still include pre-0.12 syntax,
175-
# since v1.0 does not support Terraform 0.12.
176174
rules+=(
177175
"--disable-rule=terraform_deprecated_index"
178176
"--disable-rule=terraform_deprecated_interpolation"
179177
)
180178
elif [[ "$filename" == "./website/docs/guides/version-3-upgrade.html.markdown" ]]; then
181-
# ./website/docs/guides/version-3-upgrade.html.markdown has one example showing migration from
182-
# pre-0.12 syntax to 0.12 syntax. We can't customize rules per block, and adding a
183-
# tflint-ignore directive to documentation is not ideal.
184179
rules+=(
185180
"--enable-rule=terraform_deprecated_index"
186181
"--disable-rule=terraform_deprecated_interpolation"
@@ -192,10 +187,10 @@ jobs:
192187
)
193188
fi
194189
195-
# We need to capture the output and error code here. We don't want to exit on the first error
196-
set +e
197-
./.ci/scripts/validate-terraform-file.sh "$filename" "${rules[@]}" || exit_code=1
198-
set -e
199-
done < <(find ./website/docs -not \( -path ./website/docs/cdktf -prune \) -type f -name '*.markdown' | sort -u)
190+
./.ci/scripts/validate-terraform-file.sh "$filename" "${rules[@]}"
191+
}
192+
export -f validate_file
200193
201-
exit $exit_code
194+
find ./website/docs -not \( -path ./website/docs/cdktf -prune \) -type f -name '*.markdown' | \
195+
sort -u | \
196+
parallel -j 16 --halt soon,fail=1 validate_file {}

CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,15 @@
11
## 6.26.0 (Unreleased)
22

3+
ENHANCEMENTS:
4+
5+
* resource/aws_bedrockagent_agent: Add `session_summary_configuration.max_recent_sessions` argument ([#45449](https://github.com/hashicorp/terraform-provider-aws/issues/45449))
6+
* resource/aws_lambda_capacity_provider: Add resource identity support ([#45456](https://github.com/hashicorp/terraform-provider-aws/issues/45456))
7+
8+
BUG FIXES:
9+
10+
* data-source/aws_ec2_transit_gateway: Fix potential crash when reading `encryption_support`. This addresses a regression introduced in [v6.25.0](https://github.com/hashicorp/terraform-provider-aws/blob/main/CHANGELOG.md#6250-december-4-2025). ([#45462](https://github.com/hashicorp/terraform-provider-aws/issues/45462))
11+
* resource/aws_ec2_transit_gateway: Fix potential crash when setting `encryption_support`. This addresses a regression introduced in [v6.25.0](https://github.com/hashicorp/terraform-provider-aws/blob/main/CHANGELOG.md#6250-december-4-2025). ([#45462](https://github.com/hashicorp/terraform-provider-aws/issues/45462))
12+
313
## 6.25.0 (December 4, 2025)
414

515
FEATURES:

internal/service/batch/job_definition.go

Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ import (
1515
"github.com/aws/aws-sdk-go-v2/service/batch"
1616
awstypes "github.com/aws/aws-sdk-go-v2/service/batch/types"
1717
"github.com/hashicorp/go-cty/cty"
18+
"github.com/hashicorp/terraform-plugin-framework/list"
19+
listschema "github.com/hashicorp/terraform-plugin-framework/list/schema"
20+
"github.com/hashicorp/terraform-plugin-log/tflog"
1821
"github.com/hashicorp/terraform-plugin-sdk/v2/diag"
1922
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry"
2023
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
@@ -23,12 +26,16 @@ import (
2326
"github.com/hashicorp/terraform-provider-aws/internal/conns"
2427
"github.com/hashicorp/terraform-provider-aws/internal/enum"
2528
"github.com/hashicorp/terraform-provider-aws/internal/errs"
29+
"github.com/hashicorp/terraform-provider-aws/internal/errs/fwdiag"
2630
"github.com/hashicorp/terraform-provider-aws/internal/errs/sdkdiag"
2731
"github.com/hashicorp/terraform-provider-aws/internal/flex"
32+
"github.com/hashicorp/terraform-provider-aws/internal/framework"
33+
"github.com/hashicorp/terraform-provider-aws/internal/logging"
2834
"github.com/hashicorp/terraform-provider-aws/internal/provider/sdkv2/importer"
2935
"github.com/hashicorp/terraform-provider-aws/internal/sdkv2"
3036
tftags "github.com/hashicorp/terraform-provider-aws/internal/tags"
3137
"github.com/hashicorp/terraform-provider-aws/internal/tfresource"
38+
inttypes "github.com/hashicorp/terraform-provider-aws/internal/types"
3239
"github.com/hashicorp/terraform-provider-aws/names"
3340
)
3441

@@ -1759,3 +1766,92 @@ func flattenEKSVolumes(apiObjects []awstypes.EksVolume) []any {
17591766

17601767
return tfList
17611768
}
1769+
1770+
// @SDKListResource("aws_batch_job_definition")
1771+
func jobDefinitionResourceAsListResource() inttypes.ListResourceForSDK {
1772+
l := jobDefinitionListResource{}
1773+
l.SetResourceSchema(resourceJobDefinition())
1774+
return &l
1775+
}
1776+
1777+
type jobDefinitionListResource struct {
1778+
framework.ResourceWithConfigure
1779+
framework.ListResourceWithSDKv2Resource
1780+
framework.ListResourceWithSDKv2Tags
1781+
}
1782+
1783+
type jobDefinitionListResourceModel struct {
1784+
framework.WithRegionModel
1785+
}
1786+
1787+
func (l *jobDefinitionListResource) ListResourceConfigSchema(ctx context.Context, request list.ListResourceSchemaRequest, response *list.ListResourceSchemaResponse) {
1788+
response.Schema = listschema.Schema{
1789+
Attributes: map[string]listschema.Attribute{},
1790+
Blocks: map[string]listschema.Block{},
1791+
}
1792+
}
1793+
1794+
func (l *jobDefinitionListResource) List(ctx context.Context, request list.ListRequest, stream *list.ListResultsStream) {
1795+
awsClient := l.Meta()
1796+
conn := awsClient.BatchClient(ctx)
1797+
1798+
var query jobDefinitionListResourceModel
1799+
if request.Config.Raw.IsKnown() && !request.Config.Raw.IsNull() {
1800+
if diags := request.Config.Get(ctx, &query); diags.HasError() {
1801+
stream.Results = list.ListResultsStreamDiagnostics(diags)
1802+
return
1803+
}
1804+
}
1805+
1806+
var input batch.DescribeJobDefinitionsInput
1807+
1808+
tflog.Info(ctx, "Listing Batch job definitions")
1809+
1810+
stream.Results = func(yield func(list.ListResult) bool) {
1811+
pages := batch.NewDescribeJobDefinitionsPaginator(conn, &input)
1812+
for pages.HasMorePages() {
1813+
page, err := pages.NextPage(ctx)
1814+
if err != nil {
1815+
result := fwdiag.NewListResultErrorDiagnostic(err)
1816+
yield(result)
1817+
return
1818+
}
1819+
1820+
for _, jobDef := range page.JobDefinitions {
1821+
arn := aws.ToString(jobDef.JobDefinitionArn)
1822+
ctx := tflog.SetField(ctx, logging.ResourceAttributeKey(names.AttrID), arn)
1823+
1824+
result := request.NewListResult(ctx)
1825+
rd := l.ResourceData()
1826+
rd.SetId(arn)
1827+
1828+
tflog.Info(ctx, "Reading Batch job definition")
1829+
diags := resourceJobDefinitionRead(ctx, rd, awsClient)
1830+
if diags.HasError() {
1831+
result = fwdiag.NewListResultErrorDiagnostic(fmt.Errorf("reading Batch job definition %s", arn))
1832+
yield(result)
1833+
return
1834+
}
1835+
1836+
err = l.SetTags(ctx, awsClient, rd)
1837+
if err != nil {
1838+
result = fwdiag.NewListResultErrorDiagnostic(err)
1839+
yield(result)
1840+
return
1841+
}
1842+
1843+
result.DisplayName = aws.ToString(jobDef.JobDefinitionName)
1844+
1845+
l.SetResult(ctx, awsClient, request.IncludeResource, &result, rd)
1846+
if result.Diagnostics.HasError() {
1847+
yield(result)
1848+
return
1849+
}
1850+
1851+
if !yield(result) {
1852+
return
1853+
}
1854+
}
1855+
}
1856+
}
1857+
}

0 commit comments

Comments
 (0)