Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
2b26068
autonomous vm cluster resource and data source
ab-cs13 Aug 11, 2025
b105a87
example of AVMC
ab-cs13 Aug 11, 2025
d8424b1
change log added
ab-cs13 Aug 11, 2025
3c2027b
fixed acc test for resource
ab-cs13 Aug 11, 2025
de96eca
fixed acc test for resource
ab-cs13 Aug 11, 2025
2bce829
Merge remote-tracking branch 'origin/main' into autonomous-vm-cluster
ab-cs13 Aug 25, 2025
f1be9e3
rebase with latest. refactored code according to feedback for exadata…
ab-cs13 Aug 25, 2025
6c30443
fixed linting issues of avmc
ab-cs13 Aug 27, 2025
7dd0213
fixed linting issues of avmc
ab-cs13 Aug 27, 2025
6402ede
fixed linting issues of avmc
ab-cs13 Aug 27, 2025
89ad114
fixed linting issues and refactoring AVMC as per exa-infra PR feedback
ab-cs13 Aug 29, 2025
ebf4210
added documentation and fixed linter
ab-cs13 Aug 29, 2025
ff45640
fix linter issues
ab-cs13 Aug 29, 2025
6491285
reverted changes made to names_data.hcl. Setting the partial state if…
ab-cs13 Sep 1, 2025
6d56efe
fixed the linter : grouping of imports
ab-cs13 Sep 2, 2025
c1b796b
review feedback addressed.
ab-cs13 Sep 3, 2025
b3f40eb
updated copyright header
ab-cs13 Sep 11, 2025
12dc5d9
fixed documentation
ab-cs13 Sep 11, 2025
c1c1611
fixed documentation
ab-cs13 Sep 11, 2025
5340ad3
fixed linter
ab-cs13 Sep 11, 2025
5cd18b9
Maintenance Window made mandatory.
ab-cs13 Sep 12, 2025
c2b9d08
Correctly sets `id` for `aws_api_gateway_domain_name` with private en…
gdavison Sep 12, 2025
acf6406
Lists all `aws_acm_certificate` key types
gdavison Sep 12, 2025
83cc9e3
Adds `AmazonBedrockExecutionRoleForAgents` prefix to `aws_iam_role` s…
gdavison Sep 13, 2025
562f812
Handles spurious `types.InvalidRequestException` when not found
gdavison Sep 13, 2025
cab00d9
Add aws_billing_view data source
tabito-hara Sep 13, 2025
eb1151d
add an acceptance test for new data source aws_billing_views
tabito-hara Sep 13, 2025
4b0f22c
make gen
tabito-hara Sep 13, 2025
5d250d5
Add the documentation for new data source aws_billing_views
tabito-hara Sep 13, 2025
b542c6d
add changelog
tabito-hara Sep 13, 2025
5b590a3
Pass BillingViewTypes to the API only when it is specified
tabito-hara Sep 13, 2025
63c84cc
Add an acceptance test for no-argument case
tabito-hara Sep 13, 2025
586d8fa
fix changelog
tabito-hara Sep 13, 2025
f1eac7f
Rename the find function and fix to create a struct on the stack
tabito-hara Sep 13, 2025
ad5abd8
Replace "name" with names.AttrName
tabito-hara Sep 13, 2025
f4febdb
Return an empty object when the first element is nil
tabito-hara Sep 16, 2025
910081c
Add a step in the acc test to check empty notification_config is allowed
tabito-hara Sep 16, 2025
8191091
add changelog
tabito-hara Sep 16, 2025
08baa87
Merge branch 'main' into f-aws_billing_views-add_data_source
jar-b Sep 16, 2025
22b7ed9
d/aws_billing_views: adjust finders
jar-b Sep 16, 2025
19bf1ca
Update skip_matching details for aws_autoscaling_group
justinretzolk Sep 16, 2025
a62658c
Merge remote-tracking branch 'origin/main' into autonomous-vm-cluster
ab-cs13 Sep 16, 2025
de0fb51
avmc added to service_package_gen.go
ab-cs13 Sep 16, 2025
44d8643
Merge pull request #44312 from hashicorp/docs-autoscaling_group
justinretzolk Sep 16, 2025
5386918
Update CHANGELOG.md for #44312
Sep 16, 2025
28b89f9
Merge pull request #44272 from tabito-hara/f-aws_billing_views-add_da…
jar-b Sep 16, 2025
3cff5b5
Merge pull request #44310 from tabito-hara/b-aws_sagemaker_endpoint_c…
jar-b Sep 16, 2025
2944fc5
Merge pull request #43809 from oracle-community/autonomous-vm-cluster
johnsonaj Sep 17, 2025
d19a8f6
Merge pull request #44271 from hashicorp/b-athena-datacatalog-bad-err…
gdavison Sep 17, 2025
045b803
Merge pull request #44270 from hashicorp/td-sweep-bedrock-agent-iam-r…
gdavison Sep 17, 2025
3f5fb65
Merge pull request #44266 from hashicorp/td-acm-sweepers
gdavison Sep 17, 2025
f24bc0e
Update CHANGELOG.md for #44266
Sep 17, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .changelog/43809.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
```release-note:new-resource
aws_odb_cloud_autonomous_vm_cluster
```

```release-note:new-data-source
aws_odb_cloud_autonomous_vm_cluster
```
3 changes: 3 additions & 0 deletions .changelog/44272.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:new-data-source
aws_billing_views
```
3 changes: 3 additions & 0 deletions .changelog/44310.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:bug
resource/aws_sagemaker_endpoint_configuration: Fix panic when empty `async_inference_config.output_config.notification_config` block is specified
```
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,24 @@

FEATURES:

* **New Data Source:** `aws_billing_views` ([#44272](https://github.com/hashicorp/terraform-provider-aws/issues/44272))
* **New Data Source:** `aws_odb_cloud_autonomous_vm_cluster` ([#43809](https://github.com/hashicorp/terraform-provider-aws/issues/43809))
* **New Data Source:** `aws_odb_cloud_exadata_infrastructure` ([#43650](https://github.com/hashicorp/terraform-provider-aws/issues/43650))
* **New Data Source:** `aws_odb_network` ([#43715](https://github.com/hashicorp/terraform-provider-aws/issues/43715))
* **New Resource:** `aws_controltower_baseline` ([#42397](https://github.com/hashicorp/terraform-provider-aws/issues/42397))
* **New Resource:** `aws_odb_cloud_autonomous_vm_cluster` ([#43809](https://github.com/hashicorp/terraform-provider-aws/issues/43809))
* **New Resource:** `aws_odb_cloud_exadata_infrastructure` ([#43650](https://github.com/hashicorp/terraform-provider-aws/issues/43650))
* **New Resource:** `aws_odb_network` ([#43715](https://github.com/hashicorp/terraform-provider-aws/issues/43715))

ENHANCEMENTS:

* resource/aws_rds_global_cluster: Remove provider-side conflict between `source_db_cluster_identifier` and `engine` arguments ([#44252](https://github.com/hashicorp/terraform-provider-aws/issues/44252))
* resource/aws_scheduler_schedule: Add `action_after_completion` argument ([#44264](https://github.com/hashicorp/terraform-provider-aws/issues/44264))

BUG FIXES:

* resource/aws_sagemaker_endpoint_configuration: Fix panic when empty `async_inference_config.output_config.notification_config` block is specified ([#44310](https://github.com/hashicorp/terraform-provider-aws/issues/44310))

## 6.13.0 (September 11, 2025)

ENHANCEMENTS:
Expand Down
51 changes: 51 additions & 0 deletions examples/odb/autonomous_vm_cluster.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# Copyright (c) HashiCorp, Inc.
# SPDX-License-Identifier: MPL-2.0

# Autonomous VM Cluster with default maintenance window and minimum parameters
resource "aws_odb_cloud_autonomous_vm_cluster" "avmc_with_minimum_parameters" {
cloud_exadata_infrastructure_id = "<exadata_infra_id>" # refer your exadata infra id
odb_network_id = "<odb_net_id>" # refer_your_odb_net_id
display_name = "Ofake-avmc-my_avmc"
autonomous_data_storage_size_in_tbs = 5
memory_per_oracle_compute_unit_in_gbs = 2
total_container_databases = 1
cpu_core_count_per_node = 40
license_model = "LICENSE_INCLUDED"
# ids of db server. refer your exa infra. This is a manadatory fileld. Refer your cloud exadata infrastructure for db server id
db_servers = ["<my_db_server_id>"]
scan_listener_port_tls = 8561
scan_listener_port_non_tls = 1024
maintenance_window {
preference = "NO_PREFERENCE"
}

}

# Autonomous VM Cluster with all parameters
resource "aws_odb_cloud_autonomous_vm_cluster" "test" {
description = "my first avmc"
time_zone = "UTC"
cloud_exadata_infrastructure_id = "<aws_odb_cloud_exadata_infrastructure.test.id>"
odb_network_id = "<aws_odb_network.test.id>"
display_name = "Ofake_my avmc"
autonomous_data_storage_size_in_tbs = 5
memory_per_oracle_compute_unit_in_gbs = 2
total_container_databases = 1
cpu_core_count_per_node = 40
license_model = "LICENSE_INCLUDED"
db_servers = ["<my_db_server_1>", "<my_db_server_2>"]
scan_listener_port_tls = 8561
scan_listener_port_non_tls = 1024
maintenance_window {
days_of_week = [{ name = "MONDAY" }, { name = "TUESDAY" }]
hours_of_day = [4, 16]
lead_time_in_weeks = 3
months = [{ name = "FEBRUARY" }, { name = "MAY" }, { name = "AUGUST" }, { name = "NOVEMBER" }]
preference = "CUSTOM_PREFERENCE"
weeks_of_month = [2, 4]
}
tags = {
"env" = "dev"
}

}
9 changes: 8 additions & 1 deletion internal/service/acm/sweep.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ import (

"github.com/aws/aws-sdk-go-v2/aws"
"github.com/aws/aws-sdk-go-v2/service/acm"
awstypes "github.com/aws/aws-sdk-go-v2/service/acm/types"
"github.com/hashicorp/terraform-plugin-testing/helper/resource"
"github.com/hashicorp/terraform-provider-aws/internal/enum"
"github.com/hashicorp/terraform-provider-aws/internal/sweep"
"github.com/hashicorp/terraform-provider-aws/internal/sweep/awsv2"
)
Expand Down Expand Up @@ -48,7 +50,12 @@ func sweepCertificates(region string) error {
conn := client.ACMClient(ctx)
var sweepResources []sweep.Sweepable

input := acm.ListCertificatesInput{}
input := acm.ListCertificatesInput{
Includes: &awstypes.Filters{
// By default, ListCertificates only returns RSA_1024 and RSA_2048 certificates
KeyTypes: enum.EnumValues[awstypes.KeyAlgorithm](),
},
}
pages := acm.NewListCertificatesPaginator(conn, &input)
for pages.HasMorePages() {
page, err := pages.NextPage(ctx)
Expand Down
2 changes: 1 addition & 1 deletion internal/service/apigateway/sweep.go
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ func sweepDomainNames(region string) error {
for _, v := range page.Items {
r := resourceDomainName()
d := r.Data(nil)
d.SetId(aws.ToString(v.DomainName))
d.SetId(domainNameCreateResourceID(aws.ToString(v.DomainName), aws.ToString(v.DomainNameId)))

sweepResources = append(sweepResources, sweep.NewSweepResource(r, d, client))
}
Expand Down
3 changes: 3 additions & 0 deletions internal/service/athena/data_catalog.go
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,9 @@ func resourceDataCatalogDelete(ctx context.Context, d *schema.ResourceData, meta
if errs.IsA[*types.ResourceNotFoundException](err) {
return diags
}
if errs.IsAErrorMessageContains[*types.InvalidRequestException](err, "was not found") {
return diags
}

if err != nil {
return sdkdiag.AppendErrorf(diags, "deleting Athena Data Catalog (%s): %s", d.Id(), err)
Expand Down
6 changes: 6 additions & 0 deletions internal/service/billing/service_package_gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

110 changes: 110 additions & 0 deletions internal/service/billing/views_data_source.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
// Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: MPL-2.0

package billing

import (
"context"

"github.com/aws/aws-sdk-go-v2/service/billing"
awstypes "github.com/aws/aws-sdk-go-v2/service/billing/types"
"github.com/hashicorp/terraform-plugin-framework/datasource"
"github.com/hashicorp/terraform-plugin-framework/datasource/schema"
"github.com/hashicorp/terraform-plugin-framework/types"
"github.com/hashicorp/terraform-provider-aws/internal/framework"
"github.com/hashicorp/terraform-provider-aws/internal/framework/flex"
fwtypes "github.com/hashicorp/terraform-provider-aws/internal/framework/types"
"github.com/hashicorp/terraform-provider-aws/internal/smerr"
)

// @FrameworkDataSource("aws_billing_views", name="Views")
func newDataSourceViews(context.Context) (datasource.DataSourceWithConfigure, error) {
return &dataSourceViews{}, nil
}

const (
DSNameViews = "Views Data Source"
)

type dataSourceViews struct {
framework.DataSourceWithModel[dataSourceViewsModel]
}

func (d *dataSourceViews) Schema(ctx context.Context, req datasource.SchemaRequest, resp *datasource.SchemaResponse) {
resp.Schema = schema.Schema{
Attributes: map[string]schema.Attribute{
"billing_view_types": schema.ListAttribute{
CustomType: fwtypes.ListOfStringEnumType[awstypes.BillingViewType](),
Optional: true,
ElementType: types.StringType,
},
"billing_view": framework.ResourceComputedListOfObjectsAttribute[dataSourceBillingViewModel](ctx, nil, nil),
},
}
}

func (d *dataSourceViews) Read(ctx context.Context, req datasource.ReadRequest, resp *datasource.ReadResponse) {
conn := d.Meta().BillingClient(ctx)

var data dataSourceViewsModel
smerr.EnrichAppend(ctx, &resp.Diagnostics, req.Config.Get(ctx, &data))
if resp.Diagnostics.HasError() {
return
}

var billingViewTypes []awstypes.BillingViewType
smerr.EnrichAppend(ctx, &resp.Diagnostics, data.BillingViewTypes.ElementsAs(ctx, &billingViewTypes, false))
if resp.Diagnostics.HasError() {
return
}

out, err := findViewsByViewTypes(ctx, conn, billingViewTypes)
if err != nil {
smerr.AddError(ctx, &resp.Diagnostics, err, smerr.ID, data.BillingViewTypes.String())
return
}

smerr.EnrichAppend(ctx, &resp.Diagnostics, flex.Flatten(ctx, out, &data.BillingView, flex.WithFieldNamePrefix("Views")), smerr.ID, data.BillingViewTypes.String())
if resp.Diagnostics.HasError() {
return
}

smerr.EnrichAppend(ctx, &resp.Diagnostics, resp.State.Set(ctx, &data), smerr.ID, data.BillingViewTypes.String())
}

func findViewsByViewTypes(ctx context.Context, conn *billing.Client, billingViewTypes []awstypes.BillingViewType) ([]awstypes.BillingViewListElement, error) {
input := billing.ListBillingViewsInput{}
if len(billingViewTypes) > 0 {
input.BillingViewTypes = billingViewTypes
}

return findViews(ctx, conn, &input)
}

func findViews(ctx context.Context, conn *billing.Client, input *billing.ListBillingViewsInput) ([]awstypes.BillingViewListElement, error) {
var results []awstypes.BillingViewListElement

paginator := billing.NewListBillingViewsPaginator(conn, input)
for paginator.HasMorePages() {
page, err := paginator.NextPage(ctx)
if err != nil {
return nil, err
}
results = append(results, page.BillingViews...)
}

return results, nil
}

type dataSourceViewsModel struct {
BillingViewTypes fwtypes.ListOfStringEnum[awstypes.BillingViewType] `tfsdk:"billing_view_types"`
BillingView fwtypes.ListNestedObjectValueOf[dataSourceBillingViewModel] `tfsdk:"billing_view"`
}

type dataSourceBillingViewModel struct {
ARN types.String `tfsdk:"arn"`
BillingViewType types.String `tfsdk:"billing_view_type"`
Description types.String `tfsdk:"description"`
Name types.String `tfsdk:"name"`
OwnerAccountId types.String `tfsdk:"owner_account_id"`
}
60 changes: 60 additions & 0 deletions internal/service/billing/views_data_source_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
// Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: MPL-2.0

package billing_test

import (
"testing"

"github.com/hashicorp/terraform-plugin-testing/helper/resource"
"github.com/hashicorp/terraform-provider-aws/internal/acctest"
"github.com/hashicorp/terraform-provider-aws/names"
)

func TestAccBillingViewsDataSource_basic(t *testing.T) {
ctx := acctest.Context(t)

dataSourceName := "data.aws_billing_views.test"

resource.ParallelTest(t, resource.TestCase{
PreCheck: func() {
acctest.PreCheck(ctx, t)
},
ErrorCheck: acctest.ErrorCheck(t, names.BillingServiceID),
ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories,
Steps: []resource.TestStep{
{
Config: testAccViewsDataSourceConfig_basic(),
Check: resource.ComposeAggregateTestCheckFunc(
resource.TestCheckResourceAttr(dataSourceName, "billing_view.#", "1"),
acctest.CheckResourceAttrGlobalARN(ctx, dataSourceName, "billing_view.0.arn", "billing", "billingview/primary"),
resource.TestCheckResourceAttr(dataSourceName, "billing_view.0.billing_view_type", "PRIMARY"),
resource.TestCheckResourceAttr(dataSourceName, "billing_view.0.name", "Primary View"),
),
},
{
Config: testAccViewsDataSourceConfig_noArguments(),
Check: resource.ComposeAggregateTestCheckFunc(
resource.TestCheckTypeSetElemNestedAttrs(dataSourceName, "billing_view.*", map[string]string{
"billing_view_type": "PRIMARY",
names.AttrName: "Primary View",
}),
),
},
},
})
}

func testAccViewsDataSourceConfig_basic() string {
return `
data "aws_billing_views" "test" {
billing_view_types = ["PRIMARY"]
}
`
}

func testAccViewsDataSourceConfig_noArguments() string {
return `
data "aws_billing_views" "test" {}
`
}
2 changes: 2 additions & 0 deletions internal/service/iam/sweep.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ func RegisterSweepers() {
Dependencies: []string{
"aws_auditmanager_assessment",
"aws_batch_compute_environment",
"aws_bedrockagent_agent",
"aws_cloudformation_stack_set_instance",
"aws_cognito_user_pool",
"aws_config_configuration_aggregator",
Expand Down Expand Up @@ -661,6 +662,7 @@ func roleNameFilter(name string) bool {
// exhaustive list.
prefixes := []string{
"another_rds",
"AmazonBedrockExecutionRoleForAgents", // Required role name prefix
"AmazonComprehendServiceRole-",
"aws_batch_service_role",
"aws_elastictranscoder_pipeline_tf_test",
Expand Down
Loading
Loading