From c8c31c4b0879d08e15db7f68c0da78c893bd5c74 Mon Sep 17 00:00:00 2001 From: Ronald Claveau Date: Wed, 4 Jun 2025 20:18:52 +0200 Subject: [PATCH 001/365] fix: inconsistent final plan error for computed values --- internal/service/ssm/parameter.go | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/internal/service/ssm/parameter.go b/internal/service/ssm/parameter.go index 333983f24351..b1c99db60b1b 100644 --- a/internal/service/ssm/parameter.go +++ b/internal/service/ssm/parameter.go @@ -150,16 +150,16 @@ func resourceParameter() *schema.Resource { return awstypes.ParameterTier(old.(string)) == awstypes.ParameterTierAdvanced && awstypes.ParameterTier(new.(string)) == awstypes.ParameterTierStandard }), customdiff.ComputedIf(names.AttrVersion, func(_ context.Context, diff *schema.ResourceDiff, meta any) bool { - return diff.HasChange(names.AttrValue) + return diff.HasChange(names.AttrValue) || !diff.NewValueKnown(names.AttrValue) }), customdiff.ComputedIf(names.AttrValue, func(_ context.Context, diff *schema.ResourceDiff, meta any) bool { - return diff.HasChange("insecure_value") + return diff.HasChange("insecure_value") || !diff.NewValueKnown("insecure_value") }), customdiff.ComputedIf("insecure_value", func(_ context.Context, diff *schema.ResourceDiff, meta any) bool { - return diff.HasChange(names.AttrValue) + return diff.HasChange(names.AttrValue) || !diff.NewValueKnown(names.AttrValue) }), customdiff.ComputedIf("has_value_wo", func(_ context.Context, diff *schema.ResourceDiff, meta any) bool { - return diff.HasChange("value_wo_version") + return diff.HasChange("value_wo_version") || !diff.NewValueKnown("value_wo_version") }), ), } @@ -292,6 +292,9 @@ func resourceParameterRead(ctx context.Context, d *schema.ResourceData, meta any if valueWO != "" { hasWriteOnly = true + } else { + hasWriteOnly = false + d.Set("has_value_wo", nil) } } From 69610a101e52ea4cd8aaa7468da808e20781d57e Mon Sep 17 00:00:00 2001 From: Ronald Claveau Date: Thu, 5 Jun 2025 09:43:41 +0200 Subject: [PATCH 002/365] chore: Add CHANGELOG --- .changelog/42877.txt | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 .changelog/42877.txt diff --git a/.changelog/42877.txt b/.changelog/42877.txt new file mode 100644 index 000000000000..89c126687a1d --- /dev/null +++ b/.changelog/42877.txt @@ -0,0 +1,3 @@ +```release-note:bug +resource/aws_ssm_parameter: fix `Error: Provider produced inconsistent final plan and produced an invalid new value.` +``` From 151fa8014090f4a1e7925144efc8626acb2b7106 Mon Sep 17 00:00:00 2001 From: Ronald Claveau Date: Thu, 5 Jun 2025 13:12:43 +0200 Subject: [PATCH 003/365] fix: empty value on creation --- internal/service/ssm/parameter.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/service/ssm/parameter.go b/internal/service/ssm/parameter.go index b1c99db60b1b..a465c3527051 100644 --- a/internal/service/ssm/parameter.go +++ b/internal/service/ssm/parameter.go @@ -153,7 +153,7 @@ func resourceParameter() *schema.Resource { return diff.HasChange(names.AttrValue) || !diff.NewValueKnown(names.AttrValue) }), customdiff.ComputedIf(names.AttrValue, func(_ context.Context, diff *schema.ResourceDiff, meta any) bool { - return diff.HasChange("insecure_value") || !diff.NewValueKnown("insecure_value") + return diff.HasChange("insecure_value") }), customdiff.ComputedIf("insecure_value", func(_ context.Context, diff *schema.ResourceDiff, meta any) bool { return diff.HasChange(names.AttrValue) || !diff.NewValueKnown(names.AttrValue) From 61de26ce92c4e6609a1ee602e26c9d33be240303 Mon Sep 17 00:00:00 2001 From: Ronald Claveau Date: Fri, 13 Jun 2025 17:56:14 +0200 Subject: [PATCH 004/365] test: add acc tests for computed values --- internal/service/ssm/parameter_test.go | 160 +++++++++++++++++++++++++ 1 file changed, 160 insertions(+) diff --git a/internal/service/ssm/parameter_test.go b/internal/service/ssm/parameter_test.go index 44b4480707d0..20fe755eb772 100644 --- a/internal/service/ssm/parameter_test.go +++ b/internal/service/ssm/parameter_test.go @@ -6,6 +6,7 @@ package ssm_test import ( "context" "fmt" + "math/big" "testing" "github.com/YakDriver/regexache" @@ -16,6 +17,7 @@ import ( sdkacctest "github.com/hashicorp/terraform-plugin-testing/helper/acctest" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/hashicorp/terraform-plugin-testing/knownvalue" + "github.com/hashicorp/terraform-plugin-testing/plancheck" "github.com/hashicorp/terraform-plugin-testing/statecheck" "github.com/hashicorp/terraform-plugin-testing/terraform" "github.com/hashicorp/terraform-plugin-testing/tfjsonpath" @@ -233,6 +235,164 @@ func TestAccSSMParameter_writeOnly(t *testing.T) { }) } +func TestAccSSMParameter_changeValueToWriteOnly(t *testing.T) { + ctx := acctest.Context(t) + var param awstypes.Parameter + rName := sdkacctest.RandomWithPrefix(acctest.ResourcePrefix) + resourceName := "aws_ssm_parameter.test" + rVersion := 1234 + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.SSMServiceID), + TerraformVersionChecks: []tfversion.TerraformVersionCheck{ + tfversion.SkipBelow(version.Must(version.NewVersion("1.11.0"))), + }, + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + CheckDestroy: testAccCheckParameterDestroy(ctx), + Steps: []resource.TestStep{ + { + Config: /*testAccParameterConfig_basic(rName, "SecureString", "test") + */ fmt.Sprintf(` +resource "aws_ssm_parameter" "prereq" { + name = "%[1]s-prereq" + type = %[2]q + value = %[3]q +} + +data "aws_ssm_parameter" "prereq" { + name = aws_ssm_parameter.prereq.name +} + +resource "aws_ssm_parameter" "test" { + name = %[1]q + type = %[2]q + value = data.aws_ssm_parameter.prereq.value +} +`, rName, "SecureString", "test"), + Check: resource.ComposeTestCheckFunc( + testAccCheckParameterExists(ctx, resourceName, ¶m), + ), + }, + { + Config: /*testAccParameterConfig_writeOnly(rName, "testUpdated", rVersion) + */ fmt.Sprintf(` +resource "aws_ssm_parameter" "prereq" { + name = "%[1]s-prereq" + type = %[2]q + value = %[3]q +} + +data "aws_ssm_parameter" "prereq" { + name = aws_ssm_parameter.prereq.name +} + +resource "aws_ssm_parameter" "test" { + name = %[1]q + type = %[2]q + value_wo = data.aws_ssm_parameter.prereq.value + value_wo_version = data.aws_ssm_parameter.prereq.version +} +`, rName, "SecureString", "testUpdated", rVersion), + Check: resource.ComposeTestCheckFunc( + testAccCheckParameterExists(ctx, resourceName, ¶m), + testAccCheckParameterWriteOnlyValueEqual(t, ¶m, "testUpdated"), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New("has_value_wo"), knownvalue.Bool(true)), + statecheck.ExpectKnownValue( + resourceName, + tfjsonpath.New("value_wo_version"), + knownvalue.NumberFunc(func(v *big.Float) error { + if v.IsInt() { + if v == nil { + return fmt.Errorf("version is nil") + } + if v.Cmp(big.NewFloat(0)) <= 0 { // Si v <= 0 + return fmt.Errorf("expected version to be greater than 0, got %s", v.String()) + } + return nil + } else { + return fmt.Errorf("expected version to be an int value") + } + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New("value_wo"), knownvalue.Null()), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectUnknownValue(resourceName, tfjsonpath.New("has_value_wo")), + plancheck.ExpectUnknownValue(resourceName, tfjsonpath.New("value_wo_version")), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New("value_wo"), knownvalue.Null()), + }, + PostApplyPreRefresh: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionNoop), + }, + PostApplyPostRefresh: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionNoop), + }, + }, + }, + { + Config: fmt.Sprintf(` +resource "aws_ssm_parameter" "prereq" { + name = "%[1]s-prereq" + type = %[2]q + value = %[3]q +} + +data "aws_ssm_parameter" "prereq" { + name = aws_ssm_parameter.prereq.name +} + +resource "aws_ssm_parameter" "test" { + name = %[1]q + type = %[2]q + value = data.aws_ssm_parameter.prereq.value +} +`, rName, "SecureString", "test"), + Check: resource.ComposeTestCheckFunc( + testAccCheckParameterExists(ctx, resourceName, ¶m), + resource.TestCheckResourceAttr(resourceName, names.AttrType, "SecureString"), + resource.TestCheckResourceAttr(resourceName, names.AttrValue, "test"), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue( + resourceName, + tfjsonpath.New("has_value_wo"), + knownvalue.Bool(false), + ), + statecheck.ExpectKnownValue( + resourceName, + tfjsonpath.New("value_wo_version"), + knownvalue.NumberExact(big.NewFloat(float64(0))), + ), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New("value_wo"), knownvalue.Null()), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectUnknownValue(resourceName, tfjsonpath.New("has_value_wo")), + plancheck.ExpectKnownValue( + resourceName, + tfjsonpath.New("value_wo_version"), + knownvalue.Null(), + ), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New("value_wo"), knownvalue.Null()), + plancheck.ExpectUnknownValue(resourceName, tfjsonpath.New("insecure_value")), + plancheck.ExpectUnknownValue(resourceName, tfjsonpath.New("value")), + plancheck.ExpectUnknownValue(resourceName, tfjsonpath.New("version")), + }, + PostApplyPreRefresh: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionNoop), + }, + PostApplyPostRefresh: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionNoop), + }, + }, + }, + }, + }) +} + func TestAccSSMParameter_tier(t *testing.T) { ctx := acctest.Context(t) var parameter1, parameter2, parameter3 awstypes.Parameter From a1d54a077ff74fa266828548600c7046d784ef55 Mon Sep 17 00:00:00 2001 From: Ronald Claveau Date: Sat, 14 Jun 2025 12:49:24 +0200 Subject: [PATCH 005/365] fix: solve acc test code quality and lint --- internal/service/ssm/parameter_test.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/internal/service/ssm/parameter_test.go b/internal/service/ssm/parameter_test.go index 20fe755eb772..7e3bcf596c72 100644 --- a/internal/service/ssm/parameter_test.go +++ b/internal/service/ssm/parameter_test.go @@ -252,7 +252,7 @@ func TestAccSSMParameter_changeValueToWriteOnly(t *testing.T) { CheckDestroy: testAccCheckParameterDestroy(ctx), Steps: []resource.TestStep{ { - Config: /*testAccParameterConfig_basic(rName, "SecureString", "test") + */ fmt.Sprintf(` + Config: fmt.Sprintf(` resource "aws_ssm_parameter" "prereq" { name = "%[1]s-prereq" type = %[2]q @@ -274,7 +274,7 @@ resource "aws_ssm_parameter" "test" { ), }, { - Config: /*testAccParameterConfig_writeOnly(rName, "testUpdated", rVersion) + */ fmt.Sprintf(` + Config: fmt.Sprintf(` resource "aws_ssm_parameter" "prereq" { name = "%[1]s-prereq" type = %[2]q @@ -286,8 +286,8 @@ data "aws_ssm_parameter" "prereq" { } resource "aws_ssm_parameter" "test" { - name = %[1]q - type = %[2]q + name = %[1]q + type = %[2]q value_wo = data.aws_ssm_parameter.prereq.value value_wo_version = data.aws_ssm_parameter.prereq.version } @@ -378,8 +378,8 @@ resource "aws_ssm_parameter" "test" { ), plancheck.ExpectKnownValue(resourceName, tfjsonpath.New("value_wo"), knownvalue.Null()), plancheck.ExpectUnknownValue(resourceName, tfjsonpath.New("insecure_value")), - plancheck.ExpectUnknownValue(resourceName, tfjsonpath.New("value")), - plancheck.ExpectUnknownValue(resourceName, tfjsonpath.New("version")), + plancheck.ExpectUnknownValue(resourceName, tfjsonpath.New(names.AttrValue)), + plancheck.ExpectUnknownValue(resourceName, tfjsonpath.New(names.AttrVersion)), }, PostApplyPreRefresh: []plancheck.PlanCheck{ plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionNoop), From 5b3357901be73f00b69bb4896d1f620136f8b776 Mon Sep 17 00:00:00 2001 From: Ronald Claveau Date: Sat, 14 Jun 2025 17:02:26 +0200 Subject: [PATCH 006/365] fix: insecure_value should not be computed when provided --- internal/service/ssm/parameter.go | 3 +++ internal/service/ssm/parameter_test.go | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/internal/service/ssm/parameter.go b/internal/service/ssm/parameter.go index a465c3527051..1932e465f4c0 100644 --- a/internal/service/ssm/parameter.go +++ b/internal/service/ssm/parameter.go @@ -156,6 +156,9 @@ func resourceParameter() *schema.Resource { return diff.HasChange("insecure_value") }), customdiff.ComputedIf("insecure_value", func(_ context.Context, diff *schema.ResourceDiff, meta any) bool { + if diff.NewValueKnown("insecure_value") { + return false + } return diff.HasChange(names.AttrValue) || !diff.NewValueKnown(names.AttrValue) }), customdiff.ComputedIf("has_value_wo", func(_ context.Context, diff *schema.ResourceDiff, meta any) bool { diff --git a/internal/service/ssm/parameter_test.go b/internal/service/ssm/parameter_test.go index 7e3bcf596c72..96d3cb809684 100644 --- a/internal/service/ssm/parameter_test.go +++ b/internal/service/ssm/parameter_test.go @@ -377,7 +377,7 @@ resource "aws_ssm_parameter" "test" { knownvalue.Null(), ), plancheck.ExpectKnownValue(resourceName, tfjsonpath.New("value_wo"), knownvalue.Null()), - plancheck.ExpectUnknownValue(resourceName, tfjsonpath.New("insecure_value")), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New("insecure_value"), knownvalue.Null()), plancheck.ExpectUnknownValue(resourceName, tfjsonpath.New(names.AttrValue)), plancheck.ExpectUnknownValue(resourceName, tfjsonpath.New(names.AttrVersion)), }, From e4e3b09e9f8cbb749d99e28e4043a5bc1dc35986 Mon Sep 17 00:00:00 2001 From: Justin Retzolk <44710313+justinretzolk@users.noreply.github.com> Date: Wed, 16 Jul 2025 13:10:26 -0500 Subject: [PATCH 007/365] Update templates to expand by default --- .github/ISSUE_TEMPLATE/00_bug_report.yml | 4 ++-- .github/ISSUE_TEMPLATE/05_beta_feedback.yml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/00_bug_report.yml b/.github/ISSUE_TEMPLATE/00_bug_report.yml index 01705d1426ff..85aed07ae101 100644 --- a/.github/ISSUE_TEMPLATE/00_bug_report.yml +++ b/.github/ISSUE_TEMPLATE/00_bug_report.yml @@ -98,7 +98,7 @@ body: For convenience, we pre-populate this section such that configurations pasted between the backticks (\```) will be contained within a disclosure triangle and have syntax highlighting as appropriate for HCL in the resulting issue. Where appropriate, feel free to delete this. value: | -
+
Click to expand configuration ```hcl @@ -130,7 +130,7 @@ body: For convenience, we pre-populate this section such that logs pasted between the backticks (\```) will be contained within a disclosure triangle and have syntax highlighting associated with console output in the resulting issue. value: | -
+
Click to expand log output ```console diff --git a/.github/ISSUE_TEMPLATE/05_beta_feedback.yml b/.github/ISSUE_TEMPLATE/05_beta_feedback.yml index fb136969e155..adc24515f646 100644 --- a/.github/ISSUE_TEMPLATE/05_beta_feedback.yml +++ b/.github/ISSUE_TEMPLATE/05_beta_feedback.yml @@ -104,7 +104,7 @@ body: When providing more general feedback, where this section may not be relevent, feel free to clear out the pre-populated text and enter "n/a" to satisfy this being a required field. value: | -
+
Click to expand configuration ```hcl @@ -138,7 +138,7 @@ body: When providing more general feedback, where this section may not be relevent, feel free to clear out the pre-populated text and enter "n/a" to satisfy this being a required field. value: | -
+
Click to expand log output ```console From e2aed9dc720af3fe353b3f2de94602430fbe2749 Mon Sep 17 00:00:00 2001 From: Stefan Freitag Date: Sat, 19 Jul 2025 13:14:16 +0200 Subject: [PATCH 008/365] feat: add deletion protection for verifiedpermissions_policy_store --- .../verifiedpermissions/policy_store.go | 10 +++- .../policy_store_data_source.go | 5 ++ .../policy_store_data_source_test.go | 1 + .../verifiedpermissions/policy_store_test.go | 53 +++++++++++++++++++ ...fiedpermissions_policy_store.html.markdown | 1 + ...fiedpermissions_policy_store.html.markdown | 1 + 6 files changed, 70 insertions(+), 1 deletion(-) diff --git a/internal/service/verifiedpermissions/policy_store.go b/internal/service/verifiedpermissions/policy_store.go index 5e9f0d88a0b8..e7eba64c327e 100644 --- a/internal/service/verifiedpermissions/policy_store.go +++ b/internal/service/verifiedpermissions/policy_store.go @@ -13,6 +13,7 @@ import ( "github.com/hashicorp/terraform-plugin-framework/resource" "github.com/hashicorp/terraform-plugin-framework/resource/schema" "github.com/hashicorp/terraform-plugin-framework/resource/schema/planmodifier" + "github.com/hashicorp/terraform-plugin-framework/resource/schema/stringdefault" "github.com/hashicorp/terraform-plugin-framework/resource/schema/stringplanmodifier" "github.com/hashicorp/terraform-plugin-framework/schema/validator" "github.com/hashicorp/terraform-plugin-framework/types" @@ -52,6 +53,12 @@ func (r *policyStoreResource) Schema(ctx context.Context, request resource.Schem s := schema.Schema{ Attributes: map[string]schema.Attribute{ names.AttrARN: framework.ARNAttributeComputedOnly(), + names.AttrDeletionProtection: schema.StringAttribute{ + Optional: true, + Computed: true, + CustomType: fwtypes.StringEnumType[awstypes.DeletionProtection](), + Default: stringdefault.StaticString(string(awstypes.DeletionProtectionDisabled)), + }, names.AttrDescription: schema.StringAttribute{ Optional: true, }, @@ -175,7 +182,7 @@ func (r *policyStoreResource) Update(ctx context.Context, request resource.Updat conn := r.Meta().VerifiedPermissionsClient(ctx) - if !new.Description.Equal(old.Description) || !new.ValidationSettings.Equal(old.ValidationSettings) { + if !new.Description.Equal(old.Description) || !new.ValidationSettings.Equal(old.ValidationSettings) || !new.DeletionProtection.Equal(old.DeletionProtection) { var input verifiedpermissions.UpdatePolicyStoreInput response.Diagnostics.Append(fwflex.Expand(ctx, new, &input)...) if response.Diagnostics.HasError() { @@ -231,6 +238,7 @@ type policyStoreResourceModel struct { framework.WithRegionModel ARN types.String `tfsdk:"arn"` Description types.String `tfsdk:"description"` + DeletionProtection fwtypes.StringEnum[awstypes.DeletionProtection] `tfsdk:"deletion_protection"` ID types.String `tfsdk:"id"` PolicyStoreID types.String `tfsdk:"policy_store_id"` Tags tftags.Map `tfsdk:"tags"` diff --git a/internal/service/verifiedpermissions/policy_store_data_source.go b/internal/service/verifiedpermissions/policy_store_data_source.go index 3f6d7f8eb971..272ea5e532d0 100644 --- a/internal/service/verifiedpermissions/policy_store_data_source.go +++ b/internal/service/verifiedpermissions/policy_store_data_source.go @@ -41,6 +41,10 @@ func (d *policyStoreDataSource) Schema(ctx context.Context, request datasource.S CustomType: timetypes.RFC3339Type{}, Computed: true, }, + names.AttrDeletionProtection: schema.StringAttribute{ + Computed: true, + CustomType: fwtypes.StringEnumType[awstypes.DeletionProtection](), + }, names.AttrDescription: schema.StringAttribute{ Computed: true, }, @@ -87,6 +91,7 @@ type policyStoreDataSourceModel struct { framework.WithRegionModel ARN types.String `tfsdk:"arn"` CreatedDate timetypes.RFC3339 `tfsdk:"created_date"` + DeletionProtection fwtypes.StringEnum[awstypes.DeletionProtection] `tfsdk:"deletion_protection"` Description types.String `tfsdk:"description"` ID types.String `tfsdk:"id"` LastUpdatedDate timetypes.RFC3339 `tfsdk:"last_updated_date"` diff --git a/internal/service/verifiedpermissions/policy_store_data_source_test.go b/internal/service/verifiedpermissions/policy_store_data_source_test.go index 6ed4b4a466fd..c93f54029187 100644 --- a/internal/service/verifiedpermissions/policy_store_data_source_test.go +++ b/internal/service/verifiedpermissions/policy_store_data_source_test.go @@ -38,6 +38,7 @@ func TestAccVerifiedPermissionsPolicyStoreDataSource_basic(t *testing.T) { Check: resource.ComposeTestCheckFunc( testAccCheckPolicyStoreExists(ctx, dataSourceName, &policystore), resource.TestCheckResourceAttrPair(resourceName, "validation_settings.0.mode", dataSourceName, "validation_settings.0.mode"), + resource.TestCheckResourceAttr(resourceName, names.AttrDeletionProtection, "DISABLED"), resource.TestCheckResourceAttrPair(resourceName, names.AttrDescription, dataSourceName, names.AttrDescription), resource.TestCheckResourceAttrPair(resourceName, names.AttrARN, dataSourceName, names.AttrARN), resource.TestCheckResourceAttrSet(dataSourceName, names.AttrCreatedDate), diff --git a/internal/service/verifiedpermissions/policy_store_test.go b/internal/service/verifiedpermissions/policy_store_test.go index d4dc48b363d4..f13bc7f8baa4 100644 --- a/internal/service/verifiedpermissions/policy_store_test.go +++ b/internal/service/verifiedpermissions/policy_store_test.go @@ -45,6 +45,7 @@ func TestAccVerifiedPermissionsPolicyStore_basic(t *testing.T) { Check: resource.ComposeTestCheckFunc( testAccCheckPolicyStoreExists(ctx, resourceName, &policystore), resource.TestCheckResourceAttr(resourceName, "validation_settings.0.mode", "OFF"), + resource.TestCheckResourceAttr(resourceName, names.AttrDeletionProtection, "DISABLED"), resource.TestCheckResourceAttr(resourceName, names.AttrDescription, "Terraform acceptance test"), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, "0"), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsAllPercent, "0"), @@ -95,6 +96,47 @@ func TestAccVerifiedPermissionsPolicyStore_update(t *testing.T) { }, }) } +func TestAccVerifiedPermissionsPolicyStore_deletionProtection(t *testing.T) { + ctx := acctest.Context(t) + if testing.Short() { + t.Skip("skipping long-running test in short mode") + } + + var policystore verifiedpermissions.GetPolicyStoreOutput + resourceName := "aws_verifiedpermissions_policy_store.test" + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { + acctest.PreCheck(ctx, t) + acctest.PreCheckPartitionHasService(t, names.VerifiedPermissionsEndpointID) + testAccPolicyStoresPreCheck(ctx, t) + }, + ErrorCheck: acctest.ErrorCheck(t, names.VerifiedPermissionsServiceID), + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + CheckDestroy: testAccCheckPolicyStoreDestroy(ctx), + Steps: []resource.TestStep{ + { + Config: testAccPolicyStoreConfig_deletion_protection("DISABLED"), + Check: resource.ComposeTestCheckFunc( + testAccCheckPolicyStoreExists(ctx, resourceName, &policystore), + resource.TestCheckResourceAttr(resourceName, names.AttrDeletionProtection, "DISABLED"), + ), + }, + { + Config: testAccPolicyStoreConfig_deletion_protection("ENABLED"), + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttr(resourceName, names.AttrDeletionProtection, "ENABLED"), + ), + }, + { + Config: testAccPolicyStoreConfig_deletion_protection("DISABLED"), + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttr(resourceName, names.AttrDeletionProtection, "DISABLED"), + ), + }, + }, + }) +} func TestAccVerifiedPermissionsPolicyStore_disappears(t *testing.T) { ctx := acctest.Context(t) @@ -254,6 +296,17 @@ resource "aws_verifiedpermissions_policy_store" "test" { }`, mode) } +func testAccPolicyStoreConfig_deletion_protection(deletionProtection string) string { + return fmt.Sprintf(` +resource "aws_verifiedpermissions_policy_store" "test" { + description = "Terraform acceptance test" + deletion_protection = %[1]q + validation_settings { + mode = "OFF" + } +}`, deletionProtection) +} + func testAccPolicyStoreConfig_tags1(mode, tagKey1, tagValue1 string) string { return fmt.Sprintf(` resource "aws_verifiedpermissions_policy_store" "test" { diff --git a/website/docs/d/verifiedpermissions_policy_store.html.markdown b/website/docs/d/verifiedpermissions_policy_store.html.markdown index 969fd41898c4..54e916770bb1 100644 --- a/website/docs/d/verifiedpermissions_policy_store.html.markdown +++ b/website/docs/d/verifiedpermissions_policy_store.html.markdown @@ -33,6 +33,7 @@ This data source exports the following attributes in addition to the arguments a * `arn` - The ARN of the Policy Store. * `created_date` - The date the Policy Store was created. +* `deletion_protection` - Whether the policy store can be deleted. * `last_updated_date` - The date the Policy Store was last updated. * `tags` - Map of key-value pairs associated with the policy store. * `validation_settings` - Validation settings for the policy store. diff --git a/website/docs/r/verifiedpermissions_policy_store.html.markdown b/website/docs/r/verifiedpermissions_policy_store.html.markdown index 93268d8dba6d..bd05acb91c48 100644 --- a/website/docs/r/verifiedpermissions_policy_store.html.markdown +++ b/website/docs/r/verifiedpermissions_policy_store.html.markdown @@ -32,6 +32,7 @@ The following arguments are required: The following arguments are optional: * `region` - (Optional) Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the [provider configuration](https://registry.terraform.io/providers/hashicorp/aws/latest/docs#aws-configuration-reference). +* `deletion_protection` - (Optional) Specifies whether the policy store can be deleted. If enabled, the policy store can't be deleted. Valid Values: `ENABLED`, `DISABLED`. Default value: `DISABLED`. * `description` - (Optional) A description of the Policy Store. * `tags` - (Optional) Key-value mapping of resource tags. If configured with a provider [`default_tags` configuration block](/docs/providers/aws/index.html#default_tags-configuration-block) present, tags with matching keys will overwrite those defined at the provider-level. From a28df30f23ad5c87b84547a3cef5ba3d003309ae Mon Sep 17 00:00:00 2001 From: Stefan Freitag Date: Sat, 19 Jul 2025 13:19:21 +0200 Subject: [PATCH 009/365] chore: add changelog --- .changelog/43452.txt | 7 +++++++ .../docs/r/verifiedpermissions_policy_store.html.markdown | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 .changelog/43452.txt diff --git a/.changelog/43452.txt b/.changelog/43452.txt new file mode 100644 index 000000000000..c8548c609fc8 --- /dev/null +++ b/.changelog/43452.txt @@ -0,0 +1,7 @@ +```release-note:enhancement +data-source/aws_verifiedpermissions_policy_store: Add `deletion_protection` attribute +``` + +```release-note:enhancement +resource/aws_verifiedpermissions_policy_store: Add `deletion_protection` attribute +``` \ No newline at end of file diff --git a/website/docs/r/verifiedpermissions_policy_store.html.markdown b/website/docs/r/verifiedpermissions_policy_store.html.markdown index bd05acb91c48..ac60a82dd4de 100644 --- a/website/docs/r/verifiedpermissions_policy_store.html.markdown +++ b/website/docs/r/verifiedpermissions_policy_store.html.markdown @@ -32,7 +32,7 @@ The following arguments are required: The following arguments are optional: * `region` - (Optional) Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the [provider configuration](https://registry.terraform.io/providers/hashicorp/aws/latest/docs#aws-configuration-reference). -* `deletion_protection` - (Optional) Specifies whether the policy store can be deleted. If enabled, the policy store can't be deleted. Valid Values: `ENABLED`, `DISABLED`. Default value: `DISABLED`. +* `deletion_protection` - (Optional) Specifies whether the policy store can be deleted. If enabled, the policy store can't be deleted. Valid Values: `ENABLED`, `DISABLED`. Default value: `DISABLED`. * `description` - (Optional) A description of the Policy Store. * `tags` - (Optional) Key-value mapping of resource tags. If configured with a provider [`default_tags` configuration block](/docs/providers/aws/index.html#default_tags-configuration-block) present, tags with matching keys will overwrite those defined at the provider-level. From 5171a174550842a9d96d69ea4220805996750d95 Mon Sep 17 00:00:00 2001 From: jbonzo <8647805+jbonzo@users.noreply.github.com> Date: Tue, 29 Jul 2025 10:29:16 -0400 Subject: [PATCH 010/365] [PLAT-1750] Re-add support for NoSuchTagSetError --- internal/service/s3/errors.go | 1 + internal/service/s3/tags.go | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/internal/service/s3/errors.go b/internal/service/s3/errors.go index f8297cae3abe..6aef197910ba 100644 --- a/internal/service/s3/errors.go +++ b/internal/service/s3/errors.go @@ -30,6 +30,7 @@ const ( errCodeNoSuchKey = "NoSuchKey" errCodeNoSuchPublicAccessBlockConfiguration = "NoSuchPublicAccessBlockConfiguration" errCodeNoSuchTagSet = "NoSuchTagSet" + errCodeNoSuchTagSetError = "NoSuchTagSetError" errCodeNoSuchWebsiteConfiguration = "NoSuchWebsiteConfiguration" errCodeNotImplemented = "NotImplemented" // errCodeObjectLockConfigurationNotFound should be used with tfawserr.ErrCodeContains, not tfawserr.ErrCodeEquals. diff --git a/internal/service/s3/tags.go b/internal/service/s3/tags.go index 858f5be879d8..990c560aa6fc 100644 --- a/internal/service/s3/tags.go +++ b/internal/service/s3/tags.go @@ -42,7 +42,7 @@ func bucketListTags(ctx context.Context, conn *s3.Client, identifier string, opt output, err := conn.GetBucketTagging(ctx, input, optFns...) - if tfawserr.ErrCodeEquals(err, errCodeNoSuchTagSet, errCodeMethodNotAllowed, errCodeNotImplemented, errCodeXNotImplemented, errCodeUnsupportedOperation) { + if tfawserr.ErrCodeEquals(err, errCodeNoSuchTagSet, errCodeNoSuchTagSetError, errCodeMethodNotAllowed, errCodeNotImplemented, errCodeXNotImplemented, errCodeUnsupportedOperation) { return tftags.New(ctx, nil), nil } if err != nil { @@ -104,7 +104,7 @@ func objectListTags(ctx context.Context, conn *s3.Client, bucket, key string, op output, err := conn.GetObjectTagging(ctx, input, optFns...) - if tfawserr.ErrCodeEquals(err, errCodeNoSuchTagSet) { + if tfawserr.ErrCodeEquals(err, errCodeNoSuchTagSet, errCodeNoSuchTagSetError) { return tftags.New(ctx, nil), nil } From bb3bd0e564719af7dbe01b5ddd235a5b66ffe906 Mon Sep 17 00:00:00 2001 From: jbonzo <8647805+jbonzo@users.noreply.github.com> Date: Tue, 29 Jul 2025 11:19:57 -0400 Subject: [PATCH 011/365] Clarify CHANGELOG entries --- .changelog/43589.txt | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 .changelog/43589.txt diff --git a/.changelog/43589.txt b/.changelog/43589.txt new file mode 100644 index 000000000000..d3333af55cea --- /dev/null +++ b/.changelog/43589.txt @@ -0,0 +1,7 @@ +```release-note:bug +resource/aws_s3_bucket: Fix regression where we stopped accepting 'NoSuchTagSetError' responses from S3-compatible services +``` + +```release-note:bug +resource/aws_s3_object: Fix regression where we stopped accepting 'NoSuchTagSetError' responses from S3-compatible services +``` From 1c6fd2b445d305218ce20dd1a44b2ee992d24185 Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Tue, 29 Jul 2025 14:13:33 -0400 Subject: [PATCH 012/365] r/aws_quicksight_ip_restriction: New resource. --- internal/service/quicksight/ip_restriction.go | 249 ++++++++++++++++++ .../service/quicksight/key_registration.go | 2 +- .../service/quicksight/service_package_gen.go | 6 + 3 files changed, 256 insertions(+), 1 deletion(-) create mode 100644 internal/service/quicksight/ip_restriction.go diff --git a/internal/service/quicksight/ip_restriction.go b/internal/service/quicksight/ip_restriction.go new file mode 100644 index 000000000000..28a3f3933708 --- /dev/null +++ b/internal/service/quicksight/ip_restriction.go @@ -0,0 +1,249 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +package quicksight + +import ( + "context" + "fmt" + + "github.com/YakDriver/regexache" + "github.com/aws/aws-sdk-go-v2/aws" + "github.com/aws/aws-sdk-go-v2/service/quicksight" + awstypes "github.com/aws/aws-sdk-go-v2/service/quicksight/types" + "github.com/hashicorp/terraform-plugin-framework-validators/mapvalidator" + "github.com/hashicorp/terraform-plugin-framework-validators/stringvalidator" + "github.com/hashicorp/terraform-plugin-framework/path" + "github.com/hashicorp/terraform-plugin-framework/resource" + "github.com/hashicorp/terraform-plugin-framework/resource/schema" + "github.com/hashicorp/terraform-plugin-framework/resource/schema/planmodifier" + "github.com/hashicorp/terraform-plugin-framework/resource/schema/stringplanmodifier" + "github.com/hashicorp/terraform-plugin-framework/schema/validator" + "github.com/hashicorp/terraform-plugin-framework/types" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" + "github.com/hashicorp/terraform-provider-aws/internal/errs" + "github.com/hashicorp/terraform-provider-aws/internal/errs/fwdiag" + "github.com/hashicorp/terraform-provider-aws/internal/framework" + fwflex "github.com/hashicorp/terraform-provider-aws/internal/framework/flex" + fwtypes "github.com/hashicorp/terraform-provider-aws/internal/framework/types" + fwvalidators "github.com/hashicorp/terraform-provider-aws/internal/framework/validators" + "github.com/hashicorp/terraform-provider-aws/internal/tfresource" + "github.com/hashicorp/terraform-provider-aws/names" +) + +// @FrameworkResource("aws_quicksight_ip_restriction", name="IP Restriction") +func newIPRestrictionResource(_ context.Context) (resource.ResourceWithConfigure, error) { + r := &ipRestrictionResource{} + + return r, nil +} + +type ipRestrictionResource struct { + framework.ResourceWithModel[ipRestrictionResourceModel] +} + +func (r *ipRestrictionResource) Schema(ctx context.Context, request resource.SchemaRequest, response *resource.SchemaResponse) { + response.Schema = schema.Schema{ + Attributes: map[string]schema.Attribute{ + names.AttrAWSAccountID: schema.StringAttribute{ + Optional: true, + Computed: true, + Validators: []validator.String{ + fwvalidators.AWSAccountID(), + }, + PlanModifiers: []planmodifier.String{ + stringplanmodifier.UseStateForUnknown(), + stringplanmodifier.RequiresReplace(), + }, + }, + names.AttrEnabled: schema.BoolAttribute{ + Required: true, + }, + "ip_restriction_rule_map": schema.MapAttribute{ + CustomType: fwtypes.MapOfStringType, + ElementType: types.StringType, + Optional: true, + Validators: []validator.Map{ + mapvalidator.KeysAre(fwvalidators.IPv4CIDRNetworkAddress()), + mapvalidator.ValueStringsAre(stringvalidator.LengthBetween(0, 150)), + }, + }, + "vpc_endpoint_id_restriction_rule_map": schema.MapAttribute{ + CustomType: fwtypes.MapOfStringType, + ElementType: types.StringType, + Optional: true, + Validators: []validator.Map{ + mapvalidator.KeysAre(stringvalidator.RegexMatches(regexache.MustCompile(`^vpce-[0-9a-z]*$`), "value must be a VPC endpoint ID")), + mapvalidator.ValueStringsAre(stringvalidator.LengthBetween(0, 150)), + }, + }, + "vpc_id_restriction_rule_map": schema.MapAttribute{ + CustomType: fwtypes.MapOfStringType, + ElementType: types.StringType, + Optional: true, + Validators: []validator.Map{ + mapvalidator.KeysAre(stringvalidator.RegexMatches(regexache.MustCompile(`^vpc-[0-9a-z]*$`), "value must be a VPC ID")), + mapvalidator.ValueStringsAre(stringvalidator.LengthBetween(0, 150)), + }, + }, + }, + } +} + +func (r *ipRestrictionResource) Create(ctx context.Context, request resource.CreateRequest, response *resource.CreateResponse) { + var data ipRestrictionResourceModel + response.Diagnostics.Append(request.Plan.Get(ctx, &data)...) + if response.Diagnostics.HasError() { + return + } + if data.AWSAccountID.IsUnknown() { + data.AWSAccountID = fwflex.StringValueToFramework(ctx, r.Meta().AccountID(ctx)) + } + + conn := r.Meta().QuickSightClient(ctx) + + accountID := fwflex.StringValueFromFramework(ctx, data.AWSAccountID) + var input quicksight.UpdateIpRestrictionInput + response.Diagnostics.Append(fwflex.Expand(ctx, data, &input)...) + if response.Diagnostics.HasError() { + return + } + + _, err := conn.UpdateIpRestriction(ctx, &input) + + if err != nil { + response.Diagnostics.AddError(fmt.Sprintf("creating Quicksight IP Restriction (%s)", accountID), err.Error()) + + return + } + + response.Diagnostics.Append(response.State.Set(ctx, data)...) +} + +func (r *ipRestrictionResource) Read(ctx context.Context, request resource.ReadRequest, response *resource.ReadResponse) { + var data ipRestrictionResourceModel + response.Diagnostics.Append(request.State.Get(ctx, &data)...) + if response.Diagnostics.HasError() { + return + } + + conn := r.Meta().QuickSightClient(ctx) + + accountID := fwflex.StringValueFromFramework(ctx, data.AWSAccountID) + output, err := findIPRestrictionByID(ctx, conn, accountID) + + if tfresource.NotFound(err) { + response.Diagnostics.Append(fwdiag.NewResourceNotFoundWarningDiagnostic(err)) + response.State.RemoveResource(ctx) + + return + } + + if err != nil { + response.Diagnostics.AddError(fmt.Sprintf("reading Quicksight IP Restriction (%s)", accountID), err.Error()) + + return + } + + // Set attributes for import. + response.Diagnostics.Append(fwflex.Flatten(ctx, output, &data)...) + if response.Diagnostics.HasError() { + return + } + + response.Diagnostics.Append(response.State.Set(ctx, &data)...) +} + +func (r *ipRestrictionResource) Update(ctx context.Context, request resource.UpdateRequest, response *resource.UpdateResponse) { + var new, old ipRestrictionResourceModel + response.Diagnostics.Append(request.Plan.Get(ctx, &new)...) + if response.Diagnostics.HasError() { + return + } + response.Diagnostics.Append(request.State.Get(ctx, &old)...) + if response.Diagnostics.HasError() { + return + } + + conn := r.Meta().QuickSightClient(ctx) + + accountID := fwflex.StringValueFromFramework(ctx, new.AWSAccountID) + var input quicksight.UpdateIpRestrictionInput + response.Diagnostics.Append(fwflex.Expand(ctx, new, &input)...) + if response.Diagnostics.HasError() { + return + } + + _, err := conn.UpdateIpRestriction(ctx, &input) + + if err != nil { + response.Diagnostics.AddError(fmt.Sprintf("updating Quicksight IP Restriction (%s)", accountID), err.Error()) + + return + } + + response.Diagnostics.Append(response.State.Set(ctx, &new)...) +} + +func (r *ipRestrictionResource) Delete(ctx context.Context, request resource.DeleteRequest, response *resource.DeleteResponse) { + var data ipRestrictionResourceModel + response.Diagnostics.Append(request.State.Get(ctx, &data)...) + if response.Diagnostics.HasError() { + return + } + + conn := r.Meta().QuickSightClient(ctx) + + accountID := fwflex.StringValueFromFramework(ctx, data.AWSAccountID) + input := quicksight.UpdateIpRestrictionInput{ + AwsAccountId: aws.String(accountID), + Enabled: aws.Bool(false), + IpRestrictionRuleMap: map[string]string{}, + VpcEndpointIdRestrictionRuleMap: map[string]string{}, + VpcIdRestrictionRuleMap: map[string]string{}, + } + _, err := conn.UpdateIpRestriction(ctx, &input) + + if err != nil { + response.Diagnostics.AddError(fmt.Sprintf("deleting Quicksight IP Restriction (%s)", accountID), err.Error()) + + return + } +} + +func (r *ipRestrictionResource) ImportState(ctx context.Context, request resource.ImportStateRequest, response *resource.ImportStateResponse) { + resource.ImportStatePassthroughID(ctx, path.Root(names.AttrAWSAccountID), request, response) +} + +func findIPRestrictionByID(ctx context.Context, conn *quicksight.Client, id string) (*quicksight.DescribeIpRestrictionOutput, error) { + input := quicksight.DescribeIpRestrictionInput{ + AwsAccountId: aws.String(id), + } + output, err := conn.DescribeIpRestriction(ctx, &input) + + if errs.IsA[*awstypes.ResourceNotFoundException](err) { + return nil, &retry.NotFoundError{ + LastError: err, + LastRequest: input, + } + } + + if err != nil { + return nil, err + } + + if output == nil || (!aws.ToBool(output.Enabled) && len(output.IpRestrictionRuleMap) == 0 && len(output.VpcEndpointIdRestrictionRuleMap) == 0 && len(output.VpcIdRestrictionRuleMap) == 0) { + return nil, tfresource.NewEmptyResultError(&input) + } + + return output, nil +} + +type ipRestrictionResourceModel struct { + framework.WithRegionModel + AWSAccountID types.String `tfsdk:"aws_account_id"` + Enabled types.Bool `tfsdk:"enabled"` + IPRestrictionRuleMap fwtypes.MapOfString `tfsdk:"ip_restriction_rule_map"` + VPCEndpointIDRestrictionRuleMap fwtypes.MapOfString `tfsdk:"vpc_endpoint_id_restriction_rule_map"` + VPCIDRestrictionRuleMap fwtypes.MapOfString `tfsdk:"vpc_id_restriction_rule_map"` +} diff --git a/internal/service/quicksight/key_registration.go b/internal/service/quicksight/key_registration.go index b9e153a0e837..a617f78343d4 100644 --- a/internal/service/quicksight/key_registration.go +++ b/internal/service/quicksight/key_registration.go @@ -166,7 +166,7 @@ func (r *keyRegistrationResource) Update(ctx context.Context, request resource.U _, err := conn.UpdateKeyRegistration(ctx, &input) if err != nil { - response.Diagnostics.AddError(fmt.Sprintf("creating Quicksight Key Registration (%s)", accountID), err.Error()) + response.Diagnostics.AddError(fmt.Sprintf("updating Quicksight Key Registration (%s)", accountID), err.Error()) return } diff --git a/internal/service/quicksight/service_package_gen.go b/internal/service/quicksight/service_package_gen.go index 8aeaccd23d09..d61537514a5f 100644 --- a/internal/service/quicksight/service_package_gen.go +++ b/internal/service/quicksight/service_package_gen.go @@ -48,6 +48,12 @@ func (p *servicePackage) FrameworkResources(ctx context.Context) []*inttypes.Ser Name: "Ingestion", Region: unique.Make(inttypes.ResourceRegionDefault()), }, + { + Factory: newIPRestrictionResource, + TypeName: "aws_quicksight_ip_restriction", + Name: "IP Restriction", + Region: unique.Make(inttypes.ResourceRegionDefault()), + }, { Factory: newKeyRegistrationResource, TypeName: "aws_quicksight_key_registration", From 49ef8056490a932324e18d759bfac6bbb1374c16 Mon Sep 17 00:00:00 2001 From: Subhan <68732277+delamarch3@users.noreply.github.com> Date: Tue, 29 Jul 2025 19:17:31 +0100 Subject: [PATCH 013/365] use correct field for prompt_arn --- internal/service/bedrockagent/flow.go | 4 +- internal/service/bedrockagent/flow_test.go | 104 +++++++++++++++++++++ 2 files changed, 106 insertions(+), 2 deletions(-) diff --git a/internal/service/bedrockagent/flow.go b/internal/service/bedrockagent/flow.go index 0a9642d67c19..252f22bd946b 100644 --- a/internal/service/bedrockagent/flow.go +++ b/internal/service/bedrockagent/flow.go @@ -806,7 +806,7 @@ func (r *flowResource) Schema(ctx context.Context, request resource.SchemaReques }, NestedObject: schema.NestedBlockObject{ Attributes: map[string]schema.Attribute{ - names.AttrResourceARN: schema.StringAttribute{ + "prompt_arn": schema.StringAttribute{ CustomType: fwtypes.ARNType, Required: true, }, @@ -1775,7 +1775,7 @@ type promptFlowNodeInlineConfigurationModel struct { } type promptFlowNodeResourceConfigurationModel struct { - ResourceARN fwtypes.ARN `tfsdk:"resource_arn"` + PromptARN fwtypes.ARN `tfsdk:"prompt_arn"` } type retrievalFlowNodeConfigurationModel struct { diff --git a/internal/service/bedrockagent/flow_test.go b/internal/service/bedrockagent/flow_test.go index df179e06a3dc..aa5964aa63bf 100644 --- a/internal/service/bedrockagent/flow_test.go +++ b/internal/service/bedrockagent/flow_test.go @@ -330,6 +330,68 @@ func TestAccBedrockAgentFlow_withDefinition(t *testing.T) { }) } +func TestAccBedrockAgentFlow_withPromptResource(t *testing.T) { + ctx := acctest.Context(t) + + var flow bedrockagent.GetFlowOutput + rName := sdkacctest.RandomWithPrefix(acctest.ResourcePrefix) + resourceName := "aws_bedrockagent_flow.test" + foundationModel := "amazon.titan-text-express-v1" + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { + acctest.PreCheck(ctx, t) + acctest.PreCheckPartitionHasService(t, names.BedrockEndpointID) + testAccPreCheckFlow(ctx, t) + }, + ErrorCheck: acctest.ErrorCheck(t, names.BedrockAgentServiceID), + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + CheckDestroy: testAccCheckFlowDestroy(ctx), + Steps: []resource.TestStep{ + { + Config: testAccFlowConfig_withPromptResource(rName, foundationModel), + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckFlowExists(ctx, resourceName, &flow), + acctest.MatchResourceAttrRegionalARN(ctx, resourceName, names.AttrARN, "bedrock", regexache.MustCompile(`flow/.+$`)), + resource.TestCheckResourceAttrSet(resourceName, names.AttrID), + resource.TestCheckResourceAttrSet(resourceName, names.AttrCreatedAt), + resource.TestCheckResourceAttrSet(resourceName, "updated_at"), + resource.TestCheckResourceAttrSet(resourceName, names.AttrVersion), + resource.TestCheckResourceAttrSet(resourceName, names.AttrStatus), + resource.TestCheckResourceAttr(resourceName, names.AttrName, rName), + resource.TestCheckResourceAttrPair(resourceName, names.AttrExecutionRoleARN, "aws_iam_role.test", names.AttrARN), + resource.TestCheckNoResourceAttr(resourceName, "customer_encryption_key_arn"), + resource.TestCheckNoResourceAttr(resourceName, names.AttrDescription), + + resource.TestCheckResourceAttr(resourceName, "definition.#", "1"), + resource.TestCheckResourceAttr(resourceName, "definition.0.connection.#", "0"), + resource.TestCheckResourceAttr(resourceName, "definition.0.node.#", "1"), + + resource.TestCheckResourceAttr(resourceName, "definition.0.node.0.name", "Prompt_1"), + resource.TestCheckResourceAttr(resourceName, "definition.0.node.0.type", "Prompt"), + resource.TestCheckResourceAttr(resourceName, "definition.0.node.0.configuration.#", "1"), + resource.TestCheckResourceAttr(resourceName, "definition.0.node.0.configuration.0.prompt.#", "1"), + resource.TestCheckResourceAttr(resourceName, "definition.0.node.0.configuration.0.prompt.0.source_configuration.#", "1"), + resource.TestCheckResourceAttr(resourceName, "definition.0.node.0.configuration.0.prompt.0.source_configuration.0.resource.#", "1"), + resource.TestCheckResourceAttrPair(resourceName, "definition.0.node.0.configuration.0.prompt.0.source_configuration.0.resource.0.prompt_arn", "aws_bedrockagent_prompt.test", names.AttrARN), + resource.TestCheckResourceAttr(resourceName, "definition.0.node.0.input.#", "1"), + resource.TestCheckResourceAttr(resourceName, "definition.0.node.0.input.0.expression", "$.data"), + resource.TestCheckResourceAttr(resourceName, "definition.0.node.0.input.0.name", "topic"), + resource.TestCheckResourceAttr(resourceName, "definition.0.node.0.input.0.type", "String"), + resource.TestCheckResourceAttr(resourceName, "definition.0.node.0.output.#", "1"), + resource.TestCheckResourceAttr(resourceName, "definition.0.node.0.output.0.name", "modelCompletion"), + resource.TestCheckResourceAttr(resourceName, "definition.0.node.0.output.0.type", "String"), + ), + }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} + func testAccCheckFlowDestroy(ctx context.Context) resource.TestCheckFunc { return func(s *terraform.State) error { conn := acctest.Provider.Meta().(*conns.AWSClient).BedrockAgentClient(ctx) @@ -596,3 +658,45 @@ resource "aws_bedrockagent_flow" "test" { } `, rName, model)) } + +func testAccFlowConfig_withPromptResource(rName, model string) string { + return acctest.ConfigCompose(testAccFlowConfig_base(model), fmt.Sprintf(` +resource "aws_bedrockagent_prompt" "test" { + name = "MyPrompt" + description = "My prompt description." +} + +resource "aws_bedrockagent_flow" "test" { + name = %[1]q + execution_role_arn = aws_iam_role.test.arn + + definition { + node { + name = "Prompt_1" + type = "Prompt" + + configuration { + prompt { + source_configuration { + resource { + prompt_arn = aws_bedrockagent_prompt.test.arn + } + } + } + } + + input { + expression = "$.data" + name = "topic" + type = "String" + } + + output { + name = "modelCompletion" + type = "String" + } + } + } +} +`, rName, model)) +} From 0e18069bf43b8e42c63483bb5663c9561b1dd7e8 Mon Sep 17 00:00:00 2001 From: Subhan <68732277+delamarch3@users.noreply.github.com> Date: Tue, 29 Jul 2025 19:30:27 +0100 Subject: [PATCH 014/365] use generated name for prompt in test --- internal/service/bedrockagent/flow_test.go | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/internal/service/bedrockagent/flow_test.go b/internal/service/bedrockagent/flow_test.go index aa5964aa63bf..ee1b114a4e47 100644 --- a/internal/service/bedrockagent/flow_test.go +++ b/internal/service/bedrockagent/flow_test.go @@ -334,7 +334,8 @@ func TestAccBedrockAgentFlow_withPromptResource(t *testing.T) { ctx := acctest.Context(t) var flow bedrockagent.GetFlowOutput - rName := sdkacctest.RandomWithPrefix(acctest.ResourcePrefix) + flowName := sdkacctest.RandomWithPrefix(acctest.ResourcePrefix) + promptName := sdkacctest.RandomWithPrefix(acctest.ResourcePrefix) resourceName := "aws_bedrockagent_flow.test" foundationModel := "amazon.titan-text-express-v1" @@ -349,7 +350,7 @@ func TestAccBedrockAgentFlow_withPromptResource(t *testing.T) { CheckDestroy: testAccCheckFlowDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccFlowConfig_withPromptResource(rName, foundationModel), + Config: testAccFlowConfig_withPromptResource(flowName, promptName, foundationModel), Check: resource.ComposeAggregateTestCheckFunc( testAccCheckFlowExists(ctx, resourceName, &flow), acctest.MatchResourceAttrRegionalARN(ctx, resourceName, names.AttrARN, "bedrock", regexache.MustCompile(`flow/.+$`)), @@ -358,7 +359,7 @@ func TestAccBedrockAgentFlow_withPromptResource(t *testing.T) { resource.TestCheckResourceAttrSet(resourceName, "updated_at"), resource.TestCheckResourceAttrSet(resourceName, names.AttrVersion), resource.TestCheckResourceAttrSet(resourceName, names.AttrStatus), - resource.TestCheckResourceAttr(resourceName, names.AttrName, rName), + resource.TestCheckResourceAttr(resourceName, names.AttrName, flowName), resource.TestCheckResourceAttrPair(resourceName, names.AttrExecutionRoleARN, "aws_iam_role.test", names.AttrARN), resource.TestCheckNoResourceAttr(resourceName, "customer_encryption_key_arn"), resource.TestCheckNoResourceAttr(resourceName, names.AttrDescription), @@ -659,15 +660,15 @@ resource "aws_bedrockagent_flow" "test" { `, rName, model)) } -func testAccFlowConfig_withPromptResource(rName, model string) string { +func testAccFlowConfig_withPromptResource(flowName, promptName, model string) string { return acctest.ConfigCompose(testAccFlowConfig_base(model), fmt.Sprintf(` resource "aws_bedrockagent_prompt" "test" { - name = "MyPrompt" + name = %[1]q description = "My prompt description." } resource "aws_bedrockagent_flow" "test" { - name = %[1]q + name = %[2]q execution_role_arn = aws_iam_role.test.arn definition { @@ -698,5 +699,5 @@ resource "aws_bedrockagent_flow" "test" { } } } -`, rName, model)) +`, promptName, flowName, model)) } From d7df2c5159741bd905d7d79d77fd145bf2a6e989 Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Tue, 29 Jul 2025 14:26:53 -0400 Subject: [PATCH 015/365] r/aws_quicksight_ip_restriction: Documentation. --- .../r/quicksight_ip_restriction.html.markdown | 62 +++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 website/docs/r/quicksight_ip_restriction.html.markdown diff --git a/website/docs/r/quicksight_ip_restriction.html.markdown b/website/docs/r/quicksight_ip_restriction.html.markdown new file mode 100644 index 000000000000..b4f5465e2ef5 --- /dev/null +++ b/website/docs/r/quicksight_ip_restriction.html.markdown @@ -0,0 +1,62 @@ +--- +subcategory: "QuickSight" +layout: "aws" +page_title: "AWS: aws_quicksight_ip_restriction" +description: |- + Manages the content and status of IP rules. +--- + +# Resource: aws_quicksight_ip_restriction + +Manages the content and status of IP rules. + +~> Deletion of this resource clears all IP restrictions from a QuickSight account. + +## Example Usage + +```terraform +resource "aws_quicksight_ip_restriction" "example" { + enabled = true + + ip_restriction_rule_map = { + "108.56.166.202/32" = "Allow self" + } + + vpc_id_restriction_rule_map = { + (aws_vpc.example.id) = "Main VPC" + } +} +``` + +## Argument Reference + +This resource supports the following arguments: + +* `enabled` - (Required) Whether IP rules are turned on. +* `ip_restriction_rule_map` - (Optional) Map of allowed IPv4 CIDR ranges and descriptions. +* `region` - (Optional) Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the [provider configuration](https://registry.terraform.io/providers/hashicorp/aws/latest/docs#aws-configuration-reference). +* `vpc_endpoint_id_restriction_rule_map` - (Optional) Map of allowed VPC endpoint IDs and descriptions. +* `vpc_id_restriction_rule_map` - (Optional) Map of VPC IDs and descriptions. Traffic from all VPC endpoints that are present in the specified VPC is allowed. + +## Attribute Reference + +This resource exports the following attributes in addition to the arguments above: + +* `aws_account_id` - The ID for the AWS account that contains the settings. + +## Import + +In Terraform v1.5.0 and later, use an [`import` block](https://developer.hashicorp.com/terraform/language/import) to import QuickSight IP restriction using the AWS account ID. For example: + +```terraform +import { + to = aws_quicksight_ip_restriction.example + id = "012345678901" +} +``` + +Using `terraform import`, import QuickSight IP restriction using the AWS account ID. For example: + +```console +% terraform import aws_quicksight_ip_restriction.example "012345678901" +``` From 3270dfc31d3942e20ad7a41949d150308060883e Mon Sep 17 00:00:00 2001 From: Subhan <68732277+delamarch3@users.noreply.github.com> Date: Tue, 29 Jul 2025 19:31:59 +0100 Subject: [PATCH 016/365] add changelog entry --- .changelog/43595.txt | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 .changelog/43595.txt diff --git a/.changelog/43595.txt b/.changelog/43595.txt new file mode 100644 index 000000000000..81fba8ef6193 --- /dev/null +++ b/.changelog/43595.txt @@ -0,0 +1,3 @@ +```release-note:bug +resource/aws_bedrockagent_flow: Fix prompt node ARN field name +``` From 920f12f4aeb28a8aa805a5905c6c666232264778 Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Tue, 29 Jul 2025 14:52:31 -0400 Subject: [PATCH 017/365] r/aws_quicksight_ip_restriction: Initial acceptance tests. --- internal/service/quicksight/exports_test.go | 2 + internal/service/quicksight/ip_restriction.go | 10 ++ .../service/quicksight/ip_restriction_test.go | 140 ++++++++++++++++++ .../service/quicksight/quicksight_test.go | 4 + 4 files changed, 156 insertions(+) create mode 100644 internal/service/quicksight/ip_restriction_test.go diff --git a/internal/service/quicksight/exports_test.go b/internal/service/quicksight/exports_test.go index 10065be3e922..3b1e6c78c1e2 100644 --- a/internal/service/quicksight/exports_test.go +++ b/internal/service/quicksight/exports_test.go @@ -17,6 +17,7 @@ var ( ResourceGroupMembership = resourceGroupMembership ResourceIAMPolicyAssignment = newIAMPolicyAssignmentResource ResourceIngestion = newIngestionResource + ResourceIPRestriction = newIPRestrictionResource ResourceKeyRegistration = newKeyRegistrationResource ResourceNamespace = newNamespaceResource ResourceRefreshSchedule = newRefreshScheduleResource @@ -42,6 +43,7 @@ var ( FindGroupMembershipByFourPartKey = findGroupMembershipByFourPartKey FindIAMPolicyAssignmentByThreePartKey = findIAMPolicyAssignmentByThreePartKey FindIngestionByThreePartKey = findIngestionByThreePartKey + FindIPRestrictionByID = findIPRestrictionByID FindKeyRegistrationByID = findKeyRegistrationByID FindNamespaceByTwoPartKey = findNamespaceByTwoPartKey FindRefreshScheduleByThreePartKey = findRefreshScheduleByThreePartKey diff --git a/internal/service/quicksight/ip_restriction.go b/internal/service/quicksight/ip_restriction.go index 28a3f3933708..9ff0a836678b 100644 --- a/internal/service/quicksight/ip_restriction.go +++ b/internal/service/quicksight/ip_restriction.go @@ -146,6 +146,16 @@ func (r *ipRestrictionResource) Read(ctx context.Context, request resource.ReadR } // Set attributes for import. + // API returns empty maps, not nil. + if data.IPRestrictionRuleMap.IsNull() && len(output.IpRestrictionRuleMap) == 0 { + output.IpRestrictionRuleMap = nil + } + if data.VPCEndpointIDRestrictionRuleMap.IsNull() && len(output.VpcEndpointIdRestrictionRuleMap) == 0 { + output.VpcEndpointIdRestrictionRuleMap = nil + } + if data.VPCIDRestrictionRuleMap.IsNull() && len(output.VpcIdRestrictionRuleMap) == 0 { + output.VpcIdRestrictionRuleMap = nil + } response.Diagnostics.Append(fwflex.Flatten(ctx, output, &data)...) if response.Diagnostics.HasError() { return diff --git a/internal/service/quicksight/ip_restriction_test.go b/internal/service/quicksight/ip_restriction_test.go new file mode 100644 index 000000000000..eb0c1a05ebdc --- /dev/null +++ b/internal/service/quicksight/ip_restriction_test.go @@ -0,0 +1,140 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +package quicksight_test + +import ( + "context" + "fmt" + "testing" + + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/knownvalue" + "github.com/hashicorp/terraform-plugin-testing/plancheck" + "github.com/hashicorp/terraform-plugin-testing/statecheck" + "github.com/hashicorp/terraform-plugin-testing/terraform" + "github.com/hashicorp/terraform-plugin-testing/tfjsonpath" + "github.com/hashicorp/terraform-provider-aws/internal/acctest" + tfknownvalue "github.com/hashicorp/terraform-provider-aws/internal/acctest/knownvalue" + "github.com/hashicorp/terraform-provider-aws/internal/conns" + tfquicksight "github.com/hashicorp/terraform-provider-aws/internal/service/quicksight" + "github.com/hashicorp/terraform-provider-aws/internal/tfresource" + "github.com/hashicorp/terraform-provider-aws/names" +) + +func testAccIPRestriction_basic(t *testing.T) { + ctx := acctest.Context(t) + resourceName := "aws_quicksight_ip_restriction.test" + + resource.Test(t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.QuickSightServiceID), + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + CheckDestroy: testAccCheckIPRestrictionDestroy(ctx), + Steps: []resource.TestStep{ + { + Config: testAccIPRestrictionConfig_basic, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckIPRestrictionExists(ctx, resourceName), + ), + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + }, + PostApplyPreRefresh: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionNoop), + }, + PostApplyPostRefresh: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionNoop), + }, + }, + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrAWSAccountID), tfknownvalue.AccountID()), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrEnabled), knownvalue.Bool(true)), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New("ip_restriction_rule_map"), knownvalue.Null()), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New("vpc_endpoint_id_restriction_rule_map"), knownvalue.Null()), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New("vpc_id_restriction_rule_map"), knownvalue.Null()), + }, + }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateIdFunc: acctest.AttrImportStateIdFunc(resourceName, names.AttrAWSAccountID), + ImportStateVerifyIdentifierAttribute: names.AttrAWSAccountID, + }, + }, + }) +} + +func testAccIPRestriction_disappears(t *testing.T) { + ctx := acctest.Context(t) + resourceName := "aws_quicksight_ip_restriction.test" + + resource.Test(t, resource.TestCase{ + PreCheck: func() { + acctest.PreCheck(ctx, t) + acctest.PreCheckPartitionHasService(t, names.QuickSightEndpointID) + }, + ErrorCheck: acctest.ErrorCheck(t, names.QuickSightServiceID), + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + CheckDestroy: testAccCheckIPRestrictionDestroy(ctx), + Steps: []resource.TestStep{ + { + Config: testAccIPRestrictionConfig_basic, + Check: resource.ComposeTestCheckFunc( + testAccCheckIPRestrictionExists(ctx, resourceName), + acctest.CheckFrameworkResourceDisappears(ctx, acctest.Provider, tfquicksight.ResourceIPRestriction, resourceName), + ), + ExpectNonEmptyPlan: true, + }, + }, + }) +} + +func testAccCheckIPRestrictionDestroy(ctx context.Context) resource.TestCheckFunc { + return func(s *terraform.State) error { + conn := acctest.Provider.Meta().(*conns.AWSClient).QuickSightClient(ctx) + + for _, rs := range s.RootModule().Resources { + if rs.Type != "aws_quicksight_ip_restriction" { + continue + } + + _, err := tfquicksight.FindIPRestrictionByID(ctx, conn, rs.Primary.Attributes[names.AttrAWSAccountID]) + + if tfresource.NotFound(err) { + continue + } + + if err != nil { + return err + } + + return fmt.Errorf("QuickSight IP Restriction (%s) still exists", rs.Primary.Attributes[names.AttrAWSAccountID]) + } + + return nil + } +} + +func testAccCheckIPRestrictionExists(ctx context.Context, n string) resource.TestCheckFunc { + return func(s *terraform.State) error { + rs, ok := s.RootModule().Resources[n] + if !ok { + return fmt.Errorf("Not found: %s", n) + } + + conn := acctest.Provider.Meta().(*conns.AWSClient).QuickSightClient(ctx) + + _, err := tfquicksight.FindIPRestrictionByID(ctx, conn, rs.Primary.Attributes[names.AttrAWSAccountID]) + + return err + } +} + +const testAccIPRestrictionConfig_basic = ` +resource "aws_quicksight_ip_restriction" "test" { + enabled = true +} +` diff --git a/internal/service/quicksight/quicksight_test.go b/internal/service/quicksight/quicksight_test.go index 4033cae496b8..d7d6427b9698 100644 --- a/internal/service/quicksight/quicksight_test.go +++ b/internal/service/quicksight/quicksight_test.go @@ -32,6 +32,10 @@ func TestAccQuickSight_serial(t *testing.T) { acctest.CtBasic: testAccAccountSubscription_basic, acctest.CtDisappears: testAccAccountSubscription_disappears, }, + "IPRestriction": { + acctest.CtBasic: testAccIPRestriction_basic, + acctest.CtDisappears: testAccIPRestriction_disappears, + }, "KeyRegistration": { acctest.CtBasic: testAccKeyRegistration_basic, acctest.CtDisappears: testAccKeyRegistration_disappears, From f3192d4d15ccd9940e1d942227e2dcf4e4750984 Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Tue, 29 Jul 2025 15:25:58 -0400 Subject: [PATCH 018/365] r/aws_quicksight_ip_restriction: Additional acceptance tests. --- internal/service/quicksight/ip_restriction.go | 22 +++ .../service/quicksight/ip_restriction_test.go | 142 ++++++++++++++++++ .../service/quicksight/quicksight_test.go | 1 + 3 files changed, 165 insertions(+) diff --git a/internal/service/quicksight/ip_restriction.go b/internal/service/quicksight/ip_restriction.go index 9ff0a836678b..8e7b40fb8535 100644 --- a/internal/service/quicksight/ip_restriction.go +++ b/internal/service/quicksight/ip_restriction.go @@ -109,6 +109,17 @@ func (r *ipRestrictionResource) Create(ctx context.Context, request resource.Cre return } + // Send empty maps, not nil. + if data.IPRestrictionRuleMap.IsNull() { + input.IpRestrictionRuleMap = map[string]string{} + } + if data.VPCEndpointIDRestrictionRuleMap.IsNull() { + input.VpcEndpointIdRestrictionRuleMap = map[string]string{} + } + if data.VPCIDRestrictionRuleMap.IsNull() { + input.VpcIdRestrictionRuleMap = map[string]string{} + } + _, err := conn.UpdateIpRestriction(ctx, &input) if err != nil { @@ -184,6 +195,17 @@ func (r *ipRestrictionResource) Update(ctx context.Context, request resource.Upd return } + // Send empty maps, not nil. + if new.IPRestrictionRuleMap.IsNull() { + input.IpRestrictionRuleMap = map[string]string{} + } + if new.VPCEndpointIDRestrictionRuleMap.IsNull() { + input.VpcEndpointIdRestrictionRuleMap = map[string]string{} + } + if new.VPCIDRestrictionRuleMap.IsNull() { + input.VpcIdRestrictionRuleMap = map[string]string{} + } + _, err := conn.UpdateIpRestriction(ctx, &input) if err != nil { diff --git a/internal/service/quicksight/ip_restriction_test.go b/internal/service/quicksight/ip_restriction_test.go index eb0c1a05ebdc..588c37180dd8 100644 --- a/internal/service/quicksight/ip_restriction_test.go +++ b/internal/service/quicksight/ip_restriction_test.go @@ -8,6 +8,7 @@ import ( "fmt" "testing" + sdkacctest "github.com/hashicorp/terraform-plugin-testing/helper/acctest" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/hashicorp/terraform-plugin-testing/knownvalue" "github.com/hashicorp/terraform-plugin-testing/plancheck" @@ -92,6 +93,78 @@ func testAccIPRestriction_disappears(t *testing.T) { }) } +func testAccIPRestriction_update(t *testing.T) { + ctx := acctest.Context(t) + rName := sdkacctest.RandomWithPrefix(acctest.ResourcePrefix) + resourceName := "aws_quicksight_ip_restriction.test" + + resource.Test(t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.QuickSightServiceID), + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + CheckDestroy: testAccCheckIPRestrictionDestroy(ctx), + Steps: []resource.TestStep{ + { + Config: testAccIPRestrictionConfig_permissions1(rName, false), + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckIPRestrictionExists(ctx, resourceName), + ), + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + }, + PostApplyPreRefresh: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionNoop), + }, + PostApplyPostRefresh: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionNoop), + }, + }, + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrAWSAccountID), tfknownvalue.AccountID()), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrEnabled), knownvalue.Bool(false)), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New("ip_restriction_rule_map"), knownvalue.MapExact(map[string]knownvalue.Check{ + "108.56.166.202/32": knownvalue.StringExact("Allow self"), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New("vpc_endpoint_id_restriction_rule_map"), knownvalue.Null()), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New("vpc_id_restriction_rule_map"), knownvalue.MapSizeExact(1)), + }, + }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateIdFunc: acctest.AttrImportStateIdFunc(resourceName, names.AttrAWSAccountID), + ImportStateVerifyIdentifierAttribute: names.AttrAWSAccountID, + }, + { + Config: testAccIPRestrictionConfig_permissions2(rName, true), + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckIPRestrictionExists(ctx, resourceName), + ), + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + }, + PostApplyPreRefresh: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionNoop), + }, + PostApplyPostRefresh: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionNoop), + }, + }, + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrAWSAccountID), tfknownvalue.AccountID()), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrEnabled), knownvalue.Bool(true)), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New("ip_restriction_rule_map"), knownvalue.Null()), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New("vpc_endpoint_id_restriction_rule_map"), knownvalue.MapSizeExact(1)), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New("vpc_id_restriction_rule_map"), knownvalue.MapSizeExact(2)), + }, + }, + }, + }) +} + func testAccCheckIPRestrictionDestroy(ctx context.Context) resource.TestCheckFunc { return func(s *terraform.State) error { conn := acctest.Provider.Meta().(*conns.AWSClient).QuickSightClient(ctx) @@ -138,3 +211,72 @@ resource "aws_quicksight_ip_restriction" "test" { enabled = true } ` + +func testAccIPRestrictionConfig_permissions1(rName string, enabled bool) string { + return fmt.Sprintf(` +resource "aws_vpc" "test" { + count = 3 + + cidr_block = "10.${count.index}.0.0/16" + + tags = { + Name = %[1]q + } +} + +data "aws_region" "current" {} + +resource "aws_vpc_endpoint" "test" { + vpc_id = aws_vpc.test[1].id + service_name = "com.amazonaws.${data.aws_region.current.region}.quicksight-website" + vpc_endpoint_type = "Interface" +} + +resource "aws_quicksight_ip_restriction" "test" { + enabled = %[2]t + + ip_restriction_rule_map = { + "108.56.166.202/32" = "Allow self" + } + + vpc_id_restriction_rule_map = { + (aws_vpc.test[0].id) = "Main VPC" + } +} +`, rName, enabled) +} + +func testAccIPRestrictionConfig_permissions2(rName string, enabled bool) string { + return fmt.Sprintf(` +resource "aws_vpc" "test" { + count = 3 + + cidr_block = "10.${count.index}.0.0/16" + + tags = { + Name = %[1]q + } +} + +data "aws_region" "current" {} + +resource "aws_vpc_endpoint" "test" { + vpc_id = aws_vpc.test[1].id + service_name = "com.amazonaws.${data.aws_region.current.region}.quicksight-website" + vpc_endpoint_type = "Interface" +} + +resource "aws_quicksight_ip_restriction" "test" { + enabled = %[2]t + + vpc_id_restriction_rule_map = { + (aws_vpc.test[0].id) = "Main VPC" + (aws_vpc.test[2].id) = "" + } + + vpc_endpoint_id_restriction_rule_map = { + (aws_vpc_endpoint.test.id) = "EP" + } +} +`, rName, enabled) +} diff --git a/internal/service/quicksight/quicksight_test.go b/internal/service/quicksight/quicksight_test.go index d7d6427b9698..03995f196fa1 100644 --- a/internal/service/quicksight/quicksight_test.go +++ b/internal/service/quicksight/quicksight_test.go @@ -35,6 +35,7 @@ func TestAccQuickSight_serial(t *testing.T) { "IPRestriction": { acctest.CtBasic: testAccIPRestriction_basic, acctest.CtDisappears: testAccIPRestriction_disappears, + "update": testAccIPRestriction_update, }, "KeyRegistration": { acctest.CtBasic: testAccKeyRegistration_basic, From f16157dab39e34b896feb6047b2ed8683b5abf2f Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Tue, 29 Jul 2025 15:34:22 -0400 Subject: [PATCH 019/365] Add CHANGELOG entry. --- .changelog/43596.txt | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 .changelog/43596.txt diff --git a/.changelog/43596.txt b/.changelog/43596.txt new file mode 100644 index 000000000000..043667824504 --- /dev/null +++ b/.changelog/43596.txt @@ -0,0 +1,3 @@ +```release-note:new-resource +aws_quicksight_ip_restriction +``` \ No newline at end of file From 7a4f8cec1551c8cdcf50176c4893cadce52d88ac Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Tue, 29 Jul 2025 15:35:23 -0400 Subject: [PATCH 020/365] Fix terrafmt errors. --- internal/service/quicksight/ip_restriction_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/service/quicksight/ip_restriction_test.go b/internal/service/quicksight/ip_restriction_test.go index 588c37180dd8..19c45f633e33 100644 --- a/internal/service/quicksight/ip_restriction_test.go +++ b/internal/service/quicksight/ip_restriction_test.go @@ -271,7 +271,7 @@ resource "aws_quicksight_ip_restriction" "test" { vpc_id_restriction_rule_map = { (aws_vpc.test[0].id) = "Main VPC" - (aws_vpc.test[2].id) = "" + (aws_vpc.test[2].id) = "" } vpc_endpoint_id_restriction_rule_map = { From 65b8610ec61e5e240fd98ed045349c1b4d4632c3 Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Tue, 29 Jul 2025 15:38:39 -0400 Subject: [PATCH 021/365] Tweak CHANGELOG entry. --- .changelog/42877.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.changelog/42877.txt b/.changelog/42877.txt index 89c126687a1d..b5cdbd519f31 100644 --- a/.changelog/42877.txt +++ b/.changelog/42877.txt @@ -1,3 +1,3 @@ ```release-note:bug -resource/aws_ssm_parameter: fix `Error: Provider produced inconsistent final plan and produced an invalid new value.` +resource/aws_ssm_parameter: Fix `Provider produced inconsistent final plan` errors when changing from using `value` to using `value_wo` ``` From bdc529a07a43b7f7721f7b6331404d2830bbba5e Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Tue, 29 Jul 2025 15:46:43 -0400 Subject: [PATCH 022/365] Tidy up 'TestAccSSMParameter_changeValueToWriteOnly'. --- internal/service/ssm/parameter_test.go | 97 ++++++++++++-------------- 1 file changed, 44 insertions(+), 53 deletions(-) diff --git a/internal/service/ssm/parameter_test.go b/internal/service/ssm/parameter_test.go index 2d31b5e42faa..d6b714d659cb 100644 --- a/internal/service/ssm/parameter_test.go +++ b/internal/service/ssm/parameter_test.go @@ -240,7 +240,6 @@ func TestAccSSMParameter_changeValueToWriteOnly(t *testing.T) { var param awstypes.Parameter rName := sdkacctest.RandomWithPrefix(acctest.ResourcePrefix) resourceName := "aws_ssm_parameter.test" - rVersion := 1234 resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { acctest.PreCheck(ctx, t) }, @@ -252,46 +251,13 @@ func TestAccSSMParameter_changeValueToWriteOnly(t *testing.T) { CheckDestroy: testAccCheckParameterDestroy(ctx), Steps: []resource.TestStep{ { - Config: fmt.Sprintf(` -resource "aws_ssm_parameter" "prereq" { - name = "%[1]s-prereq" - type = %[2]q - value = %[3]q -} - -data "aws_ssm_parameter" "prereq" { - name = aws_ssm_parameter.prereq.name -} - -resource "aws_ssm_parameter" "test" { - name = %[1]q - type = %[2]q - value = data.aws_ssm_parameter.prereq.value -} -`, rName, "SecureString", "test"), + Config: testAccParameterConfig_changeValueToWriteOnly1(rName, "SecureString", "test"), Check: resource.ComposeTestCheckFunc( testAccCheckParameterExists(ctx, resourceName, ¶m), ), }, { - Config: fmt.Sprintf(` -resource "aws_ssm_parameter" "prereq" { - name = "%[1]s-prereq" - type = %[2]q - value = %[3]q -} - -data "aws_ssm_parameter" "prereq" { - name = aws_ssm_parameter.prereq.name -} - -resource "aws_ssm_parameter" "test" { - name = %[1]q - type = %[2]q - value_wo = data.aws_ssm_parameter.prereq.value - value_wo_version = data.aws_ssm_parameter.prereq.version -} -`, rName, "SecureString", "testUpdated", rVersion), + Config: testAccParameterConfig_changeValueToWriteOnly2(rName, "SecureString", "testUpdated"), Check: resource.ComposeTestCheckFunc( testAccCheckParameterExists(ctx, resourceName, ¶m), testAccCheckParameterWriteOnlyValueEqual(t, ¶m, "testUpdated"), @@ -332,23 +298,7 @@ resource "aws_ssm_parameter" "test" { }, }, { - Config: fmt.Sprintf(` -resource "aws_ssm_parameter" "prereq" { - name = "%[1]s-prereq" - type = %[2]q - value = %[3]q -} - -data "aws_ssm_parameter" "prereq" { - name = aws_ssm_parameter.prereq.name -} - -resource "aws_ssm_parameter" "test" { - name = %[1]q - type = %[2]q - value = data.aws_ssm_parameter.prereq.value -} -`, rName, "SecureString", "test"), + Config: testAccParameterConfig_changeValueToWriteOnly1(rName, "SecureString", "test"), Check: resource.ComposeTestCheckFunc( testAccCheckParameterExists(ctx, resourceName, ¶m), resource.TestCheckResourceAttr(resourceName, names.AttrType, "SecureString"), @@ -1754,3 +1704,44 @@ resource "aws_ssm_parameter" "test" { } `, rName, value, valueVersion) } + +func testAccParameterConfig_changeValueToWriteOnly1(rName, typ, value string) string { + return fmt.Sprintf(` +resource "aws_ssm_parameter" "prereq" { + name = "%[1]s-prereq" + type = %[2]q + value = %[3]q +} + +data "aws_ssm_parameter" "prereq" { + name = aws_ssm_parameter.prereq.name +} + +resource "aws_ssm_parameter" "test" { + name = %[1]q + type = %[2]q + value = data.aws_ssm_parameter.prereq.value +} +`, rName, typ, value) +} + +func testAccParameterConfig_changeValueToWriteOnly2(rName, typ, value string) string { + return fmt.Sprintf(` +resource "aws_ssm_parameter" "prereq" { + name = "%[1]s-prereq" + type = %[2]q + value = %[3]q +} + +data "aws_ssm_parameter" "prereq" { + name = aws_ssm_parameter.prereq.name +} + +resource "aws_ssm_parameter" "test" { + name = %[1]q + type = %[2]q + value_wo = data.aws_ssm_parameter.prereq.value + value_wo_version = data.aws_ssm_parameter.prereq.version +} +`, rName, typ, value) +} From 13e0a9d2942bbff7dc55ba19eb173503f35327be Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Tue, 29 Jul 2025 16:19:31 -0400 Subject: [PATCH 023/365] Tweak CHANGELOG entries --- .changelog/43589.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.changelog/43589.txt b/.changelog/43589.txt index d3333af55cea..f419b609b328 100644 --- a/.changelog/43589.txt +++ b/.changelog/43589.txt @@ -1,7 +1,7 @@ ```release-note:bug -resource/aws_s3_bucket: Fix regression where we stopped accepting 'NoSuchTagSetError' responses from S3-compatible services +resource/aws_s3_bucket: Accept `NoSuchTagSetError` responses from S3-compatible services ``` ```release-note:bug -resource/aws_s3_object: Fix regression where we stopped accepting 'NoSuchTagSetError' responses from S3-compatible services +resource/aws_s3_object: Accept `NoSuchTagSetError` responses from S3-compatible services ``` From 0714844f1a7855be4fb9b3f234f0e2cae0f8bbfd Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Tue, 29 Jul 2025 16:24:12 -0400 Subject: [PATCH 024/365] Tweak CHANGELOG entry. --- .changelog/43595.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.changelog/43595.txt b/.changelog/43595.txt index 81fba8ef6193..6057109a1fe5 100644 --- a/.changelog/43595.txt +++ b/.changelog/43595.txt @@ -1,3 +1,3 @@ ```release-note:bug -resource/aws_bedrockagent_flow: Fix prompt node ARN field name +resource/aws_bedrockagent_flow: Fix `missing required field, CreateFlowInput.Definition.Nodes[0].Configuration[prompt].SourceConfiguration[resource].PromptArn` errors on Create ``` From e1adc7666befc35612b13fc9151396cb95f77f55 Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Tue, 29 Jul 2025 16:35:56 -0400 Subject: [PATCH 025/365] Tweak CHANGELOG entry. --- .changelog/43452.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.changelog/43452.txt b/.changelog/43452.txt index c8548c609fc8..6f7b15d8a32b 100644 --- a/.changelog/43452.txt +++ b/.changelog/43452.txt @@ -3,5 +3,5 @@ data-source/aws_verifiedpermissions_policy_store: Add `deletion_protection` attr ``` ```release-note:enhancement -resource/aws_verifiedpermissions_policy_store: Add `deletion_protection` attribute +resource/aws_verifiedpermissions_policy_store: Add `deletion_protection` argument ``` \ No newline at end of file From 8ccd52d541437ac1b7e51b5b7e0b66245484ee12 Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Tue, 29 Jul 2025 16:37:55 -0400 Subject: [PATCH 026/365] r/aws_verifiedpermissions_policy_store: Remove default value for 'deletion_protection'. --- internal/service/verifiedpermissions/policy_store.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/internal/service/verifiedpermissions/policy_store.go b/internal/service/verifiedpermissions/policy_store.go index e7eba64c327e..9ecf362b2769 100644 --- a/internal/service/verifiedpermissions/policy_store.go +++ b/internal/service/verifiedpermissions/policy_store.go @@ -13,7 +13,6 @@ import ( "github.com/hashicorp/terraform-plugin-framework/resource" "github.com/hashicorp/terraform-plugin-framework/resource/schema" "github.com/hashicorp/terraform-plugin-framework/resource/schema/planmodifier" - "github.com/hashicorp/terraform-plugin-framework/resource/schema/stringdefault" "github.com/hashicorp/terraform-plugin-framework/resource/schema/stringplanmodifier" "github.com/hashicorp/terraform-plugin-framework/schema/validator" "github.com/hashicorp/terraform-plugin-framework/types" @@ -57,7 +56,6 @@ func (r *policyStoreResource) Schema(ctx context.Context, request resource.Schem Optional: true, Computed: true, CustomType: fwtypes.StringEnumType[awstypes.DeletionProtection](), - Default: stringdefault.StaticString(string(awstypes.DeletionProtectionDisabled)), }, names.AttrDescription: schema.StringAttribute{ Optional: true, @@ -182,7 +180,7 @@ func (r *policyStoreResource) Update(ctx context.Context, request resource.Updat conn := r.Meta().VerifiedPermissionsClient(ctx) - if !new.Description.Equal(old.Description) || !new.ValidationSettings.Equal(old.ValidationSettings) || !new.DeletionProtection.Equal(old.DeletionProtection) { + if !new.DeletionProtection.Equal(old.DeletionProtection) || !new.Description.Equal(old.Description) || !new.ValidationSettings.Equal(old.ValidationSettings) { var input verifiedpermissions.UpdatePolicyStoreInput response.Diagnostics.Append(fwflex.Expand(ctx, new, &input)...) if response.Diagnostics.HasError() { From e5c8ef4d2de32eff9fccfd11addafa19d6020c87 Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Tue, 29 Jul 2025 16:50:33 -0400 Subject: [PATCH 027/365] r/aws_verifiedpermissions_policy_store: Set 'deletion_protection' after Create. --- .../verifiedpermissions/policy_store.go | 20 ++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/internal/service/verifiedpermissions/policy_store.go b/internal/service/verifiedpermissions/policy_store.go index 9ecf362b2769..9ec2b7f17fd3 100644 --- a/internal/service/verifiedpermissions/policy_store.go +++ b/internal/service/verifiedpermissions/policy_store.go @@ -53,9 +53,12 @@ func (r *policyStoreResource) Schema(ctx context.Context, request resource.Schem Attributes: map[string]schema.Attribute{ names.AttrARN: framework.ARNAttributeComputedOnly(), names.AttrDeletionProtection: schema.StringAttribute{ + CustomType: fwtypes.StringEnumType[awstypes.DeletionProtection](), Optional: true, Computed: true, - CustomType: fwtypes.StringEnumType[awstypes.DeletionProtection](), + PlanModifiers: []planmodifier.String{ + stringplanmodifier.UseStateForUnknown(), + }, }, names.AttrDescription: schema.StringAttribute{ Optional: true, @@ -123,11 +126,22 @@ func (r *policyStoreResource) Create(ctx context.Context, request resource.Creat } // Set values for unknowns. - response.Diagnostics.Append(fwflex.Flatten(ctx, output, &data)...) + data.ID = fwflex.StringToFramework(ctx, output.PolicyStoreId) + + policyStore, err := findPolicyStoreByID(ctx, conn, data.ID.ValueString()) + + if err != nil { + response.Diagnostics.AddError( + create.ProblemStandardMessage(names.VerifiedPermissions, create.ErrActionReading, ResNamePolicyStore, data.PolicyStoreID.ValueString(), err), + err.Error(), + ) + return + } + + response.Diagnostics.Append(fwflex.Flatten(ctx, policyStore, &data)...) if response.Diagnostics.HasError() { return } - data.ID = fwflex.StringToFramework(ctx, output.PolicyStoreId) response.Diagnostics.Append(response.State.Set(ctx, &data)...) } From c6f5d213da66841e2f4f521c42eca31063f7bc05 Mon Sep 17 00:00:00 2001 From: Graham Davison Date: Wed, 23 Jul 2025 08:38:42 -0700 Subject: [PATCH 028/365] Adds generation --- internal/service/networkmanager/connect_attachment.go | 1 + internal/service/networkmanager/connect_peer.go | 1 + internal/service/networkmanager/connection.go | 1 + internal/service/networkmanager/core_network.go | 1 + internal/service/networkmanager/device.go | 1 + internal/service/networkmanager/dx_gateway_attachment.go | 1 + internal/service/networkmanager/generate.go | 1 + internal/service/networkmanager/global_network.go | 1 + internal/service/networkmanager/link.go | 1 + internal/service/networkmanager/site.go | 1 + internal/service/networkmanager/site_to_site_vpn_attachment.go | 1 + internal/service/networkmanager/transit_gateway_peering.go | 1 + .../networkmanager/transit_gateway_route_table_attachment.go | 1 + internal/service/networkmanager/vpc_attachment.go | 1 + 14 files changed, 14 insertions(+) diff --git a/internal/service/networkmanager/connect_attachment.go b/internal/service/networkmanager/connect_attachment.go index 0ab473c8198f..759b970f6337 100644 --- a/internal/service/networkmanager/connect_attachment.go +++ b/internal/service/networkmanager/connect_attachment.go @@ -27,6 +27,7 @@ import ( // @SDKResource("aws_networkmanager_connect_attachment", name="Connect Attachment") // @Tags(identifierAttribute="arn") +// @Testing(tagsTest=false) func resourceConnectAttachment() *schema.Resource { return &schema.Resource{ CreateWithoutTimeout: resourceConnectAttachmentCreate, diff --git a/internal/service/networkmanager/connect_peer.go b/internal/service/networkmanager/connect_peer.go index 9bcf2fdf422e..22d6db2f4d24 100644 --- a/internal/service/networkmanager/connect_peer.go +++ b/internal/service/networkmanager/connect_peer.go @@ -28,6 +28,7 @@ import ( // @SDKResource("aws_networkmanager_connect_peer", name="Connect Peer") // @Tags(identifierAttribute="arn") +// @Testing(tagsTest=false) func resourceConnectPeer() *schema.Resource { return &schema.Resource{ CreateWithoutTimeout: resourceConnectPeerCreate, diff --git a/internal/service/networkmanager/connection.go b/internal/service/networkmanager/connection.go index 8655228ba6a8..74566de70fa0 100644 --- a/internal/service/networkmanager/connection.go +++ b/internal/service/networkmanager/connection.go @@ -29,6 +29,7 @@ import ( // @SDKResource("aws_networkmanager_connection", name="Connection") // @Tags(identifierAttribute="arn") +// @Testing(tagsTest=false) func resourceConnection() *schema.Resource { return &schema.Resource{ CreateWithoutTimeout: resourceConnectionCreate, diff --git a/internal/service/networkmanager/core_network.go b/internal/service/networkmanager/core_network.go index 76466e1f6a4a..a16705cfe32e 100644 --- a/internal/service/networkmanager/core_network.go +++ b/internal/service/networkmanager/core_network.go @@ -43,6 +43,7 @@ const ( // @SDKResource("aws_networkmanager_core_network", name="Core Network") // @Tags(identifierAttribute="arn") +// @Testing(tagsTest=false) func resourceCoreNetwork() *schema.Resource { return &schema.Resource{ CreateWithoutTimeout: resourceCoreNetworkCreate, diff --git a/internal/service/networkmanager/device.go b/internal/service/networkmanager/device.go index bf7b7ad98847..06486b6f24c6 100644 --- a/internal/service/networkmanager/device.go +++ b/internal/service/networkmanager/device.go @@ -30,6 +30,7 @@ import ( // @SDKResource("aws_networkmanager_device", name="Device") // @Tags(identifierAttribute="arn") +// @Testing(tagsTest=false) func resourceDevice() *schema.Resource { return &schema.Resource{ CreateWithoutTimeout: resourceDeviceCreate, diff --git a/internal/service/networkmanager/dx_gateway_attachment.go b/internal/service/networkmanager/dx_gateway_attachment.go index dc6f5f30fa06..c8ee72588709 100644 --- a/internal/service/networkmanager/dx_gateway_attachment.go +++ b/internal/service/networkmanager/dx_gateway_attachment.go @@ -34,6 +34,7 @@ import ( // @FrameworkResource("aws_networkmanager_dx_gateway_attachment", name="Direct Connect Gateway Attachment") // @Tags(identifierAttribute="arn") +// @Testing(tagsTest=false) func newDirectConnectGatewayAttachmentResource(context.Context) (resource.ResourceWithConfigure, error) { r := &directConnectGatewayAttachmentResource{} diff --git a/internal/service/networkmanager/generate.go b/internal/service/networkmanager/generate.go index f6a18a9e8a10..529094e28462 100644 --- a/internal/service/networkmanager/generate.go +++ b/internal/service/networkmanager/generate.go @@ -3,6 +3,7 @@ //go:generate go run ../../generate/tags/main.go -ServiceTagsSlice -UpdateTags //go:generate go run ../../generate/servicepackage/main.go +//go:generate go run ../../generate/tagstests/main.go // ONLY generate directives and package declaration! Do not add anything else to this file. package networkmanager diff --git a/internal/service/networkmanager/global_network.go b/internal/service/networkmanager/global_network.go index a3588515e576..e8c3818881cb 100644 --- a/internal/service/networkmanager/global_network.go +++ b/internal/service/networkmanager/global_network.go @@ -26,6 +26,7 @@ import ( // @SDKResource("aws_networkmanager_global_network", name="Global Network") // @Tags(identifierAttribute="arn") +// @Testing(tagsTest=false) func resourceGlobalNetwork() *schema.Resource { return &schema.Resource{ CreateWithoutTimeout: resourceGlobalNetworkCreate, diff --git a/internal/service/networkmanager/link.go b/internal/service/networkmanager/link.go index 15879822493a..ac4279b84c22 100644 --- a/internal/service/networkmanager/link.go +++ b/internal/service/networkmanager/link.go @@ -29,6 +29,7 @@ import ( // @SDKResource("aws_networkmanager_link", name="Link") // @Tags(identifierAttribute="arn") +// @Testing(tagsTest=false) func resourceLink() *schema.Resource { return &schema.Resource{ CreateWithoutTimeout: resourceLinkCreate, diff --git a/internal/service/networkmanager/site.go b/internal/service/networkmanager/site.go index 7083589e61c4..5790078536a3 100644 --- a/internal/service/networkmanager/site.go +++ b/internal/service/networkmanager/site.go @@ -29,6 +29,7 @@ import ( // @SDKResource("aws_networkmanager_site", name="Site") // @Tags(identifierAttribute="arn") +// @Testing(tagsTest=false) func resourceSite() *schema.Resource { return &schema.Resource{ CreateWithoutTimeout: resourceSiteCreate, diff --git a/internal/service/networkmanager/site_to_site_vpn_attachment.go b/internal/service/networkmanager/site_to_site_vpn_attachment.go index b1de20b6caf9..c9674bb2e485 100644 --- a/internal/service/networkmanager/site_to_site_vpn_attachment.go +++ b/internal/service/networkmanager/site_to_site_vpn_attachment.go @@ -27,6 +27,7 @@ import ( // @SDKResource("aws_networkmanager_site_to_site_vpn_attachment", name="Site To Site VPN Attachment") // @Tags(identifierAttribute="arn") +// @Testing(tagsTest=false) func resourceSiteToSiteVPNAttachment() *schema.Resource { return &schema.Resource{ CreateWithoutTimeout: resourceSiteToSiteVPNAttachmentCreate, diff --git a/internal/service/networkmanager/transit_gateway_peering.go b/internal/service/networkmanager/transit_gateway_peering.go index 5d362b06cc54..464da860c717 100644 --- a/internal/service/networkmanager/transit_gateway_peering.go +++ b/internal/service/networkmanager/transit_gateway_peering.go @@ -26,6 +26,7 @@ import ( // @SDKResource("aws_networkmanager_transit_gateway_peering", name="Transit Gateway Peering") // @Tags(identifierAttribute="arn") +// @Testing(tagsTest=false) func resourceTransitGatewayPeering() *schema.Resource { return &schema.Resource{ CreateWithoutTimeout: resourceTransitGatewayPeeringCreate, diff --git a/internal/service/networkmanager/transit_gateway_route_table_attachment.go b/internal/service/networkmanager/transit_gateway_route_table_attachment.go index 5c01914a9144..cade6876beb7 100644 --- a/internal/service/networkmanager/transit_gateway_route_table_attachment.go +++ b/internal/service/networkmanager/transit_gateway_route_table_attachment.go @@ -26,6 +26,7 @@ import ( // @SDKResource("aws_networkmanager_transit_gateway_route_table_attachment", name="Transit Gateway Route Table Attachment") // @Tags(identifierAttribute="arn") +// @Testing(tagsTest=false) func resourceTransitGatewayRouteTableAttachment() *schema.Resource { return &schema.Resource{ CreateWithoutTimeout: resourceTransitGatewayRouteTableAttachmentCreate, diff --git a/internal/service/networkmanager/vpc_attachment.go b/internal/service/networkmanager/vpc_attachment.go index 2980d8c53a79..44a960dbf656 100644 --- a/internal/service/networkmanager/vpc_attachment.go +++ b/internal/service/networkmanager/vpc_attachment.go @@ -28,6 +28,7 @@ import ( // @SDKResource("aws_networkmanager_vpc_attachment", name="VPC Attachment") // @Tags(identifierAttribute="arn") +// @Testing(tagsTest=false) func resourceVPCAttachment() *schema.Resource { return &schema.Resource{ CreateWithoutTimeout: resourceVPCAttachmentCreate, From 64415f497ee619b4f99af474c36f042ebab0a881 Mon Sep 17 00:00:00 2001 From: Graham Davison Date: Wed, 23 Jul 2025 09:18:41 -0700 Subject: [PATCH 029/365] Tunes `aws_networkmanager_core_network` deletion delay --- internal/service/networkmanager/core_network.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/service/networkmanager/core_network.go b/internal/service/networkmanager/core_network.go index a16705cfe32e..d9176b250ebf 100644 --- a/internal/service/networkmanager/core_network.go +++ b/internal/service/networkmanager/core_network.go @@ -436,7 +436,7 @@ func waitCoreNetworkDeleted(ctx context.Context, conn *networkmanager.Client, id Pending: enum.Slice(awstypes.CoreNetworkStateDeleting), Target: []string{}, Timeout: timeout, - Delay: 5 * time.Minute, + Delay: 4 * time.Minute, MinTimeout: 10 * time.Second, Refresh: statusCoreNetworkState(ctx, conn, id), } From 02c1d06699509ad6d625075653692d3a5ab978c7 Mon Sep 17 00:00:00 2001 From: Graham Davison Date: Wed, 23 Jul 2025 09:19:24 -0700 Subject: [PATCH 030/365] Adds delay for `aws_ec2_transit_gateway` deletion --- internal/service/ec2/wait.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/internal/service/ec2/wait.go b/internal/service/ec2/wait.go index ff946a0b7c86..39e1020af6bc 100644 --- a/internal/service/ec2/wait.go +++ b/internal/service/ec2/wait.go @@ -2180,6 +2180,8 @@ func waitTransitGatewayDeleted(ctx context.Context, conn *ec2.Client, id string, Target: []string{}, Refresh: statusTransitGateway(ctx, conn, id), Timeout: timeout, + Delay: 2 * time.Minute, + MinTimeout: 10 * time.Second, NotFoundChecks: 1, } From 555e633c686b95e2dd4b322f114f592b81eac631 Mon Sep 17 00:00:00 2001 From: Graham Davison Date: Wed, 23 Jul 2025 09:20:23 -0700 Subject: [PATCH 031/365] Moves `waitTransitGatewayDeleted` as it is only used in one place --- internal/service/ec2/transitgateway_.go | 21 +++++++++++++++++++++ internal/service/ec2/wait.go | 20 -------------------- 2 files changed, 21 insertions(+), 20 deletions(-) diff --git a/internal/service/ec2/transitgateway_.go b/internal/service/ec2/transitgateway_.go index b793f75b89d8..382f667b8913 100644 --- a/internal/service/ec2/transitgateway_.go +++ b/internal/service/ec2/transitgateway_.go @@ -15,6 +15,7 @@ import ( "github.com/hashicorp/aws-sdk-go-base/v2/tfawserr" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/customdiff" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation" "github.com/hashicorp/terraform-provider-aws/internal/conns" @@ -324,3 +325,23 @@ func resourceTransitGatewayDelete(ctx context.Context, d *schema.ResourceData, m return diags } + +func waitTransitGatewayDeleted(ctx context.Context, conn *ec2.Client, id string, timeout time.Duration) (*awstypes.TransitGateway, error) { + stateConf := &retry.StateChangeConf{ + Pending: enum.Slice(awstypes.TransitGatewayStateAvailable, awstypes.TransitGatewayStateDeleting), + Target: []string{}, + Refresh: statusTransitGateway(ctx, conn, id), + Timeout: timeout, + Delay: 2 * time.Minute, + MinTimeout: 10 * time.Second, + NotFoundChecks: 1, + } + + outputRaw, err := stateConf.WaitForStateContext(ctx) + + if output, ok := outputRaw.(*awstypes.TransitGateway); ok { + return output, err + } + + return nil, err +} diff --git a/internal/service/ec2/wait.go b/internal/service/ec2/wait.go index 39e1020af6bc..1c8a24f8075e 100644 --- a/internal/service/ec2/wait.go +++ b/internal/service/ec2/wait.go @@ -2174,26 +2174,6 @@ func waitTransitGatewayCreated(ctx context.Context, conn *ec2.Client, id string, return nil, err } -func waitTransitGatewayDeleted(ctx context.Context, conn *ec2.Client, id string, timeout time.Duration) (*awstypes.TransitGateway, error) { - stateConf := &retry.StateChangeConf{ - Pending: enum.Slice(awstypes.TransitGatewayStateAvailable, awstypes.TransitGatewayStateDeleting), - Target: []string{}, - Refresh: statusTransitGateway(ctx, conn, id), - Timeout: timeout, - Delay: 2 * time.Minute, - MinTimeout: 10 * time.Second, - NotFoundChecks: 1, - } - - outputRaw, err := stateConf.WaitForStateContext(ctx) - - if output, ok := outputRaw.(*awstypes.TransitGateway); ok { - return output, err - } - - return nil, err -} - func waitTransitGatewayMulticastDomainCreated(ctx context.Context, conn *ec2.Client, id string, timeout time.Duration) (*awstypes.TransitGatewayMulticastDomain, error) { stateConf := &retry.StateChangeConf{ Pending: enum.Slice(awstypes.TransitGatewayMulticastDomainStatePending), From 6aef0d2edf230054d7a096fa17b16bb4fdaf8351 Mon Sep 17 00:00:00 2001 From: Graham Davison Date: Wed, 23 Jul 2025 13:42:26 -0700 Subject: [PATCH 032/365] Tunes `aws_networkmanager_transit_gateway_peering` creation and deletion delay --- internal/service/networkmanager/transit_gateway_peering.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/internal/service/networkmanager/transit_gateway_peering.go b/internal/service/networkmanager/transit_gateway_peering.go index 464da860c717..d51d4c43d49c 100644 --- a/internal/service/networkmanager/transit_gateway_peering.go +++ b/internal/service/networkmanager/transit_gateway_peering.go @@ -224,6 +224,8 @@ func waitTransitGatewayPeeringCreated(ctx context.Context, conn *networkmanager. Pending: enum.Slice(awstypes.PeeringStateCreating), Target: enum.Slice(awstypes.PeeringStateAvailable), Timeout: timeout, + Delay: 5 * time.Minute, + MinTimeout: 10 * time.Second, Refresh: statusTransitGatewayPeeringState(ctx, conn, id), } @@ -243,6 +245,8 @@ func waitTransitGatewayPeeringDeleted(ctx context.Context, conn *networkmanager. Pending: enum.Slice(awstypes.PeeringStateDeleting), Target: []string{}, Timeout: timeout, + Delay: 3 * time.Minute, + MinTimeout: 10 * time.Second, Refresh: statusTransitGatewayPeeringState(ctx, conn, id), } From 3b1d4fadb0b13fbd71202c6f2ce49955aa36c61d Mon Sep 17 00:00:00 2001 From: Graham Davison Date: Wed, 23 Jul 2025 16:36:31 -0700 Subject: [PATCH 033/365] `aws_networkmanager_transit_gateway_peering` needs to wait for `aws_networkmanager_core_network_policy_attachment.test` to complete --- .../transit_gateway_peering_test.go | 15 ++++++++++++--- ...kmanager_transit_gateway_peering.html.markdown | 5 +++++ 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/internal/service/networkmanager/transit_gateway_peering_test.go b/internal/service/networkmanager/transit_gateway_peering_test.go index a961f3ff30ca..dcab8cc69477 100644 --- a/internal/service/networkmanager/transit_gateway_peering_test.go +++ b/internal/service/networkmanager/transit_gateway_peering_test.go @@ -248,7 +248,10 @@ resource "aws_networkmanager_transit_gateway_peering" "test" { core_network_id = aws_networkmanager_core_network.test.id transit_gateway_arn = aws_ec2_transit_gateway.test.arn - depends_on = [aws_ec2_transit_gateway_policy_table.test] + depends_on = [ + aws_ec2_transit_gateway_policy_table.test, + aws_networkmanager_core_network_policy_attachment.test, + ] } `) } @@ -263,7 +266,10 @@ resource "aws_networkmanager_transit_gateway_peering" "test" { %[1]q = %[2]q } - depends_on = [aws_ec2_transit_gateway_policy_table.test] + depends_on = [ + aws_ec2_transit_gateway_policy_table.test, + aws_networkmanager_core_network_policy_attachment.test, + ] } `, tagKey1, tagValue1)) } @@ -279,7 +285,10 @@ resource "aws_networkmanager_transit_gateway_peering" "test" { %[3]q = %[4]q } - depends_on = [aws_ec2_transit_gateway_policy_table.test] + depends_on = [ + aws_ec2_transit_gateway_policy_table.test, + aws_networkmanager_core_network_policy_attachment.test, + ] } `, tagKey1, tagValue1, tagKey2, tagValue2)) } diff --git a/website/docs/r/networkmanager_transit_gateway_peering.html.markdown b/website/docs/r/networkmanager_transit_gateway_peering.html.markdown index 455407514f67..7f65eda9818d 100644 --- a/website/docs/r/networkmanager_transit_gateway_peering.html.markdown +++ b/website/docs/r/networkmanager_transit_gateway_peering.html.markdown @@ -16,6 +16,11 @@ Manages a Network Manager transit gateway peering connection. Creates a peering resource "aws_networkmanager_transit_gateway_peering" "example" { core_network_id = awscc_networkmanager_core_network.example.id transit_gateway_arn = aws_ec2_transit_gateway.example.arn + + depends_on = [ + aws_ec2_transit_gateway_policy_table.example, + aws_networkmanager_core_network_policy_attachment.example, + ] } ``` From 9cf93826aa7bd2d6b4f555f69daef5cad2ba476c Mon Sep 17 00:00:00 2001 From: Graham Davison Date: Wed, 23 Jul 2025 16:36:57 -0700 Subject: [PATCH 034/365] Don't ignore errors --- .../networkmanager/transit_gateway_peering_test.go | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/internal/service/networkmanager/transit_gateway_peering_test.go b/internal/service/networkmanager/transit_gateway_peering_test.go index dcab8cc69477..71f87bd8708d 100644 --- a/internal/service/networkmanager/transit_gateway_peering_test.go +++ b/internal/service/networkmanager/transit_gateway_peering_test.go @@ -20,16 +20,6 @@ import ( "github.com/hashicorp/terraform-provider-aws/names" ) -func init() { - acctest.RegisterServiceErrorCheckFunc(names.NetworkManagerServiceID, testAccErrorCheckSkip) -} - -func testAccErrorCheckSkip(t *testing.T) resource.ErrorCheckFunc { - return acctest.ErrorCheckSkipMessagesMatches(t, - regexache.MustCompile(`Core Network edge location \([0-9a-z-]+\) not available`), - ) -} - func TestAccNetworkManagerTransitGatewayPeering_basic(t *testing.T) { ctx := acctest.Context(t) var v awstypes.TransitGatewayPeering From 5bad82a7d3df955ddb0cf37991b644b6bf9c075c Mon Sep 17 00:00:00 2001 From: Graham Davison Date: Wed, 23 Jul 2025 16:37:57 -0700 Subject: [PATCH 035/365] `networkmanager` is missing required `ListTags` --- internal/service/networkmanager/generate.go | 2 +- internal/service/networkmanager/tags_gen.go | 33 +++++++++++++++++++++ 2 files changed, 34 insertions(+), 1 deletion(-) diff --git a/internal/service/networkmanager/generate.go b/internal/service/networkmanager/generate.go index 529094e28462..4368928626e7 100644 --- a/internal/service/networkmanager/generate.go +++ b/internal/service/networkmanager/generate.go @@ -1,7 +1,7 @@ // Copyright (c) HashiCorp, Inc. // SPDX-License-Identifier: MPL-2.0 -//go:generate go run ../../generate/tags/main.go -ServiceTagsSlice -UpdateTags +//go:generate go run ../../generate/tags/main.go -ServiceTagsSlice -UpdateTags -ListTags -ListTagsOutTagsElem=TagList //go:generate go run ../../generate/servicepackage/main.go //go:generate go run ../../generate/tagstests/main.go // ONLY generate directives and package declaration! Do not add anything else to this file. diff --git a/internal/service/networkmanager/tags_gen.go b/internal/service/networkmanager/tags_gen.go index 16fba94dbbd7..6b0635d2e1e5 100644 --- a/internal/service/networkmanager/tags_gen.go +++ b/internal/service/networkmanager/tags_gen.go @@ -16,6 +16,39 @@ import ( "github.com/hashicorp/terraform-provider-aws/names" ) +// listTags lists networkmanager service tags. +// The identifier is typically the Amazon Resource Name (ARN), although +// it may also be a different identifier depending on the service. +func listTags(ctx context.Context, conn *networkmanager.Client, identifier string, optFns ...func(*networkmanager.Options)) (tftags.KeyValueTags, error) { + input := networkmanager.ListTagsForResourceInput{ + ResourceArn: aws.String(identifier), + } + + output, err := conn.ListTagsForResource(ctx, &input, optFns...) + + if err != nil { + return tftags.New(ctx, nil), smarterr.NewError(err) + } + + return keyValueTags(ctx, output.TagList), nil +} + +// ListTags lists networkmanager service tags and set them in Context. +// It is called from outside this package. +func (p *servicePackage) ListTags(ctx context.Context, meta any, identifier string) error { + tags, err := listTags(ctx, meta.(*conns.AWSClient).NetworkManagerClient(ctx), identifier) + + if err != nil { + return smarterr.NewError(err) + } + + if inContext, ok := tftags.FromContext(ctx); ok { + inContext.TagsOut = option.Some(tags) + } + + return nil +} + // []*SERVICE.Tag handling // svcTags returns networkmanager service tags. From aa28e8004b091ad1ec14de0a1a820951f707e36a Mon Sep 17 00:00:00 2001 From: Graham Davison Date: Wed, 23 Jul 2025 16:39:07 -0700 Subject: [PATCH 036/365] Generates tagging tests for `aws_networkmanager_transit_gateway_peering` --- .../service/networkmanager/tags_gen_test.go | 16 + .../TransitGatewayPeering/tags/main_gen.tf | 63 + .../tagsComputed1/main_gen.tf | 67 + .../tagsComputed2/main_gen.tf | 78 + .../tags_defaults/main_gen.tf | 74 + .../tags_ignore/main_gen.tf | 83 + .../tmpl/transit_gateway_peering_tags.gtpl | 46 + .../networkmanager/transit_gateway_peering.go | 21 +- .../transit_gateway_peering_tags_gen_test.go | 2282 +++++++++++++++++ .../transit_gateway_peering_test.go | 83 - 10 files changed, 2719 insertions(+), 94 deletions(-) create mode 100644 internal/service/networkmanager/tags_gen_test.go create mode 100644 internal/service/networkmanager/testdata/TransitGatewayPeering/tags/main_gen.tf create mode 100644 internal/service/networkmanager/testdata/TransitGatewayPeering/tagsComputed1/main_gen.tf create mode 100644 internal/service/networkmanager/testdata/TransitGatewayPeering/tagsComputed2/main_gen.tf create mode 100644 internal/service/networkmanager/testdata/TransitGatewayPeering/tags_defaults/main_gen.tf create mode 100644 internal/service/networkmanager/testdata/TransitGatewayPeering/tags_ignore/main_gen.tf create mode 100644 internal/service/networkmanager/testdata/tmpl/transit_gateway_peering_tags.gtpl create mode 100644 internal/service/networkmanager/transit_gateway_peering_tags_gen_test.go diff --git a/internal/service/networkmanager/tags_gen_test.go b/internal/service/networkmanager/tags_gen_test.go new file mode 100644 index 000000000000..f5bf544328f9 --- /dev/null +++ b/internal/service/networkmanager/tags_gen_test.go @@ -0,0 +1,16 @@ +// Code generated by internal/generate/tagstests/main.go; DO NOT EDIT. + +package networkmanager_test + +import ( + "context" + + "github.com/hashicorp/terraform-plugin-testing/knownvalue" + "github.com/hashicorp/terraform-plugin-testing/statecheck" + tfstatecheck "github.com/hashicorp/terraform-provider-aws/internal/acctest/statecheck" + tfnetworkmanager "github.com/hashicorp/terraform-provider-aws/internal/service/networkmanager" +) + +func expectFullResourceTags(ctx context.Context, resourceAddress string, knownValue knownvalue.Check) statecheck.StateCheck { + return tfstatecheck.ExpectFullResourceTags(tfnetworkmanager.ServicePackage(ctx), resourceAddress, knownValue) +} diff --git a/internal/service/networkmanager/testdata/TransitGatewayPeering/tags/main_gen.tf b/internal/service/networkmanager/testdata/TransitGatewayPeering/tags/main_gen.tf new file mode 100644 index 000000000000..2e2567c1e776 --- /dev/null +++ b/internal/service/networkmanager/testdata/TransitGatewayPeering/tags/main_gen.tf @@ -0,0 +1,63 @@ +# Copyright (c) HashiCorp, Inc. +# SPDX-License-Identifier: MPL-2.0 + +resource "aws_networkmanager_transit_gateway_peering" "test" { + core_network_id = aws_networkmanager_core_network.test.id + transit_gateway_arn = aws_ec2_transit_gateway.test.arn + + depends_on = [ + aws_ec2_transit_gateway_policy_table.test, + aws_networkmanager_core_network_policy_attachment.test, + ] + + tags = var.resource_tags +} + +# testAccTransitGatewayPeeringConfig_base + +data "aws_region" "current" {} + +resource "aws_ec2_transit_gateway" "test" {} + +resource "aws_ec2_transit_gateway_policy_table" "test" { + transit_gateway_id = aws_ec2_transit_gateway.test.id +} + +resource "aws_networkmanager_global_network" "test" {} + +resource "aws_networkmanager_core_network" "test" { + global_network_id = aws_networkmanager_global_network.test.id +} + +resource "aws_networkmanager_core_network_policy_attachment" "test" { + core_network_id = aws_networkmanager_core_network.test.id + policy_document = data.aws_networkmanager_core_network_policy_document.test.json +} + +data "aws_networkmanager_core_network_policy_document" "test" { + core_network_configuration { + # Don't overlap with default TGW ASN: 64512. + asn_ranges = ["65022-65534"] + + edge_locations { + location = data.aws_region.current.region + } + } + + segments { + name = "test" + } +} + +variable "rName" { + description = "Name for resource" + type = string + nullable = false +} + +variable "resource_tags" { + description = "Tags to set on resource. To specify no tags, set to `null`" + # Not setting a default, so that this must explicitly be set to `null` to specify no tags + type = map(string) + nullable = true +} diff --git a/internal/service/networkmanager/testdata/TransitGatewayPeering/tagsComputed1/main_gen.tf b/internal/service/networkmanager/testdata/TransitGatewayPeering/tagsComputed1/main_gen.tf new file mode 100644 index 000000000000..5471c3177ecb --- /dev/null +++ b/internal/service/networkmanager/testdata/TransitGatewayPeering/tagsComputed1/main_gen.tf @@ -0,0 +1,67 @@ +# Copyright (c) HashiCorp, Inc. +# SPDX-License-Identifier: MPL-2.0 + +provider "null" {} + +resource "aws_networkmanager_transit_gateway_peering" "test" { + core_network_id = aws_networkmanager_core_network.test.id + transit_gateway_arn = aws_ec2_transit_gateway.test.arn + + depends_on = [ + aws_ec2_transit_gateway_policy_table.test, + aws_networkmanager_core_network_policy_attachment.test, + ] + + tags = { + (var.unknownTagKey) = null_resource.test.id + } +} + +# testAccTransitGatewayPeeringConfig_base + +data "aws_region" "current" {} + +resource "aws_ec2_transit_gateway" "test" {} + +resource "aws_ec2_transit_gateway_policy_table" "test" { + transit_gateway_id = aws_ec2_transit_gateway.test.id +} + +resource "aws_networkmanager_global_network" "test" {} + +resource "aws_networkmanager_core_network" "test" { + global_network_id = aws_networkmanager_global_network.test.id +} + +resource "aws_networkmanager_core_network_policy_attachment" "test" { + core_network_id = aws_networkmanager_core_network.test.id + policy_document = data.aws_networkmanager_core_network_policy_document.test.json +} + +data "aws_networkmanager_core_network_policy_document" "test" { + core_network_configuration { + # Don't overlap with default TGW ASN: 64512. + asn_ranges = ["65022-65534"] + + edge_locations { + location = data.aws_region.current.region + } + } + + segments { + name = "test" + } +} + +resource "null_resource" "test" {} + +variable "rName" { + description = "Name for resource" + type = string + nullable = false +} + +variable "unknownTagKey" { + type = string + nullable = false +} diff --git a/internal/service/networkmanager/testdata/TransitGatewayPeering/tagsComputed2/main_gen.tf b/internal/service/networkmanager/testdata/TransitGatewayPeering/tagsComputed2/main_gen.tf new file mode 100644 index 000000000000..b4c726df05bb --- /dev/null +++ b/internal/service/networkmanager/testdata/TransitGatewayPeering/tagsComputed2/main_gen.tf @@ -0,0 +1,78 @@ +# Copyright (c) HashiCorp, Inc. +# SPDX-License-Identifier: MPL-2.0 + +provider "null" {} + +resource "aws_networkmanager_transit_gateway_peering" "test" { + core_network_id = aws_networkmanager_core_network.test.id + transit_gateway_arn = aws_ec2_transit_gateway.test.arn + + depends_on = [ + aws_ec2_transit_gateway_policy_table.test, + aws_networkmanager_core_network_policy_attachment.test, + ] + + tags = { + (var.unknownTagKey) = null_resource.test.id + (var.knownTagKey) = var.knownTagValue + } +} + +# testAccTransitGatewayPeeringConfig_base + +data "aws_region" "current" {} + +resource "aws_ec2_transit_gateway" "test" {} + +resource "aws_ec2_transit_gateway_policy_table" "test" { + transit_gateway_id = aws_ec2_transit_gateway.test.id +} + +resource "aws_networkmanager_global_network" "test" {} + +resource "aws_networkmanager_core_network" "test" { + global_network_id = aws_networkmanager_global_network.test.id +} + +resource "aws_networkmanager_core_network_policy_attachment" "test" { + core_network_id = aws_networkmanager_core_network.test.id + policy_document = data.aws_networkmanager_core_network_policy_document.test.json +} + +data "aws_networkmanager_core_network_policy_document" "test" { + core_network_configuration { + # Don't overlap with default TGW ASN: 64512. + asn_ranges = ["65022-65534"] + + edge_locations { + location = data.aws_region.current.region + } + } + + segments { + name = "test" + } +} + +resource "null_resource" "test" {} + +variable "rName" { + description = "Name for resource" + type = string + nullable = false +} + +variable "unknownTagKey" { + type = string + nullable = false +} + +variable "knownTagKey" { + type = string + nullable = false +} + +variable "knownTagValue" { + type = string + nullable = false +} diff --git a/internal/service/networkmanager/testdata/TransitGatewayPeering/tags_defaults/main_gen.tf b/internal/service/networkmanager/testdata/TransitGatewayPeering/tags_defaults/main_gen.tf new file mode 100644 index 000000000000..b9ea413f5672 --- /dev/null +++ b/internal/service/networkmanager/testdata/TransitGatewayPeering/tags_defaults/main_gen.tf @@ -0,0 +1,74 @@ +# Copyright (c) HashiCorp, Inc. +# SPDX-License-Identifier: MPL-2.0 + +provider "aws" { + default_tags { + tags = var.provider_tags + } +} + +resource "aws_networkmanager_transit_gateway_peering" "test" { + core_network_id = aws_networkmanager_core_network.test.id + transit_gateway_arn = aws_ec2_transit_gateway.test.arn + + depends_on = [ + aws_ec2_transit_gateway_policy_table.test, + aws_networkmanager_core_network_policy_attachment.test, + ] + + tags = var.resource_tags +} + +# testAccTransitGatewayPeeringConfig_base + +data "aws_region" "current" {} + +resource "aws_ec2_transit_gateway" "test" {} + +resource "aws_ec2_transit_gateway_policy_table" "test" { + transit_gateway_id = aws_ec2_transit_gateway.test.id +} + +resource "aws_networkmanager_global_network" "test" {} + +resource "aws_networkmanager_core_network" "test" { + global_network_id = aws_networkmanager_global_network.test.id +} + +resource "aws_networkmanager_core_network_policy_attachment" "test" { + core_network_id = aws_networkmanager_core_network.test.id + policy_document = data.aws_networkmanager_core_network_policy_document.test.json +} + +data "aws_networkmanager_core_network_policy_document" "test" { + core_network_configuration { + # Don't overlap with default TGW ASN: 64512. + asn_ranges = ["65022-65534"] + + edge_locations { + location = data.aws_region.current.region + } + } + + segments { + name = "test" + } +} + +variable "rName" { + description = "Name for resource" + type = string + nullable = false +} + +variable "resource_tags" { + description = "Tags to set on resource. To specify no tags, set to `null`" + # Not setting a default, so that this must explicitly be set to `null` to specify no tags + type = map(string) + nullable = true +} + +variable "provider_tags" { + type = map(string) + nullable = false +} diff --git a/internal/service/networkmanager/testdata/TransitGatewayPeering/tags_ignore/main_gen.tf b/internal/service/networkmanager/testdata/TransitGatewayPeering/tags_ignore/main_gen.tf new file mode 100644 index 000000000000..f2846fc4fd8e --- /dev/null +++ b/internal/service/networkmanager/testdata/TransitGatewayPeering/tags_ignore/main_gen.tf @@ -0,0 +1,83 @@ +# Copyright (c) HashiCorp, Inc. +# SPDX-License-Identifier: MPL-2.0 + +provider "aws" { + default_tags { + tags = var.provider_tags + } + ignore_tags { + keys = var.ignore_tag_keys + } +} + +resource "aws_networkmanager_transit_gateway_peering" "test" { + core_network_id = aws_networkmanager_core_network.test.id + transit_gateway_arn = aws_ec2_transit_gateway.test.arn + + depends_on = [ + aws_ec2_transit_gateway_policy_table.test, + aws_networkmanager_core_network_policy_attachment.test, + ] + + tags = var.resource_tags +} + +# testAccTransitGatewayPeeringConfig_base + +data "aws_region" "current" {} + +resource "aws_ec2_transit_gateway" "test" {} + +resource "aws_ec2_transit_gateway_policy_table" "test" { + transit_gateway_id = aws_ec2_transit_gateway.test.id +} + +resource "aws_networkmanager_global_network" "test" {} + +resource "aws_networkmanager_core_network" "test" { + global_network_id = aws_networkmanager_global_network.test.id +} + +resource "aws_networkmanager_core_network_policy_attachment" "test" { + core_network_id = aws_networkmanager_core_network.test.id + policy_document = data.aws_networkmanager_core_network_policy_document.test.json +} + +data "aws_networkmanager_core_network_policy_document" "test" { + core_network_configuration { + # Don't overlap with default TGW ASN: 64512. + asn_ranges = ["65022-65534"] + + edge_locations { + location = data.aws_region.current.region + } + } + + segments { + name = "test" + } +} + +variable "rName" { + description = "Name for resource" + type = string + nullable = false +} + +variable "resource_tags" { + description = "Tags to set on resource. To specify no tags, set to `null`" + # Not setting a default, so that this must explicitly be set to `null` to specify no tags + type = map(string) + nullable = true +} + +variable "provider_tags" { + type = map(string) + nullable = true + default = null +} + +variable "ignore_tag_keys" { + type = set(string) + nullable = false +} diff --git a/internal/service/networkmanager/testdata/tmpl/transit_gateway_peering_tags.gtpl b/internal/service/networkmanager/testdata/tmpl/transit_gateway_peering_tags.gtpl new file mode 100644 index 000000000000..47832776016b --- /dev/null +++ b/internal/service/networkmanager/testdata/tmpl/transit_gateway_peering_tags.gtpl @@ -0,0 +1,46 @@ +resource "aws_networkmanager_transit_gateway_peering" "test" { + core_network_id = aws_networkmanager_core_network.test.id + transit_gateway_arn = aws_ec2_transit_gateway.test.arn + + depends_on = [ + aws_ec2_transit_gateway_policy_table.test, + aws_networkmanager_core_network_policy_attachment.test, + ] +{{- template "tags" . }} +} + +# testAccTransitGatewayPeeringConfig_base + +data "aws_region" "current" {} + +resource "aws_ec2_transit_gateway" "test" {} + +resource "aws_ec2_transit_gateway_policy_table" "test" { + transit_gateway_id = aws_ec2_transit_gateway.test.id +} + +resource "aws_networkmanager_global_network" "test" {} + +resource "aws_networkmanager_core_network" "test" { + global_network_id = aws_networkmanager_global_network.test.id +} + +resource "aws_networkmanager_core_network_policy_attachment" "test" { + core_network_id = aws_networkmanager_core_network.test.id + policy_document = data.aws_networkmanager_core_network_policy_document.test.json +} + +data "aws_networkmanager_core_network_policy_document" "test" { + core_network_configuration { + # Don't overlap with default TGW ASN: 64512. + asn_ranges = ["65022-65534"] + + edge_locations { + location = data.aws_region.current.region + } + } + + segments { + name = "test" + } +} diff --git a/internal/service/networkmanager/transit_gateway_peering.go b/internal/service/networkmanager/transit_gateway_peering.go index d51d4c43d49c..9dcadb5488ff 100644 --- a/internal/service/networkmanager/transit_gateway_peering.go +++ b/internal/service/networkmanager/transit_gateway_peering.go @@ -26,7 +26,8 @@ import ( // @SDKResource("aws_networkmanager_transit_gateway_peering", name="Transit Gateway Peering") // @Tags(identifierAttribute="arn") -// @Testing(tagsTest=false) +// @Testing(existsType="github.com/aws/aws-sdk-go-v2/service/networkmanager/types;awstypes;awstypes.TransitGatewayPeering") +// @Testing(skipEmptyTags=true) func resourceTransitGatewayPeering() *schema.Resource { return &schema.Resource{ CreateWithoutTimeout: resourceTransitGatewayPeeringCreate, @@ -101,7 +102,6 @@ func resourceTransitGatewayPeeringCreate(ctx context.Context, d *schema.Resource TransitGatewayArn: aws.String(transitGatewayARN), } - log.Printf("[DEBUG] Creating Network Manager Transit Gateway Peering: %#v", input) output, err := conn.CreateTransitGatewayPeering(ctx, input) if err != nil { @@ -158,7 +158,6 @@ func resourceTransitGatewayPeeringDelete(ctx context.Context, d *schema.Resource var diags diag.Diagnostics conn := meta.(*conns.AWSClient).NetworkManagerClient(ctx) - log.Printf("[DEBUG] Deleting Network Manager Transit Gateway Peering: %s", d.Id()) _, err := conn.DeletePeering(ctx, &networkmanager.DeletePeeringInput{ PeeringId: aws.String(d.Id()), }) @@ -221,12 +220,12 @@ func statusTransitGatewayPeeringState(ctx context.Context, conn *networkmanager. func waitTransitGatewayPeeringCreated(ctx context.Context, conn *networkmanager.Client, id string, timeout time.Duration) (*awstypes.TransitGatewayPeering, error) { stateConf := &retry.StateChangeConf{ - Pending: enum.Slice(awstypes.PeeringStateCreating), - Target: enum.Slice(awstypes.PeeringStateAvailable), - Timeout: timeout, + Pending: enum.Slice(awstypes.PeeringStateCreating), + Target: enum.Slice(awstypes.PeeringStateAvailable), + Timeout: timeout, Delay: 5 * time.Minute, MinTimeout: 10 * time.Second, - Refresh: statusTransitGatewayPeeringState(ctx, conn, id), + Refresh: statusTransitGatewayPeeringState(ctx, conn, id), } outputRaw, err := stateConf.WaitForStateContext(ctx) @@ -242,12 +241,12 @@ func waitTransitGatewayPeeringCreated(ctx context.Context, conn *networkmanager. func waitTransitGatewayPeeringDeleted(ctx context.Context, conn *networkmanager.Client, id string, timeout time.Duration) (*awstypes.TransitGatewayPeering, error) { stateConf := &retry.StateChangeConf{ - Pending: enum.Slice(awstypes.PeeringStateDeleting), - Target: []string{}, - Timeout: timeout, + Pending: enum.Slice(awstypes.PeeringStateDeleting), + Target: []string{}, + Timeout: timeout, Delay: 3 * time.Minute, MinTimeout: 10 * time.Second, - Refresh: statusTransitGatewayPeeringState(ctx, conn, id), + Refresh: statusTransitGatewayPeeringState(ctx, conn, id), } outputRaw, err := stateConf.WaitForStateContext(ctx) diff --git a/internal/service/networkmanager/transit_gateway_peering_tags_gen_test.go b/internal/service/networkmanager/transit_gateway_peering_tags_gen_test.go new file mode 100644 index 000000000000..c3f07858f1fa --- /dev/null +++ b/internal/service/networkmanager/transit_gateway_peering_tags_gen_test.go @@ -0,0 +1,2282 @@ +// Code generated by internal/generate/tagstests/main.go; DO NOT EDIT. + +package networkmanager_test + +import ( + "testing" + + awstypes "github.com/aws/aws-sdk-go-v2/service/networkmanager/types" + "github.com/hashicorp/terraform-plugin-testing/config" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/knownvalue" + "github.com/hashicorp/terraform-plugin-testing/plancheck" + "github.com/hashicorp/terraform-plugin-testing/statecheck" + "github.com/hashicorp/terraform-plugin-testing/tfjsonpath" + "github.com/hashicorp/terraform-provider-aws/internal/acctest" + "github.com/hashicorp/terraform-provider-aws/names" +) + +func TestAccNetworkManagerTransitGatewayPeering_tags(t *testing.T) { + ctx := acctest.Context(t) + var v awstypes.TransitGatewayPeering + resourceName := "aws_networkmanager_transit_gateway_peering.test" + rName := acctest.RandomWithPrefix(t, acctest.ResourcePrefix) + + acctest.ParallelTest(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckTransitGatewayPeeringDestroy(ctx), + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + Steps: []resource.TestStep{ + { + ConfigDirectory: config.StaticDirectory("testdata/TransitGatewayPeering/tags/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckTransitGatewayPeeringExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + }, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/TransitGatewayPeering/tags/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/TransitGatewayPeering/tags/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1Updated), + acctest.CtKey2: config.StringVariable(acctest.CtValue2), + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckTransitGatewayPeeringExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1Updated), + acctest.CtKey2: knownvalue.StringExact(acctest.CtValue2), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1Updated), + acctest.CtKey2: knownvalue.StringExact(acctest.CtValue2), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1Updated), + acctest.CtKey2: knownvalue.StringExact(acctest.CtValue2), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1Updated), + acctest.CtKey2: knownvalue.StringExact(acctest.CtValue2), + })), + }, + }, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/TransitGatewayPeering/tags/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1Updated), + acctest.CtKey2: config.StringVariable(acctest.CtValue2), + }), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/TransitGatewayPeering/tags/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey2: config.StringVariable(acctest.CtValue2), + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckTransitGatewayPeeringExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey2: knownvalue.StringExact(acctest.CtValue2), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey2: knownvalue.StringExact(acctest.CtValue2), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey2: knownvalue.StringExact(acctest.CtValue2), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey2: knownvalue.StringExact(acctest.CtValue2), + })), + }, + }, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/TransitGatewayPeering/tags/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey2: config.StringVariable(acctest.CtValue2), + }), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/TransitGatewayPeering/tags/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtResourceTags: nil, + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckTransitGatewayPeeringExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{})), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{})), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{})), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{})), + }, + }, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/TransitGatewayPeering/tags/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtResourceTags: nil, + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} + +func TestAccNetworkManagerTransitGatewayPeering_tags_null(t *testing.T) { + ctx := acctest.Context(t) + var v awstypes.TransitGatewayPeering + resourceName := "aws_networkmanager_transit_gateway_peering.test" + rName := acctest.RandomWithPrefix(t, acctest.ResourcePrefix) + + acctest.ParallelTest(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckTransitGatewayPeeringDestroy(ctx), + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + Steps: []resource.TestStep{ + { + ConfigDirectory: config.StaticDirectory("testdata/TransitGatewayPeering/tags/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: nil, + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckTransitGatewayPeeringExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.Null()), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{})), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.Null()), + // TODO: Should be known + plancheck.ExpectUnknownValue(resourceName, tfjsonpath.New(names.AttrTagsAll)), + }, + }, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/TransitGatewayPeering/tags/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: nil, + }), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/TransitGatewayPeering/tags/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtResourceTags: nil, + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionNoop), + }, + PostApplyPostRefresh: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionNoop), + }, + }, + }, + }, + }) +} + +func TestAccNetworkManagerTransitGatewayPeering_tags_EmptyMap(t *testing.T) { + ctx := acctest.Context(t) + var v awstypes.TransitGatewayPeering + resourceName := "aws_networkmanager_transit_gateway_peering.test" + rName := acctest.RandomWithPrefix(t, acctest.ResourcePrefix) + + acctest.ParallelTest(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckTransitGatewayPeeringDestroy(ctx), + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + Steps: []resource.TestStep{ + { + ConfigDirectory: config.StaticDirectory("testdata/TransitGatewayPeering/tags/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{}), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckTransitGatewayPeeringExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.Null()), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{})), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.Null()), + // TODO: Should be known + plancheck.ExpectUnknownValue(resourceName, tfjsonpath.New(names.AttrTagsAll)), + }, + }, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/TransitGatewayPeering/tags/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{}), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/TransitGatewayPeering/tags/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtResourceTags: nil, + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionNoop), + }, + PostApplyPostRefresh: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionNoop), + }, + }, + }, + }, + }) +} + +func TestAccNetworkManagerTransitGatewayPeering_tags_AddOnUpdate(t *testing.T) { + ctx := acctest.Context(t) + var v awstypes.TransitGatewayPeering + resourceName := "aws_networkmanager_transit_gateway_peering.test" + rName := acctest.RandomWithPrefix(t, acctest.ResourcePrefix) + + acctest.ParallelTest(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckTransitGatewayPeeringDestroy(ctx), + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + Steps: []resource.TestStep{ + { + ConfigDirectory: config.StaticDirectory("testdata/TransitGatewayPeering/tags/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtResourceTags: nil, + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckTransitGatewayPeeringExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.Null()), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{})), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.Null()), + // TODO: Should be known + plancheck.ExpectUnknownValue(resourceName, tfjsonpath.New(names.AttrTagsAll)), + }, + }, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/TransitGatewayPeering/tags/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckTransitGatewayPeeringExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + }, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/TransitGatewayPeering/tags/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} + +func TestAccNetworkManagerTransitGatewayPeering_tags_EmptyTag_OnCreate(t *testing.T) { + t.Skip("Resource TransitGatewayPeering does not support empty tags") + + ctx := acctest.Context(t) + var v awstypes.TransitGatewayPeering + resourceName := "aws_networkmanager_transit_gateway_peering.test" + rName := acctest.RandomWithPrefix(t, acctest.ResourcePrefix) + + acctest.ParallelTest(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckTransitGatewayPeeringDestroy(ctx), + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + Steps: []resource.TestStep{ + { + ConfigDirectory: config.StaticDirectory("testdata/TransitGatewayPeering/tags/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(""), + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckTransitGatewayPeeringExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(""), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(""), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(""), + })), + // TODO: Should be known + plancheck.ExpectUnknownValue(resourceName, tfjsonpath.New(names.AttrTagsAll)), + }, + }, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/TransitGatewayPeering/tags/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(""), + }), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/TransitGatewayPeering/tags/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtResourceTags: nil, + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckTransitGatewayPeeringExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{})), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{})), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{})), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{})), + }, + }, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/TransitGatewayPeering/tags/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtResourceTags: nil, + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} + +func TestAccNetworkManagerTransitGatewayPeering_tags_EmptyTag_OnUpdate_Add(t *testing.T) { + t.Skip("Resource TransitGatewayPeering does not support empty tags") + + ctx := acctest.Context(t) + var v awstypes.TransitGatewayPeering + resourceName := "aws_networkmanager_transit_gateway_peering.test" + rName := acctest.RandomWithPrefix(t, acctest.ResourcePrefix) + + acctest.ParallelTest(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckTransitGatewayPeeringDestroy(ctx), + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + Steps: []resource.TestStep{ + { + ConfigDirectory: config.StaticDirectory("testdata/TransitGatewayPeering/tags/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckTransitGatewayPeeringExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + }, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/TransitGatewayPeering/tags/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + acctest.CtKey2: config.StringVariable(""), + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckTransitGatewayPeeringExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + acctest.CtKey2: knownvalue.StringExact(""), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + acctest.CtKey2: knownvalue.StringExact(""), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + acctest.CtKey2: knownvalue.StringExact(""), + })), + // TODO: Should be known + plancheck.ExpectUnknownValue(resourceName, tfjsonpath.New(names.AttrTagsAll)), + }, + }, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/TransitGatewayPeering/tags/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + acctest.CtKey2: config.StringVariable(""), + }), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/TransitGatewayPeering/tags/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckTransitGatewayPeeringExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + }, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/TransitGatewayPeering/tags/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} + +func TestAccNetworkManagerTransitGatewayPeering_tags_EmptyTag_OnUpdate_Replace(t *testing.T) { + t.Skip("Resource TransitGatewayPeering does not support empty tags") + + ctx := acctest.Context(t) + var v awstypes.TransitGatewayPeering + resourceName := "aws_networkmanager_transit_gateway_peering.test" + rName := acctest.RandomWithPrefix(t, acctest.ResourcePrefix) + + acctest.ParallelTest(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckTransitGatewayPeeringDestroy(ctx), + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + Steps: []resource.TestStep{ + { + ConfigDirectory: config.StaticDirectory("testdata/TransitGatewayPeering/tags/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckTransitGatewayPeeringExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + }, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/TransitGatewayPeering/tags/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(""), + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckTransitGatewayPeeringExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(""), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(""), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(""), + })), + // TODO: Should be known + plancheck.ExpectUnknownValue(resourceName, tfjsonpath.New(names.AttrTagsAll)), + }, + }, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/TransitGatewayPeering/tags/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(""), + }), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} + +func TestAccNetworkManagerTransitGatewayPeering_tags_DefaultTags_providerOnly(t *testing.T) { + ctx := acctest.Context(t) + var v awstypes.TransitGatewayPeering + resourceName := "aws_networkmanager_transit_gateway_peering.test" + rName := acctest.RandomWithPrefix(t, acctest.ResourcePrefix) + + acctest.ParallelTest(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckTransitGatewayPeeringDestroy(ctx), + Steps: []resource.TestStep{ + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/TransitGatewayPeering/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + acctest.CtResourceTags: nil, + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckTransitGatewayPeeringExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.Null()), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.Null()), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/TransitGatewayPeering/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + acctest.CtResourceTags: nil, + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/TransitGatewayPeering/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1Updated), + acctest.CtKey2: config.StringVariable(acctest.CtValue2), + }), + acctest.CtResourceTags: nil, + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckTransitGatewayPeeringExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{})), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1Updated), + acctest.CtKey2: knownvalue.StringExact(acctest.CtValue2), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{})), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1Updated), + acctest.CtKey2: knownvalue.StringExact(acctest.CtValue2), + })), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/TransitGatewayPeering/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1Updated), + acctest.CtKey2: config.StringVariable(acctest.CtValue2), + }), + acctest.CtResourceTags: nil, + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/TransitGatewayPeering/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey2: config.StringVariable(acctest.CtValue2), + }), + acctest.CtResourceTags: nil, + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckTransitGatewayPeeringExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{})), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey2: knownvalue.StringExact(acctest.CtValue2), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{})), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey2: knownvalue.StringExact(acctest.CtValue2), + })), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/TransitGatewayPeering/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey2: config.StringVariable(acctest.CtValue2), + }), + acctest.CtResourceTags: nil, + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/TransitGatewayPeering/tags/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtResourceTags: nil, + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckTransitGatewayPeeringExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{})), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{})), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{})), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{})), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/TransitGatewayPeering/tags/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtResourceTags: nil, + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} + +func TestAccNetworkManagerTransitGatewayPeering_tags_DefaultTags_nonOverlapping(t *testing.T) { + ctx := acctest.Context(t) + var v awstypes.TransitGatewayPeering + resourceName := "aws_networkmanager_transit_gateway_peering.test" + rName := acctest.RandomWithPrefix(t, acctest.ResourcePrefix) + + acctest.ParallelTest(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckTransitGatewayPeeringDestroy(ctx), + Steps: []resource.TestStep{ + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/TransitGatewayPeering/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtProviderKey1: config.StringVariable(acctest.CtProviderValue1), + }), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtResourceKey1: config.StringVariable(acctest.CtResourceValue1), + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckTransitGatewayPeeringExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtProviderKey1: knownvalue.StringExact(acctest.CtProviderValue1), + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtProviderKey1: knownvalue.StringExact(acctest.CtProviderValue1), + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), + })), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/TransitGatewayPeering/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtProviderKey1: config.StringVariable(acctest.CtProviderValue1), + }), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtResourceKey1: config.StringVariable(acctest.CtResourceValue1), + }), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/TransitGatewayPeering/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtProviderKey1: config.StringVariable(acctest.CtProviderValue1Updated), + }), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtResourceKey1: config.StringVariable(acctest.CtResourceValue1Updated), + acctest.CtResourceKey2: config.StringVariable(acctest.CtResourceValue2), + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckTransitGatewayPeeringExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1Updated), + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtProviderKey1: knownvalue.StringExact(acctest.CtProviderValue1Updated), + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1Updated), + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1Updated), + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtProviderKey1: knownvalue.StringExact(acctest.CtProviderValue1Updated), + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1Updated), + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/TransitGatewayPeering/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtProviderKey1: config.StringVariable(acctest.CtProviderValue1Updated), + }), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtResourceKey1: config.StringVariable(acctest.CtResourceValue1Updated), + acctest.CtResourceKey2: config.StringVariable(acctest.CtResourceValue2), + }), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/TransitGatewayPeering/tags/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtResourceTags: nil, + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckTransitGatewayPeeringExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{})), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{})), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{})), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{})), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/TransitGatewayPeering/tags/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtResourceTags: nil, + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} + +func TestAccNetworkManagerTransitGatewayPeering_tags_DefaultTags_overlapping(t *testing.T) { + ctx := acctest.Context(t) + var v awstypes.TransitGatewayPeering + resourceName := "aws_networkmanager_transit_gateway_peering.test" + rName := acctest.RandomWithPrefix(t, acctest.ResourcePrefix) + + acctest.ParallelTest(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckTransitGatewayPeeringDestroy(ctx), + Steps: []resource.TestStep{ + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/TransitGatewayPeering/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtOverlapKey1: config.StringVariable(acctest.CtProviderValue1), + }), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtOverlapKey1: config.StringVariable(acctest.CtResourceValue1), + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckTransitGatewayPeeringExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtOverlapKey1: knownvalue.StringExact(acctest.CtResourceValue1), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtOverlapKey1: knownvalue.StringExact(acctest.CtResourceValue1), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtOverlapKey1: knownvalue.StringExact(acctest.CtResourceValue1), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtOverlapKey1: knownvalue.StringExact(acctest.CtResourceValue1), + })), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/TransitGatewayPeering/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtOverlapKey1: config.StringVariable(acctest.CtProviderValue1), + }), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtOverlapKey1: config.StringVariable(acctest.CtResourceValue1), + }), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/TransitGatewayPeering/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtOverlapKey1: config.StringVariable(acctest.CtProviderValue1), + acctest.CtOverlapKey2: config.StringVariable("providervalue2"), + }), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtOverlapKey1: config.StringVariable(acctest.CtResourceValue1), + acctest.CtOverlapKey2: config.StringVariable(acctest.CtResourceValue2), + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckTransitGatewayPeeringExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtOverlapKey1: knownvalue.StringExact(acctest.CtResourceValue1), + acctest.CtOverlapKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtOverlapKey1: knownvalue.StringExact(acctest.CtResourceValue1), + acctest.CtOverlapKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtOverlapKey1: knownvalue.StringExact(acctest.CtResourceValue1), + acctest.CtOverlapKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtOverlapKey1: knownvalue.StringExact(acctest.CtResourceValue1), + acctest.CtOverlapKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/TransitGatewayPeering/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtOverlapKey1: config.StringVariable(acctest.CtProviderValue1), + acctest.CtOverlapKey2: config.StringVariable("providervalue2"), + }), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtOverlapKey1: config.StringVariable(acctest.CtResourceValue1), + acctest.CtOverlapKey2: config.StringVariable(acctest.CtResourceValue2), + }), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/TransitGatewayPeering/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtOverlapKey1: config.StringVariable(acctest.CtProviderValue1), + }), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtOverlapKey1: config.StringVariable(acctest.CtResourceValue2), + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckTransitGatewayPeeringExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtOverlapKey1: knownvalue.StringExact(acctest.CtResourceValue2), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtOverlapKey1: knownvalue.StringExact(acctest.CtResourceValue2), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtOverlapKey1: knownvalue.StringExact(acctest.CtResourceValue2), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtOverlapKey1: knownvalue.StringExact(acctest.CtResourceValue2), + })), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/TransitGatewayPeering/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtOverlapKey1: config.StringVariable(acctest.CtProviderValue1), + }), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtOverlapKey1: config.StringVariable(acctest.CtResourceValue2), + }), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} + +func TestAccNetworkManagerTransitGatewayPeering_tags_DefaultTags_updateToProviderOnly(t *testing.T) { + ctx := acctest.Context(t) + var v awstypes.TransitGatewayPeering + resourceName := "aws_networkmanager_transit_gateway_peering.test" + rName := acctest.RandomWithPrefix(t, acctest.ResourcePrefix) + + acctest.ParallelTest(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckTransitGatewayPeeringDestroy(ctx), + Steps: []resource.TestStep{ + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/TransitGatewayPeering/tags/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckTransitGatewayPeeringExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/TransitGatewayPeering/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + acctest.CtResourceTags: nil, + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckTransitGatewayPeeringExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{})), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{})), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/TransitGatewayPeering/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + acctest.CtResourceTags: nil, + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} + +func TestAccNetworkManagerTransitGatewayPeering_tags_DefaultTags_updateToResourceOnly(t *testing.T) { + ctx := acctest.Context(t) + var v awstypes.TransitGatewayPeering + resourceName := "aws_networkmanager_transit_gateway_peering.test" + rName := acctest.RandomWithPrefix(t, acctest.ResourcePrefix) + + acctest.ParallelTest(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckTransitGatewayPeeringDestroy(ctx), + Steps: []resource.TestStep{ + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/TransitGatewayPeering/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + acctest.CtResourceTags: nil, + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckTransitGatewayPeeringExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.Null()), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.Null()), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/TransitGatewayPeering/tags/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckTransitGatewayPeeringExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionNoop), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/TransitGatewayPeering/tags/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} + +func TestAccNetworkManagerTransitGatewayPeering_tags_DefaultTags_emptyResourceTag(t *testing.T) { + t.Skip("Resource TransitGatewayPeering does not support empty tags") + + ctx := acctest.Context(t) + var v awstypes.TransitGatewayPeering + resourceName := "aws_networkmanager_transit_gateway_peering.test" + rName := acctest.RandomWithPrefix(t, acctest.ResourcePrefix) + + acctest.ParallelTest(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckTransitGatewayPeeringDestroy(ctx), + Steps: []resource.TestStep{ + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/TransitGatewayPeering/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(""), + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckTransitGatewayPeeringExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(""), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(""), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(""), + })), + // TODO: Should be known + plancheck.ExpectUnknownValue(resourceName, tfjsonpath.New(names.AttrTagsAll)), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/TransitGatewayPeering/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(""), + }), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} + +func TestAccNetworkManagerTransitGatewayPeering_tags_DefaultTags_emptyProviderOnlyTag(t *testing.T) { + t.Skip("Resource TransitGatewayPeering does not support empty tags") + + ctx := acctest.Context(t) + var v awstypes.TransitGatewayPeering + resourceName := "aws_networkmanager_transit_gateway_peering.test" + rName := acctest.RandomWithPrefix(t, acctest.ResourcePrefix) + + acctest.ParallelTest(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckTransitGatewayPeeringDestroy(ctx), + Steps: []resource.TestStep{ + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/TransitGatewayPeering/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(""), + }), + acctest.CtResourceTags: nil, + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckTransitGatewayPeeringExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.Null()), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(""), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.Null()), + // TODO: Should be known + plancheck.ExpectUnknownValue(resourceName, tfjsonpath.New(names.AttrTagsAll)), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/TransitGatewayPeering/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(""), + }), + acctest.CtResourceTags: nil, + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} + +func TestAccNetworkManagerTransitGatewayPeering_tags_DefaultTags_nullOverlappingResourceTag(t *testing.T) { + ctx := acctest.Context(t) + var v awstypes.TransitGatewayPeering + resourceName := "aws_networkmanager_transit_gateway_peering.test" + rName := acctest.RandomWithPrefix(t, acctest.ResourcePrefix) + + acctest.ParallelTest(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckTransitGatewayPeeringDestroy(ctx), + Steps: []resource.TestStep{ + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/TransitGatewayPeering/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtProviderValue1), + }), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: nil, + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckTransitGatewayPeeringExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.Null()), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtProviderValue1), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.Null()), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtProviderValue1), + })), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/TransitGatewayPeering/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtProviderValue1), + }), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: nil, + }), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} + +func TestAccNetworkManagerTransitGatewayPeering_tags_DefaultTags_nullNonOverlappingResourceTag(t *testing.T) { + ctx := acctest.Context(t) + var v awstypes.TransitGatewayPeering + resourceName := "aws_networkmanager_transit_gateway_peering.test" + rName := acctest.RandomWithPrefix(t, acctest.ResourcePrefix) + + acctest.ParallelTest(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckTransitGatewayPeeringDestroy(ctx), + Steps: []resource.TestStep{ + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/TransitGatewayPeering/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtProviderKey1: config.StringVariable(acctest.CtProviderValue1), + }), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtResourceKey1: nil, + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckTransitGatewayPeeringExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.Null()), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtProviderKey1: knownvalue.StringExact(acctest.CtProviderValue1), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.Null()), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtProviderKey1: knownvalue.StringExact(acctest.CtProviderValue1), + })), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/TransitGatewayPeering/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtProviderKey1: config.StringVariable(acctest.CtProviderValue1), + }), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtResourceKey1: nil, + }), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} + +func TestAccNetworkManagerTransitGatewayPeering_tags_ComputedTag_OnCreate(t *testing.T) { + ctx := acctest.Context(t) + var v awstypes.TransitGatewayPeering + resourceName := "aws_networkmanager_transit_gateway_peering.test" + rName := acctest.RandomWithPrefix(t, acctest.ResourcePrefix) + + acctest.ParallelTest(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckTransitGatewayPeeringDestroy(ctx), + Steps: []resource.TestStep{ + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/TransitGatewayPeering/tagsComputed1/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + "unknownTagKey": config.StringVariable("computedkey1"), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckTransitGatewayPeeringExists(ctx, resourceName, &v), + resource.TestCheckResourceAttrPair(resourceName, "tags.computedkey1", "null_resource.test", names.AttrID), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapSizeExact(1)), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapSizeExact(1)), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectUnknownValue(resourceName, tfjsonpath.New(names.AttrTags)), + plancheck.ExpectUnknownValue(resourceName, tfjsonpath.New(names.AttrTagsAll)), + }, + PostApplyPreRefresh: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionNoop), + }, + PostApplyPostRefresh: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionNoop), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/TransitGatewayPeering/tagsComputed1/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + "unknownTagKey": config.StringVariable("computedkey1"), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} + +func TestAccNetworkManagerTransitGatewayPeering_tags_ComputedTag_OnUpdate_Add(t *testing.T) { + ctx := acctest.Context(t) + var v awstypes.TransitGatewayPeering + resourceName := "aws_networkmanager_transit_gateway_peering.test" + rName := acctest.RandomWithPrefix(t, acctest.ResourcePrefix) + + acctest.ParallelTest(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckTransitGatewayPeeringDestroy(ctx), + Steps: []resource.TestStep{ + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/TransitGatewayPeering/tags/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckTransitGatewayPeeringExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/TransitGatewayPeering/tagsComputed2/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + "unknownTagKey": config.StringVariable("computedkey1"), + "knownTagKey": config.StringVariable(acctest.CtKey1), + "knownTagValue": config.StringVariable(acctest.CtValue1), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckTransitGatewayPeeringExists(ctx, resourceName, &v), + resource.TestCheckResourceAttrPair(resourceName, "tags.computedkey1", "null_resource.test", names.AttrID), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapSizeExact(2)), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapPartial(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapSizeExact(2)), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapPartial(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectUnknownValue(resourceName, tfjsonpath.New(names.AttrTags)), + plancheck.ExpectUnknownValue(resourceName, tfjsonpath.New(names.AttrTagsAll)), + }, + PostApplyPreRefresh: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionNoop), + }, + PostApplyPostRefresh: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionNoop), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/TransitGatewayPeering/tagsComputed2/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + "unknownTagKey": config.StringVariable("computedkey1"), + "knownTagKey": config.StringVariable(acctest.CtKey1), + "knownTagValue": config.StringVariable(acctest.CtValue1), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} + +func TestAccNetworkManagerTransitGatewayPeering_tags_ComputedTag_OnUpdate_Replace(t *testing.T) { + ctx := acctest.Context(t) + var v awstypes.TransitGatewayPeering + resourceName := "aws_networkmanager_transit_gateway_peering.test" + rName := acctest.RandomWithPrefix(t, acctest.ResourcePrefix) + + acctest.ParallelTest(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckTransitGatewayPeeringDestroy(ctx), + Steps: []resource.TestStep{ + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/TransitGatewayPeering/tags/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckTransitGatewayPeeringExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/TransitGatewayPeering/tagsComputed1/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + "unknownTagKey": config.StringVariable(acctest.CtKey1), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckTransitGatewayPeeringExists(ctx, resourceName, &v), + resource.TestCheckResourceAttrPair(resourceName, acctest.CtTagsKey1, "null_resource.test", names.AttrID), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapSizeExact(1)), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapSizeExact(1)), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectUnknownValue(resourceName, tfjsonpath.New(names.AttrTags)), + plancheck.ExpectUnknownValue(resourceName, tfjsonpath.New(names.AttrTagsAll)), + }, + PostApplyPreRefresh: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionNoop), + }, + PostApplyPostRefresh: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionNoop), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/TransitGatewayPeering/tagsComputed1/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + "unknownTagKey": config.StringVariable(acctest.CtKey1), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} + +func TestAccNetworkManagerTransitGatewayPeering_tags_IgnoreTags_Overlap_DefaultTag(t *testing.T) { + ctx := acctest.Context(t) + var v awstypes.TransitGatewayPeering + resourceName := "aws_networkmanager_transit_gateway_peering.test" + rName := acctest.RandomWithPrefix(t, acctest.ResourcePrefix) + + acctest.ParallelTest(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckTransitGatewayPeeringDestroy(ctx), + Steps: []resource.TestStep{ + // 1: Create + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/TransitGatewayPeering/tags_ignore/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtProviderKey1: config.StringVariable(acctest.CtProviderValue1), + }), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtResourceKey1: config.StringVariable(acctest.CtResourceValue1), + }), + "ignore_tag_keys": config.SetVariable( + config.StringVariable(acctest.CtProviderKey1), + ), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckTransitGatewayPeeringExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), + })), + expectFullResourceTags(ctx, resourceName, knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtProviderKey1: knownvalue.StringExact(acctest.CtProviderValue1), // TODO: Should not be set + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), + })), + }, + PostApplyPreRefresh: []plancheck.PlanCheck{ + plancheck.ExpectEmptyPlan(), + }, + PostApplyPostRefresh: []plancheck.PlanCheck{ + plancheck.ExpectEmptyPlan(), + }, + }, + }, + // 2: Update ignored tag only + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/TransitGatewayPeering/tags_ignore/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtProviderKey1: config.StringVariable(acctest.CtProviderValue1Updated), + }), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtResourceKey1: config.StringVariable(acctest.CtResourceValue1), + }), + "ignore_tag_keys": config.SetVariable( + config.StringVariable(acctest.CtProviderKey1), + ), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckTransitGatewayPeeringExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), + })), + expectFullResourceTags(ctx, resourceName, knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtProviderKey1: knownvalue.StringExact(acctest.CtProviderValue1), // TODO: Should not be set + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionNoop), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), + })), + }, + PostApplyPreRefresh: []plancheck.PlanCheck{ + plancheck.ExpectEmptyPlan(), + }, + PostApplyPostRefresh: []plancheck.PlanCheck{ + plancheck.ExpectEmptyPlan(), + }, + }, + }, + // 3: Update both tags + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/TransitGatewayPeering/tags_ignore/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtProviderKey1: config.StringVariable(acctest.CtProviderValue1Again), + }), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtResourceKey1: config.StringVariable(acctest.CtResourceValue1Updated), + }), + "ignore_tag_keys": config.SetVariable( + config.StringVariable(acctest.CtProviderKey1), + ), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckTransitGatewayPeeringExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1Updated), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1Updated), + })), + expectFullResourceTags(ctx, resourceName, knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtProviderKey1: knownvalue.StringExact(acctest.CtProviderValue1), // TODO: Should not be set + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1Updated), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1Updated), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1Updated), + })), + }, + PostApplyPreRefresh: []plancheck.PlanCheck{ + plancheck.ExpectEmptyPlan(), + }, + PostApplyPostRefresh: []plancheck.PlanCheck{ + plancheck.ExpectEmptyPlan(), + }, + }, + }, + }, + }) +} + +func TestAccNetworkManagerTransitGatewayPeering_tags_IgnoreTags_Overlap_ResourceTag(t *testing.T) { + ctx := acctest.Context(t) + var v awstypes.TransitGatewayPeering + resourceName := "aws_networkmanager_transit_gateway_peering.test" + rName := acctest.RandomWithPrefix(t, acctest.ResourcePrefix) + + acctest.ParallelTest(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckTransitGatewayPeeringDestroy(ctx), + Steps: []resource.TestStep{ + // 1: Create + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/TransitGatewayPeering/tags_ignore/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtResourceKey1: config.StringVariable(acctest.CtResourceValue1), + acctest.CtResourceKey2: config.StringVariable(acctest.CtResourceValue2), + }), + "ignore_tag_keys": config.SetVariable( + config.StringVariable(acctest.CtResourceKey1), + ), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckTransitGatewayPeeringExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + expectFullResourceTags(ctx, resourceName, knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), // TODO: Should not be set + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + }, + PostApplyPreRefresh: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + }, + PostApplyPostRefresh: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + }, + }, + ExpectNonEmptyPlan: true, + }, + // 2: Update ignored tag + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/TransitGatewayPeering/tags_ignore/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtResourceKey1: config.StringVariable(acctest.CtResourceValue1Updated), + acctest.CtResourceKey2: config.StringVariable(acctest.CtResourceValue2), + }), + "ignore_tag_keys": config.SetVariable( + config.StringVariable(acctest.CtResourceKey1), + ), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckTransitGatewayPeeringExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + expectFullResourceTags(ctx, resourceName, knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), // TODO: Should not be set + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1Updated), + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + }, + PostApplyPreRefresh: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1Updated), + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + }, + PostApplyPostRefresh: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1Updated), + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + }, + }, + ExpectNonEmptyPlan: true, + }, + // 3: Update both tags + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/TransitGatewayPeering/tags_ignore/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtResourceKey1: config.StringVariable(acctest.CtResourceValue1Again), + acctest.CtResourceKey2: config.StringVariable(acctest.CtResourceValue2Updated), + }), + "ignore_tag_keys": config.SetVariable( + config.StringVariable(acctest.CtResourceKey1), + ), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckTransitGatewayPeeringExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2Updated), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2Updated), + })), + expectFullResourceTags(ctx, resourceName, knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), // TODO: Should not be set + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2Updated), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1Again), + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2Updated), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2Updated), + })), + }, + PostApplyPreRefresh: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1Again), + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2Updated), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2Updated), + })), + }, + PostApplyPostRefresh: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1Again), + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2Updated), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2Updated), + })), + }, + }, + ExpectNonEmptyPlan: true, + }, + }, + }) +} diff --git a/internal/service/networkmanager/transit_gateway_peering_test.go b/internal/service/networkmanager/transit_gateway_peering_test.go index 71f87bd8708d..42b4533bee38 100644 --- a/internal/service/networkmanager/transit_gateway_peering_test.go +++ b/internal/service/networkmanager/transit_gateway_peering_test.go @@ -81,52 +81,6 @@ func TestAccNetworkManagerTransitGatewayPeering_disappears(t *testing.T) { }) } -func TestAccNetworkManagerTransitGatewayPeering_tags(t *testing.T) { - ctx := acctest.Context(t) - var v awstypes.TransitGatewayPeering - resourceName := "aws_networkmanager_transit_gateway_peering.test" - rName := sdkacctest.RandomWithPrefix(acctest.ResourcePrefix) - - resource.ParallelTest(t, resource.TestCase{ - PreCheck: func() { acctest.PreCheck(ctx, t) }, - ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), - ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, - CheckDestroy: testAccCheckTransitGatewayPeeringDestroy(ctx), - Steps: []resource.TestStep{ - { - Config: testAccTransitGatewayPeeringConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), - Check: resource.ComposeTestCheckFunc( - testAccCheckTransitGatewayPeeringExists(ctx, resourceName, &v), - resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, "1"), - resource.TestCheckResourceAttr(resourceName, acctest.CtTagsKey1, acctest.CtValue1), - ), - }, - { - ResourceName: resourceName, - ImportState: true, - ImportStateVerify: true, - }, - { - Config: testAccTransitGatewayPeeringConfig_tags2(rName, acctest.CtKey1, acctest.CtValue1Updated, acctest.CtKey2, acctest.CtValue2), - Check: resource.ComposeTestCheckFunc( - testAccCheckTransitGatewayPeeringExists(ctx, resourceName, &v), - resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, "2"), - resource.TestCheckResourceAttr(resourceName, acctest.CtTagsKey1, acctest.CtValue1Updated), - resource.TestCheckResourceAttr(resourceName, acctest.CtTagsKey2, acctest.CtValue2), - ), - }, - { - Config: testAccTransitGatewayPeeringConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), - Check: resource.ComposeTestCheckFunc( - testAccCheckTransitGatewayPeeringExists(ctx, resourceName, &v), - resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, "1"), - resource.TestCheckResourceAttr(resourceName, acctest.CtTagsKey2, acctest.CtValue2), - ), - }, - }, - }) -} - func testAccCheckTransitGatewayPeeringExists(ctx context.Context, n string, v *awstypes.TransitGatewayPeering) resource.TestCheckFunc { return func(s *terraform.State) error { rs, ok := s.RootModule().Resources[n] @@ -245,40 +199,3 @@ resource "aws_networkmanager_transit_gateway_peering" "test" { } `) } - -func testAccTransitGatewayPeeringConfig_tags1(rName, tagKey1, tagValue1 string) string { - return acctest.ConfigCompose(testAccTransitGatewayPeeringConfig_base(rName), fmt.Sprintf(` -resource "aws_networkmanager_transit_gateway_peering" "test" { - core_network_id = aws_networkmanager_core_network.test.id - transit_gateway_arn = aws_ec2_transit_gateway.test.arn - - tags = { - %[1]q = %[2]q - } - - depends_on = [ - aws_ec2_transit_gateway_policy_table.test, - aws_networkmanager_core_network_policy_attachment.test, - ] -} -`, tagKey1, tagValue1)) -} - -func testAccTransitGatewayPeeringConfig_tags2(rName, tagKey1, tagValue1, tagKey2, tagValue2 string) string { - return acctest.ConfigCompose(testAccTransitGatewayPeeringConfig_base(rName), fmt.Sprintf(` -resource "aws_networkmanager_transit_gateway_peering" "test" { - core_network_id = aws_networkmanager_core_network.test.id - transit_gateway_arn = aws_ec2_transit_gateway.test.arn - - tags = { - %[1]q = %[2]q - %[3]q = %[4]q - } - - depends_on = [ - aws_ec2_transit_gateway_policy_table.test, - aws_networkmanager_core_network_policy_attachment.test, - ] -} -`, tagKey1, tagValue1, tagKey2, tagValue2)) -} From c70f8729e655d788f15531d47d1382c5d1271dfe Mon Sep 17 00:00:00 2001 From: Graham Davison Date: Thu, 24 Jul 2025 17:24:51 -0700 Subject: [PATCH 037/365] Removes unneeded parameter --- .../TransitGatewayPeering/tags/main_gen.tf | 6 -- .../tagsComputed1/main_gen.tf | 6 -- .../tagsComputed2/main_gen.tf | 6 -- .../tags_defaults/main_gen.tf | 6 -- .../tags_ignore/main_gen.tf | 6 -- .../networkmanager/transit_gateway_peering.go | 1 + .../transit_gateway_peering_tags_gen_test.go | 98 ------------------- 7 files changed, 1 insertion(+), 128 deletions(-) diff --git a/internal/service/networkmanager/testdata/TransitGatewayPeering/tags/main_gen.tf b/internal/service/networkmanager/testdata/TransitGatewayPeering/tags/main_gen.tf index 2e2567c1e776..5facfa10e78c 100644 --- a/internal/service/networkmanager/testdata/TransitGatewayPeering/tags/main_gen.tf +++ b/internal/service/networkmanager/testdata/TransitGatewayPeering/tags/main_gen.tf @@ -49,12 +49,6 @@ data "aws_networkmanager_core_network_policy_document" "test" { } } -variable "rName" { - description = "Name for resource" - type = string - nullable = false -} - variable "resource_tags" { description = "Tags to set on resource. To specify no tags, set to `null`" # Not setting a default, so that this must explicitly be set to `null` to specify no tags diff --git a/internal/service/networkmanager/testdata/TransitGatewayPeering/tagsComputed1/main_gen.tf b/internal/service/networkmanager/testdata/TransitGatewayPeering/tagsComputed1/main_gen.tf index 5471c3177ecb..94959a447c63 100644 --- a/internal/service/networkmanager/testdata/TransitGatewayPeering/tagsComputed1/main_gen.tf +++ b/internal/service/networkmanager/testdata/TransitGatewayPeering/tagsComputed1/main_gen.tf @@ -55,12 +55,6 @@ data "aws_networkmanager_core_network_policy_document" "test" { resource "null_resource" "test" {} -variable "rName" { - description = "Name for resource" - type = string - nullable = false -} - variable "unknownTagKey" { type = string nullable = false diff --git a/internal/service/networkmanager/testdata/TransitGatewayPeering/tagsComputed2/main_gen.tf b/internal/service/networkmanager/testdata/TransitGatewayPeering/tagsComputed2/main_gen.tf index b4c726df05bb..86631c3c8c85 100644 --- a/internal/service/networkmanager/testdata/TransitGatewayPeering/tagsComputed2/main_gen.tf +++ b/internal/service/networkmanager/testdata/TransitGatewayPeering/tagsComputed2/main_gen.tf @@ -56,12 +56,6 @@ data "aws_networkmanager_core_network_policy_document" "test" { resource "null_resource" "test" {} -variable "rName" { - description = "Name for resource" - type = string - nullable = false -} - variable "unknownTagKey" { type = string nullable = false diff --git a/internal/service/networkmanager/testdata/TransitGatewayPeering/tags_defaults/main_gen.tf b/internal/service/networkmanager/testdata/TransitGatewayPeering/tags_defaults/main_gen.tf index b9ea413f5672..e96d042f41a3 100644 --- a/internal/service/networkmanager/testdata/TransitGatewayPeering/tags_defaults/main_gen.tf +++ b/internal/service/networkmanager/testdata/TransitGatewayPeering/tags_defaults/main_gen.tf @@ -55,12 +55,6 @@ data "aws_networkmanager_core_network_policy_document" "test" { } } -variable "rName" { - description = "Name for resource" - type = string - nullable = false -} - variable "resource_tags" { description = "Tags to set on resource. To specify no tags, set to `null`" # Not setting a default, so that this must explicitly be set to `null` to specify no tags diff --git a/internal/service/networkmanager/testdata/TransitGatewayPeering/tags_ignore/main_gen.tf b/internal/service/networkmanager/testdata/TransitGatewayPeering/tags_ignore/main_gen.tf index f2846fc4fd8e..15e1d7520d25 100644 --- a/internal/service/networkmanager/testdata/TransitGatewayPeering/tags_ignore/main_gen.tf +++ b/internal/service/networkmanager/testdata/TransitGatewayPeering/tags_ignore/main_gen.tf @@ -58,12 +58,6 @@ data "aws_networkmanager_core_network_policy_document" "test" { } } -variable "rName" { - description = "Name for resource" - type = string - nullable = false -} - variable "resource_tags" { description = "Tags to set on resource. To specify no tags, set to `null`" # Not setting a default, so that this must explicitly be set to `null` to specify no tags diff --git a/internal/service/networkmanager/transit_gateway_peering.go b/internal/service/networkmanager/transit_gateway_peering.go index 9dcadb5488ff..688fc3866a16 100644 --- a/internal/service/networkmanager/transit_gateway_peering.go +++ b/internal/service/networkmanager/transit_gateway_peering.go @@ -28,6 +28,7 @@ import ( // @Tags(identifierAttribute="arn") // @Testing(existsType="github.com/aws/aws-sdk-go-v2/service/networkmanager/types;awstypes;awstypes.TransitGatewayPeering") // @Testing(skipEmptyTags=true) +// @Testing(generator=false) func resourceTransitGatewayPeering() *schema.Resource { return &schema.Resource{ CreateWithoutTimeout: resourceTransitGatewayPeeringCreate, diff --git a/internal/service/networkmanager/transit_gateway_peering_tags_gen_test.go b/internal/service/networkmanager/transit_gateway_peering_tags_gen_test.go index c3f07858f1fa..2c4aae4c5a20 100644 --- a/internal/service/networkmanager/transit_gateway_peering_tags_gen_test.go +++ b/internal/service/networkmanager/transit_gateway_peering_tags_gen_test.go @@ -20,7 +20,6 @@ func TestAccNetworkManagerTransitGatewayPeering_tags(t *testing.T) { ctx := acctest.Context(t) var v awstypes.TransitGatewayPeering resourceName := "aws_networkmanager_transit_gateway_peering.test" - rName := acctest.RandomWithPrefix(t, acctest.ResourcePrefix) acctest.ParallelTest(ctx, t, resource.TestCase{ PreCheck: func() { acctest.PreCheck(ctx, t) }, @@ -31,7 +30,6 @@ func TestAccNetworkManagerTransitGatewayPeering_tags(t *testing.T) { { ConfigDirectory: config.StaticDirectory("testdata/TransitGatewayPeering/tags/"), ConfigVariables: config.Variables{ - acctest.CtRName: config.StringVariable(rName), acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), @@ -62,7 +60,6 @@ func TestAccNetworkManagerTransitGatewayPeering_tags(t *testing.T) { { ConfigDirectory: config.StaticDirectory("testdata/TransitGatewayPeering/tags/"), ConfigVariables: config.Variables{ - acctest.CtRName: config.StringVariable(rName), acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), @@ -74,7 +71,6 @@ func TestAccNetworkManagerTransitGatewayPeering_tags(t *testing.T) { { ConfigDirectory: config.StaticDirectory("testdata/TransitGatewayPeering/tags/"), ConfigVariables: config.Variables{ - acctest.CtRName: config.StringVariable(rName), acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ acctest.CtKey1: config.StringVariable(acctest.CtValue1Updated), acctest.CtKey2: config.StringVariable(acctest.CtValue2), @@ -110,7 +106,6 @@ func TestAccNetworkManagerTransitGatewayPeering_tags(t *testing.T) { { ConfigDirectory: config.StaticDirectory("testdata/TransitGatewayPeering/tags/"), ConfigVariables: config.Variables{ - acctest.CtRName: config.StringVariable(rName), acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ acctest.CtKey1: config.StringVariable(acctest.CtValue1Updated), acctest.CtKey2: config.StringVariable(acctest.CtValue2), @@ -123,7 +118,6 @@ func TestAccNetworkManagerTransitGatewayPeering_tags(t *testing.T) { { ConfigDirectory: config.StaticDirectory("testdata/TransitGatewayPeering/tags/"), ConfigVariables: config.Variables{ - acctest.CtRName: config.StringVariable(rName), acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ acctest.CtKey2: config.StringVariable(acctest.CtValue2), }), @@ -154,7 +148,6 @@ func TestAccNetworkManagerTransitGatewayPeering_tags(t *testing.T) { { ConfigDirectory: config.StaticDirectory("testdata/TransitGatewayPeering/tags/"), ConfigVariables: config.Variables{ - acctest.CtRName: config.StringVariable(rName), acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ acctest.CtKey2: config.StringVariable(acctest.CtValue2), }), @@ -166,7 +159,6 @@ func TestAccNetworkManagerTransitGatewayPeering_tags(t *testing.T) { { ConfigDirectory: config.StaticDirectory("testdata/TransitGatewayPeering/tags/"), ConfigVariables: config.Variables{ - acctest.CtRName: config.StringVariable(rName), acctest.CtResourceTags: nil, }, Check: resource.ComposeAggregateTestCheckFunc( @@ -187,7 +179,6 @@ func TestAccNetworkManagerTransitGatewayPeering_tags(t *testing.T) { { ConfigDirectory: config.StaticDirectory("testdata/TransitGatewayPeering/tags/"), ConfigVariables: config.Variables{ - acctest.CtRName: config.StringVariable(rName), acctest.CtResourceTags: nil, }, ResourceName: resourceName, @@ -202,7 +193,6 @@ func TestAccNetworkManagerTransitGatewayPeering_tags_null(t *testing.T) { ctx := acctest.Context(t) var v awstypes.TransitGatewayPeering resourceName := "aws_networkmanager_transit_gateway_peering.test" - rName := acctest.RandomWithPrefix(t, acctest.ResourcePrefix) acctest.ParallelTest(ctx, t, resource.TestCase{ PreCheck: func() { acctest.PreCheck(ctx, t) }, @@ -213,7 +203,6 @@ func TestAccNetworkManagerTransitGatewayPeering_tags_null(t *testing.T) { { ConfigDirectory: config.StaticDirectory("testdata/TransitGatewayPeering/tags/"), ConfigVariables: config.Variables{ - acctest.CtRName: config.StringVariable(rName), acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ acctest.CtKey1: nil, }), @@ -237,7 +226,6 @@ func TestAccNetworkManagerTransitGatewayPeering_tags_null(t *testing.T) { { ConfigDirectory: config.StaticDirectory("testdata/TransitGatewayPeering/tags/"), ConfigVariables: config.Variables{ - acctest.CtRName: config.StringVariable(rName), acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ acctest.CtKey1: nil, }), @@ -249,7 +237,6 @@ func TestAccNetworkManagerTransitGatewayPeering_tags_null(t *testing.T) { { ConfigDirectory: config.StaticDirectory("testdata/TransitGatewayPeering/tags/"), ConfigVariables: config.Variables{ - acctest.CtRName: config.StringVariable(rName), acctest.CtResourceTags: nil, }, ConfigPlanChecks: resource.ConfigPlanChecks{ @@ -269,7 +256,6 @@ func TestAccNetworkManagerTransitGatewayPeering_tags_EmptyMap(t *testing.T) { ctx := acctest.Context(t) var v awstypes.TransitGatewayPeering resourceName := "aws_networkmanager_transit_gateway_peering.test" - rName := acctest.RandomWithPrefix(t, acctest.ResourcePrefix) acctest.ParallelTest(ctx, t, resource.TestCase{ PreCheck: func() { acctest.PreCheck(ctx, t) }, @@ -280,7 +266,6 @@ func TestAccNetworkManagerTransitGatewayPeering_tags_EmptyMap(t *testing.T) { { ConfigDirectory: config.StaticDirectory("testdata/TransitGatewayPeering/tags/"), ConfigVariables: config.Variables{ - acctest.CtRName: config.StringVariable(rName), acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{}), }, Check: resource.ComposeAggregateTestCheckFunc( @@ -302,7 +287,6 @@ func TestAccNetworkManagerTransitGatewayPeering_tags_EmptyMap(t *testing.T) { { ConfigDirectory: config.StaticDirectory("testdata/TransitGatewayPeering/tags/"), ConfigVariables: config.Variables{ - acctest.CtRName: config.StringVariable(rName), acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{}), }, ResourceName: resourceName, @@ -312,7 +296,6 @@ func TestAccNetworkManagerTransitGatewayPeering_tags_EmptyMap(t *testing.T) { { ConfigDirectory: config.StaticDirectory("testdata/TransitGatewayPeering/tags/"), ConfigVariables: config.Variables{ - acctest.CtRName: config.StringVariable(rName), acctest.CtResourceTags: nil, }, ConfigPlanChecks: resource.ConfigPlanChecks{ @@ -332,7 +315,6 @@ func TestAccNetworkManagerTransitGatewayPeering_tags_AddOnUpdate(t *testing.T) { ctx := acctest.Context(t) var v awstypes.TransitGatewayPeering resourceName := "aws_networkmanager_transit_gateway_peering.test" - rName := acctest.RandomWithPrefix(t, acctest.ResourcePrefix) acctest.ParallelTest(ctx, t, resource.TestCase{ PreCheck: func() { acctest.PreCheck(ctx, t) }, @@ -343,7 +325,6 @@ func TestAccNetworkManagerTransitGatewayPeering_tags_AddOnUpdate(t *testing.T) { { ConfigDirectory: config.StaticDirectory("testdata/TransitGatewayPeering/tags/"), ConfigVariables: config.Variables{ - acctest.CtRName: config.StringVariable(rName), acctest.CtResourceTags: nil, }, Check: resource.ComposeAggregateTestCheckFunc( @@ -365,7 +346,6 @@ func TestAccNetworkManagerTransitGatewayPeering_tags_AddOnUpdate(t *testing.T) { { ConfigDirectory: config.StaticDirectory("testdata/TransitGatewayPeering/tags/"), ConfigVariables: config.Variables{ - acctest.CtRName: config.StringVariable(rName), acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), @@ -396,7 +376,6 @@ func TestAccNetworkManagerTransitGatewayPeering_tags_AddOnUpdate(t *testing.T) { { ConfigDirectory: config.StaticDirectory("testdata/TransitGatewayPeering/tags/"), ConfigVariables: config.Variables{ - acctest.CtRName: config.StringVariable(rName), acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), @@ -415,7 +394,6 @@ func TestAccNetworkManagerTransitGatewayPeering_tags_EmptyTag_OnCreate(t *testin ctx := acctest.Context(t) var v awstypes.TransitGatewayPeering resourceName := "aws_networkmanager_transit_gateway_peering.test" - rName := acctest.RandomWithPrefix(t, acctest.ResourcePrefix) acctest.ParallelTest(ctx, t, resource.TestCase{ PreCheck: func() { acctest.PreCheck(ctx, t) }, @@ -426,7 +404,6 @@ func TestAccNetworkManagerTransitGatewayPeering_tags_EmptyTag_OnCreate(t *testin { ConfigDirectory: config.StaticDirectory("testdata/TransitGatewayPeering/tags/"), ConfigVariables: config.Variables{ - acctest.CtRName: config.StringVariable(rName), acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ acctest.CtKey1: config.StringVariable(""), }), @@ -456,7 +433,6 @@ func TestAccNetworkManagerTransitGatewayPeering_tags_EmptyTag_OnCreate(t *testin { ConfigDirectory: config.StaticDirectory("testdata/TransitGatewayPeering/tags/"), ConfigVariables: config.Variables{ - acctest.CtRName: config.StringVariable(rName), acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ acctest.CtKey1: config.StringVariable(""), }), @@ -468,7 +444,6 @@ func TestAccNetworkManagerTransitGatewayPeering_tags_EmptyTag_OnCreate(t *testin { ConfigDirectory: config.StaticDirectory("testdata/TransitGatewayPeering/tags/"), ConfigVariables: config.Variables{ - acctest.CtRName: config.StringVariable(rName), acctest.CtResourceTags: nil, }, Check: resource.ComposeAggregateTestCheckFunc( @@ -489,7 +464,6 @@ func TestAccNetworkManagerTransitGatewayPeering_tags_EmptyTag_OnCreate(t *testin { ConfigDirectory: config.StaticDirectory("testdata/TransitGatewayPeering/tags/"), ConfigVariables: config.Variables{ - acctest.CtRName: config.StringVariable(rName), acctest.CtResourceTags: nil, }, ResourceName: resourceName, @@ -506,7 +480,6 @@ func TestAccNetworkManagerTransitGatewayPeering_tags_EmptyTag_OnUpdate_Add(t *te ctx := acctest.Context(t) var v awstypes.TransitGatewayPeering resourceName := "aws_networkmanager_transit_gateway_peering.test" - rName := acctest.RandomWithPrefix(t, acctest.ResourcePrefix) acctest.ParallelTest(ctx, t, resource.TestCase{ PreCheck: func() { acctest.PreCheck(ctx, t) }, @@ -517,7 +490,6 @@ func TestAccNetworkManagerTransitGatewayPeering_tags_EmptyTag_OnUpdate_Add(t *te { ConfigDirectory: config.StaticDirectory("testdata/TransitGatewayPeering/tags/"), ConfigVariables: config.Variables{ - acctest.CtRName: config.StringVariable(rName), acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), @@ -548,7 +520,6 @@ func TestAccNetworkManagerTransitGatewayPeering_tags_EmptyTag_OnUpdate_Add(t *te { ConfigDirectory: config.StaticDirectory("testdata/TransitGatewayPeering/tags/"), ConfigVariables: config.Variables{ - acctest.CtRName: config.StringVariable(rName), acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ acctest.CtKey1: config.StringVariable(acctest.CtValue1), acctest.CtKey2: config.StringVariable(""), @@ -582,7 +553,6 @@ func TestAccNetworkManagerTransitGatewayPeering_tags_EmptyTag_OnUpdate_Add(t *te { ConfigDirectory: config.StaticDirectory("testdata/TransitGatewayPeering/tags/"), ConfigVariables: config.Variables{ - acctest.CtRName: config.StringVariable(rName), acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ acctest.CtKey1: config.StringVariable(acctest.CtValue1), acctest.CtKey2: config.StringVariable(""), @@ -595,7 +565,6 @@ func TestAccNetworkManagerTransitGatewayPeering_tags_EmptyTag_OnUpdate_Add(t *te { ConfigDirectory: config.StaticDirectory("testdata/TransitGatewayPeering/tags/"), ConfigVariables: config.Variables{ - acctest.CtRName: config.StringVariable(rName), acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), @@ -626,7 +595,6 @@ func TestAccNetworkManagerTransitGatewayPeering_tags_EmptyTag_OnUpdate_Add(t *te { ConfigDirectory: config.StaticDirectory("testdata/TransitGatewayPeering/tags/"), ConfigVariables: config.Variables{ - acctest.CtRName: config.StringVariable(rName), acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), @@ -645,7 +613,6 @@ func TestAccNetworkManagerTransitGatewayPeering_tags_EmptyTag_OnUpdate_Replace(t ctx := acctest.Context(t) var v awstypes.TransitGatewayPeering resourceName := "aws_networkmanager_transit_gateway_peering.test" - rName := acctest.RandomWithPrefix(t, acctest.ResourcePrefix) acctest.ParallelTest(ctx, t, resource.TestCase{ PreCheck: func() { acctest.PreCheck(ctx, t) }, @@ -656,7 +623,6 @@ func TestAccNetworkManagerTransitGatewayPeering_tags_EmptyTag_OnUpdate_Replace(t { ConfigDirectory: config.StaticDirectory("testdata/TransitGatewayPeering/tags/"), ConfigVariables: config.Variables{ - acctest.CtRName: config.StringVariable(rName), acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), @@ -687,7 +653,6 @@ func TestAccNetworkManagerTransitGatewayPeering_tags_EmptyTag_OnUpdate_Replace(t { ConfigDirectory: config.StaticDirectory("testdata/TransitGatewayPeering/tags/"), ConfigVariables: config.Variables{ - acctest.CtRName: config.StringVariable(rName), acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ acctest.CtKey1: config.StringVariable(""), }), @@ -717,7 +682,6 @@ func TestAccNetworkManagerTransitGatewayPeering_tags_EmptyTag_OnUpdate_Replace(t { ConfigDirectory: config.StaticDirectory("testdata/TransitGatewayPeering/tags/"), ConfigVariables: config.Variables{ - acctest.CtRName: config.StringVariable(rName), acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ acctest.CtKey1: config.StringVariable(""), }), @@ -734,7 +698,6 @@ func TestAccNetworkManagerTransitGatewayPeering_tags_DefaultTags_providerOnly(t ctx := acctest.Context(t) var v awstypes.TransitGatewayPeering resourceName := "aws_networkmanager_transit_gateway_peering.test" - rName := acctest.RandomWithPrefix(t, acctest.ResourcePrefix) acctest.ParallelTest(ctx, t, resource.TestCase{ PreCheck: func() { acctest.PreCheck(ctx, t) }, @@ -745,7 +708,6 @@ func TestAccNetworkManagerTransitGatewayPeering_tags_DefaultTags_providerOnly(t ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, ConfigDirectory: config.StaticDirectory("testdata/TransitGatewayPeering/tags_defaults/"), ConfigVariables: config.Variables{ - acctest.CtRName: config.StringVariable(rName), acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), @@ -774,7 +736,6 @@ func TestAccNetworkManagerTransitGatewayPeering_tags_DefaultTags_providerOnly(t ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, ConfigDirectory: config.StaticDirectory("testdata/TransitGatewayPeering/tags_defaults/"), ConfigVariables: config.Variables{ - acctest.CtRName: config.StringVariable(rName), acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), @@ -788,7 +749,6 @@ func TestAccNetworkManagerTransitGatewayPeering_tags_DefaultTags_providerOnly(t ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, ConfigDirectory: config.StaticDirectory("testdata/TransitGatewayPeering/tags_defaults/"), ConfigVariables: config.Variables{ - acctest.CtRName: config.StringVariable(rName), acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ acctest.CtKey1: config.StringVariable(acctest.CtValue1Updated), acctest.CtKey2: config.StringVariable(acctest.CtValue2), @@ -820,7 +780,6 @@ func TestAccNetworkManagerTransitGatewayPeering_tags_DefaultTags_providerOnly(t ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, ConfigDirectory: config.StaticDirectory("testdata/TransitGatewayPeering/tags_defaults/"), ConfigVariables: config.Variables{ - acctest.CtRName: config.StringVariable(rName), acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ acctest.CtKey1: config.StringVariable(acctest.CtValue1Updated), acctest.CtKey2: config.StringVariable(acctest.CtValue2), @@ -835,7 +794,6 @@ func TestAccNetworkManagerTransitGatewayPeering_tags_DefaultTags_providerOnly(t ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, ConfigDirectory: config.StaticDirectory("testdata/TransitGatewayPeering/tags_defaults/"), ConfigVariables: config.Variables{ - acctest.CtRName: config.StringVariable(rName), acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ acctest.CtKey2: config.StringVariable(acctest.CtValue2), }), @@ -864,7 +822,6 @@ func TestAccNetworkManagerTransitGatewayPeering_tags_DefaultTags_providerOnly(t ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, ConfigDirectory: config.StaticDirectory("testdata/TransitGatewayPeering/tags_defaults/"), ConfigVariables: config.Variables{ - acctest.CtRName: config.StringVariable(rName), acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ acctest.CtKey2: config.StringVariable(acctest.CtValue2), }), @@ -878,7 +835,6 @@ func TestAccNetworkManagerTransitGatewayPeering_tags_DefaultTags_providerOnly(t ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, ConfigDirectory: config.StaticDirectory("testdata/TransitGatewayPeering/tags/"), ConfigVariables: config.Variables{ - acctest.CtRName: config.StringVariable(rName), acctest.CtResourceTags: nil, }, Check: resource.ComposeAggregateTestCheckFunc( @@ -900,7 +856,6 @@ func TestAccNetworkManagerTransitGatewayPeering_tags_DefaultTags_providerOnly(t ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, ConfigDirectory: config.StaticDirectory("testdata/TransitGatewayPeering/tags/"), ConfigVariables: config.Variables{ - acctest.CtRName: config.StringVariable(rName), acctest.CtResourceTags: nil, }, ResourceName: resourceName, @@ -915,7 +870,6 @@ func TestAccNetworkManagerTransitGatewayPeering_tags_DefaultTags_nonOverlapping( ctx := acctest.Context(t) var v awstypes.TransitGatewayPeering resourceName := "aws_networkmanager_transit_gateway_peering.test" - rName := acctest.RandomWithPrefix(t, acctest.ResourcePrefix) acctest.ParallelTest(ctx, t, resource.TestCase{ PreCheck: func() { acctest.PreCheck(ctx, t) }, @@ -926,7 +880,6 @@ func TestAccNetworkManagerTransitGatewayPeering_tags_DefaultTags_nonOverlapping( ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, ConfigDirectory: config.StaticDirectory("testdata/TransitGatewayPeering/tags_defaults/"), ConfigVariables: config.Variables{ - acctest.CtRName: config.StringVariable(rName), acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ acctest.CtProviderKey1: config.StringVariable(acctest.CtProviderValue1), }), @@ -963,7 +916,6 @@ func TestAccNetworkManagerTransitGatewayPeering_tags_DefaultTags_nonOverlapping( ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, ConfigDirectory: config.StaticDirectory("testdata/TransitGatewayPeering/tags_defaults/"), ConfigVariables: config.Variables{ - acctest.CtRName: config.StringVariable(rName), acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ acctest.CtProviderKey1: config.StringVariable(acctest.CtProviderValue1), }), @@ -979,7 +931,6 @@ func TestAccNetworkManagerTransitGatewayPeering_tags_DefaultTags_nonOverlapping( ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, ConfigDirectory: config.StaticDirectory("testdata/TransitGatewayPeering/tags_defaults/"), ConfigVariables: config.Variables{ - acctest.CtRName: config.StringVariable(rName), acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ acctest.CtProviderKey1: config.StringVariable(acctest.CtProviderValue1Updated), }), @@ -1021,7 +972,6 @@ func TestAccNetworkManagerTransitGatewayPeering_tags_DefaultTags_nonOverlapping( ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, ConfigDirectory: config.StaticDirectory("testdata/TransitGatewayPeering/tags_defaults/"), ConfigVariables: config.Variables{ - acctest.CtRName: config.StringVariable(rName), acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ acctest.CtProviderKey1: config.StringVariable(acctest.CtProviderValue1Updated), }), @@ -1038,7 +988,6 @@ func TestAccNetworkManagerTransitGatewayPeering_tags_DefaultTags_nonOverlapping( ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, ConfigDirectory: config.StaticDirectory("testdata/TransitGatewayPeering/tags/"), ConfigVariables: config.Variables{ - acctest.CtRName: config.StringVariable(rName), acctest.CtResourceTags: nil, }, Check: resource.ComposeAggregateTestCheckFunc( @@ -1060,7 +1009,6 @@ func TestAccNetworkManagerTransitGatewayPeering_tags_DefaultTags_nonOverlapping( ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, ConfigDirectory: config.StaticDirectory("testdata/TransitGatewayPeering/tags/"), ConfigVariables: config.Variables{ - acctest.CtRName: config.StringVariable(rName), acctest.CtResourceTags: nil, }, ResourceName: resourceName, @@ -1075,7 +1023,6 @@ func TestAccNetworkManagerTransitGatewayPeering_tags_DefaultTags_overlapping(t * ctx := acctest.Context(t) var v awstypes.TransitGatewayPeering resourceName := "aws_networkmanager_transit_gateway_peering.test" - rName := acctest.RandomWithPrefix(t, acctest.ResourcePrefix) acctest.ParallelTest(ctx, t, resource.TestCase{ PreCheck: func() { acctest.PreCheck(ctx, t) }, @@ -1086,7 +1033,6 @@ func TestAccNetworkManagerTransitGatewayPeering_tags_DefaultTags_overlapping(t * ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, ConfigDirectory: config.StaticDirectory("testdata/TransitGatewayPeering/tags_defaults/"), ConfigVariables: config.Variables{ - acctest.CtRName: config.StringVariable(rName), acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ acctest.CtOverlapKey1: config.StringVariable(acctest.CtProviderValue1), }), @@ -1121,7 +1067,6 @@ func TestAccNetworkManagerTransitGatewayPeering_tags_DefaultTags_overlapping(t * ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, ConfigDirectory: config.StaticDirectory("testdata/TransitGatewayPeering/tags_defaults/"), ConfigVariables: config.Variables{ - acctest.CtRName: config.StringVariable(rName), acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ acctest.CtOverlapKey1: config.StringVariable(acctest.CtProviderValue1), }), @@ -1137,7 +1082,6 @@ func TestAccNetworkManagerTransitGatewayPeering_tags_DefaultTags_overlapping(t * ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, ConfigDirectory: config.StaticDirectory("testdata/TransitGatewayPeering/tags_defaults/"), ConfigVariables: config.Variables{ - acctest.CtRName: config.StringVariable(rName), acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ acctest.CtOverlapKey1: config.StringVariable(acctest.CtProviderValue1), acctest.CtOverlapKey2: config.StringVariable("providervalue2"), @@ -1178,7 +1122,6 @@ func TestAccNetworkManagerTransitGatewayPeering_tags_DefaultTags_overlapping(t * ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, ConfigDirectory: config.StaticDirectory("testdata/TransitGatewayPeering/tags_defaults/"), ConfigVariables: config.Variables{ - acctest.CtRName: config.StringVariable(rName), acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ acctest.CtOverlapKey1: config.StringVariable(acctest.CtProviderValue1), acctest.CtOverlapKey2: config.StringVariable("providervalue2"), @@ -1196,7 +1139,6 @@ func TestAccNetworkManagerTransitGatewayPeering_tags_DefaultTags_overlapping(t * ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, ConfigDirectory: config.StaticDirectory("testdata/TransitGatewayPeering/tags_defaults/"), ConfigVariables: config.Variables{ - acctest.CtRName: config.StringVariable(rName), acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ acctest.CtOverlapKey1: config.StringVariable(acctest.CtProviderValue1), }), @@ -1231,7 +1173,6 @@ func TestAccNetworkManagerTransitGatewayPeering_tags_DefaultTags_overlapping(t * ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, ConfigDirectory: config.StaticDirectory("testdata/TransitGatewayPeering/tags_defaults/"), ConfigVariables: config.Variables{ - acctest.CtRName: config.StringVariable(rName), acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ acctest.CtOverlapKey1: config.StringVariable(acctest.CtProviderValue1), }), @@ -1251,7 +1192,6 @@ func TestAccNetworkManagerTransitGatewayPeering_tags_DefaultTags_updateToProvide ctx := acctest.Context(t) var v awstypes.TransitGatewayPeering resourceName := "aws_networkmanager_transit_gateway_peering.test" - rName := acctest.RandomWithPrefix(t, acctest.ResourcePrefix) acctest.ParallelTest(ctx, t, resource.TestCase{ PreCheck: func() { acctest.PreCheck(ctx, t) }, @@ -1262,7 +1202,6 @@ func TestAccNetworkManagerTransitGatewayPeering_tags_DefaultTags_updateToProvide ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, ConfigDirectory: config.StaticDirectory("testdata/TransitGatewayPeering/tags/"), ConfigVariables: config.Variables{ - acctest.CtRName: config.StringVariable(rName), acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), @@ -1294,7 +1233,6 @@ func TestAccNetworkManagerTransitGatewayPeering_tags_DefaultTags_updateToProvide ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, ConfigDirectory: config.StaticDirectory("testdata/TransitGatewayPeering/tags_defaults/"), ConfigVariables: config.Variables{ - acctest.CtRName: config.StringVariable(rName), acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), @@ -1323,7 +1261,6 @@ func TestAccNetworkManagerTransitGatewayPeering_tags_DefaultTags_updateToProvide ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, ConfigDirectory: config.StaticDirectory("testdata/TransitGatewayPeering/tags_defaults/"), ConfigVariables: config.Variables{ - acctest.CtRName: config.StringVariable(rName), acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), @@ -1341,7 +1278,6 @@ func TestAccNetworkManagerTransitGatewayPeering_tags_DefaultTags_updateToResourc ctx := acctest.Context(t) var v awstypes.TransitGatewayPeering resourceName := "aws_networkmanager_transit_gateway_peering.test" - rName := acctest.RandomWithPrefix(t, acctest.ResourcePrefix) acctest.ParallelTest(ctx, t, resource.TestCase{ PreCheck: func() { acctest.PreCheck(ctx, t) }, @@ -1352,7 +1288,6 @@ func TestAccNetworkManagerTransitGatewayPeering_tags_DefaultTags_updateToResourc ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, ConfigDirectory: config.StaticDirectory("testdata/TransitGatewayPeering/tags_defaults/"), ConfigVariables: config.Variables{ - acctest.CtRName: config.StringVariable(rName), acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), @@ -1381,7 +1316,6 @@ func TestAccNetworkManagerTransitGatewayPeering_tags_DefaultTags_updateToResourc ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, ConfigDirectory: config.StaticDirectory("testdata/TransitGatewayPeering/tags/"), ConfigVariables: config.Variables{ - acctest.CtRName: config.StringVariable(rName), acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), @@ -1413,7 +1347,6 @@ func TestAccNetworkManagerTransitGatewayPeering_tags_DefaultTags_updateToResourc ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, ConfigDirectory: config.StaticDirectory("testdata/TransitGatewayPeering/tags/"), ConfigVariables: config.Variables{ - acctest.CtRName: config.StringVariable(rName), acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), @@ -1432,7 +1365,6 @@ func TestAccNetworkManagerTransitGatewayPeering_tags_DefaultTags_emptyResourceTa ctx := acctest.Context(t) var v awstypes.TransitGatewayPeering resourceName := "aws_networkmanager_transit_gateway_peering.test" - rName := acctest.RandomWithPrefix(t, acctest.ResourcePrefix) acctest.ParallelTest(ctx, t, resource.TestCase{ PreCheck: func() { acctest.PreCheck(ctx, t) }, @@ -1443,7 +1375,6 @@ func TestAccNetworkManagerTransitGatewayPeering_tags_DefaultTags_emptyResourceTa ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, ConfigDirectory: config.StaticDirectory("testdata/TransitGatewayPeering/tags_defaults/"), ConfigVariables: config.Variables{ - acctest.CtRName: config.StringVariable(rName), acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), @@ -1477,7 +1408,6 @@ func TestAccNetworkManagerTransitGatewayPeering_tags_DefaultTags_emptyResourceTa ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, ConfigDirectory: config.StaticDirectory("testdata/TransitGatewayPeering/tags_defaults/"), ConfigVariables: config.Variables{ - acctest.CtRName: config.StringVariable(rName), acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), @@ -1499,7 +1429,6 @@ func TestAccNetworkManagerTransitGatewayPeering_tags_DefaultTags_emptyProviderOn ctx := acctest.Context(t) var v awstypes.TransitGatewayPeering resourceName := "aws_networkmanager_transit_gateway_peering.test" - rName := acctest.RandomWithPrefix(t, acctest.ResourcePrefix) acctest.ParallelTest(ctx, t, resource.TestCase{ PreCheck: func() { acctest.PreCheck(ctx, t) }, @@ -1510,7 +1439,6 @@ func TestAccNetworkManagerTransitGatewayPeering_tags_DefaultTags_emptyProviderOn ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, ConfigDirectory: config.StaticDirectory("testdata/TransitGatewayPeering/tags_defaults/"), ConfigVariables: config.Variables{ - acctest.CtRName: config.StringVariable(rName), acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ acctest.CtKey1: config.StringVariable(""), }), @@ -1538,7 +1466,6 @@ func TestAccNetworkManagerTransitGatewayPeering_tags_DefaultTags_emptyProviderOn ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, ConfigDirectory: config.StaticDirectory("testdata/TransitGatewayPeering/tags_defaults/"), ConfigVariables: config.Variables{ - acctest.CtRName: config.StringVariable(rName), acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ acctest.CtKey1: config.StringVariable(""), }), @@ -1556,7 +1483,6 @@ func TestAccNetworkManagerTransitGatewayPeering_tags_DefaultTags_nullOverlapping ctx := acctest.Context(t) var v awstypes.TransitGatewayPeering resourceName := "aws_networkmanager_transit_gateway_peering.test" - rName := acctest.RandomWithPrefix(t, acctest.ResourcePrefix) acctest.ParallelTest(ctx, t, resource.TestCase{ PreCheck: func() { acctest.PreCheck(ctx, t) }, @@ -1567,7 +1493,6 @@ func TestAccNetworkManagerTransitGatewayPeering_tags_DefaultTags_nullOverlapping ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, ConfigDirectory: config.StaticDirectory("testdata/TransitGatewayPeering/tags_defaults/"), ConfigVariables: config.Variables{ - acctest.CtRName: config.StringVariable(rName), acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ acctest.CtKey1: config.StringVariable(acctest.CtProviderValue1), }), @@ -1598,7 +1523,6 @@ func TestAccNetworkManagerTransitGatewayPeering_tags_DefaultTags_nullOverlapping ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, ConfigDirectory: config.StaticDirectory("testdata/TransitGatewayPeering/tags_defaults/"), ConfigVariables: config.Variables{ - acctest.CtRName: config.StringVariable(rName), acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ acctest.CtKey1: config.StringVariable(acctest.CtProviderValue1), }), @@ -1618,7 +1542,6 @@ func TestAccNetworkManagerTransitGatewayPeering_tags_DefaultTags_nullNonOverlapp ctx := acctest.Context(t) var v awstypes.TransitGatewayPeering resourceName := "aws_networkmanager_transit_gateway_peering.test" - rName := acctest.RandomWithPrefix(t, acctest.ResourcePrefix) acctest.ParallelTest(ctx, t, resource.TestCase{ PreCheck: func() { acctest.PreCheck(ctx, t) }, @@ -1629,7 +1552,6 @@ func TestAccNetworkManagerTransitGatewayPeering_tags_DefaultTags_nullNonOverlapp ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, ConfigDirectory: config.StaticDirectory("testdata/TransitGatewayPeering/tags_defaults/"), ConfigVariables: config.Variables{ - acctest.CtRName: config.StringVariable(rName), acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ acctest.CtProviderKey1: config.StringVariable(acctest.CtProviderValue1), }), @@ -1660,7 +1582,6 @@ func TestAccNetworkManagerTransitGatewayPeering_tags_DefaultTags_nullNonOverlapp ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, ConfigDirectory: config.StaticDirectory("testdata/TransitGatewayPeering/tags_defaults/"), ConfigVariables: config.Variables{ - acctest.CtRName: config.StringVariable(rName), acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ acctest.CtProviderKey1: config.StringVariable(acctest.CtProviderValue1), }), @@ -1680,7 +1601,6 @@ func TestAccNetworkManagerTransitGatewayPeering_tags_ComputedTag_OnCreate(t *tes ctx := acctest.Context(t) var v awstypes.TransitGatewayPeering resourceName := "aws_networkmanager_transit_gateway_peering.test" - rName := acctest.RandomWithPrefix(t, acctest.ResourcePrefix) acctest.ParallelTest(ctx, t, resource.TestCase{ PreCheck: func() { acctest.PreCheck(ctx, t) }, @@ -1691,7 +1611,6 @@ func TestAccNetworkManagerTransitGatewayPeering_tags_ComputedTag_OnCreate(t *tes ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, ConfigDirectory: config.StaticDirectory("testdata/TransitGatewayPeering/tagsComputed1/"), ConfigVariables: config.Variables{ - acctest.CtRName: config.StringVariable(rName), "unknownTagKey": config.StringVariable("computedkey1"), }, Check: resource.ComposeAggregateTestCheckFunc( @@ -1720,7 +1639,6 @@ func TestAccNetworkManagerTransitGatewayPeering_tags_ComputedTag_OnCreate(t *tes ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, ConfigDirectory: config.StaticDirectory("testdata/TransitGatewayPeering/tagsComputed1/"), ConfigVariables: config.Variables{ - acctest.CtRName: config.StringVariable(rName), "unknownTagKey": config.StringVariable("computedkey1"), }, ResourceName: resourceName, @@ -1735,7 +1653,6 @@ func TestAccNetworkManagerTransitGatewayPeering_tags_ComputedTag_OnUpdate_Add(t ctx := acctest.Context(t) var v awstypes.TransitGatewayPeering resourceName := "aws_networkmanager_transit_gateway_peering.test" - rName := acctest.RandomWithPrefix(t, acctest.ResourcePrefix) acctest.ParallelTest(ctx, t, resource.TestCase{ PreCheck: func() { acctest.PreCheck(ctx, t) }, @@ -1746,7 +1663,6 @@ func TestAccNetworkManagerTransitGatewayPeering_tags_ComputedTag_OnUpdate_Add(t ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, ConfigDirectory: config.StaticDirectory("testdata/TransitGatewayPeering/tags/"), ConfigVariables: config.Variables{ - acctest.CtRName: config.StringVariable(rName), acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), @@ -1778,7 +1694,6 @@ func TestAccNetworkManagerTransitGatewayPeering_tags_ComputedTag_OnUpdate_Add(t ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, ConfigDirectory: config.StaticDirectory("testdata/TransitGatewayPeering/tagsComputed2/"), ConfigVariables: config.Variables{ - acctest.CtRName: config.StringVariable(rName), "unknownTagKey": config.StringVariable("computedkey1"), "knownTagKey": config.StringVariable(acctest.CtKey1), "knownTagValue": config.StringVariable(acctest.CtValue1), @@ -1815,7 +1730,6 @@ func TestAccNetworkManagerTransitGatewayPeering_tags_ComputedTag_OnUpdate_Add(t ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, ConfigDirectory: config.StaticDirectory("testdata/TransitGatewayPeering/tagsComputed2/"), ConfigVariables: config.Variables{ - acctest.CtRName: config.StringVariable(rName), "unknownTagKey": config.StringVariable("computedkey1"), "knownTagKey": config.StringVariable(acctest.CtKey1), "knownTagValue": config.StringVariable(acctest.CtValue1), @@ -1832,7 +1746,6 @@ func TestAccNetworkManagerTransitGatewayPeering_tags_ComputedTag_OnUpdate_Replac ctx := acctest.Context(t) var v awstypes.TransitGatewayPeering resourceName := "aws_networkmanager_transit_gateway_peering.test" - rName := acctest.RandomWithPrefix(t, acctest.ResourcePrefix) acctest.ParallelTest(ctx, t, resource.TestCase{ PreCheck: func() { acctest.PreCheck(ctx, t) }, @@ -1843,7 +1756,6 @@ func TestAccNetworkManagerTransitGatewayPeering_tags_ComputedTag_OnUpdate_Replac ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, ConfigDirectory: config.StaticDirectory("testdata/TransitGatewayPeering/tags/"), ConfigVariables: config.Variables{ - acctest.CtRName: config.StringVariable(rName), acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), @@ -1875,7 +1787,6 @@ func TestAccNetworkManagerTransitGatewayPeering_tags_ComputedTag_OnUpdate_Replac ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, ConfigDirectory: config.StaticDirectory("testdata/TransitGatewayPeering/tagsComputed1/"), ConfigVariables: config.Variables{ - acctest.CtRName: config.StringVariable(rName), "unknownTagKey": config.StringVariable(acctest.CtKey1), }, Check: resource.ComposeAggregateTestCheckFunc( @@ -1904,7 +1815,6 @@ func TestAccNetworkManagerTransitGatewayPeering_tags_ComputedTag_OnUpdate_Replac ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, ConfigDirectory: config.StaticDirectory("testdata/TransitGatewayPeering/tagsComputed1/"), ConfigVariables: config.Variables{ - acctest.CtRName: config.StringVariable(rName), "unknownTagKey": config.StringVariable(acctest.CtKey1), }, ResourceName: resourceName, @@ -1919,7 +1829,6 @@ func TestAccNetworkManagerTransitGatewayPeering_tags_IgnoreTags_Overlap_DefaultT ctx := acctest.Context(t) var v awstypes.TransitGatewayPeering resourceName := "aws_networkmanager_transit_gateway_peering.test" - rName := acctest.RandomWithPrefix(t, acctest.ResourcePrefix) acctest.ParallelTest(ctx, t, resource.TestCase{ PreCheck: func() { acctest.PreCheck(ctx, t) }, @@ -1931,7 +1840,6 @@ func TestAccNetworkManagerTransitGatewayPeering_tags_IgnoreTags_Overlap_DefaultT ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, ConfigDirectory: config.StaticDirectory("testdata/TransitGatewayPeering/tags_ignore/"), ConfigVariables: config.Variables{ - acctest.CtRName: config.StringVariable(rName), acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ acctest.CtProviderKey1: config.StringVariable(acctest.CtProviderValue1), }), @@ -1980,7 +1888,6 @@ func TestAccNetworkManagerTransitGatewayPeering_tags_IgnoreTags_Overlap_DefaultT ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, ConfigDirectory: config.StaticDirectory("testdata/TransitGatewayPeering/tags_ignore/"), ConfigVariables: config.Variables{ - acctest.CtRName: config.StringVariable(rName), acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ acctest.CtProviderKey1: config.StringVariable(acctest.CtProviderValue1Updated), }), @@ -2029,7 +1936,6 @@ func TestAccNetworkManagerTransitGatewayPeering_tags_IgnoreTags_Overlap_DefaultT ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, ConfigDirectory: config.StaticDirectory("testdata/TransitGatewayPeering/tags_ignore/"), ConfigVariables: config.Variables{ - acctest.CtRName: config.StringVariable(rName), acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ acctest.CtProviderKey1: config.StringVariable(acctest.CtProviderValue1Again), }), @@ -2081,7 +1987,6 @@ func TestAccNetworkManagerTransitGatewayPeering_tags_IgnoreTags_Overlap_Resource ctx := acctest.Context(t) var v awstypes.TransitGatewayPeering resourceName := "aws_networkmanager_transit_gateway_peering.test" - rName := acctest.RandomWithPrefix(t, acctest.ResourcePrefix) acctest.ParallelTest(ctx, t, resource.TestCase{ PreCheck: func() { acctest.PreCheck(ctx, t) }, @@ -2093,7 +1998,6 @@ func TestAccNetworkManagerTransitGatewayPeering_tags_IgnoreTags_Overlap_Resource ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, ConfigDirectory: config.StaticDirectory("testdata/TransitGatewayPeering/tags_ignore/"), ConfigVariables: config.Variables{ - acctest.CtRName: config.StringVariable(rName), acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ acctest.CtResourceKey1: config.StringVariable(acctest.CtResourceValue1), acctest.CtResourceKey2: config.StringVariable(acctest.CtResourceValue2), @@ -2156,7 +2060,6 @@ func TestAccNetworkManagerTransitGatewayPeering_tags_IgnoreTags_Overlap_Resource ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, ConfigDirectory: config.StaticDirectory("testdata/TransitGatewayPeering/tags_ignore/"), ConfigVariables: config.Variables{ - acctest.CtRName: config.StringVariable(rName), acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ acctest.CtResourceKey1: config.StringVariable(acctest.CtResourceValue1Updated), acctest.CtResourceKey2: config.StringVariable(acctest.CtResourceValue2), @@ -2219,7 +2122,6 @@ func TestAccNetworkManagerTransitGatewayPeering_tags_IgnoreTags_Overlap_Resource ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, ConfigDirectory: config.StaticDirectory("testdata/TransitGatewayPeering/tags_ignore/"), ConfigVariables: config.Variables{ - acctest.CtRName: config.StringVariable(rName), acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ acctest.CtResourceKey1: config.StringVariable(acctest.CtResourceValue1Again), acctest.CtResourceKey2: config.StringVariable(acctest.CtResourceValue2Updated), From af3df934f9af034ee2630b54c805a7bde3402d0f Mon Sep 17 00:00:00 2001 From: Graham Davison Date: Thu, 24 Jul 2025 21:45:19 -0700 Subject: [PATCH 038/365] `aws_networkmanager_global_network` --- .../service/networkmanager/global_network.go | 3 +- .../global_network_tags_gen_test.go | 2162 +++++++++++++++++ .../networkmanager/global_network_test.go | 65 - .../testdata/GlobalNetwork/tags/main_gen.tf | 14 + .../GlobalNetwork/tagsComputed1/main_gen.tf | 18 + .../GlobalNetwork/tagsComputed2/main_gen.tf | 29 + .../GlobalNetwork/tags_defaults/main_gen.tf | 25 + .../GlobalNetwork/tags_ignore/main_gen.tf | 34 + .../testdata/tmpl/global_network_tags.gtpl | 3 + 9 files changed, 2287 insertions(+), 66 deletions(-) create mode 100644 internal/service/networkmanager/global_network_tags_gen_test.go create mode 100644 internal/service/networkmanager/testdata/GlobalNetwork/tags/main_gen.tf create mode 100644 internal/service/networkmanager/testdata/GlobalNetwork/tagsComputed1/main_gen.tf create mode 100644 internal/service/networkmanager/testdata/GlobalNetwork/tagsComputed2/main_gen.tf create mode 100644 internal/service/networkmanager/testdata/GlobalNetwork/tags_defaults/main_gen.tf create mode 100644 internal/service/networkmanager/testdata/GlobalNetwork/tags_ignore/main_gen.tf create mode 100644 internal/service/networkmanager/testdata/tmpl/global_network_tags.gtpl diff --git a/internal/service/networkmanager/global_network.go b/internal/service/networkmanager/global_network.go index e8c3818881cb..4afbf61bc39f 100644 --- a/internal/service/networkmanager/global_network.go +++ b/internal/service/networkmanager/global_network.go @@ -26,7 +26,8 @@ import ( // @SDKResource("aws_networkmanager_global_network", name="Global Network") // @Tags(identifierAttribute="arn") -// @Testing(tagsTest=false) +// @Testing(skipEmptyTags=true) +// @Testing(generator=false) func resourceGlobalNetwork() *schema.Resource { return &schema.Resource{ CreateWithoutTimeout: resourceGlobalNetworkCreate, diff --git a/internal/service/networkmanager/global_network_tags_gen_test.go b/internal/service/networkmanager/global_network_tags_gen_test.go new file mode 100644 index 000000000000..1e605f222616 --- /dev/null +++ b/internal/service/networkmanager/global_network_tags_gen_test.go @@ -0,0 +1,2162 @@ +// Code generated by internal/generate/tagstests/main.go; DO NOT EDIT. + +package networkmanager_test + +import ( + "testing" + + "github.com/hashicorp/terraform-plugin-testing/config" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/knownvalue" + "github.com/hashicorp/terraform-plugin-testing/plancheck" + "github.com/hashicorp/terraform-plugin-testing/statecheck" + "github.com/hashicorp/terraform-plugin-testing/tfjsonpath" + "github.com/hashicorp/terraform-provider-aws/internal/acctest" + "github.com/hashicorp/terraform-provider-aws/names" +) + +func TestAccNetworkManagerGlobalNetwork_tags(t *testing.T) { + ctx := acctest.Context(t) + resourceName := "aws_networkmanager_global_network.test" + + acctest.ParallelTest(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckGlobalNetworkDestroy(ctx), + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + Steps: []resource.TestStep{ + { + ConfigDirectory: config.StaticDirectory("testdata/GlobalNetwork/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckGlobalNetworkExists(ctx, resourceName), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + }, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/GlobalNetwork/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/GlobalNetwork/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1Updated), + acctest.CtKey2: config.StringVariable(acctest.CtValue2), + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckGlobalNetworkExists(ctx, resourceName), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1Updated), + acctest.CtKey2: knownvalue.StringExact(acctest.CtValue2), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1Updated), + acctest.CtKey2: knownvalue.StringExact(acctest.CtValue2), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1Updated), + acctest.CtKey2: knownvalue.StringExact(acctest.CtValue2), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1Updated), + acctest.CtKey2: knownvalue.StringExact(acctest.CtValue2), + })), + }, + }, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/GlobalNetwork/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1Updated), + acctest.CtKey2: config.StringVariable(acctest.CtValue2), + }), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/GlobalNetwork/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey2: config.StringVariable(acctest.CtValue2), + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckGlobalNetworkExists(ctx, resourceName), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey2: knownvalue.StringExact(acctest.CtValue2), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey2: knownvalue.StringExact(acctest.CtValue2), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey2: knownvalue.StringExact(acctest.CtValue2), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey2: knownvalue.StringExact(acctest.CtValue2), + })), + }, + }, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/GlobalNetwork/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey2: config.StringVariable(acctest.CtValue2), + }), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/GlobalNetwork/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: nil, + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckGlobalNetworkExists(ctx, resourceName), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{})), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{})), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{})), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{})), + }, + }, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/GlobalNetwork/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: nil, + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} + +func TestAccNetworkManagerGlobalNetwork_tags_null(t *testing.T) { + ctx := acctest.Context(t) + resourceName := "aws_networkmanager_global_network.test" + + acctest.ParallelTest(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckGlobalNetworkDestroy(ctx), + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + Steps: []resource.TestStep{ + { + ConfigDirectory: config.StaticDirectory("testdata/GlobalNetwork/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: nil, + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckGlobalNetworkExists(ctx, resourceName), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.Null()), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{})), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.Null()), + // TODO: Should be known + plancheck.ExpectUnknownValue(resourceName, tfjsonpath.New(names.AttrTagsAll)), + }, + }, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/GlobalNetwork/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: nil, + }), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/GlobalNetwork/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: nil, + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionNoop), + }, + PostApplyPostRefresh: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionNoop), + }, + }, + }, + }, + }) +} + +func TestAccNetworkManagerGlobalNetwork_tags_EmptyMap(t *testing.T) { + ctx := acctest.Context(t) + resourceName := "aws_networkmanager_global_network.test" + + acctest.ParallelTest(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckGlobalNetworkDestroy(ctx), + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + Steps: []resource.TestStep{ + { + ConfigDirectory: config.StaticDirectory("testdata/GlobalNetwork/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{}), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckGlobalNetworkExists(ctx, resourceName), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.Null()), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{})), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.Null()), + // TODO: Should be known + plancheck.ExpectUnknownValue(resourceName, tfjsonpath.New(names.AttrTagsAll)), + }, + }, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/GlobalNetwork/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{}), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/GlobalNetwork/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: nil, + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionNoop), + }, + PostApplyPostRefresh: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionNoop), + }, + }, + }, + }, + }) +} + +func TestAccNetworkManagerGlobalNetwork_tags_AddOnUpdate(t *testing.T) { + ctx := acctest.Context(t) + resourceName := "aws_networkmanager_global_network.test" + + acctest.ParallelTest(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckGlobalNetworkDestroy(ctx), + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + Steps: []resource.TestStep{ + { + ConfigDirectory: config.StaticDirectory("testdata/GlobalNetwork/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: nil, + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckGlobalNetworkExists(ctx, resourceName), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.Null()), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{})), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.Null()), + // TODO: Should be known + plancheck.ExpectUnknownValue(resourceName, tfjsonpath.New(names.AttrTagsAll)), + }, + }, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/GlobalNetwork/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckGlobalNetworkExists(ctx, resourceName), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + }, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/GlobalNetwork/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} + +func TestAccNetworkManagerGlobalNetwork_tags_EmptyTag_OnCreate(t *testing.T) { + t.Skip("Resource GlobalNetwork does not support empty tags") + + ctx := acctest.Context(t) + resourceName := "aws_networkmanager_global_network.test" + + acctest.ParallelTest(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckGlobalNetworkDestroy(ctx), + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + Steps: []resource.TestStep{ + { + ConfigDirectory: config.StaticDirectory("testdata/GlobalNetwork/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(""), + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckGlobalNetworkExists(ctx, resourceName), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(""), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(""), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(""), + })), + // TODO: Should be known + plancheck.ExpectUnknownValue(resourceName, tfjsonpath.New(names.AttrTagsAll)), + }, + }, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/GlobalNetwork/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(""), + }), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/GlobalNetwork/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: nil, + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckGlobalNetworkExists(ctx, resourceName), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{})), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{})), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{})), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{})), + }, + }, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/GlobalNetwork/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: nil, + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} + +func TestAccNetworkManagerGlobalNetwork_tags_EmptyTag_OnUpdate_Add(t *testing.T) { + t.Skip("Resource GlobalNetwork does not support empty tags") + + ctx := acctest.Context(t) + resourceName := "aws_networkmanager_global_network.test" + + acctest.ParallelTest(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckGlobalNetworkDestroy(ctx), + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + Steps: []resource.TestStep{ + { + ConfigDirectory: config.StaticDirectory("testdata/GlobalNetwork/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckGlobalNetworkExists(ctx, resourceName), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + }, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/GlobalNetwork/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + acctest.CtKey2: config.StringVariable(""), + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckGlobalNetworkExists(ctx, resourceName), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + acctest.CtKey2: knownvalue.StringExact(""), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + acctest.CtKey2: knownvalue.StringExact(""), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + acctest.CtKey2: knownvalue.StringExact(""), + })), + // TODO: Should be known + plancheck.ExpectUnknownValue(resourceName, tfjsonpath.New(names.AttrTagsAll)), + }, + }, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/GlobalNetwork/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + acctest.CtKey2: config.StringVariable(""), + }), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/GlobalNetwork/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckGlobalNetworkExists(ctx, resourceName), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + }, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/GlobalNetwork/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} + +func TestAccNetworkManagerGlobalNetwork_tags_EmptyTag_OnUpdate_Replace(t *testing.T) { + t.Skip("Resource GlobalNetwork does not support empty tags") + + ctx := acctest.Context(t) + resourceName := "aws_networkmanager_global_network.test" + + acctest.ParallelTest(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckGlobalNetworkDestroy(ctx), + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + Steps: []resource.TestStep{ + { + ConfigDirectory: config.StaticDirectory("testdata/GlobalNetwork/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckGlobalNetworkExists(ctx, resourceName), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + }, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/GlobalNetwork/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(""), + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckGlobalNetworkExists(ctx, resourceName), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(""), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(""), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(""), + })), + // TODO: Should be known + plancheck.ExpectUnknownValue(resourceName, tfjsonpath.New(names.AttrTagsAll)), + }, + }, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/GlobalNetwork/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(""), + }), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} + +func TestAccNetworkManagerGlobalNetwork_tags_DefaultTags_providerOnly(t *testing.T) { + ctx := acctest.Context(t) + resourceName := "aws_networkmanager_global_network.test" + + acctest.ParallelTest(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckGlobalNetworkDestroy(ctx), + Steps: []resource.TestStep{ + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/GlobalNetwork/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + acctest.CtResourceTags: nil, + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckGlobalNetworkExists(ctx, resourceName), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.Null()), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.Null()), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/GlobalNetwork/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + acctest.CtResourceTags: nil, + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/GlobalNetwork/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1Updated), + acctest.CtKey2: config.StringVariable(acctest.CtValue2), + }), + acctest.CtResourceTags: nil, + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckGlobalNetworkExists(ctx, resourceName), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{})), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1Updated), + acctest.CtKey2: knownvalue.StringExact(acctest.CtValue2), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{})), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1Updated), + acctest.CtKey2: knownvalue.StringExact(acctest.CtValue2), + })), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/GlobalNetwork/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1Updated), + acctest.CtKey2: config.StringVariable(acctest.CtValue2), + }), + acctest.CtResourceTags: nil, + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/GlobalNetwork/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey2: config.StringVariable(acctest.CtValue2), + }), + acctest.CtResourceTags: nil, + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckGlobalNetworkExists(ctx, resourceName), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{})), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey2: knownvalue.StringExact(acctest.CtValue2), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{})), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey2: knownvalue.StringExact(acctest.CtValue2), + })), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/GlobalNetwork/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey2: config.StringVariable(acctest.CtValue2), + }), + acctest.CtResourceTags: nil, + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/GlobalNetwork/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: nil, + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckGlobalNetworkExists(ctx, resourceName), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{})), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{})), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{})), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{})), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/GlobalNetwork/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: nil, + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} + +func TestAccNetworkManagerGlobalNetwork_tags_DefaultTags_nonOverlapping(t *testing.T) { + ctx := acctest.Context(t) + resourceName := "aws_networkmanager_global_network.test" + + acctest.ParallelTest(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckGlobalNetworkDestroy(ctx), + Steps: []resource.TestStep{ + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/GlobalNetwork/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtProviderKey1: config.StringVariable(acctest.CtProviderValue1), + }), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtResourceKey1: config.StringVariable(acctest.CtResourceValue1), + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckGlobalNetworkExists(ctx, resourceName), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtProviderKey1: knownvalue.StringExact(acctest.CtProviderValue1), + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtProviderKey1: knownvalue.StringExact(acctest.CtProviderValue1), + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), + })), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/GlobalNetwork/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtProviderKey1: config.StringVariable(acctest.CtProviderValue1), + }), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtResourceKey1: config.StringVariable(acctest.CtResourceValue1), + }), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/GlobalNetwork/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtProviderKey1: config.StringVariable(acctest.CtProviderValue1Updated), + }), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtResourceKey1: config.StringVariable(acctest.CtResourceValue1Updated), + acctest.CtResourceKey2: config.StringVariable(acctest.CtResourceValue2), + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckGlobalNetworkExists(ctx, resourceName), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1Updated), + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtProviderKey1: knownvalue.StringExact(acctest.CtProviderValue1Updated), + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1Updated), + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1Updated), + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtProviderKey1: knownvalue.StringExact(acctest.CtProviderValue1Updated), + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1Updated), + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/GlobalNetwork/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtProviderKey1: config.StringVariable(acctest.CtProviderValue1Updated), + }), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtResourceKey1: config.StringVariable(acctest.CtResourceValue1Updated), + acctest.CtResourceKey2: config.StringVariable(acctest.CtResourceValue2), + }), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/GlobalNetwork/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: nil, + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckGlobalNetworkExists(ctx, resourceName), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{})), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{})), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{})), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{})), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/GlobalNetwork/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: nil, + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} + +func TestAccNetworkManagerGlobalNetwork_tags_DefaultTags_overlapping(t *testing.T) { + ctx := acctest.Context(t) + resourceName := "aws_networkmanager_global_network.test" + + acctest.ParallelTest(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckGlobalNetworkDestroy(ctx), + Steps: []resource.TestStep{ + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/GlobalNetwork/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtOverlapKey1: config.StringVariable(acctest.CtProviderValue1), + }), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtOverlapKey1: config.StringVariable(acctest.CtResourceValue1), + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckGlobalNetworkExists(ctx, resourceName), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtOverlapKey1: knownvalue.StringExact(acctest.CtResourceValue1), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtOverlapKey1: knownvalue.StringExact(acctest.CtResourceValue1), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtOverlapKey1: knownvalue.StringExact(acctest.CtResourceValue1), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtOverlapKey1: knownvalue.StringExact(acctest.CtResourceValue1), + })), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/GlobalNetwork/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtOverlapKey1: config.StringVariable(acctest.CtProviderValue1), + }), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtOverlapKey1: config.StringVariable(acctest.CtResourceValue1), + }), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/GlobalNetwork/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtOverlapKey1: config.StringVariable(acctest.CtProviderValue1), + acctest.CtOverlapKey2: config.StringVariable("providervalue2"), + }), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtOverlapKey1: config.StringVariable(acctest.CtResourceValue1), + acctest.CtOverlapKey2: config.StringVariable(acctest.CtResourceValue2), + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckGlobalNetworkExists(ctx, resourceName), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtOverlapKey1: knownvalue.StringExact(acctest.CtResourceValue1), + acctest.CtOverlapKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtOverlapKey1: knownvalue.StringExact(acctest.CtResourceValue1), + acctest.CtOverlapKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtOverlapKey1: knownvalue.StringExact(acctest.CtResourceValue1), + acctest.CtOverlapKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtOverlapKey1: knownvalue.StringExact(acctest.CtResourceValue1), + acctest.CtOverlapKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/GlobalNetwork/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtOverlapKey1: config.StringVariable(acctest.CtProviderValue1), + acctest.CtOverlapKey2: config.StringVariable("providervalue2"), + }), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtOverlapKey1: config.StringVariable(acctest.CtResourceValue1), + acctest.CtOverlapKey2: config.StringVariable(acctest.CtResourceValue2), + }), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/GlobalNetwork/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtOverlapKey1: config.StringVariable(acctest.CtProviderValue1), + }), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtOverlapKey1: config.StringVariable(acctest.CtResourceValue2), + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckGlobalNetworkExists(ctx, resourceName), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtOverlapKey1: knownvalue.StringExact(acctest.CtResourceValue2), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtOverlapKey1: knownvalue.StringExact(acctest.CtResourceValue2), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtOverlapKey1: knownvalue.StringExact(acctest.CtResourceValue2), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtOverlapKey1: knownvalue.StringExact(acctest.CtResourceValue2), + })), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/GlobalNetwork/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtOverlapKey1: config.StringVariable(acctest.CtProviderValue1), + }), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtOverlapKey1: config.StringVariable(acctest.CtResourceValue2), + }), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} + +func TestAccNetworkManagerGlobalNetwork_tags_DefaultTags_updateToProviderOnly(t *testing.T) { + ctx := acctest.Context(t) + resourceName := "aws_networkmanager_global_network.test" + + acctest.ParallelTest(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckGlobalNetworkDestroy(ctx), + Steps: []resource.TestStep{ + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/GlobalNetwork/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckGlobalNetworkExists(ctx, resourceName), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/GlobalNetwork/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + acctest.CtResourceTags: nil, + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckGlobalNetworkExists(ctx, resourceName), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{})), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{})), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/GlobalNetwork/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + acctest.CtResourceTags: nil, + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} + +func TestAccNetworkManagerGlobalNetwork_tags_DefaultTags_updateToResourceOnly(t *testing.T) { + ctx := acctest.Context(t) + resourceName := "aws_networkmanager_global_network.test" + + acctest.ParallelTest(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckGlobalNetworkDestroy(ctx), + Steps: []resource.TestStep{ + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/GlobalNetwork/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + acctest.CtResourceTags: nil, + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckGlobalNetworkExists(ctx, resourceName), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.Null()), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.Null()), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/GlobalNetwork/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckGlobalNetworkExists(ctx, resourceName), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionNoop), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/GlobalNetwork/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} + +func TestAccNetworkManagerGlobalNetwork_tags_DefaultTags_emptyResourceTag(t *testing.T) { + t.Skip("Resource GlobalNetwork does not support empty tags") + + ctx := acctest.Context(t) + resourceName := "aws_networkmanager_global_network.test" + + acctest.ParallelTest(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckGlobalNetworkDestroy(ctx), + Steps: []resource.TestStep{ + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/GlobalNetwork/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(""), + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckGlobalNetworkExists(ctx, resourceName), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(""), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(""), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(""), + })), + // TODO: Should be known + plancheck.ExpectUnknownValue(resourceName, tfjsonpath.New(names.AttrTagsAll)), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/GlobalNetwork/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(""), + }), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} + +func TestAccNetworkManagerGlobalNetwork_tags_DefaultTags_emptyProviderOnlyTag(t *testing.T) { + t.Skip("Resource GlobalNetwork does not support empty tags") + + ctx := acctest.Context(t) + resourceName := "aws_networkmanager_global_network.test" + + acctest.ParallelTest(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckGlobalNetworkDestroy(ctx), + Steps: []resource.TestStep{ + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/GlobalNetwork/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(""), + }), + acctest.CtResourceTags: nil, + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckGlobalNetworkExists(ctx, resourceName), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.Null()), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(""), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.Null()), + // TODO: Should be known + plancheck.ExpectUnknownValue(resourceName, tfjsonpath.New(names.AttrTagsAll)), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/GlobalNetwork/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(""), + }), + acctest.CtResourceTags: nil, + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} + +func TestAccNetworkManagerGlobalNetwork_tags_DefaultTags_nullOverlappingResourceTag(t *testing.T) { + ctx := acctest.Context(t) + resourceName := "aws_networkmanager_global_network.test" + + acctest.ParallelTest(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckGlobalNetworkDestroy(ctx), + Steps: []resource.TestStep{ + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/GlobalNetwork/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtProviderValue1), + }), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: nil, + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckGlobalNetworkExists(ctx, resourceName), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.Null()), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtProviderValue1), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.Null()), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtProviderValue1), + })), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/GlobalNetwork/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtProviderValue1), + }), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: nil, + }), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} + +func TestAccNetworkManagerGlobalNetwork_tags_DefaultTags_nullNonOverlappingResourceTag(t *testing.T) { + ctx := acctest.Context(t) + resourceName := "aws_networkmanager_global_network.test" + + acctest.ParallelTest(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckGlobalNetworkDestroy(ctx), + Steps: []resource.TestStep{ + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/GlobalNetwork/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtProviderKey1: config.StringVariable(acctest.CtProviderValue1), + }), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtResourceKey1: nil, + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckGlobalNetworkExists(ctx, resourceName), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.Null()), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtProviderKey1: knownvalue.StringExact(acctest.CtProviderValue1), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.Null()), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtProviderKey1: knownvalue.StringExact(acctest.CtProviderValue1), + })), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/GlobalNetwork/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtProviderKey1: config.StringVariable(acctest.CtProviderValue1), + }), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtResourceKey1: nil, + }), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} + +func TestAccNetworkManagerGlobalNetwork_tags_ComputedTag_OnCreate(t *testing.T) { + ctx := acctest.Context(t) + resourceName := "aws_networkmanager_global_network.test" + + acctest.ParallelTest(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckGlobalNetworkDestroy(ctx), + Steps: []resource.TestStep{ + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/GlobalNetwork/tagsComputed1/"), + ConfigVariables: config.Variables{ + "unknownTagKey": config.StringVariable("computedkey1"), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckGlobalNetworkExists(ctx, resourceName), + resource.TestCheckResourceAttrPair(resourceName, "tags.computedkey1", "null_resource.test", names.AttrID), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapSizeExact(1)), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapSizeExact(1)), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectUnknownValue(resourceName, tfjsonpath.New(names.AttrTags)), + plancheck.ExpectUnknownValue(resourceName, tfjsonpath.New(names.AttrTagsAll)), + }, + PostApplyPreRefresh: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionNoop), + }, + PostApplyPostRefresh: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionNoop), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/GlobalNetwork/tagsComputed1/"), + ConfigVariables: config.Variables{ + "unknownTagKey": config.StringVariable("computedkey1"), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} + +func TestAccNetworkManagerGlobalNetwork_tags_ComputedTag_OnUpdate_Add(t *testing.T) { + ctx := acctest.Context(t) + resourceName := "aws_networkmanager_global_network.test" + + acctest.ParallelTest(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckGlobalNetworkDestroy(ctx), + Steps: []resource.TestStep{ + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/GlobalNetwork/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckGlobalNetworkExists(ctx, resourceName), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/GlobalNetwork/tagsComputed2/"), + ConfigVariables: config.Variables{ + "unknownTagKey": config.StringVariable("computedkey1"), + "knownTagKey": config.StringVariable(acctest.CtKey1), + "knownTagValue": config.StringVariable(acctest.CtValue1), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckGlobalNetworkExists(ctx, resourceName), + resource.TestCheckResourceAttrPair(resourceName, "tags.computedkey1", "null_resource.test", names.AttrID), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapSizeExact(2)), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapPartial(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapSizeExact(2)), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapPartial(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectUnknownValue(resourceName, tfjsonpath.New(names.AttrTags)), + plancheck.ExpectUnknownValue(resourceName, tfjsonpath.New(names.AttrTagsAll)), + }, + PostApplyPreRefresh: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionNoop), + }, + PostApplyPostRefresh: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionNoop), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/GlobalNetwork/tagsComputed2/"), + ConfigVariables: config.Variables{ + "unknownTagKey": config.StringVariable("computedkey1"), + "knownTagKey": config.StringVariable(acctest.CtKey1), + "knownTagValue": config.StringVariable(acctest.CtValue1), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} + +func TestAccNetworkManagerGlobalNetwork_tags_ComputedTag_OnUpdate_Replace(t *testing.T) { + ctx := acctest.Context(t) + resourceName := "aws_networkmanager_global_network.test" + + acctest.ParallelTest(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckGlobalNetworkDestroy(ctx), + Steps: []resource.TestStep{ + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/GlobalNetwork/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckGlobalNetworkExists(ctx, resourceName), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/GlobalNetwork/tagsComputed1/"), + ConfigVariables: config.Variables{ + "unknownTagKey": config.StringVariable(acctest.CtKey1), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckGlobalNetworkExists(ctx, resourceName), + resource.TestCheckResourceAttrPair(resourceName, acctest.CtTagsKey1, "null_resource.test", names.AttrID), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapSizeExact(1)), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapSizeExact(1)), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectUnknownValue(resourceName, tfjsonpath.New(names.AttrTags)), + plancheck.ExpectUnknownValue(resourceName, tfjsonpath.New(names.AttrTagsAll)), + }, + PostApplyPreRefresh: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionNoop), + }, + PostApplyPostRefresh: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionNoop), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/GlobalNetwork/tagsComputed1/"), + ConfigVariables: config.Variables{ + "unknownTagKey": config.StringVariable(acctest.CtKey1), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} + +func TestAccNetworkManagerGlobalNetwork_tags_IgnoreTags_Overlap_DefaultTag(t *testing.T) { + ctx := acctest.Context(t) + resourceName := "aws_networkmanager_global_network.test" + + acctest.ParallelTest(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckGlobalNetworkDestroy(ctx), + Steps: []resource.TestStep{ + // 1: Create + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/GlobalNetwork/tags_ignore/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtProviderKey1: config.StringVariable(acctest.CtProviderValue1), + }), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtResourceKey1: config.StringVariable(acctest.CtResourceValue1), + }), + "ignore_tag_keys": config.SetVariable( + config.StringVariable(acctest.CtProviderKey1), + ), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckGlobalNetworkExists(ctx, resourceName), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), + })), + expectFullResourceTags(ctx, resourceName, knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtProviderKey1: knownvalue.StringExact(acctest.CtProviderValue1), // TODO: Should not be set + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), + })), + }, + PostApplyPreRefresh: []plancheck.PlanCheck{ + plancheck.ExpectEmptyPlan(), + }, + PostApplyPostRefresh: []plancheck.PlanCheck{ + plancheck.ExpectEmptyPlan(), + }, + }, + }, + // 2: Update ignored tag only + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/GlobalNetwork/tags_ignore/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtProviderKey1: config.StringVariable(acctest.CtProviderValue1Updated), + }), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtResourceKey1: config.StringVariable(acctest.CtResourceValue1), + }), + "ignore_tag_keys": config.SetVariable( + config.StringVariable(acctest.CtProviderKey1), + ), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckGlobalNetworkExists(ctx, resourceName), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), + })), + expectFullResourceTags(ctx, resourceName, knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtProviderKey1: knownvalue.StringExact(acctest.CtProviderValue1), // TODO: Should not be set + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionNoop), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), + })), + }, + PostApplyPreRefresh: []plancheck.PlanCheck{ + plancheck.ExpectEmptyPlan(), + }, + PostApplyPostRefresh: []plancheck.PlanCheck{ + plancheck.ExpectEmptyPlan(), + }, + }, + }, + // 3: Update both tags + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/GlobalNetwork/tags_ignore/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtProviderKey1: config.StringVariable(acctest.CtProviderValue1Again), + }), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtResourceKey1: config.StringVariable(acctest.CtResourceValue1Updated), + }), + "ignore_tag_keys": config.SetVariable( + config.StringVariable(acctest.CtProviderKey1), + ), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckGlobalNetworkExists(ctx, resourceName), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1Updated), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1Updated), + })), + expectFullResourceTags(ctx, resourceName, knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtProviderKey1: knownvalue.StringExact(acctest.CtProviderValue1), // TODO: Should not be set + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1Updated), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1Updated), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1Updated), + })), + }, + PostApplyPreRefresh: []plancheck.PlanCheck{ + plancheck.ExpectEmptyPlan(), + }, + PostApplyPostRefresh: []plancheck.PlanCheck{ + plancheck.ExpectEmptyPlan(), + }, + }, + }, + }, + }) +} + +func TestAccNetworkManagerGlobalNetwork_tags_IgnoreTags_Overlap_ResourceTag(t *testing.T) { + ctx := acctest.Context(t) + resourceName := "aws_networkmanager_global_network.test" + + acctest.ParallelTest(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckGlobalNetworkDestroy(ctx), + Steps: []resource.TestStep{ + // 1: Create + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/GlobalNetwork/tags_ignore/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtResourceKey1: config.StringVariable(acctest.CtResourceValue1), + acctest.CtResourceKey2: config.StringVariable(acctest.CtResourceValue2), + }), + "ignore_tag_keys": config.SetVariable( + config.StringVariable(acctest.CtResourceKey1), + ), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckGlobalNetworkExists(ctx, resourceName), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + expectFullResourceTags(ctx, resourceName, knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), // TODO: Should not be set + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + }, + PostApplyPreRefresh: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + }, + PostApplyPostRefresh: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + }, + }, + ExpectNonEmptyPlan: true, + }, + // 2: Update ignored tag + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/GlobalNetwork/tags_ignore/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtResourceKey1: config.StringVariable(acctest.CtResourceValue1Updated), + acctest.CtResourceKey2: config.StringVariable(acctest.CtResourceValue2), + }), + "ignore_tag_keys": config.SetVariable( + config.StringVariable(acctest.CtResourceKey1), + ), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckGlobalNetworkExists(ctx, resourceName), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + expectFullResourceTags(ctx, resourceName, knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), // TODO: Should not be set + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1Updated), + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + }, + PostApplyPreRefresh: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1Updated), + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + }, + PostApplyPostRefresh: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1Updated), + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + }, + }, + ExpectNonEmptyPlan: true, + }, + // 3: Update both tags + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/GlobalNetwork/tags_ignore/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtResourceKey1: config.StringVariable(acctest.CtResourceValue1Again), + acctest.CtResourceKey2: config.StringVariable(acctest.CtResourceValue2Updated), + }), + "ignore_tag_keys": config.SetVariable( + config.StringVariable(acctest.CtResourceKey1), + ), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckGlobalNetworkExists(ctx, resourceName), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2Updated), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2Updated), + })), + expectFullResourceTags(ctx, resourceName, knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), // TODO: Should not be set + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2Updated), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1Again), + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2Updated), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2Updated), + })), + }, + PostApplyPreRefresh: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1Again), + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2Updated), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2Updated), + })), + }, + PostApplyPostRefresh: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1Again), + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2Updated), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2Updated), + })), + }, + }, + ExpectNonEmptyPlan: true, + }, + }, + }) +} diff --git a/internal/service/networkmanager/global_network_test.go b/internal/service/networkmanager/global_network_test.go index 6959f0c41d34..f57542435e8c 100644 --- a/internal/service/networkmanager/global_network_test.go +++ b/internal/service/networkmanager/global_network_test.go @@ -68,50 +68,6 @@ func TestAccNetworkManagerGlobalNetwork_disappears(t *testing.T) { }) } -func TestAccNetworkManagerGlobalNetwork_tags(t *testing.T) { - ctx := acctest.Context(t) - resourceName := "aws_networkmanager_global_network.test" - - resource.ParallelTest(t, resource.TestCase{ - PreCheck: func() { acctest.PreCheck(ctx, t) }, - ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), - ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, - CheckDestroy: testAccCheckGlobalNetworkDestroy(ctx), - Steps: []resource.TestStep{ - { - Config: testAccGlobalNetworkConfig_tags1(acctest.CtKey1, acctest.CtValue1), - Check: resource.ComposeTestCheckFunc( - testAccCheckGlobalNetworkExists(ctx, resourceName), - resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, "1"), - resource.TestCheckResourceAttr(resourceName, acctest.CtTagsKey1, acctest.CtValue1), - ), - }, - { - ResourceName: resourceName, - ImportState: true, - ImportStateVerify: true, - }, - { - Config: testAccGlobalNetworkConfig_tags2(acctest.CtKey1, acctest.CtValue1Updated, acctest.CtKey2, acctest.CtValue2), - Check: resource.ComposeTestCheckFunc( - testAccCheckGlobalNetworkExists(ctx, resourceName), - resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, "2"), - resource.TestCheckResourceAttr(resourceName, acctest.CtTagsKey1, acctest.CtValue1Updated), - resource.TestCheckResourceAttr(resourceName, acctest.CtTagsKey2, acctest.CtValue2), - ), - }, - { - Config: testAccGlobalNetworkConfig_tags1(acctest.CtKey2, acctest.CtValue2), - Check: resource.ComposeTestCheckFunc( - testAccCheckGlobalNetworkExists(ctx, resourceName), - resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, "1"), - resource.TestCheckResourceAttr(resourceName, acctest.CtTagsKey2, acctest.CtValue2), - ), - }, - }, - }) -} - func TestAccNetworkManagerGlobalNetwork_description(t *testing.T) { ctx := acctest.Context(t) resourceName := "aws_networkmanager_global_network.test" @@ -196,27 +152,6 @@ resource "aws_networkmanager_global_network" "test" {} ` } -func testAccGlobalNetworkConfig_tags1(tagKey1, tagValue1 string) string { - return fmt.Sprintf(` -resource "aws_networkmanager_global_network" "test" { - tags = { - %[1]q = %[2]q - } -} -`, tagKey1, tagValue1) -} - -func testAccGlobalNetworkConfig_tags2(tagKey1, tagValue1, tagKey2, tagValue2 string) string { - return fmt.Sprintf(` -resource "aws_networkmanager_global_network" "test" { - tags = { - %[1]q = %[2]q - %[3]q = %[4]q - } -} -`, tagKey1, tagValue1, tagKey2, tagValue2) -} - func testAccGlobalNetworkConfig_description(description string) string { return fmt.Sprintf(` resource "aws_networkmanager_global_network" "test" { diff --git a/internal/service/networkmanager/testdata/GlobalNetwork/tags/main_gen.tf b/internal/service/networkmanager/testdata/GlobalNetwork/tags/main_gen.tf new file mode 100644 index 000000000000..2ef36c17448f --- /dev/null +++ b/internal/service/networkmanager/testdata/GlobalNetwork/tags/main_gen.tf @@ -0,0 +1,14 @@ +# Copyright (c) HashiCorp, Inc. +# SPDX-License-Identifier: MPL-2.0 + +resource "aws_networkmanager_global_network" "test" { + + tags = var.resource_tags +} + +variable "resource_tags" { + description = "Tags to set on resource. To specify no tags, set to `null`" + # Not setting a default, so that this must explicitly be set to `null` to specify no tags + type = map(string) + nullable = true +} diff --git a/internal/service/networkmanager/testdata/GlobalNetwork/tagsComputed1/main_gen.tf b/internal/service/networkmanager/testdata/GlobalNetwork/tagsComputed1/main_gen.tf new file mode 100644 index 000000000000..063e38bd4465 --- /dev/null +++ b/internal/service/networkmanager/testdata/GlobalNetwork/tagsComputed1/main_gen.tf @@ -0,0 +1,18 @@ +# Copyright (c) HashiCorp, Inc. +# SPDX-License-Identifier: MPL-2.0 + +provider "null" {} + +resource "aws_networkmanager_global_network" "test" { + + tags = { + (var.unknownTagKey) = null_resource.test.id + } +} + +resource "null_resource" "test" {} + +variable "unknownTagKey" { + type = string + nullable = false +} diff --git a/internal/service/networkmanager/testdata/GlobalNetwork/tagsComputed2/main_gen.tf b/internal/service/networkmanager/testdata/GlobalNetwork/tagsComputed2/main_gen.tf new file mode 100644 index 000000000000..ef0f3129f2aa --- /dev/null +++ b/internal/service/networkmanager/testdata/GlobalNetwork/tagsComputed2/main_gen.tf @@ -0,0 +1,29 @@ +# Copyright (c) HashiCorp, Inc. +# SPDX-License-Identifier: MPL-2.0 + +provider "null" {} + +resource "aws_networkmanager_global_network" "test" { + + tags = { + (var.unknownTagKey) = null_resource.test.id + (var.knownTagKey) = var.knownTagValue + } +} + +resource "null_resource" "test" {} + +variable "unknownTagKey" { + type = string + nullable = false +} + +variable "knownTagKey" { + type = string + nullable = false +} + +variable "knownTagValue" { + type = string + nullable = false +} diff --git a/internal/service/networkmanager/testdata/GlobalNetwork/tags_defaults/main_gen.tf b/internal/service/networkmanager/testdata/GlobalNetwork/tags_defaults/main_gen.tf new file mode 100644 index 000000000000..0ee6d531d148 --- /dev/null +++ b/internal/service/networkmanager/testdata/GlobalNetwork/tags_defaults/main_gen.tf @@ -0,0 +1,25 @@ +# Copyright (c) HashiCorp, Inc. +# SPDX-License-Identifier: MPL-2.0 + +provider "aws" { + default_tags { + tags = var.provider_tags + } +} + +resource "aws_networkmanager_global_network" "test" { + + tags = var.resource_tags +} + +variable "resource_tags" { + description = "Tags to set on resource. To specify no tags, set to `null`" + # Not setting a default, so that this must explicitly be set to `null` to specify no tags + type = map(string) + nullable = true +} + +variable "provider_tags" { + type = map(string) + nullable = false +} diff --git a/internal/service/networkmanager/testdata/GlobalNetwork/tags_ignore/main_gen.tf b/internal/service/networkmanager/testdata/GlobalNetwork/tags_ignore/main_gen.tf new file mode 100644 index 000000000000..1dcc92a42654 --- /dev/null +++ b/internal/service/networkmanager/testdata/GlobalNetwork/tags_ignore/main_gen.tf @@ -0,0 +1,34 @@ +# Copyright (c) HashiCorp, Inc. +# SPDX-License-Identifier: MPL-2.0 + +provider "aws" { + default_tags { + tags = var.provider_tags + } + ignore_tags { + keys = var.ignore_tag_keys + } +} + +resource "aws_networkmanager_global_network" "test" { + + tags = var.resource_tags +} + +variable "resource_tags" { + description = "Tags to set on resource. To specify no tags, set to `null`" + # Not setting a default, so that this must explicitly be set to `null` to specify no tags + type = map(string) + nullable = true +} + +variable "provider_tags" { + type = map(string) + nullable = true + default = null +} + +variable "ignore_tag_keys" { + type = set(string) + nullable = false +} diff --git a/internal/service/networkmanager/testdata/tmpl/global_network_tags.gtpl b/internal/service/networkmanager/testdata/tmpl/global_network_tags.gtpl new file mode 100644 index 000000000000..53b724e41543 --- /dev/null +++ b/internal/service/networkmanager/testdata/tmpl/global_network_tags.gtpl @@ -0,0 +1,3 @@ +resource "aws_networkmanager_global_network" "test" { +{{- template "tags" . }} +} From 5e2545a53bd3486d91d9ab142e2343379f09e54e Mon Sep 17 00:00:00 2001 From: Graham Davison Date: Thu, 24 Jul 2025 22:07:38 -0700 Subject: [PATCH 039/365] `aws_networkmanager_core_network` --- .../service/networkmanager/core_network.go | 4 +- .../core_network_tags_gen_test.go | 2255 +++++++++++++++++ .../networkmanager/core_network_test.go | 74 - .../testdata/CoreNetwork/tags/main_gen.tf | 17 + .../CoreNetwork/tagsComputed1/main_gen.tf | 21 + .../CoreNetwork/tagsComputed2/main_gen.tf | 32 + .../CoreNetwork/tags_defaults/main_gen.tf | 28 + .../CoreNetwork/tags_ignore/main_gen.tf | 37 + .../testdata/tmpl/core_network_tags.gtpl | 6 + 9 files changed, 2399 insertions(+), 75 deletions(-) create mode 100644 internal/service/networkmanager/core_network_tags_gen_test.go create mode 100644 internal/service/networkmanager/testdata/CoreNetwork/tags/main_gen.tf create mode 100644 internal/service/networkmanager/testdata/CoreNetwork/tagsComputed1/main_gen.tf create mode 100644 internal/service/networkmanager/testdata/CoreNetwork/tagsComputed2/main_gen.tf create mode 100644 internal/service/networkmanager/testdata/CoreNetwork/tags_defaults/main_gen.tf create mode 100644 internal/service/networkmanager/testdata/CoreNetwork/tags_ignore/main_gen.tf create mode 100644 internal/service/networkmanager/testdata/tmpl/core_network_tags.gtpl diff --git a/internal/service/networkmanager/core_network.go b/internal/service/networkmanager/core_network.go index d9176b250ebf..1270ef17655c 100644 --- a/internal/service/networkmanager/core_network.go +++ b/internal/service/networkmanager/core_network.go @@ -43,7 +43,9 @@ const ( // @SDKResource("aws_networkmanager_core_network", name="Core Network") // @Tags(identifierAttribute="arn") -// @Testing(tagsTest=false) +// @Testing(skipEmptyTags=true) +// @Testing(generator=false) +// @Testing(importIgnore="create_base_policy") func resourceCoreNetwork() *schema.Resource { return &schema.Resource{ CreateWithoutTimeout: resourceCoreNetworkCreate, diff --git a/internal/service/networkmanager/core_network_tags_gen_test.go b/internal/service/networkmanager/core_network_tags_gen_test.go new file mode 100644 index 000000000000..3d3119dd9e87 --- /dev/null +++ b/internal/service/networkmanager/core_network_tags_gen_test.go @@ -0,0 +1,2255 @@ +// Code generated by internal/generate/tagstests/main.go; DO NOT EDIT. + +package networkmanager_test + +import ( + "testing" + + "github.com/hashicorp/terraform-plugin-testing/config" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/knownvalue" + "github.com/hashicorp/terraform-plugin-testing/plancheck" + "github.com/hashicorp/terraform-plugin-testing/statecheck" + "github.com/hashicorp/terraform-plugin-testing/tfjsonpath" + "github.com/hashicorp/terraform-provider-aws/internal/acctest" + "github.com/hashicorp/terraform-provider-aws/names" +) + +func TestAccNetworkManagerCoreNetwork_tags(t *testing.T) { + ctx := acctest.Context(t) + resourceName := "aws_networkmanager_core_network.test" + + acctest.ParallelTest(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckCoreNetworkDestroy(ctx), + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + Steps: []resource.TestStep{ + { + ConfigDirectory: config.StaticDirectory("testdata/CoreNetwork/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckCoreNetworkExists(ctx, resourceName), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + }, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/CoreNetwork/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{ + "create_base_policy", + }, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/CoreNetwork/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1Updated), + acctest.CtKey2: config.StringVariable(acctest.CtValue2), + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckCoreNetworkExists(ctx, resourceName), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1Updated), + acctest.CtKey2: knownvalue.StringExact(acctest.CtValue2), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1Updated), + acctest.CtKey2: knownvalue.StringExact(acctest.CtValue2), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1Updated), + acctest.CtKey2: knownvalue.StringExact(acctest.CtValue2), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1Updated), + acctest.CtKey2: knownvalue.StringExact(acctest.CtValue2), + })), + }, + }, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/CoreNetwork/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1Updated), + acctest.CtKey2: config.StringVariable(acctest.CtValue2), + }), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{ + "create_base_policy", + }, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/CoreNetwork/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey2: config.StringVariable(acctest.CtValue2), + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckCoreNetworkExists(ctx, resourceName), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey2: knownvalue.StringExact(acctest.CtValue2), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey2: knownvalue.StringExact(acctest.CtValue2), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey2: knownvalue.StringExact(acctest.CtValue2), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey2: knownvalue.StringExact(acctest.CtValue2), + })), + }, + }, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/CoreNetwork/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey2: config.StringVariable(acctest.CtValue2), + }), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{ + "create_base_policy", + }, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/CoreNetwork/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: nil, + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckCoreNetworkExists(ctx, resourceName), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{})), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{})), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{})), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{})), + }, + }, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/CoreNetwork/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: nil, + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{ + "create_base_policy", + }, + }, + }, + }) +} + +func TestAccNetworkManagerCoreNetwork_tags_null(t *testing.T) { + ctx := acctest.Context(t) + resourceName := "aws_networkmanager_core_network.test" + + acctest.ParallelTest(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckCoreNetworkDestroy(ctx), + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + Steps: []resource.TestStep{ + { + ConfigDirectory: config.StaticDirectory("testdata/CoreNetwork/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: nil, + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckCoreNetworkExists(ctx, resourceName), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.Null()), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{})), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.Null()), + // TODO: Should be known + plancheck.ExpectUnknownValue(resourceName, tfjsonpath.New(names.AttrTagsAll)), + }, + }, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/CoreNetwork/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: nil, + }), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{ + "create_base_policy", + }, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/CoreNetwork/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: nil, + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionNoop), + }, + PostApplyPostRefresh: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionNoop), + }, + }, + }, + }, + }) +} + +func TestAccNetworkManagerCoreNetwork_tags_EmptyMap(t *testing.T) { + ctx := acctest.Context(t) + resourceName := "aws_networkmanager_core_network.test" + + acctest.ParallelTest(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckCoreNetworkDestroy(ctx), + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + Steps: []resource.TestStep{ + { + ConfigDirectory: config.StaticDirectory("testdata/CoreNetwork/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{}), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckCoreNetworkExists(ctx, resourceName), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.Null()), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{})), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.Null()), + // TODO: Should be known + plancheck.ExpectUnknownValue(resourceName, tfjsonpath.New(names.AttrTagsAll)), + }, + }, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/CoreNetwork/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{}), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{ + "create_base_policy", + }, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/CoreNetwork/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: nil, + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionNoop), + }, + PostApplyPostRefresh: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionNoop), + }, + }, + }, + }, + }) +} + +func TestAccNetworkManagerCoreNetwork_tags_AddOnUpdate(t *testing.T) { + ctx := acctest.Context(t) + resourceName := "aws_networkmanager_core_network.test" + + acctest.ParallelTest(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckCoreNetworkDestroy(ctx), + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + Steps: []resource.TestStep{ + { + ConfigDirectory: config.StaticDirectory("testdata/CoreNetwork/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: nil, + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckCoreNetworkExists(ctx, resourceName), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.Null()), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{})), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.Null()), + // TODO: Should be known + plancheck.ExpectUnknownValue(resourceName, tfjsonpath.New(names.AttrTagsAll)), + }, + }, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/CoreNetwork/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckCoreNetworkExists(ctx, resourceName), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + }, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/CoreNetwork/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{ + "create_base_policy", + }, + }, + }, + }) +} + +func TestAccNetworkManagerCoreNetwork_tags_EmptyTag_OnCreate(t *testing.T) { + t.Skip("Resource CoreNetwork does not support empty tags") + + ctx := acctest.Context(t) + resourceName := "aws_networkmanager_core_network.test" + + acctest.ParallelTest(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckCoreNetworkDestroy(ctx), + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + Steps: []resource.TestStep{ + { + ConfigDirectory: config.StaticDirectory("testdata/CoreNetwork/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(""), + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckCoreNetworkExists(ctx, resourceName), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(""), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(""), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(""), + })), + // TODO: Should be known + plancheck.ExpectUnknownValue(resourceName, tfjsonpath.New(names.AttrTagsAll)), + }, + }, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/CoreNetwork/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(""), + }), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{ + "create_base_policy", + }, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/CoreNetwork/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: nil, + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckCoreNetworkExists(ctx, resourceName), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{})), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{})), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{})), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{})), + }, + }, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/CoreNetwork/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: nil, + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{ + "create_base_policy", + }, + }, + }, + }) +} + +func TestAccNetworkManagerCoreNetwork_tags_EmptyTag_OnUpdate_Add(t *testing.T) { + t.Skip("Resource CoreNetwork does not support empty tags") + + ctx := acctest.Context(t) + resourceName := "aws_networkmanager_core_network.test" + + acctest.ParallelTest(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckCoreNetworkDestroy(ctx), + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + Steps: []resource.TestStep{ + { + ConfigDirectory: config.StaticDirectory("testdata/CoreNetwork/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckCoreNetworkExists(ctx, resourceName), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + }, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/CoreNetwork/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + acctest.CtKey2: config.StringVariable(""), + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckCoreNetworkExists(ctx, resourceName), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + acctest.CtKey2: knownvalue.StringExact(""), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + acctest.CtKey2: knownvalue.StringExact(""), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + acctest.CtKey2: knownvalue.StringExact(""), + })), + // TODO: Should be known + plancheck.ExpectUnknownValue(resourceName, tfjsonpath.New(names.AttrTagsAll)), + }, + }, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/CoreNetwork/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + acctest.CtKey2: config.StringVariable(""), + }), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{ + "create_base_policy", + }, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/CoreNetwork/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckCoreNetworkExists(ctx, resourceName), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + }, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/CoreNetwork/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{ + "create_base_policy", + }, + }, + }, + }) +} + +func TestAccNetworkManagerCoreNetwork_tags_EmptyTag_OnUpdate_Replace(t *testing.T) { + t.Skip("Resource CoreNetwork does not support empty tags") + + ctx := acctest.Context(t) + resourceName := "aws_networkmanager_core_network.test" + + acctest.ParallelTest(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckCoreNetworkDestroy(ctx), + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + Steps: []resource.TestStep{ + { + ConfigDirectory: config.StaticDirectory("testdata/CoreNetwork/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckCoreNetworkExists(ctx, resourceName), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + }, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/CoreNetwork/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(""), + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckCoreNetworkExists(ctx, resourceName), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(""), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(""), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(""), + })), + // TODO: Should be known + plancheck.ExpectUnknownValue(resourceName, tfjsonpath.New(names.AttrTagsAll)), + }, + }, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/CoreNetwork/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(""), + }), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{ + "create_base_policy", + }, + }, + }, + }) +} + +func TestAccNetworkManagerCoreNetwork_tags_DefaultTags_providerOnly(t *testing.T) { + ctx := acctest.Context(t) + resourceName := "aws_networkmanager_core_network.test" + + acctest.ParallelTest(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckCoreNetworkDestroy(ctx), + Steps: []resource.TestStep{ + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/CoreNetwork/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + acctest.CtResourceTags: nil, + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckCoreNetworkExists(ctx, resourceName), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.Null()), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.Null()), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/CoreNetwork/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + acctest.CtResourceTags: nil, + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{ + "create_base_policy", + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/CoreNetwork/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1Updated), + acctest.CtKey2: config.StringVariable(acctest.CtValue2), + }), + acctest.CtResourceTags: nil, + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckCoreNetworkExists(ctx, resourceName), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{})), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1Updated), + acctest.CtKey2: knownvalue.StringExact(acctest.CtValue2), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{})), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1Updated), + acctest.CtKey2: knownvalue.StringExact(acctest.CtValue2), + })), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/CoreNetwork/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1Updated), + acctest.CtKey2: config.StringVariable(acctest.CtValue2), + }), + acctest.CtResourceTags: nil, + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{ + "create_base_policy", + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/CoreNetwork/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey2: config.StringVariable(acctest.CtValue2), + }), + acctest.CtResourceTags: nil, + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckCoreNetworkExists(ctx, resourceName), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{})), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey2: knownvalue.StringExact(acctest.CtValue2), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{})), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey2: knownvalue.StringExact(acctest.CtValue2), + })), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/CoreNetwork/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey2: config.StringVariable(acctest.CtValue2), + }), + acctest.CtResourceTags: nil, + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{ + "create_base_policy", + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/CoreNetwork/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: nil, + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckCoreNetworkExists(ctx, resourceName), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{})), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{})), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{})), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{})), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/CoreNetwork/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: nil, + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{ + "create_base_policy", + }, + }, + }, + }) +} + +func TestAccNetworkManagerCoreNetwork_tags_DefaultTags_nonOverlapping(t *testing.T) { + ctx := acctest.Context(t) + resourceName := "aws_networkmanager_core_network.test" + + acctest.ParallelTest(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckCoreNetworkDestroy(ctx), + Steps: []resource.TestStep{ + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/CoreNetwork/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtProviderKey1: config.StringVariable(acctest.CtProviderValue1), + }), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtResourceKey1: config.StringVariable(acctest.CtResourceValue1), + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckCoreNetworkExists(ctx, resourceName), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtProviderKey1: knownvalue.StringExact(acctest.CtProviderValue1), + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtProviderKey1: knownvalue.StringExact(acctest.CtProviderValue1), + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), + })), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/CoreNetwork/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtProviderKey1: config.StringVariable(acctest.CtProviderValue1), + }), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtResourceKey1: config.StringVariable(acctest.CtResourceValue1), + }), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{ + "create_base_policy", + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/CoreNetwork/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtProviderKey1: config.StringVariable(acctest.CtProviderValue1Updated), + }), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtResourceKey1: config.StringVariable(acctest.CtResourceValue1Updated), + acctest.CtResourceKey2: config.StringVariable(acctest.CtResourceValue2), + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckCoreNetworkExists(ctx, resourceName), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1Updated), + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtProviderKey1: knownvalue.StringExact(acctest.CtProviderValue1Updated), + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1Updated), + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1Updated), + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtProviderKey1: knownvalue.StringExact(acctest.CtProviderValue1Updated), + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1Updated), + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/CoreNetwork/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtProviderKey1: config.StringVariable(acctest.CtProviderValue1Updated), + }), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtResourceKey1: config.StringVariable(acctest.CtResourceValue1Updated), + acctest.CtResourceKey2: config.StringVariable(acctest.CtResourceValue2), + }), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{ + "create_base_policy", + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/CoreNetwork/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: nil, + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckCoreNetworkExists(ctx, resourceName), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{})), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{})), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{})), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{})), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/CoreNetwork/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: nil, + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{ + "create_base_policy", + }, + }, + }, + }) +} + +func TestAccNetworkManagerCoreNetwork_tags_DefaultTags_overlapping(t *testing.T) { + ctx := acctest.Context(t) + resourceName := "aws_networkmanager_core_network.test" + + acctest.ParallelTest(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckCoreNetworkDestroy(ctx), + Steps: []resource.TestStep{ + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/CoreNetwork/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtOverlapKey1: config.StringVariable(acctest.CtProviderValue1), + }), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtOverlapKey1: config.StringVariable(acctest.CtResourceValue1), + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckCoreNetworkExists(ctx, resourceName), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtOverlapKey1: knownvalue.StringExact(acctest.CtResourceValue1), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtOverlapKey1: knownvalue.StringExact(acctest.CtResourceValue1), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtOverlapKey1: knownvalue.StringExact(acctest.CtResourceValue1), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtOverlapKey1: knownvalue.StringExact(acctest.CtResourceValue1), + })), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/CoreNetwork/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtOverlapKey1: config.StringVariable(acctest.CtProviderValue1), + }), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtOverlapKey1: config.StringVariable(acctest.CtResourceValue1), + }), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{ + "create_base_policy", + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/CoreNetwork/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtOverlapKey1: config.StringVariable(acctest.CtProviderValue1), + acctest.CtOverlapKey2: config.StringVariable("providervalue2"), + }), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtOverlapKey1: config.StringVariable(acctest.CtResourceValue1), + acctest.CtOverlapKey2: config.StringVariable(acctest.CtResourceValue2), + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckCoreNetworkExists(ctx, resourceName), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtOverlapKey1: knownvalue.StringExact(acctest.CtResourceValue1), + acctest.CtOverlapKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtOverlapKey1: knownvalue.StringExact(acctest.CtResourceValue1), + acctest.CtOverlapKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtOverlapKey1: knownvalue.StringExact(acctest.CtResourceValue1), + acctest.CtOverlapKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtOverlapKey1: knownvalue.StringExact(acctest.CtResourceValue1), + acctest.CtOverlapKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/CoreNetwork/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtOverlapKey1: config.StringVariable(acctest.CtProviderValue1), + acctest.CtOverlapKey2: config.StringVariable("providervalue2"), + }), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtOverlapKey1: config.StringVariable(acctest.CtResourceValue1), + acctest.CtOverlapKey2: config.StringVariable(acctest.CtResourceValue2), + }), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{ + "create_base_policy", + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/CoreNetwork/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtOverlapKey1: config.StringVariable(acctest.CtProviderValue1), + }), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtOverlapKey1: config.StringVariable(acctest.CtResourceValue2), + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckCoreNetworkExists(ctx, resourceName), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtOverlapKey1: knownvalue.StringExact(acctest.CtResourceValue2), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtOverlapKey1: knownvalue.StringExact(acctest.CtResourceValue2), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtOverlapKey1: knownvalue.StringExact(acctest.CtResourceValue2), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtOverlapKey1: knownvalue.StringExact(acctest.CtResourceValue2), + })), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/CoreNetwork/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtOverlapKey1: config.StringVariable(acctest.CtProviderValue1), + }), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtOverlapKey1: config.StringVariable(acctest.CtResourceValue2), + }), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{ + "create_base_policy", + }, + }, + }, + }) +} + +func TestAccNetworkManagerCoreNetwork_tags_DefaultTags_updateToProviderOnly(t *testing.T) { + ctx := acctest.Context(t) + resourceName := "aws_networkmanager_core_network.test" + + acctest.ParallelTest(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckCoreNetworkDestroy(ctx), + Steps: []resource.TestStep{ + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/CoreNetwork/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckCoreNetworkExists(ctx, resourceName), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/CoreNetwork/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + acctest.CtResourceTags: nil, + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckCoreNetworkExists(ctx, resourceName), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{})), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{})), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/CoreNetwork/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + acctest.CtResourceTags: nil, + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{ + "create_base_policy", + }, + }, + }, + }) +} + +func TestAccNetworkManagerCoreNetwork_tags_DefaultTags_updateToResourceOnly(t *testing.T) { + ctx := acctest.Context(t) + resourceName := "aws_networkmanager_core_network.test" + + acctest.ParallelTest(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckCoreNetworkDestroy(ctx), + Steps: []resource.TestStep{ + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/CoreNetwork/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + acctest.CtResourceTags: nil, + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckCoreNetworkExists(ctx, resourceName), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.Null()), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.Null()), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/CoreNetwork/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckCoreNetworkExists(ctx, resourceName), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionNoop), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/CoreNetwork/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{ + "create_base_policy", + }, + }, + }, + }) +} + +func TestAccNetworkManagerCoreNetwork_tags_DefaultTags_emptyResourceTag(t *testing.T) { + t.Skip("Resource CoreNetwork does not support empty tags") + + ctx := acctest.Context(t) + resourceName := "aws_networkmanager_core_network.test" + + acctest.ParallelTest(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckCoreNetworkDestroy(ctx), + Steps: []resource.TestStep{ + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/CoreNetwork/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(""), + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckCoreNetworkExists(ctx, resourceName), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(""), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(""), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(""), + })), + // TODO: Should be known + plancheck.ExpectUnknownValue(resourceName, tfjsonpath.New(names.AttrTagsAll)), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/CoreNetwork/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(""), + }), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{ + "create_base_policy", + }, + }, + }, + }) +} + +func TestAccNetworkManagerCoreNetwork_tags_DefaultTags_emptyProviderOnlyTag(t *testing.T) { + t.Skip("Resource CoreNetwork does not support empty tags") + + ctx := acctest.Context(t) + resourceName := "aws_networkmanager_core_network.test" + + acctest.ParallelTest(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckCoreNetworkDestroy(ctx), + Steps: []resource.TestStep{ + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/CoreNetwork/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(""), + }), + acctest.CtResourceTags: nil, + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckCoreNetworkExists(ctx, resourceName), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.Null()), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(""), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.Null()), + // TODO: Should be known + plancheck.ExpectUnknownValue(resourceName, tfjsonpath.New(names.AttrTagsAll)), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/CoreNetwork/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(""), + }), + acctest.CtResourceTags: nil, + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{ + "create_base_policy", + }, + }, + }, + }) +} + +func TestAccNetworkManagerCoreNetwork_tags_DefaultTags_nullOverlappingResourceTag(t *testing.T) { + ctx := acctest.Context(t) + resourceName := "aws_networkmanager_core_network.test" + + acctest.ParallelTest(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckCoreNetworkDestroy(ctx), + Steps: []resource.TestStep{ + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/CoreNetwork/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtProviderValue1), + }), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: nil, + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckCoreNetworkExists(ctx, resourceName), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.Null()), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtProviderValue1), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.Null()), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtProviderValue1), + })), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/CoreNetwork/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtProviderValue1), + }), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: nil, + }), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{ + "create_base_policy", + }, + }, + }, + }) +} + +func TestAccNetworkManagerCoreNetwork_tags_DefaultTags_nullNonOverlappingResourceTag(t *testing.T) { + ctx := acctest.Context(t) + resourceName := "aws_networkmanager_core_network.test" + + acctest.ParallelTest(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckCoreNetworkDestroy(ctx), + Steps: []resource.TestStep{ + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/CoreNetwork/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtProviderKey1: config.StringVariable(acctest.CtProviderValue1), + }), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtResourceKey1: nil, + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckCoreNetworkExists(ctx, resourceName), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.Null()), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtProviderKey1: knownvalue.StringExact(acctest.CtProviderValue1), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.Null()), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtProviderKey1: knownvalue.StringExact(acctest.CtProviderValue1), + })), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/CoreNetwork/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtProviderKey1: config.StringVariable(acctest.CtProviderValue1), + }), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtResourceKey1: nil, + }), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{ + "create_base_policy", + }, + }, + }, + }) +} + +func TestAccNetworkManagerCoreNetwork_tags_ComputedTag_OnCreate(t *testing.T) { + ctx := acctest.Context(t) + resourceName := "aws_networkmanager_core_network.test" + + acctest.ParallelTest(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckCoreNetworkDestroy(ctx), + Steps: []resource.TestStep{ + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/CoreNetwork/tagsComputed1/"), + ConfigVariables: config.Variables{ + "unknownTagKey": config.StringVariable("computedkey1"), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckCoreNetworkExists(ctx, resourceName), + resource.TestCheckResourceAttrPair(resourceName, "tags.computedkey1", "null_resource.test", names.AttrID), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapSizeExact(1)), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapSizeExact(1)), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectUnknownValue(resourceName, tfjsonpath.New(names.AttrTags)), + plancheck.ExpectUnknownValue(resourceName, tfjsonpath.New(names.AttrTagsAll)), + }, + PostApplyPreRefresh: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionNoop), + }, + PostApplyPostRefresh: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionNoop), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/CoreNetwork/tagsComputed1/"), + ConfigVariables: config.Variables{ + "unknownTagKey": config.StringVariable("computedkey1"), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{ + "create_base_policy", + }, + }, + }, + }) +} + +func TestAccNetworkManagerCoreNetwork_tags_ComputedTag_OnUpdate_Add(t *testing.T) { + ctx := acctest.Context(t) + resourceName := "aws_networkmanager_core_network.test" + + acctest.ParallelTest(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckCoreNetworkDestroy(ctx), + Steps: []resource.TestStep{ + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/CoreNetwork/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckCoreNetworkExists(ctx, resourceName), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/CoreNetwork/tagsComputed2/"), + ConfigVariables: config.Variables{ + "unknownTagKey": config.StringVariable("computedkey1"), + "knownTagKey": config.StringVariable(acctest.CtKey1), + "knownTagValue": config.StringVariable(acctest.CtValue1), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckCoreNetworkExists(ctx, resourceName), + resource.TestCheckResourceAttrPair(resourceName, "tags.computedkey1", "null_resource.test", names.AttrID), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapSizeExact(2)), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapPartial(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapSizeExact(2)), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapPartial(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectUnknownValue(resourceName, tfjsonpath.New(names.AttrTags)), + plancheck.ExpectUnknownValue(resourceName, tfjsonpath.New(names.AttrTagsAll)), + }, + PostApplyPreRefresh: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionNoop), + }, + PostApplyPostRefresh: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionNoop), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/CoreNetwork/tagsComputed2/"), + ConfigVariables: config.Variables{ + "unknownTagKey": config.StringVariable("computedkey1"), + "knownTagKey": config.StringVariable(acctest.CtKey1), + "knownTagValue": config.StringVariable(acctest.CtValue1), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{ + "create_base_policy", + }, + }, + }, + }) +} + +func TestAccNetworkManagerCoreNetwork_tags_ComputedTag_OnUpdate_Replace(t *testing.T) { + ctx := acctest.Context(t) + resourceName := "aws_networkmanager_core_network.test" + + acctest.ParallelTest(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckCoreNetworkDestroy(ctx), + Steps: []resource.TestStep{ + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/CoreNetwork/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckCoreNetworkExists(ctx, resourceName), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/CoreNetwork/tagsComputed1/"), + ConfigVariables: config.Variables{ + "unknownTagKey": config.StringVariable(acctest.CtKey1), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckCoreNetworkExists(ctx, resourceName), + resource.TestCheckResourceAttrPair(resourceName, acctest.CtTagsKey1, "null_resource.test", names.AttrID), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapSizeExact(1)), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapSizeExact(1)), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectUnknownValue(resourceName, tfjsonpath.New(names.AttrTags)), + plancheck.ExpectUnknownValue(resourceName, tfjsonpath.New(names.AttrTagsAll)), + }, + PostApplyPreRefresh: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionNoop), + }, + PostApplyPostRefresh: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionNoop), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/CoreNetwork/tagsComputed1/"), + ConfigVariables: config.Variables{ + "unknownTagKey": config.StringVariable(acctest.CtKey1), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{ + "create_base_policy", + }, + }, + }, + }) +} + +func TestAccNetworkManagerCoreNetwork_tags_IgnoreTags_Overlap_DefaultTag(t *testing.T) { + ctx := acctest.Context(t) + resourceName := "aws_networkmanager_core_network.test" + + acctest.ParallelTest(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckCoreNetworkDestroy(ctx), + Steps: []resource.TestStep{ + // 1: Create + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/CoreNetwork/tags_ignore/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtProviderKey1: config.StringVariable(acctest.CtProviderValue1), + }), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtResourceKey1: config.StringVariable(acctest.CtResourceValue1), + }), + "ignore_tag_keys": config.SetVariable( + config.StringVariable(acctest.CtProviderKey1), + ), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckCoreNetworkExists(ctx, resourceName), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), + })), + expectFullResourceTags(ctx, resourceName, knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtProviderKey1: knownvalue.StringExact(acctest.CtProviderValue1), // TODO: Should not be set + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), + })), + }, + PostApplyPreRefresh: []plancheck.PlanCheck{ + plancheck.ExpectEmptyPlan(), + }, + PostApplyPostRefresh: []plancheck.PlanCheck{ + plancheck.ExpectEmptyPlan(), + }, + }, + }, + // 2: Update ignored tag only + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/CoreNetwork/tags_ignore/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtProviderKey1: config.StringVariable(acctest.CtProviderValue1Updated), + }), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtResourceKey1: config.StringVariable(acctest.CtResourceValue1), + }), + "ignore_tag_keys": config.SetVariable( + config.StringVariable(acctest.CtProviderKey1), + ), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckCoreNetworkExists(ctx, resourceName), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), + })), + expectFullResourceTags(ctx, resourceName, knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtProviderKey1: knownvalue.StringExact(acctest.CtProviderValue1), // TODO: Should not be set + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionNoop), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), + })), + }, + PostApplyPreRefresh: []plancheck.PlanCheck{ + plancheck.ExpectEmptyPlan(), + }, + PostApplyPostRefresh: []plancheck.PlanCheck{ + plancheck.ExpectEmptyPlan(), + }, + }, + }, + // 3: Update both tags + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/CoreNetwork/tags_ignore/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtProviderKey1: config.StringVariable(acctest.CtProviderValue1Again), + }), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtResourceKey1: config.StringVariable(acctest.CtResourceValue1Updated), + }), + "ignore_tag_keys": config.SetVariable( + config.StringVariable(acctest.CtProviderKey1), + ), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckCoreNetworkExists(ctx, resourceName), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1Updated), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1Updated), + })), + expectFullResourceTags(ctx, resourceName, knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtProviderKey1: knownvalue.StringExact(acctest.CtProviderValue1), // TODO: Should not be set + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1Updated), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1Updated), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1Updated), + })), + }, + PostApplyPreRefresh: []plancheck.PlanCheck{ + plancheck.ExpectEmptyPlan(), + }, + PostApplyPostRefresh: []plancheck.PlanCheck{ + plancheck.ExpectEmptyPlan(), + }, + }, + }, + }, + }) +} + +func TestAccNetworkManagerCoreNetwork_tags_IgnoreTags_Overlap_ResourceTag(t *testing.T) { + ctx := acctest.Context(t) + resourceName := "aws_networkmanager_core_network.test" + + acctest.ParallelTest(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckCoreNetworkDestroy(ctx), + Steps: []resource.TestStep{ + // 1: Create + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/CoreNetwork/tags_ignore/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtResourceKey1: config.StringVariable(acctest.CtResourceValue1), + acctest.CtResourceKey2: config.StringVariable(acctest.CtResourceValue2), + }), + "ignore_tag_keys": config.SetVariable( + config.StringVariable(acctest.CtResourceKey1), + ), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckCoreNetworkExists(ctx, resourceName), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + expectFullResourceTags(ctx, resourceName, knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), // TODO: Should not be set + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + }, + PostApplyPreRefresh: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + }, + PostApplyPostRefresh: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + }, + }, + ExpectNonEmptyPlan: true, + }, + // 2: Update ignored tag + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/CoreNetwork/tags_ignore/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtResourceKey1: config.StringVariable(acctest.CtResourceValue1Updated), + acctest.CtResourceKey2: config.StringVariable(acctest.CtResourceValue2), + }), + "ignore_tag_keys": config.SetVariable( + config.StringVariable(acctest.CtResourceKey1), + ), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckCoreNetworkExists(ctx, resourceName), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + expectFullResourceTags(ctx, resourceName, knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), // TODO: Should not be set + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1Updated), + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + }, + PostApplyPreRefresh: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1Updated), + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + }, + PostApplyPostRefresh: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1Updated), + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + }, + }, + ExpectNonEmptyPlan: true, + }, + // 3: Update both tags + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/CoreNetwork/tags_ignore/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtResourceKey1: config.StringVariable(acctest.CtResourceValue1Again), + acctest.CtResourceKey2: config.StringVariable(acctest.CtResourceValue2Updated), + }), + "ignore_tag_keys": config.SetVariable( + config.StringVariable(acctest.CtResourceKey1), + ), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckCoreNetworkExists(ctx, resourceName), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2Updated), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2Updated), + })), + expectFullResourceTags(ctx, resourceName, knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), // TODO: Should not be set + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2Updated), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1Again), + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2Updated), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2Updated), + })), + }, + PostApplyPreRefresh: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1Again), + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2Updated), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2Updated), + })), + }, + PostApplyPostRefresh: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1Again), + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2Updated), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2Updated), + })), + }, + }, + ExpectNonEmptyPlan: true, + }, + }, + }) +} diff --git a/internal/service/networkmanager/core_network_test.go b/internal/service/networkmanager/core_network_test.go index b3d7072a9494..90bf3704283a 100644 --- a/internal/service/networkmanager/core_network_test.go +++ b/internal/service/networkmanager/core_network_test.go @@ -73,51 +73,6 @@ func TestAccNetworkManagerCoreNetwork_disappears(t *testing.T) { }) } -func TestAccNetworkManagerCoreNetwork_tags(t *testing.T) { - ctx := acctest.Context(t) - resourceName := "aws_networkmanager_core_network.test" - - resource.ParallelTest(t, resource.TestCase{ - PreCheck: func() { acctest.PreCheck(ctx, t) }, - ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), - ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, - CheckDestroy: testAccCheckCoreNetworkDestroy(ctx), - Steps: []resource.TestStep{ - { - Config: testAccCoreNetworkConfig_tags1(acctest.CtKey1, acctest.CtValue1), - Check: resource.ComposeTestCheckFunc( - testAccCheckCoreNetworkExists(ctx, resourceName), - resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, "1"), - resource.TestCheckResourceAttr(resourceName, acctest.CtTagsKey1, acctest.CtValue1), - ), - }, - { - ResourceName: resourceName, - ImportState: true, - ImportStateVerify: true, - ImportStateVerifyIgnore: []string{"create_base_policy"}, - }, - { - Config: testAccCoreNetworkConfig_tags2(acctest.CtKey1, acctest.CtValue1Updated, acctest.CtKey2, acctest.CtValue2), - Check: resource.ComposeTestCheckFunc( - testAccCheckCoreNetworkExists(ctx, resourceName), - resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, "2"), - resource.TestCheckResourceAttr(resourceName, acctest.CtTagsKey1, acctest.CtValue1Updated), - resource.TestCheckResourceAttr(resourceName, acctest.CtTagsKey2, acctest.CtValue2), - ), - }, - { - Config: testAccCoreNetworkConfig_tags1(acctest.CtKey2, acctest.CtValue2), - Check: resource.ComposeTestCheckFunc( - testAccCheckCoreNetworkExists(ctx, resourceName), - resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, "1"), - resource.TestCheckResourceAttr(resourceName, acctest.CtTagsKey2, acctest.CtValue2), - ), - }, - }, - }) -} - func TestAccNetworkManagerCoreNetwork_description(t *testing.T) { ctx := acctest.Context(t) resourceName := "aws_networkmanager_core_network.test" @@ -380,35 +335,6 @@ resource "aws_networkmanager_core_network" "test" { }` } -func testAccCoreNetworkConfig_tags1(tagKey1, tagValue1 string) string { - return fmt.Sprintf(` -resource "aws_networkmanager_global_network" "test" {} - -resource "aws_networkmanager_core_network" "test" { - global_network_id = aws_networkmanager_global_network.test.id - - tags = { - %[1]q = %[2]q - } -} -`, tagKey1, tagValue1) -} - -func testAccCoreNetworkConfig_tags2(tagKey1, tagValue1, tagKey2, tagValue2 string) string { - return fmt.Sprintf(` -resource "aws_networkmanager_global_network" "test" {} - -resource "aws_networkmanager_core_network" "test" { - global_network_id = aws_networkmanager_global_network.test.id - - tags = { - %[1]q = %[2]q - %[3]q = %[4]q - } -} -`, tagKey1, tagValue1, tagKey2, tagValue2) -} - func testAccCoreNetworkConfig_description(description string) string { return fmt.Sprintf(` resource "aws_networkmanager_global_network" "test" {} diff --git a/internal/service/networkmanager/testdata/CoreNetwork/tags/main_gen.tf b/internal/service/networkmanager/testdata/CoreNetwork/tags/main_gen.tf new file mode 100644 index 000000000000..9bdc8455678e --- /dev/null +++ b/internal/service/networkmanager/testdata/CoreNetwork/tags/main_gen.tf @@ -0,0 +1,17 @@ +# Copyright (c) HashiCorp, Inc. +# SPDX-License-Identifier: MPL-2.0 + +resource "aws_networkmanager_core_network" "test" { + global_network_id = aws_networkmanager_global_network.test.id + + tags = var.resource_tags +} + +resource "aws_networkmanager_global_network" "test" {} + +variable "resource_tags" { + description = "Tags to set on resource. To specify no tags, set to `null`" + # Not setting a default, so that this must explicitly be set to `null` to specify no tags + type = map(string) + nullable = true +} diff --git a/internal/service/networkmanager/testdata/CoreNetwork/tagsComputed1/main_gen.tf b/internal/service/networkmanager/testdata/CoreNetwork/tagsComputed1/main_gen.tf new file mode 100644 index 000000000000..058b0e5b102f --- /dev/null +++ b/internal/service/networkmanager/testdata/CoreNetwork/tagsComputed1/main_gen.tf @@ -0,0 +1,21 @@ +# Copyright (c) HashiCorp, Inc. +# SPDX-License-Identifier: MPL-2.0 + +provider "null" {} + +resource "aws_networkmanager_core_network" "test" { + global_network_id = aws_networkmanager_global_network.test.id + + tags = { + (var.unknownTagKey) = null_resource.test.id + } +} + +resource "aws_networkmanager_global_network" "test" {} + +resource "null_resource" "test" {} + +variable "unknownTagKey" { + type = string + nullable = false +} diff --git a/internal/service/networkmanager/testdata/CoreNetwork/tagsComputed2/main_gen.tf b/internal/service/networkmanager/testdata/CoreNetwork/tagsComputed2/main_gen.tf new file mode 100644 index 000000000000..7e62e77c6d3a --- /dev/null +++ b/internal/service/networkmanager/testdata/CoreNetwork/tagsComputed2/main_gen.tf @@ -0,0 +1,32 @@ +# Copyright (c) HashiCorp, Inc. +# SPDX-License-Identifier: MPL-2.0 + +provider "null" {} + +resource "aws_networkmanager_core_network" "test" { + global_network_id = aws_networkmanager_global_network.test.id + + tags = { + (var.unknownTagKey) = null_resource.test.id + (var.knownTagKey) = var.knownTagValue + } +} + +resource "aws_networkmanager_global_network" "test" {} + +resource "null_resource" "test" {} + +variable "unknownTagKey" { + type = string + nullable = false +} + +variable "knownTagKey" { + type = string + nullable = false +} + +variable "knownTagValue" { + type = string + nullable = false +} diff --git a/internal/service/networkmanager/testdata/CoreNetwork/tags_defaults/main_gen.tf b/internal/service/networkmanager/testdata/CoreNetwork/tags_defaults/main_gen.tf new file mode 100644 index 000000000000..88235f8d1703 --- /dev/null +++ b/internal/service/networkmanager/testdata/CoreNetwork/tags_defaults/main_gen.tf @@ -0,0 +1,28 @@ +# Copyright (c) HashiCorp, Inc. +# SPDX-License-Identifier: MPL-2.0 + +provider "aws" { + default_tags { + tags = var.provider_tags + } +} + +resource "aws_networkmanager_core_network" "test" { + global_network_id = aws_networkmanager_global_network.test.id + + tags = var.resource_tags +} + +resource "aws_networkmanager_global_network" "test" {} + +variable "resource_tags" { + description = "Tags to set on resource. To specify no tags, set to `null`" + # Not setting a default, so that this must explicitly be set to `null` to specify no tags + type = map(string) + nullable = true +} + +variable "provider_tags" { + type = map(string) + nullable = false +} diff --git a/internal/service/networkmanager/testdata/CoreNetwork/tags_ignore/main_gen.tf b/internal/service/networkmanager/testdata/CoreNetwork/tags_ignore/main_gen.tf new file mode 100644 index 000000000000..beba3bd512ae --- /dev/null +++ b/internal/service/networkmanager/testdata/CoreNetwork/tags_ignore/main_gen.tf @@ -0,0 +1,37 @@ +# Copyright (c) HashiCorp, Inc. +# SPDX-License-Identifier: MPL-2.0 + +provider "aws" { + default_tags { + tags = var.provider_tags + } + ignore_tags { + keys = var.ignore_tag_keys + } +} + +resource "aws_networkmanager_core_network" "test" { + global_network_id = aws_networkmanager_global_network.test.id + + tags = var.resource_tags +} + +resource "aws_networkmanager_global_network" "test" {} + +variable "resource_tags" { + description = "Tags to set on resource. To specify no tags, set to `null`" + # Not setting a default, so that this must explicitly be set to `null` to specify no tags + type = map(string) + nullable = true +} + +variable "provider_tags" { + type = map(string) + nullable = true + default = null +} + +variable "ignore_tag_keys" { + type = set(string) + nullable = false +} diff --git a/internal/service/networkmanager/testdata/tmpl/core_network_tags.gtpl b/internal/service/networkmanager/testdata/tmpl/core_network_tags.gtpl new file mode 100644 index 000000000000..faf99abe7fa1 --- /dev/null +++ b/internal/service/networkmanager/testdata/tmpl/core_network_tags.gtpl @@ -0,0 +1,6 @@ +resource "aws_networkmanager_core_network" "test" { + global_network_id = aws_networkmanager_global_network.test.id +{{- template "tags" . }} +} + +resource "aws_networkmanager_global_network" "test" {} From d0872d0f9474324cd54b916b8dcd1cfa97f94be6 Mon Sep 17 00:00:00 2001 From: Graham Davison Date: Thu, 24 Jul 2025 22:54:37 -0700 Subject: [PATCH 040/365] `aws_networkmanager_device` --- internal/service/networkmanager/device.go | 4 +- .../networkmanager/device_tags_gen_test.go | 2224 +++++++++++++++++ .../service/networkmanager/device_test.go | 83 - .../testdata/Device/tags/main_gen.tf | 17 + .../testdata/Device/tagsComputed1/main_gen.tf | 21 + .../testdata/Device/tagsComputed2/main_gen.tf | 32 + .../testdata/Device/tags_defaults/main_gen.tf | 28 + .../testdata/Device/tags_ignore/main_gen.tf | 37 + .../testdata/tmpl/device_tags.gtpl | 6 + 9 files changed, 2368 insertions(+), 84 deletions(-) create mode 100644 internal/service/networkmanager/device_tags_gen_test.go create mode 100644 internal/service/networkmanager/testdata/Device/tags/main_gen.tf create mode 100644 internal/service/networkmanager/testdata/Device/tagsComputed1/main_gen.tf create mode 100644 internal/service/networkmanager/testdata/Device/tagsComputed2/main_gen.tf create mode 100644 internal/service/networkmanager/testdata/Device/tags_defaults/main_gen.tf create mode 100644 internal/service/networkmanager/testdata/Device/tags_ignore/main_gen.tf create mode 100644 internal/service/networkmanager/testdata/tmpl/device_tags.gtpl diff --git a/internal/service/networkmanager/device.go b/internal/service/networkmanager/device.go index 06486b6f24c6..3523017ca4f9 100644 --- a/internal/service/networkmanager/device.go +++ b/internal/service/networkmanager/device.go @@ -30,7 +30,9 @@ import ( // @SDKResource("aws_networkmanager_device", name="Device") // @Tags(identifierAttribute="arn") -// @Testing(tagsTest=false) +// @Testing(skipEmptyTags=true) +// @Testing(generator=false) +// @Testing(importStateIdAttribute="arn") func resourceDevice() *schema.Resource { return &schema.Resource{ CreateWithoutTimeout: resourceDeviceCreate, diff --git a/internal/service/networkmanager/device_tags_gen_test.go b/internal/service/networkmanager/device_tags_gen_test.go new file mode 100644 index 000000000000..87a59eedbfa4 --- /dev/null +++ b/internal/service/networkmanager/device_tags_gen_test.go @@ -0,0 +1,2224 @@ +// Code generated by internal/generate/tagstests/main.go; DO NOT EDIT. + +package networkmanager_test + +import ( + "testing" + + "github.com/hashicorp/terraform-plugin-testing/config" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/knownvalue" + "github.com/hashicorp/terraform-plugin-testing/plancheck" + "github.com/hashicorp/terraform-plugin-testing/statecheck" + "github.com/hashicorp/terraform-plugin-testing/tfjsonpath" + "github.com/hashicorp/terraform-provider-aws/internal/acctest" + "github.com/hashicorp/terraform-provider-aws/names" +) + +func TestAccNetworkManagerDevice_tags(t *testing.T) { + ctx := acctest.Context(t) + resourceName := "aws_networkmanager_device.test" + + acctest.ParallelTest(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckDeviceDestroy(ctx), + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + Steps: []resource.TestStep{ + { + ConfigDirectory: config.StaticDirectory("testdata/Device/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckDeviceExists(ctx, resourceName), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + }, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/Device/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateIdFunc: acctest.AttrImportStateIdFunc(resourceName, names.AttrARN), + ImportStateVerify: true, + ImportStateVerifyIdentifierAttribute: names.AttrARN, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/Device/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1Updated), + acctest.CtKey2: config.StringVariable(acctest.CtValue2), + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckDeviceExists(ctx, resourceName), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1Updated), + acctest.CtKey2: knownvalue.StringExact(acctest.CtValue2), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1Updated), + acctest.CtKey2: knownvalue.StringExact(acctest.CtValue2), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1Updated), + acctest.CtKey2: knownvalue.StringExact(acctest.CtValue2), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1Updated), + acctest.CtKey2: knownvalue.StringExact(acctest.CtValue2), + })), + }, + }, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/Device/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1Updated), + acctest.CtKey2: config.StringVariable(acctest.CtValue2), + }), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateIdFunc: acctest.AttrImportStateIdFunc(resourceName, names.AttrARN), + ImportStateVerify: true, + ImportStateVerifyIdentifierAttribute: names.AttrARN, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/Device/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey2: config.StringVariable(acctest.CtValue2), + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckDeviceExists(ctx, resourceName), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey2: knownvalue.StringExact(acctest.CtValue2), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey2: knownvalue.StringExact(acctest.CtValue2), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey2: knownvalue.StringExact(acctest.CtValue2), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey2: knownvalue.StringExact(acctest.CtValue2), + })), + }, + }, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/Device/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey2: config.StringVariable(acctest.CtValue2), + }), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateIdFunc: acctest.AttrImportStateIdFunc(resourceName, names.AttrARN), + ImportStateVerify: true, + ImportStateVerifyIdentifierAttribute: names.AttrARN, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/Device/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: nil, + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckDeviceExists(ctx, resourceName), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{})), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{})), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{})), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{})), + }, + }, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/Device/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: nil, + }, + ResourceName: resourceName, + ImportState: true, + ImportStateIdFunc: acctest.AttrImportStateIdFunc(resourceName, names.AttrARN), + ImportStateVerify: true, + ImportStateVerifyIdentifierAttribute: names.AttrARN, + }, + }, + }) +} + +func TestAccNetworkManagerDevice_tags_null(t *testing.T) { + ctx := acctest.Context(t) + resourceName := "aws_networkmanager_device.test" + + acctest.ParallelTest(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckDeviceDestroy(ctx), + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + Steps: []resource.TestStep{ + { + ConfigDirectory: config.StaticDirectory("testdata/Device/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: nil, + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckDeviceExists(ctx, resourceName), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.Null()), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{})), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.Null()), + // TODO: Should be known + plancheck.ExpectUnknownValue(resourceName, tfjsonpath.New(names.AttrTagsAll)), + }, + }, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/Device/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: nil, + }), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateIdFunc: acctest.AttrImportStateIdFunc(resourceName, names.AttrARN), + ImportStateVerify: true, + ImportStateVerifyIdentifierAttribute: names.AttrARN, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/Device/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: nil, + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionNoop), + }, + PostApplyPostRefresh: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionNoop), + }, + }, + }, + }, + }) +} + +func TestAccNetworkManagerDevice_tags_EmptyMap(t *testing.T) { + ctx := acctest.Context(t) + resourceName := "aws_networkmanager_device.test" + + acctest.ParallelTest(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckDeviceDestroy(ctx), + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + Steps: []resource.TestStep{ + { + ConfigDirectory: config.StaticDirectory("testdata/Device/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{}), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckDeviceExists(ctx, resourceName), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.Null()), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{})), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.Null()), + // TODO: Should be known + plancheck.ExpectUnknownValue(resourceName, tfjsonpath.New(names.AttrTagsAll)), + }, + }, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/Device/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{}), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateIdFunc: acctest.AttrImportStateIdFunc(resourceName, names.AttrARN), + ImportStateVerify: true, + ImportStateVerifyIdentifierAttribute: names.AttrARN, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/Device/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: nil, + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionNoop), + }, + PostApplyPostRefresh: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionNoop), + }, + }, + }, + }, + }) +} + +func TestAccNetworkManagerDevice_tags_AddOnUpdate(t *testing.T) { + ctx := acctest.Context(t) + resourceName := "aws_networkmanager_device.test" + + acctest.ParallelTest(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckDeviceDestroy(ctx), + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + Steps: []resource.TestStep{ + { + ConfigDirectory: config.StaticDirectory("testdata/Device/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: nil, + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckDeviceExists(ctx, resourceName), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.Null()), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{})), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.Null()), + // TODO: Should be known + plancheck.ExpectUnknownValue(resourceName, tfjsonpath.New(names.AttrTagsAll)), + }, + }, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/Device/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckDeviceExists(ctx, resourceName), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + }, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/Device/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateIdFunc: acctest.AttrImportStateIdFunc(resourceName, names.AttrARN), + ImportStateVerify: true, + ImportStateVerifyIdentifierAttribute: names.AttrARN, + }, + }, + }) +} + +func TestAccNetworkManagerDevice_tags_EmptyTag_OnCreate(t *testing.T) { + t.Skip("Resource Device does not support empty tags") + + ctx := acctest.Context(t) + resourceName := "aws_networkmanager_device.test" + + acctest.ParallelTest(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckDeviceDestroy(ctx), + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + Steps: []resource.TestStep{ + { + ConfigDirectory: config.StaticDirectory("testdata/Device/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(""), + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckDeviceExists(ctx, resourceName), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(""), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(""), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(""), + })), + // TODO: Should be known + plancheck.ExpectUnknownValue(resourceName, tfjsonpath.New(names.AttrTagsAll)), + }, + }, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/Device/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(""), + }), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateIdFunc: acctest.AttrImportStateIdFunc(resourceName, names.AttrARN), + ImportStateVerify: true, + ImportStateVerifyIdentifierAttribute: names.AttrARN, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/Device/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: nil, + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckDeviceExists(ctx, resourceName), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{})), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{})), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{})), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{})), + }, + }, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/Device/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: nil, + }, + ResourceName: resourceName, + ImportState: true, + ImportStateIdFunc: acctest.AttrImportStateIdFunc(resourceName, names.AttrARN), + ImportStateVerify: true, + ImportStateVerifyIdentifierAttribute: names.AttrARN, + }, + }, + }) +} + +func TestAccNetworkManagerDevice_tags_EmptyTag_OnUpdate_Add(t *testing.T) { + t.Skip("Resource Device does not support empty tags") + + ctx := acctest.Context(t) + resourceName := "aws_networkmanager_device.test" + + acctest.ParallelTest(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckDeviceDestroy(ctx), + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + Steps: []resource.TestStep{ + { + ConfigDirectory: config.StaticDirectory("testdata/Device/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckDeviceExists(ctx, resourceName), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + }, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/Device/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + acctest.CtKey2: config.StringVariable(""), + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckDeviceExists(ctx, resourceName), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + acctest.CtKey2: knownvalue.StringExact(""), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + acctest.CtKey2: knownvalue.StringExact(""), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + acctest.CtKey2: knownvalue.StringExact(""), + })), + // TODO: Should be known + plancheck.ExpectUnknownValue(resourceName, tfjsonpath.New(names.AttrTagsAll)), + }, + }, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/Device/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + acctest.CtKey2: config.StringVariable(""), + }), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateIdFunc: acctest.AttrImportStateIdFunc(resourceName, names.AttrARN), + ImportStateVerify: true, + ImportStateVerifyIdentifierAttribute: names.AttrARN, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/Device/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckDeviceExists(ctx, resourceName), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + }, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/Device/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateIdFunc: acctest.AttrImportStateIdFunc(resourceName, names.AttrARN), + ImportStateVerify: true, + ImportStateVerifyIdentifierAttribute: names.AttrARN, + }, + }, + }) +} + +func TestAccNetworkManagerDevice_tags_EmptyTag_OnUpdate_Replace(t *testing.T) { + t.Skip("Resource Device does not support empty tags") + + ctx := acctest.Context(t) + resourceName := "aws_networkmanager_device.test" + + acctest.ParallelTest(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckDeviceDestroy(ctx), + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + Steps: []resource.TestStep{ + { + ConfigDirectory: config.StaticDirectory("testdata/Device/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckDeviceExists(ctx, resourceName), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + }, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/Device/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(""), + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckDeviceExists(ctx, resourceName), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(""), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(""), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(""), + })), + // TODO: Should be known + plancheck.ExpectUnknownValue(resourceName, tfjsonpath.New(names.AttrTagsAll)), + }, + }, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/Device/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(""), + }), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateIdFunc: acctest.AttrImportStateIdFunc(resourceName, names.AttrARN), + ImportStateVerify: true, + ImportStateVerifyIdentifierAttribute: names.AttrARN, + }, + }, + }) +} + +func TestAccNetworkManagerDevice_tags_DefaultTags_providerOnly(t *testing.T) { + ctx := acctest.Context(t) + resourceName := "aws_networkmanager_device.test" + + acctest.ParallelTest(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckDeviceDestroy(ctx), + Steps: []resource.TestStep{ + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/Device/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + acctest.CtResourceTags: nil, + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckDeviceExists(ctx, resourceName), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.Null()), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.Null()), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/Device/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + acctest.CtResourceTags: nil, + }, + ResourceName: resourceName, + ImportState: true, + ImportStateIdFunc: acctest.AttrImportStateIdFunc(resourceName, names.AttrARN), + ImportStateVerify: true, + ImportStateVerifyIdentifierAttribute: names.AttrARN, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/Device/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1Updated), + acctest.CtKey2: config.StringVariable(acctest.CtValue2), + }), + acctest.CtResourceTags: nil, + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckDeviceExists(ctx, resourceName), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{})), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1Updated), + acctest.CtKey2: knownvalue.StringExact(acctest.CtValue2), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{})), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1Updated), + acctest.CtKey2: knownvalue.StringExact(acctest.CtValue2), + })), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/Device/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1Updated), + acctest.CtKey2: config.StringVariable(acctest.CtValue2), + }), + acctest.CtResourceTags: nil, + }, + ResourceName: resourceName, + ImportState: true, + ImportStateIdFunc: acctest.AttrImportStateIdFunc(resourceName, names.AttrARN), + ImportStateVerify: true, + ImportStateVerifyIdentifierAttribute: names.AttrARN, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/Device/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey2: config.StringVariable(acctest.CtValue2), + }), + acctest.CtResourceTags: nil, + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckDeviceExists(ctx, resourceName), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{})), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey2: knownvalue.StringExact(acctest.CtValue2), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{})), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey2: knownvalue.StringExact(acctest.CtValue2), + })), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/Device/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey2: config.StringVariable(acctest.CtValue2), + }), + acctest.CtResourceTags: nil, + }, + ResourceName: resourceName, + ImportState: true, + ImportStateIdFunc: acctest.AttrImportStateIdFunc(resourceName, names.AttrARN), + ImportStateVerify: true, + ImportStateVerifyIdentifierAttribute: names.AttrARN, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/Device/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: nil, + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckDeviceExists(ctx, resourceName), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{})), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{})), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{})), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{})), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/Device/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: nil, + }, + ResourceName: resourceName, + ImportState: true, + ImportStateIdFunc: acctest.AttrImportStateIdFunc(resourceName, names.AttrARN), + ImportStateVerify: true, + ImportStateVerifyIdentifierAttribute: names.AttrARN, + }, + }, + }) +} + +func TestAccNetworkManagerDevice_tags_DefaultTags_nonOverlapping(t *testing.T) { + ctx := acctest.Context(t) + resourceName := "aws_networkmanager_device.test" + + acctest.ParallelTest(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckDeviceDestroy(ctx), + Steps: []resource.TestStep{ + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/Device/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtProviderKey1: config.StringVariable(acctest.CtProviderValue1), + }), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtResourceKey1: config.StringVariable(acctest.CtResourceValue1), + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckDeviceExists(ctx, resourceName), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtProviderKey1: knownvalue.StringExact(acctest.CtProviderValue1), + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtProviderKey1: knownvalue.StringExact(acctest.CtProviderValue1), + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), + })), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/Device/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtProviderKey1: config.StringVariable(acctest.CtProviderValue1), + }), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtResourceKey1: config.StringVariable(acctest.CtResourceValue1), + }), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateIdFunc: acctest.AttrImportStateIdFunc(resourceName, names.AttrARN), + ImportStateVerify: true, + ImportStateVerifyIdentifierAttribute: names.AttrARN, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/Device/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtProviderKey1: config.StringVariable(acctest.CtProviderValue1Updated), + }), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtResourceKey1: config.StringVariable(acctest.CtResourceValue1Updated), + acctest.CtResourceKey2: config.StringVariable(acctest.CtResourceValue2), + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckDeviceExists(ctx, resourceName), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1Updated), + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtProviderKey1: knownvalue.StringExact(acctest.CtProviderValue1Updated), + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1Updated), + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1Updated), + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtProviderKey1: knownvalue.StringExact(acctest.CtProviderValue1Updated), + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1Updated), + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/Device/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtProviderKey1: config.StringVariable(acctest.CtProviderValue1Updated), + }), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtResourceKey1: config.StringVariable(acctest.CtResourceValue1Updated), + acctest.CtResourceKey2: config.StringVariable(acctest.CtResourceValue2), + }), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateIdFunc: acctest.AttrImportStateIdFunc(resourceName, names.AttrARN), + ImportStateVerify: true, + ImportStateVerifyIdentifierAttribute: names.AttrARN, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/Device/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: nil, + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckDeviceExists(ctx, resourceName), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{})), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{})), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{})), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{})), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/Device/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: nil, + }, + ResourceName: resourceName, + ImportState: true, + ImportStateIdFunc: acctest.AttrImportStateIdFunc(resourceName, names.AttrARN), + ImportStateVerify: true, + ImportStateVerifyIdentifierAttribute: names.AttrARN, + }, + }, + }) +} + +func TestAccNetworkManagerDevice_tags_DefaultTags_overlapping(t *testing.T) { + ctx := acctest.Context(t) + resourceName := "aws_networkmanager_device.test" + + acctest.ParallelTest(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckDeviceDestroy(ctx), + Steps: []resource.TestStep{ + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/Device/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtOverlapKey1: config.StringVariable(acctest.CtProviderValue1), + }), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtOverlapKey1: config.StringVariable(acctest.CtResourceValue1), + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckDeviceExists(ctx, resourceName), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtOverlapKey1: knownvalue.StringExact(acctest.CtResourceValue1), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtOverlapKey1: knownvalue.StringExact(acctest.CtResourceValue1), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtOverlapKey1: knownvalue.StringExact(acctest.CtResourceValue1), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtOverlapKey1: knownvalue.StringExact(acctest.CtResourceValue1), + })), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/Device/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtOverlapKey1: config.StringVariable(acctest.CtProviderValue1), + }), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtOverlapKey1: config.StringVariable(acctest.CtResourceValue1), + }), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateIdFunc: acctest.AttrImportStateIdFunc(resourceName, names.AttrARN), + ImportStateVerify: true, + ImportStateVerifyIdentifierAttribute: names.AttrARN, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/Device/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtOverlapKey1: config.StringVariable(acctest.CtProviderValue1), + acctest.CtOverlapKey2: config.StringVariable("providervalue2"), + }), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtOverlapKey1: config.StringVariable(acctest.CtResourceValue1), + acctest.CtOverlapKey2: config.StringVariable(acctest.CtResourceValue2), + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckDeviceExists(ctx, resourceName), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtOverlapKey1: knownvalue.StringExact(acctest.CtResourceValue1), + acctest.CtOverlapKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtOverlapKey1: knownvalue.StringExact(acctest.CtResourceValue1), + acctest.CtOverlapKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtOverlapKey1: knownvalue.StringExact(acctest.CtResourceValue1), + acctest.CtOverlapKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtOverlapKey1: knownvalue.StringExact(acctest.CtResourceValue1), + acctest.CtOverlapKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/Device/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtOverlapKey1: config.StringVariable(acctest.CtProviderValue1), + acctest.CtOverlapKey2: config.StringVariable("providervalue2"), + }), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtOverlapKey1: config.StringVariable(acctest.CtResourceValue1), + acctest.CtOverlapKey2: config.StringVariable(acctest.CtResourceValue2), + }), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateIdFunc: acctest.AttrImportStateIdFunc(resourceName, names.AttrARN), + ImportStateVerify: true, + ImportStateVerifyIdentifierAttribute: names.AttrARN, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/Device/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtOverlapKey1: config.StringVariable(acctest.CtProviderValue1), + }), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtOverlapKey1: config.StringVariable(acctest.CtResourceValue2), + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckDeviceExists(ctx, resourceName), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtOverlapKey1: knownvalue.StringExact(acctest.CtResourceValue2), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtOverlapKey1: knownvalue.StringExact(acctest.CtResourceValue2), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtOverlapKey1: knownvalue.StringExact(acctest.CtResourceValue2), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtOverlapKey1: knownvalue.StringExact(acctest.CtResourceValue2), + })), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/Device/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtOverlapKey1: config.StringVariable(acctest.CtProviderValue1), + }), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtOverlapKey1: config.StringVariable(acctest.CtResourceValue2), + }), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateIdFunc: acctest.AttrImportStateIdFunc(resourceName, names.AttrARN), + ImportStateVerify: true, + ImportStateVerifyIdentifierAttribute: names.AttrARN, + }, + }, + }) +} + +func TestAccNetworkManagerDevice_tags_DefaultTags_updateToProviderOnly(t *testing.T) { + ctx := acctest.Context(t) + resourceName := "aws_networkmanager_device.test" + + acctest.ParallelTest(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckDeviceDestroy(ctx), + Steps: []resource.TestStep{ + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/Device/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckDeviceExists(ctx, resourceName), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/Device/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + acctest.CtResourceTags: nil, + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckDeviceExists(ctx, resourceName), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{})), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{})), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/Device/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + acctest.CtResourceTags: nil, + }, + ResourceName: resourceName, + ImportState: true, + ImportStateIdFunc: acctest.AttrImportStateIdFunc(resourceName, names.AttrARN), + ImportStateVerify: true, + ImportStateVerifyIdentifierAttribute: names.AttrARN, + }, + }, + }) +} + +func TestAccNetworkManagerDevice_tags_DefaultTags_updateToResourceOnly(t *testing.T) { + ctx := acctest.Context(t) + resourceName := "aws_networkmanager_device.test" + + acctest.ParallelTest(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckDeviceDestroy(ctx), + Steps: []resource.TestStep{ + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/Device/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + acctest.CtResourceTags: nil, + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckDeviceExists(ctx, resourceName), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.Null()), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.Null()), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/Device/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckDeviceExists(ctx, resourceName), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionNoop), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/Device/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateIdFunc: acctest.AttrImportStateIdFunc(resourceName, names.AttrARN), + ImportStateVerify: true, + ImportStateVerifyIdentifierAttribute: names.AttrARN, + }, + }, + }) +} + +func TestAccNetworkManagerDevice_tags_DefaultTags_emptyResourceTag(t *testing.T) { + t.Skip("Resource Device does not support empty tags") + + ctx := acctest.Context(t) + resourceName := "aws_networkmanager_device.test" + + acctest.ParallelTest(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckDeviceDestroy(ctx), + Steps: []resource.TestStep{ + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/Device/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(""), + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckDeviceExists(ctx, resourceName), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(""), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(""), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(""), + })), + // TODO: Should be known + plancheck.ExpectUnknownValue(resourceName, tfjsonpath.New(names.AttrTagsAll)), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/Device/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(""), + }), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateIdFunc: acctest.AttrImportStateIdFunc(resourceName, names.AttrARN), + ImportStateVerify: true, + ImportStateVerifyIdentifierAttribute: names.AttrARN, + }, + }, + }) +} + +func TestAccNetworkManagerDevice_tags_DefaultTags_emptyProviderOnlyTag(t *testing.T) { + t.Skip("Resource Device does not support empty tags") + + ctx := acctest.Context(t) + resourceName := "aws_networkmanager_device.test" + + acctest.ParallelTest(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckDeviceDestroy(ctx), + Steps: []resource.TestStep{ + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/Device/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(""), + }), + acctest.CtResourceTags: nil, + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckDeviceExists(ctx, resourceName), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.Null()), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(""), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.Null()), + // TODO: Should be known + plancheck.ExpectUnknownValue(resourceName, tfjsonpath.New(names.AttrTagsAll)), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/Device/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(""), + }), + acctest.CtResourceTags: nil, + }, + ResourceName: resourceName, + ImportState: true, + ImportStateIdFunc: acctest.AttrImportStateIdFunc(resourceName, names.AttrARN), + ImportStateVerify: true, + ImportStateVerifyIdentifierAttribute: names.AttrARN, + }, + }, + }) +} + +func TestAccNetworkManagerDevice_tags_DefaultTags_nullOverlappingResourceTag(t *testing.T) { + ctx := acctest.Context(t) + resourceName := "aws_networkmanager_device.test" + + acctest.ParallelTest(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckDeviceDestroy(ctx), + Steps: []resource.TestStep{ + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/Device/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtProviderValue1), + }), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: nil, + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckDeviceExists(ctx, resourceName), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.Null()), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtProviderValue1), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.Null()), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtProviderValue1), + })), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/Device/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtProviderValue1), + }), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: nil, + }), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateIdFunc: acctest.AttrImportStateIdFunc(resourceName, names.AttrARN), + ImportStateVerify: true, + ImportStateVerifyIdentifierAttribute: names.AttrARN, + }, + }, + }) +} + +func TestAccNetworkManagerDevice_tags_DefaultTags_nullNonOverlappingResourceTag(t *testing.T) { + ctx := acctest.Context(t) + resourceName := "aws_networkmanager_device.test" + + acctest.ParallelTest(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckDeviceDestroy(ctx), + Steps: []resource.TestStep{ + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/Device/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtProviderKey1: config.StringVariable(acctest.CtProviderValue1), + }), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtResourceKey1: nil, + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckDeviceExists(ctx, resourceName), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.Null()), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtProviderKey1: knownvalue.StringExact(acctest.CtProviderValue1), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.Null()), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtProviderKey1: knownvalue.StringExact(acctest.CtProviderValue1), + })), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/Device/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtProviderKey1: config.StringVariable(acctest.CtProviderValue1), + }), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtResourceKey1: nil, + }), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateIdFunc: acctest.AttrImportStateIdFunc(resourceName, names.AttrARN), + ImportStateVerify: true, + ImportStateVerifyIdentifierAttribute: names.AttrARN, + }, + }, + }) +} + +func TestAccNetworkManagerDevice_tags_ComputedTag_OnCreate(t *testing.T) { + ctx := acctest.Context(t) + resourceName := "aws_networkmanager_device.test" + + acctest.ParallelTest(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckDeviceDestroy(ctx), + Steps: []resource.TestStep{ + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/Device/tagsComputed1/"), + ConfigVariables: config.Variables{ + "unknownTagKey": config.StringVariable("computedkey1"), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckDeviceExists(ctx, resourceName), + resource.TestCheckResourceAttrPair(resourceName, "tags.computedkey1", "null_resource.test", names.AttrID), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapSizeExact(1)), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapSizeExact(1)), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectUnknownValue(resourceName, tfjsonpath.New(names.AttrTags)), + plancheck.ExpectUnknownValue(resourceName, tfjsonpath.New(names.AttrTagsAll)), + }, + PostApplyPreRefresh: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionNoop), + }, + PostApplyPostRefresh: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionNoop), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/Device/tagsComputed1/"), + ConfigVariables: config.Variables{ + "unknownTagKey": config.StringVariable("computedkey1"), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateIdFunc: acctest.AttrImportStateIdFunc(resourceName, names.AttrARN), + ImportStateVerify: true, + ImportStateVerifyIdentifierAttribute: names.AttrARN, + }, + }, + }) +} + +func TestAccNetworkManagerDevice_tags_ComputedTag_OnUpdate_Add(t *testing.T) { + ctx := acctest.Context(t) + resourceName := "aws_networkmanager_device.test" + + acctest.ParallelTest(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckDeviceDestroy(ctx), + Steps: []resource.TestStep{ + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/Device/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckDeviceExists(ctx, resourceName), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/Device/tagsComputed2/"), + ConfigVariables: config.Variables{ + "unknownTagKey": config.StringVariable("computedkey1"), + "knownTagKey": config.StringVariable(acctest.CtKey1), + "knownTagValue": config.StringVariable(acctest.CtValue1), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckDeviceExists(ctx, resourceName), + resource.TestCheckResourceAttrPair(resourceName, "tags.computedkey1", "null_resource.test", names.AttrID), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapSizeExact(2)), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapPartial(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapSizeExact(2)), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapPartial(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectUnknownValue(resourceName, tfjsonpath.New(names.AttrTags)), + plancheck.ExpectUnknownValue(resourceName, tfjsonpath.New(names.AttrTagsAll)), + }, + PostApplyPreRefresh: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionNoop), + }, + PostApplyPostRefresh: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionNoop), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/Device/tagsComputed2/"), + ConfigVariables: config.Variables{ + "unknownTagKey": config.StringVariable("computedkey1"), + "knownTagKey": config.StringVariable(acctest.CtKey1), + "knownTagValue": config.StringVariable(acctest.CtValue1), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateIdFunc: acctest.AttrImportStateIdFunc(resourceName, names.AttrARN), + ImportStateVerify: true, + ImportStateVerifyIdentifierAttribute: names.AttrARN, + }, + }, + }) +} + +func TestAccNetworkManagerDevice_tags_ComputedTag_OnUpdate_Replace(t *testing.T) { + ctx := acctest.Context(t) + resourceName := "aws_networkmanager_device.test" + + acctest.ParallelTest(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckDeviceDestroy(ctx), + Steps: []resource.TestStep{ + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/Device/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckDeviceExists(ctx, resourceName), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/Device/tagsComputed1/"), + ConfigVariables: config.Variables{ + "unknownTagKey": config.StringVariable(acctest.CtKey1), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckDeviceExists(ctx, resourceName), + resource.TestCheckResourceAttrPair(resourceName, acctest.CtTagsKey1, "null_resource.test", names.AttrID), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapSizeExact(1)), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapSizeExact(1)), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectUnknownValue(resourceName, tfjsonpath.New(names.AttrTags)), + plancheck.ExpectUnknownValue(resourceName, tfjsonpath.New(names.AttrTagsAll)), + }, + PostApplyPreRefresh: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionNoop), + }, + PostApplyPostRefresh: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionNoop), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/Device/tagsComputed1/"), + ConfigVariables: config.Variables{ + "unknownTagKey": config.StringVariable(acctest.CtKey1), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateIdFunc: acctest.AttrImportStateIdFunc(resourceName, names.AttrARN), + ImportStateVerify: true, + ImportStateVerifyIdentifierAttribute: names.AttrARN, + }, + }, + }) +} + +func TestAccNetworkManagerDevice_tags_IgnoreTags_Overlap_DefaultTag(t *testing.T) { + ctx := acctest.Context(t) + resourceName := "aws_networkmanager_device.test" + + acctest.ParallelTest(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckDeviceDestroy(ctx), + Steps: []resource.TestStep{ + // 1: Create + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/Device/tags_ignore/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtProviderKey1: config.StringVariable(acctest.CtProviderValue1), + }), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtResourceKey1: config.StringVariable(acctest.CtResourceValue1), + }), + "ignore_tag_keys": config.SetVariable( + config.StringVariable(acctest.CtProviderKey1), + ), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckDeviceExists(ctx, resourceName), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), + })), + expectFullResourceTags(ctx, resourceName, knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtProviderKey1: knownvalue.StringExact(acctest.CtProviderValue1), // TODO: Should not be set + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), + })), + }, + PostApplyPreRefresh: []plancheck.PlanCheck{ + plancheck.ExpectEmptyPlan(), + }, + PostApplyPostRefresh: []plancheck.PlanCheck{ + plancheck.ExpectEmptyPlan(), + }, + }, + }, + // 2: Update ignored tag only + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/Device/tags_ignore/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtProviderKey1: config.StringVariable(acctest.CtProviderValue1Updated), + }), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtResourceKey1: config.StringVariable(acctest.CtResourceValue1), + }), + "ignore_tag_keys": config.SetVariable( + config.StringVariable(acctest.CtProviderKey1), + ), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckDeviceExists(ctx, resourceName), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), + })), + expectFullResourceTags(ctx, resourceName, knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtProviderKey1: knownvalue.StringExact(acctest.CtProviderValue1), // TODO: Should not be set + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionNoop), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), + })), + }, + PostApplyPreRefresh: []plancheck.PlanCheck{ + plancheck.ExpectEmptyPlan(), + }, + PostApplyPostRefresh: []plancheck.PlanCheck{ + plancheck.ExpectEmptyPlan(), + }, + }, + }, + // 3: Update both tags + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/Device/tags_ignore/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtProviderKey1: config.StringVariable(acctest.CtProviderValue1Again), + }), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtResourceKey1: config.StringVariable(acctest.CtResourceValue1Updated), + }), + "ignore_tag_keys": config.SetVariable( + config.StringVariable(acctest.CtProviderKey1), + ), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckDeviceExists(ctx, resourceName), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1Updated), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1Updated), + })), + expectFullResourceTags(ctx, resourceName, knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtProviderKey1: knownvalue.StringExact(acctest.CtProviderValue1), // TODO: Should not be set + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1Updated), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1Updated), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1Updated), + })), + }, + PostApplyPreRefresh: []plancheck.PlanCheck{ + plancheck.ExpectEmptyPlan(), + }, + PostApplyPostRefresh: []plancheck.PlanCheck{ + plancheck.ExpectEmptyPlan(), + }, + }, + }, + }, + }) +} + +func TestAccNetworkManagerDevice_tags_IgnoreTags_Overlap_ResourceTag(t *testing.T) { + ctx := acctest.Context(t) + resourceName := "aws_networkmanager_device.test" + + acctest.ParallelTest(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckDeviceDestroy(ctx), + Steps: []resource.TestStep{ + // 1: Create + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/Device/tags_ignore/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtResourceKey1: config.StringVariable(acctest.CtResourceValue1), + acctest.CtResourceKey2: config.StringVariable(acctest.CtResourceValue2), + }), + "ignore_tag_keys": config.SetVariable( + config.StringVariable(acctest.CtResourceKey1), + ), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckDeviceExists(ctx, resourceName), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + expectFullResourceTags(ctx, resourceName, knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), // TODO: Should not be set + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + }, + PostApplyPreRefresh: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + }, + PostApplyPostRefresh: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + }, + }, + ExpectNonEmptyPlan: true, + }, + // 2: Update ignored tag + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/Device/tags_ignore/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtResourceKey1: config.StringVariable(acctest.CtResourceValue1Updated), + acctest.CtResourceKey2: config.StringVariable(acctest.CtResourceValue2), + }), + "ignore_tag_keys": config.SetVariable( + config.StringVariable(acctest.CtResourceKey1), + ), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckDeviceExists(ctx, resourceName), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + expectFullResourceTags(ctx, resourceName, knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), // TODO: Should not be set + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1Updated), + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + }, + PostApplyPreRefresh: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1Updated), + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + }, + PostApplyPostRefresh: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1Updated), + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + }, + }, + ExpectNonEmptyPlan: true, + }, + // 3: Update both tags + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/Device/tags_ignore/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtResourceKey1: config.StringVariable(acctest.CtResourceValue1Again), + acctest.CtResourceKey2: config.StringVariable(acctest.CtResourceValue2Updated), + }), + "ignore_tag_keys": config.SetVariable( + config.StringVariable(acctest.CtResourceKey1), + ), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckDeviceExists(ctx, resourceName), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2Updated), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2Updated), + })), + expectFullResourceTags(ctx, resourceName, knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), // TODO: Should not be set + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2Updated), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1Again), + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2Updated), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2Updated), + })), + }, + PostApplyPreRefresh: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1Again), + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2Updated), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2Updated), + })), + }, + PostApplyPostRefresh: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1Again), + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2Updated), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2Updated), + })), + }, + }, + ExpectNonEmptyPlan: true, + }, + }, + }) +} diff --git a/internal/service/networkmanager/device_test.go b/internal/service/networkmanager/device_test.go index 02018bc89113..19512192ccfb 100644 --- a/internal/service/networkmanager/device_test.go +++ b/internal/service/networkmanager/device_test.go @@ -78,52 +78,6 @@ func TestAccNetworkManagerDevice_disappears(t *testing.T) { }) } -func TestAccNetworkManagerDevice_tags(t *testing.T) { - ctx := acctest.Context(t) - resourceName := "aws_networkmanager_device.test" - rName := sdkacctest.RandomWithPrefix(acctest.ResourcePrefix) - - resource.ParallelTest(t, resource.TestCase{ - PreCheck: func() { acctest.PreCheck(ctx, t) }, - ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), - ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, - CheckDestroy: testAccCheckDeviceDestroy(ctx), - Steps: []resource.TestStep{ - { - Config: testAccDeviceConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), - Check: resource.ComposeTestCheckFunc( - testAccCheckDeviceExists(ctx, resourceName), - resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, "1"), - resource.TestCheckResourceAttr(resourceName, acctest.CtTagsKey1, acctest.CtValue1), - ), - }, - { - ResourceName: resourceName, - ImportState: true, - ImportStateIdFunc: acctest.AttrImportStateIdFunc(resourceName, names.AttrARN), - ImportStateVerify: true, - }, - { - Config: testAccDeviceConfig_tags2(rName, acctest.CtKey1, acctest.CtValue1Updated, acctest.CtKey2, acctest.CtValue2), - Check: resource.ComposeTestCheckFunc( - testAccCheckDeviceExists(ctx, resourceName), - resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, "2"), - resource.TestCheckResourceAttr(resourceName, acctest.CtTagsKey1, acctest.CtValue1Updated), - resource.TestCheckResourceAttr(resourceName, acctest.CtTagsKey2, acctest.CtValue2), - ), - }, - { - Config: testAccDeviceConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), - Check: resource.ComposeTestCheckFunc( - testAccCheckDeviceExists(ctx, resourceName), - resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, "1"), - resource.TestCheckResourceAttr(resourceName, acctest.CtTagsKey2, acctest.CtValue2), - ), - }, - }, - }) -} - func TestAccNetworkManagerDevice_allAttributes(t *testing.T) { ctx := acctest.Context(t) resourceName := "aws_networkmanager_device.test" @@ -278,43 +232,6 @@ resource "aws_networkmanager_device" "test" { `, rName) } -func testAccDeviceConfig_tags1(rName, tagKey1, tagValue1 string) string { - return fmt.Sprintf(` -resource "aws_networkmanager_global_network" "test" { - tags = { - Name = %[1]q - } -} - -resource "aws_networkmanager_device" "test" { - global_network_id = aws_networkmanager_global_network.test.id - - tags = { - %[2]q = %[3]q - } -} -`, rName, tagKey1, tagValue1) -} - -func testAccDeviceConfig_tags2(rName, tagKey1, tagValue1, tagKey2, tagValue2 string) string { - return fmt.Sprintf(` -resource "aws_networkmanager_global_network" "test" { - tags = { - Name = %[1]q - } -} - -resource "aws_networkmanager_device" "test" { - global_network_id = aws_networkmanager_global_network.test.id - - tags = { - %[2]q = %[3]q - %[4]q = %[5]q - } -} -`, rName, tagKey1, tagValue1, tagKey2, tagValue2) -} - func testAccDeviceConfig_allAttributes(rName string) string { return fmt.Sprintf(` resource "aws_networkmanager_global_network" "test" { diff --git a/internal/service/networkmanager/testdata/Device/tags/main_gen.tf b/internal/service/networkmanager/testdata/Device/tags/main_gen.tf new file mode 100644 index 000000000000..2846f7b6a79a --- /dev/null +++ b/internal/service/networkmanager/testdata/Device/tags/main_gen.tf @@ -0,0 +1,17 @@ +# Copyright (c) HashiCorp, Inc. +# SPDX-License-Identifier: MPL-2.0 + +resource "aws_networkmanager_device" "test" { + global_network_id = aws_networkmanager_global_network.test.id + + tags = var.resource_tags +} + +resource "aws_networkmanager_global_network" "test" {} + +variable "resource_tags" { + description = "Tags to set on resource. To specify no tags, set to `null`" + # Not setting a default, so that this must explicitly be set to `null` to specify no tags + type = map(string) + nullable = true +} diff --git a/internal/service/networkmanager/testdata/Device/tagsComputed1/main_gen.tf b/internal/service/networkmanager/testdata/Device/tagsComputed1/main_gen.tf new file mode 100644 index 000000000000..b3553e01e618 --- /dev/null +++ b/internal/service/networkmanager/testdata/Device/tagsComputed1/main_gen.tf @@ -0,0 +1,21 @@ +# Copyright (c) HashiCorp, Inc. +# SPDX-License-Identifier: MPL-2.0 + +provider "null" {} + +resource "aws_networkmanager_device" "test" { + global_network_id = aws_networkmanager_global_network.test.id + + tags = { + (var.unknownTagKey) = null_resource.test.id + } +} + +resource "aws_networkmanager_global_network" "test" {} + +resource "null_resource" "test" {} + +variable "unknownTagKey" { + type = string + nullable = false +} diff --git a/internal/service/networkmanager/testdata/Device/tagsComputed2/main_gen.tf b/internal/service/networkmanager/testdata/Device/tagsComputed2/main_gen.tf new file mode 100644 index 000000000000..1b0c2a797790 --- /dev/null +++ b/internal/service/networkmanager/testdata/Device/tagsComputed2/main_gen.tf @@ -0,0 +1,32 @@ +# Copyright (c) HashiCorp, Inc. +# SPDX-License-Identifier: MPL-2.0 + +provider "null" {} + +resource "aws_networkmanager_device" "test" { + global_network_id = aws_networkmanager_global_network.test.id + + tags = { + (var.unknownTagKey) = null_resource.test.id + (var.knownTagKey) = var.knownTagValue + } +} + +resource "aws_networkmanager_global_network" "test" {} + +resource "null_resource" "test" {} + +variable "unknownTagKey" { + type = string + nullable = false +} + +variable "knownTagKey" { + type = string + nullable = false +} + +variable "knownTagValue" { + type = string + nullable = false +} diff --git a/internal/service/networkmanager/testdata/Device/tags_defaults/main_gen.tf b/internal/service/networkmanager/testdata/Device/tags_defaults/main_gen.tf new file mode 100644 index 000000000000..7252cc6e4399 --- /dev/null +++ b/internal/service/networkmanager/testdata/Device/tags_defaults/main_gen.tf @@ -0,0 +1,28 @@ +# Copyright (c) HashiCorp, Inc. +# SPDX-License-Identifier: MPL-2.0 + +provider "aws" { + default_tags { + tags = var.provider_tags + } +} + +resource "aws_networkmanager_device" "test" { + global_network_id = aws_networkmanager_global_network.test.id + + tags = var.resource_tags +} + +resource "aws_networkmanager_global_network" "test" {} + +variable "resource_tags" { + description = "Tags to set on resource. To specify no tags, set to `null`" + # Not setting a default, so that this must explicitly be set to `null` to specify no tags + type = map(string) + nullable = true +} + +variable "provider_tags" { + type = map(string) + nullable = false +} diff --git a/internal/service/networkmanager/testdata/Device/tags_ignore/main_gen.tf b/internal/service/networkmanager/testdata/Device/tags_ignore/main_gen.tf new file mode 100644 index 000000000000..e78593d8644a --- /dev/null +++ b/internal/service/networkmanager/testdata/Device/tags_ignore/main_gen.tf @@ -0,0 +1,37 @@ +# Copyright (c) HashiCorp, Inc. +# SPDX-License-Identifier: MPL-2.0 + +provider "aws" { + default_tags { + tags = var.provider_tags + } + ignore_tags { + keys = var.ignore_tag_keys + } +} + +resource "aws_networkmanager_device" "test" { + global_network_id = aws_networkmanager_global_network.test.id + + tags = var.resource_tags +} + +resource "aws_networkmanager_global_network" "test" {} + +variable "resource_tags" { + description = "Tags to set on resource. To specify no tags, set to `null`" + # Not setting a default, so that this must explicitly be set to `null` to specify no tags + type = map(string) + nullable = true +} + +variable "provider_tags" { + type = map(string) + nullable = true + default = null +} + +variable "ignore_tag_keys" { + type = set(string) + nullable = false +} diff --git a/internal/service/networkmanager/testdata/tmpl/device_tags.gtpl b/internal/service/networkmanager/testdata/tmpl/device_tags.gtpl new file mode 100644 index 000000000000..ca414b490676 --- /dev/null +++ b/internal/service/networkmanager/testdata/tmpl/device_tags.gtpl @@ -0,0 +1,6 @@ +resource "aws_networkmanager_device" "test" { + global_network_id = aws_networkmanager_global_network.test.id +{{- template "tags" . }} +} + +resource "aws_networkmanager_global_network" "test" {} From 4aab34fb32943d0287098f9cacac43ddea70df9c Mon Sep 17 00:00:00 2001 From: Graham Davison Date: Thu, 24 Jul 2025 22:54:51 -0700 Subject: [PATCH 041/365] `aws_networkmanager_site` --- internal/service/networkmanager/site.go | 4 +- .../networkmanager/site_tags_gen_test.go | 2224 +++++++++++++++++ internal/service/networkmanager/site_test.go | 83 - .../testdata/Site/tags/main_gen.tf | 17 + .../testdata/Site/tagsComputed1/main_gen.tf | 21 + .../testdata/Site/tagsComputed2/main_gen.tf | 32 + .../testdata/Site/tags_defaults/main_gen.tf | 28 + .../testdata/Site/tags_ignore/main_gen.tf | 37 + .../testdata/tmpl/site_tags.gtpl | 6 + 9 files changed, 2368 insertions(+), 84 deletions(-) create mode 100644 internal/service/networkmanager/site_tags_gen_test.go create mode 100644 internal/service/networkmanager/testdata/Site/tags/main_gen.tf create mode 100644 internal/service/networkmanager/testdata/Site/tagsComputed1/main_gen.tf create mode 100644 internal/service/networkmanager/testdata/Site/tagsComputed2/main_gen.tf create mode 100644 internal/service/networkmanager/testdata/Site/tags_defaults/main_gen.tf create mode 100644 internal/service/networkmanager/testdata/Site/tags_ignore/main_gen.tf create mode 100644 internal/service/networkmanager/testdata/tmpl/site_tags.gtpl diff --git a/internal/service/networkmanager/site.go b/internal/service/networkmanager/site.go index 5790078536a3..95a1f2451351 100644 --- a/internal/service/networkmanager/site.go +++ b/internal/service/networkmanager/site.go @@ -29,7 +29,9 @@ import ( // @SDKResource("aws_networkmanager_site", name="Site") // @Tags(identifierAttribute="arn") -// @Testing(tagsTest=false) +// @Testing(skipEmptyTags=true) +// @Testing(generator=false) +// @Testing(importStateIdAttribute="arn") func resourceSite() *schema.Resource { return &schema.Resource{ CreateWithoutTimeout: resourceSiteCreate, diff --git a/internal/service/networkmanager/site_tags_gen_test.go b/internal/service/networkmanager/site_tags_gen_test.go new file mode 100644 index 000000000000..08e5d9c4480a --- /dev/null +++ b/internal/service/networkmanager/site_tags_gen_test.go @@ -0,0 +1,2224 @@ +// Code generated by internal/generate/tagstests/main.go; DO NOT EDIT. + +package networkmanager_test + +import ( + "testing" + + "github.com/hashicorp/terraform-plugin-testing/config" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/knownvalue" + "github.com/hashicorp/terraform-plugin-testing/plancheck" + "github.com/hashicorp/terraform-plugin-testing/statecheck" + "github.com/hashicorp/terraform-plugin-testing/tfjsonpath" + "github.com/hashicorp/terraform-provider-aws/internal/acctest" + "github.com/hashicorp/terraform-provider-aws/names" +) + +func TestAccNetworkManagerSite_tags(t *testing.T) { + ctx := acctest.Context(t) + resourceName := "aws_networkmanager_site.test" + + acctest.ParallelTest(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckSiteDestroy(ctx), + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + Steps: []resource.TestStep{ + { + ConfigDirectory: config.StaticDirectory("testdata/Site/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckSiteExists(ctx, resourceName), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + }, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/Site/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateIdFunc: acctest.AttrImportStateIdFunc(resourceName, names.AttrARN), + ImportStateVerify: true, + ImportStateVerifyIdentifierAttribute: names.AttrARN, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/Site/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1Updated), + acctest.CtKey2: config.StringVariable(acctest.CtValue2), + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckSiteExists(ctx, resourceName), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1Updated), + acctest.CtKey2: knownvalue.StringExact(acctest.CtValue2), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1Updated), + acctest.CtKey2: knownvalue.StringExact(acctest.CtValue2), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1Updated), + acctest.CtKey2: knownvalue.StringExact(acctest.CtValue2), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1Updated), + acctest.CtKey2: knownvalue.StringExact(acctest.CtValue2), + })), + }, + }, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/Site/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1Updated), + acctest.CtKey2: config.StringVariable(acctest.CtValue2), + }), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateIdFunc: acctest.AttrImportStateIdFunc(resourceName, names.AttrARN), + ImportStateVerify: true, + ImportStateVerifyIdentifierAttribute: names.AttrARN, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/Site/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey2: config.StringVariable(acctest.CtValue2), + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckSiteExists(ctx, resourceName), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey2: knownvalue.StringExact(acctest.CtValue2), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey2: knownvalue.StringExact(acctest.CtValue2), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey2: knownvalue.StringExact(acctest.CtValue2), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey2: knownvalue.StringExact(acctest.CtValue2), + })), + }, + }, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/Site/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey2: config.StringVariable(acctest.CtValue2), + }), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateIdFunc: acctest.AttrImportStateIdFunc(resourceName, names.AttrARN), + ImportStateVerify: true, + ImportStateVerifyIdentifierAttribute: names.AttrARN, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/Site/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: nil, + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckSiteExists(ctx, resourceName), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{})), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{})), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{})), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{})), + }, + }, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/Site/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: nil, + }, + ResourceName: resourceName, + ImportState: true, + ImportStateIdFunc: acctest.AttrImportStateIdFunc(resourceName, names.AttrARN), + ImportStateVerify: true, + ImportStateVerifyIdentifierAttribute: names.AttrARN, + }, + }, + }) +} + +func TestAccNetworkManagerSite_tags_null(t *testing.T) { + ctx := acctest.Context(t) + resourceName := "aws_networkmanager_site.test" + + acctest.ParallelTest(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckSiteDestroy(ctx), + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + Steps: []resource.TestStep{ + { + ConfigDirectory: config.StaticDirectory("testdata/Site/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: nil, + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckSiteExists(ctx, resourceName), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.Null()), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{})), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.Null()), + // TODO: Should be known + plancheck.ExpectUnknownValue(resourceName, tfjsonpath.New(names.AttrTagsAll)), + }, + }, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/Site/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: nil, + }), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateIdFunc: acctest.AttrImportStateIdFunc(resourceName, names.AttrARN), + ImportStateVerify: true, + ImportStateVerifyIdentifierAttribute: names.AttrARN, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/Site/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: nil, + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionNoop), + }, + PostApplyPostRefresh: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionNoop), + }, + }, + }, + }, + }) +} + +func TestAccNetworkManagerSite_tags_EmptyMap(t *testing.T) { + ctx := acctest.Context(t) + resourceName := "aws_networkmanager_site.test" + + acctest.ParallelTest(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckSiteDestroy(ctx), + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + Steps: []resource.TestStep{ + { + ConfigDirectory: config.StaticDirectory("testdata/Site/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{}), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckSiteExists(ctx, resourceName), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.Null()), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{})), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.Null()), + // TODO: Should be known + plancheck.ExpectUnknownValue(resourceName, tfjsonpath.New(names.AttrTagsAll)), + }, + }, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/Site/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{}), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateIdFunc: acctest.AttrImportStateIdFunc(resourceName, names.AttrARN), + ImportStateVerify: true, + ImportStateVerifyIdentifierAttribute: names.AttrARN, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/Site/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: nil, + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionNoop), + }, + PostApplyPostRefresh: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionNoop), + }, + }, + }, + }, + }) +} + +func TestAccNetworkManagerSite_tags_AddOnUpdate(t *testing.T) { + ctx := acctest.Context(t) + resourceName := "aws_networkmanager_site.test" + + acctest.ParallelTest(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckSiteDestroy(ctx), + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + Steps: []resource.TestStep{ + { + ConfigDirectory: config.StaticDirectory("testdata/Site/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: nil, + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckSiteExists(ctx, resourceName), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.Null()), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{})), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.Null()), + // TODO: Should be known + plancheck.ExpectUnknownValue(resourceName, tfjsonpath.New(names.AttrTagsAll)), + }, + }, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/Site/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckSiteExists(ctx, resourceName), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + }, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/Site/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateIdFunc: acctest.AttrImportStateIdFunc(resourceName, names.AttrARN), + ImportStateVerify: true, + ImportStateVerifyIdentifierAttribute: names.AttrARN, + }, + }, + }) +} + +func TestAccNetworkManagerSite_tags_EmptyTag_OnCreate(t *testing.T) { + t.Skip("Resource Site does not support empty tags") + + ctx := acctest.Context(t) + resourceName := "aws_networkmanager_site.test" + + acctest.ParallelTest(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckSiteDestroy(ctx), + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + Steps: []resource.TestStep{ + { + ConfigDirectory: config.StaticDirectory("testdata/Site/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(""), + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckSiteExists(ctx, resourceName), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(""), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(""), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(""), + })), + // TODO: Should be known + plancheck.ExpectUnknownValue(resourceName, tfjsonpath.New(names.AttrTagsAll)), + }, + }, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/Site/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(""), + }), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateIdFunc: acctest.AttrImportStateIdFunc(resourceName, names.AttrARN), + ImportStateVerify: true, + ImportStateVerifyIdentifierAttribute: names.AttrARN, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/Site/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: nil, + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckSiteExists(ctx, resourceName), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{})), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{})), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{})), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{})), + }, + }, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/Site/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: nil, + }, + ResourceName: resourceName, + ImportState: true, + ImportStateIdFunc: acctest.AttrImportStateIdFunc(resourceName, names.AttrARN), + ImportStateVerify: true, + ImportStateVerifyIdentifierAttribute: names.AttrARN, + }, + }, + }) +} + +func TestAccNetworkManagerSite_tags_EmptyTag_OnUpdate_Add(t *testing.T) { + t.Skip("Resource Site does not support empty tags") + + ctx := acctest.Context(t) + resourceName := "aws_networkmanager_site.test" + + acctest.ParallelTest(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckSiteDestroy(ctx), + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + Steps: []resource.TestStep{ + { + ConfigDirectory: config.StaticDirectory("testdata/Site/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckSiteExists(ctx, resourceName), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + }, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/Site/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + acctest.CtKey2: config.StringVariable(""), + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckSiteExists(ctx, resourceName), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + acctest.CtKey2: knownvalue.StringExact(""), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + acctest.CtKey2: knownvalue.StringExact(""), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + acctest.CtKey2: knownvalue.StringExact(""), + })), + // TODO: Should be known + plancheck.ExpectUnknownValue(resourceName, tfjsonpath.New(names.AttrTagsAll)), + }, + }, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/Site/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + acctest.CtKey2: config.StringVariable(""), + }), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateIdFunc: acctest.AttrImportStateIdFunc(resourceName, names.AttrARN), + ImportStateVerify: true, + ImportStateVerifyIdentifierAttribute: names.AttrARN, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/Site/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckSiteExists(ctx, resourceName), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + }, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/Site/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateIdFunc: acctest.AttrImportStateIdFunc(resourceName, names.AttrARN), + ImportStateVerify: true, + ImportStateVerifyIdentifierAttribute: names.AttrARN, + }, + }, + }) +} + +func TestAccNetworkManagerSite_tags_EmptyTag_OnUpdate_Replace(t *testing.T) { + t.Skip("Resource Site does not support empty tags") + + ctx := acctest.Context(t) + resourceName := "aws_networkmanager_site.test" + + acctest.ParallelTest(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckSiteDestroy(ctx), + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + Steps: []resource.TestStep{ + { + ConfigDirectory: config.StaticDirectory("testdata/Site/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckSiteExists(ctx, resourceName), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + }, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/Site/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(""), + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckSiteExists(ctx, resourceName), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(""), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(""), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(""), + })), + // TODO: Should be known + plancheck.ExpectUnknownValue(resourceName, tfjsonpath.New(names.AttrTagsAll)), + }, + }, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/Site/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(""), + }), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateIdFunc: acctest.AttrImportStateIdFunc(resourceName, names.AttrARN), + ImportStateVerify: true, + ImportStateVerifyIdentifierAttribute: names.AttrARN, + }, + }, + }) +} + +func TestAccNetworkManagerSite_tags_DefaultTags_providerOnly(t *testing.T) { + ctx := acctest.Context(t) + resourceName := "aws_networkmanager_site.test" + + acctest.ParallelTest(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckSiteDestroy(ctx), + Steps: []resource.TestStep{ + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/Site/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + acctest.CtResourceTags: nil, + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckSiteExists(ctx, resourceName), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.Null()), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.Null()), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/Site/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + acctest.CtResourceTags: nil, + }, + ResourceName: resourceName, + ImportState: true, + ImportStateIdFunc: acctest.AttrImportStateIdFunc(resourceName, names.AttrARN), + ImportStateVerify: true, + ImportStateVerifyIdentifierAttribute: names.AttrARN, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/Site/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1Updated), + acctest.CtKey2: config.StringVariable(acctest.CtValue2), + }), + acctest.CtResourceTags: nil, + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckSiteExists(ctx, resourceName), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{})), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1Updated), + acctest.CtKey2: knownvalue.StringExact(acctest.CtValue2), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{})), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1Updated), + acctest.CtKey2: knownvalue.StringExact(acctest.CtValue2), + })), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/Site/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1Updated), + acctest.CtKey2: config.StringVariable(acctest.CtValue2), + }), + acctest.CtResourceTags: nil, + }, + ResourceName: resourceName, + ImportState: true, + ImportStateIdFunc: acctest.AttrImportStateIdFunc(resourceName, names.AttrARN), + ImportStateVerify: true, + ImportStateVerifyIdentifierAttribute: names.AttrARN, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/Site/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey2: config.StringVariable(acctest.CtValue2), + }), + acctest.CtResourceTags: nil, + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckSiteExists(ctx, resourceName), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{})), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey2: knownvalue.StringExact(acctest.CtValue2), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{})), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey2: knownvalue.StringExact(acctest.CtValue2), + })), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/Site/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey2: config.StringVariable(acctest.CtValue2), + }), + acctest.CtResourceTags: nil, + }, + ResourceName: resourceName, + ImportState: true, + ImportStateIdFunc: acctest.AttrImportStateIdFunc(resourceName, names.AttrARN), + ImportStateVerify: true, + ImportStateVerifyIdentifierAttribute: names.AttrARN, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/Site/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: nil, + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckSiteExists(ctx, resourceName), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{})), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{})), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{})), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{})), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/Site/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: nil, + }, + ResourceName: resourceName, + ImportState: true, + ImportStateIdFunc: acctest.AttrImportStateIdFunc(resourceName, names.AttrARN), + ImportStateVerify: true, + ImportStateVerifyIdentifierAttribute: names.AttrARN, + }, + }, + }) +} + +func TestAccNetworkManagerSite_tags_DefaultTags_nonOverlapping(t *testing.T) { + ctx := acctest.Context(t) + resourceName := "aws_networkmanager_site.test" + + acctest.ParallelTest(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckSiteDestroy(ctx), + Steps: []resource.TestStep{ + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/Site/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtProviderKey1: config.StringVariable(acctest.CtProviderValue1), + }), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtResourceKey1: config.StringVariable(acctest.CtResourceValue1), + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckSiteExists(ctx, resourceName), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtProviderKey1: knownvalue.StringExact(acctest.CtProviderValue1), + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtProviderKey1: knownvalue.StringExact(acctest.CtProviderValue1), + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), + })), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/Site/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtProviderKey1: config.StringVariable(acctest.CtProviderValue1), + }), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtResourceKey1: config.StringVariable(acctest.CtResourceValue1), + }), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateIdFunc: acctest.AttrImportStateIdFunc(resourceName, names.AttrARN), + ImportStateVerify: true, + ImportStateVerifyIdentifierAttribute: names.AttrARN, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/Site/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtProviderKey1: config.StringVariable(acctest.CtProviderValue1Updated), + }), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtResourceKey1: config.StringVariable(acctest.CtResourceValue1Updated), + acctest.CtResourceKey2: config.StringVariable(acctest.CtResourceValue2), + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckSiteExists(ctx, resourceName), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1Updated), + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtProviderKey1: knownvalue.StringExact(acctest.CtProviderValue1Updated), + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1Updated), + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1Updated), + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtProviderKey1: knownvalue.StringExact(acctest.CtProviderValue1Updated), + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1Updated), + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/Site/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtProviderKey1: config.StringVariable(acctest.CtProviderValue1Updated), + }), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtResourceKey1: config.StringVariable(acctest.CtResourceValue1Updated), + acctest.CtResourceKey2: config.StringVariable(acctest.CtResourceValue2), + }), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateIdFunc: acctest.AttrImportStateIdFunc(resourceName, names.AttrARN), + ImportStateVerify: true, + ImportStateVerifyIdentifierAttribute: names.AttrARN, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/Site/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: nil, + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckSiteExists(ctx, resourceName), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{})), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{})), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{})), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{})), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/Site/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: nil, + }, + ResourceName: resourceName, + ImportState: true, + ImportStateIdFunc: acctest.AttrImportStateIdFunc(resourceName, names.AttrARN), + ImportStateVerify: true, + ImportStateVerifyIdentifierAttribute: names.AttrARN, + }, + }, + }) +} + +func TestAccNetworkManagerSite_tags_DefaultTags_overlapping(t *testing.T) { + ctx := acctest.Context(t) + resourceName := "aws_networkmanager_site.test" + + acctest.ParallelTest(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckSiteDestroy(ctx), + Steps: []resource.TestStep{ + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/Site/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtOverlapKey1: config.StringVariable(acctest.CtProviderValue1), + }), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtOverlapKey1: config.StringVariable(acctest.CtResourceValue1), + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckSiteExists(ctx, resourceName), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtOverlapKey1: knownvalue.StringExact(acctest.CtResourceValue1), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtOverlapKey1: knownvalue.StringExact(acctest.CtResourceValue1), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtOverlapKey1: knownvalue.StringExact(acctest.CtResourceValue1), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtOverlapKey1: knownvalue.StringExact(acctest.CtResourceValue1), + })), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/Site/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtOverlapKey1: config.StringVariable(acctest.CtProviderValue1), + }), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtOverlapKey1: config.StringVariable(acctest.CtResourceValue1), + }), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateIdFunc: acctest.AttrImportStateIdFunc(resourceName, names.AttrARN), + ImportStateVerify: true, + ImportStateVerifyIdentifierAttribute: names.AttrARN, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/Site/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtOverlapKey1: config.StringVariable(acctest.CtProviderValue1), + acctest.CtOverlapKey2: config.StringVariable("providervalue2"), + }), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtOverlapKey1: config.StringVariable(acctest.CtResourceValue1), + acctest.CtOverlapKey2: config.StringVariable(acctest.CtResourceValue2), + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckSiteExists(ctx, resourceName), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtOverlapKey1: knownvalue.StringExact(acctest.CtResourceValue1), + acctest.CtOverlapKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtOverlapKey1: knownvalue.StringExact(acctest.CtResourceValue1), + acctest.CtOverlapKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtOverlapKey1: knownvalue.StringExact(acctest.CtResourceValue1), + acctest.CtOverlapKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtOverlapKey1: knownvalue.StringExact(acctest.CtResourceValue1), + acctest.CtOverlapKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/Site/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtOverlapKey1: config.StringVariable(acctest.CtProviderValue1), + acctest.CtOverlapKey2: config.StringVariable("providervalue2"), + }), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtOverlapKey1: config.StringVariable(acctest.CtResourceValue1), + acctest.CtOverlapKey2: config.StringVariable(acctest.CtResourceValue2), + }), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateIdFunc: acctest.AttrImportStateIdFunc(resourceName, names.AttrARN), + ImportStateVerify: true, + ImportStateVerifyIdentifierAttribute: names.AttrARN, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/Site/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtOverlapKey1: config.StringVariable(acctest.CtProviderValue1), + }), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtOverlapKey1: config.StringVariable(acctest.CtResourceValue2), + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckSiteExists(ctx, resourceName), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtOverlapKey1: knownvalue.StringExact(acctest.CtResourceValue2), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtOverlapKey1: knownvalue.StringExact(acctest.CtResourceValue2), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtOverlapKey1: knownvalue.StringExact(acctest.CtResourceValue2), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtOverlapKey1: knownvalue.StringExact(acctest.CtResourceValue2), + })), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/Site/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtOverlapKey1: config.StringVariable(acctest.CtProviderValue1), + }), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtOverlapKey1: config.StringVariable(acctest.CtResourceValue2), + }), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateIdFunc: acctest.AttrImportStateIdFunc(resourceName, names.AttrARN), + ImportStateVerify: true, + ImportStateVerifyIdentifierAttribute: names.AttrARN, + }, + }, + }) +} + +func TestAccNetworkManagerSite_tags_DefaultTags_updateToProviderOnly(t *testing.T) { + ctx := acctest.Context(t) + resourceName := "aws_networkmanager_site.test" + + acctest.ParallelTest(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckSiteDestroy(ctx), + Steps: []resource.TestStep{ + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/Site/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckSiteExists(ctx, resourceName), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/Site/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + acctest.CtResourceTags: nil, + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckSiteExists(ctx, resourceName), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{})), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{})), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/Site/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + acctest.CtResourceTags: nil, + }, + ResourceName: resourceName, + ImportState: true, + ImportStateIdFunc: acctest.AttrImportStateIdFunc(resourceName, names.AttrARN), + ImportStateVerify: true, + ImportStateVerifyIdentifierAttribute: names.AttrARN, + }, + }, + }) +} + +func TestAccNetworkManagerSite_tags_DefaultTags_updateToResourceOnly(t *testing.T) { + ctx := acctest.Context(t) + resourceName := "aws_networkmanager_site.test" + + acctest.ParallelTest(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckSiteDestroy(ctx), + Steps: []resource.TestStep{ + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/Site/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + acctest.CtResourceTags: nil, + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckSiteExists(ctx, resourceName), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.Null()), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.Null()), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/Site/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckSiteExists(ctx, resourceName), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionNoop), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/Site/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateIdFunc: acctest.AttrImportStateIdFunc(resourceName, names.AttrARN), + ImportStateVerify: true, + ImportStateVerifyIdentifierAttribute: names.AttrARN, + }, + }, + }) +} + +func TestAccNetworkManagerSite_tags_DefaultTags_emptyResourceTag(t *testing.T) { + t.Skip("Resource Site does not support empty tags") + + ctx := acctest.Context(t) + resourceName := "aws_networkmanager_site.test" + + acctest.ParallelTest(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckSiteDestroy(ctx), + Steps: []resource.TestStep{ + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/Site/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(""), + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckSiteExists(ctx, resourceName), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(""), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(""), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(""), + })), + // TODO: Should be known + plancheck.ExpectUnknownValue(resourceName, tfjsonpath.New(names.AttrTagsAll)), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/Site/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(""), + }), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateIdFunc: acctest.AttrImportStateIdFunc(resourceName, names.AttrARN), + ImportStateVerify: true, + ImportStateVerifyIdentifierAttribute: names.AttrARN, + }, + }, + }) +} + +func TestAccNetworkManagerSite_tags_DefaultTags_emptyProviderOnlyTag(t *testing.T) { + t.Skip("Resource Site does not support empty tags") + + ctx := acctest.Context(t) + resourceName := "aws_networkmanager_site.test" + + acctest.ParallelTest(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckSiteDestroy(ctx), + Steps: []resource.TestStep{ + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/Site/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(""), + }), + acctest.CtResourceTags: nil, + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckSiteExists(ctx, resourceName), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.Null()), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(""), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.Null()), + // TODO: Should be known + plancheck.ExpectUnknownValue(resourceName, tfjsonpath.New(names.AttrTagsAll)), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/Site/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(""), + }), + acctest.CtResourceTags: nil, + }, + ResourceName: resourceName, + ImportState: true, + ImportStateIdFunc: acctest.AttrImportStateIdFunc(resourceName, names.AttrARN), + ImportStateVerify: true, + ImportStateVerifyIdentifierAttribute: names.AttrARN, + }, + }, + }) +} + +func TestAccNetworkManagerSite_tags_DefaultTags_nullOverlappingResourceTag(t *testing.T) { + ctx := acctest.Context(t) + resourceName := "aws_networkmanager_site.test" + + acctest.ParallelTest(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckSiteDestroy(ctx), + Steps: []resource.TestStep{ + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/Site/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtProviderValue1), + }), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: nil, + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckSiteExists(ctx, resourceName), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.Null()), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtProviderValue1), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.Null()), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtProviderValue1), + })), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/Site/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtProviderValue1), + }), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: nil, + }), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateIdFunc: acctest.AttrImportStateIdFunc(resourceName, names.AttrARN), + ImportStateVerify: true, + ImportStateVerifyIdentifierAttribute: names.AttrARN, + }, + }, + }) +} + +func TestAccNetworkManagerSite_tags_DefaultTags_nullNonOverlappingResourceTag(t *testing.T) { + ctx := acctest.Context(t) + resourceName := "aws_networkmanager_site.test" + + acctest.ParallelTest(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckSiteDestroy(ctx), + Steps: []resource.TestStep{ + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/Site/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtProviderKey1: config.StringVariable(acctest.CtProviderValue1), + }), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtResourceKey1: nil, + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckSiteExists(ctx, resourceName), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.Null()), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtProviderKey1: knownvalue.StringExact(acctest.CtProviderValue1), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.Null()), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtProviderKey1: knownvalue.StringExact(acctest.CtProviderValue1), + })), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/Site/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtProviderKey1: config.StringVariable(acctest.CtProviderValue1), + }), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtResourceKey1: nil, + }), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateIdFunc: acctest.AttrImportStateIdFunc(resourceName, names.AttrARN), + ImportStateVerify: true, + ImportStateVerifyIdentifierAttribute: names.AttrARN, + }, + }, + }) +} + +func TestAccNetworkManagerSite_tags_ComputedTag_OnCreate(t *testing.T) { + ctx := acctest.Context(t) + resourceName := "aws_networkmanager_site.test" + + acctest.ParallelTest(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckSiteDestroy(ctx), + Steps: []resource.TestStep{ + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/Site/tagsComputed1/"), + ConfigVariables: config.Variables{ + "unknownTagKey": config.StringVariable("computedkey1"), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckSiteExists(ctx, resourceName), + resource.TestCheckResourceAttrPair(resourceName, "tags.computedkey1", "null_resource.test", names.AttrID), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapSizeExact(1)), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapSizeExact(1)), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectUnknownValue(resourceName, tfjsonpath.New(names.AttrTags)), + plancheck.ExpectUnknownValue(resourceName, tfjsonpath.New(names.AttrTagsAll)), + }, + PostApplyPreRefresh: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionNoop), + }, + PostApplyPostRefresh: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionNoop), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/Site/tagsComputed1/"), + ConfigVariables: config.Variables{ + "unknownTagKey": config.StringVariable("computedkey1"), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateIdFunc: acctest.AttrImportStateIdFunc(resourceName, names.AttrARN), + ImportStateVerify: true, + ImportStateVerifyIdentifierAttribute: names.AttrARN, + }, + }, + }) +} + +func TestAccNetworkManagerSite_tags_ComputedTag_OnUpdate_Add(t *testing.T) { + ctx := acctest.Context(t) + resourceName := "aws_networkmanager_site.test" + + acctest.ParallelTest(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckSiteDestroy(ctx), + Steps: []resource.TestStep{ + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/Site/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckSiteExists(ctx, resourceName), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/Site/tagsComputed2/"), + ConfigVariables: config.Variables{ + "unknownTagKey": config.StringVariable("computedkey1"), + "knownTagKey": config.StringVariable(acctest.CtKey1), + "knownTagValue": config.StringVariable(acctest.CtValue1), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckSiteExists(ctx, resourceName), + resource.TestCheckResourceAttrPair(resourceName, "tags.computedkey1", "null_resource.test", names.AttrID), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapSizeExact(2)), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapPartial(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapSizeExact(2)), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapPartial(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectUnknownValue(resourceName, tfjsonpath.New(names.AttrTags)), + plancheck.ExpectUnknownValue(resourceName, tfjsonpath.New(names.AttrTagsAll)), + }, + PostApplyPreRefresh: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionNoop), + }, + PostApplyPostRefresh: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionNoop), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/Site/tagsComputed2/"), + ConfigVariables: config.Variables{ + "unknownTagKey": config.StringVariable("computedkey1"), + "knownTagKey": config.StringVariable(acctest.CtKey1), + "knownTagValue": config.StringVariable(acctest.CtValue1), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateIdFunc: acctest.AttrImportStateIdFunc(resourceName, names.AttrARN), + ImportStateVerify: true, + ImportStateVerifyIdentifierAttribute: names.AttrARN, + }, + }, + }) +} + +func TestAccNetworkManagerSite_tags_ComputedTag_OnUpdate_Replace(t *testing.T) { + ctx := acctest.Context(t) + resourceName := "aws_networkmanager_site.test" + + acctest.ParallelTest(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckSiteDestroy(ctx), + Steps: []resource.TestStep{ + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/Site/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckSiteExists(ctx, resourceName), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/Site/tagsComputed1/"), + ConfigVariables: config.Variables{ + "unknownTagKey": config.StringVariable(acctest.CtKey1), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckSiteExists(ctx, resourceName), + resource.TestCheckResourceAttrPair(resourceName, acctest.CtTagsKey1, "null_resource.test", names.AttrID), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapSizeExact(1)), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapSizeExact(1)), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectUnknownValue(resourceName, tfjsonpath.New(names.AttrTags)), + plancheck.ExpectUnknownValue(resourceName, tfjsonpath.New(names.AttrTagsAll)), + }, + PostApplyPreRefresh: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionNoop), + }, + PostApplyPostRefresh: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionNoop), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/Site/tagsComputed1/"), + ConfigVariables: config.Variables{ + "unknownTagKey": config.StringVariable(acctest.CtKey1), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateIdFunc: acctest.AttrImportStateIdFunc(resourceName, names.AttrARN), + ImportStateVerify: true, + ImportStateVerifyIdentifierAttribute: names.AttrARN, + }, + }, + }) +} + +func TestAccNetworkManagerSite_tags_IgnoreTags_Overlap_DefaultTag(t *testing.T) { + ctx := acctest.Context(t) + resourceName := "aws_networkmanager_site.test" + + acctest.ParallelTest(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckSiteDestroy(ctx), + Steps: []resource.TestStep{ + // 1: Create + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/Site/tags_ignore/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtProviderKey1: config.StringVariable(acctest.CtProviderValue1), + }), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtResourceKey1: config.StringVariable(acctest.CtResourceValue1), + }), + "ignore_tag_keys": config.SetVariable( + config.StringVariable(acctest.CtProviderKey1), + ), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckSiteExists(ctx, resourceName), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), + })), + expectFullResourceTags(ctx, resourceName, knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtProviderKey1: knownvalue.StringExact(acctest.CtProviderValue1), // TODO: Should not be set + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), + })), + }, + PostApplyPreRefresh: []plancheck.PlanCheck{ + plancheck.ExpectEmptyPlan(), + }, + PostApplyPostRefresh: []plancheck.PlanCheck{ + plancheck.ExpectEmptyPlan(), + }, + }, + }, + // 2: Update ignored tag only + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/Site/tags_ignore/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtProviderKey1: config.StringVariable(acctest.CtProviderValue1Updated), + }), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtResourceKey1: config.StringVariable(acctest.CtResourceValue1), + }), + "ignore_tag_keys": config.SetVariable( + config.StringVariable(acctest.CtProviderKey1), + ), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckSiteExists(ctx, resourceName), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), + })), + expectFullResourceTags(ctx, resourceName, knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtProviderKey1: knownvalue.StringExact(acctest.CtProviderValue1), // TODO: Should not be set + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionNoop), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), + })), + }, + PostApplyPreRefresh: []plancheck.PlanCheck{ + plancheck.ExpectEmptyPlan(), + }, + PostApplyPostRefresh: []plancheck.PlanCheck{ + plancheck.ExpectEmptyPlan(), + }, + }, + }, + // 3: Update both tags + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/Site/tags_ignore/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtProviderKey1: config.StringVariable(acctest.CtProviderValue1Again), + }), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtResourceKey1: config.StringVariable(acctest.CtResourceValue1Updated), + }), + "ignore_tag_keys": config.SetVariable( + config.StringVariable(acctest.CtProviderKey1), + ), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckSiteExists(ctx, resourceName), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1Updated), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1Updated), + })), + expectFullResourceTags(ctx, resourceName, knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtProviderKey1: knownvalue.StringExact(acctest.CtProviderValue1), // TODO: Should not be set + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1Updated), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1Updated), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1Updated), + })), + }, + PostApplyPreRefresh: []plancheck.PlanCheck{ + plancheck.ExpectEmptyPlan(), + }, + PostApplyPostRefresh: []plancheck.PlanCheck{ + plancheck.ExpectEmptyPlan(), + }, + }, + }, + }, + }) +} + +func TestAccNetworkManagerSite_tags_IgnoreTags_Overlap_ResourceTag(t *testing.T) { + ctx := acctest.Context(t) + resourceName := "aws_networkmanager_site.test" + + acctest.ParallelTest(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckSiteDestroy(ctx), + Steps: []resource.TestStep{ + // 1: Create + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/Site/tags_ignore/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtResourceKey1: config.StringVariable(acctest.CtResourceValue1), + acctest.CtResourceKey2: config.StringVariable(acctest.CtResourceValue2), + }), + "ignore_tag_keys": config.SetVariable( + config.StringVariable(acctest.CtResourceKey1), + ), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckSiteExists(ctx, resourceName), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + expectFullResourceTags(ctx, resourceName, knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), // TODO: Should not be set + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + }, + PostApplyPreRefresh: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + }, + PostApplyPostRefresh: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + }, + }, + ExpectNonEmptyPlan: true, + }, + // 2: Update ignored tag + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/Site/tags_ignore/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtResourceKey1: config.StringVariable(acctest.CtResourceValue1Updated), + acctest.CtResourceKey2: config.StringVariable(acctest.CtResourceValue2), + }), + "ignore_tag_keys": config.SetVariable( + config.StringVariable(acctest.CtResourceKey1), + ), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckSiteExists(ctx, resourceName), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + expectFullResourceTags(ctx, resourceName, knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), // TODO: Should not be set + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1Updated), + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + }, + PostApplyPreRefresh: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1Updated), + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + }, + PostApplyPostRefresh: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1Updated), + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + }, + }, + ExpectNonEmptyPlan: true, + }, + // 3: Update both tags + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/Site/tags_ignore/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtResourceKey1: config.StringVariable(acctest.CtResourceValue1Again), + acctest.CtResourceKey2: config.StringVariable(acctest.CtResourceValue2Updated), + }), + "ignore_tag_keys": config.SetVariable( + config.StringVariable(acctest.CtResourceKey1), + ), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckSiteExists(ctx, resourceName), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2Updated), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2Updated), + })), + expectFullResourceTags(ctx, resourceName, knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), // TODO: Should not be set + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2Updated), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1Again), + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2Updated), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2Updated), + })), + }, + PostApplyPreRefresh: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1Again), + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2Updated), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2Updated), + })), + }, + PostApplyPostRefresh: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1Again), + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2Updated), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2Updated), + })), + }, + }, + ExpectNonEmptyPlan: true, + }, + }, + }) +} diff --git a/internal/service/networkmanager/site_test.go b/internal/service/networkmanager/site_test.go index c0021817dab2..ebc073f6640f 100644 --- a/internal/service/networkmanager/site_test.go +++ b/internal/service/networkmanager/site_test.go @@ -72,52 +72,6 @@ func TestAccNetworkManagerSite_disappears(t *testing.T) { }) } -func TestAccNetworkManagerSite_tags(t *testing.T) { - ctx := acctest.Context(t) - resourceName := "aws_networkmanager_site.test" - rName := sdkacctest.RandomWithPrefix(acctest.ResourcePrefix) - - resource.ParallelTest(t, resource.TestCase{ - PreCheck: func() { acctest.PreCheck(ctx, t) }, - ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), - ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, - CheckDestroy: testAccCheckSiteDestroy(ctx), - Steps: []resource.TestStep{ - { - Config: testAccSiteConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), - Check: resource.ComposeTestCheckFunc( - testAccCheckSiteExists(ctx, resourceName), - resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, "1"), - resource.TestCheckResourceAttr(resourceName, acctest.CtTagsKey1, acctest.CtValue1), - ), - }, - { - ResourceName: resourceName, - ImportState: true, - ImportStateIdFunc: acctest.AttrImportStateIdFunc(resourceName, names.AttrARN), - ImportStateVerify: true, - }, - { - Config: testAccSiteConfig_tags2(rName, acctest.CtKey1, acctest.CtValue1Updated, acctest.CtKey2, acctest.CtValue2), - Check: resource.ComposeTestCheckFunc( - testAccCheckSiteExists(ctx, resourceName), - resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, "2"), - resource.TestCheckResourceAttr(resourceName, acctest.CtTagsKey1, acctest.CtValue1Updated), - resource.TestCheckResourceAttr(resourceName, acctest.CtTagsKey2, acctest.CtValue2), - ), - }, - { - Config: testAccSiteConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), - Check: resource.ComposeTestCheckFunc( - testAccCheckSiteExists(ctx, resourceName), - resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, "1"), - resource.TestCheckResourceAttr(resourceName, acctest.CtTagsKey2, acctest.CtValue2), - ), - }, - }, - }) -} - func TestAccNetworkManagerSite_description(t *testing.T) { ctx := acctest.Context(t) resourceName := "aws_networkmanager_site.test" @@ -253,43 +207,6 @@ resource "aws_networkmanager_site" "test" { `, rName) } -func testAccSiteConfig_tags1(rName, tagKey1, tagValue1 string) string { - return fmt.Sprintf(` -resource "aws_networkmanager_global_network" "test" { - tags = { - Name = %[1]q - } -} - -resource "aws_networkmanager_site" "test" { - global_network_id = aws_networkmanager_global_network.test.id - - tags = { - %[2]q = %[3]q - } -} -`, rName, tagKey1, tagValue1) -} - -func testAccSiteConfig_tags2(rName, tagKey1, tagValue1, tagKey2, tagValue2 string) string { - return fmt.Sprintf(` -resource "aws_networkmanager_global_network" "test" { - tags = { - Name = %[1]q - } -} - -resource "aws_networkmanager_site" "test" { - global_network_id = aws_networkmanager_global_network.test.id - - tags = { - %[2]q = %[3]q - %[4]q = %[5]q - } -} -`, rName, tagKey1, tagValue1, tagKey2, tagValue2) -} - func testAccSiteConfig_description(rName, description string) string { return fmt.Sprintf(` resource "aws_networkmanager_global_network" "test" { diff --git a/internal/service/networkmanager/testdata/Site/tags/main_gen.tf b/internal/service/networkmanager/testdata/Site/tags/main_gen.tf new file mode 100644 index 000000000000..cf8e391c5452 --- /dev/null +++ b/internal/service/networkmanager/testdata/Site/tags/main_gen.tf @@ -0,0 +1,17 @@ +# Copyright (c) HashiCorp, Inc. +# SPDX-License-Identifier: MPL-2.0 + +resource "aws_networkmanager_site" "test" { + global_network_id = aws_networkmanager_global_network.test.id + + tags = var.resource_tags +} + +resource "aws_networkmanager_global_network" "test" {} + +variable "resource_tags" { + description = "Tags to set on resource. To specify no tags, set to `null`" + # Not setting a default, so that this must explicitly be set to `null` to specify no tags + type = map(string) + nullable = true +} diff --git a/internal/service/networkmanager/testdata/Site/tagsComputed1/main_gen.tf b/internal/service/networkmanager/testdata/Site/tagsComputed1/main_gen.tf new file mode 100644 index 000000000000..c06f10ce8419 --- /dev/null +++ b/internal/service/networkmanager/testdata/Site/tagsComputed1/main_gen.tf @@ -0,0 +1,21 @@ +# Copyright (c) HashiCorp, Inc. +# SPDX-License-Identifier: MPL-2.0 + +provider "null" {} + +resource "aws_networkmanager_site" "test" { + global_network_id = aws_networkmanager_global_network.test.id + + tags = { + (var.unknownTagKey) = null_resource.test.id + } +} + +resource "aws_networkmanager_global_network" "test" {} + +resource "null_resource" "test" {} + +variable "unknownTagKey" { + type = string + nullable = false +} diff --git a/internal/service/networkmanager/testdata/Site/tagsComputed2/main_gen.tf b/internal/service/networkmanager/testdata/Site/tagsComputed2/main_gen.tf new file mode 100644 index 000000000000..b681f6b2a8e4 --- /dev/null +++ b/internal/service/networkmanager/testdata/Site/tagsComputed2/main_gen.tf @@ -0,0 +1,32 @@ +# Copyright (c) HashiCorp, Inc. +# SPDX-License-Identifier: MPL-2.0 + +provider "null" {} + +resource "aws_networkmanager_site" "test" { + global_network_id = aws_networkmanager_global_network.test.id + + tags = { + (var.unknownTagKey) = null_resource.test.id + (var.knownTagKey) = var.knownTagValue + } +} + +resource "aws_networkmanager_global_network" "test" {} + +resource "null_resource" "test" {} + +variable "unknownTagKey" { + type = string + nullable = false +} + +variable "knownTagKey" { + type = string + nullable = false +} + +variable "knownTagValue" { + type = string + nullable = false +} diff --git a/internal/service/networkmanager/testdata/Site/tags_defaults/main_gen.tf b/internal/service/networkmanager/testdata/Site/tags_defaults/main_gen.tf new file mode 100644 index 000000000000..b33151ef1a40 --- /dev/null +++ b/internal/service/networkmanager/testdata/Site/tags_defaults/main_gen.tf @@ -0,0 +1,28 @@ +# Copyright (c) HashiCorp, Inc. +# SPDX-License-Identifier: MPL-2.0 + +provider "aws" { + default_tags { + tags = var.provider_tags + } +} + +resource "aws_networkmanager_site" "test" { + global_network_id = aws_networkmanager_global_network.test.id + + tags = var.resource_tags +} + +resource "aws_networkmanager_global_network" "test" {} + +variable "resource_tags" { + description = "Tags to set on resource. To specify no tags, set to `null`" + # Not setting a default, so that this must explicitly be set to `null` to specify no tags + type = map(string) + nullable = true +} + +variable "provider_tags" { + type = map(string) + nullable = false +} diff --git a/internal/service/networkmanager/testdata/Site/tags_ignore/main_gen.tf b/internal/service/networkmanager/testdata/Site/tags_ignore/main_gen.tf new file mode 100644 index 000000000000..63c861e2a7cc --- /dev/null +++ b/internal/service/networkmanager/testdata/Site/tags_ignore/main_gen.tf @@ -0,0 +1,37 @@ +# Copyright (c) HashiCorp, Inc. +# SPDX-License-Identifier: MPL-2.0 + +provider "aws" { + default_tags { + tags = var.provider_tags + } + ignore_tags { + keys = var.ignore_tag_keys + } +} + +resource "aws_networkmanager_site" "test" { + global_network_id = aws_networkmanager_global_network.test.id + + tags = var.resource_tags +} + +resource "aws_networkmanager_global_network" "test" {} + +variable "resource_tags" { + description = "Tags to set on resource. To specify no tags, set to `null`" + # Not setting a default, so that this must explicitly be set to `null` to specify no tags + type = map(string) + nullable = true +} + +variable "provider_tags" { + type = map(string) + nullable = true + default = null +} + +variable "ignore_tag_keys" { + type = set(string) + nullable = false +} diff --git a/internal/service/networkmanager/testdata/tmpl/site_tags.gtpl b/internal/service/networkmanager/testdata/tmpl/site_tags.gtpl new file mode 100644 index 000000000000..2c352a45bb33 --- /dev/null +++ b/internal/service/networkmanager/testdata/tmpl/site_tags.gtpl @@ -0,0 +1,6 @@ +resource "aws_networkmanager_site" "test" { + global_network_id = aws_networkmanager_global_network.test.id +{{- template "tags" . }} +} + +resource "aws_networkmanager_global_network" "test" {} From 9fd27f9ae6ae74811d2e40a778a61cdcc16436ba Mon Sep 17 00:00:00 2001 From: Graham Davison Date: Mon, 28 Jul 2025 09:40:39 -0700 Subject: [PATCH 042/365] `aws_networkmanager_link` --- internal/service/networkmanager/link.go | 4 +- .../networkmanager/link_tags_gen_test.go | 2224 +++++++++++++++++ internal/service/networkmanager/link_test.go | 111 - .../testdata/Link/tags/main_gen.tf | 27 + .../testdata/Link/tagsComputed1/main_gen.tf | 31 + .../testdata/Link/tagsComputed2/main_gen.tf | 42 + .../testdata/Link/tags_defaults/main_gen.tf | 38 + .../testdata/Link/tags_ignore/main_gen.tf | 47 + .../testdata/tmpl/link_tags.gtpl | 16 + 9 files changed, 2428 insertions(+), 112 deletions(-) create mode 100644 internal/service/networkmanager/link_tags_gen_test.go create mode 100644 internal/service/networkmanager/testdata/Link/tags/main_gen.tf create mode 100644 internal/service/networkmanager/testdata/Link/tagsComputed1/main_gen.tf create mode 100644 internal/service/networkmanager/testdata/Link/tagsComputed2/main_gen.tf create mode 100644 internal/service/networkmanager/testdata/Link/tags_defaults/main_gen.tf create mode 100644 internal/service/networkmanager/testdata/Link/tags_ignore/main_gen.tf create mode 100644 internal/service/networkmanager/testdata/tmpl/link_tags.gtpl diff --git a/internal/service/networkmanager/link.go b/internal/service/networkmanager/link.go index ac4279b84c22..7a13fec51685 100644 --- a/internal/service/networkmanager/link.go +++ b/internal/service/networkmanager/link.go @@ -29,7 +29,9 @@ import ( // @SDKResource("aws_networkmanager_link", name="Link") // @Tags(identifierAttribute="arn") -// @Testing(tagsTest=false) +// @Testing(skipEmptyTags=true) +// @Testing(generator=false) +// @Testing(importStateIdAttribute="arn") func resourceLink() *schema.Resource { return &schema.Resource{ CreateWithoutTimeout: resourceLinkCreate, diff --git a/internal/service/networkmanager/link_tags_gen_test.go b/internal/service/networkmanager/link_tags_gen_test.go new file mode 100644 index 000000000000..ebe652dbd6e0 --- /dev/null +++ b/internal/service/networkmanager/link_tags_gen_test.go @@ -0,0 +1,2224 @@ +// Code generated by internal/generate/tagstests/main.go; DO NOT EDIT. + +package networkmanager_test + +import ( + "testing" + + "github.com/hashicorp/terraform-plugin-testing/config" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/knownvalue" + "github.com/hashicorp/terraform-plugin-testing/plancheck" + "github.com/hashicorp/terraform-plugin-testing/statecheck" + "github.com/hashicorp/terraform-plugin-testing/tfjsonpath" + "github.com/hashicorp/terraform-provider-aws/internal/acctest" + "github.com/hashicorp/terraform-provider-aws/names" +) + +func TestAccNetworkManagerLink_tags(t *testing.T) { + ctx := acctest.Context(t) + resourceName := "aws_networkmanager_link.test" + + acctest.ParallelTest(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckLinkDestroy(ctx), + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + Steps: []resource.TestStep{ + { + ConfigDirectory: config.StaticDirectory("testdata/Link/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckLinkExists(ctx, resourceName), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + }, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/Link/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateIdFunc: acctest.AttrImportStateIdFunc(resourceName, names.AttrARN), + ImportStateVerify: true, + ImportStateVerifyIdentifierAttribute: names.AttrARN, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/Link/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1Updated), + acctest.CtKey2: config.StringVariable(acctest.CtValue2), + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckLinkExists(ctx, resourceName), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1Updated), + acctest.CtKey2: knownvalue.StringExact(acctest.CtValue2), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1Updated), + acctest.CtKey2: knownvalue.StringExact(acctest.CtValue2), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1Updated), + acctest.CtKey2: knownvalue.StringExact(acctest.CtValue2), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1Updated), + acctest.CtKey2: knownvalue.StringExact(acctest.CtValue2), + })), + }, + }, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/Link/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1Updated), + acctest.CtKey2: config.StringVariable(acctest.CtValue2), + }), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateIdFunc: acctest.AttrImportStateIdFunc(resourceName, names.AttrARN), + ImportStateVerify: true, + ImportStateVerifyIdentifierAttribute: names.AttrARN, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/Link/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey2: config.StringVariable(acctest.CtValue2), + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckLinkExists(ctx, resourceName), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey2: knownvalue.StringExact(acctest.CtValue2), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey2: knownvalue.StringExact(acctest.CtValue2), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey2: knownvalue.StringExact(acctest.CtValue2), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey2: knownvalue.StringExact(acctest.CtValue2), + })), + }, + }, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/Link/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey2: config.StringVariable(acctest.CtValue2), + }), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateIdFunc: acctest.AttrImportStateIdFunc(resourceName, names.AttrARN), + ImportStateVerify: true, + ImportStateVerifyIdentifierAttribute: names.AttrARN, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/Link/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: nil, + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckLinkExists(ctx, resourceName), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{})), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{})), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{})), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{})), + }, + }, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/Link/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: nil, + }, + ResourceName: resourceName, + ImportState: true, + ImportStateIdFunc: acctest.AttrImportStateIdFunc(resourceName, names.AttrARN), + ImportStateVerify: true, + ImportStateVerifyIdentifierAttribute: names.AttrARN, + }, + }, + }) +} + +func TestAccNetworkManagerLink_tags_null(t *testing.T) { + ctx := acctest.Context(t) + resourceName := "aws_networkmanager_link.test" + + acctest.ParallelTest(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckLinkDestroy(ctx), + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + Steps: []resource.TestStep{ + { + ConfigDirectory: config.StaticDirectory("testdata/Link/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: nil, + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckLinkExists(ctx, resourceName), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.Null()), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{})), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.Null()), + // TODO: Should be known + plancheck.ExpectUnknownValue(resourceName, tfjsonpath.New(names.AttrTagsAll)), + }, + }, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/Link/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: nil, + }), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateIdFunc: acctest.AttrImportStateIdFunc(resourceName, names.AttrARN), + ImportStateVerify: true, + ImportStateVerifyIdentifierAttribute: names.AttrARN, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/Link/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: nil, + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionNoop), + }, + PostApplyPostRefresh: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionNoop), + }, + }, + }, + }, + }) +} + +func TestAccNetworkManagerLink_tags_EmptyMap(t *testing.T) { + ctx := acctest.Context(t) + resourceName := "aws_networkmanager_link.test" + + acctest.ParallelTest(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckLinkDestroy(ctx), + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + Steps: []resource.TestStep{ + { + ConfigDirectory: config.StaticDirectory("testdata/Link/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{}), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckLinkExists(ctx, resourceName), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.Null()), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{})), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.Null()), + // TODO: Should be known + plancheck.ExpectUnknownValue(resourceName, tfjsonpath.New(names.AttrTagsAll)), + }, + }, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/Link/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{}), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateIdFunc: acctest.AttrImportStateIdFunc(resourceName, names.AttrARN), + ImportStateVerify: true, + ImportStateVerifyIdentifierAttribute: names.AttrARN, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/Link/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: nil, + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionNoop), + }, + PostApplyPostRefresh: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionNoop), + }, + }, + }, + }, + }) +} + +func TestAccNetworkManagerLink_tags_AddOnUpdate(t *testing.T) { + ctx := acctest.Context(t) + resourceName := "aws_networkmanager_link.test" + + acctest.ParallelTest(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckLinkDestroy(ctx), + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + Steps: []resource.TestStep{ + { + ConfigDirectory: config.StaticDirectory("testdata/Link/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: nil, + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckLinkExists(ctx, resourceName), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.Null()), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{})), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.Null()), + // TODO: Should be known + plancheck.ExpectUnknownValue(resourceName, tfjsonpath.New(names.AttrTagsAll)), + }, + }, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/Link/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckLinkExists(ctx, resourceName), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + }, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/Link/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateIdFunc: acctest.AttrImportStateIdFunc(resourceName, names.AttrARN), + ImportStateVerify: true, + ImportStateVerifyIdentifierAttribute: names.AttrARN, + }, + }, + }) +} + +func TestAccNetworkManagerLink_tags_EmptyTag_OnCreate(t *testing.T) { + t.Skip("Resource Link does not support empty tags") + + ctx := acctest.Context(t) + resourceName := "aws_networkmanager_link.test" + + acctest.ParallelTest(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckLinkDestroy(ctx), + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + Steps: []resource.TestStep{ + { + ConfigDirectory: config.StaticDirectory("testdata/Link/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(""), + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckLinkExists(ctx, resourceName), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(""), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(""), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(""), + })), + // TODO: Should be known + plancheck.ExpectUnknownValue(resourceName, tfjsonpath.New(names.AttrTagsAll)), + }, + }, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/Link/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(""), + }), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateIdFunc: acctest.AttrImportStateIdFunc(resourceName, names.AttrARN), + ImportStateVerify: true, + ImportStateVerifyIdentifierAttribute: names.AttrARN, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/Link/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: nil, + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckLinkExists(ctx, resourceName), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{})), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{})), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{})), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{})), + }, + }, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/Link/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: nil, + }, + ResourceName: resourceName, + ImportState: true, + ImportStateIdFunc: acctest.AttrImportStateIdFunc(resourceName, names.AttrARN), + ImportStateVerify: true, + ImportStateVerifyIdentifierAttribute: names.AttrARN, + }, + }, + }) +} + +func TestAccNetworkManagerLink_tags_EmptyTag_OnUpdate_Add(t *testing.T) { + t.Skip("Resource Link does not support empty tags") + + ctx := acctest.Context(t) + resourceName := "aws_networkmanager_link.test" + + acctest.ParallelTest(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckLinkDestroy(ctx), + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + Steps: []resource.TestStep{ + { + ConfigDirectory: config.StaticDirectory("testdata/Link/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckLinkExists(ctx, resourceName), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + }, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/Link/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + acctest.CtKey2: config.StringVariable(""), + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckLinkExists(ctx, resourceName), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + acctest.CtKey2: knownvalue.StringExact(""), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + acctest.CtKey2: knownvalue.StringExact(""), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + acctest.CtKey2: knownvalue.StringExact(""), + })), + // TODO: Should be known + plancheck.ExpectUnknownValue(resourceName, tfjsonpath.New(names.AttrTagsAll)), + }, + }, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/Link/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + acctest.CtKey2: config.StringVariable(""), + }), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateIdFunc: acctest.AttrImportStateIdFunc(resourceName, names.AttrARN), + ImportStateVerify: true, + ImportStateVerifyIdentifierAttribute: names.AttrARN, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/Link/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckLinkExists(ctx, resourceName), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + }, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/Link/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateIdFunc: acctest.AttrImportStateIdFunc(resourceName, names.AttrARN), + ImportStateVerify: true, + ImportStateVerifyIdentifierAttribute: names.AttrARN, + }, + }, + }) +} + +func TestAccNetworkManagerLink_tags_EmptyTag_OnUpdate_Replace(t *testing.T) { + t.Skip("Resource Link does not support empty tags") + + ctx := acctest.Context(t) + resourceName := "aws_networkmanager_link.test" + + acctest.ParallelTest(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckLinkDestroy(ctx), + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + Steps: []resource.TestStep{ + { + ConfigDirectory: config.StaticDirectory("testdata/Link/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckLinkExists(ctx, resourceName), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + }, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/Link/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(""), + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckLinkExists(ctx, resourceName), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(""), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(""), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(""), + })), + // TODO: Should be known + plancheck.ExpectUnknownValue(resourceName, tfjsonpath.New(names.AttrTagsAll)), + }, + }, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/Link/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(""), + }), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateIdFunc: acctest.AttrImportStateIdFunc(resourceName, names.AttrARN), + ImportStateVerify: true, + ImportStateVerifyIdentifierAttribute: names.AttrARN, + }, + }, + }) +} + +func TestAccNetworkManagerLink_tags_DefaultTags_providerOnly(t *testing.T) { + ctx := acctest.Context(t) + resourceName := "aws_networkmanager_link.test" + + acctest.ParallelTest(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckLinkDestroy(ctx), + Steps: []resource.TestStep{ + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/Link/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + acctest.CtResourceTags: nil, + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckLinkExists(ctx, resourceName), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.Null()), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.Null()), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/Link/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + acctest.CtResourceTags: nil, + }, + ResourceName: resourceName, + ImportState: true, + ImportStateIdFunc: acctest.AttrImportStateIdFunc(resourceName, names.AttrARN), + ImportStateVerify: true, + ImportStateVerifyIdentifierAttribute: names.AttrARN, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/Link/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1Updated), + acctest.CtKey2: config.StringVariable(acctest.CtValue2), + }), + acctest.CtResourceTags: nil, + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckLinkExists(ctx, resourceName), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{})), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1Updated), + acctest.CtKey2: knownvalue.StringExact(acctest.CtValue2), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{})), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1Updated), + acctest.CtKey2: knownvalue.StringExact(acctest.CtValue2), + })), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/Link/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1Updated), + acctest.CtKey2: config.StringVariable(acctest.CtValue2), + }), + acctest.CtResourceTags: nil, + }, + ResourceName: resourceName, + ImportState: true, + ImportStateIdFunc: acctest.AttrImportStateIdFunc(resourceName, names.AttrARN), + ImportStateVerify: true, + ImportStateVerifyIdentifierAttribute: names.AttrARN, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/Link/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey2: config.StringVariable(acctest.CtValue2), + }), + acctest.CtResourceTags: nil, + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckLinkExists(ctx, resourceName), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{})), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey2: knownvalue.StringExact(acctest.CtValue2), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{})), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey2: knownvalue.StringExact(acctest.CtValue2), + })), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/Link/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey2: config.StringVariable(acctest.CtValue2), + }), + acctest.CtResourceTags: nil, + }, + ResourceName: resourceName, + ImportState: true, + ImportStateIdFunc: acctest.AttrImportStateIdFunc(resourceName, names.AttrARN), + ImportStateVerify: true, + ImportStateVerifyIdentifierAttribute: names.AttrARN, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/Link/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: nil, + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckLinkExists(ctx, resourceName), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{})), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{})), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{})), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{})), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/Link/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: nil, + }, + ResourceName: resourceName, + ImportState: true, + ImportStateIdFunc: acctest.AttrImportStateIdFunc(resourceName, names.AttrARN), + ImportStateVerify: true, + ImportStateVerifyIdentifierAttribute: names.AttrARN, + }, + }, + }) +} + +func TestAccNetworkManagerLink_tags_DefaultTags_nonOverlapping(t *testing.T) { + ctx := acctest.Context(t) + resourceName := "aws_networkmanager_link.test" + + acctest.ParallelTest(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckLinkDestroy(ctx), + Steps: []resource.TestStep{ + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/Link/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtProviderKey1: config.StringVariable(acctest.CtProviderValue1), + }), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtResourceKey1: config.StringVariable(acctest.CtResourceValue1), + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckLinkExists(ctx, resourceName), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtProviderKey1: knownvalue.StringExact(acctest.CtProviderValue1), + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtProviderKey1: knownvalue.StringExact(acctest.CtProviderValue1), + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), + })), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/Link/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtProviderKey1: config.StringVariable(acctest.CtProviderValue1), + }), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtResourceKey1: config.StringVariable(acctest.CtResourceValue1), + }), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateIdFunc: acctest.AttrImportStateIdFunc(resourceName, names.AttrARN), + ImportStateVerify: true, + ImportStateVerifyIdentifierAttribute: names.AttrARN, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/Link/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtProviderKey1: config.StringVariable(acctest.CtProviderValue1Updated), + }), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtResourceKey1: config.StringVariable(acctest.CtResourceValue1Updated), + acctest.CtResourceKey2: config.StringVariable(acctest.CtResourceValue2), + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckLinkExists(ctx, resourceName), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1Updated), + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtProviderKey1: knownvalue.StringExact(acctest.CtProviderValue1Updated), + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1Updated), + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1Updated), + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtProviderKey1: knownvalue.StringExact(acctest.CtProviderValue1Updated), + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1Updated), + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/Link/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtProviderKey1: config.StringVariable(acctest.CtProviderValue1Updated), + }), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtResourceKey1: config.StringVariable(acctest.CtResourceValue1Updated), + acctest.CtResourceKey2: config.StringVariable(acctest.CtResourceValue2), + }), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateIdFunc: acctest.AttrImportStateIdFunc(resourceName, names.AttrARN), + ImportStateVerify: true, + ImportStateVerifyIdentifierAttribute: names.AttrARN, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/Link/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: nil, + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckLinkExists(ctx, resourceName), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{})), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{})), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{})), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{})), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/Link/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: nil, + }, + ResourceName: resourceName, + ImportState: true, + ImportStateIdFunc: acctest.AttrImportStateIdFunc(resourceName, names.AttrARN), + ImportStateVerify: true, + ImportStateVerifyIdentifierAttribute: names.AttrARN, + }, + }, + }) +} + +func TestAccNetworkManagerLink_tags_DefaultTags_overlapping(t *testing.T) { + ctx := acctest.Context(t) + resourceName := "aws_networkmanager_link.test" + + acctest.ParallelTest(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckLinkDestroy(ctx), + Steps: []resource.TestStep{ + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/Link/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtOverlapKey1: config.StringVariable(acctest.CtProviderValue1), + }), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtOverlapKey1: config.StringVariable(acctest.CtResourceValue1), + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckLinkExists(ctx, resourceName), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtOverlapKey1: knownvalue.StringExact(acctest.CtResourceValue1), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtOverlapKey1: knownvalue.StringExact(acctest.CtResourceValue1), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtOverlapKey1: knownvalue.StringExact(acctest.CtResourceValue1), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtOverlapKey1: knownvalue.StringExact(acctest.CtResourceValue1), + })), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/Link/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtOverlapKey1: config.StringVariable(acctest.CtProviderValue1), + }), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtOverlapKey1: config.StringVariable(acctest.CtResourceValue1), + }), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateIdFunc: acctest.AttrImportStateIdFunc(resourceName, names.AttrARN), + ImportStateVerify: true, + ImportStateVerifyIdentifierAttribute: names.AttrARN, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/Link/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtOverlapKey1: config.StringVariable(acctest.CtProviderValue1), + acctest.CtOverlapKey2: config.StringVariable("providervalue2"), + }), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtOverlapKey1: config.StringVariable(acctest.CtResourceValue1), + acctest.CtOverlapKey2: config.StringVariable(acctest.CtResourceValue2), + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckLinkExists(ctx, resourceName), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtOverlapKey1: knownvalue.StringExact(acctest.CtResourceValue1), + acctest.CtOverlapKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtOverlapKey1: knownvalue.StringExact(acctest.CtResourceValue1), + acctest.CtOverlapKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtOverlapKey1: knownvalue.StringExact(acctest.CtResourceValue1), + acctest.CtOverlapKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtOverlapKey1: knownvalue.StringExact(acctest.CtResourceValue1), + acctest.CtOverlapKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/Link/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtOverlapKey1: config.StringVariable(acctest.CtProviderValue1), + acctest.CtOverlapKey2: config.StringVariable("providervalue2"), + }), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtOverlapKey1: config.StringVariable(acctest.CtResourceValue1), + acctest.CtOverlapKey2: config.StringVariable(acctest.CtResourceValue2), + }), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateIdFunc: acctest.AttrImportStateIdFunc(resourceName, names.AttrARN), + ImportStateVerify: true, + ImportStateVerifyIdentifierAttribute: names.AttrARN, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/Link/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtOverlapKey1: config.StringVariable(acctest.CtProviderValue1), + }), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtOverlapKey1: config.StringVariable(acctest.CtResourceValue2), + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckLinkExists(ctx, resourceName), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtOverlapKey1: knownvalue.StringExact(acctest.CtResourceValue2), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtOverlapKey1: knownvalue.StringExact(acctest.CtResourceValue2), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtOverlapKey1: knownvalue.StringExact(acctest.CtResourceValue2), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtOverlapKey1: knownvalue.StringExact(acctest.CtResourceValue2), + })), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/Link/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtOverlapKey1: config.StringVariable(acctest.CtProviderValue1), + }), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtOverlapKey1: config.StringVariable(acctest.CtResourceValue2), + }), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateIdFunc: acctest.AttrImportStateIdFunc(resourceName, names.AttrARN), + ImportStateVerify: true, + ImportStateVerifyIdentifierAttribute: names.AttrARN, + }, + }, + }) +} + +func TestAccNetworkManagerLink_tags_DefaultTags_updateToProviderOnly(t *testing.T) { + ctx := acctest.Context(t) + resourceName := "aws_networkmanager_link.test" + + acctest.ParallelTest(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckLinkDestroy(ctx), + Steps: []resource.TestStep{ + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/Link/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckLinkExists(ctx, resourceName), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/Link/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + acctest.CtResourceTags: nil, + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckLinkExists(ctx, resourceName), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{})), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{})), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/Link/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + acctest.CtResourceTags: nil, + }, + ResourceName: resourceName, + ImportState: true, + ImportStateIdFunc: acctest.AttrImportStateIdFunc(resourceName, names.AttrARN), + ImportStateVerify: true, + ImportStateVerifyIdentifierAttribute: names.AttrARN, + }, + }, + }) +} + +func TestAccNetworkManagerLink_tags_DefaultTags_updateToResourceOnly(t *testing.T) { + ctx := acctest.Context(t) + resourceName := "aws_networkmanager_link.test" + + acctest.ParallelTest(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckLinkDestroy(ctx), + Steps: []resource.TestStep{ + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/Link/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + acctest.CtResourceTags: nil, + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckLinkExists(ctx, resourceName), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.Null()), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.Null()), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/Link/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckLinkExists(ctx, resourceName), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionNoop), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/Link/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateIdFunc: acctest.AttrImportStateIdFunc(resourceName, names.AttrARN), + ImportStateVerify: true, + ImportStateVerifyIdentifierAttribute: names.AttrARN, + }, + }, + }) +} + +func TestAccNetworkManagerLink_tags_DefaultTags_emptyResourceTag(t *testing.T) { + t.Skip("Resource Link does not support empty tags") + + ctx := acctest.Context(t) + resourceName := "aws_networkmanager_link.test" + + acctest.ParallelTest(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckLinkDestroy(ctx), + Steps: []resource.TestStep{ + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/Link/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(""), + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckLinkExists(ctx, resourceName), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(""), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(""), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(""), + })), + // TODO: Should be known + plancheck.ExpectUnknownValue(resourceName, tfjsonpath.New(names.AttrTagsAll)), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/Link/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(""), + }), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateIdFunc: acctest.AttrImportStateIdFunc(resourceName, names.AttrARN), + ImportStateVerify: true, + ImportStateVerifyIdentifierAttribute: names.AttrARN, + }, + }, + }) +} + +func TestAccNetworkManagerLink_tags_DefaultTags_emptyProviderOnlyTag(t *testing.T) { + t.Skip("Resource Link does not support empty tags") + + ctx := acctest.Context(t) + resourceName := "aws_networkmanager_link.test" + + acctest.ParallelTest(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckLinkDestroy(ctx), + Steps: []resource.TestStep{ + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/Link/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(""), + }), + acctest.CtResourceTags: nil, + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckLinkExists(ctx, resourceName), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.Null()), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(""), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.Null()), + // TODO: Should be known + plancheck.ExpectUnknownValue(resourceName, tfjsonpath.New(names.AttrTagsAll)), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/Link/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(""), + }), + acctest.CtResourceTags: nil, + }, + ResourceName: resourceName, + ImportState: true, + ImportStateIdFunc: acctest.AttrImportStateIdFunc(resourceName, names.AttrARN), + ImportStateVerify: true, + ImportStateVerifyIdentifierAttribute: names.AttrARN, + }, + }, + }) +} + +func TestAccNetworkManagerLink_tags_DefaultTags_nullOverlappingResourceTag(t *testing.T) { + ctx := acctest.Context(t) + resourceName := "aws_networkmanager_link.test" + + acctest.ParallelTest(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckLinkDestroy(ctx), + Steps: []resource.TestStep{ + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/Link/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtProviderValue1), + }), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: nil, + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckLinkExists(ctx, resourceName), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.Null()), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtProviderValue1), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.Null()), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtProviderValue1), + })), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/Link/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtProviderValue1), + }), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: nil, + }), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateIdFunc: acctest.AttrImportStateIdFunc(resourceName, names.AttrARN), + ImportStateVerify: true, + ImportStateVerifyIdentifierAttribute: names.AttrARN, + }, + }, + }) +} + +func TestAccNetworkManagerLink_tags_DefaultTags_nullNonOverlappingResourceTag(t *testing.T) { + ctx := acctest.Context(t) + resourceName := "aws_networkmanager_link.test" + + acctest.ParallelTest(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckLinkDestroy(ctx), + Steps: []resource.TestStep{ + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/Link/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtProviderKey1: config.StringVariable(acctest.CtProviderValue1), + }), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtResourceKey1: nil, + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckLinkExists(ctx, resourceName), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.Null()), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtProviderKey1: knownvalue.StringExact(acctest.CtProviderValue1), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.Null()), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtProviderKey1: knownvalue.StringExact(acctest.CtProviderValue1), + })), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/Link/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtProviderKey1: config.StringVariable(acctest.CtProviderValue1), + }), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtResourceKey1: nil, + }), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateIdFunc: acctest.AttrImportStateIdFunc(resourceName, names.AttrARN), + ImportStateVerify: true, + ImportStateVerifyIdentifierAttribute: names.AttrARN, + }, + }, + }) +} + +func TestAccNetworkManagerLink_tags_ComputedTag_OnCreate(t *testing.T) { + ctx := acctest.Context(t) + resourceName := "aws_networkmanager_link.test" + + acctest.ParallelTest(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckLinkDestroy(ctx), + Steps: []resource.TestStep{ + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/Link/tagsComputed1/"), + ConfigVariables: config.Variables{ + "unknownTagKey": config.StringVariable("computedkey1"), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckLinkExists(ctx, resourceName), + resource.TestCheckResourceAttrPair(resourceName, "tags.computedkey1", "null_resource.test", names.AttrID), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapSizeExact(1)), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapSizeExact(1)), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectUnknownValue(resourceName, tfjsonpath.New(names.AttrTags)), + plancheck.ExpectUnknownValue(resourceName, tfjsonpath.New(names.AttrTagsAll)), + }, + PostApplyPreRefresh: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionNoop), + }, + PostApplyPostRefresh: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionNoop), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/Link/tagsComputed1/"), + ConfigVariables: config.Variables{ + "unknownTagKey": config.StringVariable("computedkey1"), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateIdFunc: acctest.AttrImportStateIdFunc(resourceName, names.AttrARN), + ImportStateVerify: true, + ImportStateVerifyIdentifierAttribute: names.AttrARN, + }, + }, + }) +} + +func TestAccNetworkManagerLink_tags_ComputedTag_OnUpdate_Add(t *testing.T) { + ctx := acctest.Context(t) + resourceName := "aws_networkmanager_link.test" + + acctest.ParallelTest(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckLinkDestroy(ctx), + Steps: []resource.TestStep{ + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/Link/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckLinkExists(ctx, resourceName), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/Link/tagsComputed2/"), + ConfigVariables: config.Variables{ + "unknownTagKey": config.StringVariable("computedkey1"), + "knownTagKey": config.StringVariable(acctest.CtKey1), + "knownTagValue": config.StringVariable(acctest.CtValue1), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckLinkExists(ctx, resourceName), + resource.TestCheckResourceAttrPair(resourceName, "tags.computedkey1", "null_resource.test", names.AttrID), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapSizeExact(2)), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapPartial(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapSizeExact(2)), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapPartial(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectUnknownValue(resourceName, tfjsonpath.New(names.AttrTags)), + plancheck.ExpectUnknownValue(resourceName, tfjsonpath.New(names.AttrTagsAll)), + }, + PostApplyPreRefresh: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionNoop), + }, + PostApplyPostRefresh: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionNoop), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/Link/tagsComputed2/"), + ConfigVariables: config.Variables{ + "unknownTagKey": config.StringVariable("computedkey1"), + "knownTagKey": config.StringVariable(acctest.CtKey1), + "knownTagValue": config.StringVariable(acctest.CtValue1), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateIdFunc: acctest.AttrImportStateIdFunc(resourceName, names.AttrARN), + ImportStateVerify: true, + ImportStateVerifyIdentifierAttribute: names.AttrARN, + }, + }, + }) +} + +func TestAccNetworkManagerLink_tags_ComputedTag_OnUpdate_Replace(t *testing.T) { + ctx := acctest.Context(t) + resourceName := "aws_networkmanager_link.test" + + acctest.ParallelTest(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckLinkDestroy(ctx), + Steps: []resource.TestStep{ + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/Link/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckLinkExists(ctx, resourceName), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/Link/tagsComputed1/"), + ConfigVariables: config.Variables{ + "unknownTagKey": config.StringVariable(acctest.CtKey1), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckLinkExists(ctx, resourceName), + resource.TestCheckResourceAttrPair(resourceName, acctest.CtTagsKey1, "null_resource.test", names.AttrID), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapSizeExact(1)), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapSizeExact(1)), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectUnknownValue(resourceName, tfjsonpath.New(names.AttrTags)), + plancheck.ExpectUnknownValue(resourceName, tfjsonpath.New(names.AttrTagsAll)), + }, + PostApplyPreRefresh: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionNoop), + }, + PostApplyPostRefresh: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionNoop), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/Link/tagsComputed1/"), + ConfigVariables: config.Variables{ + "unknownTagKey": config.StringVariable(acctest.CtKey1), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateIdFunc: acctest.AttrImportStateIdFunc(resourceName, names.AttrARN), + ImportStateVerify: true, + ImportStateVerifyIdentifierAttribute: names.AttrARN, + }, + }, + }) +} + +func TestAccNetworkManagerLink_tags_IgnoreTags_Overlap_DefaultTag(t *testing.T) { + ctx := acctest.Context(t) + resourceName := "aws_networkmanager_link.test" + + acctest.ParallelTest(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckLinkDestroy(ctx), + Steps: []resource.TestStep{ + // 1: Create + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/Link/tags_ignore/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtProviderKey1: config.StringVariable(acctest.CtProviderValue1), + }), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtResourceKey1: config.StringVariable(acctest.CtResourceValue1), + }), + "ignore_tag_keys": config.SetVariable( + config.StringVariable(acctest.CtProviderKey1), + ), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckLinkExists(ctx, resourceName), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), + })), + expectFullResourceTags(ctx, resourceName, knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtProviderKey1: knownvalue.StringExact(acctest.CtProviderValue1), // TODO: Should not be set + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), + })), + }, + PostApplyPreRefresh: []plancheck.PlanCheck{ + plancheck.ExpectEmptyPlan(), + }, + PostApplyPostRefresh: []plancheck.PlanCheck{ + plancheck.ExpectEmptyPlan(), + }, + }, + }, + // 2: Update ignored tag only + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/Link/tags_ignore/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtProviderKey1: config.StringVariable(acctest.CtProviderValue1Updated), + }), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtResourceKey1: config.StringVariable(acctest.CtResourceValue1), + }), + "ignore_tag_keys": config.SetVariable( + config.StringVariable(acctest.CtProviderKey1), + ), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckLinkExists(ctx, resourceName), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), + })), + expectFullResourceTags(ctx, resourceName, knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtProviderKey1: knownvalue.StringExact(acctest.CtProviderValue1), // TODO: Should not be set + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionNoop), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), + })), + }, + PostApplyPreRefresh: []plancheck.PlanCheck{ + plancheck.ExpectEmptyPlan(), + }, + PostApplyPostRefresh: []plancheck.PlanCheck{ + plancheck.ExpectEmptyPlan(), + }, + }, + }, + // 3: Update both tags + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/Link/tags_ignore/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtProviderKey1: config.StringVariable(acctest.CtProviderValue1Again), + }), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtResourceKey1: config.StringVariable(acctest.CtResourceValue1Updated), + }), + "ignore_tag_keys": config.SetVariable( + config.StringVariable(acctest.CtProviderKey1), + ), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckLinkExists(ctx, resourceName), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1Updated), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1Updated), + })), + expectFullResourceTags(ctx, resourceName, knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtProviderKey1: knownvalue.StringExact(acctest.CtProviderValue1), // TODO: Should not be set + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1Updated), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1Updated), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1Updated), + })), + }, + PostApplyPreRefresh: []plancheck.PlanCheck{ + plancheck.ExpectEmptyPlan(), + }, + PostApplyPostRefresh: []plancheck.PlanCheck{ + plancheck.ExpectEmptyPlan(), + }, + }, + }, + }, + }) +} + +func TestAccNetworkManagerLink_tags_IgnoreTags_Overlap_ResourceTag(t *testing.T) { + ctx := acctest.Context(t) + resourceName := "aws_networkmanager_link.test" + + acctest.ParallelTest(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckLinkDestroy(ctx), + Steps: []resource.TestStep{ + // 1: Create + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/Link/tags_ignore/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtResourceKey1: config.StringVariable(acctest.CtResourceValue1), + acctest.CtResourceKey2: config.StringVariable(acctest.CtResourceValue2), + }), + "ignore_tag_keys": config.SetVariable( + config.StringVariable(acctest.CtResourceKey1), + ), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckLinkExists(ctx, resourceName), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + expectFullResourceTags(ctx, resourceName, knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), // TODO: Should not be set + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + }, + PostApplyPreRefresh: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + }, + PostApplyPostRefresh: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + }, + }, + ExpectNonEmptyPlan: true, + }, + // 2: Update ignored tag + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/Link/tags_ignore/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtResourceKey1: config.StringVariable(acctest.CtResourceValue1Updated), + acctest.CtResourceKey2: config.StringVariable(acctest.CtResourceValue2), + }), + "ignore_tag_keys": config.SetVariable( + config.StringVariable(acctest.CtResourceKey1), + ), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckLinkExists(ctx, resourceName), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + expectFullResourceTags(ctx, resourceName, knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), // TODO: Should not be set + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1Updated), + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + }, + PostApplyPreRefresh: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1Updated), + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + }, + PostApplyPostRefresh: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1Updated), + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + }, + }, + ExpectNonEmptyPlan: true, + }, + // 3: Update both tags + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/Link/tags_ignore/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtResourceKey1: config.StringVariable(acctest.CtResourceValue1Again), + acctest.CtResourceKey2: config.StringVariable(acctest.CtResourceValue2Updated), + }), + "ignore_tag_keys": config.SetVariable( + config.StringVariable(acctest.CtResourceKey1), + ), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckLinkExists(ctx, resourceName), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2Updated), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2Updated), + })), + expectFullResourceTags(ctx, resourceName, knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), // TODO: Should not be set + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2Updated), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1Again), + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2Updated), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2Updated), + })), + }, + PostApplyPreRefresh: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1Again), + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2Updated), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2Updated), + })), + }, + PostApplyPostRefresh: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1Again), + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2Updated), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2Updated), + })), + }, + }, + ExpectNonEmptyPlan: true, + }, + }, + }) +} diff --git a/internal/service/networkmanager/link_test.go b/internal/service/networkmanager/link_test.go index bf0348aca9e9..be1454e98829 100644 --- a/internal/service/networkmanager/link_test.go +++ b/internal/service/networkmanager/link_test.go @@ -76,52 +76,6 @@ func TestAccNetworkManagerLink_disappears(t *testing.T) { }) } -func TestAccNetworkManagerLink_tags(t *testing.T) { - ctx := acctest.Context(t) - resourceName := "aws_networkmanager_link.test" - rName := sdkacctest.RandomWithPrefix(acctest.ResourcePrefix) - - resource.ParallelTest(t, resource.TestCase{ - PreCheck: func() { acctest.PreCheck(ctx, t) }, - ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), - ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, - CheckDestroy: testAccCheckLinkDestroy(ctx), - Steps: []resource.TestStep{ - { - Config: testAccLinkConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), - Check: resource.ComposeTestCheckFunc( - testAccCheckLinkExists(ctx, resourceName), - resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, "1"), - resource.TestCheckResourceAttr(resourceName, acctest.CtTagsKey1, acctest.CtValue1), - ), - }, - { - ResourceName: resourceName, - ImportState: true, - ImportStateIdFunc: acctest.AttrImportStateIdFunc(resourceName, names.AttrARN), - ImportStateVerify: true, - }, - { - Config: testAccLinkConfig_tags2(rName, acctest.CtKey1, acctest.CtValue1Updated, acctest.CtKey2, acctest.CtValue2), - Check: resource.ComposeTestCheckFunc( - testAccCheckLinkExists(ctx, resourceName), - resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, "2"), - resource.TestCheckResourceAttr(resourceName, acctest.CtTagsKey1, acctest.CtValue1Updated), - resource.TestCheckResourceAttr(resourceName, acctest.CtTagsKey2, acctest.CtValue2), - ), - }, - { - Config: testAccLinkConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), - Check: resource.ComposeTestCheckFunc( - testAccCheckLinkExists(ctx, resourceName), - resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, "1"), - resource.TestCheckResourceAttr(resourceName, acctest.CtTagsKey2, acctest.CtValue2), - ), - }, - }, - }) -} - func TestAccNetworkManagerLink_allAttributes(t *testing.T) { ctx := acctest.Context(t) resourceName := "aws_networkmanager_link.test" @@ -240,71 +194,6 @@ resource "aws_networkmanager_link" "test" { `, rName) } -func testAccLinkConfig_tags1(rName, tagKey1, tagValue1 string) string { - return fmt.Sprintf(` -resource "aws_networkmanager_global_network" "test" { - tags = { - Name = %[1]q - } -} - -resource "aws_networkmanager_site" "test" { - global_network_id = aws_networkmanager_global_network.test.id - - tags = { - Name = %[1]q - } -} - -resource "aws_networkmanager_link" "test" { - global_network_id = aws_networkmanager_global_network.test.id - site_id = aws_networkmanager_site.test.id - - bandwidth { - download_speed = 50 - upload_speed = 10 - } - - tags = { - %[2]q = %[3]q - } -} -`, rName, tagKey1, tagValue1) -} - -func testAccLinkConfig_tags2(rName, tagKey1, tagValue1, tagKey2, tagValue2 string) string { - return fmt.Sprintf(` -resource "aws_networkmanager_global_network" "test" { - tags = { - Name = %[1]q - } -} - -resource "aws_networkmanager_site" "test" { - global_network_id = aws_networkmanager_global_network.test.id - - tags = { - Name = %[1]q - } -} - -resource "aws_networkmanager_link" "test" { - global_network_id = aws_networkmanager_global_network.test.id - site_id = aws_networkmanager_site.test.id - - bandwidth { - download_speed = 50 - upload_speed = 10 - } - - tags = { - %[2]q = %[3]q - %[4]q = %[5]q - } -} -`, rName, tagKey1, tagValue1, tagKey2, tagValue2) -} - func testAccLinkConfig_allAttributes(rName string) string { return fmt.Sprintf(` resource "aws_networkmanager_global_network" "test" { diff --git a/internal/service/networkmanager/testdata/Link/tags/main_gen.tf b/internal/service/networkmanager/testdata/Link/tags/main_gen.tf new file mode 100644 index 000000000000..e2db0ac4bd89 --- /dev/null +++ b/internal/service/networkmanager/testdata/Link/tags/main_gen.tf @@ -0,0 +1,27 @@ +# Copyright (c) HashiCorp, Inc. +# SPDX-License-Identifier: MPL-2.0 + +resource "aws_networkmanager_link" "test" { + global_network_id = aws_networkmanager_global_network.test.id + site_id = aws_networkmanager_site.test.id + + bandwidth { + download_speed = 50 + upload_speed = 10 + } + + tags = var.resource_tags +} + +resource "aws_networkmanager_site" "test" { + global_network_id = aws_networkmanager_global_network.test.id +} + +resource "aws_networkmanager_global_network" "test" {} + +variable "resource_tags" { + description = "Tags to set on resource. To specify no tags, set to `null`" + # Not setting a default, so that this must explicitly be set to `null` to specify no tags + type = map(string) + nullable = true +} diff --git a/internal/service/networkmanager/testdata/Link/tagsComputed1/main_gen.tf b/internal/service/networkmanager/testdata/Link/tagsComputed1/main_gen.tf new file mode 100644 index 000000000000..84cdac21e538 --- /dev/null +++ b/internal/service/networkmanager/testdata/Link/tagsComputed1/main_gen.tf @@ -0,0 +1,31 @@ +# Copyright (c) HashiCorp, Inc. +# SPDX-License-Identifier: MPL-2.0 + +provider "null" {} + +resource "aws_networkmanager_link" "test" { + global_network_id = aws_networkmanager_global_network.test.id + site_id = aws_networkmanager_site.test.id + + bandwidth { + download_speed = 50 + upload_speed = 10 + } + + tags = { + (var.unknownTagKey) = null_resource.test.id + } +} + +resource "aws_networkmanager_site" "test" { + global_network_id = aws_networkmanager_global_network.test.id +} + +resource "aws_networkmanager_global_network" "test" {} + +resource "null_resource" "test" {} + +variable "unknownTagKey" { + type = string + nullable = false +} diff --git a/internal/service/networkmanager/testdata/Link/tagsComputed2/main_gen.tf b/internal/service/networkmanager/testdata/Link/tagsComputed2/main_gen.tf new file mode 100644 index 000000000000..b18eb95f1539 --- /dev/null +++ b/internal/service/networkmanager/testdata/Link/tagsComputed2/main_gen.tf @@ -0,0 +1,42 @@ +# Copyright (c) HashiCorp, Inc. +# SPDX-License-Identifier: MPL-2.0 + +provider "null" {} + +resource "aws_networkmanager_link" "test" { + global_network_id = aws_networkmanager_global_network.test.id + site_id = aws_networkmanager_site.test.id + + bandwidth { + download_speed = 50 + upload_speed = 10 + } + + tags = { + (var.unknownTagKey) = null_resource.test.id + (var.knownTagKey) = var.knownTagValue + } +} + +resource "aws_networkmanager_site" "test" { + global_network_id = aws_networkmanager_global_network.test.id +} + +resource "aws_networkmanager_global_network" "test" {} + +resource "null_resource" "test" {} + +variable "unknownTagKey" { + type = string + nullable = false +} + +variable "knownTagKey" { + type = string + nullable = false +} + +variable "knownTagValue" { + type = string + nullable = false +} diff --git a/internal/service/networkmanager/testdata/Link/tags_defaults/main_gen.tf b/internal/service/networkmanager/testdata/Link/tags_defaults/main_gen.tf new file mode 100644 index 000000000000..42ee98dca702 --- /dev/null +++ b/internal/service/networkmanager/testdata/Link/tags_defaults/main_gen.tf @@ -0,0 +1,38 @@ +# Copyright (c) HashiCorp, Inc. +# SPDX-License-Identifier: MPL-2.0 + +provider "aws" { + default_tags { + tags = var.provider_tags + } +} + +resource "aws_networkmanager_link" "test" { + global_network_id = aws_networkmanager_global_network.test.id + site_id = aws_networkmanager_site.test.id + + bandwidth { + download_speed = 50 + upload_speed = 10 + } + + tags = var.resource_tags +} + +resource "aws_networkmanager_site" "test" { + global_network_id = aws_networkmanager_global_network.test.id +} + +resource "aws_networkmanager_global_network" "test" {} + +variable "resource_tags" { + description = "Tags to set on resource. To specify no tags, set to `null`" + # Not setting a default, so that this must explicitly be set to `null` to specify no tags + type = map(string) + nullable = true +} + +variable "provider_tags" { + type = map(string) + nullable = false +} diff --git a/internal/service/networkmanager/testdata/Link/tags_ignore/main_gen.tf b/internal/service/networkmanager/testdata/Link/tags_ignore/main_gen.tf new file mode 100644 index 000000000000..5ebe12b97173 --- /dev/null +++ b/internal/service/networkmanager/testdata/Link/tags_ignore/main_gen.tf @@ -0,0 +1,47 @@ +# Copyright (c) HashiCorp, Inc. +# SPDX-License-Identifier: MPL-2.0 + +provider "aws" { + default_tags { + tags = var.provider_tags + } + ignore_tags { + keys = var.ignore_tag_keys + } +} + +resource "aws_networkmanager_link" "test" { + global_network_id = aws_networkmanager_global_network.test.id + site_id = aws_networkmanager_site.test.id + + bandwidth { + download_speed = 50 + upload_speed = 10 + } + + tags = var.resource_tags +} + +resource "aws_networkmanager_site" "test" { + global_network_id = aws_networkmanager_global_network.test.id +} + +resource "aws_networkmanager_global_network" "test" {} + +variable "resource_tags" { + description = "Tags to set on resource. To specify no tags, set to `null`" + # Not setting a default, so that this must explicitly be set to `null` to specify no tags + type = map(string) + nullable = true +} + +variable "provider_tags" { + type = map(string) + nullable = true + default = null +} + +variable "ignore_tag_keys" { + type = set(string) + nullable = false +} diff --git a/internal/service/networkmanager/testdata/tmpl/link_tags.gtpl b/internal/service/networkmanager/testdata/tmpl/link_tags.gtpl new file mode 100644 index 000000000000..894e8f3383d9 --- /dev/null +++ b/internal/service/networkmanager/testdata/tmpl/link_tags.gtpl @@ -0,0 +1,16 @@ +resource "aws_networkmanager_link" "test" { + global_network_id = aws_networkmanager_global_network.test.id + site_id = aws_networkmanager_site.test.id + + bandwidth { + download_speed = 50 + upload_speed = 10 + } +{{- template "tags" . }} +} + +resource "aws_networkmanager_site" "test" { + global_network_id = aws_networkmanager_global_network.test.id +} + +resource "aws_networkmanager_global_network" "test" {} From 4f46796d5f3b82ad2f952daa5df9a37d5850ea42 Mon Sep 17 00:00:00 2001 From: Graham Davison Date: Mon, 28 Jul 2025 10:14:49 -0700 Subject: [PATCH 043/365] `aws_networkmanager_connection` --- internal/service/networkmanager/connection.go | 5 +- .../connection_tags_gen_test.go | 2253 +++++++++++++++++ .../service/networkmanager/connection_test.go | 2 +- .../testdata/Connection/tags/main_gen.tf | 38 + .../Connection/tagsComputed1/main_gen.tf | 42 + .../Connection/tagsComputed2/main_gen.tf | 53 + .../Connection/tags_defaults/main_gen.tf | 49 + .../Connection/tags_ignore/main_gen.tf | 58 + .../testdata/tmpl/connection_tags.gtpl | 27 + 9 files changed, 2525 insertions(+), 2 deletions(-) create mode 100644 internal/service/networkmanager/connection_tags_gen_test.go create mode 100644 internal/service/networkmanager/testdata/Connection/tags/main_gen.tf create mode 100644 internal/service/networkmanager/testdata/Connection/tagsComputed1/main_gen.tf create mode 100644 internal/service/networkmanager/testdata/Connection/tagsComputed2/main_gen.tf create mode 100644 internal/service/networkmanager/testdata/Connection/tags_defaults/main_gen.tf create mode 100644 internal/service/networkmanager/testdata/Connection/tags_ignore/main_gen.tf create mode 100644 internal/service/networkmanager/testdata/tmpl/connection_tags.gtpl diff --git a/internal/service/networkmanager/connection.go b/internal/service/networkmanager/connection.go index 74566de70fa0..e6e18981712e 100644 --- a/internal/service/networkmanager/connection.go +++ b/internal/service/networkmanager/connection.go @@ -29,7 +29,10 @@ import ( // @SDKResource("aws_networkmanager_connection", name="Connection") // @Tags(identifierAttribute="arn") -// @Testing(tagsTest=false) +// @Testing(generator=false) +// @Testing(serialize=true) +// @Testing(importStateIdAttribute="arn") +// @Testing(skipEmptyTags=true) func resourceConnection() *schema.Resource { return &schema.Resource{ CreateWithoutTimeout: resourceConnectionCreate, diff --git a/internal/service/networkmanager/connection_tags_gen_test.go b/internal/service/networkmanager/connection_tags_gen_test.go new file mode 100644 index 000000000000..7053f1d52e63 --- /dev/null +++ b/internal/service/networkmanager/connection_tags_gen_test.go @@ -0,0 +1,2253 @@ +// Code generated by internal/generate/tagstests/main.go; DO NOT EDIT. + +package networkmanager_test + +import ( + "testing" + + "github.com/hashicorp/terraform-plugin-testing/config" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/knownvalue" + "github.com/hashicorp/terraform-plugin-testing/plancheck" + "github.com/hashicorp/terraform-plugin-testing/statecheck" + "github.com/hashicorp/terraform-plugin-testing/tfjsonpath" + "github.com/hashicorp/terraform-provider-aws/internal/acctest" + "github.com/hashicorp/terraform-provider-aws/names" +) + +func testAccNetworkManagerConnection_tagsSerial(t *testing.T) { + t.Helper() + + testCases := map[string]func(t *testing.T){ + acctest.CtBasic: testAccNetworkManagerConnection_tags, + "null": testAccNetworkManagerConnection_tags_null, + "EmptyMap": testAccNetworkManagerConnection_tags_EmptyMap, + "AddOnUpdate": testAccNetworkManagerConnection_tags_AddOnUpdate, + "EmptyTag_OnCreate": testAccNetworkManagerConnection_tags_EmptyTag_OnCreate, + "EmptyTag_OnUpdate_Add": testAccNetworkManagerConnection_tags_EmptyTag_OnUpdate_Add, + "EmptyTag_OnUpdate_Replace": testAccNetworkManagerConnection_tags_EmptyTag_OnUpdate_Replace, + "DefaultTags_providerOnly": testAccNetworkManagerConnection_tags_DefaultTags_providerOnly, + "DefaultTags_nonOverlapping": testAccNetworkManagerConnection_tags_DefaultTags_nonOverlapping, + "DefaultTags_overlapping": testAccNetworkManagerConnection_tags_DefaultTags_overlapping, + "DefaultTags_updateToProviderOnly": testAccNetworkManagerConnection_tags_DefaultTags_updateToProviderOnly, + "DefaultTags_updateToResourceOnly": testAccNetworkManagerConnection_tags_DefaultTags_updateToResourceOnly, + "DefaultTags_emptyResourceTag": testAccNetworkManagerConnection_tags_DefaultTags_emptyResourceTag, + "DefaultTags_nullOverlappingResourceTag": testAccNetworkManagerConnection_tags_DefaultTags_nullOverlappingResourceTag, + "DefaultTags_nullNonOverlappingResourceTag": testAccNetworkManagerConnection_tags_DefaultTags_nullNonOverlappingResourceTag, + "ComputedTag_OnCreate": testAccNetworkManagerConnection_tags_ComputedTag_OnCreate, + "ComputedTag_OnUpdate_Add": testAccNetworkManagerConnection_tags_ComputedTag_OnUpdate_Add, + "ComputedTag_OnUpdate_Replace": testAccNetworkManagerConnection_tags_ComputedTag_OnUpdate_Replace, + "IgnoreTags_Overlap_DefaultTag": testAccNetworkManagerConnection_tags_IgnoreTags_Overlap_DefaultTag, + "IgnoreTags_Overlap_ResourceTag": testAccNetworkManagerConnection_tags_IgnoreTags_Overlap_ResourceTag, + } + + acctest.RunSerialTests1Level(t, testCases, 0) +} + +func testAccNetworkManagerConnection_tags(t *testing.T) { + ctx := acctest.Context(t) + resourceName := "aws_networkmanager_connection.test" + + acctest.Test(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckConnectionDestroy(ctx), + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + Steps: []resource.TestStep{ + { + ConfigDirectory: config.StaticDirectory("testdata/Connection/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckConnectionExists(ctx, resourceName), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + }, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/Connection/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateIdFunc: acctest.AttrImportStateIdFunc(resourceName, names.AttrARN), + ImportStateVerify: true, + ImportStateVerifyIdentifierAttribute: names.AttrARN, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/Connection/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1Updated), + acctest.CtKey2: config.StringVariable(acctest.CtValue2), + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckConnectionExists(ctx, resourceName), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1Updated), + acctest.CtKey2: knownvalue.StringExact(acctest.CtValue2), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1Updated), + acctest.CtKey2: knownvalue.StringExact(acctest.CtValue2), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1Updated), + acctest.CtKey2: knownvalue.StringExact(acctest.CtValue2), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1Updated), + acctest.CtKey2: knownvalue.StringExact(acctest.CtValue2), + })), + }, + }, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/Connection/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1Updated), + acctest.CtKey2: config.StringVariable(acctest.CtValue2), + }), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateIdFunc: acctest.AttrImportStateIdFunc(resourceName, names.AttrARN), + ImportStateVerify: true, + ImportStateVerifyIdentifierAttribute: names.AttrARN, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/Connection/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey2: config.StringVariable(acctest.CtValue2), + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckConnectionExists(ctx, resourceName), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey2: knownvalue.StringExact(acctest.CtValue2), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey2: knownvalue.StringExact(acctest.CtValue2), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey2: knownvalue.StringExact(acctest.CtValue2), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey2: knownvalue.StringExact(acctest.CtValue2), + })), + }, + }, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/Connection/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey2: config.StringVariable(acctest.CtValue2), + }), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateIdFunc: acctest.AttrImportStateIdFunc(resourceName, names.AttrARN), + ImportStateVerify: true, + ImportStateVerifyIdentifierAttribute: names.AttrARN, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/Connection/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: nil, + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckConnectionExists(ctx, resourceName), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{})), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{})), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{})), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{})), + }, + }, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/Connection/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: nil, + }, + ResourceName: resourceName, + ImportState: true, + ImportStateIdFunc: acctest.AttrImportStateIdFunc(resourceName, names.AttrARN), + ImportStateVerify: true, + ImportStateVerifyIdentifierAttribute: names.AttrARN, + }, + }, + }) +} + +func testAccNetworkManagerConnection_tags_null(t *testing.T) { + ctx := acctest.Context(t) + resourceName := "aws_networkmanager_connection.test" + + acctest.Test(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckConnectionDestroy(ctx), + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + Steps: []resource.TestStep{ + { + ConfigDirectory: config.StaticDirectory("testdata/Connection/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: nil, + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckConnectionExists(ctx, resourceName), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.Null()), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{})), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.Null()), + // TODO: Should be known + plancheck.ExpectUnknownValue(resourceName, tfjsonpath.New(names.AttrTagsAll)), + }, + }, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/Connection/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: nil, + }), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateIdFunc: acctest.AttrImportStateIdFunc(resourceName, names.AttrARN), + ImportStateVerify: true, + ImportStateVerifyIdentifierAttribute: names.AttrARN, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/Connection/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: nil, + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionNoop), + }, + PostApplyPostRefresh: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionNoop), + }, + }, + }, + }, + }) +} + +func testAccNetworkManagerConnection_tags_EmptyMap(t *testing.T) { + ctx := acctest.Context(t) + resourceName := "aws_networkmanager_connection.test" + + acctest.Test(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckConnectionDestroy(ctx), + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + Steps: []resource.TestStep{ + { + ConfigDirectory: config.StaticDirectory("testdata/Connection/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{}), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckConnectionExists(ctx, resourceName), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.Null()), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{})), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.Null()), + // TODO: Should be known + plancheck.ExpectUnknownValue(resourceName, tfjsonpath.New(names.AttrTagsAll)), + }, + }, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/Connection/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{}), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateIdFunc: acctest.AttrImportStateIdFunc(resourceName, names.AttrARN), + ImportStateVerify: true, + ImportStateVerifyIdentifierAttribute: names.AttrARN, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/Connection/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: nil, + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionNoop), + }, + PostApplyPostRefresh: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionNoop), + }, + }, + }, + }, + }) +} + +func testAccNetworkManagerConnection_tags_AddOnUpdate(t *testing.T) { + ctx := acctest.Context(t) + resourceName := "aws_networkmanager_connection.test" + + acctest.Test(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckConnectionDestroy(ctx), + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + Steps: []resource.TestStep{ + { + ConfigDirectory: config.StaticDirectory("testdata/Connection/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: nil, + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckConnectionExists(ctx, resourceName), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.Null()), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{})), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.Null()), + // TODO: Should be known + plancheck.ExpectUnknownValue(resourceName, tfjsonpath.New(names.AttrTagsAll)), + }, + }, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/Connection/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckConnectionExists(ctx, resourceName), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + }, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/Connection/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateIdFunc: acctest.AttrImportStateIdFunc(resourceName, names.AttrARN), + ImportStateVerify: true, + ImportStateVerifyIdentifierAttribute: names.AttrARN, + }, + }, + }) +} + +func testAccNetworkManagerConnection_tags_EmptyTag_OnCreate(t *testing.T) { + t.Skip("Resource Connection does not support empty tags") + + ctx := acctest.Context(t) + resourceName := "aws_networkmanager_connection.test" + + acctest.Test(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckConnectionDestroy(ctx), + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + Steps: []resource.TestStep{ + { + ConfigDirectory: config.StaticDirectory("testdata/Connection/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(""), + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckConnectionExists(ctx, resourceName), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(""), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(""), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(""), + })), + // TODO: Should be known + plancheck.ExpectUnknownValue(resourceName, tfjsonpath.New(names.AttrTagsAll)), + }, + }, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/Connection/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(""), + }), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateIdFunc: acctest.AttrImportStateIdFunc(resourceName, names.AttrARN), + ImportStateVerify: true, + ImportStateVerifyIdentifierAttribute: names.AttrARN, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/Connection/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: nil, + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckConnectionExists(ctx, resourceName), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{})), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{})), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{})), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{})), + }, + }, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/Connection/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: nil, + }, + ResourceName: resourceName, + ImportState: true, + ImportStateIdFunc: acctest.AttrImportStateIdFunc(resourceName, names.AttrARN), + ImportStateVerify: true, + ImportStateVerifyIdentifierAttribute: names.AttrARN, + }, + }, + }) +} + +func testAccNetworkManagerConnection_tags_EmptyTag_OnUpdate_Add(t *testing.T) { + t.Skip("Resource Connection does not support empty tags") + + ctx := acctest.Context(t) + resourceName := "aws_networkmanager_connection.test" + + acctest.Test(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckConnectionDestroy(ctx), + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + Steps: []resource.TestStep{ + { + ConfigDirectory: config.StaticDirectory("testdata/Connection/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckConnectionExists(ctx, resourceName), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + }, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/Connection/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + acctest.CtKey2: config.StringVariable(""), + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckConnectionExists(ctx, resourceName), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + acctest.CtKey2: knownvalue.StringExact(""), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + acctest.CtKey2: knownvalue.StringExact(""), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + acctest.CtKey2: knownvalue.StringExact(""), + })), + // TODO: Should be known + plancheck.ExpectUnknownValue(resourceName, tfjsonpath.New(names.AttrTagsAll)), + }, + }, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/Connection/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + acctest.CtKey2: config.StringVariable(""), + }), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateIdFunc: acctest.AttrImportStateIdFunc(resourceName, names.AttrARN), + ImportStateVerify: true, + ImportStateVerifyIdentifierAttribute: names.AttrARN, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/Connection/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckConnectionExists(ctx, resourceName), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + }, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/Connection/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateIdFunc: acctest.AttrImportStateIdFunc(resourceName, names.AttrARN), + ImportStateVerify: true, + ImportStateVerifyIdentifierAttribute: names.AttrARN, + }, + }, + }) +} + +func testAccNetworkManagerConnection_tags_EmptyTag_OnUpdate_Replace(t *testing.T) { + t.Skip("Resource Connection does not support empty tags") + + ctx := acctest.Context(t) + resourceName := "aws_networkmanager_connection.test" + + acctest.Test(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckConnectionDestroy(ctx), + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + Steps: []resource.TestStep{ + { + ConfigDirectory: config.StaticDirectory("testdata/Connection/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckConnectionExists(ctx, resourceName), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + }, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/Connection/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(""), + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckConnectionExists(ctx, resourceName), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(""), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(""), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(""), + })), + // TODO: Should be known + plancheck.ExpectUnknownValue(resourceName, tfjsonpath.New(names.AttrTagsAll)), + }, + }, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/Connection/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(""), + }), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateIdFunc: acctest.AttrImportStateIdFunc(resourceName, names.AttrARN), + ImportStateVerify: true, + ImportStateVerifyIdentifierAttribute: names.AttrARN, + }, + }, + }) +} + +func testAccNetworkManagerConnection_tags_DefaultTags_providerOnly(t *testing.T) { + ctx := acctest.Context(t) + resourceName := "aws_networkmanager_connection.test" + + acctest.Test(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckConnectionDestroy(ctx), + Steps: []resource.TestStep{ + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/Connection/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + acctest.CtResourceTags: nil, + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckConnectionExists(ctx, resourceName), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.Null()), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.Null()), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/Connection/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + acctest.CtResourceTags: nil, + }, + ResourceName: resourceName, + ImportState: true, + ImportStateIdFunc: acctest.AttrImportStateIdFunc(resourceName, names.AttrARN), + ImportStateVerify: true, + ImportStateVerifyIdentifierAttribute: names.AttrARN, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/Connection/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1Updated), + acctest.CtKey2: config.StringVariable(acctest.CtValue2), + }), + acctest.CtResourceTags: nil, + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckConnectionExists(ctx, resourceName), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{})), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1Updated), + acctest.CtKey2: knownvalue.StringExact(acctest.CtValue2), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{})), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1Updated), + acctest.CtKey2: knownvalue.StringExact(acctest.CtValue2), + })), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/Connection/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1Updated), + acctest.CtKey2: config.StringVariable(acctest.CtValue2), + }), + acctest.CtResourceTags: nil, + }, + ResourceName: resourceName, + ImportState: true, + ImportStateIdFunc: acctest.AttrImportStateIdFunc(resourceName, names.AttrARN), + ImportStateVerify: true, + ImportStateVerifyIdentifierAttribute: names.AttrARN, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/Connection/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey2: config.StringVariable(acctest.CtValue2), + }), + acctest.CtResourceTags: nil, + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckConnectionExists(ctx, resourceName), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{})), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey2: knownvalue.StringExact(acctest.CtValue2), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{})), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey2: knownvalue.StringExact(acctest.CtValue2), + })), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/Connection/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey2: config.StringVariable(acctest.CtValue2), + }), + acctest.CtResourceTags: nil, + }, + ResourceName: resourceName, + ImportState: true, + ImportStateIdFunc: acctest.AttrImportStateIdFunc(resourceName, names.AttrARN), + ImportStateVerify: true, + ImportStateVerifyIdentifierAttribute: names.AttrARN, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/Connection/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: nil, + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckConnectionExists(ctx, resourceName), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{})), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{})), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{})), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{})), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/Connection/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: nil, + }, + ResourceName: resourceName, + ImportState: true, + ImportStateIdFunc: acctest.AttrImportStateIdFunc(resourceName, names.AttrARN), + ImportStateVerify: true, + ImportStateVerifyIdentifierAttribute: names.AttrARN, + }, + }, + }) +} + +func testAccNetworkManagerConnection_tags_DefaultTags_nonOverlapping(t *testing.T) { + ctx := acctest.Context(t) + resourceName := "aws_networkmanager_connection.test" + + acctest.Test(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckConnectionDestroy(ctx), + Steps: []resource.TestStep{ + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/Connection/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtProviderKey1: config.StringVariable(acctest.CtProviderValue1), + }), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtResourceKey1: config.StringVariable(acctest.CtResourceValue1), + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckConnectionExists(ctx, resourceName), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtProviderKey1: knownvalue.StringExact(acctest.CtProviderValue1), + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtProviderKey1: knownvalue.StringExact(acctest.CtProviderValue1), + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), + })), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/Connection/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtProviderKey1: config.StringVariable(acctest.CtProviderValue1), + }), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtResourceKey1: config.StringVariable(acctest.CtResourceValue1), + }), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateIdFunc: acctest.AttrImportStateIdFunc(resourceName, names.AttrARN), + ImportStateVerify: true, + ImportStateVerifyIdentifierAttribute: names.AttrARN, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/Connection/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtProviderKey1: config.StringVariable(acctest.CtProviderValue1Updated), + }), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtResourceKey1: config.StringVariable(acctest.CtResourceValue1Updated), + acctest.CtResourceKey2: config.StringVariable(acctest.CtResourceValue2), + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckConnectionExists(ctx, resourceName), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1Updated), + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtProviderKey1: knownvalue.StringExact(acctest.CtProviderValue1Updated), + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1Updated), + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1Updated), + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtProviderKey1: knownvalue.StringExact(acctest.CtProviderValue1Updated), + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1Updated), + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/Connection/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtProviderKey1: config.StringVariable(acctest.CtProviderValue1Updated), + }), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtResourceKey1: config.StringVariable(acctest.CtResourceValue1Updated), + acctest.CtResourceKey2: config.StringVariable(acctest.CtResourceValue2), + }), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateIdFunc: acctest.AttrImportStateIdFunc(resourceName, names.AttrARN), + ImportStateVerify: true, + ImportStateVerifyIdentifierAttribute: names.AttrARN, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/Connection/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: nil, + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckConnectionExists(ctx, resourceName), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{})), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{})), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{})), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{})), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/Connection/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: nil, + }, + ResourceName: resourceName, + ImportState: true, + ImportStateIdFunc: acctest.AttrImportStateIdFunc(resourceName, names.AttrARN), + ImportStateVerify: true, + ImportStateVerifyIdentifierAttribute: names.AttrARN, + }, + }, + }) +} + +func testAccNetworkManagerConnection_tags_DefaultTags_overlapping(t *testing.T) { + ctx := acctest.Context(t) + resourceName := "aws_networkmanager_connection.test" + + acctest.Test(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckConnectionDestroy(ctx), + Steps: []resource.TestStep{ + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/Connection/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtOverlapKey1: config.StringVariable(acctest.CtProviderValue1), + }), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtOverlapKey1: config.StringVariable(acctest.CtResourceValue1), + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckConnectionExists(ctx, resourceName), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtOverlapKey1: knownvalue.StringExact(acctest.CtResourceValue1), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtOverlapKey1: knownvalue.StringExact(acctest.CtResourceValue1), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtOverlapKey1: knownvalue.StringExact(acctest.CtResourceValue1), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtOverlapKey1: knownvalue.StringExact(acctest.CtResourceValue1), + })), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/Connection/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtOverlapKey1: config.StringVariable(acctest.CtProviderValue1), + }), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtOverlapKey1: config.StringVariable(acctest.CtResourceValue1), + }), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateIdFunc: acctest.AttrImportStateIdFunc(resourceName, names.AttrARN), + ImportStateVerify: true, + ImportStateVerifyIdentifierAttribute: names.AttrARN, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/Connection/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtOverlapKey1: config.StringVariable(acctest.CtProviderValue1), + acctest.CtOverlapKey2: config.StringVariable("providervalue2"), + }), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtOverlapKey1: config.StringVariable(acctest.CtResourceValue1), + acctest.CtOverlapKey2: config.StringVariable(acctest.CtResourceValue2), + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckConnectionExists(ctx, resourceName), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtOverlapKey1: knownvalue.StringExact(acctest.CtResourceValue1), + acctest.CtOverlapKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtOverlapKey1: knownvalue.StringExact(acctest.CtResourceValue1), + acctest.CtOverlapKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtOverlapKey1: knownvalue.StringExact(acctest.CtResourceValue1), + acctest.CtOverlapKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtOverlapKey1: knownvalue.StringExact(acctest.CtResourceValue1), + acctest.CtOverlapKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/Connection/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtOverlapKey1: config.StringVariable(acctest.CtProviderValue1), + acctest.CtOverlapKey2: config.StringVariable("providervalue2"), + }), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtOverlapKey1: config.StringVariable(acctest.CtResourceValue1), + acctest.CtOverlapKey2: config.StringVariable(acctest.CtResourceValue2), + }), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateIdFunc: acctest.AttrImportStateIdFunc(resourceName, names.AttrARN), + ImportStateVerify: true, + ImportStateVerifyIdentifierAttribute: names.AttrARN, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/Connection/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtOverlapKey1: config.StringVariable(acctest.CtProviderValue1), + }), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtOverlapKey1: config.StringVariable(acctest.CtResourceValue2), + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckConnectionExists(ctx, resourceName), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtOverlapKey1: knownvalue.StringExact(acctest.CtResourceValue2), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtOverlapKey1: knownvalue.StringExact(acctest.CtResourceValue2), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtOverlapKey1: knownvalue.StringExact(acctest.CtResourceValue2), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtOverlapKey1: knownvalue.StringExact(acctest.CtResourceValue2), + })), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/Connection/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtOverlapKey1: config.StringVariable(acctest.CtProviderValue1), + }), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtOverlapKey1: config.StringVariable(acctest.CtResourceValue2), + }), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateIdFunc: acctest.AttrImportStateIdFunc(resourceName, names.AttrARN), + ImportStateVerify: true, + ImportStateVerifyIdentifierAttribute: names.AttrARN, + }, + }, + }) +} + +func testAccNetworkManagerConnection_tags_DefaultTags_updateToProviderOnly(t *testing.T) { + ctx := acctest.Context(t) + resourceName := "aws_networkmanager_connection.test" + + acctest.Test(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckConnectionDestroy(ctx), + Steps: []resource.TestStep{ + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/Connection/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckConnectionExists(ctx, resourceName), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/Connection/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + acctest.CtResourceTags: nil, + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckConnectionExists(ctx, resourceName), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{})), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{})), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/Connection/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + acctest.CtResourceTags: nil, + }, + ResourceName: resourceName, + ImportState: true, + ImportStateIdFunc: acctest.AttrImportStateIdFunc(resourceName, names.AttrARN), + ImportStateVerify: true, + ImportStateVerifyIdentifierAttribute: names.AttrARN, + }, + }, + }) +} + +func testAccNetworkManagerConnection_tags_DefaultTags_updateToResourceOnly(t *testing.T) { + ctx := acctest.Context(t) + resourceName := "aws_networkmanager_connection.test" + + acctest.Test(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckConnectionDestroy(ctx), + Steps: []resource.TestStep{ + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/Connection/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + acctest.CtResourceTags: nil, + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckConnectionExists(ctx, resourceName), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.Null()), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.Null()), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/Connection/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckConnectionExists(ctx, resourceName), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionNoop), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/Connection/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateIdFunc: acctest.AttrImportStateIdFunc(resourceName, names.AttrARN), + ImportStateVerify: true, + ImportStateVerifyIdentifierAttribute: names.AttrARN, + }, + }, + }) +} + +func testAccNetworkManagerConnection_tags_DefaultTags_emptyResourceTag(t *testing.T) { + t.Skip("Resource Connection does not support empty tags") + + ctx := acctest.Context(t) + resourceName := "aws_networkmanager_connection.test" + + acctest.Test(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckConnectionDestroy(ctx), + Steps: []resource.TestStep{ + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/Connection/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(""), + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckConnectionExists(ctx, resourceName), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(""), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(""), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(""), + })), + // TODO: Should be known + plancheck.ExpectUnknownValue(resourceName, tfjsonpath.New(names.AttrTagsAll)), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/Connection/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(""), + }), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateIdFunc: acctest.AttrImportStateIdFunc(resourceName, names.AttrARN), + ImportStateVerify: true, + ImportStateVerifyIdentifierAttribute: names.AttrARN, + }, + }, + }) +} + +func testAccNetworkManagerConnection_tags_DefaultTags_emptyProviderOnlyTag(t *testing.T) { + t.Skip("Resource Connection does not support empty tags") + + ctx := acctest.Context(t) + resourceName := "aws_networkmanager_connection.test" + + acctest.Test(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckConnectionDestroy(ctx), + Steps: []resource.TestStep{ + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/Connection/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(""), + }), + acctest.CtResourceTags: nil, + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckConnectionExists(ctx, resourceName), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.Null()), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(""), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.Null()), + // TODO: Should be known + plancheck.ExpectUnknownValue(resourceName, tfjsonpath.New(names.AttrTagsAll)), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/Connection/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(""), + }), + acctest.CtResourceTags: nil, + }, + ResourceName: resourceName, + ImportState: true, + ImportStateIdFunc: acctest.AttrImportStateIdFunc(resourceName, names.AttrARN), + ImportStateVerify: true, + ImportStateVerifyIdentifierAttribute: names.AttrARN, + }, + }, + }) +} + +func testAccNetworkManagerConnection_tags_DefaultTags_nullOverlappingResourceTag(t *testing.T) { + ctx := acctest.Context(t) + resourceName := "aws_networkmanager_connection.test" + + acctest.Test(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckConnectionDestroy(ctx), + Steps: []resource.TestStep{ + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/Connection/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtProviderValue1), + }), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: nil, + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckConnectionExists(ctx, resourceName), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.Null()), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtProviderValue1), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.Null()), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtProviderValue1), + })), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/Connection/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtProviderValue1), + }), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: nil, + }), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateIdFunc: acctest.AttrImportStateIdFunc(resourceName, names.AttrARN), + ImportStateVerify: true, + ImportStateVerifyIdentifierAttribute: names.AttrARN, + }, + }, + }) +} + +func testAccNetworkManagerConnection_tags_DefaultTags_nullNonOverlappingResourceTag(t *testing.T) { + ctx := acctest.Context(t) + resourceName := "aws_networkmanager_connection.test" + + acctest.Test(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckConnectionDestroy(ctx), + Steps: []resource.TestStep{ + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/Connection/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtProviderKey1: config.StringVariable(acctest.CtProviderValue1), + }), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtResourceKey1: nil, + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckConnectionExists(ctx, resourceName), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.Null()), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtProviderKey1: knownvalue.StringExact(acctest.CtProviderValue1), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.Null()), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtProviderKey1: knownvalue.StringExact(acctest.CtProviderValue1), + })), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/Connection/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtProviderKey1: config.StringVariable(acctest.CtProviderValue1), + }), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtResourceKey1: nil, + }), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateIdFunc: acctest.AttrImportStateIdFunc(resourceName, names.AttrARN), + ImportStateVerify: true, + ImportStateVerifyIdentifierAttribute: names.AttrARN, + }, + }, + }) +} + +func testAccNetworkManagerConnection_tags_ComputedTag_OnCreate(t *testing.T) { + ctx := acctest.Context(t) + resourceName := "aws_networkmanager_connection.test" + + acctest.Test(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckConnectionDestroy(ctx), + Steps: []resource.TestStep{ + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/Connection/tagsComputed1/"), + ConfigVariables: config.Variables{ + "unknownTagKey": config.StringVariable("computedkey1"), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckConnectionExists(ctx, resourceName), + resource.TestCheckResourceAttrPair(resourceName, "tags.computedkey1", "null_resource.test", names.AttrID), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapSizeExact(1)), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapSizeExact(1)), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectUnknownValue(resourceName, tfjsonpath.New(names.AttrTags)), + plancheck.ExpectUnknownValue(resourceName, tfjsonpath.New(names.AttrTagsAll)), + }, + PostApplyPreRefresh: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionNoop), + }, + PostApplyPostRefresh: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionNoop), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/Connection/tagsComputed1/"), + ConfigVariables: config.Variables{ + "unknownTagKey": config.StringVariable("computedkey1"), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateIdFunc: acctest.AttrImportStateIdFunc(resourceName, names.AttrARN), + ImportStateVerify: true, + ImportStateVerifyIdentifierAttribute: names.AttrARN, + }, + }, + }) +} + +func testAccNetworkManagerConnection_tags_ComputedTag_OnUpdate_Add(t *testing.T) { + ctx := acctest.Context(t) + resourceName := "aws_networkmanager_connection.test" + + acctest.Test(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckConnectionDestroy(ctx), + Steps: []resource.TestStep{ + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/Connection/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckConnectionExists(ctx, resourceName), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/Connection/tagsComputed2/"), + ConfigVariables: config.Variables{ + "unknownTagKey": config.StringVariable("computedkey1"), + "knownTagKey": config.StringVariable(acctest.CtKey1), + "knownTagValue": config.StringVariable(acctest.CtValue1), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckConnectionExists(ctx, resourceName), + resource.TestCheckResourceAttrPair(resourceName, "tags.computedkey1", "null_resource.test", names.AttrID), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapSizeExact(2)), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapPartial(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapSizeExact(2)), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapPartial(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectUnknownValue(resourceName, tfjsonpath.New(names.AttrTags)), + plancheck.ExpectUnknownValue(resourceName, tfjsonpath.New(names.AttrTagsAll)), + }, + PostApplyPreRefresh: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionNoop), + }, + PostApplyPostRefresh: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionNoop), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/Connection/tagsComputed2/"), + ConfigVariables: config.Variables{ + "unknownTagKey": config.StringVariable("computedkey1"), + "knownTagKey": config.StringVariable(acctest.CtKey1), + "knownTagValue": config.StringVariable(acctest.CtValue1), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateIdFunc: acctest.AttrImportStateIdFunc(resourceName, names.AttrARN), + ImportStateVerify: true, + ImportStateVerifyIdentifierAttribute: names.AttrARN, + }, + }, + }) +} + +func testAccNetworkManagerConnection_tags_ComputedTag_OnUpdate_Replace(t *testing.T) { + ctx := acctest.Context(t) + resourceName := "aws_networkmanager_connection.test" + + acctest.Test(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckConnectionDestroy(ctx), + Steps: []resource.TestStep{ + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/Connection/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckConnectionExists(ctx, resourceName), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/Connection/tagsComputed1/"), + ConfigVariables: config.Variables{ + "unknownTagKey": config.StringVariable(acctest.CtKey1), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckConnectionExists(ctx, resourceName), + resource.TestCheckResourceAttrPair(resourceName, acctest.CtTagsKey1, "null_resource.test", names.AttrID), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapSizeExact(1)), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapSizeExact(1)), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectUnknownValue(resourceName, tfjsonpath.New(names.AttrTags)), + plancheck.ExpectUnknownValue(resourceName, tfjsonpath.New(names.AttrTagsAll)), + }, + PostApplyPreRefresh: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionNoop), + }, + PostApplyPostRefresh: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionNoop), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/Connection/tagsComputed1/"), + ConfigVariables: config.Variables{ + "unknownTagKey": config.StringVariable(acctest.CtKey1), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateIdFunc: acctest.AttrImportStateIdFunc(resourceName, names.AttrARN), + ImportStateVerify: true, + ImportStateVerifyIdentifierAttribute: names.AttrARN, + }, + }, + }) +} + +func testAccNetworkManagerConnection_tags_IgnoreTags_Overlap_DefaultTag(t *testing.T) { + ctx := acctest.Context(t) + resourceName := "aws_networkmanager_connection.test" + + acctest.Test(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckConnectionDestroy(ctx), + Steps: []resource.TestStep{ + // 1: Create + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/Connection/tags_ignore/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtProviderKey1: config.StringVariable(acctest.CtProviderValue1), + }), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtResourceKey1: config.StringVariable(acctest.CtResourceValue1), + }), + "ignore_tag_keys": config.SetVariable( + config.StringVariable(acctest.CtProviderKey1), + ), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckConnectionExists(ctx, resourceName), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), + })), + expectFullResourceTags(ctx, resourceName, knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtProviderKey1: knownvalue.StringExact(acctest.CtProviderValue1), // TODO: Should not be set + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), + })), + }, + PostApplyPreRefresh: []plancheck.PlanCheck{ + plancheck.ExpectEmptyPlan(), + }, + PostApplyPostRefresh: []plancheck.PlanCheck{ + plancheck.ExpectEmptyPlan(), + }, + }, + }, + // 2: Update ignored tag only + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/Connection/tags_ignore/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtProviderKey1: config.StringVariable(acctest.CtProviderValue1Updated), + }), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtResourceKey1: config.StringVariable(acctest.CtResourceValue1), + }), + "ignore_tag_keys": config.SetVariable( + config.StringVariable(acctest.CtProviderKey1), + ), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckConnectionExists(ctx, resourceName), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), + })), + expectFullResourceTags(ctx, resourceName, knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtProviderKey1: knownvalue.StringExact(acctest.CtProviderValue1), // TODO: Should not be set + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionNoop), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), + })), + }, + PostApplyPreRefresh: []plancheck.PlanCheck{ + plancheck.ExpectEmptyPlan(), + }, + PostApplyPostRefresh: []plancheck.PlanCheck{ + plancheck.ExpectEmptyPlan(), + }, + }, + }, + // 3: Update both tags + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/Connection/tags_ignore/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtProviderKey1: config.StringVariable(acctest.CtProviderValue1Again), + }), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtResourceKey1: config.StringVariable(acctest.CtResourceValue1Updated), + }), + "ignore_tag_keys": config.SetVariable( + config.StringVariable(acctest.CtProviderKey1), + ), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckConnectionExists(ctx, resourceName), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1Updated), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1Updated), + })), + expectFullResourceTags(ctx, resourceName, knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtProviderKey1: knownvalue.StringExact(acctest.CtProviderValue1), // TODO: Should not be set + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1Updated), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1Updated), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1Updated), + })), + }, + PostApplyPreRefresh: []plancheck.PlanCheck{ + plancheck.ExpectEmptyPlan(), + }, + PostApplyPostRefresh: []plancheck.PlanCheck{ + plancheck.ExpectEmptyPlan(), + }, + }, + }, + }, + }) +} + +func testAccNetworkManagerConnection_tags_IgnoreTags_Overlap_ResourceTag(t *testing.T) { + ctx := acctest.Context(t) + resourceName := "aws_networkmanager_connection.test" + + acctest.Test(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckConnectionDestroy(ctx), + Steps: []resource.TestStep{ + // 1: Create + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/Connection/tags_ignore/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtResourceKey1: config.StringVariable(acctest.CtResourceValue1), + acctest.CtResourceKey2: config.StringVariable(acctest.CtResourceValue2), + }), + "ignore_tag_keys": config.SetVariable( + config.StringVariable(acctest.CtResourceKey1), + ), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckConnectionExists(ctx, resourceName), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + expectFullResourceTags(ctx, resourceName, knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), // TODO: Should not be set + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + }, + PostApplyPreRefresh: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + }, + PostApplyPostRefresh: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + }, + }, + ExpectNonEmptyPlan: true, + }, + // 2: Update ignored tag + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/Connection/tags_ignore/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtResourceKey1: config.StringVariable(acctest.CtResourceValue1Updated), + acctest.CtResourceKey2: config.StringVariable(acctest.CtResourceValue2), + }), + "ignore_tag_keys": config.SetVariable( + config.StringVariable(acctest.CtResourceKey1), + ), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckConnectionExists(ctx, resourceName), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + expectFullResourceTags(ctx, resourceName, knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), // TODO: Should not be set + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1Updated), + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + }, + PostApplyPreRefresh: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1Updated), + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + }, + PostApplyPostRefresh: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1Updated), + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + }, + }, + ExpectNonEmptyPlan: true, + }, + // 3: Update both tags + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/Connection/tags_ignore/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtResourceKey1: config.StringVariable(acctest.CtResourceValue1Again), + acctest.CtResourceKey2: config.StringVariable(acctest.CtResourceValue2Updated), + }), + "ignore_tag_keys": config.SetVariable( + config.StringVariable(acctest.CtResourceKey1), + ), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckConnectionExists(ctx, resourceName), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2Updated), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2Updated), + })), + expectFullResourceTags(ctx, resourceName, knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), // TODO: Should not be set + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2Updated), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1Again), + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2Updated), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2Updated), + })), + }, + PostApplyPreRefresh: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1Again), + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2Updated), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2Updated), + })), + }, + PostApplyPostRefresh: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1Again), + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2Updated), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2Updated), + })), + }, + }, + ExpectNonEmptyPlan: true, + }, + }, + }) +} diff --git a/internal/service/networkmanager/connection_test.go b/internal/service/networkmanager/connection_test.go index f8e76f2e78ca..1579606918db 100644 --- a/internal/service/networkmanager/connection_test.go +++ b/internal/service/networkmanager/connection_test.go @@ -24,7 +24,7 @@ func TestAccNetworkManagerConnection_serial(t *testing.T) { testCases := map[string]func(t *testing.T){ acctest.CtBasic: testAccConnection_basic, acctest.CtDisappears: testAccConnection_disappears, - "tags": testAccConnection_tags, + "tags": testAccNetworkManagerConnection_tagsSerial, "descriptionAndLinks": testAccConnection_descriptionAndLinks, } diff --git a/internal/service/networkmanager/testdata/Connection/tags/main_gen.tf b/internal/service/networkmanager/testdata/Connection/tags/main_gen.tf new file mode 100644 index 000000000000..151e61c5bd79 --- /dev/null +++ b/internal/service/networkmanager/testdata/Connection/tags/main_gen.tf @@ -0,0 +1,38 @@ +# Copyright (c) HashiCorp, Inc. +# SPDX-License-Identifier: MPL-2.0 + +resource "aws_networkmanager_connection" "test" { + global_network_id = aws_networkmanager_global_network.test.id + device_id = aws_networkmanager_device.test1.id + connected_device_id = aws_networkmanager_device.test2.id + + tags = var.resource_tags +} + +# testAccConnectionBaseConfig + +resource "aws_networkmanager_global_network" "test" {} + +resource "aws_networkmanager_site" "test" { + global_network_id = aws_networkmanager_global_network.test.id +} + +resource "aws_networkmanager_device" "test1" { + global_network_id = aws_networkmanager_global_network.test.id + site_id = aws_networkmanager_site.test.id +} + +resource "aws_networkmanager_device" "test2" { + global_network_id = aws_networkmanager_global_network.test.id + site_id = aws_networkmanager_site.test.id + + # Create one device at a time. + depends_on = [aws_networkmanager_device.test1] +} + +variable "resource_tags" { + description = "Tags to set on resource. To specify no tags, set to `null`" + # Not setting a default, so that this must explicitly be set to `null` to specify no tags + type = map(string) + nullable = true +} diff --git a/internal/service/networkmanager/testdata/Connection/tagsComputed1/main_gen.tf b/internal/service/networkmanager/testdata/Connection/tagsComputed1/main_gen.tf new file mode 100644 index 000000000000..359ac72f5292 --- /dev/null +++ b/internal/service/networkmanager/testdata/Connection/tagsComputed1/main_gen.tf @@ -0,0 +1,42 @@ +# Copyright (c) HashiCorp, Inc. +# SPDX-License-Identifier: MPL-2.0 + +provider "null" {} + +resource "aws_networkmanager_connection" "test" { + global_network_id = aws_networkmanager_global_network.test.id + device_id = aws_networkmanager_device.test1.id + connected_device_id = aws_networkmanager_device.test2.id + + tags = { + (var.unknownTagKey) = null_resource.test.id + } +} + +# testAccConnectionBaseConfig + +resource "aws_networkmanager_global_network" "test" {} + +resource "aws_networkmanager_site" "test" { + global_network_id = aws_networkmanager_global_network.test.id +} + +resource "aws_networkmanager_device" "test1" { + global_network_id = aws_networkmanager_global_network.test.id + site_id = aws_networkmanager_site.test.id +} + +resource "aws_networkmanager_device" "test2" { + global_network_id = aws_networkmanager_global_network.test.id + site_id = aws_networkmanager_site.test.id + + # Create one device at a time. + depends_on = [aws_networkmanager_device.test1] +} + +resource "null_resource" "test" {} + +variable "unknownTagKey" { + type = string + nullable = false +} diff --git a/internal/service/networkmanager/testdata/Connection/tagsComputed2/main_gen.tf b/internal/service/networkmanager/testdata/Connection/tagsComputed2/main_gen.tf new file mode 100644 index 000000000000..5155225f88d5 --- /dev/null +++ b/internal/service/networkmanager/testdata/Connection/tagsComputed2/main_gen.tf @@ -0,0 +1,53 @@ +# Copyright (c) HashiCorp, Inc. +# SPDX-License-Identifier: MPL-2.0 + +provider "null" {} + +resource "aws_networkmanager_connection" "test" { + global_network_id = aws_networkmanager_global_network.test.id + device_id = aws_networkmanager_device.test1.id + connected_device_id = aws_networkmanager_device.test2.id + + tags = { + (var.unknownTagKey) = null_resource.test.id + (var.knownTagKey) = var.knownTagValue + } +} + +# testAccConnectionBaseConfig + +resource "aws_networkmanager_global_network" "test" {} + +resource "aws_networkmanager_site" "test" { + global_network_id = aws_networkmanager_global_network.test.id +} + +resource "aws_networkmanager_device" "test1" { + global_network_id = aws_networkmanager_global_network.test.id + site_id = aws_networkmanager_site.test.id +} + +resource "aws_networkmanager_device" "test2" { + global_network_id = aws_networkmanager_global_network.test.id + site_id = aws_networkmanager_site.test.id + + # Create one device at a time. + depends_on = [aws_networkmanager_device.test1] +} + +resource "null_resource" "test" {} + +variable "unknownTagKey" { + type = string + nullable = false +} + +variable "knownTagKey" { + type = string + nullable = false +} + +variable "knownTagValue" { + type = string + nullable = false +} diff --git a/internal/service/networkmanager/testdata/Connection/tags_defaults/main_gen.tf b/internal/service/networkmanager/testdata/Connection/tags_defaults/main_gen.tf new file mode 100644 index 000000000000..df984cac49e5 --- /dev/null +++ b/internal/service/networkmanager/testdata/Connection/tags_defaults/main_gen.tf @@ -0,0 +1,49 @@ +# Copyright (c) HashiCorp, Inc. +# SPDX-License-Identifier: MPL-2.0 + +provider "aws" { + default_tags { + tags = var.provider_tags + } +} + +resource "aws_networkmanager_connection" "test" { + global_network_id = aws_networkmanager_global_network.test.id + device_id = aws_networkmanager_device.test1.id + connected_device_id = aws_networkmanager_device.test2.id + + tags = var.resource_tags +} + +# testAccConnectionBaseConfig + +resource "aws_networkmanager_global_network" "test" {} + +resource "aws_networkmanager_site" "test" { + global_network_id = aws_networkmanager_global_network.test.id +} + +resource "aws_networkmanager_device" "test1" { + global_network_id = aws_networkmanager_global_network.test.id + site_id = aws_networkmanager_site.test.id +} + +resource "aws_networkmanager_device" "test2" { + global_network_id = aws_networkmanager_global_network.test.id + site_id = aws_networkmanager_site.test.id + + # Create one device at a time. + depends_on = [aws_networkmanager_device.test1] +} + +variable "resource_tags" { + description = "Tags to set on resource. To specify no tags, set to `null`" + # Not setting a default, so that this must explicitly be set to `null` to specify no tags + type = map(string) + nullable = true +} + +variable "provider_tags" { + type = map(string) + nullable = false +} diff --git a/internal/service/networkmanager/testdata/Connection/tags_ignore/main_gen.tf b/internal/service/networkmanager/testdata/Connection/tags_ignore/main_gen.tf new file mode 100644 index 000000000000..cc8ebc044605 --- /dev/null +++ b/internal/service/networkmanager/testdata/Connection/tags_ignore/main_gen.tf @@ -0,0 +1,58 @@ +# Copyright (c) HashiCorp, Inc. +# SPDX-License-Identifier: MPL-2.0 + +provider "aws" { + default_tags { + tags = var.provider_tags + } + ignore_tags { + keys = var.ignore_tag_keys + } +} + +resource "aws_networkmanager_connection" "test" { + global_network_id = aws_networkmanager_global_network.test.id + device_id = aws_networkmanager_device.test1.id + connected_device_id = aws_networkmanager_device.test2.id + + tags = var.resource_tags +} + +# testAccConnectionBaseConfig + +resource "aws_networkmanager_global_network" "test" {} + +resource "aws_networkmanager_site" "test" { + global_network_id = aws_networkmanager_global_network.test.id +} + +resource "aws_networkmanager_device" "test1" { + global_network_id = aws_networkmanager_global_network.test.id + site_id = aws_networkmanager_site.test.id +} + +resource "aws_networkmanager_device" "test2" { + global_network_id = aws_networkmanager_global_network.test.id + site_id = aws_networkmanager_site.test.id + + # Create one device at a time. + depends_on = [aws_networkmanager_device.test1] +} + +variable "resource_tags" { + description = "Tags to set on resource. To specify no tags, set to `null`" + # Not setting a default, so that this must explicitly be set to `null` to specify no tags + type = map(string) + nullable = true +} + +variable "provider_tags" { + type = map(string) + nullable = true + default = null +} + +variable "ignore_tag_keys" { + type = set(string) + nullable = false +} diff --git a/internal/service/networkmanager/testdata/tmpl/connection_tags.gtpl b/internal/service/networkmanager/testdata/tmpl/connection_tags.gtpl new file mode 100644 index 000000000000..1b7ec789b400 --- /dev/null +++ b/internal/service/networkmanager/testdata/tmpl/connection_tags.gtpl @@ -0,0 +1,27 @@ +resource "aws_networkmanager_connection" "test" { + global_network_id = aws_networkmanager_global_network.test.id + device_id = aws_networkmanager_device.test1.id + connected_device_id = aws_networkmanager_device.test2.id +{{- template "tags" . }} +} + +# testAccConnectionBaseConfig + +resource "aws_networkmanager_global_network" "test" {} + +resource "aws_networkmanager_site" "test" { + global_network_id = aws_networkmanager_global_network.test.id +} + +resource "aws_networkmanager_device" "test1" { + global_network_id = aws_networkmanager_global_network.test.id + site_id = aws_networkmanager_site.test.id +} + +resource "aws_networkmanager_device" "test2" { + global_network_id = aws_networkmanager_global_network.test.id + site_id = aws_networkmanager_site.test.id + + # Create one device at a time. + depends_on = [aws_networkmanager_device.test1] +} From db51bd38ea3f093a9629f997e0fbe5178882bc43 Mon Sep 17 00:00:00 2001 From: Graham Davison Date: Mon, 28 Jul 2025 11:26:52 -0700 Subject: [PATCH 044/365] Tweaks formatting --- internal/acctest/configs.go | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/internal/acctest/configs.go b/internal/acctest/configs.go index 3a0ceaa0ad0f..f5f000e0a245 100644 --- a/internal/acctest/configs.go +++ b/internal/acctest/configs.go @@ -523,9 +523,11 @@ resource "aws_vpc" "vpc_for_lambda" { resource "aws_subnet" "subnet_for_lambda" { vpc_id = aws_vpc.vpc_for_lambda.id - cidr_block = cidrsubnet(aws_vpc.vpc_for_lambda.cidr_block, 8, 1) availability_zone = data.aws_availability_zones.available.names[1] - ipv6_cidr_block = cidrsubnet(aws_vpc.vpc_for_lambda.ipv6_cidr_block, 8, 1) + + cidr_block = cidrsubnet(aws_vpc.vpc_for_lambda.cidr_block, 8, 1) + ipv6_cidr_block = cidrsubnet(aws_vpc.vpc_for_lambda.ipv6_cidr_block, 8, 1) + assign_ipv6_address_on_creation = true tags = { @@ -537,9 +539,11 @@ resource "aws_subnet" "subnet_for_lambda" { # prevent a timeout issue when fully removing Lambda Filesystems resource "aws_subnet" "subnet_for_lambda_az2" { vpc_id = aws_vpc.vpc_for_lambda.id - cidr_block = cidrsubnet(aws_vpc.vpc_for_lambda.cidr_block, 8, 2) availability_zone = data.aws_availability_zones.available.names[1] - ipv6_cidr_block = cidrsubnet(aws_vpc.vpc_for_lambda.ipv6_cidr_block, 8, 2) + + cidr_block = cidrsubnet(aws_vpc.vpc_for_lambda.cidr_block, 8, 2) + ipv6_cidr_block = cidrsubnet(aws_vpc.vpc_for_lambda.ipv6_cidr_block, 8, 2) + assign_ipv6_address_on_creation = true tags = { @@ -670,9 +674,10 @@ resource "aws_subnet" "test" { vpc_id = aws_vpc.test.id availability_zone = data.aws_availability_zones.available.names[count.index] - cidr_block = cidrsubnet(aws_vpc.test.cidr_block, 8, count.index) - ipv6_cidr_block = cidrsubnet(aws_vpc.test.ipv6_cidr_block, 8, count.index) + cidr_block = cidrsubnet(aws_vpc.test.cidr_block, 8, count.index) + ipv6_cidr_block = cidrsubnet(aws_vpc.test.ipv6_cidr_block, 8, count.index) + assign_ipv6_address_on_creation = true tags = { From 64ed88686ebe157d8cd530382835a61417a20e33 Mon Sep 17 00:00:00 2001 From: Graham Davison Date: Mon, 28 Jul 2025 11:50:53 -0700 Subject: [PATCH 045/365] `aws_networkmanager_vpc_attachment` --- .../testdata/VPCAttachment/tags/main_gen.tf | 110 + .../VPCAttachment/tagsComputed1/main_gen.tf | 114 + .../VPCAttachment/tagsComputed2/main_gen.tf | 125 + .../VPCAttachment/tags_defaults/main_gen.tf | 121 + .../VPCAttachment/tags_ignore/main_gen.tf | 130 + .../testdata/tmpl/vpc_attachment_tags.gtpl | 60 + .../service/networkmanager/vpc_attachment.go | 3 +- .../vpc_attachment_tags_gen_test.go | 2282 +++++++++++++++++ .../networkmanager/vpc_attachment_test.go | 80 +- 9 files changed, 2947 insertions(+), 78 deletions(-) create mode 100644 internal/service/networkmanager/testdata/VPCAttachment/tags/main_gen.tf create mode 100644 internal/service/networkmanager/testdata/VPCAttachment/tagsComputed1/main_gen.tf create mode 100644 internal/service/networkmanager/testdata/VPCAttachment/tagsComputed2/main_gen.tf create mode 100644 internal/service/networkmanager/testdata/VPCAttachment/tags_defaults/main_gen.tf create mode 100644 internal/service/networkmanager/testdata/VPCAttachment/tags_ignore/main_gen.tf create mode 100644 internal/service/networkmanager/testdata/tmpl/vpc_attachment_tags.gtpl create mode 100644 internal/service/networkmanager/vpc_attachment_tags_gen_test.go diff --git a/internal/service/networkmanager/testdata/VPCAttachment/tags/main_gen.tf b/internal/service/networkmanager/testdata/VPCAttachment/tags/main_gen.tf new file mode 100644 index 000000000000..d824c0e562c2 --- /dev/null +++ b/internal/service/networkmanager/testdata/VPCAttachment/tags/main_gen.tf @@ -0,0 +1,110 @@ +# Copyright (c) HashiCorp, Inc. +# SPDX-License-Identifier: MPL-2.0 + +resource "aws_networkmanager_vpc_attachment" "test" { + subnet_arns = aws_subnet.test[*].arn + core_network_id = aws_networkmanager_core_network_policy_attachment.test.core_network_id + vpc_arn = aws_vpc.test.arn + + tags = var.resource_tags +} + +# testAccVPCAttachmentConfig_base + +resource "aws_networkmanager_global_network" "test" {} + +resource "aws_networkmanager_core_network" "test" { + global_network_id = aws_networkmanager_global_network.test.id +} + +resource "aws_networkmanager_core_network_policy_attachment" "test" { + core_network_id = aws_networkmanager_core_network.test.id + policy_document = data.aws_networkmanager_core_network_policy_document.test.json +} + +data "aws_region" "current" {} + +data "aws_networkmanager_core_network_policy_document" "test" { + core_network_configuration { + vpn_ecmp_support = false + asn_ranges = ["64512-64555"] + edge_locations { + location = data.aws_region.current.region + asn = 64512 + } + } + + segments { + name = "shared" + description = "SegmentForSharedServices" + require_attachment_acceptance = true + } + + segment_actions { + action = "share" + mode = "attachment-route" + segment = "shared" + share_with = ["*"] + } + + attachment_policies { + rule_number = 1 + + conditions { + type = "any" + } + + action { + association_method = "constant" + segment = "shared" + } + } +} + +# acctest.ConfigVPCWithSubnetsIPv6(rName, 2) + +resource "aws_vpc" "test" { + cidr_block = "10.0.0.0/16" + + assign_generated_ipv6_cidr_block = true +} + +resource "aws_subnet" "test" { + count = 2 + + vpc_id = aws_vpc.test.id + availability_zone = data.aws_availability_zones.available.names[count.index] + + cidr_block = cidrsubnet(aws_vpc.test.cidr_block, 8, count.index) + ipv6_cidr_block = cidrsubnet(aws_vpc.test.ipv6_cidr_block, 8, count.index) + assign_ipv6_address_on_creation = true +} + +# acctest.ConfigAvailableAZsNoOptInDefaultExclude + +data "aws_availability_zones" "available" { + exclude_zone_ids = local.default_exclude_zone_ids + state = "available" + + filter { + name = "opt-in-status" + values = ["opt-in-not-required"] + } +} + +locals { + default_exclude_zone_ids = ["usw2-az4", "usgw1-az2"] +} + +variable "rName" { + description = "Name for resource" + type = string + nullable = false +} + +variable "resource_tags" { + description = "Tags to set on resource. To specify no tags, set to `null`" + # Not setting a default, so that this must explicitly be set to `null` to specify no tags + type = map(string) + nullable = true +} diff --git a/internal/service/networkmanager/testdata/VPCAttachment/tagsComputed1/main_gen.tf b/internal/service/networkmanager/testdata/VPCAttachment/tagsComputed1/main_gen.tf new file mode 100644 index 000000000000..6f3c76f625ee --- /dev/null +++ b/internal/service/networkmanager/testdata/VPCAttachment/tagsComputed1/main_gen.tf @@ -0,0 +1,114 @@ +# Copyright (c) HashiCorp, Inc. +# SPDX-License-Identifier: MPL-2.0 + +provider "null" {} + +resource "aws_networkmanager_vpc_attachment" "test" { + subnet_arns = aws_subnet.test[*].arn + core_network_id = aws_networkmanager_core_network_policy_attachment.test.core_network_id + vpc_arn = aws_vpc.test.arn + + tags = { + (var.unknownTagKey) = null_resource.test.id + } +} + +# testAccVPCAttachmentConfig_base + +resource "aws_networkmanager_global_network" "test" {} + +resource "aws_networkmanager_core_network" "test" { + global_network_id = aws_networkmanager_global_network.test.id +} + +resource "aws_networkmanager_core_network_policy_attachment" "test" { + core_network_id = aws_networkmanager_core_network.test.id + policy_document = data.aws_networkmanager_core_network_policy_document.test.json +} + +data "aws_region" "current" {} + +data "aws_networkmanager_core_network_policy_document" "test" { + core_network_configuration { + vpn_ecmp_support = false + asn_ranges = ["64512-64555"] + edge_locations { + location = data.aws_region.current.region + asn = 64512 + } + } + + segments { + name = "shared" + description = "SegmentForSharedServices" + require_attachment_acceptance = true + } + + segment_actions { + action = "share" + mode = "attachment-route" + segment = "shared" + share_with = ["*"] + } + + attachment_policies { + rule_number = 1 + + conditions { + type = "any" + } + + action { + association_method = "constant" + segment = "shared" + } + } +} + +# acctest.ConfigVPCWithSubnetsIPv6(rName, 2) + +resource "aws_vpc" "test" { + cidr_block = "10.0.0.0/16" + + assign_generated_ipv6_cidr_block = true +} + +resource "aws_subnet" "test" { + count = 2 + + vpc_id = aws_vpc.test.id + availability_zone = data.aws_availability_zones.available.names[count.index] + + cidr_block = cidrsubnet(aws_vpc.test.cidr_block, 8, count.index) + ipv6_cidr_block = cidrsubnet(aws_vpc.test.ipv6_cidr_block, 8, count.index) + assign_ipv6_address_on_creation = true +} + +# acctest.ConfigAvailableAZsNoOptInDefaultExclude + +data "aws_availability_zones" "available" { + exclude_zone_ids = local.default_exclude_zone_ids + state = "available" + + filter { + name = "opt-in-status" + values = ["opt-in-not-required"] + } +} + +locals { + default_exclude_zone_ids = ["usw2-az4", "usgw1-az2"] +} + +resource "null_resource" "test" {} + +variable "rName" { + description = "Name for resource" + type = string + nullable = false +} + +variable "unknownTagKey" { + type = string + nullable = false +} diff --git a/internal/service/networkmanager/testdata/VPCAttachment/tagsComputed2/main_gen.tf b/internal/service/networkmanager/testdata/VPCAttachment/tagsComputed2/main_gen.tf new file mode 100644 index 000000000000..9fa3cf32310b --- /dev/null +++ b/internal/service/networkmanager/testdata/VPCAttachment/tagsComputed2/main_gen.tf @@ -0,0 +1,125 @@ +# Copyright (c) HashiCorp, Inc. +# SPDX-License-Identifier: MPL-2.0 + +provider "null" {} + +resource "aws_networkmanager_vpc_attachment" "test" { + subnet_arns = aws_subnet.test[*].arn + core_network_id = aws_networkmanager_core_network_policy_attachment.test.core_network_id + vpc_arn = aws_vpc.test.arn + + tags = { + (var.unknownTagKey) = null_resource.test.id + (var.knownTagKey) = var.knownTagValue + } +} + +# testAccVPCAttachmentConfig_base + +resource "aws_networkmanager_global_network" "test" {} + +resource "aws_networkmanager_core_network" "test" { + global_network_id = aws_networkmanager_global_network.test.id +} + +resource "aws_networkmanager_core_network_policy_attachment" "test" { + core_network_id = aws_networkmanager_core_network.test.id + policy_document = data.aws_networkmanager_core_network_policy_document.test.json +} + +data "aws_region" "current" {} + +data "aws_networkmanager_core_network_policy_document" "test" { + core_network_configuration { + vpn_ecmp_support = false + asn_ranges = ["64512-64555"] + edge_locations { + location = data.aws_region.current.region + asn = 64512 + } + } + + segments { + name = "shared" + description = "SegmentForSharedServices" + require_attachment_acceptance = true + } + + segment_actions { + action = "share" + mode = "attachment-route" + segment = "shared" + share_with = ["*"] + } + + attachment_policies { + rule_number = 1 + + conditions { + type = "any" + } + + action { + association_method = "constant" + segment = "shared" + } + } +} + +# acctest.ConfigVPCWithSubnetsIPv6(rName, 2) + +resource "aws_vpc" "test" { + cidr_block = "10.0.0.0/16" + + assign_generated_ipv6_cidr_block = true +} + +resource "aws_subnet" "test" { + count = 2 + + vpc_id = aws_vpc.test.id + availability_zone = data.aws_availability_zones.available.names[count.index] + + cidr_block = cidrsubnet(aws_vpc.test.cidr_block, 8, count.index) + ipv6_cidr_block = cidrsubnet(aws_vpc.test.ipv6_cidr_block, 8, count.index) + assign_ipv6_address_on_creation = true +} + +# acctest.ConfigAvailableAZsNoOptInDefaultExclude + +data "aws_availability_zones" "available" { + exclude_zone_ids = local.default_exclude_zone_ids + state = "available" + + filter { + name = "opt-in-status" + values = ["opt-in-not-required"] + } +} + +locals { + default_exclude_zone_ids = ["usw2-az4", "usgw1-az2"] +} + +resource "null_resource" "test" {} + +variable "rName" { + description = "Name for resource" + type = string + nullable = false +} + +variable "unknownTagKey" { + type = string + nullable = false +} + +variable "knownTagKey" { + type = string + nullable = false +} + +variable "knownTagValue" { + type = string + nullable = false +} diff --git a/internal/service/networkmanager/testdata/VPCAttachment/tags_defaults/main_gen.tf b/internal/service/networkmanager/testdata/VPCAttachment/tags_defaults/main_gen.tf new file mode 100644 index 000000000000..30b41e0247c0 --- /dev/null +++ b/internal/service/networkmanager/testdata/VPCAttachment/tags_defaults/main_gen.tf @@ -0,0 +1,121 @@ +# Copyright (c) HashiCorp, Inc. +# SPDX-License-Identifier: MPL-2.0 + +provider "aws" { + default_tags { + tags = var.provider_tags + } +} + +resource "aws_networkmanager_vpc_attachment" "test" { + subnet_arns = aws_subnet.test[*].arn + core_network_id = aws_networkmanager_core_network_policy_attachment.test.core_network_id + vpc_arn = aws_vpc.test.arn + + tags = var.resource_tags +} + +# testAccVPCAttachmentConfig_base + +resource "aws_networkmanager_global_network" "test" {} + +resource "aws_networkmanager_core_network" "test" { + global_network_id = aws_networkmanager_global_network.test.id +} + +resource "aws_networkmanager_core_network_policy_attachment" "test" { + core_network_id = aws_networkmanager_core_network.test.id + policy_document = data.aws_networkmanager_core_network_policy_document.test.json +} + +data "aws_region" "current" {} + +data "aws_networkmanager_core_network_policy_document" "test" { + core_network_configuration { + vpn_ecmp_support = false + asn_ranges = ["64512-64555"] + edge_locations { + location = data.aws_region.current.region + asn = 64512 + } + } + + segments { + name = "shared" + description = "SegmentForSharedServices" + require_attachment_acceptance = true + } + + segment_actions { + action = "share" + mode = "attachment-route" + segment = "shared" + share_with = ["*"] + } + + attachment_policies { + rule_number = 1 + + conditions { + type = "any" + } + + action { + association_method = "constant" + segment = "shared" + } + } +} + +# acctest.ConfigVPCWithSubnetsIPv6(rName, 2) + +resource "aws_vpc" "test" { + cidr_block = "10.0.0.0/16" + + assign_generated_ipv6_cidr_block = true +} + +resource "aws_subnet" "test" { + count = 2 + + vpc_id = aws_vpc.test.id + availability_zone = data.aws_availability_zones.available.names[count.index] + + cidr_block = cidrsubnet(aws_vpc.test.cidr_block, 8, count.index) + ipv6_cidr_block = cidrsubnet(aws_vpc.test.ipv6_cidr_block, 8, count.index) + assign_ipv6_address_on_creation = true +} + +# acctest.ConfigAvailableAZsNoOptInDefaultExclude + +data "aws_availability_zones" "available" { + exclude_zone_ids = local.default_exclude_zone_ids + state = "available" + + filter { + name = "opt-in-status" + values = ["opt-in-not-required"] + } +} + +locals { + default_exclude_zone_ids = ["usw2-az4", "usgw1-az2"] +} + +variable "rName" { + description = "Name for resource" + type = string + nullable = false +} + +variable "resource_tags" { + description = "Tags to set on resource. To specify no tags, set to `null`" + # Not setting a default, so that this must explicitly be set to `null` to specify no tags + type = map(string) + nullable = true +} + +variable "provider_tags" { + type = map(string) + nullable = false +} diff --git a/internal/service/networkmanager/testdata/VPCAttachment/tags_ignore/main_gen.tf b/internal/service/networkmanager/testdata/VPCAttachment/tags_ignore/main_gen.tf new file mode 100644 index 000000000000..eae261d8734d --- /dev/null +++ b/internal/service/networkmanager/testdata/VPCAttachment/tags_ignore/main_gen.tf @@ -0,0 +1,130 @@ +# Copyright (c) HashiCorp, Inc. +# SPDX-License-Identifier: MPL-2.0 + +provider "aws" { + default_tags { + tags = var.provider_tags + } + ignore_tags { + keys = var.ignore_tag_keys + } +} + +resource "aws_networkmanager_vpc_attachment" "test" { + subnet_arns = aws_subnet.test[*].arn + core_network_id = aws_networkmanager_core_network_policy_attachment.test.core_network_id + vpc_arn = aws_vpc.test.arn + + tags = var.resource_tags +} + +# testAccVPCAttachmentConfig_base + +resource "aws_networkmanager_global_network" "test" {} + +resource "aws_networkmanager_core_network" "test" { + global_network_id = aws_networkmanager_global_network.test.id +} + +resource "aws_networkmanager_core_network_policy_attachment" "test" { + core_network_id = aws_networkmanager_core_network.test.id + policy_document = data.aws_networkmanager_core_network_policy_document.test.json +} + +data "aws_region" "current" {} + +data "aws_networkmanager_core_network_policy_document" "test" { + core_network_configuration { + vpn_ecmp_support = false + asn_ranges = ["64512-64555"] + edge_locations { + location = data.aws_region.current.region + asn = 64512 + } + } + + segments { + name = "shared" + description = "SegmentForSharedServices" + require_attachment_acceptance = true + } + + segment_actions { + action = "share" + mode = "attachment-route" + segment = "shared" + share_with = ["*"] + } + + attachment_policies { + rule_number = 1 + + conditions { + type = "any" + } + + action { + association_method = "constant" + segment = "shared" + } + } +} + +# acctest.ConfigVPCWithSubnetsIPv6(rName, 2) + +resource "aws_vpc" "test" { + cidr_block = "10.0.0.0/16" + + assign_generated_ipv6_cidr_block = true +} + +resource "aws_subnet" "test" { + count = 2 + + vpc_id = aws_vpc.test.id + availability_zone = data.aws_availability_zones.available.names[count.index] + + cidr_block = cidrsubnet(aws_vpc.test.cidr_block, 8, count.index) + ipv6_cidr_block = cidrsubnet(aws_vpc.test.ipv6_cidr_block, 8, count.index) + assign_ipv6_address_on_creation = true +} + +# acctest.ConfigAvailableAZsNoOptInDefaultExclude + +data "aws_availability_zones" "available" { + exclude_zone_ids = local.default_exclude_zone_ids + state = "available" + + filter { + name = "opt-in-status" + values = ["opt-in-not-required"] + } +} + +locals { + default_exclude_zone_ids = ["usw2-az4", "usgw1-az2"] +} + +variable "rName" { + description = "Name for resource" + type = string + nullable = false +} + +variable "resource_tags" { + description = "Tags to set on resource. To specify no tags, set to `null`" + # Not setting a default, so that this must explicitly be set to `null` to specify no tags + type = map(string) + nullable = true +} + +variable "provider_tags" { + type = map(string) + nullable = true + default = null +} + +variable "ignore_tag_keys" { + type = set(string) + nullable = false +} diff --git a/internal/service/networkmanager/testdata/tmpl/vpc_attachment_tags.gtpl b/internal/service/networkmanager/testdata/tmpl/vpc_attachment_tags.gtpl new file mode 100644 index 000000000000..cec8471c2f3b --- /dev/null +++ b/internal/service/networkmanager/testdata/tmpl/vpc_attachment_tags.gtpl @@ -0,0 +1,60 @@ +resource "aws_networkmanager_vpc_attachment" "test" { + subnet_arns = aws_subnet.test[*].arn + core_network_id = aws_networkmanager_core_network_policy_attachment.test.core_network_id + vpc_arn = aws_vpc.test.arn +{{- template "tags" . }} +} + +# testAccVPCAttachmentConfig_base + +resource "aws_networkmanager_global_network" "test" {} + +resource "aws_networkmanager_core_network" "test" { + global_network_id = aws_networkmanager_global_network.test.id +} + +resource "aws_networkmanager_core_network_policy_attachment" "test" { + core_network_id = aws_networkmanager_core_network.test.id + policy_document = data.aws_networkmanager_core_network_policy_document.test.json +} + +data "aws_region" "current" {} + +data "aws_networkmanager_core_network_policy_document" "test" { + core_network_configuration { + vpn_ecmp_support = false + asn_ranges = ["64512-64555"] + edge_locations { + location = data.aws_region.current.region + asn = 64512 + } + } + + segments { + name = "shared" + description = "SegmentForSharedServices" + require_attachment_acceptance = true + } + + segment_actions { + action = "share" + mode = "attachment-route" + segment = "shared" + share_with = ["*"] + } + + attachment_policies { + rule_number = 1 + + conditions { + type = "any" + } + + action { + association_method = "constant" + segment = "shared" + } + } +} + +{{ template "acctest.ConfigVPCWithSubnetsIPv6" 2 }} diff --git a/internal/service/networkmanager/vpc_attachment.go b/internal/service/networkmanager/vpc_attachment.go index 44a960dbf656..182dcad7f118 100644 --- a/internal/service/networkmanager/vpc_attachment.go +++ b/internal/service/networkmanager/vpc_attachment.go @@ -28,7 +28,8 @@ import ( // @SDKResource("aws_networkmanager_vpc_attachment", name="VPC Attachment") // @Tags(identifierAttribute="arn") -// @Testing(tagsTest=false) +// @Testing(existsType="github.com/aws/aws-sdk-go-v2/service/networkmanager/types;awstypes;awstypes.VpcAttachment") +// @Testing(skipEmptyTags=true) func resourceVPCAttachment() *schema.Resource { return &schema.Resource{ CreateWithoutTimeout: resourceVPCAttachmentCreate, diff --git a/internal/service/networkmanager/vpc_attachment_tags_gen_test.go b/internal/service/networkmanager/vpc_attachment_tags_gen_test.go new file mode 100644 index 000000000000..9cef57891731 --- /dev/null +++ b/internal/service/networkmanager/vpc_attachment_tags_gen_test.go @@ -0,0 +1,2282 @@ +// Code generated by internal/generate/tagstests/main.go; DO NOT EDIT. + +package networkmanager_test + +import ( + "testing" + + awstypes "github.com/aws/aws-sdk-go-v2/service/networkmanager/types" + "github.com/hashicorp/terraform-plugin-testing/config" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/knownvalue" + "github.com/hashicorp/terraform-plugin-testing/plancheck" + "github.com/hashicorp/terraform-plugin-testing/statecheck" + "github.com/hashicorp/terraform-plugin-testing/tfjsonpath" + "github.com/hashicorp/terraform-provider-aws/internal/acctest" + "github.com/hashicorp/terraform-provider-aws/names" +) + +func TestAccNetworkManagerVPCAttachment_tags(t *testing.T) { + ctx := acctest.Context(t) + var v awstypes.VpcAttachment + resourceName := "aws_networkmanager_vpc_attachment.test" + rName := acctest.RandomWithPrefix(t, acctest.ResourcePrefix) + + acctest.ParallelTest(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckVPCAttachmentDestroy(ctx), + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + Steps: []resource.TestStep{ + { + ConfigDirectory: config.StaticDirectory("testdata/VPCAttachment/tags/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckVPCAttachmentExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + }, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/VPCAttachment/tags/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/VPCAttachment/tags/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1Updated), + acctest.CtKey2: config.StringVariable(acctest.CtValue2), + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckVPCAttachmentExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1Updated), + acctest.CtKey2: knownvalue.StringExact(acctest.CtValue2), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1Updated), + acctest.CtKey2: knownvalue.StringExact(acctest.CtValue2), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1Updated), + acctest.CtKey2: knownvalue.StringExact(acctest.CtValue2), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1Updated), + acctest.CtKey2: knownvalue.StringExact(acctest.CtValue2), + })), + }, + }, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/VPCAttachment/tags/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1Updated), + acctest.CtKey2: config.StringVariable(acctest.CtValue2), + }), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/VPCAttachment/tags/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey2: config.StringVariable(acctest.CtValue2), + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckVPCAttachmentExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey2: knownvalue.StringExact(acctest.CtValue2), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey2: knownvalue.StringExact(acctest.CtValue2), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey2: knownvalue.StringExact(acctest.CtValue2), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey2: knownvalue.StringExact(acctest.CtValue2), + })), + }, + }, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/VPCAttachment/tags/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey2: config.StringVariable(acctest.CtValue2), + }), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/VPCAttachment/tags/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtResourceTags: nil, + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckVPCAttachmentExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{})), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{})), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{})), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{})), + }, + }, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/VPCAttachment/tags/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtResourceTags: nil, + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} + +func TestAccNetworkManagerVPCAttachment_tags_null(t *testing.T) { + ctx := acctest.Context(t) + var v awstypes.VpcAttachment + resourceName := "aws_networkmanager_vpc_attachment.test" + rName := acctest.RandomWithPrefix(t, acctest.ResourcePrefix) + + acctest.ParallelTest(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckVPCAttachmentDestroy(ctx), + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + Steps: []resource.TestStep{ + { + ConfigDirectory: config.StaticDirectory("testdata/VPCAttachment/tags/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: nil, + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckVPCAttachmentExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.Null()), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{})), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.Null()), + // TODO: Should be known + plancheck.ExpectUnknownValue(resourceName, tfjsonpath.New(names.AttrTagsAll)), + }, + }, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/VPCAttachment/tags/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: nil, + }), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/VPCAttachment/tags/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtResourceTags: nil, + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionNoop), + }, + PostApplyPostRefresh: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionNoop), + }, + }, + }, + }, + }) +} + +func TestAccNetworkManagerVPCAttachment_tags_EmptyMap(t *testing.T) { + ctx := acctest.Context(t) + var v awstypes.VpcAttachment + resourceName := "aws_networkmanager_vpc_attachment.test" + rName := acctest.RandomWithPrefix(t, acctest.ResourcePrefix) + + acctest.ParallelTest(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckVPCAttachmentDestroy(ctx), + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + Steps: []resource.TestStep{ + { + ConfigDirectory: config.StaticDirectory("testdata/VPCAttachment/tags/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{}), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckVPCAttachmentExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.Null()), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{})), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.Null()), + // TODO: Should be known + plancheck.ExpectUnknownValue(resourceName, tfjsonpath.New(names.AttrTagsAll)), + }, + }, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/VPCAttachment/tags/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{}), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/VPCAttachment/tags/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtResourceTags: nil, + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionNoop), + }, + PostApplyPostRefresh: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionNoop), + }, + }, + }, + }, + }) +} + +func TestAccNetworkManagerVPCAttachment_tags_AddOnUpdate(t *testing.T) { + ctx := acctest.Context(t) + var v awstypes.VpcAttachment + resourceName := "aws_networkmanager_vpc_attachment.test" + rName := acctest.RandomWithPrefix(t, acctest.ResourcePrefix) + + acctest.ParallelTest(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckVPCAttachmentDestroy(ctx), + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + Steps: []resource.TestStep{ + { + ConfigDirectory: config.StaticDirectory("testdata/VPCAttachment/tags/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtResourceTags: nil, + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckVPCAttachmentExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.Null()), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{})), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.Null()), + // TODO: Should be known + plancheck.ExpectUnknownValue(resourceName, tfjsonpath.New(names.AttrTagsAll)), + }, + }, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/VPCAttachment/tags/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckVPCAttachmentExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + }, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/VPCAttachment/tags/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} + +func TestAccNetworkManagerVPCAttachment_tags_EmptyTag_OnCreate(t *testing.T) { + t.Skip("Resource VPCAttachment does not support empty tags") + + ctx := acctest.Context(t) + var v awstypes.VpcAttachment + resourceName := "aws_networkmanager_vpc_attachment.test" + rName := acctest.RandomWithPrefix(t, acctest.ResourcePrefix) + + acctest.ParallelTest(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckVPCAttachmentDestroy(ctx), + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + Steps: []resource.TestStep{ + { + ConfigDirectory: config.StaticDirectory("testdata/VPCAttachment/tags/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(""), + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckVPCAttachmentExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(""), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(""), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(""), + })), + // TODO: Should be known + plancheck.ExpectUnknownValue(resourceName, tfjsonpath.New(names.AttrTagsAll)), + }, + }, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/VPCAttachment/tags/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(""), + }), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/VPCAttachment/tags/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtResourceTags: nil, + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckVPCAttachmentExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{})), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{})), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{})), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{})), + }, + }, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/VPCAttachment/tags/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtResourceTags: nil, + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} + +func TestAccNetworkManagerVPCAttachment_tags_EmptyTag_OnUpdate_Add(t *testing.T) { + t.Skip("Resource VPCAttachment does not support empty tags") + + ctx := acctest.Context(t) + var v awstypes.VpcAttachment + resourceName := "aws_networkmanager_vpc_attachment.test" + rName := acctest.RandomWithPrefix(t, acctest.ResourcePrefix) + + acctest.ParallelTest(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckVPCAttachmentDestroy(ctx), + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + Steps: []resource.TestStep{ + { + ConfigDirectory: config.StaticDirectory("testdata/VPCAttachment/tags/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckVPCAttachmentExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + }, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/VPCAttachment/tags/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + acctest.CtKey2: config.StringVariable(""), + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckVPCAttachmentExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + acctest.CtKey2: knownvalue.StringExact(""), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + acctest.CtKey2: knownvalue.StringExact(""), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + acctest.CtKey2: knownvalue.StringExact(""), + })), + // TODO: Should be known + plancheck.ExpectUnknownValue(resourceName, tfjsonpath.New(names.AttrTagsAll)), + }, + }, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/VPCAttachment/tags/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + acctest.CtKey2: config.StringVariable(""), + }), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/VPCAttachment/tags/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckVPCAttachmentExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + }, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/VPCAttachment/tags/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} + +func TestAccNetworkManagerVPCAttachment_tags_EmptyTag_OnUpdate_Replace(t *testing.T) { + t.Skip("Resource VPCAttachment does not support empty tags") + + ctx := acctest.Context(t) + var v awstypes.VpcAttachment + resourceName := "aws_networkmanager_vpc_attachment.test" + rName := acctest.RandomWithPrefix(t, acctest.ResourcePrefix) + + acctest.ParallelTest(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckVPCAttachmentDestroy(ctx), + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + Steps: []resource.TestStep{ + { + ConfigDirectory: config.StaticDirectory("testdata/VPCAttachment/tags/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckVPCAttachmentExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + }, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/VPCAttachment/tags/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(""), + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckVPCAttachmentExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(""), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(""), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(""), + })), + // TODO: Should be known + plancheck.ExpectUnknownValue(resourceName, tfjsonpath.New(names.AttrTagsAll)), + }, + }, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/VPCAttachment/tags/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(""), + }), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} + +func TestAccNetworkManagerVPCAttachment_tags_DefaultTags_providerOnly(t *testing.T) { + ctx := acctest.Context(t) + var v awstypes.VpcAttachment + resourceName := "aws_networkmanager_vpc_attachment.test" + rName := acctest.RandomWithPrefix(t, acctest.ResourcePrefix) + + acctest.ParallelTest(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckVPCAttachmentDestroy(ctx), + Steps: []resource.TestStep{ + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/VPCAttachment/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + acctest.CtResourceTags: nil, + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckVPCAttachmentExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.Null()), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.Null()), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/VPCAttachment/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + acctest.CtResourceTags: nil, + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/VPCAttachment/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1Updated), + acctest.CtKey2: config.StringVariable(acctest.CtValue2), + }), + acctest.CtResourceTags: nil, + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckVPCAttachmentExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{})), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1Updated), + acctest.CtKey2: knownvalue.StringExact(acctest.CtValue2), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{})), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1Updated), + acctest.CtKey2: knownvalue.StringExact(acctest.CtValue2), + })), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/VPCAttachment/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1Updated), + acctest.CtKey2: config.StringVariable(acctest.CtValue2), + }), + acctest.CtResourceTags: nil, + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/VPCAttachment/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey2: config.StringVariable(acctest.CtValue2), + }), + acctest.CtResourceTags: nil, + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckVPCAttachmentExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{})), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey2: knownvalue.StringExact(acctest.CtValue2), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{})), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey2: knownvalue.StringExact(acctest.CtValue2), + })), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/VPCAttachment/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey2: config.StringVariable(acctest.CtValue2), + }), + acctest.CtResourceTags: nil, + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/VPCAttachment/tags/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtResourceTags: nil, + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckVPCAttachmentExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{})), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{})), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{})), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{})), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/VPCAttachment/tags/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtResourceTags: nil, + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} + +func TestAccNetworkManagerVPCAttachment_tags_DefaultTags_nonOverlapping(t *testing.T) { + ctx := acctest.Context(t) + var v awstypes.VpcAttachment + resourceName := "aws_networkmanager_vpc_attachment.test" + rName := acctest.RandomWithPrefix(t, acctest.ResourcePrefix) + + acctest.ParallelTest(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckVPCAttachmentDestroy(ctx), + Steps: []resource.TestStep{ + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/VPCAttachment/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtProviderKey1: config.StringVariable(acctest.CtProviderValue1), + }), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtResourceKey1: config.StringVariable(acctest.CtResourceValue1), + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckVPCAttachmentExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtProviderKey1: knownvalue.StringExact(acctest.CtProviderValue1), + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtProviderKey1: knownvalue.StringExact(acctest.CtProviderValue1), + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), + })), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/VPCAttachment/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtProviderKey1: config.StringVariable(acctest.CtProviderValue1), + }), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtResourceKey1: config.StringVariable(acctest.CtResourceValue1), + }), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/VPCAttachment/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtProviderKey1: config.StringVariable(acctest.CtProviderValue1Updated), + }), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtResourceKey1: config.StringVariable(acctest.CtResourceValue1Updated), + acctest.CtResourceKey2: config.StringVariable(acctest.CtResourceValue2), + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckVPCAttachmentExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1Updated), + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtProviderKey1: knownvalue.StringExact(acctest.CtProviderValue1Updated), + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1Updated), + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1Updated), + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtProviderKey1: knownvalue.StringExact(acctest.CtProviderValue1Updated), + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1Updated), + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/VPCAttachment/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtProviderKey1: config.StringVariable(acctest.CtProviderValue1Updated), + }), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtResourceKey1: config.StringVariable(acctest.CtResourceValue1Updated), + acctest.CtResourceKey2: config.StringVariable(acctest.CtResourceValue2), + }), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/VPCAttachment/tags/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtResourceTags: nil, + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckVPCAttachmentExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{})), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{})), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{})), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{})), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/VPCAttachment/tags/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtResourceTags: nil, + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} + +func TestAccNetworkManagerVPCAttachment_tags_DefaultTags_overlapping(t *testing.T) { + ctx := acctest.Context(t) + var v awstypes.VpcAttachment + resourceName := "aws_networkmanager_vpc_attachment.test" + rName := acctest.RandomWithPrefix(t, acctest.ResourcePrefix) + + acctest.ParallelTest(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckVPCAttachmentDestroy(ctx), + Steps: []resource.TestStep{ + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/VPCAttachment/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtOverlapKey1: config.StringVariable(acctest.CtProviderValue1), + }), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtOverlapKey1: config.StringVariable(acctest.CtResourceValue1), + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckVPCAttachmentExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtOverlapKey1: knownvalue.StringExact(acctest.CtResourceValue1), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtOverlapKey1: knownvalue.StringExact(acctest.CtResourceValue1), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtOverlapKey1: knownvalue.StringExact(acctest.CtResourceValue1), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtOverlapKey1: knownvalue.StringExact(acctest.CtResourceValue1), + })), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/VPCAttachment/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtOverlapKey1: config.StringVariable(acctest.CtProviderValue1), + }), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtOverlapKey1: config.StringVariable(acctest.CtResourceValue1), + }), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/VPCAttachment/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtOverlapKey1: config.StringVariable(acctest.CtProviderValue1), + acctest.CtOverlapKey2: config.StringVariable("providervalue2"), + }), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtOverlapKey1: config.StringVariable(acctest.CtResourceValue1), + acctest.CtOverlapKey2: config.StringVariable(acctest.CtResourceValue2), + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckVPCAttachmentExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtOverlapKey1: knownvalue.StringExact(acctest.CtResourceValue1), + acctest.CtOverlapKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtOverlapKey1: knownvalue.StringExact(acctest.CtResourceValue1), + acctest.CtOverlapKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtOverlapKey1: knownvalue.StringExact(acctest.CtResourceValue1), + acctest.CtOverlapKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtOverlapKey1: knownvalue.StringExact(acctest.CtResourceValue1), + acctest.CtOverlapKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/VPCAttachment/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtOverlapKey1: config.StringVariable(acctest.CtProviderValue1), + acctest.CtOverlapKey2: config.StringVariable("providervalue2"), + }), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtOverlapKey1: config.StringVariable(acctest.CtResourceValue1), + acctest.CtOverlapKey2: config.StringVariable(acctest.CtResourceValue2), + }), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/VPCAttachment/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtOverlapKey1: config.StringVariable(acctest.CtProviderValue1), + }), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtOverlapKey1: config.StringVariable(acctest.CtResourceValue2), + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckVPCAttachmentExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtOverlapKey1: knownvalue.StringExact(acctest.CtResourceValue2), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtOverlapKey1: knownvalue.StringExact(acctest.CtResourceValue2), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtOverlapKey1: knownvalue.StringExact(acctest.CtResourceValue2), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtOverlapKey1: knownvalue.StringExact(acctest.CtResourceValue2), + })), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/VPCAttachment/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtOverlapKey1: config.StringVariable(acctest.CtProviderValue1), + }), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtOverlapKey1: config.StringVariable(acctest.CtResourceValue2), + }), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} + +func TestAccNetworkManagerVPCAttachment_tags_DefaultTags_updateToProviderOnly(t *testing.T) { + ctx := acctest.Context(t) + var v awstypes.VpcAttachment + resourceName := "aws_networkmanager_vpc_attachment.test" + rName := acctest.RandomWithPrefix(t, acctest.ResourcePrefix) + + acctest.ParallelTest(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckVPCAttachmentDestroy(ctx), + Steps: []resource.TestStep{ + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/VPCAttachment/tags/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckVPCAttachmentExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/VPCAttachment/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + acctest.CtResourceTags: nil, + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckVPCAttachmentExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{})), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{})), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/VPCAttachment/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + acctest.CtResourceTags: nil, + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} + +func TestAccNetworkManagerVPCAttachment_tags_DefaultTags_updateToResourceOnly(t *testing.T) { + ctx := acctest.Context(t) + var v awstypes.VpcAttachment + resourceName := "aws_networkmanager_vpc_attachment.test" + rName := acctest.RandomWithPrefix(t, acctest.ResourcePrefix) + + acctest.ParallelTest(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckVPCAttachmentDestroy(ctx), + Steps: []resource.TestStep{ + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/VPCAttachment/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + acctest.CtResourceTags: nil, + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckVPCAttachmentExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.Null()), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.Null()), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/VPCAttachment/tags/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckVPCAttachmentExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionNoop), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/VPCAttachment/tags/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} + +func TestAccNetworkManagerVPCAttachment_tags_DefaultTags_emptyResourceTag(t *testing.T) { + t.Skip("Resource VPCAttachment does not support empty tags") + + ctx := acctest.Context(t) + var v awstypes.VpcAttachment + resourceName := "aws_networkmanager_vpc_attachment.test" + rName := acctest.RandomWithPrefix(t, acctest.ResourcePrefix) + + acctest.ParallelTest(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckVPCAttachmentDestroy(ctx), + Steps: []resource.TestStep{ + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/VPCAttachment/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(""), + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckVPCAttachmentExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(""), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(""), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(""), + })), + // TODO: Should be known + plancheck.ExpectUnknownValue(resourceName, tfjsonpath.New(names.AttrTagsAll)), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/VPCAttachment/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(""), + }), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} + +func TestAccNetworkManagerVPCAttachment_tags_DefaultTags_emptyProviderOnlyTag(t *testing.T) { + t.Skip("Resource VPCAttachment does not support empty tags") + + ctx := acctest.Context(t) + var v awstypes.VpcAttachment + resourceName := "aws_networkmanager_vpc_attachment.test" + rName := acctest.RandomWithPrefix(t, acctest.ResourcePrefix) + + acctest.ParallelTest(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckVPCAttachmentDestroy(ctx), + Steps: []resource.TestStep{ + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/VPCAttachment/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(""), + }), + acctest.CtResourceTags: nil, + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckVPCAttachmentExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.Null()), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(""), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.Null()), + // TODO: Should be known + plancheck.ExpectUnknownValue(resourceName, tfjsonpath.New(names.AttrTagsAll)), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/VPCAttachment/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(""), + }), + acctest.CtResourceTags: nil, + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} + +func TestAccNetworkManagerVPCAttachment_tags_DefaultTags_nullOverlappingResourceTag(t *testing.T) { + ctx := acctest.Context(t) + var v awstypes.VpcAttachment + resourceName := "aws_networkmanager_vpc_attachment.test" + rName := acctest.RandomWithPrefix(t, acctest.ResourcePrefix) + + acctest.ParallelTest(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckVPCAttachmentDestroy(ctx), + Steps: []resource.TestStep{ + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/VPCAttachment/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtProviderValue1), + }), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: nil, + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckVPCAttachmentExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.Null()), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtProviderValue1), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.Null()), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtProviderValue1), + })), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/VPCAttachment/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtProviderValue1), + }), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: nil, + }), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} + +func TestAccNetworkManagerVPCAttachment_tags_DefaultTags_nullNonOverlappingResourceTag(t *testing.T) { + ctx := acctest.Context(t) + var v awstypes.VpcAttachment + resourceName := "aws_networkmanager_vpc_attachment.test" + rName := acctest.RandomWithPrefix(t, acctest.ResourcePrefix) + + acctest.ParallelTest(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckVPCAttachmentDestroy(ctx), + Steps: []resource.TestStep{ + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/VPCAttachment/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtProviderKey1: config.StringVariable(acctest.CtProviderValue1), + }), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtResourceKey1: nil, + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckVPCAttachmentExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.Null()), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtProviderKey1: knownvalue.StringExact(acctest.CtProviderValue1), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.Null()), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtProviderKey1: knownvalue.StringExact(acctest.CtProviderValue1), + })), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/VPCAttachment/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtProviderKey1: config.StringVariable(acctest.CtProviderValue1), + }), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtResourceKey1: nil, + }), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} + +func TestAccNetworkManagerVPCAttachment_tags_ComputedTag_OnCreate(t *testing.T) { + ctx := acctest.Context(t) + var v awstypes.VpcAttachment + resourceName := "aws_networkmanager_vpc_attachment.test" + rName := acctest.RandomWithPrefix(t, acctest.ResourcePrefix) + + acctest.ParallelTest(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckVPCAttachmentDestroy(ctx), + Steps: []resource.TestStep{ + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/VPCAttachment/tagsComputed1/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + "unknownTagKey": config.StringVariable("computedkey1"), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckVPCAttachmentExists(ctx, resourceName, &v), + resource.TestCheckResourceAttrPair(resourceName, "tags.computedkey1", "null_resource.test", names.AttrID), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapSizeExact(1)), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapSizeExact(1)), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectUnknownValue(resourceName, tfjsonpath.New(names.AttrTags)), + plancheck.ExpectUnknownValue(resourceName, tfjsonpath.New(names.AttrTagsAll)), + }, + PostApplyPreRefresh: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionNoop), + }, + PostApplyPostRefresh: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionNoop), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/VPCAttachment/tagsComputed1/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + "unknownTagKey": config.StringVariable("computedkey1"), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} + +func TestAccNetworkManagerVPCAttachment_tags_ComputedTag_OnUpdate_Add(t *testing.T) { + ctx := acctest.Context(t) + var v awstypes.VpcAttachment + resourceName := "aws_networkmanager_vpc_attachment.test" + rName := acctest.RandomWithPrefix(t, acctest.ResourcePrefix) + + acctest.ParallelTest(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckVPCAttachmentDestroy(ctx), + Steps: []resource.TestStep{ + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/VPCAttachment/tags/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckVPCAttachmentExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/VPCAttachment/tagsComputed2/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + "unknownTagKey": config.StringVariable("computedkey1"), + "knownTagKey": config.StringVariable(acctest.CtKey1), + "knownTagValue": config.StringVariable(acctest.CtValue1), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckVPCAttachmentExists(ctx, resourceName, &v), + resource.TestCheckResourceAttrPair(resourceName, "tags.computedkey1", "null_resource.test", names.AttrID), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapSizeExact(2)), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapPartial(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapSizeExact(2)), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapPartial(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectUnknownValue(resourceName, tfjsonpath.New(names.AttrTags)), + plancheck.ExpectUnknownValue(resourceName, tfjsonpath.New(names.AttrTagsAll)), + }, + PostApplyPreRefresh: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionNoop), + }, + PostApplyPostRefresh: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionNoop), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/VPCAttachment/tagsComputed2/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + "unknownTagKey": config.StringVariable("computedkey1"), + "knownTagKey": config.StringVariable(acctest.CtKey1), + "knownTagValue": config.StringVariable(acctest.CtValue1), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} + +func TestAccNetworkManagerVPCAttachment_tags_ComputedTag_OnUpdate_Replace(t *testing.T) { + ctx := acctest.Context(t) + var v awstypes.VpcAttachment + resourceName := "aws_networkmanager_vpc_attachment.test" + rName := acctest.RandomWithPrefix(t, acctest.ResourcePrefix) + + acctest.ParallelTest(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckVPCAttachmentDestroy(ctx), + Steps: []resource.TestStep{ + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/VPCAttachment/tags/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckVPCAttachmentExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/VPCAttachment/tagsComputed1/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + "unknownTagKey": config.StringVariable(acctest.CtKey1), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckVPCAttachmentExists(ctx, resourceName, &v), + resource.TestCheckResourceAttrPair(resourceName, acctest.CtTagsKey1, "null_resource.test", names.AttrID), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapSizeExact(1)), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapSizeExact(1)), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectUnknownValue(resourceName, tfjsonpath.New(names.AttrTags)), + plancheck.ExpectUnknownValue(resourceName, tfjsonpath.New(names.AttrTagsAll)), + }, + PostApplyPreRefresh: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionNoop), + }, + PostApplyPostRefresh: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionNoop), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/VPCAttachment/tagsComputed1/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + "unknownTagKey": config.StringVariable(acctest.CtKey1), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} + +func TestAccNetworkManagerVPCAttachment_tags_IgnoreTags_Overlap_DefaultTag(t *testing.T) { + ctx := acctest.Context(t) + var v awstypes.VpcAttachment + resourceName := "aws_networkmanager_vpc_attachment.test" + rName := acctest.RandomWithPrefix(t, acctest.ResourcePrefix) + + acctest.ParallelTest(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckVPCAttachmentDestroy(ctx), + Steps: []resource.TestStep{ + // 1: Create + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/VPCAttachment/tags_ignore/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtProviderKey1: config.StringVariable(acctest.CtProviderValue1), + }), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtResourceKey1: config.StringVariable(acctest.CtResourceValue1), + }), + "ignore_tag_keys": config.SetVariable( + config.StringVariable(acctest.CtProviderKey1), + ), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckVPCAttachmentExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), + })), + expectFullResourceTags(ctx, resourceName, knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtProviderKey1: knownvalue.StringExact(acctest.CtProviderValue1), // TODO: Should not be set + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), + })), + }, + PostApplyPreRefresh: []plancheck.PlanCheck{ + plancheck.ExpectEmptyPlan(), + }, + PostApplyPostRefresh: []plancheck.PlanCheck{ + plancheck.ExpectEmptyPlan(), + }, + }, + }, + // 2: Update ignored tag only + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/VPCAttachment/tags_ignore/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtProviderKey1: config.StringVariable(acctest.CtProviderValue1Updated), + }), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtResourceKey1: config.StringVariable(acctest.CtResourceValue1), + }), + "ignore_tag_keys": config.SetVariable( + config.StringVariable(acctest.CtProviderKey1), + ), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckVPCAttachmentExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), + })), + expectFullResourceTags(ctx, resourceName, knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtProviderKey1: knownvalue.StringExact(acctest.CtProviderValue1), // TODO: Should not be set + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionNoop), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), + })), + }, + PostApplyPreRefresh: []plancheck.PlanCheck{ + plancheck.ExpectEmptyPlan(), + }, + PostApplyPostRefresh: []plancheck.PlanCheck{ + plancheck.ExpectEmptyPlan(), + }, + }, + }, + // 3: Update both tags + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/VPCAttachment/tags_ignore/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtProviderKey1: config.StringVariable(acctest.CtProviderValue1Again), + }), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtResourceKey1: config.StringVariable(acctest.CtResourceValue1Updated), + }), + "ignore_tag_keys": config.SetVariable( + config.StringVariable(acctest.CtProviderKey1), + ), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckVPCAttachmentExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1Updated), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1Updated), + })), + expectFullResourceTags(ctx, resourceName, knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtProviderKey1: knownvalue.StringExact(acctest.CtProviderValue1), // TODO: Should not be set + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1Updated), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1Updated), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1Updated), + })), + }, + PostApplyPreRefresh: []plancheck.PlanCheck{ + plancheck.ExpectEmptyPlan(), + }, + PostApplyPostRefresh: []plancheck.PlanCheck{ + plancheck.ExpectEmptyPlan(), + }, + }, + }, + }, + }) +} + +func TestAccNetworkManagerVPCAttachment_tags_IgnoreTags_Overlap_ResourceTag(t *testing.T) { + ctx := acctest.Context(t) + var v awstypes.VpcAttachment + resourceName := "aws_networkmanager_vpc_attachment.test" + rName := acctest.RandomWithPrefix(t, acctest.ResourcePrefix) + + acctest.ParallelTest(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckVPCAttachmentDestroy(ctx), + Steps: []resource.TestStep{ + // 1: Create + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/VPCAttachment/tags_ignore/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtResourceKey1: config.StringVariable(acctest.CtResourceValue1), + acctest.CtResourceKey2: config.StringVariable(acctest.CtResourceValue2), + }), + "ignore_tag_keys": config.SetVariable( + config.StringVariable(acctest.CtResourceKey1), + ), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckVPCAttachmentExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + expectFullResourceTags(ctx, resourceName, knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), // TODO: Should not be set + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + }, + PostApplyPreRefresh: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + }, + PostApplyPostRefresh: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + }, + }, + ExpectNonEmptyPlan: true, + }, + // 2: Update ignored tag + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/VPCAttachment/tags_ignore/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtResourceKey1: config.StringVariable(acctest.CtResourceValue1Updated), + acctest.CtResourceKey2: config.StringVariable(acctest.CtResourceValue2), + }), + "ignore_tag_keys": config.SetVariable( + config.StringVariable(acctest.CtResourceKey1), + ), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckVPCAttachmentExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + expectFullResourceTags(ctx, resourceName, knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), // TODO: Should not be set + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1Updated), + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + }, + PostApplyPreRefresh: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1Updated), + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + }, + PostApplyPostRefresh: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1Updated), + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + }, + }, + ExpectNonEmptyPlan: true, + }, + // 3: Update both tags + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/VPCAttachment/tags_ignore/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtResourceKey1: config.StringVariable(acctest.CtResourceValue1Again), + acctest.CtResourceKey2: config.StringVariable(acctest.CtResourceValue2Updated), + }), + "ignore_tag_keys": config.SetVariable( + config.StringVariable(acctest.CtResourceKey1), + ), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckVPCAttachmentExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2Updated), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2Updated), + })), + expectFullResourceTags(ctx, resourceName, knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), // TODO: Should not be set + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2Updated), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1Again), + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2Updated), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2Updated), + })), + }, + PostApplyPreRefresh: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1Again), + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2Updated), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2Updated), + })), + }, + PostApplyPostRefresh: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1Again), + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2Updated), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2Updated), + })), + }, + }, + ExpectNonEmptyPlan: true, + }, + }, + }) +} diff --git a/internal/service/networkmanager/vpc_attachment_test.go b/internal/service/networkmanager/vpc_attachment_test.go index fa33b78ebba4..3e8afc046c87 100644 --- a/internal/service/networkmanager/vpc_attachment_test.go +++ b/internal/service/networkmanager/vpc_attachment_test.go @@ -294,55 +294,6 @@ func TestAccNetworkManagerVPCAttachment_Attached_disappearsAccepter(t *testing.T }) } -func TestAccNetworkManagerVPCAttachment_tags(t *testing.T) { - const ( - resourceName = "aws_networkmanager_vpc_attachment.test" - ) - - ctx := acctest.Context(t) - var v awstypes.VpcAttachment - rName := sdkacctest.RandomWithPrefix(acctest.ResourcePrefix) - - resource.ParallelTest(t, resource.TestCase{ - PreCheck: func() { acctest.PreCheck(ctx, t) }, - ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), - ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, - CheckDestroy: testAccCheckVPCAttachmentDestroy(ctx), - Steps: []resource.TestStep{ - { - Config: testAccVPCAttachmentConfig_tags1(rName, "segment", "shared"), - Check: resource.ComposeTestCheckFunc( - testAccCheckVPCAttachmentExists(ctx, resourceName, &v), - resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, "1"), - resource.TestCheckResourceAttr(resourceName, "tags.segment", "shared"), - ), - }, - { - Config: testAccVPCAttachmentConfig_tags2(rName, "segment", "shared", "Name", "test"), - Check: resource.ComposeTestCheckFunc( - testAccCheckVPCAttachmentExists(ctx, resourceName, &v), - resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, "2"), - resource.TestCheckResourceAttr(resourceName, "tags.segment", "shared"), - resource.TestCheckResourceAttr(resourceName, "tags.Name", "test"), - ), - }, - { - Config: testAccVPCAttachmentConfig_tags1(rName, "segment", "shared"), - Check: resource.ComposeTestCheckFunc( - testAccCheckVPCAttachmentExists(ctx, resourceName, &v), - resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, "1"), - resource.TestCheckResourceAttr(resourceName, "tags.segment", "shared"), - ), - }, - { - ResourceName: resourceName, - ImportState: true, - ImportStateVerify: true, - }, - }, - }) -} - func TestAccNetworkManagerVPCAttachment_update(t *testing.T) { const ( resourceName = "aws_networkmanager_vpc_attachment.test" @@ -680,35 +631,8 @@ resource "aws_networkmanager_attachment_accepter" "test" { func testAccVPCAttachmentConfig_base(rName string, requireAcceptance bool) string { return acctest.ConfigCompose( - acctest.ConfigAvailableAZsNoOptIn(), + acctest.ConfigVPCWithSubnetsIPv6(rName, 2), fmt.Sprintf(` -data "aws_region" "current" {} - -resource "aws_vpc" "test" { - cidr_block = "10.0.0.0/16" - - assign_generated_ipv6_cidr_block = true - - tags = { - Name = %[1]q - } -} - -resource "aws_subnet" "test" { - count = 2 - - vpc_id = aws_vpc.test.id - availability_zone = data.aws_availability_zones.available.names[count.index] - cidr_block = cidrsubnet(aws_vpc.test.cidr_block, 8, count.index) - - ipv6_cidr_block = cidrsubnet(aws_vpc.test.ipv6_cidr_block, 8, count.index) - assign_ipv6_address_on_creation = true - - tags = { - Name = %[1]q - } -} - resource "aws_networkmanager_global_network" "test" { tags = { Name = %[1]q @@ -728,6 +652,8 @@ resource "aws_networkmanager_core_network_policy_attachment" "test" { policy_document = data.aws_networkmanager_core_network_policy_document.test.json } +data "aws_region" "current" {} + data "aws_networkmanager_core_network_policy_document" "test" { core_network_configuration { vpn_ecmp_support = false From 4cfaf4abe7c798867e7206d9278db843d9cc63b8 Mon Sep 17 00:00:00 2001 From: Graham Davison Date: Mon, 28 Jul 2025 12:30:57 -0700 Subject: [PATCH 046/365] Adds common template `acctest.ConfigVPCWithSubnetsIPv6` --- internal/generate/tests/acctest.tf.gtpl | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/internal/generate/tests/acctest.tf.gtpl b/internal/generate/tests/acctest.tf.gtpl index b3d7e06c6e9a..07d4380c09f7 100644 --- a/internal/generate/tests/acctest.tf.gtpl +++ b/internal/generate/tests/acctest.tf.gtpl @@ -18,6 +18,31 @@ resource "aws_subnet" "test" { {{ template "acctest.ConfigAvailableAZsNoOptInDefaultExclude" }} {{- end }} +{{ define "acctest.ConfigVPCWithSubnetsIPv6" -}} +# acctest.ConfigVPCWithSubnetsIPv6(rName, {{ . }}) + +resource "aws_vpc" "test" { +{{- template "region" }} + cidr_block = "10.0.0.0/16" + + assign_generated_ipv6_cidr_block = true +} + +resource "aws_subnet" "test" { +{{- template "region" }} + count = {{ . }} + + vpc_id = aws_vpc.test.id + availability_zone = data.aws_availability_zones.available.names[count.index] + + cidr_block = cidrsubnet(aws_vpc.test.cidr_block, 8, count.index) + ipv6_cidr_block = cidrsubnet(aws_vpc.test.ipv6_cidr_block, 8, count.index) + assign_ipv6_address_on_creation = true +} + +{{ template "acctest.ConfigAvailableAZsNoOptInDefaultExclude" }} +{{- end }} + {{ define "acctest.ConfigAvailableAZsNoOptInDefaultExclude" -}} # acctest.ConfigAvailableAZsNoOptInDefaultExclude From 1bac6fe00507eef987944094a0cfa918e8cf9dc5 Mon Sep 17 00:00:00 2001 From: Graham Davison Date: Mon, 28 Jul 2025 13:00:31 -0700 Subject: [PATCH 047/365] Adds random BGP ASN and IP Address variables to generated tests --- .../tagstests/data_source_test.go.gtpl | 8 ++- internal/generate/tagstests/main.go | 65 +++++++++++++++++-- .../generate/tagstests/resource_test.go.gtpl | 10 ++- 3 files changed, 73 insertions(+), 10 deletions(-) diff --git a/internal/generate/tagstests/data_source_test.go.gtpl b/internal/generate/tagstests/data_source_test.go.gtpl index 2290580a269f..2c899c996cb1 100644 --- a/internal/generate/tagstests/data_source_test.go.gtpl +++ b/internal/generate/tagstests/data_source_test.go.gtpl @@ -77,10 +77,14 @@ plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), know {{ define "AdditionalTfVars" -}} {{ range $name, $value := .AdditionalTfVars -}} - {{ $name }}: config.StringVariable({{ $value }}), + {{ if eq $value.Type "string" -}} + {{ $name }}: config.StringVariable({{ $value.GoVarName }}), + {{- else if eq $value.Type "int" -}} + {{ $name }}: config.IntegerVariable({{ $value.GoVarName }}), + {{- end }} {{ end -}} {{ if .AlternateRegionProvider -}} - "alt_region": config.StringVariable(acctest.AlternateRegion()), + "alt_region": config.StringVariable(acctest.AlternateRegion()), {{ end }} {{ end }} diff --git a/internal/generate/tagstests/main.go b/internal/generate/tagstests/main.go index c398fb9fc49f..4ae555588e8a 100644 --- a/internal/generate/tagstests/main.go +++ b/internal/generate/tagstests/main.go @@ -408,7 +408,7 @@ type ResourceDatum struct { GoImports []goImport GenerateConfig bool InitCodeBlocks []codeBlock - additionalTfVars map[string]string + additionalTfVars map[string]tfVar AlternateRegionProvider bool TagsUpdateForceNew bool TagsUpdateGetTagsIn bool // TODO: Works around a bug when getTagsIn() is used to pass tags directly to Update call @@ -420,7 +420,7 @@ type ResourceDatum struct { UseAlternateAccount bool } -func (d ResourceDatum) AdditionalTfVars() map[string]string { +func (d ResourceDatum) AdditionalTfVars() map[string]tfVar { return tfmaps.ApplyToAllKeys(d.additionalTfVars, func(k string) string { return acctestgen.ConstOrQuote(k) }) @@ -451,6 +451,18 @@ type codeBlock struct { Code string } +type tfVar struct { + GoVarName string + Type tfVarType +} + +type tfVarType string + +const ( + tfVarTypeString tfVarType = "string" + tfVarTypeInt tfVarType = "int" +) + type commonConfig struct { AdditionalTfVars []string WithRName bool @@ -538,7 +550,7 @@ func (v *visitor) processFuncDecl(funcDecl *ast.FuncDecl) { // Look first for tagging annotations. d := ResourceDatum{ FileName: v.fileName, - additionalTfVars: make(map[string]string), + additionalTfVars: make(map[string]tfVar), } tagged := false skip := false @@ -637,6 +649,43 @@ func (v *visitor) processFuncDecl(funcDecl *ast.FuncDecl) { ) } } + if attr, ok := args.Keyword["randomBgpAsn"]; ok { + parts := strings.Split(attr, ";") + varName := "rBgpAsn" + d.GoImports = append(d.GoImports, + goImport{ + Path: "github.com/hashicorp/terraform-plugin-testing/helper/acctest", + Alias: "sdkacctest", + }, + ) + d.InitCodeBlocks = append(d.InitCodeBlocks, codeBlock{ + Code: fmt.Sprintf("%s := sdkacctest.RandIntRange(%s,%s)", varName, parts[0], parts[1]), + }) + d.additionalTfVars[varName] = tfVar{ + GoVarName: varName, + Type: tfVarTypeInt, + } + } + if attr, ok := args.Keyword["randomIPAddress"]; ok { + varName := "rIPAddress" + d.GoImports = append(d.GoImports, + goImport{ + Path: "github.com/hashicorp/terraform-plugin-testing/helper/acctest", + Alias: "sdkacctest", + }, + ) + d.InitCodeBlocks = append(d.InitCodeBlocks, codeBlock{ + Code: fmt.Sprintf(`%s, err := sdkacctest.RandIpAddress("%s") +if err != nil { + t.Fatal(err) +} +`, varName, attr), + }) + d.additionalTfVars[varName] = tfVar{ + GoVarName: varName, + Type: tfVarTypeString, + } + } if attr, ok := args.Keyword["existsType"]; ok { if typeName, importSpec, err := parseIdentifierSpec(attr); err != nil { v.errs = append(v.errs, fmt.Errorf("%s: %w", attr, fmt.Sprintf("%s.%s", v.packageName, v.functionName), err)) @@ -853,8 +902,14 @@ func (v *visitor) processFuncDecl(funcDecl *ast.FuncDecl) { Code: fmt.Sprintf(`privateKeyPEM := acctest.TLSRSAPrivateKeyPEM(t, 2048) certificatePEM := acctest.TLSRSAX509SelfSignedCertificatePEM(t, privateKeyPEM, %s)`, tlsKeyCN), }) - d.additionalTfVars["certificate_pem"] = "certificatePEM" - d.additionalTfVars["private_key_pem"] = "privateKeyPEM" + d.additionalTfVars["certificate_pem"] = tfVar{ + GoVarName: "certificatePEM", + Type: tfVarTypeString, + } + d.additionalTfVars["private_key_pem"] = tfVar{ + GoVarName: "privateKeyPEM", + Type: tfVarTypeString, + } } if tagged { diff --git a/internal/generate/tagstests/resource_test.go.gtpl b/internal/generate/tagstests/resource_test.go.gtpl index c91b804b4a17..60d56adab49f 100644 --- a/internal/generate/tagstests/resource_test.go.gtpl +++ b/internal/generate/tagstests/resource_test.go.gtpl @@ -9,7 +9,7 @@ rName := {{ .Generator }} {{- end }} {{ range .InitCodeBlocks -}} -{{ .Code }} + {{ .Code }} {{- end }} {{- if .UseAlternateAccount -}} providers := make(map[string]*schema.Provider) @@ -125,10 +125,14 @@ plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), know {{ define "AdditionalTfVars" -}} {{ range $name, $value := .AdditionalTfVars -}} - {{ $name }}: config.StringVariable({{ $value }}), + {{ if eq $value.Type "string" -}} + {{ $name }}: config.StringVariable({{ $value.GoVarName }}), + {{- else if eq $value.Type "int" -}} + {{ $name }}: config.IntegerVariable({{ $value.GoVarName }}), + {{- end }} {{ end -}} {{ if .AlternateRegionProvider -}} - "alt_region": config.StringVariable(acctest.AlternateRegion()), + "alt_region": config.StringVariable(acctest.AlternateRegion()), {{ end }} {{ end }} From 26bf5e4aeb3b337799a83f0954dd4f6c39c07185 Mon Sep 17 00:00:00 2001 From: Graham Davison Date: Mon, 28 Jul 2025 13:01:12 -0700 Subject: [PATCH 048/365] `aws_networkmanager_site_to_site_vpn_attachment` --- .../site_to_site_vpn_attachment.go | 5 +- ...te_to_site_vpn_attachment_tags_gen_test.go | 2542 +++++++++++++++++ .../site_to_site_vpn_attachment_test.go | 55 +- .../SiteToSiteVPNAttachment/tags/main_gen.tf | 121 + .../tagsComputed1/main_gen.tf | 125 + .../tagsComputed2/main_gen.tf | 136 + .../tags_defaults/main_gen.tf | 132 + .../tags_ignore/main_gen.tf | 141 + .../site_to_site_vpn_attachment_tags.gtpl | 80 + 9 files changed, 3283 insertions(+), 54 deletions(-) create mode 100644 internal/service/networkmanager/site_to_site_vpn_attachment_tags_gen_test.go create mode 100644 internal/service/networkmanager/testdata/SiteToSiteVPNAttachment/tags/main_gen.tf create mode 100644 internal/service/networkmanager/testdata/SiteToSiteVPNAttachment/tagsComputed1/main_gen.tf create mode 100644 internal/service/networkmanager/testdata/SiteToSiteVPNAttachment/tagsComputed2/main_gen.tf create mode 100644 internal/service/networkmanager/testdata/SiteToSiteVPNAttachment/tags_defaults/main_gen.tf create mode 100644 internal/service/networkmanager/testdata/SiteToSiteVPNAttachment/tags_ignore/main_gen.tf create mode 100644 internal/service/networkmanager/testdata/tmpl/site_to_site_vpn_attachment_tags.gtpl diff --git a/internal/service/networkmanager/site_to_site_vpn_attachment.go b/internal/service/networkmanager/site_to_site_vpn_attachment.go index c9674bb2e485..41b1d54646d8 100644 --- a/internal/service/networkmanager/site_to_site_vpn_attachment.go +++ b/internal/service/networkmanager/site_to_site_vpn_attachment.go @@ -27,7 +27,10 @@ import ( // @SDKResource("aws_networkmanager_site_to_site_vpn_attachment", name="Site To Site VPN Attachment") // @Tags(identifierAttribute="arn") -// @Testing(tagsTest=false) +// @Testing(existsType="github.com/aws/aws-sdk-go-v2/service/networkmanager/types;awstypes;awstypes.SiteToSiteVpnAttachment") +// @Testing(skipEmptyTags=true) +// @Testing(randomBgpAsn="64512;65534") +// @Testing(randomIPAddress="172.0.0.0/24") func resourceSiteToSiteVPNAttachment() *schema.Resource { return &schema.Resource{ CreateWithoutTimeout: resourceSiteToSiteVPNAttachmentCreate, diff --git a/internal/service/networkmanager/site_to_site_vpn_attachment_tags_gen_test.go b/internal/service/networkmanager/site_to_site_vpn_attachment_tags_gen_test.go new file mode 100644 index 000000000000..5638f97d235a --- /dev/null +++ b/internal/service/networkmanager/site_to_site_vpn_attachment_tags_gen_test.go @@ -0,0 +1,2542 @@ +// Code generated by internal/generate/tagstests/main.go; DO NOT EDIT. + +package networkmanager_test + +import ( + "testing" + + awstypes "github.com/aws/aws-sdk-go-v2/service/networkmanager/types" + "github.com/hashicorp/terraform-plugin-testing/config" + sdkacctest "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/knownvalue" + "github.com/hashicorp/terraform-plugin-testing/plancheck" + "github.com/hashicorp/terraform-plugin-testing/statecheck" + "github.com/hashicorp/terraform-plugin-testing/tfjsonpath" + "github.com/hashicorp/terraform-provider-aws/internal/acctest" + "github.com/hashicorp/terraform-provider-aws/names" +) + +func TestAccNetworkManagerSiteToSiteVPNAttachment_tags(t *testing.T) { + ctx := acctest.Context(t) + var v awstypes.SiteToSiteVpnAttachment + resourceName := "aws_networkmanager_site_to_site_vpn_attachment.test" + rName := acctest.RandomWithPrefix(t, acctest.ResourcePrefix) + rBgpAsn := sdkacctest.RandIntRange(64512, 65534) + rIPAddress, err := sdkacctest.RandIpAddress("172.0.0.0/24") + if err != nil { + t.Fatal(err) + } + + acctest.ParallelTest(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckSiteToSiteVPNAttachmentDestroy(ctx), + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + Steps: []resource.TestStep{ + { + ConfigDirectory: config.StaticDirectory("testdata/SiteToSiteVPNAttachment/tags/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + "rBgpAsn": config.IntegerVariable(rBgpAsn), + "rIPAddress": config.StringVariable(rIPAddress), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckSiteToSiteVPNAttachmentExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + }, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/SiteToSiteVPNAttachment/tags/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + "rBgpAsn": config.IntegerVariable(rBgpAsn), + "rIPAddress": config.StringVariable(rIPAddress), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/SiteToSiteVPNAttachment/tags/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1Updated), + acctest.CtKey2: config.StringVariable(acctest.CtValue2), + }), + "rBgpAsn": config.IntegerVariable(rBgpAsn), + "rIPAddress": config.StringVariable(rIPAddress), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckSiteToSiteVPNAttachmentExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1Updated), + acctest.CtKey2: knownvalue.StringExact(acctest.CtValue2), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1Updated), + acctest.CtKey2: knownvalue.StringExact(acctest.CtValue2), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1Updated), + acctest.CtKey2: knownvalue.StringExact(acctest.CtValue2), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1Updated), + acctest.CtKey2: knownvalue.StringExact(acctest.CtValue2), + })), + }, + }, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/SiteToSiteVPNAttachment/tags/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1Updated), + acctest.CtKey2: config.StringVariable(acctest.CtValue2), + }), + "rBgpAsn": config.IntegerVariable(rBgpAsn), + "rIPAddress": config.StringVariable(rIPAddress), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/SiteToSiteVPNAttachment/tags/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey2: config.StringVariable(acctest.CtValue2), + }), + "rBgpAsn": config.IntegerVariable(rBgpAsn), + "rIPAddress": config.StringVariable(rIPAddress), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckSiteToSiteVPNAttachmentExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey2: knownvalue.StringExact(acctest.CtValue2), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey2: knownvalue.StringExact(acctest.CtValue2), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey2: knownvalue.StringExact(acctest.CtValue2), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey2: knownvalue.StringExact(acctest.CtValue2), + })), + }, + }, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/SiteToSiteVPNAttachment/tags/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey2: config.StringVariable(acctest.CtValue2), + }), + "rBgpAsn": config.IntegerVariable(rBgpAsn), + "rIPAddress": config.StringVariable(rIPAddress), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/SiteToSiteVPNAttachment/tags/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtResourceTags: nil, + "rBgpAsn": config.IntegerVariable(rBgpAsn), + "rIPAddress": config.StringVariable(rIPAddress), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckSiteToSiteVPNAttachmentExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{})), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{})), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{})), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{})), + }, + }, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/SiteToSiteVPNAttachment/tags/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtResourceTags: nil, + "rBgpAsn": config.IntegerVariable(rBgpAsn), + "rIPAddress": config.StringVariable(rIPAddress), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} + +func TestAccNetworkManagerSiteToSiteVPNAttachment_tags_null(t *testing.T) { + ctx := acctest.Context(t) + var v awstypes.SiteToSiteVpnAttachment + resourceName := "aws_networkmanager_site_to_site_vpn_attachment.test" + rName := acctest.RandomWithPrefix(t, acctest.ResourcePrefix) + rBgpAsn := sdkacctest.RandIntRange(64512, 65534) + rIPAddress, err := sdkacctest.RandIpAddress("172.0.0.0/24") + if err != nil { + t.Fatal(err) + } + + acctest.ParallelTest(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckSiteToSiteVPNAttachmentDestroy(ctx), + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + Steps: []resource.TestStep{ + { + ConfigDirectory: config.StaticDirectory("testdata/SiteToSiteVPNAttachment/tags/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: nil, + }), + "rBgpAsn": config.IntegerVariable(rBgpAsn), + "rIPAddress": config.StringVariable(rIPAddress), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckSiteToSiteVPNAttachmentExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.Null()), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{})), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.Null()), + // TODO: Should be known + plancheck.ExpectUnknownValue(resourceName, tfjsonpath.New(names.AttrTagsAll)), + }, + }, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/SiteToSiteVPNAttachment/tags/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: nil, + }), + "rBgpAsn": config.IntegerVariable(rBgpAsn), + "rIPAddress": config.StringVariable(rIPAddress), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/SiteToSiteVPNAttachment/tags/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtResourceTags: nil, + "rBgpAsn": config.IntegerVariable(rBgpAsn), + "rIPAddress": config.StringVariable(rIPAddress), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionNoop), + }, + PostApplyPostRefresh: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionNoop), + }, + }, + }, + }, + }) +} + +func TestAccNetworkManagerSiteToSiteVPNAttachment_tags_EmptyMap(t *testing.T) { + ctx := acctest.Context(t) + var v awstypes.SiteToSiteVpnAttachment + resourceName := "aws_networkmanager_site_to_site_vpn_attachment.test" + rName := acctest.RandomWithPrefix(t, acctest.ResourcePrefix) + rBgpAsn := sdkacctest.RandIntRange(64512, 65534) + rIPAddress, err := sdkacctest.RandIpAddress("172.0.0.0/24") + if err != nil { + t.Fatal(err) + } + + acctest.ParallelTest(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckSiteToSiteVPNAttachmentDestroy(ctx), + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + Steps: []resource.TestStep{ + { + ConfigDirectory: config.StaticDirectory("testdata/SiteToSiteVPNAttachment/tags/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{}), + "rBgpAsn": config.IntegerVariable(rBgpAsn), + "rIPAddress": config.StringVariable(rIPAddress), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckSiteToSiteVPNAttachmentExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.Null()), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{})), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.Null()), + // TODO: Should be known + plancheck.ExpectUnknownValue(resourceName, tfjsonpath.New(names.AttrTagsAll)), + }, + }, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/SiteToSiteVPNAttachment/tags/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{}), + "rBgpAsn": config.IntegerVariable(rBgpAsn), + "rIPAddress": config.StringVariable(rIPAddress), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/SiteToSiteVPNAttachment/tags/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtResourceTags: nil, + "rBgpAsn": config.IntegerVariable(rBgpAsn), + "rIPAddress": config.StringVariable(rIPAddress), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionNoop), + }, + PostApplyPostRefresh: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionNoop), + }, + }, + }, + }, + }) +} + +func TestAccNetworkManagerSiteToSiteVPNAttachment_tags_AddOnUpdate(t *testing.T) { + ctx := acctest.Context(t) + var v awstypes.SiteToSiteVpnAttachment + resourceName := "aws_networkmanager_site_to_site_vpn_attachment.test" + rName := acctest.RandomWithPrefix(t, acctest.ResourcePrefix) + rBgpAsn := sdkacctest.RandIntRange(64512, 65534) + rIPAddress, err := sdkacctest.RandIpAddress("172.0.0.0/24") + if err != nil { + t.Fatal(err) + } + + acctest.ParallelTest(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckSiteToSiteVPNAttachmentDestroy(ctx), + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + Steps: []resource.TestStep{ + { + ConfigDirectory: config.StaticDirectory("testdata/SiteToSiteVPNAttachment/tags/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtResourceTags: nil, + "rBgpAsn": config.IntegerVariable(rBgpAsn), + "rIPAddress": config.StringVariable(rIPAddress), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckSiteToSiteVPNAttachmentExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.Null()), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{})), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.Null()), + // TODO: Should be known + plancheck.ExpectUnknownValue(resourceName, tfjsonpath.New(names.AttrTagsAll)), + }, + }, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/SiteToSiteVPNAttachment/tags/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + "rBgpAsn": config.IntegerVariable(rBgpAsn), + "rIPAddress": config.StringVariable(rIPAddress), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckSiteToSiteVPNAttachmentExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + }, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/SiteToSiteVPNAttachment/tags/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + "rBgpAsn": config.IntegerVariable(rBgpAsn), + "rIPAddress": config.StringVariable(rIPAddress), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} + +func TestAccNetworkManagerSiteToSiteVPNAttachment_tags_EmptyTag_OnCreate(t *testing.T) { + t.Skip("Resource SiteToSiteVPNAttachment does not support empty tags") + + ctx := acctest.Context(t) + var v awstypes.SiteToSiteVpnAttachment + resourceName := "aws_networkmanager_site_to_site_vpn_attachment.test" + rName := acctest.RandomWithPrefix(t, acctest.ResourcePrefix) + rBgpAsn := sdkacctest.RandIntRange(64512, 65534) + rIPAddress, err := sdkacctest.RandIpAddress("172.0.0.0/24") + if err != nil { + t.Fatal(err) + } + + acctest.ParallelTest(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckSiteToSiteVPNAttachmentDestroy(ctx), + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + Steps: []resource.TestStep{ + { + ConfigDirectory: config.StaticDirectory("testdata/SiteToSiteVPNAttachment/tags/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(""), + }), + "rBgpAsn": config.IntegerVariable(rBgpAsn), + "rIPAddress": config.StringVariable(rIPAddress), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckSiteToSiteVPNAttachmentExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(""), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(""), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(""), + })), + // TODO: Should be known + plancheck.ExpectUnknownValue(resourceName, tfjsonpath.New(names.AttrTagsAll)), + }, + }, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/SiteToSiteVPNAttachment/tags/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(""), + }), + "rBgpAsn": config.IntegerVariable(rBgpAsn), + "rIPAddress": config.StringVariable(rIPAddress), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/SiteToSiteVPNAttachment/tags/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtResourceTags: nil, + "rBgpAsn": config.IntegerVariable(rBgpAsn), + "rIPAddress": config.StringVariable(rIPAddress), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckSiteToSiteVPNAttachmentExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{})), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{})), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{})), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{})), + }, + }, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/SiteToSiteVPNAttachment/tags/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtResourceTags: nil, + "rBgpAsn": config.IntegerVariable(rBgpAsn), + "rIPAddress": config.StringVariable(rIPAddress), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} + +func TestAccNetworkManagerSiteToSiteVPNAttachment_tags_EmptyTag_OnUpdate_Add(t *testing.T) { + t.Skip("Resource SiteToSiteVPNAttachment does not support empty tags") + + ctx := acctest.Context(t) + var v awstypes.SiteToSiteVpnAttachment + resourceName := "aws_networkmanager_site_to_site_vpn_attachment.test" + rName := acctest.RandomWithPrefix(t, acctest.ResourcePrefix) + rBgpAsn := sdkacctest.RandIntRange(64512, 65534) + rIPAddress, err := sdkacctest.RandIpAddress("172.0.0.0/24") + if err != nil { + t.Fatal(err) + } + + acctest.ParallelTest(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckSiteToSiteVPNAttachmentDestroy(ctx), + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + Steps: []resource.TestStep{ + { + ConfigDirectory: config.StaticDirectory("testdata/SiteToSiteVPNAttachment/tags/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + "rBgpAsn": config.IntegerVariable(rBgpAsn), + "rIPAddress": config.StringVariable(rIPAddress), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckSiteToSiteVPNAttachmentExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + }, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/SiteToSiteVPNAttachment/tags/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + acctest.CtKey2: config.StringVariable(""), + }), + "rBgpAsn": config.IntegerVariable(rBgpAsn), + "rIPAddress": config.StringVariable(rIPAddress), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckSiteToSiteVPNAttachmentExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + acctest.CtKey2: knownvalue.StringExact(""), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + acctest.CtKey2: knownvalue.StringExact(""), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + acctest.CtKey2: knownvalue.StringExact(""), + })), + // TODO: Should be known + plancheck.ExpectUnknownValue(resourceName, tfjsonpath.New(names.AttrTagsAll)), + }, + }, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/SiteToSiteVPNAttachment/tags/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + acctest.CtKey2: config.StringVariable(""), + }), + "rBgpAsn": config.IntegerVariable(rBgpAsn), + "rIPAddress": config.StringVariable(rIPAddress), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/SiteToSiteVPNAttachment/tags/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + "rBgpAsn": config.IntegerVariable(rBgpAsn), + "rIPAddress": config.StringVariable(rIPAddress), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckSiteToSiteVPNAttachmentExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + }, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/SiteToSiteVPNAttachment/tags/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + "rBgpAsn": config.IntegerVariable(rBgpAsn), + "rIPAddress": config.StringVariable(rIPAddress), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} + +func TestAccNetworkManagerSiteToSiteVPNAttachment_tags_EmptyTag_OnUpdate_Replace(t *testing.T) { + t.Skip("Resource SiteToSiteVPNAttachment does not support empty tags") + + ctx := acctest.Context(t) + var v awstypes.SiteToSiteVpnAttachment + resourceName := "aws_networkmanager_site_to_site_vpn_attachment.test" + rName := acctest.RandomWithPrefix(t, acctest.ResourcePrefix) + rBgpAsn := sdkacctest.RandIntRange(64512, 65534) + rIPAddress, err := sdkacctest.RandIpAddress("172.0.0.0/24") + if err != nil { + t.Fatal(err) + } + + acctest.ParallelTest(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckSiteToSiteVPNAttachmentDestroy(ctx), + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + Steps: []resource.TestStep{ + { + ConfigDirectory: config.StaticDirectory("testdata/SiteToSiteVPNAttachment/tags/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + "rBgpAsn": config.IntegerVariable(rBgpAsn), + "rIPAddress": config.StringVariable(rIPAddress), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckSiteToSiteVPNAttachmentExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + }, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/SiteToSiteVPNAttachment/tags/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(""), + }), + "rBgpAsn": config.IntegerVariable(rBgpAsn), + "rIPAddress": config.StringVariable(rIPAddress), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckSiteToSiteVPNAttachmentExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(""), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(""), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(""), + })), + // TODO: Should be known + plancheck.ExpectUnknownValue(resourceName, tfjsonpath.New(names.AttrTagsAll)), + }, + }, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/SiteToSiteVPNAttachment/tags/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(""), + }), + "rBgpAsn": config.IntegerVariable(rBgpAsn), + "rIPAddress": config.StringVariable(rIPAddress), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} + +func TestAccNetworkManagerSiteToSiteVPNAttachment_tags_DefaultTags_providerOnly(t *testing.T) { + ctx := acctest.Context(t) + var v awstypes.SiteToSiteVpnAttachment + resourceName := "aws_networkmanager_site_to_site_vpn_attachment.test" + rName := acctest.RandomWithPrefix(t, acctest.ResourcePrefix) + rBgpAsn := sdkacctest.RandIntRange(64512, 65534) + rIPAddress, err := sdkacctest.RandIpAddress("172.0.0.0/24") + if err != nil { + t.Fatal(err) + } + + acctest.ParallelTest(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckSiteToSiteVPNAttachmentDestroy(ctx), + Steps: []resource.TestStep{ + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/SiteToSiteVPNAttachment/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + acctest.CtResourceTags: nil, + "rBgpAsn": config.IntegerVariable(rBgpAsn), + "rIPAddress": config.StringVariable(rIPAddress), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckSiteToSiteVPNAttachmentExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.Null()), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.Null()), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/SiteToSiteVPNAttachment/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + acctest.CtResourceTags: nil, + "rBgpAsn": config.IntegerVariable(rBgpAsn), + "rIPAddress": config.StringVariable(rIPAddress), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/SiteToSiteVPNAttachment/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1Updated), + acctest.CtKey2: config.StringVariable(acctest.CtValue2), + }), + acctest.CtResourceTags: nil, + "rBgpAsn": config.IntegerVariable(rBgpAsn), + "rIPAddress": config.StringVariable(rIPAddress), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckSiteToSiteVPNAttachmentExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{})), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1Updated), + acctest.CtKey2: knownvalue.StringExact(acctest.CtValue2), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{})), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1Updated), + acctest.CtKey2: knownvalue.StringExact(acctest.CtValue2), + })), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/SiteToSiteVPNAttachment/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1Updated), + acctest.CtKey2: config.StringVariable(acctest.CtValue2), + }), + acctest.CtResourceTags: nil, + "rBgpAsn": config.IntegerVariable(rBgpAsn), + "rIPAddress": config.StringVariable(rIPAddress), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/SiteToSiteVPNAttachment/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey2: config.StringVariable(acctest.CtValue2), + }), + acctest.CtResourceTags: nil, + "rBgpAsn": config.IntegerVariable(rBgpAsn), + "rIPAddress": config.StringVariable(rIPAddress), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckSiteToSiteVPNAttachmentExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{})), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey2: knownvalue.StringExact(acctest.CtValue2), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{})), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey2: knownvalue.StringExact(acctest.CtValue2), + })), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/SiteToSiteVPNAttachment/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey2: config.StringVariable(acctest.CtValue2), + }), + acctest.CtResourceTags: nil, + "rBgpAsn": config.IntegerVariable(rBgpAsn), + "rIPAddress": config.StringVariable(rIPAddress), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/SiteToSiteVPNAttachment/tags/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtResourceTags: nil, + "rBgpAsn": config.IntegerVariable(rBgpAsn), + "rIPAddress": config.StringVariable(rIPAddress), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckSiteToSiteVPNAttachmentExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{})), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{})), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{})), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{})), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/SiteToSiteVPNAttachment/tags/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtResourceTags: nil, + "rBgpAsn": config.IntegerVariable(rBgpAsn), + "rIPAddress": config.StringVariable(rIPAddress), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} + +func TestAccNetworkManagerSiteToSiteVPNAttachment_tags_DefaultTags_nonOverlapping(t *testing.T) { + ctx := acctest.Context(t) + var v awstypes.SiteToSiteVpnAttachment + resourceName := "aws_networkmanager_site_to_site_vpn_attachment.test" + rName := acctest.RandomWithPrefix(t, acctest.ResourcePrefix) + rBgpAsn := sdkacctest.RandIntRange(64512, 65534) + rIPAddress, err := sdkacctest.RandIpAddress("172.0.0.0/24") + if err != nil { + t.Fatal(err) + } + + acctest.ParallelTest(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckSiteToSiteVPNAttachmentDestroy(ctx), + Steps: []resource.TestStep{ + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/SiteToSiteVPNAttachment/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtProviderKey1: config.StringVariable(acctest.CtProviderValue1), + }), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtResourceKey1: config.StringVariable(acctest.CtResourceValue1), + }), + "rBgpAsn": config.IntegerVariable(rBgpAsn), + "rIPAddress": config.StringVariable(rIPAddress), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckSiteToSiteVPNAttachmentExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtProviderKey1: knownvalue.StringExact(acctest.CtProviderValue1), + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtProviderKey1: knownvalue.StringExact(acctest.CtProviderValue1), + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), + })), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/SiteToSiteVPNAttachment/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtProviderKey1: config.StringVariable(acctest.CtProviderValue1), + }), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtResourceKey1: config.StringVariable(acctest.CtResourceValue1), + }), + "rBgpAsn": config.IntegerVariable(rBgpAsn), + "rIPAddress": config.StringVariable(rIPAddress), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/SiteToSiteVPNAttachment/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtProviderKey1: config.StringVariable(acctest.CtProviderValue1Updated), + }), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtResourceKey1: config.StringVariable(acctest.CtResourceValue1Updated), + acctest.CtResourceKey2: config.StringVariable(acctest.CtResourceValue2), + }), + "rBgpAsn": config.IntegerVariable(rBgpAsn), + "rIPAddress": config.StringVariable(rIPAddress), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckSiteToSiteVPNAttachmentExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1Updated), + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtProviderKey1: knownvalue.StringExact(acctest.CtProviderValue1Updated), + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1Updated), + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1Updated), + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtProviderKey1: knownvalue.StringExact(acctest.CtProviderValue1Updated), + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1Updated), + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/SiteToSiteVPNAttachment/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtProviderKey1: config.StringVariable(acctest.CtProviderValue1Updated), + }), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtResourceKey1: config.StringVariable(acctest.CtResourceValue1Updated), + acctest.CtResourceKey2: config.StringVariable(acctest.CtResourceValue2), + }), + "rBgpAsn": config.IntegerVariable(rBgpAsn), + "rIPAddress": config.StringVariable(rIPAddress), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/SiteToSiteVPNAttachment/tags/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtResourceTags: nil, + "rBgpAsn": config.IntegerVariable(rBgpAsn), + "rIPAddress": config.StringVariable(rIPAddress), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckSiteToSiteVPNAttachmentExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{})), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{})), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{})), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{})), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/SiteToSiteVPNAttachment/tags/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtResourceTags: nil, + "rBgpAsn": config.IntegerVariable(rBgpAsn), + "rIPAddress": config.StringVariable(rIPAddress), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} + +func TestAccNetworkManagerSiteToSiteVPNAttachment_tags_DefaultTags_overlapping(t *testing.T) { + ctx := acctest.Context(t) + var v awstypes.SiteToSiteVpnAttachment + resourceName := "aws_networkmanager_site_to_site_vpn_attachment.test" + rName := acctest.RandomWithPrefix(t, acctest.ResourcePrefix) + rBgpAsn := sdkacctest.RandIntRange(64512, 65534) + rIPAddress, err := sdkacctest.RandIpAddress("172.0.0.0/24") + if err != nil { + t.Fatal(err) + } + + acctest.ParallelTest(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckSiteToSiteVPNAttachmentDestroy(ctx), + Steps: []resource.TestStep{ + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/SiteToSiteVPNAttachment/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtOverlapKey1: config.StringVariable(acctest.CtProviderValue1), + }), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtOverlapKey1: config.StringVariable(acctest.CtResourceValue1), + }), + "rBgpAsn": config.IntegerVariable(rBgpAsn), + "rIPAddress": config.StringVariable(rIPAddress), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckSiteToSiteVPNAttachmentExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtOverlapKey1: knownvalue.StringExact(acctest.CtResourceValue1), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtOverlapKey1: knownvalue.StringExact(acctest.CtResourceValue1), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtOverlapKey1: knownvalue.StringExact(acctest.CtResourceValue1), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtOverlapKey1: knownvalue.StringExact(acctest.CtResourceValue1), + })), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/SiteToSiteVPNAttachment/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtOverlapKey1: config.StringVariable(acctest.CtProviderValue1), + }), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtOverlapKey1: config.StringVariable(acctest.CtResourceValue1), + }), + "rBgpAsn": config.IntegerVariable(rBgpAsn), + "rIPAddress": config.StringVariable(rIPAddress), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/SiteToSiteVPNAttachment/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtOverlapKey1: config.StringVariable(acctest.CtProviderValue1), + acctest.CtOverlapKey2: config.StringVariable("providervalue2"), + }), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtOverlapKey1: config.StringVariable(acctest.CtResourceValue1), + acctest.CtOverlapKey2: config.StringVariable(acctest.CtResourceValue2), + }), + "rBgpAsn": config.IntegerVariable(rBgpAsn), + "rIPAddress": config.StringVariable(rIPAddress), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckSiteToSiteVPNAttachmentExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtOverlapKey1: knownvalue.StringExact(acctest.CtResourceValue1), + acctest.CtOverlapKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtOverlapKey1: knownvalue.StringExact(acctest.CtResourceValue1), + acctest.CtOverlapKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtOverlapKey1: knownvalue.StringExact(acctest.CtResourceValue1), + acctest.CtOverlapKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtOverlapKey1: knownvalue.StringExact(acctest.CtResourceValue1), + acctest.CtOverlapKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/SiteToSiteVPNAttachment/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtOverlapKey1: config.StringVariable(acctest.CtProviderValue1), + acctest.CtOverlapKey2: config.StringVariable("providervalue2"), + }), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtOverlapKey1: config.StringVariable(acctest.CtResourceValue1), + acctest.CtOverlapKey2: config.StringVariable(acctest.CtResourceValue2), + }), + "rBgpAsn": config.IntegerVariable(rBgpAsn), + "rIPAddress": config.StringVariable(rIPAddress), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/SiteToSiteVPNAttachment/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtOverlapKey1: config.StringVariable(acctest.CtProviderValue1), + }), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtOverlapKey1: config.StringVariable(acctest.CtResourceValue2), + }), + "rBgpAsn": config.IntegerVariable(rBgpAsn), + "rIPAddress": config.StringVariable(rIPAddress), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckSiteToSiteVPNAttachmentExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtOverlapKey1: knownvalue.StringExact(acctest.CtResourceValue2), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtOverlapKey1: knownvalue.StringExact(acctest.CtResourceValue2), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtOverlapKey1: knownvalue.StringExact(acctest.CtResourceValue2), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtOverlapKey1: knownvalue.StringExact(acctest.CtResourceValue2), + })), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/SiteToSiteVPNAttachment/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtOverlapKey1: config.StringVariable(acctest.CtProviderValue1), + }), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtOverlapKey1: config.StringVariable(acctest.CtResourceValue2), + }), + "rBgpAsn": config.IntegerVariable(rBgpAsn), + "rIPAddress": config.StringVariable(rIPAddress), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} + +func TestAccNetworkManagerSiteToSiteVPNAttachment_tags_DefaultTags_updateToProviderOnly(t *testing.T) { + ctx := acctest.Context(t) + var v awstypes.SiteToSiteVpnAttachment + resourceName := "aws_networkmanager_site_to_site_vpn_attachment.test" + rName := acctest.RandomWithPrefix(t, acctest.ResourcePrefix) + rBgpAsn := sdkacctest.RandIntRange(64512, 65534) + rIPAddress, err := sdkacctest.RandIpAddress("172.0.0.0/24") + if err != nil { + t.Fatal(err) + } + + acctest.ParallelTest(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckSiteToSiteVPNAttachmentDestroy(ctx), + Steps: []resource.TestStep{ + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/SiteToSiteVPNAttachment/tags/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + "rBgpAsn": config.IntegerVariable(rBgpAsn), + "rIPAddress": config.StringVariable(rIPAddress), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckSiteToSiteVPNAttachmentExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/SiteToSiteVPNAttachment/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + acctest.CtResourceTags: nil, + "rBgpAsn": config.IntegerVariable(rBgpAsn), + "rIPAddress": config.StringVariable(rIPAddress), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckSiteToSiteVPNAttachmentExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{})), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{})), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/SiteToSiteVPNAttachment/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + acctest.CtResourceTags: nil, + "rBgpAsn": config.IntegerVariable(rBgpAsn), + "rIPAddress": config.StringVariable(rIPAddress), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} + +func TestAccNetworkManagerSiteToSiteVPNAttachment_tags_DefaultTags_updateToResourceOnly(t *testing.T) { + ctx := acctest.Context(t) + var v awstypes.SiteToSiteVpnAttachment + resourceName := "aws_networkmanager_site_to_site_vpn_attachment.test" + rName := acctest.RandomWithPrefix(t, acctest.ResourcePrefix) + rBgpAsn := sdkacctest.RandIntRange(64512, 65534) + rIPAddress, err := sdkacctest.RandIpAddress("172.0.0.0/24") + if err != nil { + t.Fatal(err) + } + + acctest.ParallelTest(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckSiteToSiteVPNAttachmentDestroy(ctx), + Steps: []resource.TestStep{ + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/SiteToSiteVPNAttachment/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + acctest.CtResourceTags: nil, + "rBgpAsn": config.IntegerVariable(rBgpAsn), + "rIPAddress": config.StringVariable(rIPAddress), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckSiteToSiteVPNAttachmentExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.Null()), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.Null()), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/SiteToSiteVPNAttachment/tags/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + "rBgpAsn": config.IntegerVariable(rBgpAsn), + "rIPAddress": config.StringVariable(rIPAddress), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckSiteToSiteVPNAttachmentExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionNoop), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/SiteToSiteVPNAttachment/tags/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + "rBgpAsn": config.IntegerVariable(rBgpAsn), + "rIPAddress": config.StringVariable(rIPAddress), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} + +func TestAccNetworkManagerSiteToSiteVPNAttachment_tags_DefaultTags_emptyResourceTag(t *testing.T) { + t.Skip("Resource SiteToSiteVPNAttachment does not support empty tags") + + ctx := acctest.Context(t) + var v awstypes.SiteToSiteVpnAttachment + resourceName := "aws_networkmanager_site_to_site_vpn_attachment.test" + rName := acctest.RandomWithPrefix(t, acctest.ResourcePrefix) + rBgpAsn := sdkacctest.RandIntRange(64512, 65534) + rIPAddress, err := sdkacctest.RandIpAddress("172.0.0.0/24") + if err != nil { + t.Fatal(err) + } + + acctest.ParallelTest(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckSiteToSiteVPNAttachmentDestroy(ctx), + Steps: []resource.TestStep{ + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/SiteToSiteVPNAttachment/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(""), + }), + "rBgpAsn": config.IntegerVariable(rBgpAsn), + "rIPAddress": config.StringVariable(rIPAddress), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckSiteToSiteVPNAttachmentExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(""), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(""), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(""), + })), + // TODO: Should be known + plancheck.ExpectUnknownValue(resourceName, tfjsonpath.New(names.AttrTagsAll)), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/SiteToSiteVPNAttachment/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(""), + }), + "rBgpAsn": config.IntegerVariable(rBgpAsn), + "rIPAddress": config.StringVariable(rIPAddress), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} + +func TestAccNetworkManagerSiteToSiteVPNAttachment_tags_DefaultTags_emptyProviderOnlyTag(t *testing.T) { + t.Skip("Resource SiteToSiteVPNAttachment does not support empty tags") + + ctx := acctest.Context(t) + var v awstypes.SiteToSiteVpnAttachment + resourceName := "aws_networkmanager_site_to_site_vpn_attachment.test" + rName := acctest.RandomWithPrefix(t, acctest.ResourcePrefix) + rBgpAsn := sdkacctest.RandIntRange(64512, 65534) + rIPAddress, err := sdkacctest.RandIpAddress("172.0.0.0/24") + if err != nil { + t.Fatal(err) + } + + acctest.ParallelTest(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckSiteToSiteVPNAttachmentDestroy(ctx), + Steps: []resource.TestStep{ + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/SiteToSiteVPNAttachment/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(""), + }), + acctest.CtResourceTags: nil, + "rBgpAsn": config.IntegerVariable(rBgpAsn), + "rIPAddress": config.StringVariable(rIPAddress), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckSiteToSiteVPNAttachmentExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.Null()), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(""), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.Null()), + // TODO: Should be known + plancheck.ExpectUnknownValue(resourceName, tfjsonpath.New(names.AttrTagsAll)), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/SiteToSiteVPNAttachment/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(""), + }), + acctest.CtResourceTags: nil, + "rBgpAsn": config.IntegerVariable(rBgpAsn), + "rIPAddress": config.StringVariable(rIPAddress), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} + +func TestAccNetworkManagerSiteToSiteVPNAttachment_tags_DefaultTags_nullOverlappingResourceTag(t *testing.T) { + ctx := acctest.Context(t) + var v awstypes.SiteToSiteVpnAttachment + resourceName := "aws_networkmanager_site_to_site_vpn_attachment.test" + rName := acctest.RandomWithPrefix(t, acctest.ResourcePrefix) + rBgpAsn := sdkacctest.RandIntRange(64512, 65534) + rIPAddress, err := sdkacctest.RandIpAddress("172.0.0.0/24") + if err != nil { + t.Fatal(err) + } + + acctest.ParallelTest(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckSiteToSiteVPNAttachmentDestroy(ctx), + Steps: []resource.TestStep{ + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/SiteToSiteVPNAttachment/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtProviderValue1), + }), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: nil, + }), + "rBgpAsn": config.IntegerVariable(rBgpAsn), + "rIPAddress": config.StringVariable(rIPAddress), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckSiteToSiteVPNAttachmentExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.Null()), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtProviderValue1), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.Null()), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtProviderValue1), + })), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/SiteToSiteVPNAttachment/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtProviderValue1), + }), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: nil, + }), + "rBgpAsn": config.IntegerVariable(rBgpAsn), + "rIPAddress": config.StringVariable(rIPAddress), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} + +func TestAccNetworkManagerSiteToSiteVPNAttachment_tags_DefaultTags_nullNonOverlappingResourceTag(t *testing.T) { + ctx := acctest.Context(t) + var v awstypes.SiteToSiteVpnAttachment + resourceName := "aws_networkmanager_site_to_site_vpn_attachment.test" + rName := acctest.RandomWithPrefix(t, acctest.ResourcePrefix) + rBgpAsn := sdkacctest.RandIntRange(64512, 65534) + rIPAddress, err := sdkacctest.RandIpAddress("172.0.0.0/24") + if err != nil { + t.Fatal(err) + } + + acctest.ParallelTest(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckSiteToSiteVPNAttachmentDestroy(ctx), + Steps: []resource.TestStep{ + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/SiteToSiteVPNAttachment/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtProviderKey1: config.StringVariable(acctest.CtProviderValue1), + }), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtResourceKey1: nil, + }), + "rBgpAsn": config.IntegerVariable(rBgpAsn), + "rIPAddress": config.StringVariable(rIPAddress), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckSiteToSiteVPNAttachmentExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.Null()), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtProviderKey1: knownvalue.StringExact(acctest.CtProviderValue1), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.Null()), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtProviderKey1: knownvalue.StringExact(acctest.CtProviderValue1), + })), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/SiteToSiteVPNAttachment/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtProviderKey1: config.StringVariable(acctest.CtProviderValue1), + }), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtResourceKey1: nil, + }), + "rBgpAsn": config.IntegerVariable(rBgpAsn), + "rIPAddress": config.StringVariable(rIPAddress), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} + +func TestAccNetworkManagerSiteToSiteVPNAttachment_tags_ComputedTag_OnCreate(t *testing.T) { + ctx := acctest.Context(t) + var v awstypes.SiteToSiteVpnAttachment + resourceName := "aws_networkmanager_site_to_site_vpn_attachment.test" + rName := acctest.RandomWithPrefix(t, acctest.ResourcePrefix) + rBgpAsn := sdkacctest.RandIntRange(64512, 65534) + rIPAddress, err := sdkacctest.RandIpAddress("172.0.0.0/24") + if err != nil { + t.Fatal(err) + } + + acctest.ParallelTest(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckSiteToSiteVPNAttachmentDestroy(ctx), + Steps: []resource.TestStep{ + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/SiteToSiteVPNAttachment/tagsComputed1/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + "unknownTagKey": config.StringVariable("computedkey1"), + "rBgpAsn": config.IntegerVariable(rBgpAsn), + "rIPAddress": config.StringVariable(rIPAddress), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckSiteToSiteVPNAttachmentExists(ctx, resourceName, &v), + resource.TestCheckResourceAttrPair(resourceName, "tags.computedkey1", "null_resource.test", names.AttrID), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapSizeExact(1)), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapSizeExact(1)), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectUnknownValue(resourceName, tfjsonpath.New(names.AttrTags)), + plancheck.ExpectUnknownValue(resourceName, tfjsonpath.New(names.AttrTagsAll)), + }, + PostApplyPreRefresh: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionNoop), + }, + PostApplyPostRefresh: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionNoop), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/SiteToSiteVPNAttachment/tagsComputed1/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + "unknownTagKey": config.StringVariable("computedkey1"), + "rBgpAsn": config.IntegerVariable(rBgpAsn), + "rIPAddress": config.StringVariable(rIPAddress), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} + +func TestAccNetworkManagerSiteToSiteVPNAttachment_tags_ComputedTag_OnUpdate_Add(t *testing.T) { + ctx := acctest.Context(t) + var v awstypes.SiteToSiteVpnAttachment + resourceName := "aws_networkmanager_site_to_site_vpn_attachment.test" + rName := acctest.RandomWithPrefix(t, acctest.ResourcePrefix) + rBgpAsn := sdkacctest.RandIntRange(64512, 65534) + rIPAddress, err := sdkacctest.RandIpAddress("172.0.0.0/24") + if err != nil { + t.Fatal(err) + } + + acctest.ParallelTest(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckSiteToSiteVPNAttachmentDestroy(ctx), + Steps: []resource.TestStep{ + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/SiteToSiteVPNAttachment/tags/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + "rBgpAsn": config.IntegerVariable(rBgpAsn), + "rIPAddress": config.StringVariable(rIPAddress), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckSiteToSiteVPNAttachmentExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/SiteToSiteVPNAttachment/tagsComputed2/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + "unknownTagKey": config.StringVariable("computedkey1"), + "knownTagKey": config.StringVariable(acctest.CtKey1), + "knownTagValue": config.StringVariable(acctest.CtValue1), + "rBgpAsn": config.IntegerVariable(rBgpAsn), + "rIPAddress": config.StringVariable(rIPAddress), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckSiteToSiteVPNAttachmentExists(ctx, resourceName, &v), + resource.TestCheckResourceAttrPair(resourceName, "tags.computedkey1", "null_resource.test", names.AttrID), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapSizeExact(2)), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapPartial(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapSizeExact(2)), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapPartial(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectUnknownValue(resourceName, tfjsonpath.New(names.AttrTags)), + plancheck.ExpectUnknownValue(resourceName, tfjsonpath.New(names.AttrTagsAll)), + }, + PostApplyPreRefresh: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionNoop), + }, + PostApplyPostRefresh: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionNoop), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/SiteToSiteVPNAttachment/tagsComputed2/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + "unknownTagKey": config.StringVariable("computedkey1"), + "knownTagKey": config.StringVariable(acctest.CtKey1), + "knownTagValue": config.StringVariable(acctest.CtValue1), + "rBgpAsn": config.IntegerVariable(rBgpAsn), + "rIPAddress": config.StringVariable(rIPAddress), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} + +func TestAccNetworkManagerSiteToSiteVPNAttachment_tags_ComputedTag_OnUpdate_Replace(t *testing.T) { + ctx := acctest.Context(t) + var v awstypes.SiteToSiteVpnAttachment + resourceName := "aws_networkmanager_site_to_site_vpn_attachment.test" + rName := acctest.RandomWithPrefix(t, acctest.ResourcePrefix) + rBgpAsn := sdkacctest.RandIntRange(64512, 65534) + rIPAddress, err := sdkacctest.RandIpAddress("172.0.0.0/24") + if err != nil { + t.Fatal(err) + } + + acctest.ParallelTest(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckSiteToSiteVPNAttachmentDestroy(ctx), + Steps: []resource.TestStep{ + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/SiteToSiteVPNAttachment/tags/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + "rBgpAsn": config.IntegerVariable(rBgpAsn), + "rIPAddress": config.StringVariable(rIPAddress), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckSiteToSiteVPNAttachmentExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/SiteToSiteVPNAttachment/tagsComputed1/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + "unknownTagKey": config.StringVariable(acctest.CtKey1), + "rBgpAsn": config.IntegerVariable(rBgpAsn), + "rIPAddress": config.StringVariable(rIPAddress), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckSiteToSiteVPNAttachmentExists(ctx, resourceName, &v), + resource.TestCheckResourceAttrPair(resourceName, acctest.CtTagsKey1, "null_resource.test", names.AttrID), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapSizeExact(1)), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapSizeExact(1)), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectUnknownValue(resourceName, tfjsonpath.New(names.AttrTags)), + plancheck.ExpectUnknownValue(resourceName, tfjsonpath.New(names.AttrTagsAll)), + }, + PostApplyPreRefresh: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionNoop), + }, + PostApplyPostRefresh: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionNoop), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/SiteToSiteVPNAttachment/tagsComputed1/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + "unknownTagKey": config.StringVariable(acctest.CtKey1), + "rBgpAsn": config.IntegerVariable(rBgpAsn), + "rIPAddress": config.StringVariable(rIPAddress), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} + +func TestAccNetworkManagerSiteToSiteVPNAttachment_tags_IgnoreTags_Overlap_DefaultTag(t *testing.T) { + ctx := acctest.Context(t) + var v awstypes.SiteToSiteVpnAttachment + resourceName := "aws_networkmanager_site_to_site_vpn_attachment.test" + rName := acctest.RandomWithPrefix(t, acctest.ResourcePrefix) + rBgpAsn := sdkacctest.RandIntRange(64512, 65534) + rIPAddress, err := sdkacctest.RandIpAddress("172.0.0.0/24") + if err != nil { + t.Fatal(err) + } + + acctest.ParallelTest(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckSiteToSiteVPNAttachmentDestroy(ctx), + Steps: []resource.TestStep{ + // 1: Create + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/SiteToSiteVPNAttachment/tags_ignore/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtProviderKey1: config.StringVariable(acctest.CtProviderValue1), + }), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtResourceKey1: config.StringVariable(acctest.CtResourceValue1), + }), + "ignore_tag_keys": config.SetVariable( + config.StringVariable(acctest.CtProviderKey1), + ), + "rBgpAsn": config.IntegerVariable(rBgpAsn), + "rIPAddress": config.StringVariable(rIPAddress), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckSiteToSiteVPNAttachmentExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), + })), + expectFullResourceTags(ctx, resourceName, knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtProviderKey1: knownvalue.StringExact(acctest.CtProviderValue1), // TODO: Should not be set + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), + })), + }, + PostApplyPreRefresh: []plancheck.PlanCheck{ + plancheck.ExpectEmptyPlan(), + }, + PostApplyPostRefresh: []plancheck.PlanCheck{ + plancheck.ExpectEmptyPlan(), + }, + }, + }, + // 2: Update ignored tag only + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/SiteToSiteVPNAttachment/tags_ignore/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtProviderKey1: config.StringVariable(acctest.CtProviderValue1Updated), + }), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtResourceKey1: config.StringVariable(acctest.CtResourceValue1), + }), + "ignore_tag_keys": config.SetVariable( + config.StringVariable(acctest.CtProviderKey1), + ), + "rBgpAsn": config.IntegerVariable(rBgpAsn), + "rIPAddress": config.StringVariable(rIPAddress), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckSiteToSiteVPNAttachmentExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), + })), + expectFullResourceTags(ctx, resourceName, knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtProviderKey1: knownvalue.StringExact(acctest.CtProviderValue1), // TODO: Should not be set + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionNoop), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), + })), + }, + PostApplyPreRefresh: []plancheck.PlanCheck{ + plancheck.ExpectEmptyPlan(), + }, + PostApplyPostRefresh: []plancheck.PlanCheck{ + plancheck.ExpectEmptyPlan(), + }, + }, + }, + // 3: Update both tags + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/SiteToSiteVPNAttachment/tags_ignore/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtProviderKey1: config.StringVariable(acctest.CtProviderValue1Again), + }), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtResourceKey1: config.StringVariable(acctest.CtResourceValue1Updated), + }), + "ignore_tag_keys": config.SetVariable( + config.StringVariable(acctest.CtProviderKey1), + ), + "rBgpAsn": config.IntegerVariable(rBgpAsn), + "rIPAddress": config.StringVariable(rIPAddress), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckSiteToSiteVPNAttachmentExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1Updated), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1Updated), + })), + expectFullResourceTags(ctx, resourceName, knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtProviderKey1: knownvalue.StringExact(acctest.CtProviderValue1), // TODO: Should not be set + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1Updated), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1Updated), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1Updated), + })), + }, + PostApplyPreRefresh: []plancheck.PlanCheck{ + plancheck.ExpectEmptyPlan(), + }, + PostApplyPostRefresh: []plancheck.PlanCheck{ + plancheck.ExpectEmptyPlan(), + }, + }, + }, + }, + }) +} + +func TestAccNetworkManagerSiteToSiteVPNAttachment_tags_IgnoreTags_Overlap_ResourceTag(t *testing.T) { + ctx := acctest.Context(t) + var v awstypes.SiteToSiteVpnAttachment + resourceName := "aws_networkmanager_site_to_site_vpn_attachment.test" + rName := acctest.RandomWithPrefix(t, acctest.ResourcePrefix) + rBgpAsn := sdkacctest.RandIntRange(64512, 65534) + rIPAddress, err := sdkacctest.RandIpAddress("172.0.0.0/24") + if err != nil { + t.Fatal(err) + } + + acctest.ParallelTest(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckSiteToSiteVPNAttachmentDestroy(ctx), + Steps: []resource.TestStep{ + // 1: Create + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/SiteToSiteVPNAttachment/tags_ignore/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtResourceKey1: config.StringVariable(acctest.CtResourceValue1), + acctest.CtResourceKey2: config.StringVariable(acctest.CtResourceValue2), + }), + "ignore_tag_keys": config.SetVariable( + config.StringVariable(acctest.CtResourceKey1), + ), + "rBgpAsn": config.IntegerVariable(rBgpAsn), + "rIPAddress": config.StringVariable(rIPAddress), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckSiteToSiteVPNAttachmentExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + expectFullResourceTags(ctx, resourceName, knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), // TODO: Should not be set + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + }, + PostApplyPreRefresh: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + }, + PostApplyPostRefresh: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + }, + }, + ExpectNonEmptyPlan: true, + }, + // 2: Update ignored tag + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/SiteToSiteVPNAttachment/tags_ignore/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtResourceKey1: config.StringVariable(acctest.CtResourceValue1Updated), + acctest.CtResourceKey2: config.StringVariable(acctest.CtResourceValue2), + }), + "ignore_tag_keys": config.SetVariable( + config.StringVariable(acctest.CtResourceKey1), + ), + "rBgpAsn": config.IntegerVariable(rBgpAsn), + "rIPAddress": config.StringVariable(rIPAddress), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckSiteToSiteVPNAttachmentExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + expectFullResourceTags(ctx, resourceName, knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), // TODO: Should not be set + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1Updated), + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + }, + PostApplyPreRefresh: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1Updated), + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + }, + PostApplyPostRefresh: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1Updated), + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + }, + }, + ExpectNonEmptyPlan: true, + }, + // 3: Update both tags + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/SiteToSiteVPNAttachment/tags_ignore/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtResourceKey1: config.StringVariable(acctest.CtResourceValue1Again), + acctest.CtResourceKey2: config.StringVariable(acctest.CtResourceValue2Updated), + }), + "ignore_tag_keys": config.SetVariable( + config.StringVariable(acctest.CtResourceKey1), + ), + "rBgpAsn": config.IntegerVariable(rBgpAsn), + "rIPAddress": config.StringVariable(rIPAddress), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckSiteToSiteVPNAttachmentExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2Updated), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2Updated), + })), + expectFullResourceTags(ctx, resourceName, knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), // TODO: Should not be set + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2Updated), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1Again), + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2Updated), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2Updated), + })), + }, + PostApplyPreRefresh: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1Again), + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2Updated), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2Updated), + })), + }, + PostApplyPostRefresh: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1Again), + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2Updated), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2Updated), + })), + }, + }, + ExpectNonEmptyPlan: true, + }, + }, + }) +} diff --git a/internal/service/networkmanager/site_to_site_vpn_attachment_test.go b/internal/service/networkmanager/site_to_site_vpn_attachment_test.go index 48f5f1606883..704b6f80eee0 100644 --- a/internal/service/networkmanager/site_to_site_vpn_attachment_test.go +++ b/internal/service/networkmanager/site_to_site_vpn_attachment_test.go @@ -96,57 +96,6 @@ func TestAccNetworkManagerSiteToSiteVPNAttachment_disappears(t *testing.T) { }) } -func TestAccNetworkManagerSiteToSiteVPNAttachment_tags(t *testing.T) { - ctx := acctest.Context(t) - var v awstypes.SiteToSiteVpnAttachment - resourceName := "aws_networkmanager_site_to_site_vpn_attachment.test" - rName := sdkacctest.RandomWithPrefix(acctest.ResourcePrefix) - bgpASN := sdkacctest.RandIntRange(64512, 65534) - vpnIP, err := sdkacctest.RandIpAddress("172.0.0.0/24") - if err != nil { - t.Fatal(err) - } - - resource.ParallelTest(t, resource.TestCase{ - PreCheck: func() { acctest.PreCheck(ctx, t) }, - ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), - ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, - CheckDestroy: testAccCheckSiteToSiteVPNAttachmentDestroy(ctx), - Steps: []resource.TestStep{ - { - Config: testAccSiteToSiteVPNAttachmentConfig_tags1(rName, vpnIP, "segment", "shared", bgpASN), - Check: resource.ComposeTestCheckFunc( - testAccCheckSiteToSiteVPNAttachmentExists(ctx, resourceName, &v), - resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, "1"), - resource.TestCheckResourceAttr(resourceName, "tags.segment", "shared"), - ), - }, - { - Config: testAccSiteToSiteVPNAttachmentConfig_tags2(rName, vpnIP, "segment", "shared", "Name", "test", bgpASN), - Check: resource.ComposeTestCheckFunc( - testAccCheckSiteToSiteVPNAttachmentExists(ctx, resourceName, &v), - resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, "2"), - resource.TestCheckResourceAttr(resourceName, "tags.segment", "shared"), - resource.TestCheckResourceAttr(resourceName, "tags.Name", "test"), - ), - }, - { - Config: testAccSiteToSiteVPNAttachmentConfig_tags1(rName, vpnIP, "segment", "shared", bgpASN), - Check: resource.ComposeTestCheckFunc( - testAccCheckSiteToSiteVPNAttachmentExists(ctx, resourceName, &v), - resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, "1"), - resource.TestCheckResourceAttr(resourceName, "tags.segment", "shared"), - ), - }, - { - ResourceName: resourceName, - ImportState: true, - ImportStateVerify: true, - }, - }, - }) -} - func testAccCheckSiteToSiteVPNAttachmentExists(ctx context.Context, n string, v *awstypes.SiteToSiteVpnAttachment) resource.TestCheckFunc { return func(s *terraform.State) error { rs, ok := s.RootModule().Resources[n] @@ -196,8 +145,6 @@ func testAccCheckSiteToSiteVPNAttachmentDestroy(ctx context.Context) resource.Te func testAccSiteToSiteVPNAttachmentConfig_base(rName string, bgpASN int, vpnIP string) string { return acctest.ConfigCompose(acctest.ConfigAvailableAZsNoOptIn(), fmt.Sprintf(` -data "aws_region" "current" {} - resource "aws_customer_gateway" "test" { bgp_asn = %[2]d ip_address = %[3]q @@ -237,6 +184,8 @@ resource "aws_networkmanager_core_network_policy_attachment" "test" { policy_document = data.aws_networkmanager_core_network_policy_document.test.json } +data "aws_region" "current" {} + data "aws_networkmanager_core_network_policy_document" "test" { core_network_configuration { vpn_ecmp_support = false diff --git a/internal/service/networkmanager/testdata/SiteToSiteVPNAttachment/tags/main_gen.tf b/internal/service/networkmanager/testdata/SiteToSiteVPNAttachment/tags/main_gen.tf new file mode 100644 index 000000000000..2c9435a9da94 --- /dev/null +++ b/internal/service/networkmanager/testdata/SiteToSiteVPNAttachment/tags/main_gen.tf @@ -0,0 +1,121 @@ +# Copyright (c) HashiCorp, Inc. +# SPDX-License-Identifier: MPL-2.0 + +resource "aws_networkmanager_site_to_site_vpn_attachment" "test" { + core_network_id = aws_networkmanager_core_network_policy_attachment.test.core_network_id + vpn_connection_arn = aws_vpn_connection.test.arn + + tags = var.resource_tags +} + +resource "aws_networkmanager_attachment_accepter" "test" { + attachment_id = aws_networkmanager_site_to_site_vpn_attachment.test.id + attachment_type = aws_networkmanager_site_to_site_vpn_attachment.test.attachment_type +} + +# testAccSiteToSiteVPNAttachmentConfig_base + +resource "aws_customer_gateway" "test" { + bgp_asn = var.rBgpAsn + ip_address = var.rIPAddress + type = "ipsec.1" + device_name = var.rName +} + +resource "aws_vpn_connection" "test" { + customer_gateway_id = aws_customer_gateway.test.id + type = "ipsec.1" +} + +resource "aws_networkmanager_global_network" "test" {} + +resource "aws_networkmanager_core_network" "test" { + global_network_id = aws_networkmanager_global_network.test.id +} + +resource "aws_networkmanager_core_network_policy_attachment" "test" { + core_network_id = aws_networkmanager_core_network.test.id + policy_document = data.aws_networkmanager_core_network_policy_document.test.json +} + +data "aws_region" "current" {} + +data "aws_networkmanager_core_network_policy_document" "test" { + core_network_configuration { + vpn_ecmp_support = false + asn_ranges = ["64512-64555"] + edge_locations { + location = data.aws_region.current.region + asn = 64512 + } + } + + segments { + name = "shared" + description = "SegmentForSharedServices" + require_attachment_acceptance = true + } + + segment_actions { + action = "share" + mode = "attachment-route" + segment = "shared" + share_with = ["*"] + } + + attachment_policies { + rule_number = 1 + condition_logic = "or" + + conditions { + type = "tag-value" + operator = "equals" + key = "segment" + value = "shared" + } + + action { + association_method = "constant" + segment = "shared" + } + } +} + +# acctest.ConfigAvailableAZsNoOptInDefaultExclude + +data "aws_availability_zones" "available" { + exclude_zone_ids = local.default_exclude_zone_ids + state = "available" + + filter { + name = "opt-in-status" + values = ["opt-in-not-required"] + } +} + +locals { + default_exclude_zone_ids = ["usw2-az4", "usgw1-az2"] +} + +variable "rName" { + description = "Name for resource" + type = string + nullable = false +} + +variable "rBgpAsn" { + type = string + nullable = false +} + +variable "rIPAddress" { + type = string + nullable = false +} + +variable "resource_tags" { + description = "Tags to set on resource. To specify no tags, set to `null`" + # Not setting a default, so that this must explicitly be set to `null` to specify no tags + type = map(string) + nullable = true +} diff --git a/internal/service/networkmanager/testdata/SiteToSiteVPNAttachment/tagsComputed1/main_gen.tf b/internal/service/networkmanager/testdata/SiteToSiteVPNAttachment/tagsComputed1/main_gen.tf new file mode 100644 index 000000000000..af7edf49359f --- /dev/null +++ b/internal/service/networkmanager/testdata/SiteToSiteVPNAttachment/tagsComputed1/main_gen.tf @@ -0,0 +1,125 @@ +# Copyright (c) HashiCorp, Inc. +# SPDX-License-Identifier: MPL-2.0 + +provider "null" {} + +resource "aws_networkmanager_site_to_site_vpn_attachment" "test" { + core_network_id = aws_networkmanager_core_network_policy_attachment.test.core_network_id + vpn_connection_arn = aws_vpn_connection.test.arn + + tags = { + (var.unknownTagKey) = null_resource.test.id + } +} + +resource "aws_networkmanager_attachment_accepter" "test" { + attachment_id = aws_networkmanager_site_to_site_vpn_attachment.test.id + attachment_type = aws_networkmanager_site_to_site_vpn_attachment.test.attachment_type +} + +# testAccSiteToSiteVPNAttachmentConfig_base + +resource "aws_customer_gateway" "test" { + bgp_asn = var.rBgpAsn + ip_address = var.rIPAddress + type = "ipsec.1" + device_name = var.rName +} + +resource "aws_vpn_connection" "test" { + customer_gateway_id = aws_customer_gateway.test.id + type = "ipsec.1" +} + +resource "aws_networkmanager_global_network" "test" {} + +resource "aws_networkmanager_core_network" "test" { + global_network_id = aws_networkmanager_global_network.test.id +} + +resource "aws_networkmanager_core_network_policy_attachment" "test" { + core_network_id = aws_networkmanager_core_network.test.id + policy_document = data.aws_networkmanager_core_network_policy_document.test.json +} + +data "aws_region" "current" {} + +data "aws_networkmanager_core_network_policy_document" "test" { + core_network_configuration { + vpn_ecmp_support = false + asn_ranges = ["64512-64555"] + edge_locations { + location = data.aws_region.current.region + asn = 64512 + } + } + + segments { + name = "shared" + description = "SegmentForSharedServices" + require_attachment_acceptance = true + } + + segment_actions { + action = "share" + mode = "attachment-route" + segment = "shared" + share_with = ["*"] + } + + attachment_policies { + rule_number = 1 + condition_logic = "or" + + conditions { + type = "tag-value" + operator = "equals" + key = "segment" + value = "shared" + } + + action { + association_method = "constant" + segment = "shared" + } + } +} + +# acctest.ConfigAvailableAZsNoOptInDefaultExclude + +data "aws_availability_zones" "available" { + exclude_zone_ids = local.default_exclude_zone_ids + state = "available" + + filter { + name = "opt-in-status" + values = ["opt-in-not-required"] + } +} + +locals { + default_exclude_zone_ids = ["usw2-az4", "usgw1-az2"] +} + +resource "null_resource" "test" {} + +variable "rName" { + description = "Name for resource" + type = string + nullable = false +} + +variable "rBgpAsn" { + type = string + nullable = false +} + +variable "rIPAddress" { + type = string + nullable = false +} + +variable "unknownTagKey" { + type = string + nullable = false +} diff --git a/internal/service/networkmanager/testdata/SiteToSiteVPNAttachment/tagsComputed2/main_gen.tf b/internal/service/networkmanager/testdata/SiteToSiteVPNAttachment/tagsComputed2/main_gen.tf new file mode 100644 index 000000000000..f173b6c6b965 --- /dev/null +++ b/internal/service/networkmanager/testdata/SiteToSiteVPNAttachment/tagsComputed2/main_gen.tf @@ -0,0 +1,136 @@ +# Copyright (c) HashiCorp, Inc. +# SPDX-License-Identifier: MPL-2.0 + +provider "null" {} + +resource "aws_networkmanager_site_to_site_vpn_attachment" "test" { + core_network_id = aws_networkmanager_core_network_policy_attachment.test.core_network_id + vpn_connection_arn = aws_vpn_connection.test.arn + + tags = { + (var.unknownTagKey) = null_resource.test.id + (var.knownTagKey) = var.knownTagValue + } +} + +resource "aws_networkmanager_attachment_accepter" "test" { + attachment_id = aws_networkmanager_site_to_site_vpn_attachment.test.id + attachment_type = aws_networkmanager_site_to_site_vpn_attachment.test.attachment_type +} + +# testAccSiteToSiteVPNAttachmentConfig_base + +resource "aws_customer_gateway" "test" { + bgp_asn = var.rBgpAsn + ip_address = var.rIPAddress + type = "ipsec.1" + device_name = var.rName +} + +resource "aws_vpn_connection" "test" { + customer_gateway_id = aws_customer_gateway.test.id + type = "ipsec.1" +} + +resource "aws_networkmanager_global_network" "test" {} + +resource "aws_networkmanager_core_network" "test" { + global_network_id = aws_networkmanager_global_network.test.id +} + +resource "aws_networkmanager_core_network_policy_attachment" "test" { + core_network_id = aws_networkmanager_core_network.test.id + policy_document = data.aws_networkmanager_core_network_policy_document.test.json +} + +data "aws_region" "current" {} + +data "aws_networkmanager_core_network_policy_document" "test" { + core_network_configuration { + vpn_ecmp_support = false + asn_ranges = ["64512-64555"] + edge_locations { + location = data.aws_region.current.region + asn = 64512 + } + } + + segments { + name = "shared" + description = "SegmentForSharedServices" + require_attachment_acceptance = true + } + + segment_actions { + action = "share" + mode = "attachment-route" + segment = "shared" + share_with = ["*"] + } + + attachment_policies { + rule_number = 1 + condition_logic = "or" + + conditions { + type = "tag-value" + operator = "equals" + key = "segment" + value = "shared" + } + + action { + association_method = "constant" + segment = "shared" + } + } +} + +# acctest.ConfigAvailableAZsNoOptInDefaultExclude + +data "aws_availability_zones" "available" { + exclude_zone_ids = local.default_exclude_zone_ids + state = "available" + + filter { + name = "opt-in-status" + values = ["opt-in-not-required"] + } +} + +locals { + default_exclude_zone_ids = ["usw2-az4", "usgw1-az2"] +} + +resource "null_resource" "test" {} + +variable "rName" { + description = "Name for resource" + type = string + nullable = false +} + +variable "rBgpAsn" { + type = string + nullable = false +} + +variable "rIPAddress" { + type = string + nullable = false +} + +variable "unknownTagKey" { + type = string + nullable = false +} + +variable "knownTagKey" { + type = string + nullable = false +} + +variable "knownTagValue" { + type = string + nullable = false +} diff --git a/internal/service/networkmanager/testdata/SiteToSiteVPNAttachment/tags_defaults/main_gen.tf b/internal/service/networkmanager/testdata/SiteToSiteVPNAttachment/tags_defaults/main_gen.tf new file mode 100644 index 000000000000..1b669bdf2dc1 --- /dev/null +++ b/internal/service/networkmanager/testdata/SiteToSiteVPNAttachment/tags_defaults/main_gen.tf @@ -0,0 +1,132 @@ +# Copyright (c) HashiCorp, Inc. +# SPDX-License-Identifier: MPL-2.0 + +provider "aws" { + default_tags { + tags = var.provider_tags + } +} + +resource "aws_networkmanager_site_to_site_vpn_attachment" "test" { + core_network_id = aws_networkmanager_core_network_policy_attachment.test.core_network_id + vpn_connection_arn = aws_vpn_connection.test.arn + + tags = var.resource_tags +} + +resource "aws_networkmanager_attachment_accepter" "test" { + attachment_id = aws_networkmanager_site_to_site_vpn_attachment.test.id + attachment_type = aws_networkmanager_site_to_site_vpn_attachment.test.attachment_type +} + +# testAccSiteToSiteVPNAttachmentConfig_base + +resource "aws_customer_gateway" "test" { + bgp_asn = var.rBgpAsn + ip_address = var.rIPAddress + type = "ipsec.1" + device_name = var.rName +} + +resource "aws_vpn_connection" "test" { + customer_gateway_id = aws_customer_gateway.test.id + type = "ipsec.1" +} + +resource "aws_networkmanager_global_network" "test" {} + +resource "aws_networkmanager_core_network" "test" { + global_network_id = aws_networkmanager_global_network.test.id +} + +resource "aws_networkmanager_core_network_policy_attachment" "test" { + core_network_id = aws_networkmanager_core_network.test.id + policy_document = data.aws_networkmanager_core_network_policy_document.test.json +} + +data "aws_region" "current" {} + +data "aws_networkmanager_core_network_policy_document" "test" { + core_network_configuration { + vpn_ecmp_support = false + asn_ranges = ["64512-64555"] + edge_locations { + location = data.aws_region.current.region + asn = 64512 + } + } + + segments { + name = "shared" + description = "SegmentForSharedServices" + require_attachment_acceptance = true + } + + segment_actions { + action = "share" + mode = "attachment-route" + segment = "shared" + share_with = ["*"] + } + + attachment_policies { + rule_number = 1 + condition_logic = "or" + + conditions { + type = "tag-value" + operator = "equals" + key = "segment" + value = "shared" + } + + action { + association_method = "constant" + segment = "shared" + } + } +} + +# acctest.ConfigAvailableAZsNoOptInDefaultExclude + +data "aws_availability_zones" "available" { + exclude_zone_ids = local.default_exclude_zone_ids + state = "available" + + filter { + name = "opt-in-status" + values = ["opt-in-not-required"] + } +} + +locals { + default_exclude_zone_ids = ["usw2-az4", "usgw1-az2"] +} + +variable "rName" { + description = "Name for resource" + type = string + nullable = false +} + +variable "rBgpAsn" { + type = string + nullable = false +} + +variable "rIPAddress" { + type = string + nullable = false +} + +variable "resource_tags" { + description = "Tags to set on resource. To specify no tags, set to `null`" + # Not setting a default, so that this must explicitly be set to `null` to specify no tags + type = map(string) + nullable = true +} + +variable "provider_tags" { + type = map(string) + nullable = false +} diff --git a/internal/service/networkmanager/testdata/SiteToSiteVPNAttachment/tags_ignore/main_gen.tf b/internal/service/networkmanager/testdata/SiteToSiteVPNAttachment/tags_ignore/main_gen.tf new file mode 100644 index 000000000000..4cffe6e5fbba --- /dev/null +++ b/internal/service/networkmanager/testdata/SiteToSiteVPNAttachment/tags_ignore/main_gen.tf @@ -0,0 +1,141 @@ +# Copyright (c) HashiCorp, Inc. +# SPDX-License-Identifier: MPL-2.0 + +provider "aws" { + default_tags { + tags = var.provider_tags + } + ignore_tags { + keys = var.ignore_tag_keys + } +} + +resource "aws_networkmanager_site_to_site_vpn_attachment" "test" { + core_network_id = aws_networkmanager_core_network_policy_attachment.test.core_network_id + vpn_connection_arn = aws_vpn_connection.test.arn + + tags = var.resource_tags +} + +resource "aws_networkmanager_attachment_accepter" "test" { + attachment_id = aws_networkmanager_site_to_site_vpn_attachment.test.id + attachment_type = aws_networkmanager_site_to_site_vpn_attachment.test.attachment_type +} + +# testAccSiteToSiteVPNAttachmentConfig_base + +resource "aws_customer_gateway" "test" { + bgp_asn = var.rBgpAsn + ip_address = var.rIPAddress + type = "ipsec.1" + device_name = var.rName +} + +resource "aws_vpn_connection" "test" { + customer_gateway_id = aws_customer_gateway.test.id + type = "ipsec.1" +} + +resource "aws_networkmanager_global_network" "test" {} + +resource "aws_networkmanager_core_network" "test" { + global_network_id = aws_networkmanager_global_network.test.id +} + +resource "aws_networkmanager_core_network_policy_attachment" "test" { + core_network_id = aws_networkmanager_core_network.test.id + policy_document = data.aws_networkmanager_core_network_policy_document.test.json +} + +data "aws_region" "current" {} + +data "aws_networkmanager_core_network_policy_document" "test" { + core_network_configuration { + vpn_ecmp_support = false + asn_ranges = ["64512-64555"] + edge_locations { + location = data.aws_region.current.region + asn = 64512 + } + } + + segments { + name = "shared" + description = "SegmentForSharedServices" + require_attachment_acceptance = true + } + + segment_actions { + action = "share" + mode = "attachment-route" + segment = "shared" + share_with = ["*"] + } + + attachment_policies { + rule_number = 1 + condition_logic = "or" + + conditions { + type = "tag-value" + operator = "equals" + key = "segment" + value = "shared" + } + + action { + association_method = "constant" + segment = "shared" + } + } +} + +# acctest.ConfigAvailableAZsNoOptInDefaultExclude + +data "aws_availability_zones" "available" { + exclude_zone_ids = local.default_exclude_zone_ids + state = "available" + + filter { + name = "opt-in-status" + values = ["opt-in-not-required"] + } +} + +locals { + default_exclude_zone_ids = ["usw2-az4", "usgw1-az2"] +} + +variable "rName" { + description = "Name for resource" + type = string + nullable = false +} + +variable "rBgpAsn" { + type = string + nullable = false +} + +variable "rIPAddress" { + type = string + nullable = false +} + +variable "resource_tags" { + description = "Tags to set on resource. To specify no tags, set to `null`" + # Not setting a default, so that this must explicitly be set to `null` to specify no tags + type = map(string) + nullable = true +} + +variable "provider_tags" { + type = map(string) + nullable = true + default = null +} + +variable "ignore_tag_keys" { + type = set(string) + nullable = false +} diff --git a/internal/service/networkmanager/testdata/tmpl/site_to_site_vpn_attachment_tags.gtpl b/internal/service/networkmanager/testdata/tmpl/site_to_site_vpn_attachment_tags.gtpl new file mode 100644 index 000000000000..c5a46e8af104 --- /dev/null +++ b/internal/service/networkmanager/testdata/tmpl/site_to_site_vpn_attachment_tags.gtpl @@ -0,0 +1,80 @@ +resource "aws_networkmanager_site_to_site_vpn_attachment" "test" { + core_network_id = aws_networkmanager_core_network_policy_attachment.test.core_network_id + vpn_connection_arn = aws_vpn_connection.test.arn +{{- template "tags" . }} +} + +resource "aws_networkmanager_attachment_accepter" "test" { + attachment_id = aws_networkmanager_site_to_site_vpn_attachment.test.id + attachment_type = aws_networkmanager_site_to_site_vpn_attachment.test.attachment_type +} + +# testAccSiteToSiteVPNAttachmentConfig_base + +resource "aws_customer_gateway" "test" { + bgp_asn = var.rBgpAsn + ip_address = var.rIPAddress + type = "ipsec.1" + device_name = var.rName +} + +resource "aws_vpn_connection" "test" { + customer_gateway_id = aws_customer_gateway.test.id + type = "ipsec.1" +} + +resource "aws_networkmanager_global_network" "test" {} + +resource "aws_networkmanager_core_network" "test" { + global_network_id = aws_networkmanager_global_network.test.id +} + +resource "aws_networkmanager_core_network_policy_attachment" "test" { + core_network_id = aws_networkmanager_core_network.test.id + policy_document = data.aws_networkmanager_core_network_policy_document.test.json +} + +data "aws_region" "current" {} + +data "aws_networkmanager_core_network_policy_document" "test" { + core_network_configuration { + vpn_ecmp_support = false + asn_ranges = ["64512-64555"] + edge_locations { + location = data.aws_region.current.region + asn = 64512 + } + } + + segments { + name = "shared" + description = "SegmentForSharedServices" + require_attachment_acceptance = true + } + + segment_actions { + action = "share" + mode = "attachment-route" + segment = "shared" + share_with = ["*"] + } + + attachment_policies { + rule_number = 1 + condition_logic = "or" + + conditions { + type = "tag-value" + operator = "equals" + key = "segment" + value = "shared" + } + + action { + association_method = "constant" + segment = "shared" + } + } +} + +{{ template "acctest.ConfigAvailableAZsNoOptInDefaultExclude" }} From f37bba1433ac134d403c12aeffd8464a9e6b4b91 Mon Sep 17 00:00:00 2001 From: Graham Davison Date: Mon, 28 Jul 2025 13:43:51 -0700 Subject: [PATCH 049/365] `aws_networkmanager_connect_attachment` --- .../networkmanager/connect_attachment.go | 5 +- .../connect_attachment_tags_gen_test.go | 2277 +++++++++++++++++ .../networkmanager/connect_attachment_test.go | 80 +- .../ConnectAttachment/tags/main_gen.tf | 127 + .../tagsComputed1/main_gen.tf | 131 + .../tagsComputed2/main_gen.tf | 142 + .../tags_defaults/main_gen.tf | 138 + .../ConnectAttachment/tags_ignore/main_gen.tf | 147 ++ .../tmpl/connect_attachment_tags.gtpl | 84 + 9 files changed, 3055 insertions(+), 76 deletions(-) create mode 100644 internal/service/networkmanager/connect_attachment_tags_gen_test.go create mode 100644 internal/service/networkmanager/testdata/ConnectAttachment/tags/main_gen.tf create mode 100644 internal/service/networkmanager/testdata/ConnectAttachment/tagsComputed1/main_gen.tf create mode 100644 internal/service/networkmanager/testdata/ConnectAttachment/tagsComputed2/main_gen.tf create mode 100644 internal/service/networkmanager/testdata/ConnectAttachment/tags_defaults/main_gen.tf create mode 100644 internal/service/networkmanager/testdata/ConnectAttachment/tags_ignore/main_gen.tf create mode 100644 internal/service/networkmanager/testdata/tmpl/connect_attachment_tags.gtpl diff --git a/internal/service/networkmanager/connect_attachment.go b/internal/service/networkmanager/connect_attachment.go index 759b970f6337..6f19263e524a 100644 --- a/internal/service/networkmanager/connect_attachment.go +++ b/internal/service/networkmanager/connect_attachment.go @@ -27,7 +27,10 @@ import ( // @SDKResource("aws_networkmanager_connect_attachment", name="Connect Attachment") // @Tags(identifierAttribute="arn") -// @Testing(tagsTest=false) +// @Testing(existsType="github.com/aws/aws-sdk-go-v2/service/networkmanager/types;awstypes;awstypes.ConnectAttachment") +// @Testing(skipEmptyTags=true) +// @Testing(importIgnore="state") +// @Testing(generator=false) func resourceConnectAttachment() *schema.Resource { return &schema.Resource{ CreateWithoutTimeout: resourceConnectAttachmentCreate, diff --git a/internal/service/networkmanager/connect_attachment_tags_gen_test.go b/internal/service/networkmanager/connect_attachment_tags_gen_test.go new file mode 100644 index 000000000000..b7ae0b0f8443 --- /dev/null +++ b/internal/service/networkmanager/connect_attachment_tags_gen_test.go @@ -0,0 +1,2277 @@ +// Code generated by internal/generate/tagstests/main.go; DO NOT EDIT. + +package networkmanager_test + +import ( + "testing" + + awstypes "github.com/aws/aws-sdk-go-v2/service/networkmanager/types" + "github.com/hashicorp/terraform-plugin-testing/config" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/knownvalue" + "github.com/hashicorp/terraform-plugin-testing/plancheck" + "github.com/hashicorp/terraform-plugin-testing/statecheck" + "github.com/hashicorp/terraform-plugin-testing/tfjsonpath" + "github.com/hashicorp/terraform-provider-aws/internal/acctest" + "github.com/hashicorp/terraform-provider-aws/names" +) + +func TestAccNetworkManagerConnectAttachment_tags(t *testing.T) { + ctx := acctest.Context(t) + var v awstypes.ConnectAttachment + resourceName := "aws_networkmanager_connect_attachment.test" + + acctest.ParallelTest(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckConnectAttachmentDestroy(ctx), + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + Steps: []resource.TestStep{ + { + ConfigDirectory: config.StaticDirectory("testdata/ConnectAttachment/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckConnectAttachmentExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + }, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/ConnectAttachment/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{ + names.AttrState, + }, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/ConnectAttachment/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1Updated), + acctest.CtKey2: config.StringVariable(acctest.CtValue2), + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckConnectAttachmentExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1Updated), + acctest.CtKey2: knownvalue.StringExact(acctest.CtValue2), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1Updated), + acctest.CtKey2: knownvalue.StringExact(acctest.CtValue2), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1Updated), + acctest.CtKey2: knownvalue.StringExact(acctest.CtValue2), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1Updated), + acctest.CtKey2: knownvalue.StringExact(acctest.CtValue2), + })), + }, + }, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/ConnectAttachment/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1Updated), + acctest.CtKey2: config.StringVariable(acctest.CtValue2), + }), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{ + names.AttrState, + }, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/ConnectAttachment/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey2: config.StringVariable(acctest.CtValue2), + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckConnectAttachmentExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey2: knownvalue.StringExact(acctest.CtValue2), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey2: knownvalue.StringExact(acctest.CtValue2), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey2: knownvalue.StringExact(acctest.CtValue2), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey2: knownvalue.StringExact(acctest.CtValue2), + })), + }, + }, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/ConnectAttachment/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey2: config.StringVariable(acctest.CtValue2), + }), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{ + names.AttrState, + }, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/ConnectAttachment/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: nil, + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckConnectAttachmentExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{})), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{})), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{})), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{})), + }, + }, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/ConnectAttachment/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: nil, + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{ + names.AttrState, + }, + }, + }, + }) +} + +func TestAccNetworkManagerConnectAttachment_tags_null(t *testing.T) { + ctx := acctest.Context(t) + var v awstypes.ConnectAttachment + resourceName := "aws_networkmanager_connect_attachment.test" + + acctest.ParallelTest(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckConnectAttachmentDestroy(ctx), + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + Steps: []resource.TestStep{ + { + ConfigDirectory: config.StaticDirectory("testdata/ConnectAttachment/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: nil, + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckConnectAttachmentExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.Null()), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{})), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.Null()), + // TODO: Should be known + plancheck.ExpectUnknownValue(resourceName, tfjsonpath.New(names.AttrTagsAll)), + }, + }, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/ConnectAttachment/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: nil, + }), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{ + names.AttrState, + }, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/ConnectAttachment/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: nil, + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionNoop), + }, + PostApplyPostRefresh: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionNoop), + }, + }, + }, + }, + }) +} + +func TestAccNetworkManagerConnectAttachment_tags_EmptyMap(t *testing.T) { + ctx := acctest.Context(t) + var v awstypes.ConnectAttachment + resourceName := "aws_networkmanager_connect_attachment.test" + + acctest.ParallelTest(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckConnectAttachmentDestroy(ctx), + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + Steps: []resource.TestStep{ + { + ConfigDirectory: config.StaticDirectory("testdata/ConnectAttachment/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{}), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckConnectAttachmentExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.Null()), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{})), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.Null()), + // TODO: Should be known + plancheck.ExpectUnknownValue(resourceName, tfjsonpath.New(names.AttrTagsAll)), + }, + }, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/ConnectAttachment/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{}), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{ + names.AttrState, + }, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/ConnectAttachment/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: nil, + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionNoop), + }, + PostApplyPostRefresh: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionNoop), + }, + }, + }, + }, + }) +} + +func TestAccNetworkManagerConnectAttachment_tags_AddOnUpdate(t *testing.T) { + ctx := acctest.Context(t) + var v awstypes.ConnectAttachment + resourceName := "aws_networkmanager_connect_attachment.test" + + acctest.ParallelTest(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckConnectAttachmentDestroy(ctx), + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + Steps: []resource.TestStep{ + { + ConfigDirectory: config.StaticDirectory("testdata/ConnectAttachment/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: nil, + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckConnectAttachmentExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.Null()), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{})), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.Null()), + // TODO: Should be known + plancheck.ExpectUnknownValue(resourceName, tfjsonpath.New(names.AttrTagsAll)), + }, + }, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/ConnectAttachment/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckConnectAttachmentExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + }, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/ConnectAttachment/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{ + names.AttrState, + }, + }, + }, + }) +} + +func TestAccNetworkManagerConnectAttachment_tags_EmptyTag_OnCreate(t *testing.T) { + t.Skip("Resource ConnectAttachment does not support empty tags") + + ctx := acctest.Context(t) + var v awstypes.ConnectAttachment + resourceName := "aws_networkmanager_connect_attachment.test" + + acctest.ParallelTest(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckConnectAttachmentDestroy(ctx), + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + Steps: []resource.TestStep{ + { + ConfigDirectory: config.StaticDirectory("testdata/ConnectAttachment/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(""), + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckConnectAttachmentExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(""), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(""), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(""), + })), + // TODO: Should be known + plancheck.ExpectUnknownValue(resourceName, tfjsonpath.New(names.AttrTagsAll)), + }, + }, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/ConnectAttachment/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(""), + }), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{ + names.AttrState, + }, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/ConnectAttachment/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: nil, + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckConnectAttachmentExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{})), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{})), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{})), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{})), + }, + }, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/ConnectAttachment/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: nil, + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{ + names.AttrState, + }, + }, + }, + }) +} + +func TestAccNetworkManagerConnectAttachment_tags_EmptyTag_OnUpdate_Add(t *testing.T) { + t.Skip("Resource ConnectAttachment does not support empty tags") + + ctx := acctest.Context(t) + var v awstypes.ConnectAttachment + resourceName := "aws_networkmanager_connect_attachment.test" + + acctest.ParallelTest(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckConnectAttachmentDestroy(ctx), + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + Steps: []resource.TestStep{ + { + ConfigDirectory: config.StaticDirectory("testdata/ConnectAttachment/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckConnectAttachmentExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + }, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/ConnectAttachment/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + acctest.CtKey2: config.StringVariable(""), + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckConnectAttachmentExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + acctest.CtKey2: knownvalue.StringExact(""), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + acctest.CtKey2: knownvalue.StringExact(""), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + acctest.CtKey2: knownvalue.StringExact(""), + })), + // TODO: Should be known + plancheck.ExpectUnknownValue(resourceName, tfjsonpath.New(names.AttrTagsAll)), + }, + }, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/ConnectAttachment/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + acctest.CtKey2: config.StringVariable(""), + }), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{ + names.AttrState, + }, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/ConnectAttachment/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckConnectAttachmentExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + }, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/ConnectAttachment/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{ + names.AttrState, + }, + }, + }, + }) +} + +func TestAccNetworkManagerConnectAttachment_tags_EmptyTag_OnUpdate_Replace(t *testing.T) { + t.Skip("Resource ConnectAttachment does not support empty tags") + + ctx := acctest.Context(t) + var v awstypes.ConnectAttachment + resourceName := "aws_networkmanager_connect_attachment.test" + + acctest.ParallelTest(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckConnectAttachmentDestroy(ctx), + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + Steps: []resource.TestStep{ + { + ConfigDirectory: config.StaticDirectory("testdata/ConnectAttachment/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckConnectAttachmentExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + }, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/ConnectAttachment/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(""), + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckConnectAttachmentExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(""), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(""), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(""), + })), + // TODO: Should be known + plancheck.ExpectUnknownValue(resourceName, tfjsonpath.New(names.AttrTagsAll)), + }, + }, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/ConnectAttachment/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(""), + }), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{ + names.AttrState, + }, + }, + }, + }) +} + +func TestAccNetworkManagerConnectAttachment_tags_DefaultTags_providerOnly(t *testing.T) { + ctx := acctest.Context(t) + var v awstypes.ConnectAttachment + resourceName := "aws_networkmanager_connect_attachment.test" + + acctest.ParallelTest(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckConnectAttachmentDestroy(ctx), + Steps: []resource.TestStep{ + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/ConnectAttachment/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + acctest.CtResourceTags: nil, + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckConnectAttachmentExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.Null()), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.Null()), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/ConnectAttachment/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + acctest.CtResourceTags: nil, + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{ + names.AttrState, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/ConnectAttachment/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1Updated), + acctest.CtKey2: config.StringVariable(acctest.CtValue2), + }), + acctest.CtResourceTags: nil, + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckConnectAttachmentExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{})), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1Updated), + acctest.CtKey2: knownvalue.StringExact(acctest.CtValue2), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{})), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1Updated), + acctest.CtKey2: knownvalue.StringExact(acctest.CtValue2), + })), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/ConnectAttachment/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1Updated), + acctest.CtKey2: config.StringVariable(acctest.CtValue2), + }), + acctest.CtResourceTags: nil, + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{ + names.AttrState, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/ConnectAttachment/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey2: config.StringVariable(acctest.CtValue2), + }), + acctest.CtResourceTags: nil, + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckConnectAttachmentExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{})), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey2: knownvalue.StringExact(acctest.CtValue2), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{})), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey2: knownvalue.StringExact(acctest.CtValue2), + })), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/ConnectAttachment/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey2: config.StringVariable(acctest.CtValue2), + }), + acctest.CtResourceTags: nil, + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{ + names.AttrState, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/ConnectAttachment/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: nil, + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckConnectAttachmentExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{})), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{})), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{})), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{})), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/ConnectAttachment/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: nil, + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{ + names.AttrState, + }, + }, + }, + }) +} + +func TestAccNetworkManagerConnectAttachment_tags_DefaultTags_nonOverlapping(t *testing.T) { + ctx := acctest.Context(t) + var v awstypes.ConnectAttachment + resourceName := "aws_networkmanager_connect_attachment.test" + + acctest.ParallelTest(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckConnectAttachmentDestroy(ctx), + Steps: []resource.TestStep{ + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/ConnectAttachment/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtProviderKey1: config.StringVariable(acctest.CtProviderValue1), + }), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtResourceKey1: config.StringVariable(acctest.CtResourceValue1), + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckConnectAttachmentExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtProviderKey1: knownvalue.StringExact(acctest.CtProviderValue1), + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtProviderKey1: knownvalue.StringExact(acctest.CtProviderValue1), + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), + })), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/ConnectAttachment/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtProviderKey1: config.StringVariable(acctest.CtProviderValue1), + }), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtResourceKey1: config.StringVariable(acctest.CtResourceValue1), + }), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{ + names.AttrState, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/ConnectAttachment/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtProviderKey1: config.StringVariable(acctest.CtProviderValue1Updated), + }), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtResourceKey1: config.StringVariable(acctest.CtResourceValue1Updated), + acctest.CtResourceKey2: config.StringVariable(acctest.CtResourceValue2), + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckConnectAttachmentExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1Updated), + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtProviderKey1: knownvalue.StringExact(acctest.CtProviderValue1Updated), + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1Updated), + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1Updated), + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtProviderKey1: knownvalue.StringExact(acctest.CtProviderValue1Updated), + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1Updated), + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/ConnectAttachment/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtProviderKey1: config.StringVariable(acctest.CtProviderValue1Updated), + }), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtResourceKey1: config.StringVariable(acctest.CtResourceValue1Updated), + acctest.CtResourceKey2: config.StringVariable(acctest.CtResourceValue2), + }), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{ + names.AttrState, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/ConnectAttachment/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: nil, + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckConnectAttachmentExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{})), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{})), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{})), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{})), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/ConnectAttachment/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: nil, + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{ + names.AttrState, + }, + }, + }, + }) +} + +func TestAccNetworkManagerConnectAttachment_tags_DefaultTags_overlapping(t *testing.T) { + ctx := acctest.Context(t) + var v awstypes.ConnectAttachment + resourceName := "aws_networkmanager_connect_attachment.test" + + acctest.ParallelTest(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckConnectAttachmentDestroy(ctx), + Steps: []resource.TestStep{ + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/ConnectAttachment/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtOverlapKey1: config.StringVariable(acctest.CtProviderValue1), + }), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtOverlapKey1: config.StringVariable(acctest.CtResourceValue1), + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckConnectAttachmentExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtOverlapKey1: knownvalue.StringExact(acctest.CtResourceValue1), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtOverlapKey1: knownvalue.StringExact(acctest.CtResourceValue1), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtOverlapKey1: knownvalue.StringExact(acctest.CtResourceValue1), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtOverlapKey1: knownvalue.StringExact(acctest.CtResourceValue1), + })), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/ConnectAttachment/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtOverlapKey1: config.StringVariable(acctest.CtProviderValue1), + }), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtOverlapKey1: config.StringVariable(acctest.CtResourceValue1), + }), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{ + names.AttrState, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/ConnectAttachment/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtOverlapKey1: config.StringVariable(acctest.CtProviderValue1), + acctest.CtOverlapKey2: config.StringVariable("providervalue2"), + }), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtOverlapKey1: config.StringVariable(acctest.CtResourceValue1), + acctest.CtOverlapKey2: config.StringVariable(acctest.CtResourceValue2), + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckConnectAttachmentExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtOverlapKey1: knownvalue.StringExact(acctest.CtResourceValue1), + acctest.CtOverlapKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtOverlapKey1: knownvalue.StringExact(acctest.CtResourceValue1), + acctest.CtOverlapKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtOverlapKey1: knownvalue.StringExact(acctest.CtResourceValue1), + acctest.CtOverlapKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtOverlapKey1: knownvalue.StringExact(acctest.CtResourceValue1), + acctest.CtOverlapKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/ConnectAttachment/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtOverlapKey1: config.StringVariable(acctest.CtProviderValue1), + acctest.CtOverlapKey2: config.StringVariable("providervalue2"), + }), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtOverlapKey1: config.StringVariable(acctest.CtResourceValue1), + acctest.CtOverlapKey2: config.StringVariable(acctest.CtResourceValue2), + }), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{ + names.AttrState, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/ConnectAttachment/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtOverlapKey1: config.StringVariable(acctest.CtProviderValue1), + }), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtOverlapKey1: config.StringVariable(acctest.CtResourceValue2), + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckConnectAttachmentExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtOverlapKey1: knownvalue.StringExact(acctest.CtResourceValue2), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtOverlapKey1: knownvalue.StringExact(acctest.CtResourceValue2), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtOverlapKey1: knownvalue.StringExact(acctest.CtResourceValue2), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtOverlapKey1: knownvalue.StringExact(acctest.CtResourceValue2), + })), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/ConnectAttachment/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtOverlapKey1: config.StringVariable(acctest.CtProviderValue1), + }), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtOverlapKey1: config.StringVariable(acctest.CtResourceValue2), + }), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{ + names.AttrState, + }, + }, + }, + }) +} + +func TestAccNetworkManagerConnectAttachment_tags_DefaultTags_updateToProviderOnly(t *testing.T) { + ctx := acctest.Context(t) + var v awstypes.ConnectAttachment + resourceName := "aws_networkmanager_connect_attachment.test" + + acctest.ParallelTest(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckConnectAttachmentDestroy(ctx), + Steps: []resource.TestStep{ + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/ConnectAttachment/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckConnectAttachmentExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/ConnectAttachment/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + acctest.CtResourceTags: nil, + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckConnectAttachmentExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{})), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{})), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/ConnectAttachment/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + acctest.CtResourceTags: nil, + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{ + names.AttrState, + }, + }, + }, + }) +} + +func TestAccNetworkManagerConnectAttachment_tags_DefaultTags_updateToResourceOnly(t *testing.T) { + ctx := acctest.Context(t) + var v awstypes.ConnectAttachment + resourceName := "aws_networkmanager_connect_attachment.test" + + acctest.ParallelTest(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckConnectAttachmentDestroy(ctx), + Steps: []resource.TestStep{ + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/ConnectAttachment/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + acctest.CtResourceTags: nil, + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckConnectAttachmentExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.Null()), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.Null()), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/ConnectAttachment/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckConnectAttachmentExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionNoop), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/ConnectAttachment/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{ + names.AttrState, + }, + }, + }, + }) +} + +func TestAccNetworkManagerConnectAttachment_tags_DefaultTags_emptyResourceTag(t *testing.T) { + t.Skip("Resource ConnectAttachment does not support empty tags") + + ctx := acctest.Context(t) + var v awstypes.ConnectAttachment + resourceName := "aws_networkmanager_connect_attachment.test" + + acctest.ParallelTest(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckConnectAttachmentDestroy(ctx), + Steps: []resource.TestStep{ + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/ConnectAttachment/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(""), + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckConnectAttachmentExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(""), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(""), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(""), + })), + // TODO: Should be known + plancheck.ExpectUnknownValue(resourceName, tfjsonpath.New(names.AttrTagsAll)), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/ConnectAttachment/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(""), + }), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{ + names.AttrState, + }, + }, + }, + }) +} + +func TestAccNetworkManagerConnectAttachment_tags_DefaultTags_emptyProviderOnlyTag(t *testing.T) { + t.Skip("Resource ConnectAttachment does not support empty tags") + + ctx := acctest.Context(t) + var v awstypes.ConnectAttachment + resourceName := "aws_networkmanager_connect_attachment.test" + + acctest.ParallelTest(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckConnectAttachmentDestroy(ctx), + Steps: []resource.TestStep{ + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/ConnectAttachment/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(""), + }), + acctest.CtResourceTags: nil, + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckConnectAttachmentExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.Null()), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(""), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.Null()), + // TODO: Should be known + plancheck.ExpectUnknownValue(resourceName, tfjsonpath.New(names.AttrTagsAll)), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/ConnectAttachment/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(""), + }), + acctest.CtResourceTags: nil, + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{ + names.AttrState, + }, + }, + }, + }) +} + +func TestAccNetworkManagerConnectAttachment_tags_DefaultTags_nullOverlappingResourceTag(t *testing.T) { + ctx := acctest.Context(t) + var v awstypes.ConnectAttachment + resourceName := "aws_networkmanager_connect_attachment.test" + + acctest.ParallelTest(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckConnectAttachmentDestroy(ctx), + Steps: []resource.TestStep{ + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/ConnectAttachment/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtProviderValue1), + }), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: nil, + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckConnectAttachmentExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.Null()), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtProviderValue1), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.Null()), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtProviderValue1), + })), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/ConnectAttachment/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtProviderValue1), + }), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: nil, + }), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{ + names.AttrState, + }, + }, + }, + }) +} + +func TestAccNetworkManagerConnectAttachment_tags_DefaultTags_nullNonOverlappingResourceTag(t *testing.T) { + ctx := acctest.Context(t) + var v awstypes.ConnectAttachment + resourceName := "aws_networkmanager_connect_attachment.test" + + acctest.ParallelTest(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckConnectAttachmentDestroy(ctx), + Steps: []resource.TestStep{ + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/ConnectAttachment/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtProviderKey1: config.StringVariable(acctest.CtProviderValue1), + }), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtResourceKey1: nil, + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckConnectAttachmentExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.Null()), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtProviderKey1: knownvalue.StringExact(acctest.CtProviderValue1), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.Null()), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtProviderKey1: knownvalue.StringExact(acctest.CtProviderValue1), + })), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/ConnectAttachment/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtProviderKey1: config.StringVariable(acctest.CtProviderValue1), + }), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtResourceKey1: nil, + }), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{ + names.AttrState, + }, + }, + }, + }) +} + +func TestAccNetworkManagerConnectAttachment_tags_ComputedTag_OnCreate(t *testing.T) { + ctx := acctest.Context(t) + var v awstypes.ConnectAttachment + resourceName := "aws_networkmanager_connect_attachment.test" + + acctest.ParallelTest(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckConnectAttachmentDestroy(ctx), + Steps: []resource.TestStep{ + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/ConnectAttachment/tagsComputed1/"), + ConfigVariables: config.Variables{ + "unknownTagKey": config.StringVariable("computedkey1"), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckConnectAttachmentExists(ctx, resourceName, &v), + resource.TestCheckResourceAttrPair(resourceName, "tags.computedkey1", "null_resource.test", names.AttrID), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapSizeExact(1)), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapSizeExact(1)), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectUnknownValue(resourceName, tfjsonpath.New(names.AttrTags)), + plancheck.ExpectUnknownValue(resourceName, tfjsonpath.New(names.AttrTagsAll)), + }, + PostApplyPreRefresh: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionNoop), + }, + PostApplyPostRefresh: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionNoop), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/ConnectAttachment/tagsComputed1/"), + ConfigVariables: config.Variables{ + "unknownTagKey": config.StringVariable("computedkey1"), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{ + names.AttrState, + }, + }, + }, + }) +} + +func TestAccNetworkManagerConnectAttachment_tags_ComputedTag_OnUpdate_Add(t *testing.T) { + ctx := acctest.Context(t) + var v awstypes.ConnectAttachment + resourceName := "aws_networkmanager_connect_attachment.test" + + acctest.ParallelTest(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckConnectAttachmentDestroy(ctx), + Steps: []resource.TestStep{ + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/ConnectAttachment/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckConnectAttachmentExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/ConnectAttachment/tagsComputed2/"), + ConfigVariables: config.Variables{ + "unknownTagKey": config.StringVariable("computedkey1"), + "knownTagKey": config.StringVariable(acctest.CtKey1), + "knownTagValue": config.StringVariable(acctest.CtValue1), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckConnectAttachmentExists(ctx, resourceName, &v), + resource.TestCheckResourceAttrPair(resourceName, "tags.computedkey1", "null_resource.test", names.AttrID), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapSizeExact(2)), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapPartial(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapSizeExact(2)), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapPartial(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectUnknownValue(resourceName, tfjsonpath.New(names.AttrTags)), + plancheck.ExpectUnknownValue(resourceName, tfjsonpath.New(names.AttrTagsAll)), + }, + PostApplyPreRefresh: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionNoop), + }, + PostApplyPostRefresh: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionNoop), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/ConnectAttachment/tagsComputed2/"), + ConfigVariables: config.Variables{ + "unknownTagKey": config.StringVariable("computedkey1"), + "knownTagKey": config.StringVariable(acctest.CtKey1), + "knownTagValue": config.StringVariable(acctest.CtValue1), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{ + names.AttrState, + }, + }, + }, + }) +} + +func TestAccNetworkManagerConnectAttachment_tags_ComputedTag_OnUpdate_Replace(t *testing.T) { + ctx := acctest.Context(t) + var v awstypes.ConnectAttachment + resourceName := "aws_networkmanager_connect_attachment.test" + + acctest.ParallelTest(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckConnectAttachmentDestroy(ctx), + Steps: []resource.TestStep{ + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/ConnectAttachment/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckConnectAttachmentExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/ConnectAttachment/tagsComputed1/"), + ConfigVariables: config.Variables{ + "unknownTagKey": config.StringVariable(acctest.CtKey1), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckConnectAttachmentExists(ctx, resourceName, &v), + resource.TestCheckResourceAttrPair(resourceName, acctest.CtTagsKey1, "null_resource.test", names.AttrID), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapSizeExact(1)), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapSizeExact(1)), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectUnknownValue(resourceName, tfjsonpath.New(names.AttrTags)), + plancheck.ExpectUnknownValue(resourceName, tfjsonpath.New(names.AttrTagsAll)), + }, + PostApplyPreRefresh: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionNoop), + }, + PostApplyPostRefresh: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionNoop), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/ConnectAttachment/tagsComputed1/"), + ConfigVariables: config.Variables{ + "unknownTagKey": config.StringVariable(acctest.CtKey1), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{ + names.AttrState, + }, + }, + }, + }) +} + +func TestAccNetworkManagerConnectAttachment_tags_IgnoreTags_Overlap_DefaultTag(t *testing.T) { + ctx := acctest.Context(t) + var v awstypes.ConnectAttachment + resourceName := "aws_networkmanager_connect_attachment.test" + + acctest.ParallelTest(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckConnectAttachmentDestroy(ctx), + Steps: []resource.TestStep{ + // 1: Create + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/ConnectAttachment/tags_ignore/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtProviderKey1: config.StringVariable(acctest.CtProviderValue1), + }), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtResourceKey1: config.StringVariable(acctest.CtResourceValue1), + }), + "ignore_tag_keys": config.SetVariable( + config.StringVariable(acctest.CtProviderKey1), + ), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckConnectAttachmentExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), + })), + expectFullResourceTags(ctx, resourceName, knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtProviderKey1: knownvalue.StringExact(acctest.CtProviderValue1), // TODO: Should not be set + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), + })), + }, + PostApplyPreRefresh: []plancheck.PlanCheck{ + plancheck.ExpectEmptyPlan(), + }, + PostApplyPostRefresh: []plancheck.PlanCheck{ + plancheck.ExpectEmptyPlan(), + }, + }, + }, + // 2: Update ignored tag only + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/ConnectAttachment/tags_ignore/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtProviderKey1: config.StringVariable(acctest.CtProviderValue1Updated), + }), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtResourceKey1: config.StringVariable(acctest.CtResourceValue1), + }), + "ignore_tag_keys": config.SetVariable( + config.StringVariable(acctest.CtProviderKey1), + ), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckConnectAttachmentExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), + })), + expectFullResourceTags(ctx, resourceName, knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtProviderKey1: knownvalue.StringExact(acctest.CtProviderValue1), // TODO: Should not be set + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionNoop), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), + })), + }, + PostApplyPreRefresh: []plancheck.PlanCheck{ + plancheck.ExpectEmptyPlan(), + }, + PostApplyPostRefresh: []plancheck.PlanCheck{ + plancheck.ExpectEmptyPlan(), + }, + }, + }, + // 3: Update both tags + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/ConnectAttachment/tags_ignore/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtProviderKey1: config.StringVariable(acctest.CtProviderValue1Again), + }), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtResourceKey1: config.StringVariable(acctest.CtResourceValue1Updated), + }), + "ignore_tag_keys": config.SetVariable( + config.StringVariable(acctest.CtProviderKey1), + ), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckConnectAttachmentExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1Updated), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1Updated), + })), + expectFullResourceTags(ctx, resourceName, knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtProviderKey1: knownvalue.StringExact(acctest.CtProviderValue1), // TODO: Should not be set + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1Updated), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1Updated), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1Updated), + })), + }, + PostApplyPreRefresh: []plancheck.PlanCheck{ + plancheck.ExpectEmptyPlan(), + }, + PostApplyPostRefresh: []plancheck.PlanCheck{ + plancheck.ExpectEmptyPlan(), + }, + }, + }, + }, + }) +} + +func TestAccNetworkManagerConnectAttachment_tags_IgnoreTags_Overlap_ResourceTag(t *testing.T) { + ctx := acctest.Context(t) + var v awstypes.ConnectAttachment + resourceName := "aws_networkmanager_connect_attachment.test" + + acctest.ParallelTest(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckConnectAttachmentDestroy(ctx), + Steps: []resource.TestStep{ + // 1: Create + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/ConnectAttachment/tags_ignore/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtResourceKey1: config.StringVariable(acctest.CtResourceValue1), + acctest.CtResourceKey2: config.StringVariable(acctest.CtResourceValue2), + }), + "ignore_tag_keys": config.SetVariable( + config.StringVariable(acctest.CtResourceKey1), + ), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckConnectAttachmentExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + expectFullResourceTags(ctx, resourceName, knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), // TODO: Should not be set + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + }, + PostApplyPreRefresh: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + }, + PostApplyPostRefresh: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + }, + }, + ExpectNonEmptyPlan: true, + }, + // 2: Update ignored tag + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/ConnectAttachment/tags_ignore/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtResourceKey1: config.StringVariable(acctest.CtResourceValue1Updated), + acctest.CtResourceKey2: config.StringVariable(acctest.CtResourceValue2), + }), + "ignore_tag_keys": config.SetVariable( + config.StringVariable(acctest.CtResourceKey1), + ), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckConnectAttachmentExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + expectFullResourceTags(ctx, resourceName, knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), // TODO: Should not be set + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1Updated), + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + }, + PostApplyPreRefresh: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1Updated), + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + }, + PostApplyPostRefresh: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1Updated), + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + }, + }, + ExpectNonEmptyPlan: true, + }, + // 3: Update both tags + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/ConnectAttachment/tags_ignore/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtResourceKey1: config.StringVariable(acctest.CtResourceValue1Again), + acctest.CtResourceKey2: config.StringVariable(acctest.CtResourceValue2Updated), + }), + "ignore_tag_keys": config.SetVariable( + config.StringVariable(acctest.CtResourceKey1), + ), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckConnectAttachmentExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2Updated), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2Updated), + })), + expectFullResourceTags(ctx, resourceName, knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), // TODO: Should not be set + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2Updated), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1Again), + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2Updated), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2Updated), + })), + }, + PostApplyPreRefresh: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1Again), + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2Updated), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2Updated), + })), + }, + PostApplyPostRefresh: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1Again), + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2Updated), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2Updated), + })), + }, + }, + ExpectNonEmptyPlan: true, + }, + }, + }) +} diff --git a/internal/service/networkmanager/connect_attachment_test.go b/internal/service/networkmanager/connect_attachment_test.go index 100cca581a60..b84119af1ee8 100644 --- a/internal/service/networkmanager/connect_attachment_test.go +++ b/internal/service/networkmanager/connect_attachment_test.go @@ -155,52 +155,6 @@ func TestAccNetworkManagerConnectAttachment_protocolNoEncap(t *testing.T) { }) } -func TestAccNetworkManagerConnectAttachment_tags(t *testing.T) { - ctx := acctest.Context(t) - var v awstypes.ConnectAttachment - resourceName := "aws_networkmanager_connect_attachment.test" - rName := sdkacctest.RandomWithPrefix(acctest.ResourcePrefix) - - resource.ParallelTest(t, resource.TestCase{ - PreCheck: func() { acctest.PreCheck(ctx, t) }, - ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), - ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, - CheckDestroy: testAccCheckConnectAttachmentDestroy(ctx), - Steps: []resource.TestStep{ - { - Config: testAccConnectAttachmentConfig_tags1(rName, "segment", "shared"), - Check: resource.ComposeTestCheckFunc( - testAccCheckConnectAttachmentExists(ctx, resourceName, &v), - resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, "1"), - resource.TestCheckResourceAttr(resourceName, "tags.segment", "shared"), - ), - }, - { - Config: testAccConnectAttachmentConfig_tags2(rName, "segment", "shared", "Name", "test"), - Check: resource.ComposeTestCheckFunc( - testAccCheckConnectAttachmentExists(ctx, resourceName, &v), - resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, "2"), - resource.TestCheckResourceAttr(resourceName, "tags.segment", "shared"), - resource.TestCheckResourceAttr(resourceName, "tags.Name", "test"), - ), - }, - { - Config: testAccConnectAttachmentConfig_tags1(rName, "segment", "shared"), - Check: resource.ComposeTestCheckFunc( - testAccCheckConnectAttachmentExists(ctx, resourceName, &v), - resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, "1"), - resource.TestCheckResourceAttr(resourceName, "tags.segment", "shared"), - ), - }, - { - ResourceName: resourceName, - ImportState: true, - ImportStateVerify: true, - }, - }, - }) -} - func testAccCheckConnectAttachmentExists(ctx context.Context, n string, v *awstypes.ConnectAttachment) resource.TestCheckFunc { return func(s *terraform.State) error { rs, ok := s.RootModule().Resources[n] @@ -249,34 +203,9 @@ func testAccCheckConnectAttachmentDestroy(ctx context.Context) resource.TestChec } func testAccConnectAttachmentConfig_base(rName string) string { - return acctest.ConfigCompose(acctest.ConfigAvailableAZsNoOptIn(), fmt.Sprintf(` -data "aws_region" "current" {} - -resource "aws_vpc" "test" { - cidr_block = "10.0.0.0/16" - - assign_generated_ipv6_cidr_block = true - - tags = { - Name = %[1]q - } -} - -resource "aws_subnet" "test" { - count = 2 - - vpc_id = aws_vpc.test.id - availability_zone = data.aws_availability_zones.available.names[count.index] - cidr_block = cidrsubnet(aws_vpc.test.cidr_block, 8, count.index) - - ipv6_cidr_block = cidrsubnet(aws_vpc.test.ipv6_cidr_block, 8, count.index) - assign_ipv6_address_on_creation = true - - tags = { - Name = %[1]q - } -} - + return acctest.ConfigCompose( + acctest.ConfigVPCWithSubnetsIPv6(rName, 2), + fmt.Sprintf(` resource "aws_networkmanager_global_network" "test" { tags = { Name = %[1]q @@ -296,6 +225,8 @@ resource "aws_networkmanager_core_network_policy_attachment" "test" { policy_document = data.aws_networkmanager_core_network_policy_document.test.json } +data "aws_region" "current" {} + data "aws_networkmanager_core_network_policy_document" "test" { core_network_configuration { vpn_ecmp_support = false @@ -331,7 +262,6 @@ data "aws_networkmanager_core_network_policy_document" "test" { } } } - `, rName)) } diff --git a/internal/service/networkmanager/testdata/ConnectAttachment/tags/main_gen.tf b/internal/service/networkmanager/testdata/ConnectAttachment/tags/main_gen.tf new file mode 100644 index 000000000000..ff40a7c3c634 --- /dev/null +++ b/internal/service/networkmanager/testdata/ConnectAttachment/tags/main_gen.tf @@ -0,0 +1,127 @@ +# Copyright (c) HashiCorp, Inc. +# SPDX-License-Identifier: MPL-2.0 + +resource "aws_networkmanager_connect_attachment" "test" { + core_network_id = aws_networkmanager_core_network.test.id + transport_attachment_id = aws_networkmanager_vpc_attachment.test.id + edge_location = aws_networkmanager_vpc_attachment.test.edge_location + options { + protocol = "GRE" + } + depends_on = [ + "aws_networkmanager_attachment_accepter.test" + ] + + tags = var.resource_tags +} + +resource "aws_networkmanager_attachment_accepter" "test2" { + attachment_id = aws_networkmanager_connect_attachment.test.id + attachment_type = aws_networkmanager_connect_attachment.test.attachment_type +} + +resource "aws_networkmanager_vpc_attachment" "test" { + subnet_arns = [aws_subnet.test[0].arn] + core_network_id = aws_networkmanager_core_network_policy_attachment.test.core_network_id + vpc_arn = aws_vpc.test.arn + tags = { + segment = "shared" + } +} + +resource "aws_networkmanager_attachment_accepter" "test" { + attachment_id = aws_networkmanager_vpc_attachment.test.id + attachment_type = aws_networkmanager_vpc_attachment.test.attachment_type +} + +# testAccConnectAttachmentConfig_base + +resource "aws_networkmanager_global_network" "test" {} + +resource "aws_networkmanager_core_network" "test" { + global_network_id = aws_networkmanager_global_network.test.id +} + +resource "aws_networkmanager_core_network_policy_attachment" "test" { + core_network_id = aws_networkmanager_core_network.test.id + policy_document = data.aws_networkmanager_core_network_policy_document.test.json +} + +data "aws_region" "current" {} + +data "aws_networkmanager_core_network_policy_document" "test" { + core_network_configuration { + vpn_ecmp_support = false + asn_ranges = ["64512-64555"] + edge_locations { + location = data.aws_region.current.region + asn = 64512 + } + } + segments { + name = "shared" + description = "SegmentForSharedServices" + require_attachment_acceptance = true + } + segment_actions { + action = "share" + mode = "attachment-route" + segment = "shared" + share_with = ["*"] + } + attachment_policies { + rule_number = 1 + condition_logic = "or" + conditions { + type = "tag-value" + operator = "equals" + key = "segment" + value = "shared" + } + action { + association_method = "constant" + segment = "shared" + } + } +} + +# acctest.ConfigVPCWithSubnetsIPv6(rName, 2) + +resource "aws_vpc" "test" { + cidr_block = "10.0.0.0/16" + + assign_generated_ipv6_cidr_block = true +} + +resource "aws_subnet" "test" { + count = 2 + + vpc_id = aws_vpc.test.id + availability_zone = data.aws_availability_zones.available.names[count.index] + + cidr_block = cidrsubnet(aws_vpc.test.cidr_block, 8, count.index) + ipv6_cidr_block = cidrsubnet(aws_vpc.test.ipv6_cidr_block, 8, count.index) + assign_ipv6_address_on_creation = true +} + +# acctest.ConfigAvailableAZsNoOptInDefaultExclude + +data "aws_availability_zones" "available" { + exclude_zone_ids = local.default_exclude_zone_ids + state = "available" + + filter { + name = "opt-in-status" + values = ["opt-in-not-required"] + } +} + +locals { + default_exclude_zone_ids = ["usw2-az4", "usgw1-az2"] +} +variable "resource_tags" { + description = "Tags to set on resource. To specify no tags, set to `null`" + # Not setting a default, so that this must explicitly be set to `null` to specify no tags + type = map(string) + nullable = true +} diff --git a/internal/service/networkmanager/testdata/ConnectAttachment/tagsComputed1/main_gen.tf b/internal/service/networkmanager/testdata/ConnectAttachment/tagsComputed1/main_gen.tf new file mode 100644 index 000000000000..1182bc942216 --- /dev/null +++ b/internal/service/networkmanager/testdata/ConnectAttachment/tagsComputed1/main_gen.tf @@ -0,0 +1,131 @@ +# Copyright (c) HashiCorp, Inc. +# SPDX-License-Identifier: MPL-2.0 + +provider "null" {} + +resource "aws_networkmanager_connect_attachment" "test" { + core_network_id = aws_networkmanager_core_network.test.id + transport_attachment_id = aws_networkmanager_vpc_attachment.test.id + edge_location = aws_networkmanager_vpc_attachment.test.edge_location + options { + protocol = "GRE" + } + depends_on = [ + "aws_networkmanager_attachment_accepter.test" + ] + + tags = { + (var.unknownTagKey) = null_resource.test.id + } +} + +resource "aws_networkmanager_attachment_accepter" "test2" { + attachment_id = aws_networkmanager_connect_attachment.test.id + attachment_type = aws_networkmanager_connect_attachment.test.attachment_type +} + +resource "aws_networkmanager_vpc_attachment" "test" { + subnet_arns = [aws_subnet.test[0].arn] + core_network_id = aws_networkmanager_core_network_policy_attachment.test.core_network_id + vpc_arn = aws_vpc.test.arn + tags = { + segment = "shared" + } +} + +resource "aws_networkmanager_attachment_accepter" "test" { + attachment_id = aws_networkmanager_vpc_attachment.test.id + attachment_type = aws_networkmanager_vpc_attachment.test.attachment_type +} + +# testAccConnectAttachmentConfig_base + +resource "aws_networkmanager_global_network" "test" {} + +resource "aws_networkmanager_core_network" "test" { + global_network_id = aws_networkmanager_global_network.test.id +} + +resource "aws_networkmanager_core_network_policy_attachment" "test" { + core_network_id = aws_networkmanager_core_network.test.id + policy_document = data.aws_networkmanager_core_network_policy_document.test.json +} + +data "aws_region" "current" {} + +data "aws_networkmanager_core_network_policy_document" "test" { + core_network_configuration { + vpn_ecmp_support = false + asn_ranges = ["64512-64555"] + edge_locations { + location = data.aws_region.current.region + asn = 64512 + } + } + segments { + name = "shared" + description = "SegmentForSharedServices" + require_attachment_acceptance = true + } + segment_actions { + action = "share" + mode = "attachment-route" + segment = "shared" + share_with = ["*"] + } + attachment_policies { + rule_number = 1 + condition_logic = "or" + conditions { + type = "tag-value" + operator = "equals" + key = "segment" + value = "shared" + } + action { + association_method = "constant" + segment = "shared" + } + } +} + +# acctest.ConfigVPCWithSubnetsIPv6(rName, 2) + +resource "aws_vpc" "test" { + cidr_block = "10.0.0.0/16" + + assign_generated_ipv6_cidr_block = true +} + +resource "aws_subnet" "test" { + count = 2 + + vpc_id = aws_vpc.test.id + availability_zone = data.aws_availability_zones.available.names[count.index] + + cidr_block = cidrsubnet(aws_vpc.test.cidr_block, 8, count.index) + ipv6_cidr_block = cidrsubnet(aws_vpc.test.ipv6_cidr_block, 8, count.index) + assign_ipv6_address_on_creation = true +} + +# acctest.ConfigAvailableAZsNoOptInDefaultExclude + +data "aws_availability_zones" "available" { + exclude_zone_ids = local.default_exclude_zone_ids + state = "available" + + filter { + name = "opt-in-status" + values = ["opt-in-not-required"] + } +} + +locals { + default_exclude_zone_ids = ["usw2-az4", "usgw1-az2"] +} +resource "null_resource" "test" {} + +variable "unknownTagKey" { + type = string + nullable = false +} diff --git a/internal/service/networkmanager/testdata/ConnectAttachment/tagsComputed2/main_gen.tf b/internal/service/networkmanager/testdata/ConnectAttachment/tagsComputed2/main_gen.tf new file mode 100644 index 000000000000..0776a12aa5ef --- /dev/null +++ b/internal/service/networkmanager/testdata/ConnectAttachment/tagsComputed2/main_gen.tf @@ -0,0 +1,142 @@ +# Copyright (c) HashiCorp, Inc. +# SPDX-License-Identifier: MPL-2.0 + +provider "null" {} + +resource "aws_networkmanager_connect_attachment" "test" { + core_network_id = aws_networkmanager_core_network.test.id + transport_attachment_id = aws_networkmanager_vpc_attachment.test.id + edge_location = aws_networkmanager_vpc_attachment.test.edge_location + options { + protocol = "GRE" + } + depends_on = [ + "aws_networkmanager_attachment_accepter.test" + ] + + tags = { + (var.unknownTagKey) = null_resource.test.id + (var.knownTagKey) = var.knownTagValue + } +} + +resource "aws_networkmanager_attachment_accepter" "test2" { + attachment_id = aws_networkmanager_connect_attachment.test.id + attachment_type = aws_networkmanager_connect_attachment.test.attachment_type +} + +resource "aws_networkmanager_vpc_attachment" "test" { + subnet_arns = [aws_subnet.test[0].arn] + core_network_id = aws_networkmanager_core_network_policy_attachment.test.core_network_id + vpc_arn = aws_vpc.test.arn + tags = { + segment = "shared" + } +} + +resource "aws_networkmanager_attachment_accepter" "test" { + attachment_id = aws_networkmanager_vpc_attachment.test.id + attachment_type = aws_networkmanager_vpc_attachment.test.attachment_type +} + +# testAccConnectAttachmentConfig_base + +resource "aws_networkmanager_global_network" "test" {} + +resource "aws_networkmanager_core_network" "test" { + global_network_id = aws_networkmanager_global_network.test.id +} + +resource "aws_networkmanager_core_network_policy_attachment" "test" { + core_network_id = aws_networkmanager_core_network.test.id + policy_document = data.aws_networkmanager_core_network_policy_document.test.json +} + +data "aws_region" "current" {} + +data "aws_networkmanager_core_network_policy_document" "test" { + core_network_configuration { + vpn_ecmp_support = false + asn_ranges = ["64512-64555"] + edge_locations { + location = data.aws_region.current.region + asn = 64512 + } + } + segments { + name = "shared" + description = "SegmentForSharedServices" + require_attachment_acceptance = true + } + segment_actions { + action = "share" + mode = "attachment-route" + segment = "shared" + share_with = ["*"] + } + attachment_policies { + rule_number = 1 + condition_logic = "or" + conditions { + type = "tag-value" + operator = "equals" + key = "segment" + value = "shared" + } + action { + association_method = "constant" + segment = "shared" + } + } +} + +# acctest.ConfigVPCWithSubnetsIPv6(rName, 2) + +resource "aws_vpc" "test" { + cidr_block = "10.0.0.0/16" + + assign_generated_ipv6_cidr_block = true +} + +resource "aws_subnet" "test" { + count = 2 + + vpc_id = aws_vpc.test.id + availability_zone = data.aws_availability_zones.available.names[count.index] + + cidr_block = cidrsubnet(aws_vpc.test.cidr_block, 8, count.index) + ipv6_cidr_block = cidrsubnet(aws_vpc.test.ipv6_cidr_block, 8, count.index) + assign_ipv6_address_on_creation = true +} + +# acctest.ConfigAvailableAZsNoOptInDefaultExclude + +data "aws_availability_zones" "available" { + exclude_zone_ids = local.default_exclude_zone_ids + state = "available" + + filter { + name = "opt-in-status" + values = ["opt-in-not-required"] + } +} + +locals { + default_exclude_zone_ids = ["usw2-az4", "usgw1-az2"] +} +resource "null_resource" "test" {} + +variable "unknownTagKey" { + type = string + nullable = false +} + +variable "knownTagKey" { + type = string + nullable = false +} + +variable "knownTagValue" { + type = string + nullable = false +} diff --git a/internal/service/networkmanager/testdata/ConnectAttachment/tags_defaults/main_gen.tf b/internal/service/networkmanager/testdata/ConnectAttachment/tags_defaults/main_gen.tf new file mode 100644 index 000000000000..b6af291c15d3 --- /dev/null +++ b/internal/service/networkmanager/testdata/ConnectAttachment/tags_defaults/main_gen.tf @@ -0,0 +1,138 @@ +# Copyright (c) HashiCorp, Inc. +# SPDX-License-Identifier: MPL-2.0 + +provider "aws" { + default_tags { + tags = var.provider_tags + } +} + +resource "aws_networkmanager_connect_attachment" "test" { + core_network_id = aws_networkmanager_core_network.test.id + transport_attachment_id = aws_networkmanager_vpc_attachment.test.id + edge_location = aws_networkmanager_vpc_attachment.test.edge_location + options { + protocol = "GRE" + } + depends_on = [ + "aws_networkmanager_attachment_accepter.test" + ] + + tags = var.resource_tags +} + +resource "aws_networkmanager_attachment_accepter" "test2" { + attachment_id = aws_networkmanager_connect_attachment.test.id + attachment_type = aws_networkmanager_connect_attachment.test.attachment_type +} + +resource "aws_networkmanager_vpc_attachment" "test" { + subnet_arns = [aws_subnet.test[0].arn] + core_network_id = aws_networkmanager_core_network_policy_attachment.test.core_network_id + vpc_arn = aws_vpc.test.arn + tags = { + segment = "shared" + } +} + +resource "aws_networkmanager_attachment_accepter" "test" { + attachment_id = aws_networkmanager_vpc_attachment.test.id + attachment_type = aws_networkmanager_vpc_attachment.test.attachment_type +} + +# testAccConnectAttachmentConfig_base + +resource "aws_networkmanager_global_network" "test" {} + +resource "aws_networkmanager_core_network" "test" { + global_network_id = aws_networkmanager_global_network.test.id +} + +resource "aws_networkmanager_core_network_policy_attachment" "test" { + core_network_id = aws_networkmanager_core_network.test.id + policy_document = data.aws_networkmanager_core_network_policy_document.test.json +} + +data "aws_region" "current" {} + +data "aws_networkmanager_core_network_policy_document" "test" { + core_network_configuration { + vpn_ecmp_support = false + asn_ranges = ["64512-64555"] + edge_locations { + location = data.aws_region.current.region + asn = 64512 + } + } + segments { + name = "shared" + description = "SegmentForSharedServices" + require_attachment_acceptance = true + } + segment_actions { + action = "share" + mode = "attachment-route" + segment = "shared" + share_with = ["*"] + } + attachment_policies { + rule_number = 1 + condition_logic = "or" + conditions { + type = "tag-value" + operator = "equals" + key = "segment" + value = "shared" + } + action { + association_method = "constant" + segment = "shared" + } + } +} + +# acctest.ConfigVPCWithSubnetsIPv6(rName, 2) + +resource "aws_vpc" "test" { + cidr_block = "10.0.0.0/16" + + assign_generated_ipv6_cidr_block = true +} + +resource "aws_subnet" "test" { + count = 2 + + vpc_id = aws_vpc.test.id + availability_zone = data.aws_availability_zones.available.names[count.index] + + cidr_block = cidrsubnet(aws_vpc.test.cidr_block, 8, count.index) + ipv6_cidr_block = cidrsubnet(aws_vpc.test.ipv6_cidr_block, 8, count.index) + assign_ipv6_address_on_creation = true +} + +# acctest.ConfigAvailableAZsNoOptInDefaultExclude + +data "aws_availability_zones" "available" { + exclude_zone_ids = local.default_exclude_zone_ids + state = "available" + + filter { + name = "opt-in-status" + values = ["opt-in-not-required"] + } +} + +locals { + default_exclude_zone_ids = ["usw2-az4", "usgw1-az2"] +} +variable "resource_tags" { + description = "Tags to set on resource. To specify no tags, set to `null`" + # Not setting a default, so that this must explicitly be set to `null` to specify no tags + type = map(string) + nullable = true +} + +variable "provider_tags" { + type = map(string) + nullable = false +} diff --git a/internal/service/networkmanager/testdata/ConnectAttachment/tags_ignore/main_gen.tf b/internal/service/networkmanager/testdata/ConnectAttachment/tags_ignore/main_gen.tf new file mode 100644 index 000000000000..7e7dc53fba03 --- /dev/null +++ b/internal/service/networkmanager/testdata/ConnectAttachment/tags_ignore/main_gen.tf @@ -0,0 +1,147 @@ +# Copyright (c) HashiCorp, Inc. +# SPDX-License-Identifier: MPL-2.0 + +provider "aws" { + default_tags { + tags = var.provider_tags + } + ignore_tags { + keys = var.ignore_tag_keys + } +} + +resource "aws_networkmanager_connect_attachment" "test" { + core_network_id = aws_networkmanager_core_network.test.id + transport_attachment_id = aws_networkmanager_vpc_attachment.test.id + edge_location = aws_networkmanager_vpc_attachment.test.edge_location + options { + protocol = "GRE" + } + depends_on = [ + "aws_networkmanager_attachment_accepter.test" + ] + + tags = var.resource_tags +} + +resource "aws_networkmanager_attachment_accepter" "test2" { + attachment_id = aws_networkmanager_connect_attachment.test.id + attachment_type = aws_networkmanager_connect_attachment.test.attachment_type +} + +resource "aws_networkmanager_vpc_attachment" "test" { + subnet_arns = [aws_subnet.test[0].arn] + core_network_id = aws_networkmanager_core_network_policy_attachment.test.core_network_id + vpc_arn = aws_vpc.test.arn + tags = { + segment = "shared" + } +} + +resource "aws_networkmanager_attachment_accepter" "test" { + attachment_id = aws_networkmanager_vpc_attachment.test.id + attachment_type = aws_networkmanager_vpc_attachment.test.attachment_type +} + +# testAccConnectAttachmentConfig_base + +resource "aws_networkmanager_global_network" "test" {} + +resource "aws_networkmanager_core_network" "test" { + global_network_id = aws_networkmanager_global_network.test.id +} + +resource "aws_networkmanager_core_network_policy_attachment" "test" { + core_network_id = aws_networkmanager_core_network.test.id + policy_document = data.aws_networkmanager_core_network_policy_document.test.json +} + +data "aws_region" "current" {} + +data "aws_networkmanager_core_network_policy_document" "test" { + core_network_configuration { + vpn_ecmp_support = false + asn_ranges = ["64512-64555"] + edge_locations { + location = data.aws_region.current.region + asn = 64512 + } + } + segments { + name = "shared" + description = "SegmentForSharedServices" + require_attachment_acceptance = true + } + segment_actions { + action = "share" + mode = "attachment-route" + segment = "shared" + share_with = ["*"] + } + attachment_policies { + rule_number = 1 + condition_logic = "or" + conditions { + type = "tag-value" + operator = "equals" + key = "segment" + value = "shared" + } + action { + association_method = "constant" + segment = "shared" + } + } +} + +# acctest.ConfigVPCWithSubnetsIPv6(rName, 2) + +resource "aws_vpc" "test" { + cidr_block = "10.0.0.0/16" + + assign_generated_ipv6_cidr_block = true +} + +resource "aws_subnet" "test" { + count = 2 + + vpc_id = aws_vpc.test.id + availability_zone = data.aws_availability_zones.available.names[count.index] + + cidr_block = cidrsubnet(aws_vpc.test.cidr_block, 8, count.index) + ipv6_cidr_block = cidrsubnet(aws_vpc.test.ipv6_cidr_block, 8, count.index) + assign_ipv6_address_on_creation = true +} + +# acctest.ConfigAvailableAZsNoOptInDefaultExclude + +data "aws_availability_zones" "available" { + exclude_zone_ids = local.default_exclude_zone_ids + state = "available" + + filter { + name = "opt-in-status" + values = ["opt-in-not-required"] + } +} + +locals { + default_exclude_zone_ids = ["usw2-az4", "usgw1-az2"] +} +variable "resource_tags" { + description = "Tags to set on resource. To specify no tags, set to `null`" + # Not setting a default, so that this must explicitly be set to `null` to specify no tags + type = map(string) + nullable = true +} + +variable "provider_tags" { + type = map(string) + nullable = true + default = null +} + +variable "ignore_tag_keys" { + type = set(string) + nullable = false +} diff --git a/internal/service/networkmanager/testdata/tmpl/connect_attachment_tags.gtpl b/internal/service/networkmanager/testdata/tmpl/connect_attachment_tags.gtpl new file mode 100644 index 000000000000..9ab13160324f --- /dev/null +++ b/internal/service/networkmanager/testdata/tmpl/connect_attachment_tags.gtpl @@ -0,0 +1,84 @@ +resource "aws_networkmanager_connect_attachment" "test" { + core_network_id = aws_networkmanager_core_network.test.id + transport_attachment_id = aws_networkmanager_vpc_attachment.test.id + edge_location = aws_networkmanager_vpc_attachment.test.edge_location + options { + protocol = "GRE" + } + depends_on = [ + "aws_networkmanager_attachment_accepter.test" + ] +{{- template "tags" . }} +} + +resource "aws_networkmanager_attachment_accepter" "test2" { + attachment_id = aws_networkmanager_connect_attachment.test.id + attachment_type = aws_networkmanager_connect_attachment.test.attachment_type +} + +resource "aws_networkmanager_vpc_attachment" "test" { + subnet_arns = [aws_subnet.test[0].arn] + core_network_id = aws_networkmanager_core_network_policy_attachment.test.core_network_id + vpc_arn = aws_vpc.test.arn + tags = { + segment = "shared" + } +} + +resource "aws_networkmanager_attachment_accepter" "test" { + attachment_id = aws_networkmanager_vpc_attachment.test.id + attachment_type = aws_networkmanager_vpc_attachment.test.attachment_type +} + +# testAccConnectAttachmentConfig_base + +resource "aws_networkmanager_global_network" "test" {} + +resource "aws_networkmanager_core_network" "test" { + global_network_id = aws_networkmanager_global_network.test.id +} + +resource "aws_networkmanager_core_network_policy_attachment" "test" { + core_network_id = aws_networkmanager_core_network.test.id + policy_document = data.aws_networkmanager_core_network_policy_document.test.json +} + +data "aws_region" "current" {} + +data "aws_networkmanager_core_network_policy_document" "test" { + core_network_configuration { + vpn_ecmp_support = false + asn_ranges = ["64512-64555"] + edge_locations { + location = data.aws_region.current.region + asn = 64512 + } + } + segments { + name = "shared" + description = "SegmentForSharedServices" + require_attachment_acceptance = true + } + segment_actions { + action = "share" + mode = "attachment-route" + segment = "shared" + share_with = ["*"] + } + attachment_policies { + rule_number = 1 + condition_logic = "or" + conditions { + type = "tag-value" + operator = "equals" + key = "segment" + value = "shared" + } + action { + association_method = "constant" + segment = "shared" + } + } +} + +{{ template "acctest.ConfigVPCWithSubnetsIPv6" 2 }} \ No newline at end of file From 68689b7c0defc68b6d3e3b854d4a666e9c3a9688 Mon Sep 17 00:00:00 2001 From: Graham Davison Date: Mon, 28 Jul 2025 14:14:41 -0700 Subject: [PATCH 050/365] `aws_networkmanager_connect_peer` --- .../service/networkmanager/connect_peer.go | 5 +- .../connect_peer_tags_gen_test.go | 2277 +++++++++++++++++ .../networkmanager/connect_peer_test.go | 78 +- .../testdata/ConnectPeer/tags/main_gen.tf | 149 ++ .../ConnectPeer/tagsComputed1/main_gen.tf | 153 ++ .../ConnectPeer/tagsComputed2/main_gen.tf | 164 ++ .../ConnectPeer/tags_defaults/main_gen.tf | 160 ++ .../ConnectPeer/tags_ignore/main_gen.tf | 169 ++ .../testdata/tmpl/connect_peer_tags.gtpl | 105 + 9 files changed, 3186 insertions(+), 74 deletions(-) create mode 100644 internal/service/networkmanager/connect_peer_tags_gen_test.go create mode 100644 internal/service/networkmanager/testdata/ConnectPeer/tags/main_gen.tf create mode 100644 internal/service/networkmanager/testdata/ConnectPeer/tagsComputed1/main_gen.tf create mode 100644 internal/service/networkmanager/testdata/ConnectPeer/tagsComputed2/main_gen.tf create mode 100644 internal/service/networkmanager/testdata/ConnectPeer/tags_defaults/main_gen.tf create mode 100644 internal/service/networkmanager/testdata/ConnectPeer/tags_ignore/main_gen.tf create mode 100644 internal/service/networkmanager/testdata/tmpl/connect_peer_tags.gtpl diff --git a/internal/service/networkmanager/connect_peer.go b/internal/service/networkmanager/connect_peer.go index 22d6db2f4d24..a70833bbb619 100644 --- a/internal/service/networkmanager/connect_peer.go +++ b/internal/service/networkmanager/connect_peer.go @@ -28,7 +28,10 @@ import ( // @SDKResource("aws_networkmanager_connect_peer", name="Connect Peer") // @Tags(identifierAttribute="arn") -// @Testing(tagsTest=false) +// @Testing(existsType="github.com/aws/aws-sdk-go-v2/service/networkmanager/types;awstypes;awstypes.ConnectPeer") +// @Testing(skipEmptyTags=true) +// @Testing(importIgnore="state") +// @Testing(generator=false) func resourceConnectPeer() *schema.Resource { return &schema.Resource{ CreateWithoutTimeout: resourceConnectPeerCreate, diff --git a/internal/service/networkmanager/connect_peer_tags_gen_test.go b/internal/service/networkmanager/connect_peer_tags_gen_test.go new file mode 100644 index 000000000000..3786f5ffee81 --- /dev/null +++ b/internal/service/networkmanager/connect_peer_tags_gen_test.go @@ -0,0 +1,2277 @@ +// Code generated by internal/generate/tagstests/main.go; DO NOT EDIT. + +package networkmanager_test + +import ( + "testing" + + awstypes "github.com/aws/aws-sdk-go-v2/service/networkmanager/types" + "github.com/hashicorp/terraform-plugin-testing/config" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/knownvalue" + "github.com/hashicorp/terraform-plugin-testing/plancheck" + "github.com/hashicorp/terraform-plugin-testing/statecheck" + "github.com/hashicorp/terraform-plugin-testing/tfjsonpath" + "github.com/hashicorp/terraform-provider-aws/internal/acctest" + "github.com/hashicorp/terraform-provider-aws/names" +) + +func TestAccNetworkManagerConnectPeer_tags(t *testing.T) { + ctx := acctest.Context(t) + var v awstypes.ConnectPeer + resourceName := "aws_networkmanager_connect_peer.test" + + acctest.ParallelTest(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckConnectPeerDestroy(ctx), + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + Steps: []resource.TestStep{ + { + ConfigDirectory: config.StaticDirectory("testdata/ConnectPeer/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckConnectPeerExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + }, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/ConnectPeer/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{ + names.AttrState, + }, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/ConnectPeer/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1Updated), + acctest.CtKey2: config.StringVariable(acctest.CtValue2), + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckConnectPeerExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1Updated), + acctest.CtKey2: knownvalue.StringExact(acctest.CtValue2), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1Updated), + acctest.CtKey2: knownvalue.StringExact(acctest.CtValue2), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1Updated), + acctest.CtKey2: knownvalue.StringExact(acctest.CtValue2), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1Updated), + acctest.CtKey2: knownvalue.StringExact(acctest.CtValue2), + })), + }, + }, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/ConnectPeer/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1Updated), + acctest.CtKey2: config.StringVariable(acctest.CtValue2), + }), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{ + names.AttrState, + }, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/ConnectPeer/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey2: config.StringVariable(acctest.CtValue2), + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckConnectPeerExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey2: knownvalue.StringExact(acctest.CtValue2), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey2: knownvalue.StringExact(acctest.CtValue2), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey2: knownvalue.StringExact(acctest.CtValue2), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey2: knownvalue.StringExact(acctest.CtValue2), + })), + }, + }, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/ConnectPeer/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey2: config.StringVariable(acctest.CtValue2), + }), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{ + names.AttrState, + }, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/ConnectPeer/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: nil, + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckConnectPeerExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{})), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{})), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{})), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{})), + }, + }, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/ConnectPeer/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: nil, + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{ + names.AttrState, + }, + }, + }, + }) +} + +func TestAccNetworkManagerConnectPeer_tags_null(t *testing.T) { + ctx := acctest.Context(t) + var v awstypes.ConnectPeer + resourceName := "aws_networkmanager_connect_peer.test" + + acctest.ParallelTest(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckConnectPeerDestroy(ctx), + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + Steps: []resource.TestStep{ + { + ConfigDirectory: config.StaticDirectory("testdata/ConnectPeer/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: nil, + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckConnectPeerExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.Null()), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{})), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.Null()), + // TODO: Should be known + plancheck.ExpectUnknownValue(resourceName, tfjsonpath.New(names.AttrTagsAll)), + }, + }, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/ConnectPeer/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: nil, + }), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{ + names.AttrState, + }, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/ConnectPeer/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: nil, + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionNoop), + }, + PostApplyPostRefresh: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionNoop), + }, + }, + }, + }, + }) +} + +func TestAccNetworkManagerConnectPeer_tags_EmptyMap(t *testing.T) { + ctx := acctest.Context(t) + var v awstypes.ConnectPeer + resourceName := "aws_networkmanager_connect_peer.test" + + acctest.ParallelTest(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckConnectPeerDestroy(ctx), + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + Steps: []resource.TestStep{ + { + ConfigDirectory: config.StaticDirectory("testdata/ConnectPeer/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{}), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckConnectPeerExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.Null()), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{})), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.Null()), + // TODO: Should be known + plancheck.ExpectUnknownValue(resourceName, tfjsonpath.New(names.AttrTagsAll)), + }, + }, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/ConnectPeer/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{}), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{ + names.AttrState, + }, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/ConnectPeer/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: nil, + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionNoop), + }, + PostApplyPostRefresh: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionNoop), + }, + }, + }, + }, + }) +} + +func TestAccNetworkManagerConnectPeer_tags_AddOnUpdate(t *testing.T) { + ctx := acctest.Context(t) + var v awstypes.ConnectPeer + resourceName := "aws_networkmanager_connect_peer.test" + + acctest.ParallelTest(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckConnectPeerDestroy(ctx), + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + Steps: []resource.TestStep{ + { + ConfigDirectory: config.StaticDirectory("testdata/ConnectPeer/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: nil, + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckConnectPeerExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.Null()), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{})), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.Null()), + // TODO: Should be known + plancheck.ExpectUnknownValue(resourceName, tfjsonpath.New(names.AttrTagsAll)), + }, + }, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/ConnectPeer/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckConnectPeerExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + }, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/ConnectPeer/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{ + names.AttrState, + }, + }, + }, + }) +} + +func TestAccNetworkManagerConnectPeer_tags_EmptyTag_OnCreate(t *testing.T) { + t.Skip("Resource ConnectPeer does not support empty tags") + + ctx := acctest.Context(t) + var v awstypes.ConnectPeer + resourceName := "aws_networkmanager_connect_peer.test" + + acctest.ParallelTest(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckConnectPeerDestroy(ctx), + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + Steps: []resource.TestStep{ + { + ConfigDirectory: config.StaticDirectory("testdata/ConnectPeer/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(""), + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckConnectPeerExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(""), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(""), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(""), + })), + // TODO: Should be known + plancheck.ExpectUnknownValue(resourceName, tfjsonpath.New(names.AttrTagsAll)), + }, + }, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/ConnectPeer/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(""), + }), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{ + names.AttrState, + }, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/ConnectPeer/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: nil, + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckConnectPeerExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{})), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{})), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{})), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{})), + }, + }, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/ConnectPeer/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: nil, + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{ + names.AttrState, + }, + }, + }, + }) +} + +func TestAccNetworkManagerConnectPeer_tags_EmptyTag_OnUpdate_Add(t *testing.T) { + t.Skip("Resource ConnectPeer does not support empty tags") + + ctx := acctest.Context(t) + var v awstypes.ConnectPeer + resourceName := "aws_networkmanager_connect_peer.test" + + acctest.ParallelTest(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckConnectPeerDestroy(ctx), + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + Steps: []resource.TestStep{ + { + ConfigDirectory: config.StaticDirectory("testdata/ConnectPeer/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckConnectPeerExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + }, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/ConnectPeer/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + acctest.CtKey2: config.StringVariable(""), + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckConnectPeerExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + acctest.CtKey2: knownvalue.StringExact(""), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + acctest.CtKey2: knownvalue.StringExact(""), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + acctest.CtKey2: knownvalue.StringExact(""), + })), + // TODO: Should be known + plancheck.ExpectUnknownValue(resourceName, tfjsonpath.New(names.AttrTagsAll)), + }, + }, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/ConnectPeer/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + acctest.CtKey2: config.StringVariable(""), + }), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{ + names.AttrState, + }, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/ConnectPeer/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckConnectPeerExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + }, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/ConnectPeer/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{ + names.AttrState, + }, + }, + }, + }) +} + +func TestAccNetworkManagerConnectPeer_tags_EmptyTag_OnUpdate_Replace(t *testing.T) { + t.Skip("Resource ConnectPeer does not support empty tags") + + ctx := acctest.Context(t) + var v awstypes.ConnectPeer + resourceName := "aws_networkmanager_connect_peer.test" + + acctest.ParallelTest(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckConnectPeerDestroy(ctx), + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + Steps: []resource.TestStep{ + { + ConfigDirectory: config.StaticDirectory("testdata/ConnectPeer/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckConnectPeerExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + }, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/ConnectPeer/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(""), + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckConnectPeerExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(""), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(""), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(""), + })), + // TODO: Should be known + plancheck.ExpectUnknownValue(resourceName, tfjsonpath.New(names.AttrTagsAll)), + }, + }, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/ConnectPeer/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(""), + }), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{ + names.AttrState, + }, + }, + }, + }) +} + +func TestAccNetworkManagerConnectPeer_tags_DefaultTags_providerOnly(t *testing.T) { + ctx := acctest.Context(t) + var v awstypes.ConnectPeer + resourceName := "aws_networkmanager_connect_peer.test" + + acctest.ParallelTest(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckConnectPeerDestroy(ctx), + Steps: []resource.TestStep{ + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/ConnectPeer/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + acctest.CtResourceTags: nil, + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckConnectPeerExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.Null()), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.Null()), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/ConnectPeer/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + acctest.CtResourceTags: nil, + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{ + names.AttrState, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/ConnectPeer/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1Updated), + acctest.CtKey2: config.StringVariable(acctest.CtValue2), + }), + acctest.CtResourceTags: nil, + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckConnectPeerExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{})), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1Updated), + acctest.CtKey2: knownvalue.StringExact(acctest.CtValue2), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{})), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1Updated), + acctest.CtKey2: knownvalue.StringExact(acctest.CtValue2), + })), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/ConnectPeer/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1Updated), + acctest.CtKey2: config.StringVariable(acctest.CtValue2), + }), + acctest.CtResourceTags: nil, + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{ + names.AttrState, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/ConnectPeer/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey2: config.StringVariable(acctest.CtValue2), + }), + acctest.CtResourceTags: nil, + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckConnectPeerExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{})), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey2: knownvalue.StringExact(acctest.CtValue2), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{})), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey2: knownvalue.StringExact(acctest.CtValue2), + })), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/ConnectPeer/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey2: config.StringVariable(acctest.CtValue2), + }), + acctest.CtResourceTags: nil, + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{ + names.AttrState, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/ConnectPeer/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: nil, + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckConnectPeerExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{})), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{})), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{})), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{})), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/ConnectPeer/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: nil, + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{ + names.AttrState, + }, + }, + }, + }) +} + +func TestAccNetworkManagerConnectPeer_tags_DefaultTags_nonOverlapping(t *testing.T) { + ctx := acctest.Context(t) + var v awstypes.ConnectPeer + resourceName := "aws_networkmanager_connect_peer.test" + + acctest.ParallelTest(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckConnectPeerDestroy(ctx), + Steps: []resource.TestStep{ + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/ConnectPeer/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtProviderKey1: config.StringVariable(acctest.CtProviderValue1), + }), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtResourceKey1: config.StringVariable(acctest.CtResourceValue1), + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckConnectPeerExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtProviderKey1: knownvalue.StringExact(acctest.CtProviderValue1), + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtProviderKey1: knownvalue.StringExact(acctest.CtProviderValue1), + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), + })), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/ConnectPeer/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtProviderKey1: config.StringVariable(acctest.CtProviderValue1), + }), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtResourceKey1: config.StringVariable(acctest.CtResourceValue1), + }), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{ + names.AttrState, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/ConnectPeer/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtProviderKey1: config.StringVariable(acctest.CtProviderValue1Updated), + }), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtResourceKey1: config.StringVariable(acctest.CtResourceValue1Updated), + acctest.CtResourceKey2: config.StringVariable(acctest.CtResourceValue2), + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckConnectPeerExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1Updated), + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtProviderKey1: knownvalue.StringExact(acctest.CtProviderValue1Updated), + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1Updated), + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1Updated), + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtProviderKey1: knownvalue.StringExact(acctest.CtProviderValue1Updated), + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1Updated), + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/ConnectPeer/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtProviderKey1: config.StringVariable(acctest.CtProviderValue1Updated), + }), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtResourceKey1: config.StringVariable(acctest.CtResourceValue1Updated), + acctest.CtResourceKey2: config.StringVariable(acctest.CtResourceValue2), + }), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{ + names.AttrState, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/ConnectPeer/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: nil, + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckConnectPeerExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{})), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{})), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{})), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{})), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/ConnectPeer/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: nil, + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{ + names.AttrState, + }, + }, + }, + }) +} + +func TestAccNetworkManagerConnectPeer_tags_DefaultTags_overlapping(t *testing.T) { + ctx := acctest.Context(t) + var v awstypes.ConnectPeer + resourceName := "aws_networkmanager_connect_peer.test" + + acctest.ParallelTest(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckConnectPeerDestroy(ctx), + Steps: []resource.TestStep{ + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/ConnectPeer/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtOverlapKey1: config.StringVariable(acctest.CtProviderValue1), + }), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtOverlapKey1: config.StringVariable(acctest.CtResourceValue1), + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckConnectPeerExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtOverlapKey1: knownvalue.StringExact(acctest.CtResourceValue1), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtOverlapKey1: knownvalue.StringExact(acctest.CtResourceValue1), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtOverlapKey1: knownvalue.StringExact(acctest.CtResourceValue1), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtOverlapKey1: knownvalue.StringExact(acctest.CtResourceValue1), + })), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/ConnectPeer/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtOverlapKey1: config.StringVariable(acctest.CtProviderValue1), + }), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtOverlapKey1: config.StringVariable(acctest.CtResourceValue1), + }), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{ + names.AttrState, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/ConnectPeer/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtOverlapKey1: config.StringVariable(acctest.CtProviderValue1), + acctest.CtOverlapKey2: config.StringVariable("providervalue2"), + }), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtOverlapKey1: config.StringVariable(acctest.CtResourceValue1), + acctest.CtOverlapKey2: config.StringVariable(acctest.CtResourceValue2), + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckConnectPeerExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtOverlapKey1: knownvalue.StringExact(acctest.CtResourceValue1), + acctest.CtOverlapKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtOverlapKey1: knownvalue.StringExact(acctest.CtResourceValue1), + acctest.CtOverlapKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtOverlapKey1: knownvalue.StringExact(acctest.CtResourceValue1), + acctest.CtOverlapKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtOverlapKey1: knownvalue.StringExact(acctest.CtResourceValue1), + acctest.CtOverlapKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/ConnectPeer/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtOverlapKey1: config.StringVariable(acctest.CtProviderValue1), + acctest.CtOverlapKey2: config.StringVariable("providervalue2"), + }), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtOverlapKey1: config.StringVariable(acctest.CtResourceValue1), + acctest.CtOverlapKey2: config.StringVariable(acctest.CtResourceValue2), + }), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{ + names.AttrState, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/ConnectPeer/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtOverlapKey1: config.StringVariable(acctest.CtProviderValue1), + }), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtOverlapKey1: config.StringVariable(acctest.CtResourceValue2), + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckConnectPeerExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtOverlapKey1: knownvalue.StringExact(acctest.CtResourceValue2), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtOverlapKey1: knownvalue.StringExact(acctest.CtResourceValue2), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtOverlapKey1: knownvalue.StringExact(acctest.CtResourceValue2), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtOverlapKey1: knownvalue.StringExact(acctest.CtResourceValue2), + })), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/ConnectPeer/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtOverlapKey1: config.StringVariable(acctest.CtProviderValue1), + }), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtOverlapKey1: config.StringVariable(acctest.CtResourceValue2), + }), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{ + names.AttrState, + }, + }, + }, + }) +} + +func TestAccNetworkManagerConnectPeer_tags_DefaultTags_updateToProviderOnly(t *testing.T) { + ctx := acctest.Context(t) + var v awstypes.ConnectPeer + resourceName := "aws_networkmanager_connect_peer.test" + + acctest.ParallelTest(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckConnectPeerDestroy(ctx), + Steps: []resource.TestStep{ + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/ConnectPeer/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckConnectPeerExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/ConnectPeer/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + acctest.CtResourceTags: nil, + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckConnectPeerExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{})), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{})), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/ConnectPeer/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + acctest.CtResourceTags: nil, + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{ + names.AttrState, + }, + }, + }, + }) +} + +func TestAccNetworkManagerConnectPeer_tags_DefaultTags_updateToResourceOnly(t *testing.T) { + ctx := acctest.Context(t) + var v awstypes.ConnectPeer + resourceName := "aws_networkmanager_connect_peer.test" + + acctest.ParallelTest(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckConnectPeerDestroy(ctx), + Steps: []resource.TestStep{ + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/ConnectPeer/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + acctest.CtResourceTags: nil, + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckConnectPeerExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.Null()), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.Null()), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/ConnectPeer/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckConnectPeerExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionNoop), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/ConnectPeer/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{ + names.AttrState, + }, + }, + }, + }) +} + +func TestAccNetworkManagerConnectPeer_tags_DefaultTags_emptyResourceTag(t *testing.T) { + t.Skip("Resource ConnectPeer does not support empty tags") + + ctx := acctest.Context(t) + var v awstypes.ConnectPeer + resourceName := "aws_networkmanager_connect_peer.test" + + acctest.ParallelTest(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckConnectPeerDestroy(ctx), + Steps: []resource.TestStep{ + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/ConnectPeer/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(""), + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckConnectPeerExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(""), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(""), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(""), + })), + // TODO: Should be known + plancheck.ExpectUnknownValue(resourceName, tfjsonpath.New(names.AttrTagsAll)), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/ConnectPeer/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(""), + }), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{ + names.AttrState, + }, + }, + }, + }) +} + +func TestAccNetworkManagerConnectPeer_tags_DefaultTags_emptyProviderOnlyTag(t *testing.T) { + t.Skip("Resource ConnectPeer does not support empty tags") + + ctx := acctest.Context(t) + var v awstypes.ConnectPeer + resourceName := "aws_networkmanager_connect_peer.test" + + acctest.ParallelTest(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckConnectPeerDestroy(ctx), + Steps: []resource.TestStep{ + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/ConnectPeer/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(""), + }), + acctest.CtResourceTags: nil, + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckConnectPeerExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.Null()), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(""), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.Null()), + // TODO: Should be known + plancheck.ExpectUnknownValue(resourceName, tfjsonpath.New(names.AttrTagsAll)), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/ConnectPeer/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(""), + }), + acctest.CtResourceTags: nil, + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{ + names.AttrState, + }, + }, + }, + }) +} + +func TestAccNetworkManagerConnectPeer_tags_DefaultTags_nullOverlappingResourceTag(t *testing.T) { + ctx := acctest.Context(t) + var v awstypes.ConnectPeer + resourceName := "aws_networkmanager_connect_peer.test" + + acctest.ParallelTest(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckConnectPeerDestroy(ctx), + Steps: []resource.TestStep{ + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/ConnectPeer/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtProviderValue1), + }), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: nil, + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckConnectPeerExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.Null()), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtProviderValue1), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.Null()), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtProviderValue1), + })), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/ConnectPeer/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtProviderValue1), + }), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: nil, + }), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{ + names.AttrState, + }, + }, + }, + }) +} + +func TestAccNetworkManagerConnectPeer_tags_DefaultTags_nullNonOverlappingResourceTag(t *testing.T) { + ctx := acctest.Context(t) + var v awstypes.ConnectPeer + resourceName := "aws_networkmanager_connect_peer.test" + + acctest.ParallelTest(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckConnectPeerDestroy(ctx), + Steps: []resource.TestStep{ + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/ConnectPeer/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtProviderKey1: config.StringVariable(acctest.CtProviderValue1), + }), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtResourceKey1: nil, + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckConnectPeerExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.Null()), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtProviderKey1: knownvalue.StringExact(acctest.CtProviderValue1), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.Null()), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtProviderKey1: knownvalue.StringExact(acctest.CtProviderValue1), + })), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/ConnectPeer/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtProviderKey1: config.StringVariable(acctest.CtProviderValue1), + }), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtResourceKey1: nil, + }), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{ + names.AttrState, + }, + }, + }, + }) +} + +func TestAccNetworkManagerConnectPeer_tags_ComputedTag_OnCreate(t *testing.T) { + ctx := acctest.Context(t) + var v awstypes.ConnectPeer + resourceName := "aws_networkmanager_connect_peer.test" + + acctest.ParallelTest(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckConnectPeerDestroy(ctx), + Steps: []resource.TestStep{ + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/ConnectPeer/tagsComputed1/"), + ConfigVariables: config.Variables{ + "unknownTagKey": config.StringVariable("computedkey1"), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckConnectPeerExists(ctx, resourceName, &v), + resource.TestCheckResourceAttrPair(resourceName, "tags.computedkey1", "null_resource.test", names.AttrID), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapSizeExact(1)), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapSizeExact(1)), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectUnknownValue(resourceName, tfjsonpath.New(names.AttrTags)), + plancheck.ExpectUnknownValue(resourceName, tfjsonpath.New(names.AttrTagsAll)), + }, + PostApplyPreRefresh: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionNoop), + }, + PostApplyPostRefresh: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionNoop), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/ConnectPeer/tagsComputed1/"), + ConfigVariables: config.Variables{ + "unknownTagKey": config.StringVariable("computedkey1"), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{ + names.AttrState, + }, + }, + }, + }) +} + +func TestAccNetworkManagerConnectPeer_tags_ComputedTag_OnUpdate_Add(t *testing.T) { + ctx := acctest.Context(t) + var v awstypes.ConnectPeer + resourceName := "aws_networkmanager_connect_peer.test" + + acctest.ParallelTest(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckConnectPeerDestroy(ctx), + Steps: []resource.TestStep{ + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/ConnectPeer/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckConnectPeerExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/ConnectPeer/tagsComputed2/"), + ConfigVariables: config.Variables{ + "unknownTagKey": config.StringVariable("computedkey1"), + "knownTagKey": config.StringVariable(acctest.CtKey1), + "knownTagValue": config.StringVariable(acctest.CtValue1), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckConnectPeerExists(ctx, resourceName, &v), + resource.TestCheckResourceAttrPair(resourceName, "tags.computedkey1", "null_resource.test", names.AttrID), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapSizeExact(2)), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapPartial(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapSizeExact(2)), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapPartial(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectUnknownValue(resourceName, tfjsonpath.New(names.AttrTags)), + plancheck.ExpectUnknownValue(resourceName, tfjsonpath.New(names.AttrTagsAll)), + }, + PostApplyPreRefresh: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionNoop), + }, + PostApplyPostRefresh: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionNoop), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/ConnectPeer/tagsComputed2/"), + ConfigVariables: config.Variables{ + "unknownTagKey": config.StringVariable("computedkey1"), + "knownTagKey": config.StringVariable(acctest.CtKey1), + "knownTagValue": config.StringVariable(acctest.CtValue1), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{ + names.AttrState, + }, + }, + }, + }) +} + +func TestAccNetworkManagerConnectPeer_tags_ComputedTag_OnUpdate_Replace(t *testing.T) { + ctx := acctest.Context(t) + var v awstypes.ConnectPeer + resourceName := "aws_networkmanager_connect_peer.test" + + acctest.ParallelTest(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckConnectPeerDestroy(ctx), + Steps: []resource.TestStep{ + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/ConnectPeer/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckConnectPeerExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/ConnectPeer/tagsComputed1/"), + ConfigVariables: config.Variables{ + "unknownTagKey": config.StringVariable(acctest.CtKey1), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckConnectPeerExists(ctx, resourceName, &v), + resource.TestCheckResourceAttrPair(resourceName, acctest.CtTagsKey1, "null_resource.test", names.AttrID), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapSizeExact(1)), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapSizeExact(1)), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectUnknownValue(resourceName, tfjsonpath.New(names.AttrTags)), + plancheck.ExpectUnknownValue(resourceName, tfjsonpath.New(names.AttrTagsAll)), + }, + PostApplyPreRefresh: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionNoop), + }, + PostApplyPostRefresh: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionNoop), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/ConnectPeer/tagsComputed1/"), + ConfigVariables: config.Variables{ + "unknownTagKey": config.StringVariable(acctest.CtKey1), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{ + names.AttrState, + }, + }, + }, + }) +} + +func TestAccNetworkManagerConnectPeer_tags_IgnoreTags_Overlap_DefaultTag(t *testing.T) { + ctx := acctest.Context(t) + var v awstypes.ConnectPeer + resourceName := "aws_networkmanager_connect_peer.test" + + acctest.ParallelTest(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckConnectPeerDestroy(ctx), + Steps: []resource.TestStep{ + // 1: Create + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/ConnectPeer/tags_ignore/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtProviderKey1: config.StringVariable(acctest.CtProviderValue1), + }), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtResourceKey1: config.StringVariable(acctest.CtResourceValue1), + }), + "ignore_tag_keys": config.SetVariable( + config.StringVariable(acctest.CtProviderKey1), + ), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckConnectPeerExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), + })), + expectFullResourceTags(ctx, resourceName, knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtProviderKey1: knownvalue.StringExact(acctest.CtProviderValue1), // TODO: Should not be set + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), + })), + }, + PostApplyPreRefresh: []plancheck.PlanCheck{ + plancheck.ExpectEmptyPlan(), + }, + PostApplyPostRefresh: []plancheck.PlanCheck{ + plancheck.ExpectEmptyPlan(), + }, + }, + }, + // 2: Update ignored tag only + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/ConnectPeer/tags_ignore/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtProviderKey1: config.StringVariable(acctest.CtProviderValue1Updated), + }), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtResourceKey1: config.StringVariable(acctest.CtResourceValue1), + }), + "ignore_tag_keys": config.SetVariable( + config.StringVariable(acctest.CtProviderKey1), + ), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckConnectPeerExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), + })), + expectFullResourceTags(ctx, resourceName, knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtProviderKey1: knownvalue.StringExact(acctest.CtProviderValue1), // TODO: Should not be set + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionNoop), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), + })), + }, + PostApplyPreRefresh: []plancheck.PlanCheck{ + plancheck.ExpectEmptyPlan(), + }, + PostApplyPostRefresh: []plancheck.PlanCheck{ + plancheck.ExpectEmptyPlan(), + }, + }, + }, + // 3: Update both tags + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/ConnectPeer/tags_ignore/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtProviderKey1: config.StringVariable(acctest.CtProviderValue1Again), + }), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtResourceKey1: config.StringVariable(acctest.CtResourceValue1Updated), + }), + "ignore_tag_keys": config.SetVariable( + config.StringVariable(acctest.CtProviderKey1), + ), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckConnectPeerExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1Updated), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1Updated), + })), + expectFullResourceTags(ctx, resourceName, knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtProviderKey1: knownvalue.StringExact(acctest.CtProviderValue1), // TODO: Should not be set + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1Updated), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1Updated), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1Updated), + })), + }, + PostApplyPreRefresh: []plancheck.PlanCheck{ + plancheck.ExpectEmptyPlan(), + }, + PostApplyPostRefresh: []plancheck.PlanCheck{ + plancheck.ExpectEmptyPlan(), + }, + }, + }, + }, + }) +} + +func TestAccNetworkManagerConnectPeer_tags_IgnoreTags_Overlap_ResourceTag(t *testing.T) { + ctx := acctest.Context(t) + var v awstypes.ConnectPeer + resourceName := "aws_networkmanager_connect_peer.test" + + acctest.ParallelTest(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckConnectPeerDestroy(ctx), + Steps: []resource.TestStep{ + // 1: Create + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/ConnectPeer/tags_ignore/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtResourceKey1: config.StringVariable(acctest.CtResourceValue1), + acctest.CtResourceKey2: config.StringVariable(acctest.CtResourceValue2), + }), + "ignore_tag_keys": config.SetVariable( + config.StringVariable(acctest.CtResourceKey1), + ), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckConnectPeerExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + expectFullResourceTags(ctx, resourceName, knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), // TODO: Should not be set + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + }, + PostApplyPreRefresh: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + }, + PostApplyPostRefresh: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + }, + }, + ExpectNonEmptyPlan: true, + }, + // 2: Update ignored tag + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/ConnectPeer/tags_ignore/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtResourceKey1: config.StringVariable(acctest.CtResourceValue1Updated), + acctest.CtResourceKey2: config.StringVariable(acctest.CtResourceValue2), + }), + "ignore_tag_keys": config.SetVariable( + config.StringVariable(acctest.CtResourceKey1), + ), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckConnectPeerExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + expectFullResourceTags(ctx, resourceName, knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), // TODO: Should not be set + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1Updated), + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + }, + PostApplyPreRefresh: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1Updated), + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + }, + PostApplyPostRefresh: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1Updated), + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + }, + }, + ExpectNonEmptyPlan: true, + }, + // 3: Update both tags + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/ConnectPeer/tags_ignore/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtResourceKey1: config.StringVariable(acctest.CtResourceValue1Again), + acctest.CtResourceKey2: config.StringVariable(acctest.CtResourceValue2Updated), + }), + "ignore_tag_keys": config.SetVariable( + config.StringVariable(acctest.CtResourceKey1), + ), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckConnectPeerExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2Updated), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2Updated), + })), + expectFullResourceTags(ctx, resourceName, knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), // TODO: Should not be set + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2Updated), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1Again), + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2Updated), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2Updated), + })), + }, + PostApplyPreRefresh: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1Again), + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2Updated), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2Updated), + })), + }, + PostApplyPostRefresh: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1Again), + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2Updated), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2Updated), + })), + }, + }, + ExpectNonEmptyPlan: true, + }, + }, + }) +} diff --git a/internal/service/networkmanager/connect_peer_test.go b/internal/service/networkmanager/connect_peer_test.go index 7e99b21559fa..e5e8cdcd8517 100644 --- a/internal/service/networkmanager/connect_peer_test.go +++ b/internal/service/networkmanager/connect_peer_test.go @@ -153,56 +153,6 @@ func TestAccNetworkManagerConnectPeer_subnetARN(t *testing.T) { }) } -func TestAccNetworkManagerConnectPeer_tags(t *testing.T) { - ctx := acctest.Context(t) - var v awstypes.ConnectPeer - resourceName := "aws_networkmanager_connect_peer.test" - rName := sdkacctest.RandomWithPrefix(acctest.ResourcePrefix) - insideCidrBlocksv4 := "169.254.10.0/29" - peerAddress := "1.1.1.1" - protocol := "GRE" - asn := "65501" - - resource.ParallelTest(t, resource.TestCase{ - PreCheck: func() { acctest.PreCheck(ctx, t) }, - ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), - ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, - CheckDestroy: testAccCheckConnectPeerDestroy(ctx), - Steps: []resource.TestStep{ - { - Config: testAccConnectPeerConfig_tags1(rName, "Name", "test", insideCidrBlocksv4, peerAddress, asn, protocol), - Check: resource.ComposeTestCheckFunc( - testAccCheckConnectPeerExists(ctx, resourceName, &v), - resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, "1"), - resource.TestCheckResourceAttr(resourceName, "tags.Name", "test"), - ), - }, - { - Config: testAccConnectPeerConfig_tags2(rName, "Name", "test", "env", "test", insideCidrBlocksv4, peerAddress, asn, protocol), - Check: resource.ComposeTestCheckFunc( - testAccCheckConnectPeerExists(ctx, resourceName, &v), - resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, "2"), - resource.TestCheckResourceAttr(resourceName, "tags.env", "test"), - resource.TestCheckResourceAttr(resourceName, "tags.Name", "test"), - ), - }, - { - Config: testAccConnectPeerConfig_tags1(rName, "Name", "test", insideCidrBlocksv4, peerAddress, asn, protocol), - Check: resource.ComposeTestCheckFunc( - testAccCheckConnectPeerExists(ctx, resourceName, &v), - resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, "1"), - resource.TestCheckResourceAttr(resourceName, "tags.Name", "test"), - ), - }, - { - ResourceName: resourceName, - ImportState: true, - ImportStateVerify: true, - }, - }, - }) -} - func testAccCheckConnectPeerExists(ctx context.Context, n string, v *awstypes.ConnectPeer) resource.TestCheckFunc { return func(s *terraform.State) error { rs, ok := s.RootModule().Resources[n] @@ -254,29 +204,9 @@ func testAccCheckConnectPeerDestroy(ctx context.Context) resource.TestCheckFunc } func testAccConnectPeerConfig_base(rName string, protocol string) string { - return acctest.ConfigCompose(acctest.ConfigAvailableAZsNoOptIn(), fmt.Sprintf(` -data "aws_region" "current" {} - -resource "aws_vpc" "test" { - cidr_block = "10.0.0.0/16" - assign_generated_ipv6_cidr_block = true - tags = { - Name = %[1]q - } -} - -resource "aws_subnet" "test" { - count = 2 - vpc_id = aws_vpc.test.id - availability_zone = data.aws_availability_zones.available.names[count.index] - cidr_block = cidrsubnet(aws_vpc.test.cidr_block, 8, count.index) - ipv6_cidr_block = cidrsubnet(aws_vpc.test.ipv6_cidr_block, 8, count.index) - assign_ipv6_address_on_creation = true - tags = { - Name = %[1]q - } -} - + return acctest.ConfigCompose( + acctest.ConfigVPCWithSubnetsIPv6(rName, 2), + fmt.Sprintf(` resource "aws_networkmanager_global_network" "test" { tags = { Name = %[1]q @@ -296,6 +226,8 @@ resource "aws_networkmanager_core_network_policy_attachment" "test" { policy_document = data.aws_networkmanager_core_network_policy_document.test.json } +data "aws_region" "current" {} + data "aws_networkmanager_core_network_policy_document" "test" { core_network_configuration { vpn_ecmp_support = false diff --git a/internal/service/networkmanager/testdata/ConnectPeer/tags/main_gen.tf b/internal/service/networkmanager/testdata/ConnectPeer/tags/main_gen.tf new file mode 100644 index 000000000000..c97c59fef4f4 --- /dev/null +++ b/internal/service/networkmanager/testdata/ConnectPeer/tags/main_gen.tf @@ -0,0 +1,149 @@ +# Copyright (c) HashiCorp, Inc. +# SPDX-License-Identifier: MPL-2.0 + +resource "aws_networkmanager_connect_peer" "test" { + connect_attachment_id = aws_networkmanager_connect_attachment.test.id + peer_address = local.peer_address + bgp_options { + peer_asn = local.peer_asn + } + inside_cidr_blocks = local.inside_cidr_blocks + + tags = var.resource_tags +} + +locals { + inside_cidr_blocks = ["169.254.10.0/29"] + peer_address = "1.1.1.1" + peer_asn = "65501" + protocol = "GRE" +} + +# testAccConnectPeerConfig_base + +resource "aws_networkmanager_global_network" "test" {} + +resource "aws_networkmanager_core_network" "test" { + global_network_id = aws_networkmanager_global_network.test.id +} + +resource "aws_networkmanager_core_network_policy_attachment" "test" { + core_network_id = aws_networkmanager_core_network.test.id + policy_document = data.aws_networkmanager_core_network_policy_document.test.json +} + +data "aws_region" "current" {} + +data "aws_networkmanager_core_network_policy_document" "test" { + core_network_configuration { + vpn_ecmp_support = false + asn_ranges = ["64512-64555"] + inside_cidr_blocks = ["172.16.0.0/16"] + edge_locations { + location = data.aws_region.current.region + asn = 64512 + inside_cidr_blocks = ["172.16.0.0/18"] + } + } + segments { + name = "shared" + description = "SegmentForSharedServices" + require_attachment_acceptance = true + } + segment_actions { + action = "share" + mode = "attachment-route" + segment = "shared" + share_with = ["*"] + } + attachment_policies { + rule_number = 1 + condition_logic = "or" + conditions { + type = "tag-value" + operator = "equals" + key = "segment" + value = "shared" + } + action { + association_method = "constant" + segment = "shared" + } + } +} + +resource "aws_networkmanager_vpc_attachment" "test" { + subnet_arns = aws_subnet.test[*].arn + core_network_id = aws_networkmanager_core_network_policy_attachment.test.core_network_id + vpc_arn = aws_vpc.test.arn + tags = { + segment = "shared" + } +} + +resource "aws_networkmanager_attachment_accepter" "test" { + attachment_id = aws_networkmanager_vpc_attachment.test.id + attachment_type = aws_networkmanager_vpc_attachment.test.attachment_type +} + +resource "aws_networkmanager_connect_attachment" "test" { + core_network_id = aws_networkmanager_core_network.test.id + transport_attachment_id = aws_networkmanager_vpc_attachment.test.id + edge_location = aws_networkmanager_vpc_attachment.test.edge_location + options { + protocol = local.protocol + } + tags = { + segment = "shared" + } + depends_on = [ + "aws_networkmanager_attachment_accepter.test" + ] +} + +resource "aws_networkmanager_attachment_accepter" "test2" { + attachment_id = aws_networkmanager_connect_attachment.test.id + attachment_type = aws_networkmanager_connect_attachment.test.attachment_type +} + +# acctest.ConfigVPCWithSubnetsIPv6(rName, 2) + +resource "aws_vpc" "test" { + cidr_block = "10.0.0.0/16" + + assign_generated_ipv6_cidr_block = true +} + +resource "aws_subnet" "test" { + count = 2 + + vpc_id = aws_vpc.test.id + availability_zone = data.aws_availability_zones.available.names[count.index] + + cidr_block = cidrsubnet(aws_vpc.test.cidr_block, 8, count.index) + ipv6_cidr_block = cidrsubnet(aws_vpc.test.ipv6_cidr_block, 8, count.index) + assign_ipv6_address_on_creation = true +} + +# acctest.ConfigAvailableAZsNoOptInDefaultExclude + +data "aws_availability_zones" "available" { + exclude_zone_ids = local.default_exclude_zone_ids + state = "available" + + filter { + name = "opt-in-status" + values = ["opt-in-not-required"] + } +} + +locals { + default_exclude_zone_ids = ["usw2-az4", "usgw1-az2"] +} + +variable "resource_tags" { + description = "Tags to set on resource. To specify no tags, set to `null`" + # Not setting a default, so that this must explicitly be set to `null` to specify no tags + type = map(string) + nullable = true +} diff --git a/internal/service/networkmanager/testdata/ConnectPeer/tagsComputed1/main_gen.tf b/internal/service/networkmanager/testdata/ConnectPeer/tagsComputed1/main_gen.tf new file mode 100644 index 000000000000..df8190a9879d --- /dev/null +++ b/internal/service/networkmanager/testdata/ConnectPeer/tagsComputed1/main_gen.tf @@ -0,0 +1,153 @@ +# Copyright (c) HashiCorp, Inc. +# SPDX-License-Identifier: MPL-2.0 + +provider "null" {} + +resource "aws_networkmanager_connect_peer" "test" { + connect_attachment_id = aws_networkmanager_connect_attachment.test.id + peer_address = local.peer_address + bgp_options { + peer_asn = local.peer_asn + } + inside_cidr_blocks = local.inside_cidr_blocks + + tags = { + (var.unknownTagKey) = null_resource.test.id + } +} + +locals { + inside_cidr_blocks = ["169.254.10.0/29"] + peer_address = "1.1.1.1" + peer_asn = "65501" + protocol = "GRE" +} + +# testAccConnectPeerConfig_base + +resource "aws_networkmanager_global_network" "test" {} + +resource "aws_networkmanager_core_network" "test" { + global_network_id = aws_networkmanager_global_network.test.id +} + +resource "aws_networkmanager_core_network_policy_attachment" "test" { + core_network_id = aws_networkmanager_core_network.test.id + policy_document = data.aws_networkmanager_core_network_policy_document.test.json +} + +data "aws_region" "current" {} + +data "aws_networkmanager_core_network_policy_document" "test" { + core_network_configuration { + vpn_ecmp_support = false + asn_ranges = ["64512-64555"] + inside_cidr_blocks = ["172.16.0.0/16"] + edge_locations { + location = data.aws_region.current.region + asn = 64512 + inside_cidr_blocks = ["172.16.0.0/18"] + } + } + segments { + name = "shared" + description = "SegmentForSharedServices" + require_attachment_acceptance = true + } + segment_actions { + action = "share" + mode = "attachment-route" + segment = "shared" + share_with = ["*"] + } + attachment_policies { + rule_number = 1 + condition_logic = "or" + conditions { + type = "tag-value" + operator = "equals" + key = "segment" + value = "shared" + } + action { + association_method = "constant" + segment = "shared" + } + } +} + +resource "aws_networkmanager_vpc_attachment" "test" { + subnet_arns = aws_subnet.test[*].arn + core_network_id = aws_networkmanager_core_network_policy_attachment.test.core_network_id + vpc_arn = aws_vpc.test.arn + tags = { + segment = "shared" + } +} + +resource "aws_networkmanager_attachment_accepter" "test" { + attachment_id = aws_networkmanager_vpc_attachment.test.id + attachment_type = aws_networkmanager_vpc_attachment.test.attachment_type +} + +resource "aws_networkmanager_connect_attachment" "test" { + core_network_id = aws_networkmanager_core_network.test.id + transport_attachment_id = aws_networkmanager_vpc_attachment.test.id + edge_location = aws_networkmanager_vpc_attachment.test.edge_location + options { + protocol = local.protocol + } + tags = { + segment = "shared" + } + depends_on = [ + "aws_networkmanager_attachment_accepter.test" + ] +} + +resource "aws_networkmanager_attachment_accepter" "test2" { + attachment_id = aws_networkmanager_connect_attachment.test.id + attachment_type = aws_networkmanager_connect_attachment.test.attachment_type +} + +# acctest.ConfigVPCWithSubnetsIPv6(rName, 2) + +resource "aws_vpc" "test" { + cidr_block = "10.0.0.0/16" + + assign_generated_ipv6_cidr_block = true +} + +resource "aws_subnet" "test" { + count = 2 + + vpc_id = aws_vpc.test.id + availability_zone = data.aws_availability_zones.available.names[count.index] + + cidr_block = cidrsubnet(aws_vpc.test.cidr_block, 8, count.index) + ipv6_cidr_block = cidrsubnet(aws_vpc.test.ipv6_cidr_block, 8, count.index) + assign_ipv6_address_on_creation = true +} + +# acctest.ConfigAvailableAZsNoOptInDefaultExclude + +data "aws_availability_zones" "available" { + exclude_zone_ids = local.default_exclude_zone_ids + state = "available" + + filter { + name = "opt-in-status" + values = ["opt-in-not-required"] + } +} + +locals { + default_exclude_zone_ids = ["usw2-az4", "usgw1-az2"] +} + +resource "null_resource" "test" {} + +variable "unknownTagKey" { + type = string + nullable = false +} diff --git a/internal/service/networkmanager/testdata/ConnectPeer/tagsComputed2/main_gen.tf b/internal/service/networkmanager/testdata/ConnectPeer/tagsComputed2/main_gen.tf new file mode 100644 index 000000000000..7b934e932742 --- /dev/null +++ b/internal/service/networkmanager/testdata/ConnectPeer/tagsComputed2/main_gen.tf @@ -0,0 +1,164 @@ +# Copyright (c) HashiCorp, Inc. +# SPDX-License-Identifier: MPL-2.0 + +provider "null" {} + +resource "aws_networkmanager_connect_peer" "test" { + connect_attachment_id = aws_networkmanager_connect_attachment.test.id + peer_address = local.peer_address + bgp_options { + peer_asn = local.peer_asn + } + inside_cidr_blocks = local.inside_cidr_blocks + + tags = { + (var.unknownTagKey) = null_resource.test.id + (var.knownTagKey) = var.knownTagValue + } +} + +locals { + inside_cidr_blocks = ["169.254.10.0/29"] + peer_address = "1.1.1.1" + peer_asn = "65501" + protocol = "GRE" +} + +# testAccConnectPeerConfig_base + +resource "aws_networkmanager_global_network" "test" {} + +resource "aws_networkmanager_core_network" "test" { + global_network_id = aws_networkmanager_global_network.test.id +} + +resource "aws_networkmanager_core_network_policy_attachment" "test" { + core_network_id = aws_networkmanager_core_network.test.id + policy_document = data.aws_networkmanager_core_network_policy_document.test.json +} + +data "aws_region" "current" {} + +data "aws_networkmanager_core_network_policy_document" "test" { + core_network_configuration { + vpn_ecmp_support = false + asn_ranges = ["64512-64555"] + inside_cidr_blocks = ["172.16.0.0/16"] + edge_locations { + location = data.aws_region.current.region + asn = 64512 + inside_cidr_blocks = ["172.16.0.0/18"] + } + } + segments { + name = "shared" + description = "SegmentForSharedServices" + require_attachment_acceptance = true + } + segment_actions { + action = "share" + mode = "attachment-route" + segment = "shared" + share_with = ["*"] + } + attachment_policies { + rule_number = 1 + condition_logic = "or" + conditions { + type = "tag-value" + operator = "equals" + key = "segment" + value = "shared" + } + action { + association_method = "constant" + segment = "shared" + } + } +} + +resource "aws_networkmanager_vpc_attachment" "test" { + subnet_arns = aws_subnet.test[*].arn + core_network_id = aws_networkmanager_core_network_policy_attachment.test.core_network_id + vpc_arn = aws_vpc.test.arn + tags = { + segment = "shared" + } +} + +resource "aws_networkmanager_attachment_accepter" "test" { + attachment_id = aws_networkmanager_vpc_attachment.test.id + attachment_type = aws_networkmanager_vpc_attachment.test.attachment_type +} + +resource "aws_networkmanager_connect_attachment" "test" { + core_network_id = aws_networkmanager_core_network.test.id + transport_attachment_id = aws_networkmanager_vpc_attachment.test.id + edge_location = aws_networkmanager_vpc_attachment.test.edge_location + options { + protocol = local.protocol + } + tags = { + segment = "shared" + } + depends_on = [ + "aws_networkmanager_attachment_accepter.test" + ] +} + +resource "aws_networkmanager_attachment_accepter" "test2" { + attachment_id = aws_networkmanager_connect_attachment.test.id + attachment_type = aws_networkmanager_connect_attachment.test.attachment_type +} + +# acctest.ConfigVPCWithSubnetsIPv6(rName, 2) + +resource "aws_vpc" "test" { + cidr_block = "10.0.0.0/16" + + assign_generated_ipv6_cidr_block = true +} + +resource "aws_subnet" "test" { + count = 2 + + vpc_id = aws_vpc.test.id + availability_zone = data.aws_availability_zones.available.names[count.index] + + cidr_block = cidrsubnet(aws_vpc.test.cidr_block, 8, count.index) + ipv6_cidr_block = cidrsubnet(aws_vpc.test.ipv6_cidr_block, 8, count.index) + assign_ipv6_address_on_creation = true +} + +# acctest.ConfigAvailableAZsNoOptInDefaultExclude + +data "aws_availability_zones" "available" { + exclude_zone_ids = local.default_exclude_zone_ids + state = "available" + + filter { + name = "opt-in-status" + values = ["opt-in-not-required"] + } +} + +locals { + default_exclude_zone_ids = ["usw2-az4", "usgw1-az2"] +} + +resource "null_resource" "test" {} + +variable "unknownTagKey" { + type = string + nullable = false +} + +variable "knownTagKey" { + type = string + nullable = false +} + +variable "knownTagValue" { + type = string + nullable = false +} diff --git a/internal/service/networkmanager/testdata/ConnectPeer/tags_defaults/main_gen.tf b/internal/service/networkmanager/testdata/ConnectPeer/tags_defaults/main_gen.tf new file mode 100644 index 000000000000..979f3e0d3975 --- /dev/null +++ b/internal/service/networkmanager/testdata/ConnectPeer/tags_defaults/main_gen.tf @@ -0,0 +1,160 @@ +# Copyright (c) HashiCorp, Inc. +# SPDX-License-Identifier: MPL-2.0 + +provider "aws" { + default_tags { + tags = var.provider_tags + } +} + +resource "aws_networkmanager_connect_peer" "test" { + connect_attachment_id = aws_networkmanager_connect_attachment.test.id + peer_address = local.peer_address + bgp_options { + peer_asn = local.peer_asn + } + inside_cidr_blocks = local.inside_cidr_blocks + + tags = var.resource_tags +} + +locals { + inside_cidr_blocks = ["169.254.10.0/29"] + peer_address = "1.1.1.1" + peer_asn = "65501" + protocol = "GRE" +} + +# testAccConnectPeerConfig_base + +resource "aws_networkmanager_global_network" "test" {} + +resource "aws_networkmanager_core_network" "test" { + global_network_id = aws_networkmanager_global_network.test.id +} + +resource "aws_networkmanager_core_network_policy_attachment" "test" { + core_network_id = aws_networkmanager_core_network.test.id + policy_document = data.aws_networkmanager_core_network_policy_document.test.json +} + +data "aws_region" "current" {} + +data "aws_networkmanager_core_network_policy_document" "test" { + core_network_configuration { + vpn_ecmp_support = false + asn_ranges = ["64512-64555"] + inside_cidr_blocks = ["172.16.0.0/16"] + edge_locations { + location = data.aws_region.current.region + asn = 64512 + inside_cidr_blocks = ["172.16.0.0/18"] + } + } + segments { + name = "shared" + description = "SegmentForSharedServices" + require_attachment_acceptance = true + } + segment_actions { + action = "share" + mode = "attachment-route" + segment = "shared" + share_with = ["*"] + } + attachment_policies { + rule_number = 1 + condition_logic = "or" + conditions { + type = "tag-value" + operator = "equals" + key = "segment" + value = "shared" + } + action { + association_method = "constant" + segment = "shared" + } + } +} + +resource "aws_networkmanager_vpc_attachment" "test" { + subnet_arns = aws_subnet.test[*].arn + core_network_id = aws_networkmanager_core_network_policy_attachment.test.core_network_id + vpc_arn = aws_vpc.test.arn + tags = { + segment = "shared" + } +} + +resource "aws_networkmanager_attachment_accepter" "test" { + attachment_id = aws_networkmanager_vpc_attachment.test.id + attachment_type = aws_networkmanager_vpc_attachment.test.attachment_type +} + +resource "aws_networkmanager_connect_attachment" "test" { + core_network_id = aws_networkmanager_core_network.test.id + transport_attachment_id = aws_networkmanager_vpc_attachment.test.id + edge_location = aws_networkmanager_vpc_attachment.test.edge_location + options { + protocol = local.protocol + } + tags = { + segment = "shared" + } + depends_on = [ + "aws_networkmanager_attachment_accepter.test" + ] +} + +resource "aws_networkmanager_attachment_accepter" "test2" { + attachment_id = aws_networkmanager_connect_attachment.test.id + attachment_type = aws_networkmanager_connect_attachment.test.attachment_type +} + +# acctest.ConfigVPCWithSubnetsIPv6(rName, 2) + +resource "aws_vpc" "test" { + cidr_block = "10.0.0.0/16" + + assign_generated_ipv6_cidr_block = true +} + +resource "aws_subnet" "test" { + count = 2 + + vpc_id = aws_vpc.test.id + availability_zone = data.aws_availability_zones.available.names[count.index] + + cidr_block = cidrsubnet(aws_vpc.test.cidr_block, 8, count.index) + ipv6_cidr_block = cidrsubnet(aws_vpc.test.ipv6_cidr_block, 8, count.index) + assign_ipv6_address_on_creation = true +} + +# acctest.ConfigAvailableAZsNoOptInDefaultExclude + +data "aws_availability_zones" "available" { + exclude_zone_ids = local.default_exclude_zone_ids + state = "available" + + filter { + name = "opt-in-status" + values = ["opt-in-not-required"] + } +} + +locals { + default_exclude_zone_ids = ["usw2-az4", "usgw1-az2"] +} + +variable "resource_tags" { + description = "Tags to set on resource. To specify no tags, set to `null`" + # Not setting a default, so that this must explicitly be set to `null` to specify no tags + type = map(string) + nullable = true +} + +variable "provider_tags" { + type = map(string) + nullable = false +} diff --git a/internal/service/networkmanager/testdata/ConnectPeer/tags_ignore/main_gen.tf b/internal/service/networkmanager/testdata/ConnectPeer/tags_ignore/main_gen.tf new file mode 100644 index 000000000000..4a57a9568b07 --- /dev/null +++ b/internal/service/networkmanager/testdata/ConnectPeer/tags_ignore/main_gen.tf @@ -0,0 +1,169 @@ +# Copyright (c) HashiCorp, Inc. +# SPDX-License-Identifier: MPL-2.0 + +provider "aws" { + default_tags { + tags = var.provider_tags + } + ignore_tags { + keys = var.ignore_tag_keys + } +} + +resource "aws_networkmanager_connect_peer" "test" { + connect_attachment_id = aws_networkmanager_connect_attachment.test.id + peer_address = local.peer_address + bgp_options { + peer_asn = local.peer_asn + } + inside_cidr_blocks = local.inside_cidr_blocks + + tags = var.resource_tags +} + +locals { + inside_cidr_blocks = ["169.254.10.0/29"] + peer_address = "1.1.1.1" + peer_asn = "65501" + protocol = "GRE" +} + +# testAccConnectPeerConfig_base + +resource "aws_networkmanager_global_network" "test" {} + +resource "aws_networkmanager_core_network" "test" { + global_network_id = aws_networkmanager_global_network.test.id +} + +resource "aws_networkmanager_core_network_policy_attachment" "test" { + core_network_id = aws_networkmanager_core_network.test.id + policy_document = data.aws_networkmanager_core_network_policy_document.test.json +} + +data "aws_region" "current" {} + +data "aws_networkmanager_core_network_policy_document" "test" { + core_network_configuration { + vpn_ecmp_support = false + asn_ranges = ["64512-64555"] + inside_cidr_blocks = ["172.16.0.0/16"] + edge_locations { + location = data.aws_region.current.region + asn = 64512 + inside_cidr_blocks = ["172.16.0.0/18"] + } + } + segments { + name = "shared" + description = "SegmentForSharedServices" + require_attachment_acceptance = true + } + segment_actions { + action = "share" + mode = "attachment-route" + segment = "shared" + share_with = ["*"] + } + attachment_policies { + rule_number = 1 + condition_logic = "or" + conditions { + type = "tag-value" + operator = "equals" + key = "segment" + value = "shared" + } + action { + association_method = "constant" + segment = "shared" + } + } +} + +resource "aws_networkmanager_vpc_attachment" "test" { + subnet_arns = aws_subnet.test[*].arn + core_network_id = aws_networkmanager_core_network_policy_attachment.test.core_network_id + vpc_arn = aws_vpc.test.arn + tags = { + segment = "shared" + } +} + +resource "aws_networkmanager_attachment_accepter" "test" { + attachment_id = aws_networkmanager_vpc_attachment.test.id + attachment_type = aws_networkmanager_vpc_attachment.test.attachment_type +} + +resource "aws_networkmanager_connect_attachment" "test" { + core_network_id = aws_networkmanager_core_network.test.id + transport_attachment_id = aws_networkmanager_vpc_attachment.test.id + edge_location = aws_networkmanager_vpc_attachment.test.edge_location + options { + protocol = local.protocol + } + tags = { + segment = "shared" + } + depends_on = [ + "aws_networkmanager_attachment_accepter.test" + ] +} + +resource "aws_networkmanager_attachment_accepter" "test2" { + attachment_id = aws_networkmanager_connect_attachment.test.id + attachment_type = aws_networkmanager_connect_attachment.test.attachment_type +} + +# acctest.ConfigVPCWithSubnetsIPv6(rName, 2) + +resource "aws_vpc" "test" { + cidr_block = "10.0.0.0/16" + + assign_generated_ipv6_cidr_block = true +} + +resource "aws_subnet" "test" { + count = 2 + + vpc_id = aws_vpc.test.id + availability_zone = data.aws_availability_zones.available.names[count.index] + + cidr_block = cidrsubnet(aws_vpc.test.cidr_block, 8, count.index) + ipv6_cidr_block = cidrsubnet(aws_vpc.test.ipv6_cidr_block, 8, count.index) + assign_ipv6_address_on_creation = true +} + +# acctest.ConfigAvailableAZsNoOptInDefaultExclude + +data "aws_availability_zones" "available" { + exclude_zone_ids = local.default_exclude_zone_ids + state = "available" + + filter { + name = "opt-in-status" + values = ["opt-in-not-required"] + } +} + +locals { + default_exclude_zone_ids = ["usw2-az4", "usgw1-az2"] +} + +variable "resource_tags" { + description = "Tags to set on resource. To specify no tags, set to `null`" + # Not setting a default, so that this must explicitly be set to `null` to specify no tags + type = map(string) + nullable = true +} + +variable "provider_tags" { + type = map(string) + nullable = true + default = null +} + +variable "ignore_tag_keys" { + type = set(string) + nullable = false +} diff --git a/internal/service/networkmanager/testdata/tmpl/connect_peer_tags.gtpl b/internal/service/networkmanager/testdata/tmpl/connect_peer_tags.gtpl new file mode 100644 index 000000000000..aec5fe7876a3 --- /dev/null +++ b/internal/service/networkmanager/testdata/tmpl/connect_peer_tags.gtpl @@ -0,0 +1,105 @@ +resource "aws_networkmanager_connect_peer" "test" { + connect_attachment_id = aws_networkmanager_connect_attachment.test.id + peer_address = local.peer_address + bgp_options { + peer_asn = local.peer_asn + } + inside_cidr_blocks = local.inside_cidr_blocks +{{- template "tags" . }} +} + +locals { + inside_cidr_blocks = ["169.254.10.0/29"] + peer_address = "1.1.1.1" + peer_asn = "65501" + protocol = "GRE" +} + +# testAccConnectPeerConfig_base + +resource "aws_networkmanager_global_network" "test" {} + +resource "aws_networkmanager_core_network" "test" { + global_network_id = aws_networkmanager_global_network.test.id +} + +resource "aws_networkmanager_core_network_policy_attachment" "test" { + core_network_id = aws_networkmanager_core_network.test.id + policy_document = data.aws_networkmanager_core_network_policy_document.test.json +} + +data "aws_region" "current" {} + +data "aws_networkmanager_core_network_policy_document" "test" { + core_network_configuration { + vpn_ecmp_support = false + asn_ranges = ["64512-64555"] + inside_cidr_blocks = ["172.16.0.0/16"] + edge_locations { + location = data.aws_region.current.region + asn = 64512 + inside_cidr_blocks = ["172.16.0.0/18"] + } + } + segments { + name = "shared" + description = "SegmentForSharedServices" + require_attachment_acceptance = true + } + segment_actions { + action = "share" + mode = "attachment-route" + segment = "shared" + share_with = ["*"] + } + attachment_policies { + rule_number = 1 + condition_logic = "or" + conditions { + type = "tag-value" + operator = "equals" + key = "segment" + value = "shared" + } + action { + association_method = "constant" + segment = "shared" + } + } +} + +resource "aws_networkmanager_vpc_attachment" "test" { + subnet_arns = aws_subnet.test[*].arn + core_network_id = aws_networkmanager_core_network_policy_attachment.test.core_network_id + vpc_arn = aws_vpc.test.arn + tags = { + segment = "shared" + } +} + +resource "aws_networkmanager_attachment_accepter" "test" { + attachment_id = aws_networkmanager_vpc_attachment.test.id + attachment_type = aws_networkmanager_vpc_attachment.test.attachment_type +} + +resource "aws_networkmanager_connect_attachment" "test" { + core_network_id = aws_networkmanager_core_network.test.id + transport_attachment_id = aws_networkmanager_vpc_attachment.test.id + edge_location = aws_networkmanager_vpc_attachment.test.edge_location + options { + protocol = local.protocol + } + tags = { + segment = "shared" + } + depends_on = [ + "aws_networkmanager_attachment_accepter.test" + ] +} + +resource "aws_networkmanager_attachment_accepter" "test2" { + attachment_id = aws_networkmanager_connect_attachment.test.id + attachment_type = aws_networkmanager_connect_attachment.test.attachment_type +} + +{{ template "acctest.ConfigVPCWithSubnetsIPv6" 2 }} From 159420098abba6721d5787d07f020ee4f300c90f Mon Sep 17 00:00:00 2001 From: Graham Davison Date: Mon, 28 Jul 2025 15:45:08 -0700 Subject: [PATCH 051/365] `aws_networkmanager_transit_gateway_route_table_attachment` --- .../tags/main_gen.tf | 80 + .../tagsComputed1/main_gen.tf | 84 + .../tagsComputed2/main_gen.tf | 95 + .../tags_defaults/main_gen.tf | 91 + .../tags_ignore/main_gen.tf | 100 + ...t_gateway_route_table_attachment_tags.gtpl | 69 + .../transit_gateway_route_table_attachment.go | 4 +- ...ay_route_table_attachment_tags_gen_test.go | 2184 +++++++++++++++++ ...sit_gateway_route_table_attachment_test.go | 87 - 9 files changed, 2706 insertions(+), 88 deletions(-) create mode 100644 internal/service/networkmanager/testdata/TransitGatewayRouteTableAttachment/tags/main_gen.tf create mode 100644 internal/service/networkmanager/testdata/TransitGatewayRouteTableAttachment/tagsComputed1/main_gen.tf create mode 100644 internal/service/networkmanager/testdata/TransitGatewayRouteTableAttachment/tagsComputed2/main_gen.tf create mode 100644 internal/service/networkmanager/testdata/TransitGatewayRouteTableAttachment/tags_defaults/main_gen.tf create mode 100644 internal/service/networkmanager/testdata/TransitGatewayRouteTableAttachment/tags_ignore/main_gen.tf create mode 100644 internal/service/networkmanager/testdata/tmpl/transit_gateway_route_table_attachment_tags.gtpl create mode 100644 internal/service/networkmanager/transit_gateway_route_table_attachment_tags_gen_test.go diff --git a/internal/service/networkmanager/testdata/TransitGatewayRouteTableAttachment/tags/main_gen.tf b/internal/service/networkmanager/testdata/TransitGatewayRouteTableAttachment/tags/main_gen.tf new file mode 100644 index 000000000000..0b7f80e7b7cf --- /dev/null +++ b/internal/service/networkmanager/testdata/TransitGatewayRouteTableAttachment/tags/main_gen.tf @@ -0,0 +1,80 @@ +# Copyright (c) HashiCorp, Inc. +# SPDX-License-Identifier: MPL-2.0 + +resource "aws_networkmanager_transit_gateway_route_table_attachment" "test" { + peering_id = aws_networkmanager_transit_gateway_peering.test.id + transit_gateway_route_table_arn = aws_ec2_transit_gateway_route_table.test.arn + + depends_on = [aws_ec2_transit_gateway_policy_table_association.test] + + tags = var.resource_tags +} + +resource "aws_networkmanager_attachment_accepter" "test" { + attachment_id = aws_networkmanager_transit_gateway_route_table_attachment.test.id + attachment_type = aws_networkmanager_transit_gateway_route_table_attachment.test.attachment_type +} + +# testAccTransitGatewayRouteTableAttachmentConfig_base + +resource "aws_networkmanager_transit_gateway_peering" "test" { + core_network_id = aws_networkmanager_core_network.test.id + transit_gateway_arn = aws_ec2_transit_gateway.test.arn + + depends_on = [ + aws_ec2_transit_gateway_policy_table.test, + aws_networkmanager_core_network_policy_attachment.test, +] +} + +resource "aws_ec2_transit_gateway_route_table" "test" { + transit_gateway_id = aws_ec2_transit_gateway.test.id +} + +resource "aws_ec2_transit_gateway_policy_table_association" "test" { + transit_gateway_attachment_id = aws_networkmanager_transit_gateway_peering.test.transit_gateway_peering_attachment_id + transit_gateway_policy_table_id = aws_ec2_transit_gateway_policy_table.test.id +} + +# testAccTransitGatewayPeeringConfig_base + +resource "aws_ec2_transit_gateway" "test" {} + +resource "aws_ec2_transit_gateway_policy_table" "test" { + transit_gateway_id = aws_ec2_transit_gateway.test.id +} + +resource "aws_networkmanager_global_network" "test" {} + +resource "aws_networkmanager_core_network" "test" { + global_network_id = aws_networkmanager_global_network.test.id +} + +data "aws_region" "current" {} + +resource "aws_networkmanager_core_network_policy_attachment" "test" { + core_network_id = aws_networkmanager_core_network.test.id + policy_document = data.aws_networkmanager_core_network_policy_document.test.json +} + +data "aws_networkmanager_core_network_policy_document" "test" { + core_network_configuration { + # Don't overlap with default TGW ASN: 64512. + asn_ranges = ["65022-65534"] + + edge_locations { + location = data.aws_region.current.region + } + } + + segments { + name = "test" + } +} + +variable "resource_tags" { + description = "Tags to set on resource. To specify no tags, set to `null`" + # Not setting a default, so that this must explicitly be set to `null` to specify no tags + type = map(string) + nullable = true +} diff --git a/internal/service/networkmanager/testdata/TransitGatewayRouteTableAttachment/tagsComputed1/main_gen.tf b/internal/service/networkmanager/testdata/TransitGatewayRouteTableAttachment/tagsComputed1/main_gen.tf new file mode 100644 index 000000000000..2b45c767ac32 --- /dev/null +++ b/internal/service/networkmanager/testdata/TransitGatewayRouteTableAttachment/tagsComputed1/main_gen.tf @@ -0,0 +1,84 @@ +# Copyright (c) HashiCorp, Inc. +# SPDX-License-Identifier: MPL-2.0 + +provider "null" {} + +resource "aws_networkmanager_transit_gateway_route_table_attachment" "test" { + peering_id = aws_networkmanager_transit_gateway_peering.test.id + transit_gateway_route_table_arn = aws_ec2_transit_gateway_route_table.test.arn + + depends_on = [aws_ec2_transit_gateway_policy_table_association.test] + + tags = { + (var.unknownTagKey) = null_resource.test.id + } +} + +resource "aws_networkmanager_attachment_accepter" "test" { + attachment_id = aws_networkmanager_transit_gateway_route_table_attachment.test.id + attachment_type = aws_networkmanager_transit_gateway_route_table_attachment.test.attachment_type +} + +# testAccTransitGatewayRouteTableAttachmentConfig_base + +resource "aws_networkmanager_transit_gateway_peering" "test" { + core_network_id = aws_networkmanager_core_network.test.id + transit_gateway_arn = aws_ec2_transit_gateway.test.arn + + depends_on = [ + aws_ec2_transit_gateway_policy_table.test, + aws_networkmanager_core_network_policy_attachment.test, +] +} + +resource "aws_ec2_transit_gateway_route_table" "test" { + transit_gateway_id = aws_ec2_transit_gateway.test.id +} + +resource "aws_ec2_transit_gateway_policy_table_association" "test" { + transit_gateway_attachment_id = aws_networkmanager_transit_gateway_peering.test.transit_gateway_peering_attachment_id + transit_gateway_policy_table_id = aws_ec2_transit_gateway_policy_table.test.id +} + +# testAccTransitGatewayPeeringConfig_base + +resource "aws_ec2_transit_gateway" "test" {} + +resource "aws_ec2_transit_gateway_policy_table" "test" { + transit_gateway_id = aws_ec2_transit_gateway.test.id +} + +resource "aws_networkmanager_global_network" "test" {} + +resource "aws_networkmanager_core_network" "test" { + global_network_id = aws_networkmanager_global_network.test.id +} + +data "aws_region" "current" {} + +resource "aws_networkmanager_core_network_policy_attachment" "test" { + core_network_id = aws_networkmanager_core_network.test.id + policy_document = data.aws_networkmanager_core_network_policy_document.test.json +} + +data "aws_networkmanager_core_network_policy_document" "test" { + core_network_configuration { + # Don't overlap with default TGW ASN: 64512. + asn_ranges = ["65022-65534"] + + edge_locations { + location = data.aws_region.current.region + } + } + + segments { + name = "test" + } +} + +resource "null_resource" "test" {} + +variable "unknownTagKey" { + type = string + nullable = false +} diff --git a/internal/service/networkmanager/testdata/TransitGatewayRouteTableAttachment/tagsComputed2/main_gen.tf b/internal/service/networkmanager/testdata/TransitGatewayRouteTableAttachment/tagsComputed2/main_gen.tf new file mode 100644 index 000000000000..b6e5dab795e9 --- /dev/null +++ b/internal/service/networkmanager/testdata/TransitGatewayRouteTableAttachment/tagsComputed2/main_gen.tf @@ -0,0 +1,95 @@ +# Copyright (c) HashiCorp, Inc. +# SPDX-License-Identifier: MPL-2.0 + +provider "null" {} + +resource "aws_networkmanager_transit_gateway_route_table_attachment" "test" { + peering_id = aws_networkmanager_transit_gateway_peering.test.id + transit_gateway_route_table_arn = aws_ec2_transit_gateway_route_table.test.arn + + depends_on = [aws_ec2_transit_gateway_policy_table_association.test] + + tags = { + (var.unknownTagKey) = null_resource.test.id + (var.knownTagKey) = var.knownTagValue + } +} + +resource "aws_networkmanager_attachment_accepter" "test" { + attachment_id = aws_networkmanager_transit_gateway_route_table_attachment.test.id + attachment_type = aws_networkmanager_transit_gateway_route_table_attachment.test.attachment_type +} + +# testAccTransitGatewayRouteTableAttachmentConfig_base + +resource "aws_networkmanager_transit_gateway_peering" "test" { + core_network_id = aws_networkmanager_core_network.test.id + transit_gateway_arn = aws_ec2_transit_gateway.test.arn + + depends_on = [ + aws_ec2_transit_gateway_policy_table.test, + aws_networkmanager_core_network_policy_attachment.test, +] +} + +resource "aws_ec2_transit_gateway_route_table" "test" { + transit_gateway_id = aws_ec2_transit_gateway.test.id +} + +resource "aws_ec2_transit_gateway_policy_table_association" "test" { + transit_gateway_attachment_id = aws_networkmanager_transit_gateway_peering.test.transit_gateway_peering_attachment_id + transit_gateway_policy_table_id = aws_ec2_transit_gateway_policy_table.test.id +} + +# testAccTransitGatewayPeeringConfig_base + +resource "aws_ec2_transit_gateway" "test" {} + +resource "aws_ec2_transit_gateway_policy_table" "test" { + transit_gateway_id = aws_ec2_transit_gateway.test.id +} + +resource "aws_networkmanager_global_network" "test" {} + +resource "aws_networkmanager_core_network" "test" { + global_network_id = aws_networkmanager_global_network.test.id +} + +data "aws_region" "current" {} + +resource "aws_networkmanager_core_network_policy_attachment" "test" { + core_network_id = aws_networkmanager_core_network.test.id + policy_document = data.aws_networkmanager_core_network_policy_document.test.json +} + +data "aws_networkmanager_core_network_policy_document" "test" { + core_network_configuration { + # Don't overlap with default TGW ASN: 64512. + asn_ranges = ["65022-65534"] + + edge_locations { + location = data.aws_region.current.region + } + } + + segments { + name = "test" + } +} + +resource "null_resource" "test" {} + +variable "unknownTagKey" { + type = string + nullable = false +} + +variable "knownTagKey" { + type = string + nullable = false +} + +variable "knownTagValue" { + type = string + nullable = false +} diff --git a/internal/service/networkmanager/testdata/TransitGatewayRouteTableAttachment/tags_defaults/main_gen.tf b/internal/service/networkmanager/testdata/TransitGatewayRouteTableAttachment/tags_defaults/main_gen.tf new file mode 100644 index 000000000000..6653b6e81a07 --- /dev/null +++ b/internal/service/networkmanager/testdata/TransitGatewayRouteTableAttachment/tags_defaults/main_gen.tf @@ -0,0 +1,91 @@ +# Copyright (c) HashiCorp, Inc. +# SPDX-License-Identifier: MPL-2.0 + +provider "aws" { + default_tags { + tags = var.provider_tags + } +} + +resource "aws_networkmanager_transit_gateway_route_table_attachment" "test" { + peering_id = aws_networkmanager_transit_gateway_peering.test.id + transit_gateway_route_table_arn = aws_ec2_transit_gateway_route_table.test.arn + + depends_on = [aws_ec2_transit_gateway_policy_table_association.test] + + tags = var.resource_tags +} + +resource "aws_networkmanager_attachment_accepter" "test" { + attachment_id = aws_networkmanager_transit_gateway_route_table_attachment.test.id + attachment_type = aws_networkmanager_transit_gateway_route_table_attachment.test.attachment_type +} + +# testAccTransitGatewayRouteTableAttachmentConfig_base + +resource "aws_networkmanager_transit_gateway_peering" "test" { + core_network_id = aws_networkmanager_core_network.test.id + transit_gateway_arn = aws_ec2_transit_gateway.test.arn + + depends_on = [ + aws_ec2_transit_gateway_policy_table.test, + aws_networkmanager_core_network_policy_attachment.test, +] +} + +resource "aws_ec2_transit_gateway_route_table" "test" { + transit_gateway_id = aws_ec2_transit_gateway.test.id +} + +resource "aws_ec2_transit_gateway_policy_table_association" "test" { + transit_gateway_attachment_id = aws_networkmanager_transit_gateway_peering.test.transit_gateway_peering_attachment_id + transit_gateway_policy_table_id = aws_ec2_transit_gateway_policy_table.test.id +} + +# testAccTransitGatewayPeeringConfig_base + +resource "aws_ec2_transit_gateway" "test" {} + +resource "aws_ec2_transit_gateway_policy_table" "test" { + transit_gateway_id = aws_ec2_transit_gateway.test.id +} + +resource "aws_networkmanager_global_network" "test" {} + +resource "aws_networkmanager_core_network" "test" { + global_network_id = aws_networkmanager_global_network.test.id +} + +data "aws_region" "current" {} + +resource "aws_networkmanager_core_network_policy_attachment" "test" { + core_network_id = aws_networkmanager_core_network.test.id + policy_document = data.aws_networkmanager_core_network_policy_document.test.json +} + +data "aws_networkmanager_core_network_policy_document" "test" { + core_network_configuration { + # Don't overlap with default TGW ASN: 64512. + asn_ranges = ["65022-65534"] + + edge_locations { + location = data.aws_region.current.region + } + } + + segments { + name = "test" + } +} + +variable "resource_tags" { + description = "Tags to set on resource. To specify no tags, set to `null`" + # Not setting a default, so that this must explicitly be set to `null` to specify no tags + type = map(string) + nullable = true +} + +variable "provider_tags" { + type = map(string) + nullable = false +} diff --git a/internal/service/networkmanager/testdata/TransitGatewayRouteTableAttachment/tags_ignore/main_gen.tf b/internal/service/networkmanager/testdata/TransitGatewayRouteTableAttachment/tags_ignore/main_gen.tf new file mode 100644 index 000000000000..3b72cca7513c --- /dev/null +++ b/internal/service/networkmanager/testdata/TransitGatewayRouteTableAttachment/tags_ignore/main_gen.tf @@ -0,0 +1,100 @@ +# Copyright (c) HashiCorp, Inc. +# SPDX-License-Identifier: MPL-2.0 + +provider "aws" { + default_tags { + tags = var.provider_tags + } + ignore_tags { + keys = var.ignore_tag_keys + } +} + +resource "aws_networkmanager_transit_gateway_route_table_attachment" "test" { + peering_id = aws_networkmanager_transit_gateway_peering.test.id + transit_gateway_route_table_arn = aws_ec2_transit_gateway_route_table.test.arn + + depends_on = [aws_ec2_transit_gateway_policy_table_association.test] + + tags = var.resource_tags +} + +resource "aws_networkmanager_attachment_accepter" "test" { + attachment_id = aws_networkmanager_transit_gateway_route_table_attachment.test.id + attachment_type = aws_networkmanager_transit_gateway_route_table_attachment.test.attachment_type +} + +# testAccTransitGatewayRouteTableAttachmentConfig_base + +resource "aws_networkmanager_transit_gateway_peering" "test" { + core_network_id = aws_networkmanager_core_network.test.id + transit_gateway_arn = aws_ec2_transit_gateway.test.arn + + depends_on = [ + aws_ec2_transit_gateway_policy_table.test, + aws_networkmanager_core_network_policy_attachment.test, +] +} + +resource "aws_ec2_transit_gateway_route_table" "test" { + transit_gateway_id = aws_ec2_transit_gateway.test.id +} + +resource "aws_ec2_transit_gateway_policy_table_association" "test" { + transit_gateway_attachment_id = aws_networkmanager_transit_gateway_peering.test.transit_gateway_peering_attachment_id + transit_gateway_policy_table_id = aws_ec2_transit_gateway_policy_table.test.id +} + +# testAccTransitGatewayPeeringConfig_base + +resource "aws_ec2_transit_gateway" "test" {} + +resource "aws_ec2_transit_gateway_policy_table" "test" { + transit_gateway_id = aws_ec2_transit_gateway.test.id +} + +resource "aws_networkmanager_global_network" "test" {} + +resource "aws_networkmanager_core_network" "test" { + global_network_id = aws_networkmanager_global_network.test.id +} + +data "aws_region" "current" {} + +resource "aws_networkmanager_core_network_policy_attachment" "test" { + core_network_id = aws_networkmanager_core_network.test.id + policy_document = data.aws_networkmanager_core_network_policy_document.test.json +} + +data "aws_networkmanager_core_network_policy_document" "test" { + core_network_configuration { + # Don't overlap with default TGW ASN: 64512. + asn_ranges = ["65022-65534"] + + edge_locations { + location = data.aws_region.current.region + } + } + + segments { + name = "test" + } +} + +variable "resource_tags" { + description = "Tags to set on resource. To specify no tags, set to `null`" + # Not setting a default, so that this must explicitly be set to `null` to specify no tags + type = map(string) + nullable = true +} + +variable "provider_tags" { + type = map(string) + nullable = true + default = null +} + +variable "ignore_tag_keys" { + type = set(string) + nullable = false +} diff --git a/internal/service/networkmanager/testdata/tmpl/transit_gateway_route_table_attachment_tags.gtpl b/internal/service/networkmanager/testdata/tmpl/transit_gateway_route_table_attachment_tags.gtpl new file mode 100644 index 000000000000..0e4739d62f84 --- /dev/null +++ b/internal/service/networkmanager/testdata/tmpl/transit_gateway_route_table_attachment_tags.gtpl @@ -0,0 +1,69 @@ +resource "aws_networkmanager_transit_gateway_route_table_attachment" "test" { + peering_id = aws_networkmanager_transit_gateway_peering.test.id + transit_gateway_route_table_arn = aws_ec2_transit_gateway_route_table.test.arn + + depends_on = [aws_ec2_transit_gateway_policy_table_association.test] +{{- template "tags" . }} +} + +resource "aws_networkmanager_attachment_accepter" "test" { + attachment_id = aws_networkmanager_transit_gateway_route_table_attachment.test.id + attachment_type = aws_networkmanager_transit_gateway_route_table_attachment.test.attachment_type +} + +# testAccTransitGatewayRouteTableAttachmentConfig_base + +resource "aws_networkmanager_transit_gateway_peering" "test" { + core_network_id = aws_networkmanager_core_network.test.id + transit_gateway_arn = aws_ec2_transit_gateway.test.arn + + depends_on = [ + aws_ec2_transit_gateway_policy_table.test, + aws_networkmanager_core_network_policy_attachment.test, +] +} + +resource "aws_ec2_transit_gateway_route_table" "test" { + transit_gateway_id = aws_ec2_transit_gateway.test.id +} + +resource "aws_ec2_transit_gateway_policy_table_association" "test" { + transit_gateway_attachment_id = aws_networkmanager_transit_gateway_peering.test.transit_gateway_peering_attachment_id + transit_gateway_policy_table_id = aws_ec2_transit_gateway_policy_table.test.id +} + +# testAccTransitGatewayPeeringConfig_base + +resource "aws_ec2_transit_gateway" "test" {} + +resource "aws_ec2_transit_gateway_policy_table" "test" { + transit_gateway_id = aws_ec2_transit_gateway.test.id +} + +resource "aws_networkmanager_global_network" "test" {} + +resource "aws_networkmanager_core_network" "test" { + global_network_id = aws_networkmanager_global_network.test.id +} + +data "aws_region" "current" {} + +resource "aws_networkmanager_core_network_policy_attachment" "test" { + core_network_id = aws_networkmanager_core_network.test.id + policy_document = data.aws_networkmanager_core_network_policy_document.test.json +} + +data "aws_networkmanager_core_network_policy_document" "test" { + core_network_configuration { + # Don't overlap with default TGW ASN: 64512. + asn_ranges = ["65022-65534"] + + edge_locations { + location = data.aws_region.current.region + } + } + + segments { + name = "test" + } +} diff --git a/internal/service/networkmanager/transit_gateway_route_table_attachment.go b/internal/service/networkmanager/transit_gateway_route_table_attachment.go index cade6876beb7..450aba74ddf3 100644 --- a/internal/service/networkmanager/transit_gateway_route_table_attachment.go +++ b/internal/service/networkmanager/transit_gateway_route_table_attachment.go @@ -26,7 +26,9 @@ import ( // @SDKResource("aws_networkmanager_transit_gateway_route_table_attachment", name="Transit Gateway Route Table Attachment") // @Tags(identifierAttribute="arn") -// @Testing(tagsTest=false) +// @Testing(existsType="github.com/aws/aws-sdk-go-v2/service/networkmanager/types;awstypes;awstypes.TransitGatewayRouteTableAttachment") +// @Testing(skipEmptyTags=true) +// @Testing(generator=false) func resourceTransitGatewayRouteTableAttachment() *schema.Resource { return &schema.Resource{ CreateWithoutTimeout: resourceTransitGatewayRouteTableAttachmentCreate, diff --git a/internal/service/networkmanager/transit_gateway_route_table_attachment_tags_gen_test.go b/internal/service/networkmanager/transit_gateway_route_table_attachment_tags_gen_test.go new file mode 100644 index 000000000000..861d05bbd66a --- /dev/null +++ b/internal/service/networkmanager/transit_gateway_route_table_attachment_tags_gen_test.go @@ -0,0 +1,2184 @@ +// Code generated by internal/generate/tagstests/main.go; DO NOT EDIT. + +package networkmanager_test + +import ( + "testing" + + awstypes "github.com/aws/aws-sdk-go-v2/service/networkmanager/types" + "github.com/hashicorp/terraform-plugin-testing/config" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/knownvalue" + "github.com/hashicorp/terraform-plugin-testing/plancheck" + "github.com/hashicorp/terraform-plugin-testing/statecheck" + "github.com/hashicorp/terraform-plugin-testing/tfjsonpath" + "github.com/hashicorp/terraform-provider-aws/internal/acctest" + "github.com/hashicorp/terraform-provider-aws/names" +) + +func TestAccNetworkManagerTransitGatewayRouteTableAttachment_tags(t *testing.T) { + ctx := acctest.Context(t) + var v awstypes.TransitGatewayRouteTableAttachment + resourceName := "aws_networkmanager_transit_gateway_route_table_attachment.test" + + acctest.ParallelTest(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckTransitGatewayRouteTableAttachmentDestroy(ctx), + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + Steps: []resource.TestStep{ + { + ConfigDirectory: config.StaticDirectory("testdata/TransitGatewayRouteTableAttachment/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckTransitGatewayRouteTableAttachmentExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + }, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/TransitGatewayRouteTableAttachment/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/TransitGatewayRouteTableAttachment/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1Updated), + acctest.CtKey2: config.StringVariable(acctest.CtValue2), + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckTransitGatewayRouteTableAttachmentExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1Updated), + acctest.CtKey2: knownvalue.StringExact(acctest.CtValue2), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1Updated), + acctest.CtKey2: knownvalue.StringExact(acctest.CtValue2), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1Updated), + acctest.CtKey2: knownvalue.StringExact(acctest.CtValue2), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1Updated), + acctest.CtKey2: knownvalue.StringExact(acctest.CtValue2), + })), + }, + }, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/TransitGatewayRouteTableAttachment/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1Updated), + acctest.CtKey2: config.StringVariable(acctest.CtValue2), + }), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/TransitGatewayRouteTableAttachment/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey2: config.StringVariable(acctest.CtValue2), + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckTransitGatewayRouteTableAttachmentExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey2: knownvalue.StringExact(acctest.CtValue2), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey2: knownvalue.StringExact(acctest.CtValue2), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey2: knownvalue.StringExact(acctest.CtValue2), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey2: knownvalue.StringExact(acctest.CtValue2), + })), + }, + }, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/TransitGatewayRouteTableAttachment/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey2: config.StringVariable(acctest.CtValue2), + }), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/TransitGatewayRouteTableAttachment/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: nil, + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckTransitGatewayRouteTableAttachmentExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{})), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{})), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{})), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{})), + }, + }, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/TransitGatewayRouteTableAttachment/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: nil, + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} + +func TestAccNetworkManagerTransitGatewayRouteTableAttachment_tags_null(t *testing.T) { + ctx := acctest.Context(t) + var v awstypes.TransitGatewayRouteTableAttachment + resourceName := "aws_networkmanager_transit_gateway_route_table_attachment.test" + + acctest.ParallelTest(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckTransitGatewayRouteTableAttachmentDestroy(ctx), + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + Steps: []resource.TestStep{ + { + ConfigDirectory: config.StaticDirectory("testdata/TransitGatewayRouteTableAttachment/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: nil, + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckTransitGatewayRouteTableAttachmentExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.Null()), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{})), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.Null()), + // TODO: Should be known + plancheck.ExpectUnknownValue(resourceName, tfjsonpath.New(names.AttrTagsAll)), + }, + }, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/TransitGatewayRouteTableAttachment/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: nil, + }), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/TransitGatewayRouteTableAttachment/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: nil, + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionNoop), + }, + PostApplyPostRefresh: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionNoop), + }, + }, + }, + }, + }) +} + +func TestAccNetworkManagerTransitGatewayRouteTableAttachment_tags_EmptyMap(t *testing.T) { + ctx := acctest.Context(t) + var v awstypes.TransitGatewayRouteTableAttachment + resourceName := "aws_networkmanager_transit_gateway_route_table_attachment.test" + + acctest.ParallelTest(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckTransitGatewayRouteTableAttachmentDestroy(ctx), + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + Steps: []resource.TestStep{ + { + ConfigDirectory: config.StaticDirectory("testdata/TransitGatewayRouteTableAttachment/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{}), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckTransitGatewayRouteTableAttachmentExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.Null()), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{})), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.Null()), + // TODO: Should be known + plancheck.ExpectUnknownValue(resourceName, tfjsonpath.New(names.AttrTagsAll)), + }, + }, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/TransitGatewayRouteTableAttachment/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{}), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/TransitGatewayRouteTableAttachment/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: nil, + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionNoop), + }, + PostApplyPostRefresh: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionNoop), + }, + }, + }, + }, + }) +} + +func TestAccNetworkManagerTransitGatewayRouteTableAttachment_tags_AddOnUpdate(t *testing.T) { + ctx := acctest.Context(t) + var v awstypes.TransitGatewayRouteTableAttachment + resourceName := "aws_networkmanager_transit_gateway_route_table_attachment.test" + + acctest.ParallelTest(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckTransitGatewayRouteTableAttachmentDestroy(ctx), + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + Steps: []resource.TestStep{ + { + ConfigDirectory: config.StaticDirectory("testdata/TransitGatewayRouteTableAttachment/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: nil, + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckTransitGatewayRouteTableAttachmentExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.Null()), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{})), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.Null()), + // TODO: Should be known + plancheck.ExpectUnknownValue(resourceName, tfjsonpath.New(names.AttrTagsAll)), + }, + }, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/TransitGatewayRouteTableAttachment/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckTransitGatewayRouteTableAttachmentExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + }, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/TransitGatewayRouteTableAttachment/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} + +func TestAccNetworkManagerTransitGatewayRouteTableAttachment_tags_EmptyTag_OnCreate(t *testing.T) { + t.Skip("Resource TransitGatewayRouteTableAttachment does not support empty tags") + + ctx := acctest.Context(t) + var v awstypes.TransitGatewayRouteTableAttachment + resourceName := "aws_networkmanager_transit_gateway_route_table_attachment.test" + + acctest.ParallelTest(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckTransitGatewayRouteTableAttachmentDestroy(ctx), + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + Steps: []resource.TestStep{ + { + ConfigDirectory: config.StaticDirectory("testdata/TransitGatewayRouteTableAttachment/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(""), + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckTransitGatewayRouteTableAttachmentExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(""), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(""), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(""), + })), + // TODO: Should be known + plancheck.ExpectUnknownValue(resourceName, tfjsonpath.New(names.AttrTagsAll)), + }, + }, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/TransitGatewayRouteTableAttachment/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(""), + }), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/TransitGatewayRouteTableAttachment/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: nil, + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckTransitGatewayRouteTableAttachmentExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{})), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{})), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{})), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{})), + }, + }, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/TransitGatewayRouteTableAttachment/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: nil, + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} + +func TestAccNetworkManagerTransitGatewayRouteTableAttachment_tags_EmptyTag_OnUpdate_Add(t *testing.T) { + t.Skip("Resource TransitGatewayRouteTableAttachment does not support empty tags") + + ctx := acctest.Context(t) + var v awstypes.TransitGatewayRouteTableAttachment + resourceName := "aws_networkmanager_transit_gateway_route_table_attachment.test" + + acctest.ParallelTest(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckTransitGatewayRouteTableAttachmentDestroy(ctx), + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + Steps: []resource.TestStep{ + { + ConfigDirectory: config.StaticDirectory("testdata/TransitGatewayRouteTableAttachment/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckTransitGatewayRouteTableAttachmentExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + }, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/TransitGatewayRouteTableAttachment/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + acctest.CtKey2: config.StringVariable(""), + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckTransitGatewayRouteTableAttachmentExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + acctest.CtKey2: knownvalue.StringExact(""), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + acctest.CtKey2: knownvalue.StringExact(""), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + acctest.CtKey2: knownvalue.StringExact(""), + })), + // TODO: Should be known + plancheck.ExpectUnknownValue(resourceName, tfjsonpath.New(names.AttrTagsAll)), + }, + }, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/TransitGatewayRouteTableAttachment/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + acctest.CtKey2: config.StringVariable(""), + }), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/TransitGatewayRouteTableAttachment/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckTransitGatewayRouteTableAttachmentExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + }, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/TransitGatewayRouteTableAttachment/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} + +func TestAccNetworkManagerTransitGatewayRouteTableAttachment_tags_EmptyTag_OnUpdate_Replace(t *testing.T) { + t.Skip("Resource TransitGatewayRouteTableAttachment does not support empty tags") + + ctx := acctest.Context(t) + var v awstypes.TransitGatewayRouteTableAttachment + resourceName := "aws_networkmanager_transit_gateway_route_table_attachment.test" + + acctest.ParallelTest(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckTransitGatewayRouteTableAttachmentDestroy(ctx), + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + Steps: []resource.TestStep{ + { + ConfigDirectory: config.StaticDirectory("testdata/TransitGatewayRouteTableAttachment/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckTransitGatewayRouteTableAttachmentExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + }, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/TransitGatewayRouteTableAttachment/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(""), + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckTransitGatewayRouteTableAttachmentExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(""), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(""), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(""), + })), + // TODO: Should be known + plancheck.ExpectUnknownValue(resourceName, tfjsonpath.New(names.AttrTagsAll)), + }, + }, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/TransitGatewayRouteTableAttachment/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(""), + }), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} + +func TestAccNetworkManagerTransitGatewayRouteTableAttachment_tags_DefaultTags_providerOnly(t *testing.T) { + ctx := acctest.Context(t) + var v awstypes.TransitGatewayRouteTableAttachment + resourceName := "aws_networkmanager_transit_gateway_route_table_attachment.test" + + acctest.ParallelTest(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckTransitGatewayRouteTableAttachmentDestroy(ctx), + Steps: []resource.TestStep{ + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/TransitGatewayRouteTableAttachment/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + acctest.CtResourceTags: nil, + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckTransitGatewayRouteTableAttachmentExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.Null()), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.Null()), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/TransitGatewayRouteTableAttachment/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + acctest.CtResourceTags: nil, + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/TransitGatewayRouteTableAttachment/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1Updated), + acctest.CtKey2: config.StringVariable(acctest.CtValue2), + }), + acctest.CtResourceTags: nil, + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckTransitGatewayRouteTableAttachmentExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{})), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1Updated), + acctest.CtKey2: knownvalue.StringExact(acctest.CtValue2), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{})), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1Updated), + acctest.CtKey2: knownvalue.StringExact(acctest.CtValue2), + })), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/TransitGatewayRouteTableAttachment/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1Updated), + acctest.CtKey2: config.StringVariable(acctest.CtValue2), + }), + acctest.CtResourceTags: nil, + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/TransitGatewayRouteTableAttachment/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey2: config.StringVariable(acctest.CtValue2), + }), + acctest.CtResourceTags: nil, + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckTransitGatewayRouteTableAttachmentExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{})), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey2: knownvalue.StringExact(acctest.CtValue2), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{})), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey2: knownvalue.StringExact(acctest.CtValue2), + })), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/TransitGatewayRouteTableAttachment/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey2: config.StringVariable(acctest.CtValue2), + }), + acctest.CtResourceTags: nil, + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/TransitGatewayRouteTableAttachment/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: nil, + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckTransitGatewayRouteTableAttachmentExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{})), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{})), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{})), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{})), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/TransitGatewayRouteTableAttachment/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: nil, + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} + +func TestAccNetworkManagerTransitGatewayRouteTableAttachment_tags_DefaultTags_nonOverlapping(t *testing.T) { + ctx := acctest.Context(t) + var v awstypes.TransitGatewayRouteTableAttachment + resourceName := "aws_networkmanager_transit_gateway_route_table_attachment.test" + + acctest.ParallelTest(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckTransitGatewayRouteTableAttachmentDestroy(ctx), + Steps: []resource.TestStep{ + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/TransitGatewayRouteTableAttachment/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtProviderKey1: config.StringVariable(acctest.CtProviderValue1), + }), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtResourceKey1: config.StringVariable(acctest.CtResourceValue1), + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckTransitGatewayRouteTableAttachmentExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtProviderKey1: knownvalue.StringExact(acctest.CtProviderValue1), + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtProviderKey1: knownvalue.StringExact(acctest.CtProviderValue1), + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), + })), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/TransitGatewayRouteTableAttachment/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtProviderKey1: config.StringVariable(acctest.CtProviderValue1), + }), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtResourceKey1: config.StringVariable(acctest.CtResourceValue1), + }), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/TransitGatewayRouteTableAttachment/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtProviderKey1: config.StringVariable(acctest.CtProviderValue1Updated), + }), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtResourceKey1: config.StringVariable(acctest.CtResourceValue1Updated), + acctest.CtResourceKey2: config.StringVariable(acctest.CtResourceValue2), + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckTransitGatewayRouteTableAttachmentExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1Updated), + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtProviderKey1: knownvalue.StringExact(acctest.CtProviderValue1Updated), + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1Updated), + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1Updated), + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtProviderKey1: knownvalue.StringExact(acctest.CtProviderValue1Updated), + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1Updated), + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/TransitGatewayRouteTableAttachment/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtProviderKey1: config.StringVariable(acctest.CtProviderValue1Updated), + }), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtResourceKey1: config.StringVariable(acctest.CtResourceValue1Updated), + acctest.CtResourceKey2: config.StringVariable(acctest.CtResourceValue2), + }), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/TransitGatewayRouteTableAttachment/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: nil, + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckTransitGatewayRouteTableAttachmentExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{})), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{})), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{})), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{})), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/TransitGatewayRouteTableAttachment/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: nil, + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} + +func TestAccNetworkManagerTransitGatewayRouteTableAttachment_tags_DefaultTags_overlapping(t *testing.T) { + ctx := acctest.Context(t) + var v awstypes.TransitGatewayRouteTableAttachment + resourceName := "aws_networkmanager_transit_gateway_route_table_attachment.test" + + acctest.ParallelTest(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckTransitGatewayRouteTableAttachmentDestroy(ctx), + Steps: []resource.TestStep{ + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/TransitGatewayRouteTableAttachment/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtOverlapKey1: config.StringVariable(acctest.CtProviderValue1), + }), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtOverlapKey1: config.StringVariable(acctest.CtResourceValue1), + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckTransitGatewayRouteTableAttachmentExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtOverlapKey1: knownvalue.StringExact(acctest.CtResourceValue1), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtOverlapKey1: knownvalue.StringExact(acctest.CtResourceValue1), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtOverlapKey1: knownvalue.StringExact(acctest.CtResourceValue1), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtOverlapKey1: knownvalue.StringExact(acctest.CtResourceValue1), + })), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/TransitGatewayRouteTableAttachment/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtOverlapKey1: config.StringVariable(acctest.CtProviderValue1), + }), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtOverlapKey1: config.StringVariable(acctest.CtResourceValue1), + }), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/TransitGatewayRouteTableAttachment/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtOverlapKey1: config.StringVariable(acctest.CtProviderValue1), + acctest.CtOverlapKey2: config.StringVariable("providervalue2"), + }), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtOverlapKey1: config.StringVariable(acctest.CtResourceValue1), + acctest.CtOverlapKey2: config.StringVariable(acctest.CtResourceValue2), + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckTransitGatewayRouteTableAttachmentExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtOverlapKey1: knownvalue.StringExact(acctest.CtResourceValue1), + acctest.CtOverlapKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtOverlapKey1: knownvalue.StringExact(acctest.CtResourceValue1), + acctest.CtOverlapKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtOverlapKey1: knownvalue.StringExact(acctest.CtResourceValue1), + acctest.CtOverlapKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtOverlapKey1: knownvalue.StringExact(acctest.CtResourceValue1), + acctest.CtOverlapKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/TransitGatewayRouteTableAttachment/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtOverlapKey1: config.StringVariable(acctest.CtProviderValue1), + acctest.CtOverlapKey2: config.StringVariable("providervalue2"), + }), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtOverlapKey1: config.StringVariable(acctest.CtResourceValue1), + acctest.CtOverlapKey2: config.StringVariable(acctest.CtResourceValue2), + }), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/TransitGatewayRouteTableAttachment/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtOverlapKey1: config.StringVariable(acctest.CtProviderValue1), + }), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtOverlapKey1: config.StringVariable(acctest.CtResourceValue2), + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckTransitGatewayRouteTableAttachmentExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtOverlapKey1: knownvalue.StringExact(acctest.CtResourceValue2), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtOverlapKey1: knownvalue.StringExact(acctest.CtResourceValue2), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtOverlapKey1: knownvalue.StringExact(acctest.CtResourceValue2), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtOverlapKey1: knownvalue.StringExact(acctest.CtResourceValue2), + })), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/TransitGatewayRouteTableAttachment/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtOverlapKey1: config.StringVariable(acctest.CtProviderValue1), + }), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtOverlapKey1: config.StringVariable(acctest.CtResourceValue2), + }), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} + +func TestAccNetworkManagerTransitGatewayRouteTableAttachment_tags_DefaultTags_updateToProviderOnly(t *testing.T) { + ctx := acctest.Context(t) + var v awstypes.TransitGatewayRouteTableAttachment + resourceName := "aws_networkmanager_transit_gateway_route_table_attachment.test" + + acctest.ParallelTest(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckTransitGatewayRouteTableAttachmentDestroy(ctx), + Steps: []resource.TestStep{ + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/TransitGatewayRouteTableAttachment/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckTransitGatewayRouteTableAttachmentExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/TransitGatewayRouteTableAttachment/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + acctest.CtResourceTags: nil, + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckTransitGatewayRouteTableAttachmentExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{})), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{})), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/TransitGatewayRouteTableAttachment/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + acctest.CtResourceTags: nil, + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} + +func TestAccNetworkManagerTransitGatewayRouteTableAttachment_tags_DefaultTags_updateToResourceOnly(t *testing.T) { + ctx := acctest.Context(t) + var v awstypes.TransitGatewayRouteTableAttachment + resourceName := "aws_networkmanager_transit_gateway_route_table_attachment.test" + + acctest.ParallelTest(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckTransitGatewayRouteTableAttachmentDestroy(ctx), + Steps: []resource.TestStep{ + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/TransitGatewayRouteTableAttachment/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + acctest.CtResourceTags: nil, + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckTransitGatewayRouteTableAttachmentExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.Null()), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.Null()), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/TransitGatewayRouteTableAttachment/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckTransitGatewayRouteTableAttachmentExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionNoop), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/TransitGatewayRouteTableAttachment/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} + +func TestAccNetworkManagerTransitGatewayRouteTableAttachment_tags_DefaultTags_emptyResourceTag(t *testing.T) { + t.Skip("Resource TransitGatewayRouteTableAttachment does not support empty tags") + + ctx := acctest.Context(t) + var v awstypes.TransitGatewayRouteTableAttachment + resourceName := "aws_networkmanager_transit_gateway_route_table_attachment.test" + + acctest.ParallelTest(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckTransitGatewayRouteTableAttachmentDestroy(ctx), + Steps: []resource.TestStep{ + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/TransitGatewayRouteTableAttachment/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(""), + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckTransitGatewayRouteTableAttachmentExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(""), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(""), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(""), + })), + // TODO: Should be known + plancheck.ExpectUnknownValue(resourceName, tfjsonpath.New(names.AttrTagsAll)), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/TransitGatewayRouteTableAttachment/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(""), + }), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} + +func TestAccNetworkManagerTransitGatewayRouteTableAttachment_tags_DefaultTags_emptyProviderOnlyTag(t *testing.T) { + t.Skip("Resource TransitGatewayRouteTableAttachment does not support empty tags") + + ctx := acctest.Context(t) + var v awstypes.TransitGatewayRouteTableAttachment + resourceName := "aws_networkmanager_transit_gateway_route_table_attachment.test" + + acctest.ParallelTest(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckTransitGatewayRouteTableAttachmentDestroy(ctx), + Steps: []resource.TestStep{ + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/TransitGatewayRouteTableAttachment/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(""), + }), + acctest.CtResourceTags: nil, + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckTransitGatewayRouteTableAttachmentExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.Null()), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(""), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.Null()), + // TODO: Should be known + plancheck.ExpectUnknownValue(resourceName, tfjsonpath.New(names.AttrTagsAll)), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/TransitGatewayRouteTableAttachment/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(""), + }), + acctest.CtResourceTags: nil, + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} + +func TestAccNetworkManagerTransitGatewayRouteTableAttachment_tags_DefaultTags_nullOverlappingResourceTag(t *testing.T) { + ctx := acctest.Context(t) + var v awstypes.TransitGatewayRouteTableAttachment + resourceName := "aws_networkmanager_transit_gateway_route_table_attachment.test" + + acctest.ParallelTest(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckTransitGatewayRouteTableAttachmentDestroy(ctx), + Steps: []resource.TestStep{ + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/TransitGatewayRouteTableAttachment/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtProviderValue1), + }), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: nil, + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckTransitGatewayRouteTableAttachmentExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.Null()), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtProviderValue1), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.Null()), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtProviderValue1), + })), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/TransitGatewayRouteTableAttachment/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtProviderValue1), + }), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: nil, + }), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} + +func TestAccNetworkManagerTransitGatewayRouteTableAttachment_tags_DefaultTags_nullNonOverlappingResourceTag(t *testing.T) { + ctx := acctest.Context(t) + var v awstypes.TransitGatewayRouteTableAttachment + resourceName := "aws_networkmanager_transit_gateway_route_table_attachment.test" + + acctest.ParallelTest(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckTransitGatewayRouteTableAttachmentDestroy(ctx), + Steps: []resource.TestStep{ + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/TransitGatewayRouteTableAttachment/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtProviderKey1: config.StringVariable(acctest.CtProviderValue1), + }), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtResourceKey1: nil, + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckTransitGatewayRouteTableAttachmentExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.Null()), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtProviderKey1: knownvalue.StringExact(acctest.CtProviderValue1), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.Null()), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtProviderKey1: knownvalue.StringExact(acctest.CtProviderValue1), + })), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/TransitGatewayRouteTableAttachment/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtProviderKey1: config.StringVariable(acctest.CtProviderValue1), + }), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtResourceKey1: nil, + }), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} + +func TestAccNetworkManagerTransitGatewayRouteTableAttachment_tags_ComputedTag_OnCreate(t *testing.T) { + ctx := acctest.Context(t) + var v awstypes.TransitGatewayRouteTableAttachment + resourceName := "aws_networkmanager_transit_gateway_route_table_attachment.test" + + acctest.ParallelTest(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckTransitGatewayRouteTableAttachmentDestroy(ctx), + Steps: []resource.TestStep{ + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/TransitGatewayRouteTableAttachment/tagsComputed1/"), + ConfigVariables: config.Variables{ + "unknownTagKey": config.StringVariable("computedkey1"), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckTransitGatewayRouteTableAttachmentExists(ctx, resourceName, &v), + resource.TestCheckResourceAttrPair(resourceName, "tags.computedkey1", "null_resource.test", names.AttrID), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapSizeExact(1)), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapSizeExact(1)), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectUnknownValue(resourceName, tfjsonpath.New(names.AttrTags)), + plancheck.ExpectUnknownValue(resourceName, tfjsonpath.New(names.AttrTagsAll)), + }, + PostApplyPreRefresh: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionNoop), + }, + PostApplyPostRefresh: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionNoop), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/TransitGatewayRouteTableAttachment/tagsComputed1/"), + ConfigVariables: config.Variables{ + "unknownTagKey": config.StringVariable("computedkey1"), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} + +func TestAccNetworkManagerTransitGatewayRouteTableAttachment_tags_ComputedTag_OnUpdate_Add(t *testing.T) { + ctx := acctest.Context(t) + var v awstypes.TransitGatewayRouteTableAttachment + resourceName := "aws_networkmanager_transit_gateway_route_table_attachment.test" + + acctest.ParallelTest(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckTransitGatewayRouteTableAttachmentDestroy(ctx), + Steps: []resource.TestStep{ + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/TransitGatewayRouteTableAttachment/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckTransitGatewayRouteTableAttachmentExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/TransitGatewayRouteTableAttachment/tagsComputed2/"), + ConfigVariables: config.Variables{ + "unknownTagKey": config.StringVariable("computedkey1"), + "knownTagKey": config.StringVariable(acctest.CtKey1), + "knownTagValue": config.StringVariable(acctest.CtValue1), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckTransitGatewayRouteTableAttachmentExists(ctx, resourceName, &v), + resource.TestCheckResourceAttrPair(resourceName, "tags.computedkey1", "null_resource.test", names.AttrID), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapSizeExact(2)), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapPartial(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapSizeExact(2)), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapPartial(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectUnknownValue(resourceName, tfjsonpath.New(names.AttrTags)), + plancheck.ExpectUnknownValue(resourceName, tfjsonpath.New(names.AttrTagsAll)), + }, + PostApplyPreRefresh: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionNoop), + }, + PostApplyPostRefresh: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionNoop), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/TransitGatewayRouteTableAttachment/tagsComputed2/"), + ConfigVariables: config.Variables{ + "unknownTagKey": config.StringVariable("computedkey1"), + "knownTagKey": config.StringVariable(acctest.CtKey1), + "knownTagValue": config.StringVariable(acctest.CtValue1), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} + +func TestAccNetworkManagerTransitGatewayRouteTableAttachment_tags_ComputedTag_OnUpdate_Replace(t *testing.T) { + ctx := acctest.Context(t) + var v awstypes.TransitGatewayRouteTableAttachment + resourceName := "aws_networkmanager_transit_gateway_route_table_attachment.test" + + acctest.ParallelTest(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckTransitGatewayRouteTableAttachmentDestroy(ctx), + Steps: []resource.TestStep{ + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/TransitGatewayRouteTableAttachment/tags/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckTransitGatewayRouteTableAttachmentExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/TransitGatewayRouteTableAttachment/tagsComputed1/"), + ConfigVariables: config.Variables{ + "unknownTagKey": config.StringVariable(acctest.CtKey1), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckTransitGatewayRouteTableAttachmentExists(ctx, resourceName, &v), + resource.TestCheckResourceAttrPair(resourceName, acctest.CtTagsKey1, "null_resource.test", names.AttrID), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapSizeExact(1)), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapSizeExact(1)), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectUnknownValue(resourceName, tfjsonpath.New(names.AttrTags)), + plancheck.ExpectUnknownValue(resourceName, tfjsonpath.New(names.AttrTagsAll)), + }, + PostApplyPreRefresh: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionNoop), + }, + PostApplyPostRefresh: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionNoop), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/TransitGatewayRouteTableAttachment/tagsComputed1/"), + ConfigVariables: config.Variables{ + "unknownTagKey": config.StringVariable(acctest.CtKey1), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} + +func TestAccNetworkManagerTransitGatewayRouteTableAttachment_tags_IgnoreTags_Overlap_DefaultTag(t *testing.T) { + ctx := acctest.Context(t) + var v awstypes.TransitGatewayRouteTableAttachment + resourceName := "aws_networkmanager_transit_gateway_route_table_attachment.test" + + acctest.ParallelTest(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckTransitGatewayRouteTableAttachmentDestroy(ctx), + Steps: []resource.TestStep{ + // 1: Create + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/TransitGatewayRouteTableAttachment/tags_ignore/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtProviderKey1: config.StringVariable(acctest.CtProviderValue1), + }), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtResourceKey1: config.StringVariable(acctest.CtResourceValue1), + }), + "ignore_tag_keys": config.SetVariable( + config.StringVariable(acctest.CtProviderKey1), + ), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckTransitGatewayRouteTableAttachmentExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), + })), + expectFullResourceTags(ctx, resourceName, knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtProviderKey1: knownvalue.StringExact(acctest.CtProviderValue1), // TODO: Should not be set + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), + })), + }, + PostApplyPreRefresh: []plancheck.PlanCheck{ + plancheck.ExpectEmptyPlan(), + }, + PostApplyPostRefresh: []plancheck.PlanCheck{ + plancheck.ExpectEmptyPlan(), + }, + }, + }, + // 2: Update ignored tag only + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/TransitGatewayRouteTableAttachment/tags_ignore/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtProviderKey1: config.StringVariable(acctest.CtProviderValue1Updated), + }), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtResourceKey1: config.StringVariable(acctest.CtResourceValue1), + }), + "ignore_tag_keys": config.SetVariable( + config.StringVariable(acctest.CtProviderKey1), + ), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckTransitGatewayRouteTableAttachmentExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), + })), + expectFullResourceTags(ctx, resourceName, knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtProviderKey1: knownvalue.StringExact(acctest.CtProviderValue1), // TODO: Should not be set + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionNoop), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), + })), + }, + PostApplyPreRefresh: []plancheck.PlanCheck{ + plancheck.ExpectEmptyPlan(), + }, + PostApplyPostRefresh: []plancheck.PlanCheck{ + plancheck.ExpectEmptyPlan(), + }, + }, + }, + // 3: Update both tags + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/TransitGatewayRouteTableAttachment/tags_ignore/"), + ConfigVariables: config.Variables{ + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtProviderKey1: config.StringVariable(acctest.CtProviderValue1Again), + }), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtResourceKey1: config.StringVariable(acctest.CtResourceValue1Updated), + }), + "ignore_tag_keys": config.SetVariable( + config.StringVariable(acctest.CtProviderKey1), + ), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckTransitGatewayRouteTableAttachmentExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1Updated), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1Updated), + })), + expectFullResourceTags(ctx, resourceName, knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtProviderKey1: knownvalue.StringExact(acctest.CtProviderValue1), // TODO: Should not be set + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1Updated), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1Updated), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1Updated), + })), + }, + PostApplyPreRefresh: []plancheck.PlanCheck{ + plancheck.ExpectEmptyPlan(), + }, + PostApplyPostRefresh: []plancheck.PlanCheck{ + plancheck.ExpectEmptyPlan(), + }, + }, + }, + }, + }) +} + +func TestAccNetworkManagerTransitGatewayRouteTableAttachment_tags_IgnoreTags_Overlap_ResourceTag(t *testing.T) { + ctx := acctest.Context(t) + var v awstypes.TransitGatewayRouteTableAttachment + resourceName := "aws_networkmanager_transit_gateway_route_table_attachment.test" + + acctest.ParallelTest(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckTransitGatewayRouteTableAttachmentDestroy(ctx), + Steps: []resource.TestStep{ + // 1: Create + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/TransitGatewayRouteTableAttachment/tags_ignore/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtResourceKey1: config.StringVariable(acctest.CtResourceValue1), + acctest.CtResourceKey2: config.StringVariable(acctest.CtResourceValue2), + }), + "ignore_tag_keys": config.SetVariable( + config.StringVariable(acctest.CtResourceKey1), + ), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckTransitGatewayRouteTableAttachmentExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + expectFullResourceTags(ctx, resourceName, knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), // TODO: Should not be set + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + }, + PostApplyPreRefresh: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + }, + PostApplyPostRefresh: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + }, + }, + ExpectNonEmptyPlan: true, + }, + // 2: Update ignored tag + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/TransitGatewayRouteTableAttachment/tags_ignore/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtResourceKey1: config.StringVariable(acctest.CtResourceValue1Updated), + acctest.CtResourceKey2: config.StringVariable(acctest.CtResourceValue2), + }), + "ignore_tag_keys": config.SetVariable( + config.StringVariable(acctest.CtResourceKey1), + ), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckTransitGatewayRouteTableAttachmentExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + expectFullResourceTags(ctx, resourceName, knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), // TODO: Should not be set + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1Updated), + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + }, + PostApplyPreRefresh: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1Updated), + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + }, + PostApplyPostRefresh: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1Updated), + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + }, + }, + ExpectNonEmptyPlan: true, + }, + // 3: Update both tags + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/TransitGatewayRouteTableAttachment/tags_ignore/"), + ConfigVariables: config.Variables{ + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtResourceKey1: config.StringVariable(acctest.CtResourceValue1Again), + acctest.CtResourceKey2: config.StringVariable(acctest.CtResourceValue2Updated), + }), + "ignore_tag_keys": config.SetVariable( + config.StringVariable(acctest.CtResourceKey1), + ), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckTransitGatewayRouteTableAttachmentExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2Updated), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2Updated), + })), + expectFullResourceTags(ctx, resourceName, knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), // TODO: Should not be set + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2Updated), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1Again), + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2Updated), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2Updated), + })), + }, + PostApplyPreRefresh: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1Again), + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2Updated), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2Updated), + })), + }, + PostApplyPostRefresh: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1Again), + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2Updated), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2Updated), + })), + }, + }, + ExpectNonEmptyPlan: true, + }, + }, + }) +} diff --git a/internal/service/networkmanager/transit_gateway_route_table_attachment_test.go b/internal/service/networkmanager/transit_gateway_route_table_attachment_test.go index dd61d6ee5b36..91a2de93cc0b 100644 --- a/internal/service/networkmanager/transit_gateway_route_table_attachment_test.go +++ b/internal/service/networkmanager/transit_gateway_route_table_attachment_test.go @@ -80,52 +80,6 @@ func TestAccNetworkManagerTransitGatewayRouteTableAttachment_disappears(t *testi }) } -func TestAccNetworkManagerTransitGatewayRouteTableAttachment_tags(t *testing.T) { - ctx := acctest.Context(t) - var v awstypes.TransitGatewayRouteTableAttachment - resourceName := "aws_networkmanager_transit_gateway_route_table_attachment.test" - rName := sdkacctest.RandomWithPrefix(acctest.ResourcePrefix) - - resource.ParallelTest(t, resource.TestCase{ - PreCheck: func() { acctest.PreCheck(ctx, t) }, - ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), - ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, - CheckDestroy: testAccCheckTransitGatewayRouteTableAttachmentDestroy(ctx), - Steps: []resource.TestStep{ - { - Config: testAccTransitGatewayRouteTableAttachmentConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), - Check: resource.ComposeTestCheckFunc( - testAccCheckTransitGatewayRouteTableAttachmentExists(ctx, resourceName, &v), - resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, "1"), - resource.TestCheckResourceAttr(resourceName, acctest.CtTagsKey1, acctest.CtValue1), - ), - }, - { - ResourceName: resourceName, - ImportState: true, - ImportStateVerify: true, - }, - { - Config: testAccTransitGatewayRouteTableAttachmentConfig_tags2(rName, acctest.CtKey1, acctest.CtValue1Updated, acctest.CtKey2, acctest.CtValue2), - Check: resource.ComposeTestCheckFunc( - testAccCheckTransitGatewayRouteTableAttachmentExists(ctx, resourceName, &v), - resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, "2"), - resource.TestCheckResourceAttr(resourceName, acctest.CtTagsKey1, acctest.CtValue1Updated), - resource.TestCheckResourceAttr(resourceName, acctest.CtTagsKey2, acctest.CtValue2), - ), - }, - { - Config: testAccTransitGatewayRouteTableAttachmentConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), - Check: resource.ComposeTestCheckFunc( - testAccCheckTransitGatewayRouteTableAttachmentExists(ctx, resourceName, &v), - resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, "1"), - resource.TestCheckResourceAttr(resourceName, acctest.CtTagsKey2, acctest.CtValue2), - ), - }, - }, - }) -} - func testAccCheckTransitGatewayRouteTableAttachmentExists(ctx context.Context, n string, v *awstypes.TransitGatewayRouteTableAttachment) resource.TestCheckFunc { return func(s *terraform.State) error { rs, ok := s.RootModule().Resources[n] @@ -216,44 +170,3 @@ resource "aws_networkmanager_attachment_accepter" "test" { } `) } - -func testAccTransitGatewayRouteTableAttachmentConfig_tags1(rName, tagKey1, tagValue1 string) string { - return acctest.ConfigCompose(testAccTransitGatewayRouteTableAttachmentConfig_base(rName), fmt.Sprintf(` -resource "aws_networkmanager_transit_gateway_route_table_attachment" "test" { - peering_id = aws_networkmanager_transit_gateway_peering.test.id - transit_gateway_route_table_arn = aws_ec2_transit_gateway_route_table.test.arn - - tags = { - %[1]q = %[2]q - } - - depends_on = [aws_ec2_transit_gateway_policy_table_association.test] -} - -resource "aws_networkmanager_attachment_accepter" "test" { - attachment_id = aws_networkmanager_transit_gateway_route_table_attachment.test.id - attachment_type = aws_networkmanager_transit_gateway_route_table_attachment.test.attachment_type -} -`, tagKey1, tagValue1)) -} - -func testAccTransitGatewayRouteTableAttachmentConfig_tags2(rName, tagKey1, tagValue1, tagKey2, tagValue2 string) string { - return acctest.ConfigCompose(testAccTransitGatewayRouteTableAttachmentConfig_base(rName), fmt.Sprintf(` -resource "aws_networkmanager_transit_gateway_route_table_attachment" "test" { - peering_id = aws_networkmanager_transit_gateway_peering.test.id - transit_gateway_route_table_arn = aws_ec2_transit_gateway_route_table.test.arn - - tags = { - %[1]q = %[2]q - %[3]q = %[4]q - } - - depends_on = [aws_ec2_transit_gateway_policy_table_association.test] -} - -resource "aws_networkmanager_attachment_accepter" "test" { - attachment_id = aws_networkmanager_transit_gateway_route_table_attachment.test.id - attachment_type = aws_networkmanager_transit_gateway_route_table_attachment.test.attachment_type -} -`, tagKey1, tagValue1, tagKey2, tagValue2)) -} From 20c974cd50c4b8be24d8e5ecfb8a384b951e0682 Mon Sep 17 00:00:00 2001 From: Graham Davison Date: Mon, 28 Jul 2025 16:13:16 -0700 Subject: [PATCH 052/365] Cleanup --- .../service/networkmanager/transit_gateway_peering_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/service/networkmanager/transit_gateway_peering_test.go b/internal/service/networkmanager/transit_gateway_peering_test.go index 42b4533bee38..a80b956431bb 100644 --- a/internal/service/networkmanager/transit_gateway_peering_test.go +++ b/internal/service/networkmanager/transit_gateway_peering_test.go @@ -134,8 +134,6 @@ func testAccCheckTransitGatewayPeeringDestroy(ctx context.Context) resource.Test func testAccTransitGatewayPeeringConfig_base(rName string) string { return fmt.Sprintf(` -data "aws_region" "current" {} - resource "aws_ec2_transit_gateway" "test" { tags = { Name = %[1]q @@ -164,6 +162,8 @@ resource "aws_networkmanager_core_network" "test" { } } +data "aws_region" "current" {} + resource "aws_networkmanager_core_network_policy_attachment" "test" { core_network_id = aws_networkmanager_core_network.test.id policy_document = data.aws_networkmanager_core_network_policy_document.test.json From 4e379574e110998d94ca01f11b6ac76d8f228de0 Mon Sep 17 00:00:00 2001 From: Graham Davison Date: Mon, 28 Jul 2025 16:20:02 -0700 Subject: [PATCH 053/365] Removes unused variable --- .../testdata/VPCAttachment/tags/main_gen.tf | 6 -- .../VPCAttachment/tagsComputed1/main_gen.tf | 6 -- .../VPCAttachment/tagsComputed2/main_gen.tf | 6 -- .../VPCAttachment/tags_defaults/main_gen.tf | 6 -- .../VPCAttachment/tags_ignore/main_gen.tf | 6 -- .../service/networkmanager/vpc_attachment.go | 1 + .../vpc_attachment_tags_gen_test.go | 98 ------------------- 7 files changed, 1 insertion(+), 128 deletions(-) diff --git a/internal/service/networkmanager/testdata/VPCAttachment/tags/main_gen.tf b/internal/service/networkmanager/testdata/VPCAttachment/tags/main_gen.tf index d824c0e562c2..0c5d94e9a47e 100644 --- a/internal/service/networkmanager/testdata/VPCAttachment/tags/main_gen.tf +++ b/internal/service/networkmanager/testdata/VPCAttachment/tags/main_gen.tf @@ -96,12 +96,6 @@ locals { default_exclude_zone_ids = ["usw2-az4", "usgw1-az2"] } -variable "rName" { - description = "Name for resource" - type = string - nullable = false -} - variable "resource_tags" { description = "Tags to set on resource. To specify no tags, set to `null`" # Not setting a default, so that this must explicitly be set to `null` to specify no tags diff --git a/internal/service/networkmanager/testdata/VPCAttachment/tagsComputed1/main_gen.tf b/internal/service/networkmanager/testdata/VPCAttachment/tagsComputed1/main_gen.tf index 6f3c76f625ee..48a9c4dd79c6 100644 --- a/internal/service/networkmanager/testdata/VPCAttachment/tagsComputed1/main_gen.tf +++ b/internal/service/networkmanager/testdata/VPCAttachment/tagsComputed1/main_gen.tf @@ -102,12 +102,6 @@ locals { resource "null_resource" "test" {} -variable "rName" { - description = "Name for resource" - type = string - nullable = false -} - variable "unknownTagKey" { type = string nullable = false diff --git a/internal/service/networkmanager/testdata/VPCAttachment/tagsComputed2/main_gen.tf b/internal/service/networkmanager/testdata/VPCAttachment/tagsComputed2/main_gen.tf index 9fa3cf32310b..1c9c3d62cf37 100644 --- a/internal/service/networkmanager/testdata/VPCAttachment/tagsComputed2/main_gen.tf +++ b/internal/service/networkmanager/testdata/VPCAttachment/tagsComputed2/main_gen.tf @@ -103,12 +103,6 @@ locals { resource "null_resource" "test" {} -variable "rName" { - description = "Name for resource" - type = string - nullable = false -} - variable "unknownTagKey" { type = string nullable = false diff --git a/internal/service/networkmanager/testdata/VPCAttachment/tags_defaults/main_gen.tf b/internal/service/networkmanager/testdata/VPCAttachment/tags_defaults/main_gen.tf index 30b41e0247c0..888a209806a6 100644 --- a/internal/service/networkmanager/testdata/VPCAttachment/tags_defaults/main_gen.tf +++ b/internal/service/networkmanager/testdata/VPCAttachment/tags_defaults/main_gen.tf @@ -102,12 +102,6 @@ locals { default_exclude_zone_ids = ["usw2-az4", "usgw1-az2"] } -variable "rName" { - description = "Name for resource" - type = string - nullable = false -} - variable "resource_tags" { description = "Tags to set on resource. To specify no tags, set to `null`" # Not setting a default, so that this must explicitly be set to `null` to specify no tags diff --git a/internal/service/networkmanager/testdata/VPCAttachment/tags_ignore/main_gen.tf b/internal/service/networkmanager/testdata/VPCAttachment/tags_ignore/main_gen.tf index eae261d8734d..01b2738c90da 100644 --- a/internal/service/networkmanager/testdata/VPCAttachment/tags_ignore/main_gen.tf +++ b/internal/service/networkmanager/testdata/VPCAttachment/tags_ignore/main_gen.tf @@ -105,12 +105,6 @@ locals { default_exclude_zone_ids = ["usw2-az4", "usgw1-az2"] } -variable "rName" { - description = "Name for resource" - type = string - nullable = false -} - variable "resource_tags" { description = "Tags to set on resource. To specify no tags, set to `null`" # Not setting a default, so that this must explicitly be set to `null` to specify no tags diff --git a/internal/service/networkmanager/vpc_attachment.go b/internal/service/networkmanager/vpc_attachment.go index 182dcad7f118..f7234dd8deda 100644 --- a/internal/service/networkmanager/vpc_attachment.go +++ b/internal/service/networkmanager/vpc_attachment.go @@ -30,6 +30,7 @@ import ( // @Tags(identifierAttribute="arn") // @Testing(existsType="github.com/aws/aws-sdk-go-v2/service/networkmanager/types;awstypes;awstypes.VpcAttachment") // @Testing(skipEmptyTags=true) +// @Testing(generator=false) func resourceVPCAttachment() *schema.Resource { return &schema.Resource{ CreateWithoutTimeout: resourceVPCAttachmentCreate, diff --git a/internal/service/networkmanager/vpc_attachment_tags_gen_test.go b/internal/service/networkmanager/vpc_attachment_tags_gen_test.go index 9cef57891731..880d0a74b91d 100644 --- a/internal/service/networkmanager/vpc_attachment_tags_gen_test.go +++ b/internal/service/networkmanager/vpc_attachment_tags_gen_test.go @@ -20,7 +20,6 @@ func TestAccNetworkManagerVPCAttachment_tags(t *testing.T) { ctx := acctest.Context(t) var v awstypes.VpcAttachment resourceName := "aws_networkmanager_vpc_attachment.test" - rName := acctest.RandomWithPrefix(t, acctest.ResourcePrefix) acctest.ParallelTest(ctx, t, resource.TestCase{ PreCheck: func() { acctest.PreCheck(ctx, t) }, @@ -31,7 +30,6 @@ func TestAccNetworkManagerVPCAttachment_tags(t *testing.T) { { ConfigDirectory: config.StaticDirectory("testdata/VPCAttachment/tags/"), ConfigVariables: config.Variables{ - acctest.CtRName: config.StringVariable(rName), acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), @@ -62,7 +60,6 @@ func TestAccNetworkManagerVPCAttachment_tags(t *testing.T) { { ConfigDirectory: config.StaticDirectory("testdata/VPCAttachment/tags/"), ConfigVariables: config.Variables{ - acctest.CtRName: config.StringVariable(rName), acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), @@ -74,7 +71,6 @@ func TestAccNetworkManagerVPCAttachment_tags(t *testing.T) { { ConfigDirectory: config.StaticDirectory("testdata/VPCAttachment/tags/"), ConfigVariables: config.Variables{ - acctest.CtRName: config.StringVariable(rName), acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ acctest.CtKey1: config.StringVariable(acctest.CtValue1Updated), acctest.CtKey2: config.StringVariable(acctest.CtValue2), @@ -110,7 +106,6 @@ func TestAccNetworkManagerVPCAttachment_tags(t *testing.T) { { ConfigDirectory: config.StaticDirectory("testdata/VPCAttachment/tags/"), ConfigVariables: config.Variables{ - acctest.CtRName: config.StringVariable(rName), acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ acctest.CtKey1: config.StringVariable(acctest.CtValue1Updated), acctest.CtKey2: config.StringVariable(acctest.CtValue2), @@ -123,7 +118,6 @@ func TestAccNetworkManagerVPCAttachment_tags(t *testing.T) { { ConfigDirectory: config.StaticDirectory("testdata/VPCAttachment/tags/"), ConfigVariables: config.Variables{ - acctest.CtRName: config.StringVariable(rName), acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ acctest.CtKey2: config.StringVariable(acctest.CtValue2), }), @@ -154,7 +148,6 @@ func TestAccNetworkManagerVPCAttachment_tags(t *testing.T) { { ConfigDirectory: config.StaticDirectory("testdata/VPCAttachment/tags/"), ConfigVariables: config.Variables{ - acctest.CtRName: config.StringVariable(rName), acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ acctest.CtKey2: config.StringVariable(acctest.CtValue2), }), @@ -166,7 +159,6 @@ func TestAccNetworkManagerVPCAttachment_tags(t *testing.T) { { ConfigDirectory: config.StaticDirectory("testdata/VPCAttachment/tags/"), ConfigVariables: config.Variables{ - acctest.CtRName: config.StringVariable(rName), acctest.CtResourceTags: nil, }, Check: resource.ComposeAggregateTestCheckFunc( @@ -187,7 +179,6 @@ func TestAccNetworkManagerVPCAttachment_tags(t *testing.T) { { ConfigDirectory: config.StaticDirectory("testdata/VPCAttachment/tags/"), ConfigVariables: config.Variables{ - acctest.CtRName: config.StringVariable(rName), acctest.CtResourceTags: nil, }, ResourceName: resourceName, @@ -202,7 +193,6 @@ func TestAccNetworkManagerVPCAttachment_tags_null(t *testing.T) { ctx := acctest.Context(t) var v awstypes.VpcAttachment resourceName := "aws_networkmanager_vpc_attachment.test" - rName := acctest.RandomWithPrefix(t, acctest.ResourcePrefix) acctest.ParallelTest(ctx, t, resource.TestCase{ PreCheck: func() { acctest.PreCheck(ctx, t) }, @@ -213,7 +203,6 @@ func TestAccNetworkManagerVPCAttachment_tags_null(t *testing.T) { { ConfigDirectory: config.StaticDirectory("testdata/VPCAttachment/tags/"), ConfigVariables: config.Variables{ - acctest.CtRName: config.StringVariable(rName), acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ acctest.CtKey1: nil, }), @@ -237,7 +226,6 @@ func TestAccNetworkManagerVPCAttachment_tags_null(t *testing.T) { { ConfigDirectory: config.StaticDirectory("testdata/VPCAttachment/tags/"), ConfigVariables: config.Variables{ - acctest.CtRName: config.StringVariable(rName), acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ acctest.CtKey1: nil, }), @@ -249,7 +237,6 @@ func TestAccNetworkManagerVPCAttachment_tags_null(t *testing.T) { { ConfigDirectory: config.StaticDirectory("testdata/VPCAttachment/tags/"), ConfigVariables: config.Variables{ - acctest.CtRName: config.StringVariable(rName), acctest.CtResourceTags: nil, }, ConfigPlanChecks: resource.ConfigPlanChecks{ @@ -269,7 +256,6 @@ func TestAccNetworkManagerVPCAttachment_tags_EmptyMap(t *testing.T) { ctx := acctest.Context(t) var v awstypes.VpcAttachment resourceName := "aws_networkmanager_vpc_attachment.test" - rName := acctest.RandomWithPrefix(t, acctest.ResourcePrefix) acctest.ParallelTest(ctx, t, resource.TestCase{ PreCheck: func() { acctest.PreCheck(ctx, t) }, @@ -280,7 +266,6 @@ func TestAccNetworkManagerVPCAttachment_tags_EmptyMap(t *testing.T) { { ConfigDirectory: config.StaticDirectory("testdata/VPCAttachment/tags/"), ConfigVariables: config.Variables{ - acctest.CtRName: config.StringVariable(rName), acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{}), }, Check: resource.ComposeAggregateTestCheckFunc( @@ -302,7 +287,6 @@ func TestAccNetworkManagerVPCAttachment_tags_EmptyMap(t *testing.T) { { ConfigDirectory: config.StaticDirectory("testdata/VPCAttachment/tags/"), ConfigVariables: config.Variables{ - acctest.CtRName: config.StringVariable(rName), acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{}), }, ResourceName: resourceName, @@ -312,7 +296,6 @@ func TestAccNetworkManagerVPCAttachment_tags_EmptyMap(t *testing.T) { { ConfigDirectory: config.StaticDirectory("testdata/VPCAttachment/tags/"), ConfigVariables: config.Variables{ - acctest.CtRName: config.StringVariable(rName), acctest.CtResourceTags: nil, }, ConfigPlanChecks: resource.ConfigPlanChecks{ @@ -332,7 +315,6 @@ func TestAccNetworkManagerVPCAttachment_tags_AddOnUpdate(t *testing.T) { ctx := acctest.Context(t) var v awstypes.VpcAttachment resourceName := "aws_networkmanager_vpc_attachment.test" - rName := acctest.RandomWithPrefix(t, acctest.ResourcePrefix) acctest.ParallelTest(ctx, t, resource.TestCase{ PreCheck: func() { acctest.PreCheck(ctx, t) }, @@ -343,7 +325,6 @@ func TestAccNetworkManagerVPCAttachment_tags_AddOnUpdate(t *testing.T) { { ConfigDirectory: config.StaticDirectory("testdata/VPCAttachment/tags/"), ConfigVariables: config.Variables{ - acctest.CtRName: config.StringVariable(rName), acctest.CtResourceTags: nil, }, Check: resource.ComposeAggregateTestCheckFunc( @@ -365,7 +346,6 @@ func TestAccNetworkManagerVPCAttachment_tags_AddOnUpdate(t *testing.T) { { ConfigDirectory: config.StaticDirectory("testdata/VPCAttachment/tags/"), ConfigVariables: config.Variables{ - acctest.CtRName: config.StringVariable(rName), acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), @@ -396,7 +376,6 @@ func TestAccNetworkManagerVPCAttachment_tags_AddOnUpdate(t *testing.T) { { ConfigDirectory: config.StaticDirectory("testdata/VPCAttachment/tags/"), ConfigVariables: config.Variables{ - acctest.CtRName: config.StringVariable(rName), acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), @@ -415,7 +394,6 @@ func TestAccNetworkManagerVPCAttachment_tags_EmptyTag_OnCreate(t *testing.T) { ctx := acctest.Context(t) var v awstypes.VpcAttachment resourceName := "aws_networkmanager_vpc_attachment.test" - rName := acctest.RandomWithPrefix(t, acctest.ResourcePrefix) acctest.ParallelTest(ctx, t, resource.TestCase{ PreCheck: func() { acctest.PreCheck(ctx, t) }, @@ -426,7 +404,6 @@ func TestAccNetworkManagerVPCAttachment_tags_EmptyTag_OnCreate(t *testing.T) { { ConfigDirectory: config.StaticDirectory("testdata/VPCAttachment/tags/"), ConfigVariables: config.Variables{ - acctest.CtRName: config.StringVariable(rName), acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ acctest.CtKey1: config.StringVariable(""), }), @@ -456,7 +433,6 @@ func TestAccNetworkManagerVPCAttachment_tags_EmptyTag_OnCreate(t *testing.T) { { ConfigDirectory: config.StaticDirectory("testdata/VPCAttachment/tags/"), ConfigVariables: config.Variables{ - acctest.CtRName: config.StringVariable(rName), acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ acctest.CtKey1: config.StringVariable(""), }), @@ -468,7 +444,6 @@ func TestAccNetworkManagerVPCAttachment_tags_EmptyTag_OnCreate(t *testing.T) { { ConfigDirectory: config.StaticDirectory("testdata/VPCAttachment/tags/"), ConfigVariables: config.Variables{ - acctest.CtRName: config.StringVariable(rName), acctest.CtResourceTags: nil, }, Check: resource.ComposeAggregateTestCheckFunc( @@ -489,7 +464,6 @@ func TestAccNetworkManagerVPCAttachment_tags_EmptyTag_OnCreate(t *testing.T) { { ConfigDirectory: config.StaticDirectory("testdata/VPCAttachment/tags/"), ConfigVariables: config.Variables{ - acctest.CtRName: config.StringVariable(rName), acctest.CtResourceTags: nil, }, ResourceName: resourceName, @@ -506,7 +480,6 @@ func TestAccNetworkManagerVPCAttachment_tags_EmptyTag_OnUpdate_Add(t *testing.T) ctx := acctest.Context(t) var v awstypes.VpcAttachment resourceName := "aws_networkmanager_vpc_attachment.test" - rName := acctest.RandomWithPrefix(t, acctest.ResourcePrefix) acctest.ParallelTest(ctx, t, resource.TestCase{ PreCheck: func() { acctest.PreCheck(ctx, t) }, @@ -517,7 +490,6 @@ func TestAccNetworkManagerVPCAttachment_tags_EmptyTag_OnUpdate_Add(t *testing.T) { ConfigDirectory: config.StaticDirectory("testdata/VPCAttachment/tags/"), ConfigVariables: config.Variables{ - acctest.CtRName: config.StringVariable(rName), acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), @@ -548,7 +520,6 @@ func TestAccNetworkManagerVPCAttachment_tags_EmptyTag_OnUpdate_Add(t *testing.T) { ConfigDirectory: config.StaticDirectory("testdata/VPCAttachment/tags/"), ConfigVariables: config.Variables{ - acctest.CtRName: config.StringVariable(rName), acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ acctest.CtKey1: config.StringVariable(acctest.CtValue1), acctest.CtKey2: config.StringVariable(""), @@ -582,7 +553,6 @@ func TestAccNetworkManagerVPCAttachment_tags_EmptyTag_OnUpdate_Add(t *testing.T) { ConfigDirectory: config.StaticDirectory("testdata/VPCAttachment/tags/"), ConfigVariables: config.Variables{ - acctest.CtRName: config.StringVariable(rName), acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ acctest.CtKey1: config.StringVariable(acctest.CtValue1), acctest.CtKey2: config.StringVariable(""), @@ -595,7 +565,6 @@ func TestAccNetworkManagerVPCAttachment_tags_EmptyTag_OnUpdate_Add(t *testing.T) { ConfigDirectory: config.StaticDirectory("testdata/VPCAttachment/tags/"), ConfigVariables: config.Variables{ - acctest.CtRName: config.StringVariable(rName), acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), @@ -626,7 +595,6 @@ func TestAccNetworkManagerVPCAttachment_tags_EmptyTag_OnUpdate_Add(t *testing.T) { ConfigDirectory: config.StaticDirectory("testdata/VPCAttachment/tags/"), ConfigVariables: config.Variables{ - acctest.CtRName: config.StringVariable(rName), acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), @@ -645,7 +613,6 @@ func TestAccNetworkManagerVPCAttachment_tags_EmptyTag_OnUpdate_Replace(t *testin ctx := acctest.Context(t) var v awstypes.VpcAttachment resourceName := "aws_networkmanager_vpc_attachment.test" - rName := acctest.RandomWithPrefix(t, acctest.ResourcePrefix) acctest.ParallelTest(ctx, t, resource.TestCase{ PreCheck: func() { acctest.PreCheck(ctx, t) }, @@ -656,7 +623,6 @@ func TestAccNetworkManagerVPCAttachment_tags_EmptyTag_OnUpdate_Replace(t *testin { ConfigDirectory: config.StaticDirectory("testdata/VPCAttachment/tags/"), ConfigVariables: config.Variables{ - acctest.CtRName: config.StringVariable(rName), acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), @@ -687,7 +653,6 @@ func TestAccNetworkManagerVPCAttachment_tags_EmptyTag_OnUpdate_Replace(t *testin { ConfigDirectory: config.StaticDirectory("testdata/VPCAttachment/tags/"), ConfigVariables: config.Variables{ - acctest.CtRName: config.StringVariable(rName), acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ acctest.CtKey1: config.StringVariable(""), }), @@ -717,7 +682,6 @@ func TestAccNetworkManagerVPCAttachment_tags_EmptyTag_OnUpdate_Replace(t *testin { ConfigDirectory: config.StaticDirectory("testdata/VPCAttachment/tags/"), ConfigVariables: config.Variables{ - acctest.CtRName: config.StringVariable(rName), acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ acctest.CtKey1: config.StringVariable(""), }), @@ -734,7 +698,6 @@ func TestAccNetworkManagerVPCAttachment_tags_DefaultTags_providerOnly(t *testing ctx := acctest.Context(t) var v awstypes.VpcAttachment resourceName := "aws_networkmanager_vpc_attachment.test" - rName := acctest.RandomWithPrefix(t, acctest.ResourcePrefix) acctest.ParallelTest(ctx, t, resource.TestCase{ PreCheck: func() { acctest.PreCheck(ctx, t) }, @@ -745,7 +708,6 @@ func TestAccNetworkManagerVPCAttachment_tags_DefaultTags_providerOnly(t *testing ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, ConfigDirectory: config.StaticDirectory("testdata/VPCAttachment/tags_defaults/"), ConfigVariables: config.Variables{ - acctest.CtRName: config.StringVariable(rName), acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), @@ -774,7 +736,6 @@ func TestAccNetworkManagerVPCAttachment_tags_DefaultTags_providerOnly(t *testing ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, ConfigDirectory: config.StaticDirectory("testdata/VPCAttachment/tags_defaults/"), ConfigVariables: config.Variables{ - acctest.CtRName: config.StringVariable(rName), acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), @@ -788,7 +749,6 @@ func TestAccNetworkManagerVPCAttachment_tags_DefaultTags_providerOnly(t *testing ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, ConfigDirectory: config.StaticDirectory("testdata/VPCAttachment/tags_defaults/"), ConfigVariables: config.Variables{ - acctest.CtRName: config.StringVariable(rName), acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ acctest.CtKey1: config.StringVariable(acctest.CtValue1Updated), acctest.CtKey2: config.StringVariable(acctest.CtValue2), @@ -820,7 +780,6 @@ func TestAccNetworkManagerVPCAttachment_tags_DefaultTags_providerOnly(t *testing ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, ConfigDirectory: config.StaticDirectory("testdata/VPCAttachment/tags_defaults/"), ConfigVariables: config.Variables{ - acctest.CtRName: config.StringVariable(rName), acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ acctest.CtKey1: config.StringVariable(acctest.CtValue1Updated), acctest.CtKey2: config.StringVariable(acctest.CtValue2), @@ -835,7 +794,6 @@ func TestAccNetworkManagerVPCAttachment_tags_DefaultTags_providerOnly(t *testing ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, ConfigDirectory: config.StaticDirectory("testdata/VPCAttachment/tags_defaults/"), ConfigVariables: config.Variables{ - acctest.CtRName: config.StringVariable(rName), acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ acctest.CtKey2: config.StringVariable(acctest.CtValue2), }), @@ -864,7 +822,6 @@ func TestAccNetworkManagerVPCAttachment_tags_DefaultTags_providerOnly(t *testing ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, ConfigDirectory: config.StaticDirectory("testdata/VPCAttachment/tags_defaults/"), ConfigVariables: config.Variables{ - acctest.CtRName: config.StringVariable(rName), acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ acctest.CtKey2: config.StringVariable(acctest.CtValue2), }), @@ -878,7 +835,6 @@ func TestAccNetworkManagerVPCAttachment_tags_DefaultTags_providerOnly(t *testing ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, ConfigDirectory: config.StaticDirectory("testdata/VPCAttachment/tags/"), ConfigVariables: config.Variables{ - acctest.CtRName: config.StringVariable(rName), acctest.CtResourceTags: nil, }, Check: resource.ComposeAggregateTestCheckFunc( @@ -900,7 +856,6 @@ func TestAccNetworkManagerVPCAttachment_tags_DefaultTags_providerOnly(t *testing ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, ConfigDirectory: config.StaticDirectory("testdata/VPCAttachment/tags/"), ConfigVariables: config.Variables{ - acctest.CtRName: config.StringVariable(rName), acctest.CtResourceTags: nil, }, ResourceName: resourceName, @@ -915,7 +870,6 @@ func TestAccNetworkManagerVPCAttachment_tags_DefaultTags_nonOverlapping(t *testi ctx := acctest.Context(t) var v awstypes.VpcAttachment resourceName := "aws_networkmanager_vpc_attachment.test" - rName := acctest.RandomWithPrefix(t, acctest.ResourcePrefix) acctest.ParallelTest(ctx, t, resource.TestCase{ PreCheck: func() { acctest.PreCheck(ctx, t) }, @@ -926,7 +880,6 @@ func TestAccNetworkManagerVPCAttachment_tags_DefaultTags_nonOverlapping(t *testi ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, ConfigDirectory: config.StaticDirectory("testdata/VPCAttachment/tags_defaults/"), ConfigVariables: config.Variables{ - acctest.CtRName: config.StringVariable(rName), acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ acctest.CtProviderKey1: config.StringVariable(acctest.CtProviderValue1), }), @@ -963,7 +916,6 @@ func TestAccNetworkManagerVPCAttachment_tags_DefaultTags_nonOverlapping(t *testi ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, ConfigDirectory: config.StaticDirectory("testdata/VPCAttachment/tags_defaults/"), ConfigVariables: config.Variables{ - acctest.CtRName: config.StringVariable(rName), acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ acctest.CtProviderKey1: config.StringVariable(acctest.CtProviderValue1), }), @@ -979,7 +931,6 @@ func TestAccNetworkManagerVPCAttachment_tags_DefaultTags_nonOverlapping(t *testi ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, ConfigDirectory: config.StaticDirectory("testdata/VPCAttachment/tags_defaults/"), ConfigVariables: config.Variables{ - acctest.CtRName: config.StringVariable(rName), acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ acctest.CtProviderKey1: config.StringVariable(acctest.CtProviderValue1Updated), }), @@ -1021,7 +972,6 @@ func TestAccNetworkManagerVPCAttachment_tags_DefaultTags_nonOverlapping(t *testi ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, ConfigDirectory: config.StaticDirectory("testdata/VPCAttachment/tags_defaults/"), ConfigVariables: config.Variables{ - acctest.CtRName: config.StringVariable(rName), acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ acctest.CtProviderKey1: config.StringVariable(acctest.CtProviderValue1Updated), }), @@ -1038,7 +988,6 @@ func TestAccNetworkManagerVPCAttachment_tags_DefaultTags_nonOverlapping(t *testi ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, ConfigDirectory: config.StaticDirectory("testdata/VPCAttachment/tags/"), ConfigVariables: config.Variables{ - acctest.CtRName: config.StringVariable(rName), acctest.CtResourceTags: nil, }, Check: resource.ComposeAggregateTestCheckFunc( @@ -1060,7 +1009,6 @@ func TestAccNetworkManagerVPCAttachment_tags_DefaultTags_nonOverlapping(t *testi ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, ConfigDirectory: config.StaticDirectory("testdata/VPCAttachment/tags/"), ConfigVariables: config.Variables{ - acctest.CtRName: config.StringVariable(rName), acctest.CtResourceTags: nil, }, ResourceName: resourceName, @@ -1075,7 +1023,6 @@ func TestAccNetworkManagerVPCAttachment_tags_DefaultTags_overlapping(t *testing. ctx := acctest.Context(t) var v awstypes.VpcAttachment resourceName := "aws_networkmanager_vpc_attachment.test" - rName := acctest.RandomWithPrefix(t, acctest.ResourcePrefix) acctest.ParallelTest(ctx, t, resource.TestCase{ PreCheck: func() { acctest.PreCheck(ctx, t) }, @@ -1086,7 +1033,6 @@ func TestAccNetworkManagerVPCAttachment_tags_DefaultTags_overlapping(t *testing. ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, ConfigDirectory: config.StaticDirectory("testdata/VPCAttachment/tags_defaults/"), ConfigVariables: config.Variables{ - acctest.CtRName: config.StringVariable(rName), acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ acctest.CtOverlapKey1: config.StringVariable(acctest.CtProviderValue1), }), @@ -1121,7 +1067,6 @@ func TestAccNetworkManagerVPCAttachment_tags_DefaultTags_overlapping(t *testing. ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, ConfigDirectory: config.StaticDirectory("testdata/VPCAttachment/tags_defaults/"), ConfigVariables: config.Variables{ - acctest.CtRName: config.StringVariable(rName), acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ acctest.CtOverlapKey1: config.StringVariable(acctest.CtProviderValue1), }), @@ -1137,7 +1082,6 @@ func TestAccNetworkManagerVPCAttachment_tags_DefaultTags_overlapping(t *testing. ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, ConfigDirectory: config.StaticDirectory("testdata/VPCAttachment/tags_defaults/"), ConfigVariables: config.Variables{ - acctest.CtRName: config.StringVariable(rName), acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ acctest.CtOverlapKey1: config.StringVariable(acctest.CtProviderValue1), acctest.CtOverlapKey2: config.StringVariable("providervalue2"), @@ -1178,7 +1122,6 @@ func TestAccNetworkManagerVPCAttachment_tags_DefaultTags_overlapping(t *testing. ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, ConfigDirectory: config.StaticDirectory("testdata/VPCAttachment/tags_defaults/"), ConfigVariables: config.Variables{ - acctest.CtRName: config.StringVariable(rName), acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ acctest.CtOverlapKey1: config.StringVariable(acctest.CtProviderValue1), acctest.CtOverlapKey2: config.StringVariable("providervalue2"), @@ -1196,7 +1139,6 @@ func TestAccNetworkManagerVPCAttachment_tags_DefaultTags_overlapping(t *testing. ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, ConfigDirectory: config.StaticDirectory("testdata/VPCAttachment/tags_defaults/"), ConfigVariables: config.Variables{ - acctest.CtRName: config.StringVariable(rName), acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ acctest.CtOverlapKey1: config.StringVariable(acctest.CtProviderValue1), }), @@ -1231,7 +1173,6 @@ func TestAccNetworkManagerVPCAttachment_tags_DefaultTags_overlapping(t *testing. ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, ConfigDirectory: config.StaticDirectory("testdata/VPCAttachment/tags_defaults/"), ConfigVariables: config.Variables{ - acctest.CtRName: config.StringVariable(rName), acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ acctest.CtOverlapKey1: config.StringVariable(acctest.CtProviderValue1), }), @@ -1251,7 +1192,6 @@ func TestAccNetworkManagerVPCAttachment_tags_DefaultTags_updateToProviderOnly(t ctx := acctest.Context(t) var v awstypes.VpcAttachment resourceName := "aws_networkmanager_vpc_attachment.test" - rName := acctest.RandomWithPrefix(t, acctest.ResourcePrefix) acctest.ParallelTest(ctx, t, resource.TestCase{ PreCheck: func() { acctest.PreCheck(ctx, t) }, @@ -1262,7 +1202,6 @@ func TestAccNetworkManagerVPCAttachment_tags_DefaultTags_updateToProviderOnly(t ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, ConfigDirectory: config.StaticDirectory("testdata/VPCAttachment/tags/"), ConfigVariables: config.Variables{ - acctest.CtRName: config.StringVariable(rName), acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), @@ -1294,7 +1233,6 @@ func TestAccNetworkManagerVPCAttachment_tags_DefaultTags_updateToProviderOnly(t ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, ConfigDirectory: config.StaticDirectory("testdata/VPCAttachment/tags_defaults/"), ConfigVariables: config.Variables{ - acctest.CtRName: config.StringVariable(rName), acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), @@ -1323,7 +1261,6 @@ func TestAccNetworkManagerVPCAttachment_tags_DefaultTags_updateToProviderOnly(t ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, ConfigDirectory: config.StaticDirectory("testdata/VPCAttachment/tags_defaults/"), ConfigVariables: config.Variables{ - acctest.CtRName: config.StringVariable(rName), acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), @@ -1341,7 +1278,6 @@ func TestAccNetworkManagerVPCAttachment_tags_DefaultTags_updateToResourceOnly(t ctx := acctest.Context(t) var v awstypes.VpcAttachment resourceName := "aws_networkmanager_vpc_attachment.test" - rName := acctest.RandomWithPrefix(t, acctest.ResourcePrefix) acctest.ParallelTest(ctx, t, resource.TestCase{ PreCheck: func() { acctest.PreCheck(ctx, t) }, @@ -1352,7 +1288,6 @@ func TestAccNetworkManagerVPCAttachment_tags_DefaultTags_updateToResourceOnly(t ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, ConfigDirectory: config.StaticDirectory("testdata/VPCAttachment/tags_defaults/"), ConfigVariables: config.Variables{ - acctest.CtRName: config.StringVariable(rName), acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), @@ -1381,7 +1316,6 @@ func TestAccNetworkManagerVPCAttachment_tags_DefaultTags_updateToResourceOnly(t ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, ConfigDirectory: config.StaticDirectory("testdata/VPCAttachment/tags/"), ConfigVariables: config.Variables{ - acctest.CtRName: config.StringVariable(rName), acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), @@ -1413,7 +1347,6 @@ func TestAccNetworkManagerVPCAttachment_tags_DefaultTags_updateToResourceOnly(t ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, ConfigDirectory: config.StaticDirectory("testdata/VPCAttachment/tags/"), ConfigVariables: config.Variables{ - acctest.CtRName: config.StringVariable(rName), acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), @@ -1432,7 +1365,6 @@ func TestAccNetworkManagerVPCAttachment_tags_DefaultTags_emptyResourceTag(t *tes ctx := acctest.Context(t) var v awstypes.VpcAttachment resourceName := "aws_networkmanager_vpc_attachment.test" - rName := acctest.RandomWithPrefix(t, acctest.ResourcePrefix) acctest.ParallelTest(ctx, t, resource.TestCase{ PreCheck: func() { acctest.PreCheck(ctx, t) }, @@ -1443,7 +1375,6 @@ func TestAccNetworkManagerVPCAttachment_tags_DefaultTags_emptyResourceTag(t *tes ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, ConfigDirectory: config.StaticDirectory("testdata/VPCAttachment/tags_defaults/"), ConfigVariables: config.Variables{ - acctest.CtRName: config.StringVariable(rName), acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), @@ -1477,7 +1408,6 @@ func TestAccNetworkManagerVPCAttachment_tags_DefaultTags_emptyResourceTag(t *tes ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, ConfigDirectory: config.StaticDirectory("testdata/VPCAttachment/tags_defaults/"), ConfigVariables: config.Variables{ - acctest.CtRName: config.StringVariable(rName), acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), @@ -1499,7 +1429,6 @@ func TestAccNetworkManagerVPCAttachment_tags_DefaultTags_emptyProviderOnlyTag(t ctx := acctest.Context(t) var v awstypes.VpcAttachment resourceName := "aws_networkmanager_vpc_attachment.test" - rName := acctest.RandomWithPrefix(t, acctest.ResourcePrefix) acctest.ParallelTest(ctx, t, resource.TestCase{ PreCheck: func() { acctest.PreCheck(ctx, t) }, @@ -1510,7 +1439,6 @@ func TestAccNetworkManagerVPCAttachment_tags_DefaultTags_emptyProviderOnlyTag(t ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, ConfigDirectory: config.StaticDirectory("testdata/VPCAttachment/tags_defaults/"), ConfigVariables: config.Variables{ - acctest.CtRName: config.StringVariable(rName), acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ acctest.CtKey1: config.StringVariable(""), }), @@ -1538,7 +1466,6 @@ func TestAccNetworkManagerVPCAttachment_tags_DefaultTags_emptyProviderOnlyTag(t ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, ConfigDirectory: config.StaticDirectory("testdata/VPCAttachment/tags_defaults/"), ConfigVariables: config.Variables{ - acctest.CtRName: config.StringVariable(rName), acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ acctest.CtKey1: config.StringVariable(""), }), @@ -1556,7 +1483,6 @@ func TestAccNetworkManagerVPCAttachment_tags_DefaultTags_nullOverlappingResource ctx := acctest.Context(t) var v awstypes.VpcAttachment resourceName := "aws_networkmanager_vpc_attachment.test" - rName := acctest.RandomWithPrefix(t, acctest.ResourcePrefix) acctest.ParallelTest(ctx, t, resource.TestCase{ PreCheck: func() { acctest.PreCheck(ctx, t) }, @@ -1567,7 +1493,6 @@ func TestAccNetworkManagerVPCAttachment_tags_DefaultTags_nullOverlappingResource ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, ConfigDirectory: config.StaticDirectory("testdata/VPCAttachment/tags_defaults/"), ConfigVariables: config.Variables{ - acctest.CtRName: config.StringVariable(rName), acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ acctest.CtKey1: config.StringVariable(acctest.CtProviderValue1), }), @@ -1598,7 +1523,6 @@ func TestAccNetworkManagerVPCAttachment_tags_DefaultTags_nullOverlappingResource ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, ConfigDirectory: config.StaticDirectory("testdata/VPCAttachment/tags_defaults/"), ConfigVariables: config.Variables{ - acctest.CtRName: config.StringVariable(rName), acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ acctest.CtKey1: config.StringVariable(acctest.CtProviderValue1), }), @@ -1618,7 +1542,6 @@ func TestAccNetworkManagerVPCAttachment_tags_DefaultTags_nullNonOverlappingResou ctx := acctest.Context(t) var v awstypes.VpcAttachment resourceName := "aws_networkmanager_vpc_attachment.test" - rName := acctest.RandomWithPrefix(t, acctest.ResourcePrefix) acctest.ParallelTest(ctx, t, resource.TestCase{ PreCheck: func() { acctest.PreCheck(ctx, t) }, @@ -1629,7 +1552,6 @@ func TestAccNetworkManagerVPCAttachment_tags_DefaultTags_nullNonOverlappingResou ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, ConfigDirectory: config.StaticDirectory("testdata/VPCAttachment/tags_defaults/"), ConfigVariables: config.Variables{ - acctest.CtRName: config.StringVariable(rName), acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ acctest.CtProviderKey1: config.StringVariable(acctest.CtProviderValue1), }), @@ -1660,7 +1582,6 @@ func TestAccNetworkManagerVPCAttachment_tags_DefaultTags_nullNonOverlappingResou ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, ConfigDirectory: config.StaticDirectory("testdata/VPCAttachment/tags_defaults/"), ConfigVariables: config.Variables{ - acctest.CtRName: config.StringVariable(rName), acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ acctest.CtProviderKey1: config.StringVariable(acctest.CtProviderValue1), }), @@ -1680,7 +1601,6 @@ func TestAccNetworkManagerVPCAttachment_tags_ComputedTag_OnCreate(t *testing.T) ctx := acctest.Context(t) var v awstypes.VpcAttachment resourceName := "aws_networkmanager_vpc_attachment.test" - rName := acctest.RandomWithPrefix(t, acctest.ResourcePrefix) acctest.ParallelTest(ctx, t, resource.TestCase{ PreCheck: func() { acctest.PreCheck(ctx, t) }, @@ -1691,7 +1611,6 @@ func TestAccNetworkManagerVPCAttachment_tags_ComputedTag_OnCreate(t *testing.T) ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, ConfigDirectory: config.StaticDirectory("testdata/VPCAttachment/tagsComputed1/"), ConfigVariables: config.Variables{ - acctest.CtRName: config.StringVariable(rName), "unknownTagKey": config.StringVariable("computedkey1"), }, Check: resource.ComposeAggregateTestCheckFunc( @@ -1720,7 +1639,6 @@ func TestAccNetworkManagerVPCAttachment_tags_ComputedTag_OnCreate(t *testing.T) ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, ConfigDirectory: config.StaticDirectory("testdata/VPCAttachment/tagsComputed1/"), ConfigVariables: config.Variables{ - acctest.CtRName: config.StringVariable(rName), "unknownTagKey": config.StringVariable("computedkey1"), }, ResourceName: resourceName, @@ -1735,7 +1653,6 @@ func TestAccNetworkManagerVPCAttachment_tags_ComputedTag_OnUpdate_Add(t *testing ctx := acctest.Context(t) var v awstypes.VpcAttachment resourceName := "aws_networkmanager_vpc_attachment.test" - rName := acctest.RandomWithPrefix(t, acctest.ResourcePrefix) acctest.ParallelTest(ctx, t, resource.TestCase{ PreCheck: func() { acctest.PreCheck(ctx, t) }, @@ -1746,7 +1663,6 @@ func TestAccNetworkManagerVPCAttachment_tags_ComputedTag_OnUpdate_Add(t *testing ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, ConfigDirectory: config.StaticDirectory("testdata/VPCAttachment/tags/"), ConfigVariables: config.Variables{ - acctest.CtRName: config.StringVariable(rName), acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), @@ -1778,7 +1694,6 @@ func TestAccNetworkManagerVPCAttachment_tags_ComputedTag_OnUpdate_Add(t *testing ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, ConfigDirectory: config.StaticDirectory("testdata/VPCAttachment/tagsComputed2/"), ConfigVariables: config.Variables{ - acctest.CtRName: config.StringVariable(rName), "unknownTagKey": config.StringVariable("computedkey1"), "knownTagKey": config.StringVariable(acctest.CtKey1), "knownTagValue": config.StringVariable(acctest.CtValue1), @@ -1815,7 +1730,6 @@ func TestAccNetworkManagerVPCAttachment_tags_ComputedTag_OnUpdate_Add(t *testing ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, ConfigDirectory: config.StaticDirectory("testdata/VPCAttachment/tagsComputed2/"), ConfigVariables: config.Variables{ - acctest.CtRName: config.StringVariable(rName), "unknownTagKey": config.StringVariable("computedkey1"), "knownTagKey": config.StringVariable(acctest.CtKey1), "knownTagValue": config.StringVariable(acctest.CtValue1), @@ -1832,7 +1746,6 @@ func TestAccNetworkManagerVPCAttachment_tags_ComputedTag_OnUpdate_Replace(t *tes ctx := acctest.Context(t) var v awstypes.VpcAttachment resourceName := "aws_networkmanager_vpc_attachment.test" - rName := acctest.RandomWithPrefix(t, acctest.ResourcePrefix) acctest.ParallelTest(ctx, t, resource.TestCase{ PreCheck: func() { acctest.PreCheck(ctx, t) }, @@ -1843,7 +1756,6 @@ func TestAccNetworkManagerVPCAttachment_tags_ComputedTag_OnUpdate_Replace(t *tes ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, ConfigDirectory: config.StaticDirectory("testdata/VPCAttachment/tags/"), ConfigVariables: config.Variables{ - acctest.CtRName: config.StringVariable(rName), acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), @@ -1875,7 +1787,6 @@ func TestAccNetworkManagerVPCAttachment_tags_ComputedTag_OnUpdate_Replace(t *tes ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, ConfigDirectory: config.StaticDirectory("testdata/VPCAttachment/tagsComputed1/"), ConfigVariables: config.Variables{ - acctest.CtRName: config.StringVariable(rName), "unknownTagKey": config.StringVariable(acctest.CtKey1), }, Check: resource.ComposeAggregateTestCheckFunc( @@ -1904,7 +1815,6 @@ func TestAccNetworkManagerVPCAttachment_tags_ComputedTag_OnUpdate_Replace(t *tes ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, ConfigDirectory: config.StaticDirectory("testdata/VPCAttachment/tagsComputed1/"), ConfigVariables: config.Variables{ - acctest.CtRName: config.StringVariable(rName), "unknownTagKey": config.StringVariable(acctest.CtKey1), }, ResourceName: resourceName, @@ -1919,7 +1829,6 @@ func TestAccNetworkManagerVPCAttachment_tags_IgnoreTags_Overlap_DefaultTag(t *te ctx := acctest.Context(t) var v awstypes.VpcAttachment resourceName := "aws_networkmanager_vpc_attachment.test" - rName := acctest.RandomWithPrefix(t, acctest.ResourcePrefix) acctest.ParallelTest(ctx, t, resource.TestCase{ PreCheck: func() { acctest.PreCheck(ctx, t) }, @@ -1931,7 +1840,6 @@ func TestAccNetworkManagerVPCAttachment_tags_IgnoreTags_Overlap_DefaultTag(t *te ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, ConfigDirectory: config.StaticDirectory("testdata/VPCAttachment/tags_ignore/"), ConfigVariables: config.Variables{ - acctest.CtRName: config.StringVariable(rName), acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ acctest.CtProviderKey1: config.StringVariable(acctest.CtProviderValue1), }), @@ -1980,7 +1888,6 @@ func TestAccNetworkManagerVPCAttachment_tags_IgnoreTags_Overlap_DefaultTag(t *te ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, ConfigDirectory: config.StaticDirectory("testdata/VPCAttachment/tags_ignore/"), ConfigVariables: config.Variables{ - acctest.CtRName: config.StringVariable(rName), acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ acctest.CtProviderKey1: config.StringVariable(acctest.CtProviderValue1Updated), }), @@ -2029,7 +1936,6 @@ func TestAccNetworkManagerVPCAttachment_tags_IgnoreTags_Overlap_DefaultTag(t *te ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, ConfigDirectory: config.StaticDirectory("testdata/VPCAttachment/tags_ignore/"), ConfigVariables: config.Variables{ - acctest.CtRName: config.StringVariable(rName), acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ acctest.CtProviderKey1: config.StringVariable(acctest.CtProviderValue1Again), }), @@ -2081,7 +1987,6 @@ func TestAccNetworkManagerVPCAttachment_tags_IgnoreTags_Overlap_ResourceTag(t *t ctx := acctest.Context(t) var v awstypes.VpcAttachment resourceName := "aws_networkmanager_vpc_attachment.test" - rName := acctest.RandomWithPrefix(t, acctest.ResourcePrefix) acctest.ParallelTest(ctx, t, resource.TestCase{ PreCheck: func() { acctest.PreCheck(ctx, t) }, @@ -2093,7 +1998,6 @@ func TestAccNetworkManagerVPCAttachment_tags_IgnoreTags_Overlap_ResourceTag(t *t ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, ConfigDirectory: config.StaticDirectory("testdata/VPCAttachment/tags_ignore/"), ConfigVariables: config.Variables{ - acctest.CtRName: config.StringVariable(rName), acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ acctest.CtResourceKey1: config.StringVariable(acctest.CtResourceValue1), acctest.CtResourceKey2: config.StringVariable(acctest.CtResourceValue2), @@ -2156,7 +2060,6 @@ func TestAccNetworkManagerVPCAttachment_tags_IgnoreTags_Overlap_ResourceTag(t *t ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, ConfigDirectory: config.StaticDirectory("testdata/VPCAttachment/tags_ignore/"), ConfigVariables: config.Variables{ - acctest.CtRName: config.StringVariable(rName), acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ acctest.CtResourceKey1: config.StringVariable(acctest.CtResourceValue1Updated), acctest.CtResourceKey2: config.StringVariable(acctest.CtResourceValue2), @@ -2219,7 +2122,6 @@ func TestAccNetworkManagerVPCAttachment_tags_IgnoreTags_Overlap_ResourceTag(t *t ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, ConfigDirectory: config.StaticDirectory("testdata/VPCAttachment/tags_ignore/"), ConfigVariables: config.Variables{ - acctest.CtRName: config.StringVariable(rName), acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ acctest.CtResourceKey1: config.StringVariable(acctest.CtResourceValue1Again), acctest.CtResourceKey2: config.StringVariable(acctest.CtResourceValue2Updated), From e58540653589052efab6508d3a6c57dc08f5e1d2 Mon Sep 17 00:00:00 2001 From: Graham Davison Date: Tue, 29 Jul 2025 11:02:34 -0700 Subject: [PATCH 054/365] Removes unneeded `data.aws_availability_zones` --- .../site_to_site_vpn_attachment_test.go | 4 ++-- .../SiteToSiteVPNAttachment/tags/main_gen.tf | 16 ---------------- .../tagsComputed1/main_gen.tf | 16 ---------------- .../tagsComputed2/main_gen.tf | 16 ---------------- .../tags_defaults/main_gen.tf | 16 ---------------- .../tags_ignore/main_gen.tf | 16 ---------------- .../tmpl/site_to_site_vpn_attachment_tags.gtpl | 2 -- 7 files changed, 2 insertions(+), 84 deletions(-) diff --git a/internal/service/networkmanager/site_to_site_vpn_attachment_test.go b/internal/service/networkmanager/site_to_site_vpn_attachment_test.go index 704b6f80eee0..18c3256df12e 100644 --- a/internal/service/networkmanager/site_to_site_vpn_attachment_test.go +++ b/internal/service/networkmanager/site_to_site_vpn_attachment_test.go @@ -144,7 +144,7 @@ func testAccCheckSiteToSiteVPNAttachmentDestroy(ctx context.Context) resource.Te } func testAccSiteToSiteVPNAttachmentConfig_base(rName string, bgpASN int, vpnIP string) string { - return acctest.ConfigCompose(acctest.ConfigAvailableAZsNoOptIn(), fmt.Sprintf(` + return fmt.Sprintf(` resource "aws_customer_gateway" "test" { bgp_asn = %[2]d ip_address = %[3]q @@ -226,7 +226,7 @@ data "aws_networkmanager_core_network_policy_document" "test" { } } } -`, rName, bgpASN, vpnIP)) +`, rName, bgpASN, vpnIP) } func testAccSiteToSiteVPNAttachmentConfig_basic(rName string, bgpASN int, vpnIP string) string { diff --git a/internal/service/networkmanager/testdata/SiteToSiteVPNAttachment/tags/main_gen.tf b/internal/service/networkmanager/testdata/SiteToSiteVPNAttachment/tags/main_gen.tf index 2c9435a9da94..05139b40e4e5 100644 --- a/internal/service/networkmanager/testdata/SiteToSiteVPNAttachment/tags/main_gen.tf +++ b/internal/service/networkmanager/testdata/SiteToSiteVPNAttachment/tags/main_gen.tf @@ -81,22 +81,6 @@ data "aws_networkmanager_core_network_policy_document" "test" { } } -# acctest.ConfigAvailableAZsNoOptInDefaultExclude - -data "aws_availability_zones" "available" { - exclude_zone_ids = local.default_exclude_zone_ids - state = "available" - - filter { - name = "opt-in-status" - values = ["opt-in-not-required"] - } -} - -locals { - default_exclude_zone_ids = ["usw2-az4", "usgw1-az2"] -} - variable "rName" { description = "Name for resource" type = string diff --git a/internal/service/networkmanager/testdata/SiteToSiteVPNAttachment/tagsComputed1/main_gen.tf b/internal/service/networkmanager/testdata/SiteToSiteVPNAttachment/tagsComputed1/main_gen.tf index af7edf49359f..2313819fba11 100644 --- a/internal/service/networkmanager/testdata/SiteToSiteVPNAttachment/tagsComputed1/main_gen.tf +++ b/internal/service/networkmanager/testdata/SiteToSiteVPNAttachment/tagsComputed1/main_gen.tf @@ -85,22 +85,6 @@ data "aws_networkmanager_core_network_policy_document" "test" { } } -# acctest.ConfigAvailableAZsNoOptInDefaultExclude - -data "aws_availability_zones" "available" { - exclude_zone_ids = local.default_exclude_zone_ids - state = "available" - - filter { - name = "opt-in-status" - values = ["opt-in-not-required"] - } -} - -locals { - default_exclude_zone_ids = ["usw2-az4", "usgw1-az2"] -} - resource "null_resource" "test" {} variable "rName" { diff --git a/internal/service/networkmanager/testdata/SiteToSiteVPNAttachment/tagsComputed2/main_gen.tf b/internal/service/networkmanager/testdata/SiteToSiteVPNAttachment/tagsComputed2/main_gen.tf index f173b6c6b965..9e0272f837c1 100644 --- a/internal/service/networkmanager/testdata/SiteToSiteVPNAttachment/tagsComputed2/main_gen.tf +++ b/internal/service/networkmanager/testdata/SiteToSiteVPNAttachment/tagsComputed2/main_gen.tf @@ -86,22 +86,6 @@ data "aws_networkmanager_core_network_policy_document" "test" { } } -# acctest.ConfigAvailableAZsNoOptInDefaultExclude - -data "aws_availability_zones" "available" { - exclude_zone_ids = local.default_exclude_zone_ids - state = "available" - - filter { - name = "opt-in-status" - values = ["opt-in-not-required"] - } -} - -locals { - default_exclude_zone_ids = ["usw2-az4", "usgw1-az2"] -} - resource "null_resource" "test" {} variable "rName" { diff --git a/internal/service/networkmanager/testdata/SiteToSiteVPNAttachment/tags_defaults/main_gen.tf b/internal/service/networkmanager/testdata/SiteToSiteVPNAttachment/tags_defaults/main_gen.tf index 1b669bdf2dc1..6bbf3be8e977 100644 --- a/internal/service/networkmanager/testdata/SiteToSiteVPNAttachment/tags_defaults/main_gen.tf +++ b/internal/service/networkmanager/testdata/SiteToSiteVPNAttachment/tags_defaults/main_gen.tf @@ -87,22 +87,6 @@ data "aws_networkmanager_core_network_policy_document" "test" { } } -# acctest.ConfigAvailableAZsNoOptInDefaultExclude - -data "aws_availability_zones" "available" { - exclude_zone_ids = local.default_exclude_zone_ids - state = "available" - - filter { - name = "opt-in-status" - values = ["opt-in-not-required"] - } -} - -locals { - default_exclude_zone_ids = ["usw2-az4", "usgw1-az2"] -} - variable "rName" { description = "Name for resource" type = string diff --git a/internal/service/networkmanager/testdata/SiteToSiteVPNAttachment/tags_ignore/main_gen.tf b/internal/service/networkmanager/testdata/SiteToSiteVPNAttachment/tags_ignore/main_gen.tf index 4cffe6e5fbba..30ceb410f52d 100644 --- a/internal/service/networkmanager/testdata/SiteToSiteVPNAttachment/tags_ignore/main_gen.tf +++ b/internal/service/networkmanager/testdata/SiteToSiteVPNAttachment/tags_ignore/main_gen.tf @@ -90,22 +90,6 @@ data "aws_networkmanager_core_network_policy_document" "test" { } } -# acctest.ConfigAvailableAZsNoOptInDefaultExclude - -data "aws_availability_zones" "available" { - exclude_zone_ids = local.default_exclude_zone_ids - state = "available" - - filter { - name = "opt-in-status" - values = ["opt-in-not-required"] - } -} - -locals { - default_exclude_zone_ids = ["usw2-az4", "usgw1-az2"] -} - variable "rName" { description = "Name for resource" type = string diff --git a/internal/service/networkmanager/testdata/tmpl/site_to_site_vpn_attachment_tags.gtpl b/internal/service/networkmanager/testdata/tmpl/site_to_site_vpn_attachment_tags.gtpl index c5a46e8af104..213b7a76e541 100644 --- a/internal/service/networkmanager/testdata/tmpl/site_to_site_vpn_attachment_tags.gtpl +++ b/internal/service/networkmanager/testdata/tmpl/site_to_site_vpn_attachment_tags.gtpl @@ -76,5 +76,3 @@ data "aws_networkmanager_core_network_policy_document" "test" { } } } - -{{ template "acctest.ConfigAvailableAZsNoOptInDefaultExclude" }} From 476913d9418e6ee29830795f314c95d2df2a2fb2 Mon Sep 17 00:00:00 2001 From: Graham Davison Date: Tue, 29 Jul 2025 11:03:20 -0700 Subject: [PATCH 055/365] Adds wait delay when deleting `aws_networkmanager_site_to_site_vpn_attachment` --- internal/service/networkmanager/site_to_site_vpn_attachment.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/internal/service/networkmanager/site_to_site_vpn_attachment.go b/internal/service/networkmanager/site_to_site_vpn_attachment.go index 41b1d54646d8..b4d1d75e1d6f 100644 --- a/internal/service/networkmanager/site_to_site_vpn_attachment.go +++ b/internal/service/networkmanager/site_to_site_vpn_attachment.go @@ -275,6 +275,8 @@ func waitSiteToSiteVPNAttachmentDeleted(ctx context.Context, conn *networkmanage Target: []string{}, Timeout: timeout, Refresh: statusSiteToSiteVPNAttachment(ctx, conn, id), + Delay: 4 * time.Minute, + PollInterval: 10 * time.Second, NotFoundChecks: 1, } From ed97b3e81e29db80c3c407a13fd17ee6ddfbdedd Mon Sep 17 00:00:00 2001 From: Graham Davison Date: Tue, 29 Jul 2025 16:37:41 -0700 Subject: [PATCH 056/365] `aws_networkmanager_dx_gateway_attachment` --- .../networkmanager/dx_gateway_attachment.go | 8 +- .../dx_gateway_attachment_tags_gen_test.go | 2359 +++++++++++++++++ .../dx_gateway_attachment_test.go | 6 +- .../tags/main_gen.tf | 80 + .../tagsComputed1/main_gen.tf | 84 + .../tagsComputed2/main_gen.tf | 95 + .../tags_defaults/main_gen.tf | 91 + .../tags_ignore/main_gen.tf | 100 + .../tmpl/dx_gateway_attachment_tags.gtpl | 63 + 9 files changed, 2881 insertions(+), 5 deletions(-) create mode 100644 internal/service/networkmanager/dx_gateway_attachment_tags_gen_test.go create mode 100644 internal/service/networkmanager/testdata/DirectConnectGatewayAttachment/tags/main_gen.tf create mode 100644 internal/service/networkmanager/testdata/DirectConnectGatewayAttachment/tagsComputed1/main_gen.tf create mode 100644 internal/service/networkmanager/testdata/DirectConnectGatewayAttachment/tagsComputed2/main_gen.tf create mode 100644 internal/service/networkmanager/testdata/DirectConnectGatewayAttachment/tags_defaults/main_gen.tf create mode 100644 internal/service/networkmanager/testdata/DirectConnectGatewayAttachment/tags_ignore/main_gen.tf create mode 100644 internal/service/networkmanager/testdata/tmpl/dx_gateway_attachment_tags.gtpl diff --git a/internal/service/networkmanager/dx_gateway_attachment.go b/internal/service/networkmanager/dx_gateway_attachment.go index c8ee72588709..4a5e51fa24d8 100644 --- a/internal/service/networkmanager/dx_gateway_attachment.go +++ b/internal/service/networkmanager/dx_gateway_attachment.go @@ -34,7 +34,9 @@ import ( // @FrameworkResource("aws_networkmanager_dx_gateway_attachment", name="Direct Connect Gateway Attachment") // @Tags(identifierAttribute="arn") -// @Testing(tagsTest=false) +// @Testing(existsType="github.com/aws/aws-sdk-go-v2/service/networkmanager/types;awstypes;awstypes.DirectConnectGatewayAttachment") +// @Testing(skipEmptyTags=true, skipNullTags=true) +// @Testing(importIgnore="state") func newDirectConnectGatewayAttachmentResource(context.Context) (resource.ResourceWithConfigure, error) { r := &directConnectGatewayAttachmentResource{} @@ -276,7 +278,7 @@ func (r *directConnectGatewayAttachmentResource) Delete(ctx context.Context, req } // If attachment state is pending acceptance, reject the attachment before deleting. - if state := dxgwAttachment.Attachment.State; state == awstypes.AttachmentStatePendingAttachmentAcceptance || state == awstypes.AttachmentStatePendingTagAcceptance { + if state := dxgwAttachment.Attachment.State; state == awstypes.AttachmentStatePendingAttachmentAcceptance { input := &networkmanager.RejectAttachmentInput{ AttachmentId: fwflex.StringFromFramework(ctx, data.ID), } @@ -399,6 +401,8 @@ func waitDirectConnectGatewayAttachmentDeleted(ctx context.Context, conn *networ Target: []string{}, Refresh: statusDirectConnectGatewayAttachment(ctx, conn, id), Timeout: timeout, + Delay: 2 * time.Minute, + PollInterval: 10 * time.Second, NotFoundChecks: 1, } diff --git a/internal/service/networkmanager/dx_gateway_attachment_tags_gen_test.go b/internal/service/networkmanager/dx_gateway_attachment_tags_gen_test.go new file mode 100644 index 000000000000..1ea787231d2f --- /dev/null +++ b/internal/service/networkmanager/dx_gateway_attachment_tags_gen_test.go @@ -0,0 +1,2359 @@ +// Code generated by internal/generate/tagstests/main.go; DO NOT EDIT. + +package networkmanager_test + +import ( + "testing" + + awstypes "github.com/aws/aws-sdk-go-v2/service/networkmanager/types" + "github.com/hashicorp/terraform-plugin-testing/config" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/knownvalue" + "github.com/hashicorp/terraform-plugin-testing/plancheck" + "github.com/hashicorp/terraform-plugin-testing/statecheck" + "github.com/hashicorp/terraform-plugin-testing/tfjsonpath" + "github.com/hashicorp/terraform-provider-aws/internal/acctest" + "github.com/hashicorp/terraform-provider-aws/names" +) + +func TestAccNetworkManagerDirectConnectGatewayAttachment_tags(t *testing.T) { + ctx := acctest.Context(t) + var v awstypes.DirectConnectGatewayAttachment + resourceName := "aws_networkmanager_dx_gateway_attachment.test" + rName := acctest.RandomWithPrefix(t, acctest.ResourcePrefix) + + acctest.ParallelTest(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckDirectConnectGatewayAttachmentDestroy(ctx), + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + Steps: []resource.TestStep{ + { + ConfigDirectory: config.StaticDirectory("testdata/DirectConnectGatewayAttachment/tags/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckDirectConnectGatewayAttachmentExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + }, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/DirectConnectGatewayAttachment/tags/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{ + names.AttrState, + }, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/DirectConnectGatewayAttachment/tags/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1Updated), + acctest.CtKey2: config.StringVariable(acctest.CtValue2), + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckDirectConnectGatewayAttachmentExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1Updated), + acctest.CtKey2: knownvalue.StringExact(acctest.CtValue2), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1Updated), + acctest.CtKey2: knownvalue.StringExact(acctest.CtValue2), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1Updated), + acctest.CtKey2: knownvalue.StringExact(acctest.CtValue2), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1Updated), + acctest.CtKey2: knownvalue.StringExact(acctest.CtValue2), + })), + }, + }, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/DirectConnectGatewayAttachment/tags/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1Updated), + acctest.CtKey2: config.StringVariable(acctest.CtValue2), + }), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{ + names.AttrState, + }, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/DirectConnectGatewayAttachment/tags/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey2: config.StringVariable(acctest.CtValue2), + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckDirectConnectGatewayAttachmentExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey2: knownvalue.StringExact(acctest.CtValue2), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey2: knownvalue.StringExact(acctest.CtValue2), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey2: knownvalue.StringExact(acctest.CtValue2), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey2: knownvalue.StringExact(acctest.CtValue2), + })), + }, + }, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/DirectConnectGatewayAttachment/tags/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey2: config.StringVariable(acctest.CtValue2), + }), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{ + names.AttrState, + }, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/DirectConnectGatewayAttachment/tags/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtResourceTags: nil, + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckDirectConnectGatewayAttachmentExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.Null()), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{})), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.Null()), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{})), + }, + }, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/DirectConnectGatewayAttachment/tags/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtResourceTags: nil, + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{ + names.AttrState, + }, + }, + }, + }) +} + +func TestAccNetworkManagerDirectConnectGatewayAttachment_tags_null(t *testing.T) { + t.Skip("Resource DirectConnectGatewayAttachment does not support null tags") + + ctx := acctest.Context(t) + var v awstypes.DirectConnectGatewayAttachment + resourceName := "aws_networkmanager_dx_gateway_attachment.test" + rName := acctest.RandomWithPrefix(t, acctest.ResourcePrefix) + + acctest.ParallelTest(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckDirectConnectGatewayAttachmentDestroy(ctx), + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + Steps: []resource.TestStep{ + { + ConfigDirectory: config.StaticDirectory("testdata/DirectConnectGatewayAttachment/tags/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: nil, + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckDirectConnectGatewayAttachmentExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.Null(), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(""), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.Null(), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(""), + })), + }, + }, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/DirectConnectGatewayAttachment/tags/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: nil, + }), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{ + acctest.CtTagsKey1, // The canonical value returned by the AWS API is "" + names.AttrState, + }, + }, + }, + }) +} + +func TestAccNetworkManagerDirectConnectGatewayAttachment_tags_EmptyMap(t *testing.T) { + ctx := acctest.Context(t) + var v awstypes.DirectConnectGatewayAttachment + resourceName := "aws_networkmanager_dx_gateway_attachment.test" + rName := acctest.RandomWithPrefix(t, acctest.ResourcePrefix) + + acctest.ParallelTest(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckDirectConnectGatewayAttachmentDestroy(ctx), + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + Steps: []resource.TestStep{ + { + ConfigDirectory: config.StaticDirectory("testdata/DirectConnectGatewayAttachment/tags/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{}), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckDirectConnectGatewayAttachmentExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{})), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{})), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{})), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{})), + }, + }, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/DirectConnectGatewayAttachment/tags/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{}), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{ + acctest.CtTagsKey1, // The canonical value returned by the AWS API is "" + names.AttrState, + }, + }, + }, + }) +} + +func TestAccNetworkManagerDirectConnectGatewayAttachment_tags_AddOnUpdate(t *testing.T) { + ctx := acctest.Context(t) + var v awstypes.DirectConnectGatewayAttachment + resourceName := "aws_networkmanager_dx_gateway_attachment.test" + rName := acctest.RandomWithPrefix(t, acctest.ResourcePrefix) + + acctest.ParallelTest(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckDirectConnectGatewayAttachmentDestroy(ctx), + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + Steps: []resource.TestStep{ + { + ConfigDirectory: config.StaticDirectory("testdata/DirectConnectGatewayAttachment/tags/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtResourceTags: nil, + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckDirectConnectGatewayAttachmentExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.Null()), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{})), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.Null()), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{})), + }, + }, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/DirectConnectGatewayAttachment/tags/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckDirectConnectGatewayAttachmentExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + }, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/DirectConnectGatewayAttachment/tags/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{ + names.AttrState, + }, + }, + }, + }) +} + +func TestAccNetworkManagerDirectConnectGatewayAttachment_tags_EmptyTag_OnCreate(t *testing.T) { + t.Skip("Resource DirectConnectGatewayAttachment does not support empty tags") + + ctx := acctest.Context(t) + var v awstypes.DirectConnectGatewayAttachment + resourceName := "aws_networkmanager_dx_gateway_attachment.test" + rName := acctest.RandomWithPrefix(t, acctest.ResourcePrefix) + + acctest.ParallelTest(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckDirectConnectGatewayAttachmentDestroy(ctx), + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + Steps: []resource.TestStep{ + { + ConfigDirectory: config.StaticDirectory("testdata/DirectConnectGatewayAttachment/tags/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(""), + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckDirectConnectGatewayAttachmentExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(""), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(""), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(""), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(""), + })), + }, + }, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/DirectConnectGatewayAttachment/tags/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(""), + }), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{ + names.AttrState, + }, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/DirectConnectGatewayAttachment/tags/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtResourceTags: nil, + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckDirectConnectGatewayAttachmentExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.Null()), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{})), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.Null()), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{})), + }, + }, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/DirectConnectGatewayAttachment/tags/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtResourceTags: nil, + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{ + names.AttrState, + }, + }, + }, + }) +} + +func TestAccNetworkManagerDirectConnectGatewayAttachment_tags_EmptyTag_OnUpdate_Add(t *testing.T) { + t.Skip("Resource DirectConnectGatewayAttachment does not support empty tags") + + ctx := acctest.Context(t) + var v awstypes.DirectConnectGatewayAttachment + resourceName := "aws_networkmanager_dx_gateway_attachment.test" + rName := acctest.RandomWithPrefix(t, acctest.ResourcePrefix) + + acctest.ParallelTest(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckDirectConnectGatewayAttachmentDestroy(ctx), + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + Steps: []resource.TestStep{ + { + ConfigDirectory: config.StaticDirectory("testdata/DirectConnectGatewayAttachment/tags/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckDirectConnectGatewayAttachmentExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + }, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/DirectConnectGatewayAttachment/tags/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + acctest.CtKey2: config.StringVariable(""), + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckDirectConnectGatewayAttachmentExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + acctest.CtKey2: knownvalue.StringExact(""), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + acctest.CtKey2: knownvalue.StringExact(""), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + acctest.CtKey2: knownvalue.StringExact(""), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + acctest.CtKey2: knownvalue.StringExact(""), + })), + }, + }, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/DirectConnectGatewayAttachment/tags/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + acctest.CtKey2: config.StringVariable(""), + }), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{ + names.AttrState, + }, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/DirectConnectGatewayAttachment/tags/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckDirectConnectGatewayAttachmentExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + }, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/DirectConnectGatewayAttachment/tags/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{ + names.AttrState, + }, + }, + }, + }) +} + +func TestAccNetworkManagerDirectConnectGatewayAttachment_tags_EmptyTag_OnUpdate_Replace(t *testing.T) { + t.Skip("Resource DirectConnectGatewayAttachment does not support empty tags") + + ctx := acctest.Context(t) + var v awstypes.DirectConnectGatewayAttachment + resourceName := "aws_networkmanager_dx_gateway_attachment.test" + rName := acctest.RandomWithPrefix(t, acctest.ResourcePrefix) + + acctest.ParallelTest(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckDirectConnectGatewayAttachmentDestroy(ctx), + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + Steps: []resource.TestStep{ + { + ConfigDirectory: config.StaticDirectory("testdata/DirectConnectGatewayAttachment/tags/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckDirectConnectGatewayAttachmentExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + }, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/DirectConnectGatewayAttachment/tags/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(""), + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckDirectConnectGatewayAttachmentExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(""), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(""), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(""), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(""), + })), + }, + }, + }, + { + ConfigDirectory: config.StaticDirectory("testdata/DirectConnectGatewayAttachment/tags/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(""), + }), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{ + names.AttrState, + }, + }, + }, + }) +} + +func TestAccNetworkManagerDirectConnectGatewayAttachment_tags_DefaultTags_providerOnly(t *testing.T) { + ctx := acctest.Context(t) + var v awstypes.DirectConnectGatewayAttachment + resourceName := "aws_networkmanager_dx_gateway_attachment.test" + rName := acctest.RandomWithPrefix(t, acctest.ResourcePrefix) + + acctest.ParallelTest(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckDirectConnectGatewayAttachmentDestroy(ctx), + Steps: []resource.TestStep{ + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/DirectConnectGatewayAttachment/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + acctest.CtResourceTags: nil, + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckDirectConnectGatewayAttachmentExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.Null()), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.Null()), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/DirectConnectGatewayAttachment/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + acctest.CtResourceTags: nil, + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{ + names.AttrState, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/DirectConnectGatewayAttachment/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1Updated), + acctest.CtKey2: config.StringVariable(acctest.CtValue2), + }), + acctest.CtResourceTags: nil, + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckDirectConnectGatewayAttachmentExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.Null()), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1Updated), + acctest.CtKey2: knownvalue.StringExact(acctest.CtValue2), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.Null()), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1Updated), + acctest.CtKey2: knownvalue.StringExact(acctest.CtValue2), + })), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/DirectConnectGatewayAttachment/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1Updated), + acctest.CtKey2: config.StringVariable(acctest.CtValue2), + }), + acctest.CtResourceTags: nil, + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{ + names.AttrState, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/DirectConnectGatewayAttachment/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey2: config.StringVariable(acctest.CtValue2), + }), + acctest.CtResourceTags: nil, + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckDirectConnectGatewayAttachmentExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.Null()), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey2: knownvalue.StringExact(acctest.CtValue2), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.Null()), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey2: knownvalue.StringExact(acctest.CtValue2), + })), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/DirectConnectGatewayAttachment/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey2: config.StringVariable(acctest.CtValue2), + }), + acctest.CtResourceTags: nil, + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{ + names.AttrState, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/DirectConnectGatewayAttachment/tags/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtResourceTags: nil, + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckDirectConnectGatewayAttachmentExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.Null()), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{})), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.Null()), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{})), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/DirectConnectGatewayAttachment/tags/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtResourceTags: nil, + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{ + names.AttrState, + }, + }, + }, + }) +} + +func TestAccNetworkManagerDirectConnectGatewayAttachment_tags_DefaultTags_nonOverlapping(t *testing.T) { + ctx := acctest.Context(t) + var v awstypes.DirectConnectGatewayAttachment + resourceName := "aws_networkmanager_dx_gateway_attachment.test" + rName := acctest.RandomWithPrefix(t, acctest.ResourcePrefix) + + acctest.ParallelTest(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckDirectConnectGatewayAttachmentDestroy(ctx), + Steps: []resource.TestStep{ + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/DirectConnectGatewayAttachment/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtProviderKey1: config.StringVariable(acctest.CtProviderValue1), + }), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtResourceKey1: config.StringVariable(acctest.CtResourceValue1), + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckDirectConnectGatewayAttachmentExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtProviderKey1: knownvalue.StringExact(acctest.CtProviderValue1), + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtProviderKey1: knownvalue.StringExact(acctest.CtProviderValue1), + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), + })), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/DirectConnectGatewayAttachment/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtProviderKey1: config.StringVariable(acctest.CtProviderValue1), + }), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtResourceKey1: config.StringVariable(acctest.CtResourceValue1), + }), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{ + names.AttrState, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/DirectConnectGatewayAttachment/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtProviderKey1: config.StringVariable(acctest.CtProviderValue1Updated), + }), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtResourceKey1: config.StringVariable(acctest.CtResourceValue1Updated), + acctest.CtResourceKey2: config.StringVariable(acctest.CtResourceValue2), + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckDirectConnectGatewayAttachmentExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1Updated), + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtProviderKey1: knownvalue.StringExact(acctest.CtProviderValue1Updated), + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1Updated), + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1Updated), + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtProviderKey1: knownvalue.StringExact(acctest.CtProviderValue1Updated), + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1Updated), + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/DirectConnectGatewayAttachment/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtProviderKey1: config.StringVariable(acctest.CtProviderValue1Updated), + }), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtResourceKey1: config.StringVariable(acctest.CtResourceValue1Updated), + acctest.CtResourceKey2: config.StringVariable(acctest.CtResourceValue2), + }), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{ + names.AttrState, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/DirectConnectGatewayAttachment/tags/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtResourceTags: nil, + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckDirectConnectGatewayAttachmentExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.Null()), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{})), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.Null()), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{})), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/DirectConnectGatewayAttachment/tags/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtResourceTags: nil, + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{ + names.AttrState, + }, + }, + }, + }) +} + +func TestAccNetworkManagerDirectConnectGatewayAttachment_tags_DefaultTags_overlapping(t *testing.T) { + ctx := acctest.Context(t) + var v awstypes.DirectConnectGatewayAttachment + resourceName := "aws_networkmanager_dx_gateway_attachment.test" + rName := acctest.RandomWithPrefix(t, acctest.ResourcePrefix) + + acctest.ParallelTest(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckDirectConnectGatewayAttachmentDestroy(ctx), + Steps: []resource.TestStep{ + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/DirectConnectGatewayAttachment/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtOverlapKey1: config.StringVariable(acctest.CtProviderValue1), + }), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtOverlapKey1: config.StringVariable(acctest.CtResourceValue1), + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckDirectConnectGatewayAttachmentExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtOverlapKey1: knownvalue.StringExact(acctest.CtResourceValue1), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtOverlapKey1: knownvalue.StringExact(acctest.CtResourceValue1), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtOverlapKey1: knownvalue.StringExact(acctest.CtResourceValue1), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtOverlapKey1: knownvalue.StringExact(acctest.CtResourceValue1), + })), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/DirectConnectGatewayAttachment/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtOverlapKey1: config.StringVariable(acctest.CtProviderValue1), + }), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtOverlapKey1: config.StringVariable(acctest.CtResourceValue1), + }), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{ + names.AttrState, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/DirectConnectGatewayAttachment/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtOverlapKey1: config.StringVariable(acctest.CtProviderValue1), + acctest.CtOverlapKey2: config.StringVariable("providervalue2"), + }), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtOverlapKey1: config.StringVariable(acctest.CtResourceValue1), + acctest.CtOverlapKey2: config.StringVariable(acctest.CtResourceValue2), + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckDirectConnectGatewayAttachmentExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtOverlapKey1: knownvalue.StringExact(acctest.CtResourceValue1), + acctest.CtOverlapKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtOverlapKey1: knownvalue.StringExact(acctest.CtResourceValue1), + acctest.CtOverlapKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtOverlapKey1: knownvalue.StringExact(acctest.CtResourceValue1), + acctest.CtOverlapKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtOverlapKey1: knownvalue.StringExact(acctest.CtResourceValue1), + acctest.CtOverlapKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/DirectConnectGatewayAttachment/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtOverlapKey1: config.StringVariable(acctest.CtProviderValue1), + acctest.CtOverlapKey2: config.StringVariable("providervalue2"), + }), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtOverlapKey1: config.StringVariable(acctest.CtResourceValue1), + acctest.CtOverlapKey2: config.StringVariable(acctest.CtResourceValue2), + }), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{ + names.AttrState, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/DirectConnectGatewayAttachment/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtOverlapKey1: config.StringVariable(acctest.CtProviderValue1), + }), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtOverlapKey1: config.StringVariable(acctest.CtResourceValue2), + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckDirectConnectGatewayAttachmentExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtOverlapKey1: knownvalue.StringExact(acctest.CtResourceValue2), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtOverlapKey1: knownvalue.StringExact(acctest.CtResourceValue2), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtOverlapKey1: knownvalue.StringExact(acctest.CtResourceValue2), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtOverlapKey1: knownvalue.StringExact(acctest.CtResourceValue2), + })), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/DirectConnectGatewayAttachment/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtOverlapKey1: config.StringVariable(acctest.CtProviderValue1), + }), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtOverlapKey1: config.StringVariable(acctest.CtResourceValue2), + }), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{ + names.AttrState, + }, + }, + }, + }) +} + +func TestAccNetworkManagerDirectConnectGatewayAttachment_tags_DefaultTags_updateToProviderOnly(t *testing.T) { + ctx := acctest.Context(t) + var v awstypes.DirectConnectGatewayAttachment + resourceName := "aws_networkmanager_dx_gateway_attachment.test" + rName := acctest.RandomWithPrefix(t, acctest.ResourcePrefix) + + acctest.ParallelTest(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckDirectConnectGatewayAttachmentDestroy(ctx), + Steps: []resource.TestStep{ + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/DirectConnectGatewayAttachment/tags/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckDirectConnectGatewayAttachmentExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/DirectConnectGatewayAttachment/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + acctest.CtResourceTags: nil, + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckDirectConnectGatewayAttachmentExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.Null()), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.Null()), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/DirectConnectGatewayAttachment/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + acctest.CtResourceTags: nil, + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{ + names.AttrState, + }, + }, + }, + }) +} + +func TestAccNetworkManagerDirectConnectGatewayAttachment_tags_DefaultTags_updateToResourceOnly(t *testing.T) { + ctx := acctest.Context(t) + var v awstypes.DirectConnectGatewayAttachment + resourceName := "aws_networkmanager_dx_gateway_attachment.test" + rName := acctest.RandomWithPrefix(t, acctest.ResourcePrefix) + + acctest.ParallelTest(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckDirectConnectGatewayAttachmentDestroy(ctx), + Steps: []resource.TestStep{ + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/DirectConnectGatewayAttachment/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + acctest.CtResourceTags: nil, + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckDirectConnectGatewayAttachmentExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.Null()), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.Null()), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/DirectConnectGatewayAttachment/tags/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckDirectConnectGatewayAttachmentExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionNoop), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/DirectConnectGatewayAttachment/tags/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{ + names.AttrState, + }, + }, + }, + }) +} + +func TestAccNetworkManagerDirectConnectGatewayAttachment_tags_DefaultTags_emptyResourceTag(t *testing.T) { + t.Skip("Resource DirectConnectGatewayAttachment does not support empty tags") + + ctx := acctest.Context(t) + var v awstypes.DirectConnectGatewayAttachment + resourceName := "aws_networkmanager_dx_gateway_attachment.test" + rName := acctest.RandomWithPrefix(t, acctest.ResourcePrefix) + + acctest.ParallelTest(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckDirectConnectGatewayAttachmentDestroy(ctx), + Steps: []resource.TestStep{ + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/DirectConnectGatewayAttachment/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(""), + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckDirectConnectGatewayAttachmentExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(""), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(""), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(""), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(""), + })), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/DirectConnectGatewayAttachment/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(""), + }), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{ + names.AttrState, + }, + }, + }, + }) +} + +func TestAccNetworkManagerDirectConnectGatewayAttachment_tags_DefaultTags_emptyProviderOnlyTag(t *testing.T) { + t.Skip("Resource DirectConnectGatewayAttachment does not support empty tags") + + ctx := acctest.Context(t) + var v awstypes.DirectConnectGatewayAttachment + resourceName := "aws_networkmanager_dx_gateway_attachment.test" + rName := acctest.RandomWithPrefix(t, acctest.ResourcePrefix) + + acctest.ParallelTest(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckDirectConnectGatewayAttachmentDestroy(ctx), + Steps: []resource.TestStep{ + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/DirectConnectGatewayAttachment/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(""), + }), + acctest.CtResourceTags: nil, + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckDirectConnectGatewayAttachmentExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.Null()), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(""), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.Null()), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(""), + })), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/DirectConnectGatewayAttachment/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(""), + }), + acctest.CtResourceTags: nil, + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{ + names.AttrState, + }, + }, + }, + }) +} + +func TestAccNetworkManagerDirectConnectGatewayAttachment_tags_DefaultTags_nullOverlappingResourceTag(t *testing.T) { + t.Skip("Resource DirectConnectGatewayAttachment does not support null tags") + + ctx := acctest.Context(t) + var v awstypes.DirectConnectGatewayAttachment + resourceName := "aws_networkmanager_dx_gateway_attachment.test" + rName := acctest.RandomWithPrefix(t, acctest.ResourcePrefix) + + acctest.ParallelTest(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckDirectConnectGatewayAttachmentDestroy(ctx), + Steps: []resource.TestStep{ + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/DirectConnectGatewayAttachment/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtProviderValue1), + }), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: nil, + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckDirectConnectGatewayAttachmentExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.Null(), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(""), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.Null(), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(""), + })), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/DirectConnectGatewayAttachment/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtProviderValue1), + }), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: nil, + }), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{ + acctest.CtTagsKey1, // The canonical value returned by the AWS API is "" + names.AttrState, + }, + }, + }, + }) +} + +func TestAccNetworkManagerDirectConnectGatewayAttachment_tags_DefaultTags_nullNonOverlappingResourceTag(t *testing.T) { + t.Skip("Resource DirectConnectGatewayAttachment does not support null tags") + + ctx := acctest.Context(t) + var v awstypes.DirectConnectGatewayAttachment + resourceName := "aws_networkmanager_dx_gateway_attachment.test" + rName := acctest.RandomWithPrefix(t, acctest.ResourcePrefix) + + acctest.ParallelTest(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckDirectConnectGatewayAttachmentDestroy(ctx), + Steps: []resource.TestStep{ + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/DirectConnectGatewayAttachment/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtProviderKey1: config.StringVariable(acctest.CtProviderValue1), + }), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtResourceKey1: nil, + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckDirectConnectGatewayAttachmentExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.Null(), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(""), + acctest.CtProviderKey1: knownvalue.StringExact(acctest.CtProviderValue1), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.Null(), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(""), + acctest.CtProviderKey1: knownvalue.StringExact(acctest.CtProviderValue1), + })), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/DirectConnectGatewayAttachment/tags_defaults/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtProviderKey1: config.StringVariable(acctest.CtProviderValue1), + }), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtResourceKey1: nil, + }), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{ + "tags.resourcekey1", // The canonical value returned by the AWS API is "" + names.AttrState, + }, + }, + }, + }) +} + +func TestAccNetworkManagerDirectConnectGatewayAttachment_tags_ComputedTag_OnCreate(t *testing.T) { + ctx := acctest.Context(t) + var v awstypes.DirectConnectGatewayAttachment + resourceName := "aws_networkmanager_dx_gateway_attachment.test" + rName := acctest.RandomWithPrefix(t, acctest.ResourcePrefix) + + acctest.ParallelTest(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckDirectConnectGatewayAttachmentDestroy(ctx), + Steps: []resource.TestStep{ + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/DirectConnectGatewayAttachment/tagsComputed1/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + "unknownTagKey": config.StringVariable("computedkey1"), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckDirectConnectGatewayAttachmentExists(ctx, resourceName, &v), + resource.TestCheckResourceAttrPair(resourceName, "tags.computedkey1", "null_resource.test", names.AttrID), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapSizeExact(1)), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapSizeExact(1)), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectUnknownValue(resourceName, tfjsonpath.New(names.AttrTags).AtMapKey("computedkey1")), + plancheck.ExpectUnknownValue(resourceName, tfjsonpath.New(names.AttrTagsAll)), + }, + PostApplyPreRefresh: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionNoop), + }, + PostApplyPostRefresh: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionNoop), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/DirectConnectGatewayAttachment/tagsComputed1/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + "unknownTagKey": config.StringVariable("computedkey1"), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{ + names.AttrState, + }, + }, + }, + }) +} + +func TestAccNetworkManagerDirectConnectGatewayAttachment_tags_ComputedTag_OnUpdate_Add(t *testing.T) { + ctx := acctest.Context(t) + var v awstypes.DirectConnectGatewayAttachment + resourceName := "aws_networkmanager_dx_gateway_attachment.test" + rName := acctest.RandomWithPrefix(t, acctest.ResourcePrefix) + + acctest.ParallelTest(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckDirectConnectGatewayAttachmentDestroy(ctx), + Steps: []resource.TestStep{ + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/DirectConnectGatewayAttachment/tags/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckDirectConnectGatewayAttachmentExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/DirectConnectGatewayAttachment/tagsComputed2/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + "unknownTagKey": config.StringVariable("computedkey1"), + "knownTagKey": config.StringVariable(acctest.CtKey1), + "knownTagValue": config.StringVariable(acctest.CtValue1), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckDirectConnectGatewayAttachmentExists(ctx, resourceName, &v), + resource.TestCheckResourceAttrPair(resourceName, "tags.computedkey1", "null_resource.test", names.AttrID), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapSizeExact(2)), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapPartial(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapSizeExact(2)), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapPartial(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectUnknownValue(resourceName, tfjsonpath.New(names.AttrTags).AtMapKey("computedkey1")), + plancheck.ExpectUnknownValue(resourceName, tfjsonpath.New(names.AttrTagsAll)), + }, + PostApplyPreRefresh: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionNoop), + }, + PostApplyPostRefresh: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionNoop), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/DirectConnectGatewayAttachment/tagsComputed2/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + "unknownTagKey": config.StringVariable("computedkey1"), + "knownTagKey": config.StringVariable(acctest.CtKey1), + "knownTagValue": config.StringVariable(acctest.CtValue1), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{ + names.AttrState, + }, + }, + }, + }) +} + +func TestAccNetworkManagerDirectConnectGatewayAttachment_tags_ComputedTag_OnUpdate_Replace(t *testing.T) { + ctx := acctest.Context(t) + var v awstypes.DirectConnectGatewayAttachment + resourceName := "aws_networkmanager_dx_gateway_attachment.test" + rName := acctest.RandomWithPrefix(t, acctest.ResourcePrefix) + + acctest.ParallelTest(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckDirectConnectGatewayAttachmentDestroy(ctx), + Steps: []resource.TestStep{ + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/DirectConnectGatewayAttachment/tags/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + }), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckDirectConnectGatewayAttachmentExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtKey1: knownvalue.StringExact(acctest.CtValue1), + })), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/DirectConnectGatewayAttachment/tagsComputed1/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + "unknownTagKey": config.StringVariable(acctest.CtKey1), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckDirectConnectGatewayAttachmentExists(ctx, resourceName, &v), + resource.TestCheckResourceAttrPair(resourceName, acctest.CtTagsKey1, "null_resource.test", names.AttrID), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapSizeExact(1)), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapSizeExact(1)), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectUnknownValue(resourceName, tfjsonpath.New(names.AttrTags).AtMapKey(acctest.CtKey1)), + plancheck.ExpectUnknownValue(resourceName, tfjsonpath.New(names.AttrTagsAll)), + }, + PostApplyPreRefresh: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionNoop), + }, + PostApplyPostRefresh: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionNoop), + }, + }, + }, + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/DirectConnectGatewayAttachment/tagsComputed1/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + "unknownTagKey": config.StringVariable(acctest.CtKey1), + }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{ + names.AttrState, + }, + }, + }, + }) +} + +func TestAccNetworkManagerDirectConnectGatewayAttachment_tags_IgnoreTags_Overlap_DefaultTag(t *testing.T) { + ctx := acctest.Context(t) + var v awstypes.DirectConnectGatewayAttachment + resourceName := "aws_networkmanager_dx_gateway_attachment.test" + rName := acctest.RandomWithPrefix(t, acctest.ResourcePrefix) + + acctest.ParallelTest(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckDirectConnectGatewayAttachmentDestroy(ctx), + Steps: []resource.TestStep{ + // 1: Create + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/DirectConnectGatewayAttachment/tags_ignore/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtProviderKey1: config.StringVariable(acctest.CtProviderValue1), + }), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtResourceKey1: config.StringVariable(acctest.CtResourceValue1), + }), + "ignore_tag_keys": config.SetVariable( + config.StringVariable(acctest.CtProviderKey1), + ), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckDirectConnectGatewayAttachmentExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), + })), + expectFullResourceTags(ctx, resourceName, knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtProviderKey1: knownvalue.StringExact(acctest.CtProviderValue1), // TODO: Should not be set + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), + })), + }, + PostApplyPreRefresh: []plancheck.PlanCheck{ + plancheck.ExpectEmptyPlan(), + }, + PostApplyPostRefresh: []plancheck.PlanCheck{ + plancheck.ExpectEmptyPlan(), + }, + }, + }, + // 2: Update ignored tag only + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/DirectConnectGatewayAttachment/tags_ignore/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtProviderKey1: config.StringVariable(acctest.CtProviderValue1Updated), + }), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtResourceKey1: config.StringVariable(acctest.CtResourceValue1), + }), + "ignore_tag_keys": config.SetVariable( + config.StringVariable(acctest.CtProviderKey1), + ), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckDirectConnectGatewayAttachmentExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), + })), + expectFullResourceTags(ctx, resourceName, knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtProviderKey1: knownvalue.StringExact(acctest.CtProviderValue1), // TODO: Should not be set + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionNoop), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), + })), + }, + PostApplyPreRefresh: []plancheck.PlanCheck{ + plancheck.ExpectEmptyPlan(), + }, + PostApplyPostRefresh: []plancheck.PlanCheck{ + plancheck.ExpectEmptyPlan(), + }, + }, + }, + // 3: Update both tags + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/DirectConnectGatewayAttachment/tags_ignore/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtProviderTags: config.MapVariable(map[string]config.Variable{ + acctest.CtProviderKey1: config.StringVariable(acctest.CtProviderValue1Again), + }), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtResourceKey1: config.StringVariable(acctest.CtResourceValue1Updated), + }), + "ignore_tag_keys": config.SetVariable( + config.StringVariable(acctest.CtProviderKey1), + ), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckDirectConnectGatewayAttachmentExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1Updated), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1Updated), + })), + expectFullResourceTags(ctx, resourceName, knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtProviderKey1: knownvalue.StringExact(acctest.CtProviderValue1), // TODO: Should not be set + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1Updated), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1Updated), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1Updated), + })), + }, + PostApplyPreRefresh: []plancheck.PlanCheck{ + plancheck.ExpectEmptyPlan(), + }, + PostApplyPostRefresh: []plancheck.PlanCheck{ + plancheck.ExpectEmptyPlan(), + }, + }, + }, + }, + }) +} + +func TestAccNetworkManagerDirectConnectGatewayAttachment_tags_IgnoreTags_Overlap_ResourceTag(t *testing.T) { + ctx := acctest.Context(t) + var v awstypes.DirectConnectGatewayAttachment + resourceName := "aws_networkmanager_dx_gateway_attachment.test" + rName := acctest.RandomWithPrefix(t, acctest.ResourcePrefix) + + acctest.ParallelTest(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), + CheckDestroy: testAccCheckDirectConnectGatewayAttachmentDestroy(ctx), + Steps: []resource.TestStep{ + // 1: Create + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/DirectConnectGatewayAttachment/tags_ignore/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtResourceKey1: config.StringVariable(acctest.CtResourceValue1), + acctest.CtResourceKey2: config.StringVariable(acctest.CtResourceValue2), + }), + "ignore_tag_keys": config.SetVariable( + config.StringVariable(acctest.CtResourceKey1), + ), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckDirectConnectGatewayAttachmentExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + expectFullResourceTags(ctx, resourceName, knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), // TODO: Should not be set + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + }, + PostApplyPreRefresh: []plancheck.PlanCheck{ + plancheck.ExpectEmptyPlan(), + }, + PostApplyPostRefresh: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), // TODO: Should be NoOp + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + }, + }, + ExpectNonEmptyPlan: true, + }, + // 2: Update ignored tag + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/DirectConnectGatewayAttachment/tags_ignore/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtResourceKey1: config.StringVariable(acctest.CtResourceValue1Updated), + acctest.CtResourceKey2: config.StringVariable(acctest.CtResourceValue2), + }), + "ignore_tag_keys": config.SetVariable( + config.StringVariable(acctest.CtResourceKey1), + ), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckDirectConnectGatewayAttachmentExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1Updated), + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + expectFullResourceTags(ctx, resourceName, knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), // TODO: Should not be set + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1Updated), + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + }, + PostApplyPreRefresh: []plancheck.PlanCheck{ + plancheck.ExpectEmptyPlan(), + }, + PostApplyPostRefresh: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), // TODO: Should be NoOp + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1Updated), + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2), + })), + }, + }, + ExpectNonEmptyPlan: true, + }, + // 3: Update both tags + { + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + ConfigDirectory: config.StaticDirectory("testdata/DirectConnectGatewayAttachment/tags_ignore/"), + ConfigVariables: config.Variables{ + acctest.CtRName: config.StringVariable(rName), + acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ + acctest.CtResourceKey1: config.StringVariable(acctest.CtResourceValue1Again), + acctest.CtResourceKey2: config.StringVariable(acctest.CtResourceValue2Updated), + }), + "ignore_tag_keys": config.SetVariable( + config.StringVariable(acctest.CtResourceKey1), + ), + }, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckDirectConnectGatewayAttachmentExists(ctx, resourceName, &v), + ), + ConfigStateChecks: []statecheck.StateCheck{ + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1Again), + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2Updated), + })), + statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2Updated), + })), + expectFullResourceTags(ctx, resourceName, knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1), // TODO: Should not be set + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2Updated), + })), + }, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1Again), + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2Updated), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2Updated), + })), + }, + PostApplyPreRefresh: []plancheck.PlanCheck{ + plancheck.ExpectEmptyPlan(), + }, + PostApplyPostRefresh: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), // TODO: Should be NoOp + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTags), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey1: knownvalue.StringExact(acctest.CtResourceValue1Again), + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2Updated), + })), + plancheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrTagsAll), knownvalue.MapExact(map[string]knownvalue.Check{ + acctest.CtResourceKey2: knownvalue.StringExact(acctest.CtResourceValue2Updated), + })), + }, + }, + ExpectNonEmptyPlan: true, + }, + }, + }) +} diff --git a/internal/service/networkmanager/dx_gateway_attachment_test.go b/internal/service/networkmanager/dx_gateway_attachment_test.go index 8cc3a2d9067e..182edfe68aec 100644 --- a/internal/service/networkmanager/dx_gateway_attachment_test.go +++ b/internal/service/networkmanager/dx_gateway_attachment_test.go @@ -192,7 +192,7 @@ func TestAccNetworkManagerDirectConnectGatewayAttachment_update(t *testing.T) { }) } -func TestAccNetworkManagerDirectConnectGatewayAttachment_tags(t *testing.T) { +func TestAccXXXNetworkManagerDirectConnectGatewayAttachment_tags_old(t *testing.T) { ctx := acctest.Context(t) var dxgatewayattachment awstypes.DirectConnectGatewayAttachment rName := sdkacctest.RandomWithPrefix(acctest.ResourcePrefix) @@ -309,8 +309,6 @@ func testAccCheckDirectConnectGatewayAttachmentExists(ctx context.Context, n str func testAccDirectConnectGatewayAttachmentConfig_base(rName string, requireAcceptance bool) string { return acctest.ConfigCompose(acctest.ConfigAvailableAZsNoOptIn(), fmt.Sprintf(` -data "aws_region" "current" {} - resource "aws_dx_gateway" "test" { name = %[1]q amazon_side_asn = 65000 @@ -335,6 +333,8 @@ resource "aws_networkmanager_core_network_policy_attachment" "test" { policy_document = data.aws_networkmanager_core_network_policy_document.test.json } +data "aws_region" "current" {} + data "aws_networkmanager_core_network_policy_document" "test" { core_network_configuration { vpn_ecmp_support = false diff --git a/internal/service/networkmanager/testdata/DirectConnectGatewayAttachment/tags/main_gen.tf b/internal/service/networkmanager/testdata/DirectConnectGatewayAttachment/tags/main_gen.tf new file mode 100644 index 000000000000..e56702da89af --- /dev/null +++ b/internal/service/networkmanager/testdata/DirectConnectGatewayAttachment/tags/main_gen.tf @@ -0,0 +1,80 @@ +# Copyright (c) HashiCorp, Inc. +# SPDX-License-Identifier: MPL-2.0 + +resource "aws_networkmanager_dx_gateway_attachment" "test" { + core_network_id = aws_networkmanager_core_network_policy_attachment.test.core_network_id + direct_connect_gateway_arn = aws_dx_gateway.test.arn + edge_locations = [data.aws_region.current.region] + + tags = var.resource_tags +} + +# testAccDirectConnectGatewayAttachmentConfig_base + +resource "aws_dx_gateway" "test" { + name = var.rName + amazon_side_asn = 65000 +} + +resource "aws_networkmanager_global_network" "test" {} + +resource "aws_networkmanager_core_network" "test" { + global_network_id = aws_networkmanager_global_network.test.id +} + +resource "aws_networkmanager_core_network_policy_attachment" "test" { + core_network_id = aws_networkmanager_core_network.test.id + policy_document = data.aws_networkmanager_core_network_policy_document.test.json +} + +data "aws_region" "current" {} + +data "aws_networkmanager_core_network_policy_document" "test" { + core_network_configuration { + vpn_ecmp_support = false + asn_ranges = ["64512-64555"] + edge_locations { + location = data.aws_region.current.region + asn = 64512 + } + } + + segments { + name = "shared" + description = "SegmentForSharedServices" + require_attachment_acceptance = false + } + + segment_actions { + action = "share" + mode = "attachment-route" + segment = "shared" + share_with = ["*"] + } + + attachment_policies { + rule_number = 1 + + conditions { + type = "any" + } + + action { + association_method = "constant" + segment = "shared" + } + } +} + +variable "rName" { + description = "Name for resource" + type = string + nullable = false +} + +variable "resource_tags" { + description = "Tags to set on resource. To specify no tags, set to `null`" + # Not setting a default, so that this must explicitly be set to `null` to specify no tags + type = map(string) + nullable = true +} diff --git a/internal/service/networkmanager/testdata/DirectConnectGatewayAttachment/tagsComputed1/main_gen.tf b/internal/service/networkmanager/testdata/DirectConnectGatewayAttachment/tagsComputed1/main_gen.tf new file mode 100644 index 000000000000..09c8351112bc --- /dev/null +++ b/internal/service/networkmanager/testdata/DirectConnectGatewayAttachment/tagsComputed1/main_gen.tf @@ -0,0 +1,84 @@ +# Copyright (c) HashiCorp, Inc. +# SPDX-License-Identifier: MPL-2.0 + +provider "null" {} + +resource "aws_networkmanager_dx_gateway_attachment" "test" { + core_network_id = aws_networkmanager_core_network_policy_attachment.test.core_network_id + direct_connect_gateway_arn = aws_dx_gateway.test.arn + edge_locations = [data.aws_region.current.region] + + tags = { + (var.unknownTagKey) = null_resource.test.id + } +} + +# testAccDirectConnectGatewayAttachmentConfig_base + +resource "aws_dx_gateway" "test" { + name = var.rName + amazon_side_asn = 65000 +} + +resource "aws_networkmanager_global_network" "test" {} + +resource "aws_networkmanager_core_network" "test" { + global_network_id = aws_networkmanager_global_network.test.id +} + +resource "aws_networkmanager_core_network_policy_attachment" "test" { + core_network_id = aws_networkmanager_core_network.test.id + policy_document = data.aws_networkmanager_core_network_policy_document.test.json +} + +data "aws_region" "current" {} + +data "aws_networkmanager_core_network_policy_document" "test" { + core_network_configuration { + vpn_ecmp_support = false + asn_ranges = ["64512-64555"] + edge_locations { + location = data.aws_region.current.region + asn = 64512 + } + } + + segments { + name = "shared" + description = "SegmentForSharedServices" + require_attachment_acceptance = false + } + + segment_actions { + action = "share" + mode = "attachment-route" + segment = "shared" + share_with = ["*"] + } + + attachment_policies { + rule_number = 1 + + conditions { + type = "any" + } + + action { + association_method = "constant" + segment = "shared" + } + } +} + +resource "null_resource" "test" {} + +variable "rName" { + description = "Name for resource" + type = string + nullable = false +} + +variable "unknownTagKey" { + type = string + nullable = false +} diff --git a/internal/service/networkmanager/testdata/DirectConnectGatewayAttachment/tagsComputed2/main_gen.tf b/internal/service/networkmanager/testdata/DirectConnectGatewayAttachment/tagsComputed2/main_gen.tf new file mode 100644 index 000000000000..b4a23371d044 --- /dev/null +++ b/internal/service/networkmanager/testdata/DirectConnectGatewayAttachment/tagsComputed2/main_gen.tf @@ -0,0 +1,95 @@ +# Copyright (c) HashiCorp, Inc. +# SPDX-License-Identifier: MPL-2.0 + +provider "null" {} + +resource "aws_networkmanager_dx_gateway_attachment" "test" { + core_network_id = aws_networkmanager_core_network_policy_attachment.test.core_network_id + direct_connect_gateway_arn = aws_dx_gateway.test.arn + edge_locations = [data.aws_region.current.region] + + tags = { + (var.unknownTagKey) = null_resource.test.id + (var.knownTagKey) = var.knownTagValue + } +} + +# testAccDirectConnectGatewayAttachmentConfig_base + +resource "aws_dx_gateway" "test" { + name = var.rName + amazon_side_asn = 65000 +} + +resource "aws_networkmanager_global_network" "test" {} + +resource "aws_networkmanager_core_network" "test" { + global_network_id = aws_networkmanager_global_network.test.id +} + +resource "aws_networkmanager_core_network_policy_attachment" "test" { + core_network_id = aws_networkmanager_core_network.test.id + policy_document = data.aws_networkmanager_core_network_policy_document.test.json +} + +data "aws_region" "current" {} + +data "aws_networkmanager_core_network_policy_document" "test" { + core_network_configuration { + vpn_ecmp_support = false + asn_ranges = ["64512-64555"] + edge_locations { + location = data.aws_region.current.region + asn = 64512 + } + } + + segments { + name = "shared" + description = "SegmentForSharedServices" + require_attachment_acceptance = false + } + + segment_actions { + action = "share" + mode = "attachment-route" + segment = "shared" + share_with = ["*"] + } + + attachment_policies { + rule_number = 1 + + conditions { + type = "any" + } + + action { + association_method = "constant" + segment = "shared" + } + } +} + +resource "null_resource" "test" {} + +variable "rName" { + description = "Name for resource" + type = string + nullable = false +} + +variable "unknownTagKey" { + type = string + nullable = false +} + +variable "knownTagKey" { + type = string + nullable = false +} + +variable "knownTagValue" { + type = string + nullable = false +} diff --git a/internal/service/networkmanager/testdata/DirectConnectGatewayAttachment/tags_defaults/main_gen.tf b/internal/service/networkmanager/testdata/DirectConnectGatewayAttachment/tags_defaults/main_gen.tf new file mode 100644 index 000000000000..0415aa1fcb88 --- /dev/null +++ b/internal/service/networkmanager/testdata/DirectConnectGatewayAttachment/tags_defaults/main_gen.tf @@ -0,0 +1,91 @@ +# Copyright (c) HashiCorp, Inc. +# SPDX-License-Identifier: MPL-2.0 + +provider "aws" { + default_tags { + tags = var.provider_tags + } +} + +resource "aws_networkmanager_dx_gateway_attachment" "test" { + core_network_id = aws_networkmanager_core_network_policy_attachment.test.core_network_id + direct_connect_gateway_arn = aws_dx_gateway.test.arn + edge_locations = [data.aws_region.current.region] + + tags = var.resource_tags +} + +# testAccDirectConnectGatewayAttachmentConfig_base + +resource "aws_dx_gateway" "test" { + name = var.rName + amazon_side_asn = 65000 +} + +resource "aws_networkmanager_global_network" "test" {} + +resource "aws_networkmanager_core_network" "test" { + global_network_id = aws_networkmanager_global_network.test.id +} + +resource "aws_networkmanager_core_network_policy_attachment" "test" { + core_network_id = aws_networkmanager_core_network.test.id + policy_document = data.aws_networkmanager_core_network_policy_document.test.json +} + +data "aws_region" "current" {} + +data "aws_networkmanager_core_network_policy_document" "test" { + core_network_configuration { + vpn_ecmp_support = false + asn_ranges = ["64512-64555"] + edge_locations { + location = data.aws_region.current.region + asn = 64512 + } + } + + segments { + name = "shared" + description = "SegmentForSharedServices" + require_attachment_acceptance = false + } + + segment_actions { + action = "share" + mode = "attachment-route" + segment = "shared" + share_with = ["*"] + } + + attachment_policies { + rule_number = 1 + + conditions { + type = "any" + } + + action { + association_method = "constant" + segment = "shared" + } + } +} + +variable "rName" { + description = "Name for resource" + type = string + nullable = false +} + +variable "resource_tags" { + description = "Tags to set on resource. To specify no tags, set to `null`" + # Not setting a default, so that this must explicitly be set to `null` to specify no tags + type = map(string) + nullable = true +} + +variable "provider_tags" { + type = map(string) + nullable = false +} diff --git a/internal/service/networkmanager/testdata/DirectConnectGatewayAttachment/tags_ignore/main_gen.tf b/internal/service/networkmanager/testdata/DirectConnectGatewayAttachment/tags_ignore/main_gen.tf new file mode 100644 index 000000000000..ae219ead2304 --- /dev/null +++ b/internal/service/networkmanager/testdata/DirectConnectGatewayAttachment/tags_ignore/main_gen.tf @@ -0,0 +1,100 @@ +# Copyright (c) HashiCorp, Inc. +# SPDX-License-Identifier: MPL-2.0 + +provider "aws" { + default_tags { + tags = var.provider_tags + } + ignore_tags { + keys = var.ignore_tag_keys + } +} + +resource "aws_networkmanager_dx_gateway_attachment" "test" { + core_network_id = aws_networkmanager_core_network_policy_attachment.test.core_network_id + direct_connect_gateway_arn = aws_dx_gateway.test.arn + edge_locations = [data.aws_region.current.region] + + tags = var.resource_tags +} + +# testAccDirectConnectGatewayAttachmentConfig_base + +resource "aws_dx_gateway" "test" { + name = var.rName + amazon_side_asn = 65000 +} + +resource "aws_networkmanager_global_network" "test" {} + +resource "aws_networkmanager_core_network" "test" { + global_network_id = aws_networkmanager_global_network.test.id +} + +resource "aws_networkmanager_core_network_policy_attachment" "test" { + core_network_id = aws_networkmanager_core_network.test.id + policy_document = data.aws_networkmanager_core_network_policy_document.test.json +} + +data "aws_region" "current" {} + +data "aws_networkmanager_core_network_policy_document" "test" { + core_network_configuration { + vpn_ecmp_support = false + asn_ranges = ["64512-64555"] + edge_locations { + location = data.aws_region.current.region + asn = 64512 + } + } + + segments { + name = "shared" + description = "SegmentForSharedServices" + require_attachment_acceptance = false + } + + segment_actions { + action = "share" + mode = "attachment-route" + segment = "shared" + share_with = ["*"] + } + + attachment_policies { + rule_number = 1 + + conditions { + type = "any" + } + + action { + association_method = "constant" + segment = "shared" + } + } +} + +variable "rName" { + description = "Name for resource" + type = string + nullable = false +} + +variable "resource_tags" { + description = "Tags to set on resource. To specify no tags, set to `null`" + # Not setting a default, so that this must explicitly be set to `null` to specify no tags + type = map(string) + nullable = true +} + +variable "provider_tags" { + type = map(string) + nullable = true + default = null +} + +variable "ignore_tag_keys" { + type = set(string) + nullable = false +} diff --git a/internal/service/networkmanager/testdata/tmpl/dx_gateway_attachment_tags.gtpl b/internal/service/networkmanager/testdata/tmpl/dx_gateway_attachment_tags.gtpl new file mode 100644 index 000000000000..3187b66d397c --- /dev/null +++ b/internal/service/networkmanager/testdata/tmpl/dx_gateway_attachment_tags.gtpl @@ -0,0 +1,63 @@ +resource "aws_networkmanager_dx_gateway_attachment" "test" { + core_network_id = aws_networkmanager_core_network_policy_attachment.test.core_network_id + direct_connect_gateway_arn = aws_dx_gateway.test.arn + edge_locations = [data.aws_region.current.region] +{{- template "tags" . }} +} + +# testAccDirectConnectGatewayAttachmentConfig_base + +resource "aws_dx_gateway" "test" { + name = var.rName + amazon_side_asn = 65000 +} + +resource "aws_networkmanager_global_network" "test" {} + +resource "aws_networkmanager_core_network" "test" { + global_network_id = aws_networkmanager_global_network.test.id +} + +resource "aws_networkmanager_core_network_policy_attachment" "test" { + core_network_id = aws_networkmanager_core_network.test.id + policy_document = data.aws_networkmanager_core_network_policy_document.test.json +} + +data "aws_region" "current" {} + +data "aws_networkmanager_core_network_policy_document" "test" { + core_network_configuration { + vpn_ecmp_support = false + asn_ranges = ["64512-64555"] + edge_locations { + location = data.aws_region.current.region + asn = 64512 + } + } + + segments { + name = "shared" + description = "SegmentForSharedServices" + require_attachment_acceptance = false + } + + segment_actions { + action = "share" + mode = "attachment-route" + segment = "shared" + share_with = ["*"] + } + + attachment_policies { + rule_number = 1 + + conditions { + type = "any" + } + + action { + association_method = "constant" + segment = "shared" + } + } +} From ef47d642cfa3a20f7de6f3a8dfcb7203617b4e16 Mon Sep 17 00:00:00 2001 From: Graham Davison Date: Tue, 29 Jul 2025 16:37:53 -0700 Subject: [PATCH 057/365] Docs tweak --- docs/resource-tagging.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/resource-tagging.md b/docs/resource-tagging.md index 028932329620..d7b473fe6ad3 100644 --- a/docs/resource-tagging.md +++ b/docs/resource-tagging.md @@ -547,7 +547,7 @@ For example, 3 minutes and 30 seconds is `3m30s`. Some services do not support tags with an empty string value. In that case, use the annotation `@Testing(skipEmptyTags=true)`. -Some services do not support tags with an null string value. +Some services do not support tags with a null string value. In that case, use the annotation `@Testing(skipNullTags=true)`. ##### Tag Update parameters From 0c27c4e7ccd91c306781190ab2561b19dd566d14 Mon Sep 17 00:00:00 2001 From: Graham Davison Date: Tue, 29 Jul 2025 17:19:47 -0700 Subject: [PATCH 058/365] Removes old test function --- .../dx_gateway_attachment_test.go | 75 ------------------- 1 file changed, 75 deletions(-) diff --git a/internal/service/networkmanager/dx_gateway_attachment_test.go b/internal/service/networkmanager/dx_gateway_attachment_test.go index 182edfe68aec..39d1518b46fe 100644 --- a/internal/service/networkmanager/dx_gateway_attachment_test.go +++ b/internal/service/networkmanager/dx_gateway_attachment_test.go @@ -192,52 +192,6 @@ func TestAccNetworkManagerDirectConnectGatewayAttachment_update(t *testing.T) { }) } -func TestAccXXXNetworkManagerDirectConnectGatewayAttachment_tags_old(t *testing.T) { - ctx := acctest.Context(t) - var dxgatewayattachment awstypes.DirectConnectGatewayAttachment - rName := sdkacctest.RandomWithPrefix(acctest.ResourcePrefix) - resourceName := "aws_networkmanager_dx_gateway_attachment.test" - - resource.ParallelTest(t, resource.TestCase{ - PreCheck: func() { acctest.PreCheck(ctx, t) }, - ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), - ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, - CheckDestroy: testAccCheckDirectConnectGatewayAttachmentDestroy(ctx), - Steps: []resource.TestStep{ - { - Config: testAccDirectConnectGatewayAttachmentConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), - Check: resource.ComposeAggregateTestCheckFunc( - testAccCheckDirectConnectGatewayAttachmentExists(ctx, resourceName, &dxgatewayattachment), - resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, "1"), - resource.TestCheckResourceAttr(resourceName, acctest.CtTagsKey1, acctest.CtValue1), - ), - }, - { - ResourceName: resourceName, - ImportState: true, - ImportStateVerify: true, - }, - { - Config: testAccDirectConnectGatewayAttachmentConfig_tags2(rName, acctest.CtKey1, acctest.CtValue1Updated, acctest.CtKey2, acctest.CtValue2), - Check: resource.ComposeAggregateTestCheckFunc( - testAccCheckDirectConnectGatewayAttachmentExists(ctx, resourceName, &dxgatewayattachment), - resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, "2"), - resource.TestCheckResourceAttr(resourceName, acctest.CtTagsKey1, acctest.CtValue1Updated), - resource.TestCheckResourceAttr(resourceName, acctest.CtTagsKey2, acctest.CtValue2), - ), - }, - { - Config: testAccDirectConnectGatewayAttachmentConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), - Check: resource.ComposeAggregateTestCheckFunc( - testAccCheckDirectConnectGatewayAttachmentExists(ctx, resourceName, &dxgatewayattachment), - resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, "1"), - resource.TestCheckResourceAttr(resourceName, acctest.CtTagsKey2, acctest.CtValue2), - ), - }, - }, - }) -} - func TestAccNetworkManagerDirectConnectGatewayAttachment_accepted(t *testing.T) { ctx := acctest.Context(t) var dxgatewayattachment awstypes.DirectConnectGatewayAttachment @@ -489,32 +443,3 @@ resource "aws_networkmanager_dx_gateway_attachment" "test" { } `, edgeLocation1, edgeLocation2)) } - -func testAccDirectConnectGatewayAttachmentConfig_tags1(rName, tagKey1, tagValue1 string) string { - return acctest.ConfigCompose(testAccDirectConnectGatewayAttachmentConfig_base(rName, false), fmt.Sprintf(` -resource "aws_networkmanager_dx_gateway_attachment" "test" { - core_network_id = aws_networkmanager_core_network_policy_attachment.test.core_network_id - direct_connect_gateway_arn = aws_dx_gateway.test.arn - edge_locations = [data.aws_region.current.region] - - tags = { - %[1]q = %[2]q - } -} -`, tagKey1, tagValue1)) -} - -func testAccDirectConnectGatewayAttachmentConfig_tags2(rName, tagKey1, tagValue1, tagKey2, tagValue2 string) string { - return acctest.ConfigCompose(testAccDirectConnectGatewayAttachmentConfig_base(rName, false), fmt.Sprintf(` -resource "aws_networkmanager_dx_gateway_attachment" "test" { - core_network_id = aws_networkmanager_core_network_policy_attachment.test.core_network_id - direct_connect_gateway_arn = aws_dx_gateway.test.arn - edge_locations = [data.aws_region.current.region] - - tags = { - %[1]q = %[2]q - %[3]q = %[4]q - } -} -`, tagKey1, tagValue1, tagKey2, tagValue2)) -} From b08c7c12d4a9af9515181671ec72cd1eaea87010 Mon Sep 17 00:00:00 2001 From: Graham Davison Date: Tue, 29 Jul 2025 17:29:00 -0700 Subject: [PATCH 059/365] `terraform fmt` --- .../TransitGatewayRouteTableAttachment/tags/main_gen.tf | 2 +- .../tagsComputed1/main_gen.tf | 2 +- .../tagsComputed2/main_gen.tf | 2 +- .../tags_defaults/main_gen.tf | 2 +- .../TransitGatewayRouteTableAttachment/tags_ignore/main_gen.tf | 2 +- .../tmpl/transit_gateway_route_table_attachment_tags.gtpl | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/internal/service/networkmanager/testdata/TransitGatewayRouteTableAttachment/tags/main_gen.tf b/internal/service/networkmanager/testdata/TransitGatewayRouteTableAttachment/tags/main_gen.tf index 0b7f80e7b7cf..4e561637f2b9 100644 --- a/internal/service/networkmanager/testdata/TransitGatewayRouteTableAttachment/tags/main_gen.tf +++ b/internal/service/networkmanager/testdata/TransitGatewayRouteTableAttachment/tags/main_gen.tf @@ -24,7 +24,7 @@ resource "aws_networkmanager_transit_gateway_peering" "test" { depends_on = [ aws_ec2_transit_gateway_policy_table.test, aws_networkmanager_core_network_policy_attachment.test, -] + ] } resource "aws_ec2_transit_gateway_route_table" "test" { diff --git a/internal/service/networkmanager/testdata/TransitGatewayRouteTableAttachment/tagsComputed1/main_gen.tf b/internal/service/networkmanager/testdata/TransitGatewayRouteTableAttachment/tagsComputed1/main_gen.tf index 2b45c767ac32..703e66b129ae 100644 --- a/internal/service/networkmanager/testdata/TransitGatewayRouteTableAttachment/tagsComputed1/main_gen.tf +++ b/internal/service/networkmanager/testdata/TransitGatewayRouteTableAttachment/tagsComputed1/main_gen.tf @@ -28,7 +28,7 @@ resource "aws_networkmanager_transit_gateway_peering" "test" { depends_on = [ aws_ec2_transit_gateway_policy_table.test, aws_networkmanager_core_network_policy_attachment.test, -] + ] } resource "aws_ec2_transit_gateway_route_table" "test" { diff --git a/internal/service/networkmanager/testdata/TransitGatewayRouteTableAttachment/tagsComputed2/main_gen.tf b/internal/service/networkmanager/testdata/TransitGatewayRouteTableAttachment/tagsComputed2/main_gen.tf index b6e5dab795e9..a31e8499b418 100644 --- a/internal/service/networkmanager/testdata/TransitGatewayRouteTableAttachment/tagsComputed2/main_gen.tf +++ b/internal/service/networkmanager/testdata/TransitGatewayRouteTableAttachment/tagsComputed2/main_gen.tf @@ -29,7 +29,7 @@ resource "aws_networkmanager_transit_gateway_peering" "test" { depends_on = [ aws_ec2_transit_gateway_policy_table.test, aws_networkmanager_core_network_policy_attachment.test, -] + ] } resource "aws_ec2_transit_gateway_route_table" "test" { diff --git a/internal/service/networkmanager/testdata/TransitGatewayRouteTableAttachment/tags_defaults/main_gen.tf b/internal/service/networkmanager/testdata/TransitGatewayRouteTableAttachment/tags_defaults/main_gen.tf index 6653b6e81a07..b8fdf49cba6a 100644 --- a/internal/service/networkmanager/testdata/TransitGatewayRouteTableAttachment/tags_defaults/main_gen.tf +++ b/internal/service/networkmanager/testdata/TransitGatewayRouteTableAttachment/tags_defaults/main_gen.tf @@ -30,7 +30,7 @@ resource "aws_networkmanager_transit_gateway_peering" "test" { depends_on = [ aws_ec2_transit_gateway_policy_table.test, aws_networkmanager_core_network_policy_attachment.test, -] + ] } resource "aws_ec2_transit_gateway_route_table" "test" { diff --git a/internal/service/networkmanager/testdata/TransitGatewayRouteTableAttachment/tags_ignore/main_gen.tf b/internal/service/networkmanager/testdata/TransitGatewayRouteTableAttachment/tags_ignore/main_gen.tf index 3b72cca7513c..836c2ca6fa2e 100644 --- a/internal/service/networkmanager/testdata/TransitGatewayRouteTableAttachment/tags_ignore/main_gen.tf +++ b/internal/service/networkmanager/testdata/TransitGatewayRouteTableAttachment/tags_ignore/main_gen.tf @@ -33,7 +33,7 @@ resource "aws_networkmanager_transit_gateway_peering" "test" { depends_on = [ aws_ec2_transit_gateway_policy_table.test, aws_networkmanager_core_network_policy_attachment.test, -] + ] } resource "aws_ec2_transit_gateway_route_table" "test" { diff --git a/internal/service/networkmanager/testdata/tmpl/transit_gateway_route_table_attachment_tags.gtpl b/internal/service/networkmanager/testdata/tmpl/transit_gateway_route_table_attachment_tags.gtpl index 0e4739d62f84..c6710d56ce71 100644 --- a/internal/service/networkmanager/testdata/tmpl/transit_gateway_route_table_attachment_tags.gtpl +++ b/internal/service/networkmanager/testdata/tmpl/transit_gateway_route_table_attachment_tags.gtpl @@ -20,7 +20,7 @@ resource "aws_networkmanager_transit_gateway_peering" "test" { depends_on = [ aws_ec2_transit_gateway_policy_table.test, aws_networkmanager_core_network_policy_attachment.test, -] + ] } resource "aws_ec2_transit_gateway_route_table" "test" { From 2408bf57649a006b374ba0e3c8455322afcfcad0 Mon Sep 17 00:00:00 2001 From: Graham Davison Date: Tue, 29 Jul 2025 17:48:43 -0700 Subject: [PATCH 060/365] Updates template --- internal/generate/tagstests/resource_test.go.gtpl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/internal/generate/tagstests/resource_test.go.gtpl b/internal/generate/tagstests/resource_test.go.gtpl index 60d56adab49f..85ed7b5d8d70 100644 --- a/internal/generate/tagstests/resource_test.go.gtpl +++ b/internal/generate/tagstests/resource_test.go.gtpl @@ -8,10 +8,10 @@ resourceName := "{{ .TypeName}}.test"{{ if .Generator }} rName := {{ .Generator }} {{- end }} -{{ range .InitCodeBlocks -}} +{{- range .InitCodeBlocks }} {{ .Code }} {{- end }} -{{- if .UseAlternateAccount -}} +{{- if .UseAlternateAccount }} providers := make(map[string]*schema.Provider) {{ end }} {{ end }} @@ -30,7 +30,7 @@ acctest.{{ if and .Serialize (not .SerializeParallelTests) }}Test{{ else }}Paral {{ define "TestCaseSetupNoProviders" -}} PreCheck: func() { acctest.PreCheck(ctx, t) {{- range .PreChecks }} - {{ .Code }} + {{ .Code }} {{- end -}} }, ErrorCheck: acctest.ErrorCheck(t, names.{{ .PackageProviderNameUpper }}ServiceID), From 2dc5125901b1b1355478a907fb1d682cd4bf45f6 Mon Sep 17 00:00:00 2001 From: Graham Davison Date: Tue, 29 Jul 2025 17:56:09 -0700 Subject: [PATCH 061/365] Removes unused functions --- .../networkmanager/connect_attachment_test.go | 77 ------------------- .../networkmanager/connect_peer_test.go | 37 --------- .../service/networkmanager/connection_test.go | 75 ------------------ .../site_to_site_vpn_attachment_test.go | 37 --------- .../networkmanager/vpc_attachment_test.go | 33 -------- 5 files changed, 259 deletions(-) diff --git a/internal/service/networkmanager/connect_attachment_test.go b/internal/service/networkmanager/connect_attachment_test.go index b84119af1ee8..2b07dce204c5 100644 --- a/internal/service/networkmanager/connect_attachment_test.go +++ b/internal/service/networkmanager/connect_attachment_test.go @@ -375,80 +375,3 @@ resource "aws_networkmanager_attachment_accepter" "test2" { } `) } - -func testAccConnectAttachmentConfig_tags1(rName, tagKey1, tagValue1 string) string { - return acctest.ConfigCompose(testAccConnectAttachmentConfig_base(rName), fmt.Sprintf(` -resource "aws_networkmanager_vpc_attachment" "test" { - subnet_arns = [aws_subnet.test[0].arn] - core_network_id = aws_networkmanager_core_network_policy_attachment.test.core_network_id - vpc_arn = aws_vpc.test.arn - tags = { - segment = "shared" - } -} - -resource "aws_networkmanager_attachment_accepter" "test" { - attachment_id = aws_networkmanager_vpc_attachment.test.id - attachment_type = aws_networkmanager_vpc_attachment.test.attachment_type -} - -resource "aws_networkmanager_connect_attachment" "test" { - core_network_id = aws_networkmanager_core_network.test.id - transport_attachment_id = aws_networkmanager_vpc_attachment.test.id - edge_location = aws_networkmanager_vpc_attachment.test.edge_location - options { - protocol = "GRE" - } - depends_on = [ - "aws_networkmanager_attachment_accepter.test" - ] - tags = { - %[1]q = %[2]q - } -} - -resource "aws_networkmanager_attachment_accepter" "test2" { - attachment_id = aws_networkmanager_connect_attachment.test.id - attachment_type = aws_networkmanager_connect_attachment.test.attachment_type -} -`, tagKey1, tagValue1)) -} - -func testAccConnectAttachmentConfig_tags2(rName, tagKey1, tagValue1, tagKey2, tagValue2 string) string { - return acctest.ConfigCompose(testAccConnectAttachmentConfig_base(rName), fmt.Sprintf(` -resource "aws_networkmanager_vpc_attachment" "test" { - subnet_arns = [aws_subnet.test[0].arn] - core_network_id = aws_networkmanager_core_network_policy_attachment.test.core_network_id - vpc_arn = aws_vpc.test.arn - tags = { - segment = "shared" - } -} - -resource "aws_networkmanager_attachment_accepter" "test" { - attachment_id = aws_networkmanager_vpc_attachment.test.id - attachment_type = aws_networkmanager_vpc_attachment.test.attachment_type -} - -resource "aws_networkmanager_connect_attachment" "test" { - core_network_id = aws_networkmanager_core_network.test.id - transport_attachment_id = aws_networkmanager_vpc_attachment.test.id - edge_location = aws_networkmanager_vpc_attachment.test.edge_location - options { - protocol = "GRE" - } - depends_on = [ - "aws_networkmanager_attachment_accepter.test" - ] - tags = { - %[1]q = %[2]q - %[3]q = %[4]q - } -} - -resource "aws_networkmanager_attachment_accepter" "test2" { - attachment_id = aws_networkmanager_connect_attachment.test.id - attachment_type = aws_networkmanager_connect_attachment.test.attachment_type -} -`, tagKey1, tagValue1, tagKey2, tagValue2)) -} diff --git a/internal/service/networkmanager/connect_peer_test.go b/internal/service/networkmanager/connect_peer_test.go index e5e8cdcd8517..8855d7d1165d 100644 --- a/internal/service/networkmanager/connect_peer_test.go +++ b/internal/service/networkmanager/connect_peer_test.go @@ -364,40 +364,3 @@ resource "aws_subnet" "test2" { } `, rName, peerAddress, asn)) } - -func testAccConnectPeerConfig_tags1(rName, tagKey1, tagValue1 string, insideCidrBlocks string, peerAddress string, asn string, protocol string) string { - return acctest.ConfigCompose(testAccConnectPeerConfig_base(rName, protocol), fmt.Sprintf(` -resource "aws_networkmanager_connect_peer" "test" { - connect_attachment_id = aws_networkmanager_connect_attachment.test.id - peer_address = %[4]q - bgp_options { - peer_asn = %[5]q - } - inside_cidr_blocks = [ - %[3]q - ] - tags = { - %[1]q = %[2]q - } -} -`, tagKey1, tagValue1, insideCidrBlocks, peerAddress, asn)) -} - -func testAccConnectPeerConfig_tags2(rName, tagKey1, tagValue1, tagKey2, tagValue2 string, insideCidrBlocks string, peerAddress string, asn string, protocol string) string { - return acctest.ConfigCompose(testAccConnectPeerConfig_base(rName, protocol), fmt.Sprintf(` -resource "aws_networkmanager_connect_peer" "test" { - connect_attachment_id = aws_networkmanager_connect_attachment.test.id - peer_address = %[6]q - bgp_options { - peer_asn = %[7]q - } - inside_cidr_blocks = [ - %[5]q - ] - tags = { - %[1]q = %[2]q - %[3]q = %[4]q - } -} -`, tagKey1, tagValue1, tagKey2, tagValue2, insideCidrBlocks, peerAddress, asn)) -} diff --git a/internal/service/networkmanager/connection_test.go b/internal/service/networkmanager/connection_test.go index 1579606918db..4e0ae0efca78 100644 --- a/internal/service/networkmanager/connection_test.go +++ b/internal/service/networkmanager/connection_test.go @@ -86,52 +86,6 @@ func testAccConnection_disappears(t *testing.T) { }) } -func testAccConnection_tags(t *testing.T) { - ctx := acctest.Context(t) - resourceName := "aws_networkmanager_connection.test" - rName := sdkacctest.RandomWithPrefix(acctest.ResourcePrefix) - - resource.Test(t, resource.TestCase{ - PreCheck: func() { acctest.PreCheck(ctx, t) }, - ErrorCheck: acctest.ErrorCheck(t, names.NetworkManagerServiceID), - ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, - CheckDestroy: testAccCheckConnectionDestroy(ctx), - Steps: []resource.TestStep{ - { - Config: testAccConnectionConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), - Check: resource.ComposeTestCheckFunc( - testAccCheckConnectionExists(ctx, resourceName), - resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, "1"), - resource.TestCheckResourceAttr(resourceName, acctest.CtTagsKey1, acctest.CtValue1), - ), - }, - { - ResourceName: resourceName, - ImportState: true, - ImportStateIdFunc: acctest.AttrImportStateIdFunc(resourceName, names.AttrARN), - ImportStateVerify: true, - }, - { - Config: testAccConnectionConfig_tags2(rName, acctest.CtKey1, acctest.CtValue1Updated, acctest.CtKey2, acctest.CtValue2), - Check: resource.ComposeTestCheckFunc( - testAccCheckConnectionExists(ctx, resourceName), - resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, "2"), - resource.TestCheckResourceAttr(resourceName, acctest.CtTagsKey1, acctest.CtValue1Updated), - resource.TestCheckResourceAttr(resourceName, acctest.CtTagsKey2, acctest.CtValue2), - ), - }, - { - Config: testAccConnectionConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), - Check: resource.ComposeTestCheckFunc( - testAccCheckConnectionExists(ctx, resourceName), - resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, "1"), - resource.TestCheckResourceAttr(resourceName, acctest.CtTagsKey2, acctest.CtValue2), - ), - }, - }, - }) -} - func testAccConnection_descriptionAndLinks(t *testing.T) { ctx := acctest.Context(t) resourceName := "aws_networkmanager_connection.test" @@ -277,35 +231,6 @@ resource "aws_networkmanager_connection" "test" { `) } -func testAccConnectionConfig_tags1(rName, tagKey1, tagValue1 string) string { - return acctest.ConfigCompose(testAccConnectionBaseConfig(rName), fmt.Sprintf(` -resource "aws_networkmanager_connection" "test" { - global_network_id = aws_networkmanager_global_network.test.id - device_id = aws_networkmanager_device.test1.id - connected_device_id = aws_networkmanager_device.test2.id - - tags = { - %[2]q = %[3]q - } -} -`, rName, tagKey1, tagValue1)) -} - -func testAccConnectionConfig_tags2(rName, tagKey1, tagValue1, tagKey2, tagValue2 string) string { - return acctest.ConfigCompose(testAccConnectionBaseConfig(rName), fmt.Sprintf(` -resource "aws_networkmanager_connection" "test" { - global_network_id = aws_networkmanager_global_network.test.id - device_id = aws_networkmanager_device.test1.id - connected_device_id = aws_networkmanager_device.test2.id - - tags = { - %[2]q = %[3]q - %[4]q = %[5]q - } -} -`, rName, tagKey1, tagValue1, tagKey2, tagValue2)) -} - func testAccConnectionDescriptionAndLinksBaseConfig(rName string) string { return acctest.ConfigCompose(testAccConnectionBaseConfig(rName), fmt.Sprintf(` resource "aws_networkmanager_link" "test1" { diff --git a/internal/service/networkmanager/site_to_site_vpn_attachment_test.go b/internal/service/networkmanager/site_to_site_vpn_attachment_test.go index 18c3256df12e..3d693201ee06 100644 --- a/internal/service/networkmanager/site_to_site_vpn_attachment_test.go +++ b/internal/service/networkmanager/site_to_site_vpn_attachment_test.go @@ -246,40 +246,3 @@ resource "aws_networkmanager_attachment_accepter" "test" { } `) } - -func testAccSiteToSiteVPNAttachmentConfig_tags1(rName, vpnIP, tagKey1, tagValue1 string, bgpASN int) string { - return acctest.ConfigCompose(testAccSiteToSiteVPNAttachmentConfig_base(rName, bgpASN, vpnIP), fmt.Sprintf(` -resource "aws_networkmanager_site_to_site_vpn_attachment" "test" { - core_network_id = aws_networkmanager_core_network_policy_attachment.test.core_network_id - vpn_connection_arn = aws_vpn_connection.test.arn - - tags = { - %[1]q = %[2]q - } -} - -resource "aws_networkmanager_attachment_accepter" "test" { - attachment_id = aws_networkmanager_site_to_site_vpn_attachment.test.id - attachment_type = aws_networkmanager_site_to_site_vpn_attachment.test.attachment_type -} -`, tagKey1, tagValue1)) -} - -func testAccSiteToSiteVPNAttachmentConfig_tags2(rName, vpnIP, tagKey1, tagValue1, tagKey2, tagValue2 string, bgpASN int) string { - return acctest.ConfigCompose(testAccSiteToSiteVPNAttachmentConfig_base(rName, bgpASN, vpnIP), fmt.Sprintf(` -resource "aws_networkmanager_site_to_site_vpn_attachment" "test" { - core_network_id = aws_networkmanager_core_network_policy_attachment.test.core_network_id - vpn_connection_arn = aws_vpn_connection.test.arn - - tags = { - %[1]q = %[2]q - %[3]q = %[4]q - } -} - -resource "aws_networkmanager_attachment_accepter" "test" { - attachment_id = aws_networkmanager_site_to_site_vpn_attachment.test.id - attachment_type = aws_networkmanager_site_to_site_vpn_attachment.test.attachment_type -} -`, tagKey1, tagValue1, tagKey2, tagValue2)) -} diff --git a/internal/service/networkmanager/vpc_attachment_test.go b/internal/service/networkmanager/vpc_attachment_test.go index 3e8afc046c87..825880529321 100644 --- a/internal/service/networkmanager/vpc_attachment_test.go +++ b/internal/service/networkmanager/vpc_attachment_test.go @@ -557,39 +557,6 @@ resource "aws_networkmanager_attachment_accepter" "test" { `) } -func testAccVPCAttachmentConfig_tags1(rName, tagKey1, tagValue1 string) string { - return acctest.ConfigCompose( - testAccVPCAttachmentConfig_base(rName, false), - fmt.Sprintf(` -resource "aws_networkmanager_vpc_attachment" "test" { - subnet_arns = [aws_subnet.test[0].arn] - core_network_id = aws_networkmanager_core_network_policy_attachment.test.core_network_id - vpc_arn = aws_vpc.test.arn - - tags = { - %[1]q = %[2]q - } -} -`, tagKey1, tagValue1)) -} - -func testAccVPCAttachmentConfig_tags2(rName, tagKey1, tagValue1, tagKey2, tagValue2 string) string { - return acctest.ConfigCompose( - testAccVPCAttachmentConfig_base(rName, false), - fmt.Sprintf(` -resource "aws_networkmanager_vpc_attachment" "test" { - subnet_arns = [aws_subnet.test[0].arn] - core_network_id = aws_networkmanager_core_network_policy_attachment.test.core_network_id - vpc_arn = aws_vpc.test.arn - - tags = { - %[1]q = %[2]q - %[3]q = %[4]q - } -} -`, tagKey1, tagValue1, tagKey2, tagValue2)) -} - func testAccVPCAttachmentConfig_updates(rName string, requireAcceptance bool, nSubnets int, applianceModeSupport, ipv6Support bool) string { return acctest.ConfigCompose( testAccVPCAttachmentConfig_base(rName, requireAcceptance), From 599fa07ff7ae5228829db4cfb56c0edb786390be Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 30 Jul 2025 06:35:29 +0000 Subject: [PATCH 062/365] Bump the aws-sdk-go-v2 group across 1 directory with 9 updates Bumps the aws-sdk-go-v2 group with 7 updates in the / directory: | Package | From | To | | --- | --- | --- | | [github.com/aws/aws-sdk-go-v2/config](https://github.com/aws/aws-sdk-go-v2) | `1.30.0` | `1.30.1` | | [github.com/aws/aws-sdk-go-v2/feature/s3/manager](https://github.com/aws/aws-sdk-go-v2) | `1.18.0` | `1.18.1` | | [github.com/aws/aws-sdk-go-v2/service/batch](https://github.com/aws/aws-sdk-go-v2) | `1.54.0` | `1.55.0` | | [github.com/aws/aws-sdk-go-v2/service/cleanrooms](https://github.com/aws/aws-sdk-go-v2) | `1.26.0` | `1.27.0` | | [github.com/aws/aws-sdk-go-v2/service/kafkaconnect](https://github.com/aws/aws-sdk-go-v2) | `1.24.0` | `1.24.1` | | [github.com/aws/aws-sdk-go-v2/service/location](https://github.com/aws/aws-sdk-go-v2) | `1.45.0` | `1.46.0` | | [github.com/aws/aws-sdk-go-v2/service/opensearchserverless](https://github.com/aws/aws-sdk-go-v2) | `1.20.0` | `1.21.0` | Updates `github.com/aws/aws-sdk-go-v2/config` from 1.30.0 to 1.30.1 - [Release notes](https://github.com/aws/aws-sdk-go-v2/releases) - [Changelog](https://github.com/aws/aws-sdk-go-v2/blob/main/changelog-template.json) - [Commits](https://github.com/aws/aws-sdk-go-v2/compare/v1.30.0...v1.30.1) Updates `github.com/aws/aws-sdk-go-v2/credentials` from 1.18.0 to 1.18.1 - [Release notes](https://github.com/aws/aws-sdk-go-v2/releases) - [Changelog](https://github.com/aws/aws-sdk-go-v2/blob/v1.18.1/CHANGELOG.md) - [Commits](https://github.com/aws/aws-sdk-go-v2/compare/v1.18.0...v1.18.1) Updates `github.com/aws/aws-sdk-go-v2/feature/ec2/imds` from 1.17.0 to 1.18.0 - [Release notes](https://github.com/aws/aws-sdk-go-v2/releases) - [Changelog](https://github.com/aws/aws-sdk-go-v2/blob/v1.18.0/CHANGELOG.md) - [Commits](https://github.com/aws/aws-sdk-go-v2/compare/v1.17.0...v1.18.0) Updates `github.com/aws/aws-sdk-go-v2/feature/s3/manager` from 1.18.0 to 1.18.1 - [Release notes](https://github.com/aws/aws-sdk-go-v2/releases) - [Changelog](https://github.com/aws/aws-sdk-go-v2/blob/v1.18.1/CHANGELOG.md) - [Commits](https://github.com/aws/aws-sdk-go-v2/compare/v1.18.0...v1.18.1) Updates `github.com/aws/aws-sdk-go-v2/service/batch` from 1.54.0 to 1.55.0 - [Release notes](https://github.com/aws/aws-sdk-go-v2/releases) - [Changelog](https://github.com/aws/aws-sdk-go-v2/blob/main/changelog-template.json) - [Commits](https://github.com/aws/aws-sdk-go-v2/compare/service/s3/v1.54.0...service/s3/v1.55.0) Updates `github.com/aws/aws-sdk-go-v2/service/cleanrooms` from 1.26.0 to 1.27.0 - [Release notes](https://github.com/aws/aws-sdk-go-v2/releases) - [Changelog](https://github.com/aws/aws-sdk-go-v2/blob/main/changelog-template.json) - [Commits](https://github.com/aws/aws-sdk-go-v2/compare/v1.26.0...v1.27.0) Updates `github.com/aws/aws-sdk-go-v2/service/kafkaconnect` from 1.24.0 to 1.24.1 - [Release notes](https://github.com/aws/aws-sdk-go-v2/releases) - [Changelog](https://github.com/aws/aws-sdk-go-v2/blob/main/changelog-template.json) - [Commits](https://github.com/aws/aws-sdk-go-v2/compare/v1.24.0...v1.24.1) Updates `github.com/aws/aws-sdk-go-v2/service/location` from 1.45.0 to 1.46.0 - [Release notes](https://github.com/aws/aws-sdk-go-v2/releases) - [Changelog](https://github.com/aws/aws-sdk-go-v2/blob/main/changelog-template.json) - [Commits](https://github.com/aws/aws-sdk-go-v2/compare/service/s3/v1.45.0...service/s3/v1.46.0) Updates `github.com/aws/aws-sdk-go-v2/service/opensearchserverless` from 1.20.0 to 1.21.0 - [Release notes](https://github.com/aws/aws-sdk-go-v2/releases) - [Changelog](https://github.com/aws/aws-sdk-go-v2/blob/main/changelog-template.json) - [Commits](https://github.com/aws/aws-sdk-go-v2/compare/v1.20.0...v1.21.0) --- updated-dependencies: - dependency-name: github.com/aws/aws-sdk-go-v2/config dependency-version: 1.30.1 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: aws-sdk-go-v2 - dependency-name: github.com/aws/aws-sdk-go-v2/credentials dependency-version: 1.18.1 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: aws-sdk-go-v2 - dependency-name: github.com/aws/aws-sdk-go-v2/feature/ec2/imds dependency-version: 1.18.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: aws-sdk-go-v2 - dependency-name: github.com/aws/aws-sdk-go-v2/feature/s3/manager dependency-version: 1.18.1 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: aws-sdk-go-v2 - dependency-name: github.com/aws/aws-sdk-go-v2/service/batch dependency-version: 1.55.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: aws-sdk-go-v2 - dependency-name: github.com/aws/aws-sdk-go-v2/service/cleanrooms dependency-version: 1.27.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: aws-sdk-go-v2 - dependency-name: github.com/aws/aws-sdk-go-v2/service/kafkaconnect dependency-version: 1.24.1 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: aws-sdk-go-v2 - dependency-name: github.com/aws/aws-sdk-go-v2/service/location dependency-version: 1.46.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: aws-sdk-go-v2 - dependency-name: github.com/aws/aws-sdk-go-v2/service/opensearchserverless dependency-version: 1.21.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: aws-sdk-go-v2 ... Signed-off-by: dependabot[bot] --- go.mod | 18 +++++++++--------- go.sum | 36 ++++++++++++++++++------------------ 2 files changed, 27 insertions(+), 27 deletions(-) diff --git a/go.mod b/go.mod index 5a22e5460d89..4909193d5080 100644 --- a/go.mod +++ b/go.mod @@ -12,10 +12,10 @@ require ( github.com/YakDriver/regexache v0.24.0 github.com/YakDriver/smarterr v0.6.0 github.com/aws/aws-sdk-go-v2 v1.37.0 - github.com/aws/aws-sdk-go-v2/config v1.30.0 - github.com/aws/aws-sdk-go-v2/credentials v1.18.0 - github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.17.0 - github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.18.0 + github.com/aws/aws-sdk-go-v2/config v1.30.1 + github.com/aws/aws-sdk-go-v2/credentials v1.18.1 + github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.18.0 + github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.18.1 github.com/aws/aws-sdk-go-v2/service/accessanalyzer v1.41.0 github.com/aws/aws-sdk-go-v2/service/account v1.25.0 github.com/aws/aws-sdk-go-v2/service/acm v1.34.0 @@ -40,7 +40,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/autoscaling v1.55.0 github.com/aws/aws-sdk-go-v2/service/autoscalingplans v1.26.0 github.com/aws/aws-sdk-go-v2/service/backup v1.44.0 - github.com/aws/aws-sdk-go-v2/service/batch v1.54.0 + github.com/aws/aws-sdk-go-v2/service/batch v1.55.0 github.com/aws/aws-sdk-go-v2/service/bcmdataexports v1.9.0 github.com/aws/aws-sdk-go-v2/service/bedrock v1.40.0 github.com/aws/aws-sdk-go-v2/service/bedrockagent v1.46.0 @@ -50,7 +50,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/chime v1.37.0 github.com/aws/aws-sdk-go-v2/service/chimesdkmediapipelines v1.23.0 github.com/aws/aws-sdk-go-v2/service/chimesdkvoice v1.23.0 - github.com/aws/aws-sdk-go-v2/service/cleanrooms v1.26.0 + github.com/aws/aws-sdk-go-v2/service/cleanrooms v1.27.0 github.com/aws/aws-sdk-go-v2/service/cloud9 v1.30.0 github.com/aws/aws-sdk-go-v2/service/cloudcontrol v1.25.0 github.com/aws/aws-sdk-go-v2/service/cloudformation v1.62.0 @@ -145,7 +145,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/ivs v1.44.0 github.com/aws/aws-sdk-go-v2/service/ivschat v1.18.0 github.com/aws/aws-sdk-go-v2/service/kafka v1.40.0 - github.com/aws/aws-sdk-go-v2/service/kafkaconnect v1.24.0 + github.com/aws/aws-sdk-go-v2/service/kafkaconnect v1.24.1 github.com/aws/aws-sdk-go-v2/service/kendra v1.57.0 github.com/aws/aws-sdk-go-v2/service/keyspaces v1.20.0 github.com/aws/aws-sdk-go-v2/service/kinesis v1.36.0 @@ -160,7 +160,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/lexmodelsv2 v1.53.0 github.com/aws/aws-sdk-go-v2/service/licensemanager v1.33.0 github.com/aws/aws-sdk-go-v2/service/lightsail v1.44.0 - github.com/aws/aws-sdk-go-v2/service/location v1.45.0 + github.com/aws/aws-sdk-go-v2/service/location v1.46.0 github.com/aws/aws-sdk-go-v2/service/lookoutmetrics v1.33.0 github.com/aws/aws-sdk-go-v2/service/m2 v1.22.0 github.com/aws/aws-sdk-go-v2/service/macie2 v1.46.0 @@ -184,7 +184,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/notificationscontacts v1.2.0 github.com/aws/aws-sdk-go-v2/service/oam v1.19.0 github.com/aws/aws-sdk-go-v2/service/opensearch v1.48.0 - github.com/aws/aws-sdk-go-v2/service/opensearchserverless v1.20.0 + github.com/aws/aws-sdk-go-v2/service/opensearchserverless v1.21.0 github.com/aws/aws-sdk-go-v2/service/organizations v1.40.0 github.com/aws/aws-sdk-go-v2/service/osis v1.16.0 github.com/aws/aws-sdk-go-v2/service/outposts v1.53.0 diff --git a/go.sum b/go.sum index cf7cafddba47..2075f4e06942 100644 --- a/go.sum +++ b/go.sum @@ -27,14 +27,14 @@ github.com/aws/aws-sdk-go-v2 v1.37.0 h1:YtCOESR/pN4j5oA7cVHSfOwIcuh/KwHC4DOSXFbv github.com/aws/aws-sdk-go-v2 v1.37.0/go.mod h1:9Q0OoGQoboYIAJyslFyF1f5K1Ryddop8gqMhWx/n4Wg= github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.7.0 h1:6GMWV6CNpA/6fbFHnoAjrv4+LGfyTqZz2LtCHnspgDg= github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.7.0/go.mod h1:/mXlTIVG9jbxkqDnr5UQNQxW1HRYxeGklkM9vAFeabg= -github.com/aws/aws-sdk-go-v2/config v1.30.0 h1:XhzXYU2x/T441/0CBh0g6UUC/OFGk+FRpl3ThI8AqM8= -github.com/aws/aws-sdk-go-v2/config v1.30.0/go.mod h1:4j78A2ko2xc7SMLjjSUrgpp42vyneH9c8j3emf/CLTo= -github.com/aws/aws-sdk-go-v2/credentials v1.18.0 h1:r9W/BX4B1dEbsd2NogyuFXmEfYhdUULUVEOh0SDAovw= -github.com/aws/aws-sdk-go-v2/credentials v1.18.0/go.mod h1:SMtUJQRWEpyfC+ouDJNYdI7NNMqUjHM/Oaf0FV+vWNs= -github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.17.0 h1:ouCRc4lCriJtCnrIN4Kw2tA/uETRZBrxwb/607gRvkE= -github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.17.0/go.mod h1:LW9/PxQD1SYFC7pnWcgqPhoyZprhjEdg5hBK6qYPLW8= -github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.18.0 h1:HO5e3z3ZHgx/xRRSx1p1tcUFkSypl0l/tD4Xv7kIblk= -github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.18.0/go.mod h1:Qd4tjrpAdVf6n0OX3rolbOzFFpMGYpS148RLsiFqG44= +github.com/aws/aws-sdk-go-v2/config v1.30.1 h1:sHL8g/+9tcZATeV2tEkEfxZeaNokDtKsSjGMGHD49qA= +github.com/aws/aws-sdk-go-v2/config v1.30.1/go.mod h1:wkibEyFfxXRyTSzRU4bbF5IUsSXyE4xQ4ZjkGmi5tFo= +github.com/aws/aws-sdk-go-v2/credentials v1.18.1 h1:E55xvOqlX7CvB66Z7rSM9usCrFU1ryUIUHqiXsEzVoE= +github.com/aws/aws-sdk-go-v2/credentials v1.18.1/go.mod h1:iobSQfR5MkvILxssGOvi/P1jjOhrRzfTiCPCzku0vx4= +github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.18.0 h1:9sBTeKQwAvmJUWKIACIoiFSnxxl+sS++YDfr17/ngq0= +github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.18.0/go.mod h1:LW9/PxQD1SYFC7pnWcgqPhoyZprhjEdg5hBK6qYPLW8= +github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.18.1 h1:aAjA/1JZ1xH/F9XvxJu9cXZyp7BqVXtHpztyZ6p799E= +github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.18.1/go.mod h1:ia9HASsPba/7o84sp6iE4wZPdNTJ0oicBe5sWQQk+Ys= github.com/aws/aws-sdk-go-v2/internal/configsources v1.4.0 h1:H2iZoqW/v2Jnrh1FnU725Bq6KJ0k2uP63yH+DcY+HUI= github.com/aws/aws-sdk-go-v2/internal/configsources v1.4.0/go.mod h1:L0FqLbwMXHvNC/7crWV1iIxUlOKYZUE8KuTIA+TozAI= github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.7.0 h1:EDped/rNzAhFPhVY0sDGbtD16OKqksfA8OjF/kLEgw8= @@ -91,8 +91,8 @@ github.com/aws/aws-sdk-go-v2/service/autoscalingplans v1.26.0 h1:8f+Jq2BKy4U6/YU github.com/aws/aws-sdk-go-v2/service/autoscalingplans v1.26.0/go.mod h1:XwZCGipecw+2zfgN4d5d9OwbUcVy3UjctRQIdy5UukU= github.com/aws/aws-sdk-go-v2/service/backup v1.44.0 h1:eR1xS3evF+4XG1O1XuM3sN0E8CqI5PQ/NXm+13Rl+Kc= github.com/aws/aws-sdk-go-v2/service/backup v1.44.0/go.mod h1:li1OG6R/Y7AAyrZx2aTUDqpz0LSs/WN51sKzHfkHP/c= -github.com/aws/aws-sdk-go-v2/service/batch v1.54.0 h1:J2mxc6NuIb18XPzciHQv8GfjdI3HBESpHAYMrkpbNRM= -github.com/aws/aws-sdk-go-v2/service/batch v1.54.0/go.mod h1:AVlcYXRLx8dajiWttkFlo4a+4VpXB/NP1xzzvG0Cq4U= +github.com/aws/aws-sdk-go-v2/service/batch v1.55.0 h1:LqqKzoCkvgSjtYRcS2AAPrATnE9fevXOhW3KOcn4yC8= +github.com/aws/aws-sdk-go-v2/service/batch v1.55.0/go.mod h1:AVlcYXRLx8dajiWttkFlo4a+4VpXB/NP1xzzvG0Cq4U= github.com/aws/aws-sdk-go-v2/service/bcmdataexports v1.9.0 h1:WrmyKlmtyGRIyvl3ryZ4XESbYWz3Gxo2gMvasHFbQnk= github.com/aws/aws-sdk-go-v2/service/bcmdataexports v1.9.0/go.mod h1:W57YXu7pe8M/G86RzC/19XX/NkLiRpiz6zoOV0CikPQ= github.com/aws/aws-sdk-go-v2/service/bedrock v1.40.0 h1:zm35sSNjMd91vO+8W7vh2bch6sxUHiAjEEPaH8NM04o= @@ -111,8 +111,8 @@ github.com/aws/aws-sdk-go-v2/service/chimesdkmediapipelines v1.23.0 h1:aV6AaIsh/ github.com/aws/aws-sdk-go-v2/service/chimesdkmediapipelines v1.23.0/go.mod h1:MUB0qeP6ME79LFT+KPiXcE0o+LqWYqZHpJ74bG4ygKY= github.com/aws/aws-sdk-go-v2/service/chimesdkvoice v1.23.0 h1:sk2DOvXZaWw3iEie/25IFSBfuc+F6n3CCpCaDflF9as= github.com/aws/aws-sdk-go-v2/service/chimesdkvoice v1.23.0/go.mod h1:yoYLnDYicrfC0SVr5RvH7GqrW9nyugiE7nM+H4jFZjI= -github.com/aws/aws-sdk-go-v2/service/cleanrooms v1.26.0 h1:83OW95W8RAtW/lbjtkgc2XE2zeo5OVJ8juorWRF8oD4= -github.com/aws/aws-sdk-go-v2/service/cleanrooms v1.26.0/go.mod h1:s82icmZVWAQFn9O1BntEk0RPrRpNG5vOgnINmhln75U= +github.com/aws/aws-sdk-go-v2/service/cleanrooms v1.27.0 h1:/Ol+xQqxsa04P/UndSDV+9mok8hCFS/TwCA8mJ5RXlg= +github.com/aws/aws-sdk-go-v2/service/cleanrooms v1.27.0/go.mod h1:s82icmZVWAQFn9O1BntEk0RPrRpNG5vOgnINmhln75U= github.com/aws/aws-sdk-go-v2/service/cloud9 v1.30.0 h1:xpm/LVtcoKf6C4WsoUSAL/3ZP2yoNuX7OxsYH9Rzf7I= github.com/aws/aws-sdk-go-v2/service/cloud9 v1.30.0/go.mod h1:piezSyRAA+8oR+aWY0gLEpGnC5nK9nzbab3oRNNaiMo= github.com/aws/aws-sdk-go-v2/service/cloudcontrol v1.25.0 h1:SfG2oQvAdhkOY+p71HaiITdhyblG4/iIHt5rACaPe4Q= @@ -311,8 +311,8 @@ github.com/aws/aws-sdk-go-v2/service/ivschat v1.18.0 h1:3XxrR8OfsdZ5CdO0k03FmaBw github.com/aws/aws-sdk-go-v2/service/ivschat v1.18.0/go.mod h1:zOkF5itZ8V3WWS1uiTUeUUj0rDHiPb9cZ12wk2c3iy8= github.com/aws/aws-sdk-go-v2/service/kafka v1.40.0 h1:1f2ySd9pIOWeLLrzQGnhsdepjxvQxgiYbHvrLdaxQNs= github.com/aws/aws-sdk-go-v2/service/kafka v1.40.0/go.mod h1:9OLdh3Yy2JDSG/EbsdtHP6ELe0ih4RY2ikxtHR1dRIo= -github.com/aws/aws-sdk-go-v2/service/kafkaconnect v1.24.0 h1:CUYXu3HxI2C2L6CNbfWmwJ20wonqNj6eMnxLYBH0CeI= -github.com/aws/aws-sdk-go-v2/service/kafkaconnect v1.24.0/go.mod h1:Kd/iJbmERvnoOg3tn18bzYTOCmv6QdDvqfFdKlhvtL0= +github.com/aws/aws-sdk-go-v2/service/kafkaconnect v1.24.1 h1:KDSWQ5w3ZZbTnlLskITkra2+VpsgFIT06C6rJlhD23g= +github.com/aws/aws-sdk-go-v2/service/kafkaconnect v1.24.1/go.mod h1:Kd/iJbmERvnoOg3tn18bzYTOCmv6QdDvqfFdKlhvtL0= github.com/aws/aws-sdk-go-v2/service/kendra v1.57.0 h1:wKkwENAJaas/1VedOvykeI7BRznuv0p1wVRuPViG3vA= github.com/aws/aws-sdk-go-v2/service/kendra v1.57.0/go.mod h1:/lEH8vb3Pz/xgrXK0O9ceuI/9xV7rL2yiqMC/OS5O3M= github.com/aws/aws-sdk-go-v2/service/keyspaces v1.20.0 h1:Z4wix2oghV2o2QqXxRXSQ1waHsufddDlhu+UBFpU/1Y= @@ -341,8 +341,8 @@ github.com/aws/aws-sdk-go-v2/service/licensemanager v1.33.0 h1:gREPvB66jMT+3XlrX github.com/aws/aws-sdk-go-v2/service/licensemanager v1.33.0/go.mod h1:rkcCcDstRuanMv+H+LCjhItIifSUqfqjZHpqVA5YPts= github.com/aws/aws-sdk-go-v2/service/lightsail v1.44.0 h1:QiiCqpKy0prxq+92uWfESzcb7/8Y9JAamcMOzVYLEoM= github.com/aws/aws-sdk-go-v2/service/lightsail v1.44.0/go.mod h1:ESppxYqXQCpCY+KWl3BdkQjmsQX6zxKP39SnDtRDoU0= -github.com/aws/aws-sdk-go-v2/service/location v1.45.0 h1:KSyIeePlZ1H7AtQ3vTbLbAFHSCm/AXEP3RsA7kvwbUo= -github.com/aws/aws-sdk-go-v2/service/location v1.45.0/go.mod h1:hUD8+2JnMcdB0qnmW5J2zv9IgyDFpHM4L9yPf8NC77g= +github.com/aws/aws-sdk-go-v2/service/location v1.46.0 h1:5eCyFVJG18Cvz6sf3dJk39hT2kgaIzxXgiDPMn+oG/o= +github.com/aws/aws-sdk-go-v2/service/location v1.46.0/go.mod h1:hUD8+2JnMcdB0qnmW5J2zv9IgyDFpHM4L9yPf8NC77g= github.com/aws/aws-sdk-go-v2/service/lookoutmetrics v1.33.0 h1:SrvtIfGyaw22vdKKPNwGsi0Bf0NFA7fcgsmnEz2qvZ8= github.com/aws/aws-sdk-go-v2/service/lookoutmetrics v1.33.0/go.mod h1:ioFUk+nxNNFp8depbsQ95XloZUpB5cUFA2WL6xW1j4Q= github.com/aws/aws-sdk-go-v2/service/m2 v1.22.0 h1:jKXnubb6qCeGzzwH8zpFaQtrTz+qBWc/I+XMMoeXI+Q= @@ -389,8 +389,8 @@ github.com/aws/aws-sdk-go-v2/service/oam v1.19.0 h1:o2jAN4Wz8EhuLqUg2h/MBfHuHLnP github.com/aws/aws-sdk-go-v2/service/oam v1.19.0/go.mod h1:9CnYbu+5xGd4rGd6cvVUahUt5etzVdbbsUh77cH6mvo= github.com/aws/aws-sdk-go-v2/service/opensearch v1.48.0 h1:griVlvvPb8QVZe55WvJKAV57vUGCsGi3Hb5o7I8+acc= github.com/aws/aws-sdk-go-v2/service/opensearch v1.48.0/go.mod h1:4O9QlGDun+ECvbtP0tQRju9wXtkkkn/RRFgGF+zCpsk= -github.com/aws/aws-sdk-go-v2/service/opensearchserverless v1.20.0 h1:m0b52DcjZbVTeXULUsH+Hd+4rXUmzsYenlR5G/6MdYU= -github.com/aws/aws-sdk-go-v2/service/opensearchserverless v1.20.0/go.mod h1:DileQAdc6UOTibuO6Mfl22ExuSlcDDepc/GvkBICdAU= +github.com/aws/aws-sdk-go-v2/service/opensearchserverless v1.21.0 h1:yOdIEG9495oDc2XK1r3B0ciuCeqtPkS7Dd5Eo6SE0hY= +github.com/aws/aws-sdk-go-v2/service/opensearchserverless v1.21.0/go.mod h1:DileQAdc6UOTibuO6Mfl22ExuSlcDDepc/GvkBICdAU= github.com/aws/aws-sdk-go-v2/service/organizations v1.40.0 h1:ysKuFyimEHWXAfX2l31Q/PS0buawt34cDpYXwP9li0Y= github.com/aws/aws-sdk-go-v2/service/organizations v1.40.0/go.mod h1:KDibugj/L26ge1bmaoQ2y3veY0yHUis12wLymmIuWJQ= github.com/aws/aws-sdk-go-v2/service/osis v1.16.0 h1:ABr6yZO+57vNlkEFxwNyJTltD1LJBKlE+E642JhmCnc= From c4ffb4a3d02746ccf2b351535382af2fb694f618 Mon Sep 17 00:00:00 2001 From: breathingdust <282361+breathingdust@users.noreply.github.com> Date: Wed, 30 Jul 2025 09:09:09 +0000 Subject: [PATCH 063/365] docs: update resource counts --- website/docs/index.html.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/docs/index.html.markdown b/website/docs/index.html.markdown index 718d802e1999..a4d0e19b382b 100644 --- a/website/docs/index.html.markdown +++ b/website/docs/index.html.markdown @@ -11,7 +11,7 @@ Use the Amazon Web Services (AWS) provider to interact with the many resources supported by AWS. You must configure the provider with the proper credentials before you can use it. -Use the navigation to the left to read about the available resources. There are currently 1509 resources and 608 data sources available in the provider. +Use the navigation to the left to read about the available resources. There are currently 1514 resources and 609 data sources available in the provider. To learn the basics of Terraform using this provider, follow the hands-on [get started tutorials](https://developer.hashicorp.com/terraform/tutorials/aws-get-started/infrastructure-as-code?in=terraform/aws-get-started&utm_source=WEBSITE&utm_medium=WEB_IO&utm_offer=ARTICLE_PAGE&utm_content=DOCS). Interact with AWS services, From 74f7b26e87af005569b88b924b06889f281e2e0f Mon Sep 17 00:00:00 2001 From: changelogbot Date: Wed, 30 Jul 2025 13:15:00 +0000 Subject: [PATCH 064/365] Update CHANGELOG.md for #43602 --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index b3f556da4dea..a8dbcda05635 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,9 +6,11 @@ FEATURES: ENHANCEMENTS: +* data-source/aws_codebuild_fleet: Add `instance_type` attribute in `compute_configuration` block ([#43449](https://github.com/hashicorp/terraform-provider-aws/issues/43449)) * data-source/aws_ebs_volume: Add `volume_initialization_rate` attribute ([#43565](https://github.com/hashicorp/terraform-provider-aws/issues/43565)) * data-source/aws_ecs_service: Support `load_balancer` attribute ([#43582](https://github.com/hashicorp/terraform-provider-aws/issues/43582)) * resource/aws_athena_workgroup: Add `configuration.identity_center_configuration` argument ([#38717](https://github.com/hashicorp/terraform-provider-aws/issues/38717)) +* resource/aws_codebuild_fleet: Add `instance_type` argument in `compute_configuration` block to support custom instance types ([#43449](https://github.com/hashicorp/terraform-provider-aws/issues/43449)) * resource/aws_ebs_volume: Add `volume_initialization_rate` argument ([#43565](https://github.com/hashicorp/terraform-provider-aws/issues/43565)) BUG FIXES: From 046bb7f20023c735c9909b599f1945f84094231e Mon Sep 17 00:00:00 2001 From: Jared Baker Date: Wed, 30 Jul 2025 09:35:52 -0400 Subject: [PATCH 065/365] chore: make clean-tidy --- tools/tfsdk2fw/go.mod | 18 +++++++++--------- tools/tfsdk2fw/go.sum | 36 ++++++++++++++++++------------------ 2 files changed, 27 insertions(+), 27 deletions(-) diff --git a/tools/tfsdk2fw/go.mod b/tools/tfsdk2fw/go.mod index 11c808146446..4ec678f04e4f 100644 --- a/tools/tfsdk2fw/go.mod +++ b/tools/tfsdk2fw/go.mod @@ -20,10 +20,10 @@ require ( github.com/armon/go-radix v1.0.0 // indirect github.com/aws/aws-sdk-go-v2 v1.37.0 // indirect github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.7.0 // indirect - github.com/aws/aws-sdk-go-v2/config v1.30.0 // indirect - github.com/aws/aws-sdk-go-v2/credentials v1.18.0 // indirect - github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.17.0 // indirect - github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.18.0 // indirect + github.com/aws/aws-sdk-go-v2/config v1.30.1 // indirect + github.com/aws/aws-sdk-go-v2/credentials v1.18.1 // indirect + github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.18.0 // indirect + github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.18.1 // indirect github.com/aws/aws-sdk-go-v2/internal/configsources v1.4.0 // indirect github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.7.0 // indirect github.com/aws/aws-sdk-go-v2/internal/ini v1.8.3 // indirect @@ -52,7 +52,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/autoscaling v1.55.0 // indirect github.com/aws/aws-sdk-go-v2/service/autoscalingplans v1.26.0 // indirect github.com/aws/aws-sdk-go-v2/service/backup v1.44.0 // indirect - github.com/aws/aws-sdk-go-v2/service/batch v1.54.0 // indirect + github.com/aws/aws-sdk-go-v2/service/batch v1.55.0 // indirect github.com/aws/aws-sdk-go-v2/service/bcmdataexports v1.9.0 // indirect github.com/aws/aws-sdk-go-v2/service/bedrock v1.40.0 // indirect github.com/aws/aws-sdk-go-v2/service/bedrockagent v1.46.0 // indirect @@ -62,7 +62,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/chime v1.37.0 // indirect github.com/aws/aws-sdk-go-v2/service/chimesdkmediapipelines v1.23.0 // indirect github.com/aws/aws-sdk-go-v2/service/chimesdkvoice v1.23.0 // indirect - github.com/aws/aws-sdk-go-v2/service/cleanrooms v1.26.0 // indirect + github.com/aws/aws-sdk-go-v2/service/cleanrooms v1.27.0 // indirect github.com/aws/aws-sdk-go-v2/service/cloud9 v1.30.0 // indirect github.com/aws/aws-sdk-go-v2/service/cloudcontrol v1.25.0 // indirect github.com/aws/aws-sdk-go-v2/service/cloudformation v1.62.0 // indirect @@ -162,7 +162,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/ivs v1.44.0 // indirect github.com/aws/aws-sdk-go-v2/service/ivschat v1.18.0 // indirect github.com/aws/aws-sdk-go-v2/service/kafka v1.40.0 // indirect - github.com/aws/aws-sdk-go-v2/service/kafkaconnect v1.24.0 // indirect + github.com/aws/aws-sdk-go-v2/service/kafkaconnect v1.24.1 // indirect github.com/aws/aws-sdk-go-v2/service/kendra v1.57.0 // indirect github.com/aws/aws-sdk-go-v2/service/keyspaces v1.20.0 // indirect github.com/aws/aws-sdk-go-v2/service/kinesis v1.36.0 // indirect @@ -177,7 +177,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/lexmodelsv2 v1.53.0 // indirect github.com/aws/aws-sdk-go-v2/service/licensemanager v1.33.0 // indirect github.com/aws/aws-sdk-go-v2/service/lightsail v1.44.0 // indirect - github.com/aws/aws-sdk-go-v2/service/location v1.45.0 // indirect + github.com/aws/aws-sdk-go-v2/service/location v1.46.0 // indirect github.com/aws/aws-sdk-go-v2/service/lookoutmetrics v1.33.0 // indirect github.com/aws/aws-sdk-go-v2/service/m2 v1.22.0 // indirect github.com/aws/aws-sdk-go-v2/service/macie2 v1.46.0 // indirect @@ -201,7 +201,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/notificationscontacts v1.2.0 // indirect github.com/aws/aws-sdk-go-v2/service/oam v1.19.0 // indirect github.com/aws/aws-sdk-go-v2/service/opensearch v1.48.0 // indirect - github.com/aws/aws-sdk-go-v2/service/opensearchserverless v1.20.0 // indirect + github.com/aws/aws-sdk-go-v2/service/opensearchserverless v1.21.0 // indirect github.com/aws/aws-sdk-go-v2/service/organizations v1.40.0 // indirect github.com/aws/aws-sdk-go-v2/service/osis v1.16.0 // indirect github.com/aws/aws-sdk-go-v2/service/outposts v1.53.0 // indirect diff --git a/tools/tfsdk2fw/go.sum b/tools/tfsdk2fw/go.sum index 9419c64b8caf..1be608cf8318 100644 --- a/tools/tfsdk2fw/go.sum +++ b/tools/tfsdk2fw/go.sum @@ -27,14 +27,14 @@ github.com/aws/aws-sdk-go-v2 v1.37.0 h1:YtCOESR/pN4j5oA7cVHSfOwIcuh/KwHC4DOSXFbv github.com/aws/aws-sdk-go-v2 v1.37.0/go.mod h1:9Q0OoGQoboYIAJyslFyF1f5K1Ryddop8gqMhWx/n4Wg= github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.7.0 h1:6GMWV6CNpA/6fbFHnoAjrv4+LGfyTqZz2LtCHnspgDg= github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.7.0/go.mod h1:/mXlTIVG9jbxkqDnr5UQNQxW1HRYxeGklkM9vAFeabg= -github.com/aws/aws-sdk-go-v2/config v1.30.0 h1:XhzXYU2x/T441/0CBh0g6UUC/OFGk+FRpl3ThI8AqM8= -github.com/aws/aws-sdk-go-v2/config v1.30.0/go.mod h1:4j78A2ko2xc7SMLjjSUrgpp42vyneH9c8j3emf/CLTo= -github.com/aws/aws-sdk-go-v2/credentials v1.18.0 h1:r9W/BX4B1dEbsd2NogyuFXmEfYhdUULUVEOh0SDAovw= -github.com/aws/aws-sdk-go-v2/credentials v1.18.0/go.mod h1:SMtUJQRWEpyfC+ouDJNYdI7NNMqUjHM/Oaf0FV+vWNs= -github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.17.0 h1:ouCRc4lCriJtCnrIN4Kw2tA/uETRZBrxwb/607gRvkE= -github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.17.0/go.mod h1:LW9/PxQD1SYFC7pnWcgqPhoyZprhjEdg5hBK6qYPLW8= -github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.18.0 h1:HO5e3z3ZHgx/xRRSx1p1tcUFkSypl0l/tD4Xv7kIblk= -github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.18.0/go.mod h1:Qd4tjrpAdVf6n0OX3rolbOzFFpMGYpS148RLsiFqG44= +github.com/aws/aws-sdk-go-v2/config v1.30.1 h1:sHL8g/+9tcZATeV2tEkEfxZeaNokDtKsSjGMGHD49qA= +github.com/aws/aws-sdk-go-v2/config v1.30.1/go.mod h1:wkibEyFfxXRyTSzRU4bbF5IUsSXyE4xQ4ZjkGmi5tFo= +github.com/aws/aws-sdk-go-v2/credentials v1.18.1 h1:E55xvOqlX7CvB66Z7rSM9usCrFU1ryUIUHqiXsEzVoE= +github.com/aws/aws-sdk-go-v2/credentials v1.18.1/go.mod h1:iobSQfR5MkvILxssGOvi/P1jjOhrRzfTiCPCzku0vx4= +github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.18.0 h1:9sBTeKQwAvmJUWKIACIoiFSnxxl+sS++YDfr17/ngq0= +github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.18.0/go.mod h1:LW9/PxQD1SYFC7pnWcgqPhoyZprhjEdg5hBK6qYPLW8= +github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.18.1 h1:aAjA/1JZ1xH/F9XvxJu9cXZyp7BqVXtHpztyZ6p799E= +github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.18.1/go.mod h1:ia9HASsPba/7o84sp6iE4wZPdNTJ0oicBe5sWQQk+Ys= github.com/aws/aws-sdk-go-v2/internal/configsources v1.4.0 h1:H2iZoqW/v2Jnrh1FnU725Bq6KJ0k2uP63yH+DcY+HUI= github.com/aws/aws-sdk-go-v2/internal/configsources v1.4.0/go.mod h1:L0FqLbwMXHvNC/7crWV1iIxUlOKYZUE8KuTIA+TozAI= github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.7.0 h1:EDped/rNzAhFPhVY0sDGbtD16OKqksfA8OjF/kLEgw8= @@ -91,8 +91,8 @@ github.com/aws/aws-sdk-go-v2/service/autoscalingplans v1.26.0 h1:8f+Jq2BKy4U6/YU github.com/aws/aws-sdk-go-v2/service/autoscalingplans v1.26.0/go.mod h1:XwZCGipecw+2zfgN4d5d9OwbUcVy3UjctRQIdy5UukU= github.com/aws/aws-sdk-go-v2/service/backup v1.44.0 h1:eR1xS3evF+4XG1O1XuM3sN0E8CqI5PQ/NXm+13Rl+Kc= github.com/aws/aws-sdk-go-v2/service/backup v1.44.0/go.mod h1:li1OG6R/Y7AAyrZx2aTUDqpz0LSs/WN51sKzHfkHP/c= -github.com/aws/aws-sdk-go-v2/service/batch v1.54.0 h1:J2mxc6NuIb18XPzciHQv8GfjdI3HBESpHAYMrkpbNRM= -github.com/aws/aws-sdk-go-v2/service/batch v1.54.0/go.mod h1:AVlcYXRLx8dajiWttkFlo4a+4VpXB/NP1xzzvG0Cq4U= +github.com/aws/aws-sdk-go-v2/service/batch v1.55.0 h1:LqqKzoCkvgSjtYRcS2AAPrATnE9fevXOhW3KOcn4yC8= +github.com/aws/aws-sdk-go-v2/service/batch v1.55.0/go.mod h1:AVlcYXRLx8dajiWttkFlo4a+4VpXB/NP1xzzvG0Cq4U= github.com/aws/aws-sdk-go-v2/service/bcmdataexports v1.9.0 h1:WrmyKlmtyGRIyvl3ryZ4XESbYWz3Gxo2gMvasHFbQnk= github.com/aws/aws-sdk-go-v2/service/bcmdataexports v1.9.0/go.mod h1:W57YXu7pe8M/G86RzC/19XX/NkLiRpiz6zoOV0CikPQ= github.com/aws/aws-sdk-go-v2/service/bedrock v1.40.0 h1:zm35sSNjMd91vO+8W7vh2bch6sxUHiAjEEPaH8NM04o= @@ -111,8 +111,8 @@ github.com/aws/aws-sdk-go-v2/service/chimesdkmediapipelines v1.23.0 h1:aV6AaIsh/ github.com/aws/aws-sdk-go-v2/service/chimesdkmediapipelines v1.23.0/go.mod h1:MUB0qeP6ME79LFT+KPiXcE0o+LqWYqZHpJ74bG4ygKY= github.com/aws/aws-sdk-go-v2/service/chimesdkvoice v1.23.0 h1:sk2DOvXZaWw3iEie/25IFSBfuc+F6n3CCpCaDflF9as= github.com/aws/aws-sdk-go-v2/service/chimesdkvoice v1.23.0/go.mod h1:yoYLnDYicrfC0SVr5RvH7GqrW9nyugiE7nM+H4jFZjI= -github.com/aws/aws-sdk-go-v2/service/cleanrooms v1.26.0 h1:83OW95W8RAtW/lbjtkgc2XE2zeo5OVJ8juorWRF8oD4= -github.com/aws/aws-sdk-go-v2/service/cleanrooms v1.26.0/go.mod h1:s82icmZVWAQFn9O1BntEk0RPrRpNG5vOgnINmhln75U= +github.com/aws/aws-sdk-go-v2/service/cleanrooms v1.27.0 h1:/Ol+xQqxsa04P/UndSDV+9mok8hCFS/TwCA8mJ5RXlg= +github.com/aws/aws-sdk-go-v2/service/cleanrooms v1.27.0/go.mod h1:s82icmZVWAQFn9O1BntEk0RPrRpNG5vOgnINmhln75U= github.com/aws/aws-sdk-go-v2/service/cloud9 v1.30.0 h1:xpm/LVtcoKf6C4WsoUSAL/3ZP2yoNuX7OxsYH9Rzf7I= github.com/aws/aws-sdk-go-v2/service/cloud9 v1.30.0/go.mod h1:piezSyRAA+8oR+aWY0gLEpGnC5nK9nzbab3oRNNaiMo= github.com/aws/aws-sdk-go-v2/service/cloudcontrol v1.25.0 h1:SfG2oQvAdhkOY+p71HaiITdhyblG4/iIHt5rACaPe4Q= @@ -311,8 +311,8 @@ github.com/aws/aws-sdk-go-v2/service/ivschat v1.18.0 h1:3XxrR8OfsdZ5CdO0k03FmaBw github.com/aws/aws-sdk-go-v2/service/ivschat v1.18.0/go.mod h1:zOkF5itZ8V3WWS1uiTUeUUj0rDHiPb9cZ12wk2c3iy8= github.com/aws/aws-sdk-go-v2/service/kafka v1.40.0 h1:1f2ySd9pIOWeLLrzQGnhsdepjxvQxgiYbHvrLdaxQNs= github.com/aws/aws-sdk-go-v2/service/kafka v1.40.0/go.mod h1:9OLdh3Yy2JDSG/EbsdtHP6ELe0ih4RY2ikxtHR1dRIo= -github.com/aws/aws-sdk-go-v2/service/kafkaconnect v1.24.0 h1:CUYXu3HxI2C2L6CNbfWmwJ20wonqNj6eMnxLYBH0CeI= -github.com/aws/aws-sdk-go-v2/service/kafkaconnect v1.24.0/go.mod h1:Kd/iJbmERvnoOg3tn18bzYTOCmv6QdDvqfFdKlhvtL0= +github.com/aws/aws-sdk-go-v2/service/kafkaconnect v1.24.1 h1:KDSWQ5w3ZZbTnlLskITkra2+VpsgFIT06C6rJlhD23g= +github.com/aws/aws-sdk-go-v2/service/kafkaconnect v1.24.1/go.mod h1:Kd/iJbmERvnoOg3tn18bzYTOCmv6QdDvqfFdKlhvtL0= github.com/aws/aws-sdk-go-v2/service/kendra v1.57.0 h1:wKkwENAJaas/1VedOvykeI7BRznuv0p1wVRuPViG3vA= github.com/aws/aws-sdk-go-v2/service/kendra v1.57.0/go.mod h1:/lEH8vb3Pz/xgrXK0O9ceuI/9xV7rL2yiqMC/OS5O3M= github.com/aws/aws-sdk-go-v2/service/keyspaces v1.20.0 h1:Z4wix2oghV2o2QqXxRXSQ1waHsufddDlhu+UBFpU/1Y= @@ -341,8 +341,8 @@ github.com/aws/aws-sdk-go-v2/service/licensemanager v1.33.0 h1:gREPvB66jMT+3XlrX github.com/aws/aws-sdk-go-v2/service/licensemanager v1.33.0/go.mod h1:rkcCcDstRuanMv+H+LCjhItIifSUqfqjZHpqVA5YPts= github.com/aws/aws-sdk-go-v2/service/lightsail v1.44.0 h1:QiiCqpKy0prxq+92uWfESzcb7/8Y9JAamcMOzVYLEoM= github.com/aws/aws-sdk-go-v2/service/lightsail v1.44.0/go.mod h1:ESppxYqXQCpCY+KWl3BdkQjmsQX6zxKP39SnDtRDoU0= -github.com/aws/aws-sdk-go-v2/service/location v1.45.0 h1:KSyIeePlZ1H7AtQ3vTbLbAFHSCm/AXEP3RsA7kvwbUo= -github.com/aws/aws-sdk-go-v2/service/location v1.45.0/go.mod h1:hUD8+2JnMcdB0qnmW5J2zv9IgyDFpHM4L9yPf8NC77g= +github.com/aws/aws-sdk-go-v2/service/location v1.46.0 h1:5eCyFVJG18Cvz6sf3dJk39hT2kgaIzxXgiDPMn+oG/o= +github.com/aws/aws-sdk-go-v2/service/location v1.46.0/go.mod h1:hUD8+2JnMcdB0qnmW5J2zv9IgyDFpHM4L9yPf8NC77g= github.com/aws/aws-sdk-go-v2/service/lookoutmetrics v1.33.0 h1:SrvtIfGyaw22vdKKPNwGsi0Bf0NFA7fcgsmnEz2qvZ8= github.com/aws/aws-sdk-go-v2/service/lookoutmetrics v1.33.0/go.mod h1:ioFUk+nxNNFp8depbsQ95XloZUpB5cUFA2WL6xW1j4Q= github.com/aws/aws-sdk-go-v2/service/m2 v1.22.0 h1:jKXnubb6qCeGzzwH8zpFaQtrTz+qBWc/I+XMMoeXI+Q= @@ -389,8 +389,8 @@ github.com/aws/aws-sdk-go-v2/service/oam v1.19.0 h1:o2jAN4Wz8EhuLqUg2h/MBfHuHLnP github.com/aws/aws-sdk-go-v2/service/oam v1.19.0/go.mod h1:9CnYbu+5xGd4rGd6cvVUahUt5etzVdbbsUh77cH6mvo= github.com/aws/aws-sdk-go-v2/service/opensearch v1.48.0 h1:griVlvvPb8QVZe55WvJKAV57vUGCsGi3Hb5o7I8+acc= github.com/aws/aws-sdk-go-v2/service/opensearch v1.48.0/go.mod h1:4O9QlGDun+ECvbtP0tQRju9wXtkkkn/RRFgGF+zCpsk= -github.com/aws/aws-sdk-go-v2/service/opensearchserverless v1.20.0 h1:m0b52DcjZbVTeXULUsH+Hd+4rXUmzsYenlR5G/6MdYU= -github.com/aws/aws-sdk-go-v2/service/opensearchserverless v1.20.0/go.mod h1:DileQAdc6UOTibuO6Mfl22ExuSlcDDepc/GvkBICdAU= +github.com/aws/aws-sdk-go-v2/service/opensearchserverless v1.21.0 h1:yOdIEG9495oDc2XK1r3B0ciuCeqtPkS7Dd5Eo6SE0hY= +github.com/aws/aws-sdk-go-v2/service/opensearchserverless v1.21.0/go.mod h1:DileQAdc6UOTibuO6Mfl22ExuSlcDDepc/GvkBICdAU= github.com/aws/aws-sdk-go-v2/service/organizations v1.40.0 h1:ysKuFyimEHWXAfX2l31Q/PS0buawt34cDpYXwP9li0Y= github.com/aws/aws-sdk-go-v2/service/organizations v1.40.0/go.mod h1:KDibugj/L26ge1bmaoQ2y3veY0yHUis12wLymmIuWJQ= github.com/aws/aws-sdk-go-v2/service/osis v1.16.0 h1:ABr6yZO+57vNlkEFxwNyJTltD1LJBKlE+E642JhmCnc= From 5b8d966fd8662dc6dc6f23b961fe5a999c7742ae Mon Sep 17 00:00:00 2001 From: Adrian Johnson Date: Wed, 30 Jul 2025 09:37:18 -0500 Subject: [PATCH 066/365] aws_servicequotas_service_quota: log error when update for a pending quota increase already exists --- internal/service/servicequotas/service_quota.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/internal/service/servicequotas/service_quota.go b/internal/service/servicequotas/service_quota.go index 51a3781ea44d..499602c6d1c6 100644 --- a/internal/service/servicequotas/service_quota.go +++ b/internal/service/servicequotas/service_quota.go @@ -276,6 +276,13 @@ func resourceServiceQuotaUpdate(ctx context.Context, d *schema.ResourceData, met output, err := conn.RequestServiceQuotaIncrease(ctx, &input) + if errs.IsAErrorMessageContains[*awstypes.ResourceAlreadyExistsException](err, "Only one open service quota increase request is allowed per quota") { + tflog.Info(ctx, "request for Service Quota already exists", map[string]any{ + "id": d.Id(), + }) + return diags + } + if err != nil { return sdkdiag.AppendErrorf(diags, "requesting Service Quotas Service Quota (%s) increase: %s", d.Id(), err) } From b1446134f6e7a73775d414f50236fb00c257c3bd Mon Sep 17 00:00:00 2001 From: Adrian Johnson Date: Wed, 30 Jul 2025 09:41:41 -0500 Subject: [PATCH 067/365] add CHANGELOG entry --- .changelog/43606.txt | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 .changelog/43606.txt diff --git a/.changelog/43606.txt b/.changelog/43606.txt new file mode 100644 index 000000000000..9f3f95a7bec8 --- /dev/null +++ b/.changelog/43606.txt @@ -0,0 +1,3 @@ +```release-note:bug +resource/aws_servicequotas_service_quota: Fix error when updating a pending service quota request +``` \ No newline at end of file From ce0ca01887bcaf6a83f7be66b17dc173d4f85abf Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Wed, 30 Jul 2025 10:46:52 -0400 Subject: [PATCH 068/365] QuickSight: Standard text for `aws_account_id` argument. --- website/docs/r/quicksight_account_settings.html.markdown | 5 ++--- .../docs/r/quicksight_account_subscription.html.markdown | 4 ++-- website/docs/r/quicksight_analysis.html.markdown | 4 ++-- website/docs/r/quicksight_dashboard.html.markdown | 4 ++-- website/docs/r/quicksight_data_set.html.markdown | 4 ++-- website/docs/r/quicksight_data_source.html.markdown | 4 ++-- website/docs/r/quicksight_folder.html.markdown | 4 ++-- website/docs/r/quicksight_folder_membership.html.markdown | 2 +- website/docs/r/quicksight_group.html.markdown | 6 +++--- website/docs/r/quicksight_group_membership.html.markdown | 6 +++--- .../docs/r/quicksight_iam_policy_assignment.html.markdown | 4 ++-- website/docs/r/quicksight_ingestion.html.markdown | 2 +- website/docs/r/quicksight_ip_restriction.html.markdown | 5 ++--- website/docs/r/quicksight_key_registration.html.markdown | 5 ++--- website/docs/r/quicksight_namespace.html.markdown | 4 ++-- website/docs/r/quicksight_refresh_schedule.html.markdown | 2 +- website/docs/r/quicksight_role_membership.html.markdown | 4 ++-- website/docs/r/quicksight_template.html.markdown | 4 ++-- website/docs/r/quicksight_template_alias.html.markdown | 2 +- website/docs/r/quicksight_theme.html.markdown | 8 ++++---- website/docs/r/quicksight_user.html.markdown | 4 ++-- website/docs/r/quicksight_vpc_connection.html.markdown | 4 ++-- 22 files changed, 44 insertions(+), 47 deletions(-) diff --git a/website/docs/r/quicksight_account_settings.html.markdown b/website/docs/r/quicksight_account_settings.html.markdown index 24fa9d832005..0fd7fcdea3f0 100644 --- a/website/docs/r/quicksight_account_settings.html.markdown +++ b/website/docs/r/quicksight_account_settings.html.markdown @@ -33,14 +33,13 @@ resource "aws_quicksight_account_settings" "example" { This resource supports the following arguments: +* `aws_account_id` - (Optional, Forces new resource) AWS account ID. Defaults to automatically determined account ID of the Terraform AWS provider. * `default_namespace` - (Optional) The default namespace for this Amazon Web Services account. Currently, the default is `default`. * `termination_protection_enabled` - (Optional) A boolean value that determines whether or not an Amazon QuickSight account can be deleted. If `true`, it does not allow the account to be deleted and results in an error message if a user tries to make a DeleteAccountSubscription request. If `false`, it will allow the account to be deleted. ## Attribute Reference -This resource exports the following attributes in addition to the arguments above: - -* `aws_account_id` - The ID for the AWS account that contains the settings. +This resource exports no additional attributes. ## Import diff --git a/website/docs/r/quicksight_account_subscription.html.markdown b/website/docs/r/quicksight_account_subscription.html.markdown index f324ce070a1e..5b76193bfa1e 100644 --- a/website/docs/r/quicksight_account_subscription.html.markdown +++ b/website/docs/r/quicksight_account_subscription.html.markdown @@ -34,11 +34,10 @@ The following arguments are required: The following arguments are optional: -* `region` - (Optional) Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the [provider configuration](https://registry.terraform.io/providers/hashicorp/aws/latest/docs#aws-configuration-reference). * `active_directory_name` - (Optional) Name of your Active Directory. This field is required if `ACTIVE_DIRECTORY` is the selected authentication method of the new Amazon QuickSight account. * `admin_group` - (Optional) Admin group associated with your Active Directory or IAM Identity Center account. This field is required if `ACTIVE_DIRECTORY` or `IAM_IDENTITY_CENTER` is the selected authentication method of the new Amazon QuickSight account. * `author_group` - (Optional) Author group associated with your Active Directory or IAM Identity Center account. -* `aws_account_id` - (Optional) AWS account ID hosting the QuickSight account. Default to provider account. +* `aws_account_id` - (Optional, Forces new resource) AWS account ID. Defaults to automatically determined account ID of the Terraform AWS provider. * `contact_number` - (Optional) A 10-digit phone number for the author of the Amazon QuickSight account to use for future communications. This field is required if `ENTERPPRISE_AND_Q` is the selected edition of the new Amazon QuickSight account. * `directory_id` - (Optional) Active Directory ID that is associated with your Amazon QuickSight account. * `email_address` - (Optional) Email address of the author of the Amazon QuickSight account to use for future communications. This field is required if `ENTERPPRISE_AND_Q` is the selected edition of the new Amazon QuickSight account. @@ -47,6 +46,7 @@ The following arguments are optional: * `last_name` - (Optional) Last name of the author of the Amazon QuickSight account to use for future communications. This field is required if `ENTERPPRISE_AND_Q` is the selected edition of the new Amazon QuickSight account. * `reader_group` - (Optional) Reader group associated with your Active Directory or IAM Identity Center account. * `realm` - (Optional) Realm of the Active Directory that is associated with your Amazon QuickSight account. +* `region` - (Optional) Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the [provider configuration](https://registry.terraform.io/providers/hashicorp/aws/latest/docs#aws-configuration-reference). ## Attribute Reference diff --git a/website/docs/r/quicksight_analysis.html.markdown b/website/docs/r/quicksight_analysis.html.markdown index 584984f581b1..831d91e2fd81 100644 --- a/website/docs/r/quicksight_analysis.html.markdown +++ b/website/docs/r/quicksight_analysis.html.markdown @@ -93,12 +93,12 @@ The following arguments are required: The following arguments are optional: -* `region` - (Optional) Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the [provider configuration](https://registry.terraform.io/providers/hashicorp/aws/latest/docs#aws-configuration-reference). -* `aws_account_id` - (Optional, Forces new resource) AWS account ID. +* `aws_account_id` - (Optional, Forces new resource) AWS account ID. Defaults to automatically determined account ID of the Terraform AWS provider. * `definition` - (Optional) A detailed analysis definition. Only one of `definition` or `source_entity` should be configured. See [definition](#definition). * `parameters` - (Optional) The parameters for the creation of the analysis, which you want to use to override the default settings. An analysis can have any type of parameters, and some parameters might accept multiple values. See [parameters](#parameters). * `permissions` - (Optional) A set of resource permissions on the analysis. Maximum of 64 items. See [permissions](#permissions). * `recovery_window_in_days` - (Optional) A value that specifies the number of days that Amazon QuickSight waits before it deletes the analysis. Use `0` to force deletion without recovery. Minimum value of `7`. Maximum value of `30`. Default to `30`. +* `region` - (Optional) Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the [provider configuration](https://registry.terraform.io/providers/hashicorp/aws/latest/docs#aws-configuration-reference). * `source_entity` - (Optional) The entity that you are using as a source when you create the analysis (template). Only one of `definition` or `source_entity` should be configured. See [source_entity](#source_entity). * `tags` - (Optional) Key-value map of resource tags. If configured with a provider [`default_tags` configuration block](/docs/providers/aws/index.html#default_tags-configuration-block) present, tags with matching keys will overwrite those defined at the provider-level. * `theme_arn` - (Optional) The Amazon Resource Name (ARN) of the theme that is being used for this analysis. The theme ARN must exist in the same AWS account where you create the analysis. diff --git a/website/docs/r/quicksight_dashboard.html.markdown b/website/docs/r/quicksight_dashboard.html.markdown index 4a15ff87aaa0..8ac5df4020f8 100644 --- a/website/docs/r/quicksight_dashboard.html.markdown +++ b/website/docs/r/quicksight_dashboard.html.markdown @@ -96,12 +96,12 @@ The following arguments are required: The following arguments are optional: -* `region` - (Optional) Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the [provider configuration](https://registry.terraform.io/providers/hashicorp/aws/latest/docs#aws-configuration-reference). -* `aws_account_id` - (Optional, Forces new resource) AWS account ID. +* `aws_account_id` - (Optional, Forces new resource) AWS account ID. Defaults to automatically determined account ID of the Terraform AWS provider. * `dashboard_publish_options` - (Optional) Options for publishing the dashboard. See [dashboard_publish_options](#dashboard_publish_options). * `definition` - (Optional) A detailed dashboard definition. Only one of `definition` or `source_entity` should be configured. See [definition](#definition). * `parameters` - (Optional) The parameters for the creation of the dashboard, which you want to use to override the default settings. A dashboard can have any type of parameters, and some parameters might accept multiple values. See [parameters](#parameters). * `permissions` - (Optional) A set of resource permissions on the dashboard. Maximum of 64 items. See [permissions](#permissions). +* `region` - (Optional) Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the [provider configuration](https://registry.terraform.io/providers/hashicorp/aws/latest/docs#aws-configuration-reference). * `source_entity` - (Optional) The entity that you are using as a source when you create the dashboard (template). Only one of `definition` or `source_entity` should be configured. See [source_entity](#source_entity). * `tags` - (Optional) Key-value map of resource tags. If configured with a provider [`default_tags` configuration block](/docs/providers/aws/index.html#default_tags-configuration-block) present, tags with matching keys will overwrite those defined at the provider-level. * `theme_arn` - (Optional) The Amazon Resource Name (ARN) of the theme that is being used for this dashboard. The theme ARN must exist in the same AWS account where you create the dashboard. diff --git a/website/docs/r/quicksight_data_set.html.markdown b/website/docs/r/quicksight_data_set.html.markdown index e7e318654dba..882b720e0d14 100644 --- a/website/docs/r/quicksight_data_set.html.markdown +++ b/website/docs/r/quicksight_data_set.html.markdown @@ -170,8 +170,7 @@ The following arguments are required: The following arguments are optional: -* `region` - (Optional) Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the [provider configuration](https://registry.terraform.io/providers/hashicorp/aws/latest/docs#aws-configuration-reference). -* `aws_account_id` - (Optional, Forces new resource) AWS account ID. +* `aws_account_id` - (Optional, Forces new resource) AWS account ID. Defaults to automatically determined account ID of the Terraform AWS provider. * `column_groups` - (Optional) Groupings of columns that work together in certain Amazon QuickSight features. Currently, only geospatial hierarchy is supported. See [column_groups](#column_groups). * `column_level_permission_rules` - (Optional) A set of 1 or more definitions of a [ColumnLevelPermissionRule](https://docs.aws.amazon.com/quicksight/latest/APIReference/API_ColumnLevelPermissionRule.html). See [column_level_permission_rules](#column_level_permission_rules). * `data_set_usage_configuration` - (Optional) The usage configuration to apply to child datasets that reference this dataset as a source. See [data_set_usage_configuration](#data_set_usage_configuration). @@ -179,6 +178,7 @@ The following arguments are optional: * `logical_table_map` - (Optional) Configures the combination and transformation of the data from the physical tables. Maximum of 1 entry. See [logical_table_map](#logical_table_map). * `permissions` - (Optional) A set of resource permissions on the data source. Maximum of 64 items. See [permissions](#permissions). * `physical_table_map` - (Optional) Declares the physical tables that are available in the underlying data sources. See [physical_table_map](#physical_table_map). +* `region` - (Optional) Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the [provider configuration](https://registry.terraform.io/providers/hashicorp/aws/latest/docs#aws-configuration-reference). * `row_level_permission_data_set` - (Optional) The row-level security configuration for the data that you want to create. See [row_level_permission_data_set](#row_level_permission_data_set). * `row_level_permission_tag_configuration` - (Optional) The configuration of tags on a dataset to set row-level security. Row-level security tags are currently supported for anonymous embedding only. See [row_level_permission_tag_configuration](#row_level_permission_tag_configuration). * `refresh_properties` - (Optional) The refresh properties for the data set. **NOTE**: Only valid when `import_mode` is set to `SPICE`. See [refresh_properties](#refresh_properties). diff --git a/website/docs/r/quicksight_data_source.html.markdown b/website/docs/r/quicksight_data_source.html.markdown index f394f1dd34ba..f1607d480937 100644 --- a/website/docs/r/quicksight_data_source.html.markdown +++ b/website/docs/r/quicksight_data_source.html.markdown @@ -139,10 +139,10 @@ The following arguments are required: The following arguments are optional: -* `region` - (Optional) Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the [provider configuration](https://registry.terraform.io/providers/hashicorp/aws/latest/docs#aws-configuration-reference). -* `aws_account_id` - (Optional, Forces new resource) The ID for the AWS account that the data source is in. Currently, you use the ID for the AWS account that contains your Amazon QuickSight account. +* `aws_account_id` - (Optional, Forces new resource) AWS account ID. Defaults to automatically determined account ID of the Terraform AWS provider. * `credentials` - (Optional) The credentials Amazon QuickSight uses to connect to your underlying source. See [Credentials](#credentials-argument-reference) below for more details. * `permission` - (Optional) A set of resource permissions on the data source. Maximum of 64 items. See [Permission](#permission-argument-reference) below for more details. +* `region` - (Optional) Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the [provider configuration](https://registry.terraform.io/providers/hashicorp/aws/latest/docs#aws-configuration-reference). * `ssl_properties` - (Optional) Secure Socket Layer (SSL) properties that apply when Amazon QuickSight connects to your underlying source. See [SSL Properties](#ssl_properties-argument-reference) below for more details. * `tags` - (Optional) Key-value map of resource tags. If configured with a provider [`default_tags` configuration block](https://registry.terraform.io/providers/hashicorp/aws/latest/docs#default_tags-configuration-block) present, tags with matching keys will overwrite those defined at the provider-level. * `vpc_connection_properties`- (Optional) Use this parameter only when you want Amazon QuickSight to use a VPC connection when connecting to your underlying source. See [VPC Connection Properties](#vpc_connection_properties-argument-reference) below for more details. diff --git a/website/docs/r/quicksight_folder.html.markdown b/website/docs/r/quicksight_folder.html.markdown index f612a952c620..875e938b4bad 100644 --- a/website/docs/r/quicksight_folder.html.markdown +++ b/website/docs/r/quicksight_folder.html.markdown @@ -69,11 +69,11 @@ The following arguments are required: The following arguments are optional: -* `region` - (Optional) Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the [provider configuration](https://registry.terraform.io/providers/hashicorp/aws/latest/docs#aws-configuration-reference). -* `aws_account_id` - (Optional, Forces new resource) AWS account ID. +* `aws_account_id` - (Optional, Forces new resource) AWS account ID. Defaults to automatically determined account ID of the Terraform AWS provider. * `folder_type` - (Optional) The type of folder. By default, it is `SHARED`. Valid values are: `SHARED`. * `parent_folder_arn` - (Optional) The Amazon Resource Name (ARN) for the parent folder. If not set, creates a root-level folder. * `permissions` - (Optional) A set of resource permissions on the folder. Maximum of 64 items. See [permissions](#permissions). +* `region` - (Optional) Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the [provider configuration](https://registry.terraform.io/providers/hashicorp/aws/latest/docs#aws-configuration-reference). * `tags` - (Optional) Key-value map of resource tags. If configured with a provider [`default_tags` configuration block](/docs/providers/aws/index.html#default_tags-configuration-block) present, tags with matching keys will overwrite those defined at the provider-level. ### permissions diff --git a/website/docs/r/quicksight_folder_membership.html.markdown b/website/docs/r/quicksight_folder_membership.html.markdown index 6d9049427828..364759489305 100644 --- a/website/docs/r/quicksight_folder_membership.html.markdown +++ b/website/docs/r/quicksight_folder_membership.html.markdown @@ -32,8 +32,8 @@ The following arguments are required: The following arguments are optional: +* `aws_account_id` - (Optional, Forces new resource) AWS account ID. Defaults to automatically determined account ID of the Terraform AWS provider. * `region` - (Optional) Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the [provider configuration](https://registry.terraform.io/providers/hashicorp/aws/latest/docs#aws-configuration-reference). -* `aws_account_id` - (Optional, Forces new resource) AWS account ID. ## Attribute Reference diff --git a/website/docs/r/quicksight_group.html.markdown b/website/docs/r/quicksight_group.html.markdown index 4d8f9829f97a..a7e0f021842f 100644 --- a/website/docs/r/quicksight_group.html.markdown +++ b/website/docs/r/quicksight_group.html.markdown @@ -22,11 +22,11 @@ resource "aws_quicksight_group" "example" { This resource supports the following arguments: -* `region` - (Optional) Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the [provider configuration](https://registry.terraform.io/providers/hashicorp/aws/latest/docs#aws-configuration-reference). -* `group_name` - (Required) A name for the group. -* `aws_account_id` - (Optional) The ID for the AWS account that the group is in. Currently, you use the ID for the AWS account that contains your Amazon QuickSight account. +* `aws_account_id` - (Optional, Forces new resource) AWS account ID. Defaults to automatically determined account ID of the Terraform AWS provider. * `description` - (Optional) A description for the group. +* `group_name` - (Required) A name for the group. * `namespace` - (Optional) The namespace. Currently, you should set this to `default`. +* `region` - (Optional) Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the [provider configuration](https://registry.terraform.io/providers/hashicorp/aws/latest/docs#aws-configuration-reference). ## Attribute Reference diff --git a/website/docs/r/quicksight_group_membership.html.markdown b/website/docs/r/quicksight_group_membership.html.markdown index 4cc1792af56c..b7d268befcc2 100644 --- a/website/docs/r/quicksight_group_membership.html.markdown +++ b/website/docs/r/quicksight_group_membership.html.markdown @@ -23,11 +23,11 @@ resource "aws_quicksight_group_membership" "example" { This resource supports the following arguments: -* `region` - (Optional) Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the [provider configuration](https://registry.terraform.io/providers/hashicorp/aws/latest/docs#aws-configuration-reference). +* `aws_account_id` - (Optional, Forces new resource) AWS account ID. Defaults to automatically determined account ID of the Terraform AWS provider. * `group_name` - (Required) The name of the group in which the member will be added. * `member_name` - (Required) The name of the member to add to the group. -* `aws_account_id` - (Optional) The ID for the AWS account that the group is in. Currently, you use the ID for the AWS account that contains your Amazon QuickSight account. -* `namespace` - (Required) The namespace that you want the user to be a part of. Defaults to `default`. +* `namespace` - (Optional) The namespace that you want the user to be a part of. Defaults to `default`. +* `region` - (Optional) Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the [provider configuration](https://registry.terraform.io/providers/hashicorp/aws/latest/docs#aws-configuration-reference). ## Attribute Reference diff --git a/website/docs/r/quicksight_iam_policy_assignment.html.markdown b/website/docs/r/quicksight_iam_policy_assignment.html.markdown index a41873c94cf0..e728117c5aef 100644 --- a/website/docs/r/quicksight_iam_policy_assignment.html.markdown +++ b/website/docs/r/quicksight_iam_policy_assignment.html.markdown @@ -34,11 +34,11 @@ The following arguments are required: The following arguments are optional: -* `region` - (Optional) Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the [provider configuration](https://registry.terraform.io/providers/hashicorp/aws/latest/docs#aws-configuration-reference). -* `aws_account_id` - (Optional) AWS account ID. +* `aws_account_id` - (Optional, Forces new resource) AWS account ID. Defaults to automatically determined account ID of the Terraform AWS provider. * `identities` - (Optional) Amazon QuickSight users, groups, or both to assign the policy to. See [`identities` block](#identities-block). * `namespace` - (Optional) Namespace that contains the assignment. Defaults to `default`. * `policy_arn` - (Optional) ARN of the IAM policy to apply to the Amazon QuickSight users and groups specified in this assignment. +* `region` - (Optional) Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the [provider configuration](https://registry.terraform.io/providers/hashicorp/aws/latest/docs#aws-configuration-reference). ### `identities` block diff --git a/website/docs/r/quicksight_ingestion.html.markdown b/website/docs/r/quicksight_ingestion.html.markdown index b1bcaa1889c6..e0163853303d 100644 --- a/website/docs/r/quicksight_ingestion.html.markdown +++ b/website/docs/r/quicksight_ingestion.html.markdown @@ -32,8 +32,8 @@ The following arguments are required: The following arguments are optional: +* `aws_account_id` - (Optional, Forces new resource) AWS account ID. Defaults to automatically determined account ID of the Terraform AWS provider. * `region` - (Optional) Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the [provider configuration](https://registry.terraform.io/providers/hashicorp/aws/latest/docs#aws-configuration-reference). -* `aws_account_id` - (Optional) AWS account ID. ## Attribute Reference diff --git a/website/docs/r/quicksight_ip_restriction.html.markdown b/website/docs/r/quicksight_ip_restriction.html.markdown index b4f5465e2ef5..3948608d845c 100644 --- a/website/docs/r/quicksight_ip_restriction.html.markdown +++ b/website/docs/r/quicksight_ip_restriction.html.markdown @@ -32,6 +32,7 @@ resource "aws_quicksight_ip_restriction" "example" { This resource supports the following arguments: +* `aws_account_id` - (Optional, Forces new resource) AWS account ID. Defaults to automatically determined account ID of the Terraform AWS provider. * `enabled` - (Required) Whether IP rules are turned on. * `ip_restriction_rule_map` - (Optional) Map of allowed IPv4 CIDR ranges and descriptions. * `region` - (Optional) Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the [provider configuration](https://registry.terraform.io/providers/hashicorp/aws/latest/docs#aws-configuration-reference). @@ -40,9 +41,7 @@ This resource supports the following arguments: ## Attribute Reference -This resource exports the following attributes in addition to the arguments above: - -* `aws_account_id` - The ID for the AWS account that contains the settings. +This resource exports no additional attributes. ## Import diff --git a/website/docs/r/quicksight_key_registration.html.markdown b/website/docs/r/quicksight_key_registration.html.markdown index 5edb77a19d8f..ad835fb88fdb 100644 --- a/website/docs/r/quicksight_key_registration.html.markdown +++ b/website/docs/r/quicksight_key_registration.html.markdown @@ -31,6 +31,7 @@ resource "aws_quicksight_key_registration" "example" { This resource supports the following arguments: +* `aws_account_id` - (Optional, Forces new resource) AWS account ID. Defaults to automatically determined account ID of the Terraform AWS provider. * `key_registration` - (Required) Registered keys. See [key_registration](#key_registration). * `region` - (Optional) Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the [provider configuration](https://registry.terraform.io/providers/hashicorp/aws/latest/docs#aws-configuration-reference). @@ -41,9 +42,7 @@ This resource supports the following arguments: ## Attribute Reference -This resource exports the following attributes in addition to the arguments above: - -* `aws_account_id` - The ID for the AWS account that contains the settings. +This resource exports no additional attributes. ## Import diff --git a/website/docs/r/quicksight_namespace.html.markdown b/website/docs/r/quicksight_namespace.html.markdown index 27b8e2fea11c..c2128d32efd7 100644 --- a/website/docs/r/quicksight_namespace.html.markdown +++ b/website/docs/r/quicksight_namespace.html.markdown @@ -28,9 +28,9 @@ The following arguments are required: The following arguments are optional: -* `region` - (Optional) Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the [provider configuration](https://registry.terraform.io/providers/hashicorp/aws/latest/docs#aws-configuration-reference). -* `aws_account_id` - (Optional) AWS account ID. +* `aws_account_id` - (Optional, Forces new resource) AWS account ID. Defaults to automatically determined account ID of the Terraform AWS provider. * `identity_store` - (Optional) User identity directory type. Defaults to `QUICKSIGHT`, the only current valid value. +* `region` - (Optional) Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the [provider configuration](https://registry.terraform.io/providers/hashicorp/aws/latest/docs#aws-configuration-reference). * `tags` - (Optional) Key-value map of resource tags. If configured with a provider [`default_tags` configuration block](https://registry.terraform.io/providers/hashicorp/aws/latest/docs#default_tags-configuration-block) present, tags with matching keys will overwrite those defined at the provider-level. ## Attribute Reference diff --git a/website/docs/r/quicksight_refresh_schedule.html.markdown b/website/docs/r/quicksight_refresh_schedule.html.markdown index 2b56486f3ccf..3dad1806e0ea 100644 --- a/website/docs/r/quicksight_refresh_schedule.html.markdown +++ b/website/docs/r/quicksight_refresh_schedule.html.markdown @@ -83,8 +83,8 @@ The following arguments are required: The following arguments are optional: +* `aws_account_id` - (Optional, Forces new resource) AWS account ID. Defaults to automatically determined account ID of the Terraform AWS provider. * `region` - (Optional) Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the [provider configuration](https://registry.terraform.io/providers/hashicorp/aws/latest/docs#aws-configuration-reference). -* `aws_account_id` - (Optional, Forces new resource) AWS account ID. ### schedule diff --git a/website/docs/r/quicksight_role_membership.html.markdown b/website/docs/r/quicksight_role_membership.html.markdown index acf0cb23268e..3b03a95ed7c3 100644 --- a/website/docs/r/quicksight_role_membership.html.markdown +++ b/website/docs/r/quicksight_role_membership.html.markdown @@ -31,9 +31,9 @@ The following arguments are required: The following arguments are optional: -* `region` - (Optional) Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the [provider configuration](https://registry.terraform.io/providers/hashicorp/aws/latest/docs#aws-configuration-reference). -* `aws_account_id` - (Optional) AWS account ID. Defaults to the account of the caller identity if not configured. +* `aws_account_id` - (Optional, Forces new resource) AWS account ID. Defaults to automatically determined account ID of the Terraform AWS provider. * `namespace` - (Optional) Name of the namespace. Defaults to `default`. +* `region` - (Optional) Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the [provider configuration](https://registry.terraform.io/providers/hashicorp/aws/latest/docs#aws-configuration-reference). ## Attribute Reference diff --git a/website/docs/r/quicksight_template.html.markdown b/website/docs/r/quicksight_template.html.markdown index bbf9dafe862f..1ad3aa2ae421 100644 --- a/website/docs/r/quicksight_template.html.markdown +++ b/website/docs/r/quicksight_template.html.markdown @@ -98,10 +98,10 @@ The following arguments are required: The following arguments are optional: -* `region` - (Optional) Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the [provider configuration](https://registry.terraform.io/providers/hashicorp/aws/latest/docs#aws-configuration-reference). -* `aws_account_id` - (Optional, Forces new resource) AWS account ID. +* `aws_account_id` - (Optional, Forces new resource) AWS account ID. Defaults to automatically determined account ID of the Terraform AWS provider. * `definition` - (Optional) A detailed template definition. Only one of `definition` or `source_entity` should be configured. See [definition](#definition). * `permissions` - (Optional) A set of resource permissions on the template. Maximum of 64 items. See [permissions](#permissions). +* `region` - (Optional) Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the [provider configuration](https://registry.terraform.io/providers/hashicorp/aws/latest/docs#aws-configuration-reference). * `source_entity` - (Optional) The entity that you are using as a source when you create the template (analysis or template). Only one of `definition` or `source_entity` should be configured. See [source_entity](#source_entity). * `tags` - (Optional) Key-value map of resource tags. If configured with a provider [`default_tags` configuration block](/docs/providers/aws/index.html#default_tags-configuration-block) present, tags with matching keys will overwrite those defined at the provider-level. diff --git a/website/docs/r/quicksight_template_alias.html.markdown b/website/docs/r/quicksight_template_alias.html.markdown index 21141245a7c1..bf60a905e994 100644 --- a/website/docs/r/quicksight_template_alias.html.markdown +++ b/website/docs/r/quicksight_template_alias.html.markdown @@ -32,8 +32,8 @@ The following arguments are required: The following arguments are optional: +* `aws_account_id` - (Optional, Forces new resource) AWS account ID. Defaults to automatically determined account ID of the Terraform AWS provider. * `region` - (Optional) Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the [provider configuration](https://registry.terraform.io/providers/hashicorp/aws/latest/docs#aws-configuration-reference). -* `aws_account_id` - (Optional, Forces new resource) AWS account ID. ## Attribute Reference diff --git a/website/docs/r/quicksight_theme.html.markdown b/website/docs/r/quicksight_theme.html.markdown index 75376f861e03..b8d374344bed 100644 --- a/website/docs/r/quicksight_theme.html.markdown +++ b/website/docs/r/quicksight_theme.html.markdown @@ -49,16 +49,16 @@ resource "aws_quicksight_theme" "example" { The following arguments are required: -* `theme_id` - (Required, Forces new resource) Identifier of the theme. * `base_theme_id` - (Required) The ID of the theme that a custom theme will inherit from. All themes inherit from one of the starting themes defined by Amazon QuickSight. For a list of the starting themes, use ListThemes or choose Themes from within an analysis. -* `name` - (Required) Display name of the theme. * `configuration` - (Required) The theme configuration, which contains the theme display properties. See [configuration](#configuration). +* `name` - (Required) Display name of the theme. +* `theme_id` - (Required, Forces new resource) Identifier of the theme. The following arguments are optional: -* `region` - (Optional) Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the [provider configuration](https://registry.terraform.io/providers/hashicorp/aws/latest/docs#aws-configuration-reference). -* `aws_account_id` - (Optional, Forces new resource) AWS account ID. +* `aws_account_id` - (Optional, Forces new resource) AWS account ID. Defaults to automatically determined account ID of the Terraform AWS provider. * `permissions` - (Optional) A set of resource permissions on the theme. Maximum of 64 items. See [permissions](#permissions). +* `region` - (Optional) Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the [provider configuration](https://registry.terraform.io/providers/hashicorp/aws/latest/docs#aws-configuration-reference). * `tags` - (Optional) Key-value map of resource tags. If configured with a provider [`default_tags` configuration block](/docs/providers/aws/index.html#default_tags-configuration-block) present, tags with matching keys will overwrite those defined at the provider-level. * `version_description` - (Optional) A description of the current theme version being created/updated. diff --git a/website/docs/r/quicksight_user.html.markdown b/website/docs/r/quicksight_user.html.markdown index 50e63f087a99..33a3d8eca320 100644 --- a/website/docs/r/quicksight_user.html.markdown +++ b/website/docs/r/quicksight_user.html.markdown @@ -57,10 +57,10 @@ The following arguments are required: The following arguments are optional: -* `region` - (Optional) Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the [provider configuration](https://registry.terraform.io/providers/hashicorp/aws/latest/docs#aws-configuration-reference). -* `aws_account_id` - (Optional) ID for the AWS account that the user is in. Use the ID for the AWS account that contains your Amazon QuickSight account. +* `aws_account_id` - (Optional, Forces new resource) AWS account ID. Defaults to automatically determined account ID of the Terraform AWS provider. * `iam_arn` - (Optional) ARN of the IAM user or role that you are registering with Amazon QuickSight. Required only for users with an identity type of `IAM`. * `namespace` - (Optional) The Amazon Quicksight namespace to create the user in. Defaults to `default`. +* `region` - (Optional) Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the [provider configuration](https://registry.terraform.io/providers/hashicorp/aws/latest/docs#aws-configuration-reference). * `session_name` - (Optional) Name of the IAM session to use when assuming roles that can embed QuickSight dashboards. Only valid for registering users using an assumed IAM role. Additionally, if registering multiple users using the same IAM role, each user needs to have a unique session name. * `user_name` - (Optional) Amazon QuickSight user name that you want to create for the user you are registering. Required only for users with an identity type of `QUICKSIGHT`. diff --git a/website/docs/r/quicksight_vpc_connection.html.markdown b/website/docs/r/quicksight_vpc_connection.html.markdown index c6a50639d3f5..0e7d8005f0c2 100644 --- a/website/docs/r/quicksight_vpc_connection.html.markdown +++ b/website/docs/r/quicksight_vpc_connection.html.markdown @@ -74,9 +74,9 @@ The following arguments are required: The following arguments are optional: -* `region` - (Optional) Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the [provider configuration](https://registry.terraform.io/providers/hashicorp/aws/latest/docs#aws-configuration-reference). -* `aws_account_id` - (Optional) AWS account ID. +* `aws_account_id` - (Optional, Forces new resource) AWS account ID. Defaults to automatically determined account ID of the Terraform AWS provider. * `dns_resolvers` - (Optional) A list of IP addresses of DNS resolver endpoints for the VPC connection. +* `region` - (Optional) Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the [provider configuration](https://registry.terraform.io/providers/hashicorp/aws/latest/docs#aws-configuration-reference). * `tags` - (Optional) Key-value map of resource tags. If configured with a provider [`default_tags` configuration block](https://registry.terraform.io/providers/hashicorp/aws/latest/docs#default_tags-configuration-block) present, tags with matching keys will overwrite those defined at the provider-level. ## Attribute Reference From 6eeea00ef150ff4c450cea9225299bcb2a3e9b6e Mon Sep 17 00:00:00 2001 From: changelogbot Date: Wed, 30 Jul 2025 14:54:21 +0000 Subject: [PATCH 069/365] Update CHANGELOG.md for #43601 --- CHANGELOG.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index a8dbcda05635..1bd7891a1c9f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,12 +9,18 @@ ENHANCEMENTS: * data-source/aws_codebuild_fleet: Add `instance_type` attribute in `compute_configuration` block ([#43449](https://github.com/hashicorp/terraform-provider-aws/issues/43449)) * data-source/aws_ebs_volume: Add `volume_initialization_rate` attribute ([#43565](https://github.com/hashicorp/terraform-provider-aws/issues/43565)) * data-source/aws_ecs_service: Support `load_balancer` attribute ([#43582](https://github.com/hashicorp/terraform-provider-aws/issues/43582)) +* data-source/aws_verifiedpermissions_policy_store: Add `deletion_protection` attribute ([#43452](https://github.com/hashicorp/terraform-provider-aws/issues/43452)) * resource/aws_athena_workgroup: Add `configuration.identity_center_configuration` argument ([#38717](https://github.com/hashicorp/terraform-provider-aws/issues/38717)) * resource/aws_codebuild_fleet: Add `instance_type` argument in `compute_configuration` block to support custom instance types ([#43449](https://github.com/hashicorp/terraform-provider-aws/issues/43449)) * resource/aws_ebs_volume: Add `volume_initialization_rate` argument ([#43565](https://github.com/hashicorp/terraform-provider-aws/issues/43565)) +* resource/aws_verifiedpermissions_policy_store: Add `deletion_protection` argument ([#43452](https://github.com/hashicorp/terraform-provider-aws/issues/43452)) BUG FIXES: +* resource/aws_bedrockagent_flow: Fix `missing required field, CreateFlowInput.Definition.Nodes[0].Configuration[prompt].SourceConfiguration[resource].PromptArn` errors on Create ([#43595](https://github.com/hashicorp/terraform-provider-aws/issues/43595)) +* resource/aws_s3_bucket: Accept `NoSuchTagSetError` responses from S3-compatible services ([#43589](https://github.com/hashicorp/terraform-provider-aws/issues/43589)) +* resource/aws_s3_object: Accept `NoSuchTagSetError` responses from S3-compatible services ([#43589](https://github.com/hashicorp/terraform-provider-aws/issues/43589)) +* resource/aws_ssm_parameter: Fix `Provider produced inconsistent final plan` errors when changing from using `value` to using `value_wo` ([#42877](https://github.com/hashicorp/terraform-provider-aws/issues/42877)) * resource/aws_ssm_parameter: Fix `version` not being updated when `description` changes ([#42595](https://github.com/hashicorp/terraform-provider-aws/issues/42595)) ## 6.6.0 (July 28, 2025) From 904118832ecdecf1f4f6a2f076bda708ca42fe25 Mon Sep 17 00:00:00 2001 From: Adrian Johnson Date: Wed, 30 Jul 2025 10:02:45 -0500 Subject: [PATCH 070/365] make semgrep-fix --- internal/service/servicequotas/service_quota.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/service/servicequotas/service_quota.go b/internal/service/servicequotas/service_quota.go index 499602c6d1c6..932d2cc4908d 100644 --- a/internal/service/servicequotas/service_quota.go +++ b/internal/service/servicequotas/service_quota.go @@ -278,7 +278,7 @@ func resourceServiceQuotaUpdate(ctx context.Context, d *schema.ResourceData, met if errs.IsAErrorMessageContains[*awstypes.ResourceAlreadyExistsException](err, "Only one open service quota increase request is allowed per quota") { tflog.Info(ctx, "request for Service Quota already exists", map[string]any{ - "id": d.Id(), + names.AttrID: d.Id(), }) return diags } From 6e50162b3c3cc72cdfa400807e78c49d93139ef5 Mon Sep 17 00:00:00 2001 From: Jared Baker Date: Wed, 30 Jul 2025 11:14:10 -0400 Subject: [PATCH 071/365] r/aws_cloudfront_distribution: handle deleted s3 buckets on disable Resolves a failure related to disabling a distribution when re-using the existing logging configuration where the configured S3 bucket no longer exists. When this scenario occurs, the provider will now attempt a second update with logging disabled entirely. This situation has been observed during account sweeping. ```console 2025/07/30 10:48:55 [ERROR] Error running Sweeper (aws_cloudfront_distribution) in region (us-west-1): error sweeping CloudFront Distributions (us-west-1): 1 error occurred: * updating CloudFront Distribution (E4OA0003DP0TA): operation error CloudFront: UpdateDistribution, https response error StatusCode: 400, RequestID: 90f242c1-278a-4b73-8b5e-b0639c8313b0, InvalidArgument: The S3 bucket that you specified for CloudFront logs doesn't exist: tf-acc-test-4123374005101420579.log-bucket.s3.us-west-2.amazonaws.com ``` --- internal/service/cloudfront/distribution.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/internal/service/cloudfront/distribution.go b/internal/service/cloudfront/distribution.go index 695fe1692fb3..61c35882468a 100644 --- a/internal/service/cloudfront/distribution.go +++ b/internal/service/cloudfront/distribution.go @@ -1233,6 +1233,12 @@ func disableDistribution(ctx context.Context, conn *cloudfront.Client, id string _, err = conn.UpdateDistribution(ctx, &input) + // If the configured logging bucket no longer exists, disable logging and retry update + if errs.IsAErrorMessageContains[*awstypes.InvalidArgument](err, "The S3 bucket that you specified for CloudFront logs doesn't exist") { + input.DistributionConfig.Logging = &awstypes.LoggingConfig{Enabled: aws.Bool(false)} + _, err = conn.UpdateDistribution(ctx, &input) + } + if err != nil { return fmt.Errorf("updating CloudFront Distribution (%s): %w", id, err) } From 9f833c4de407303592df92cfe23fdba3255077ac Mon Sep 17 00:00:00 2001 From: Adrian Johnson Date: Wed, 30 Jul 2025 10:32:03 -0500 Subject: [PATCH 072/365] append warning diag insteading of logging info --- internal/service/servicequotas/service_quota.go | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/internal/service/servicequotas/service_quota.go b/internal/service/servicequotas/service_quota.go index 932d2cc4908d..de788a177411 100644 --- a/internal/service/servicequotas/service_quota.go +++ b/internal/service/servicequotas/service_quota.go @@ -277,10 +277,7 @@ func resourceServiceQuotaUpdate(ctx context.Context, d *schema.ResourceData, met output, err := conn.RequestServiceQuotaIncrease(ctx, &input) if errs.IsAErrorMessageContains[*awstypes.ResourceAlreadyExistsException](err, "Only one open service quota increase request is allowed per quota") { - tflog.Info(ctx, "request for Service Quota already exists", map[string]any{ - names.AttrID: d.Id(), - }) - return diags + return sdkdiag.AppendWarningf(diags, "resource service quota %s already exists", d.Id()) } if err != nil { From 3e515d6b1018a3d21ddf9464c1ab20b513605272 Mon Sep 17 00:00:00 2001 From: changelogbot Date: Wed, 30 Jul 2025 15:35:53 +0000 Subject: [PATCH 073/365] Update CHANGELOG.md for #43596 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1bd7891a1c9f..f79284417f14 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ FEATURES: +* **New Resource:** `aws_quicksight_ip_restriction` ([#43596](https://github.com/hashicorp/terraform-provider-aws/issues/43596)) * **New Resource:** `aws_quicksight_key_registration` ([#43587](https://github.com/hashicorp/terraform-provider-aws/issues/43587)) ENHANCEMENTS: From 3e3379c6a8e20b8121d65436a5b9c69a356a04bb Mon Sep 17 00:00:00 2001 From: changelogbot Date: Wed, 30 Jul 2025 16:21:55 +0000 Subject: [PATCH 074/365] Update CHANGELOG.md for #43606 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index f79284417f14..4e3536a5018a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -21,6 +21,7 @@ BUG FIXES: * resource/aws_bedrockagent_flow: Fix `missing required field, CreateFlowInput.Definition.Nodes[0].Configuration[prompt].SourceConfiguration[resource].PromptArn` errors on Create ([#43595](https://github.com/hashicorp/terraform-provider-aws/issues/43595)) * resource/aws_s3_bucket: Accept `NoSuchTagSetError` responses from S3-compatible services ([#43589](https://github.com/hashicorp/terraform-provider-aws/issues/43589)) * resource/aws_s3_object: Accept `NoSuchTagSetError` responses from S3-compatible services ([#43589](https://github.com/hashicorp/terraform-provider-aws/issues/43589)) +* resource/aws_servicequotas_service_quota: Fix error when updating a pending service quota request ([#43606](https://github.com/hashicorp/terraform-provider-aws/issues/43606)) * resource/aws_ssm_parameter: Fix `Provider produced inconsistent final plan` errors when changing from using `value` to using `value_wo` ([#42877](https://github.com/hashicorp/terraform-provider-aws/issues/42877)) * resource/aws_ssm_parameter: Fix `version` not being updated when `description` changes ([#42595](https://github.com/hashicorp/terraform-provider-aws/issues/42595)) From 00d8227b5bc60e728ffe0fc4d19ae817b6150613 Mon Sep 17 00:00:00 2001 From: Jared Baker Date: Wed, 30 Jul 2025 13:12:21 -0400 Subject: [PATCH 075/365] r/aws_cloudfront_distribution(test): fix `ExpectError` regexp ```console % make testacc PKG=cloudfront TESTS=TestAccCloudFrontDistribution_Origin_originShield make: Verifying source code with gofmt... ==> Checking that code complies with gofmt requirements... TF_ACC=1 go1.24.5 test ./internal/service/cloudfront/... -v -count 1 -parallel 20 -run='TestAccCloudFrontDistribution_Origin_originShield' -timeout 360m -vet=off 2025/07/30 13:00:31 Creating Terraform AWS Provider (SDKv2-style)... 2025/07/30 13:00:31 Initializing Terraform AWS Provider (SDKv2-style)... --- PASS: TestAccCloudFrontDistribution_Origin_originShield (622.10s) PASS ok github.com/hashicorp/terraform-provider-aws/internal/service/cloudfront 628.396s ``` --- internal/service/cloudfront/distribution_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/service/cloudfront/distribution_test.go b/internal/service/cloudfront/distribution_test.go index 45886d446dac..fd50ff4db292 100644 --- a/internal/service/cloudfront/distribution_test.go +++ b/internal/service/cloudfront/distribution_test.go @@ -590,11 +590,11 @@ func TestAccCloudFrontDistribution_Origin_originShield(t *testing.T) { }, { Config: testAccDistributionConfig_originItem(rName, originShieldItem(acctest.CtFalse, `""`)), - ExpectError: regexache.MustCompile(`.*must be a valid AWS Region Code.*`), + ExpectError: regexache.MustCompile(`.*doesn't look like AWS Region.*`), }, { Config: testAccDistributionConfig_originItem(rName, originShieldItem(acctest.CtTrue, `"US East (Ohio)"`)), - ExpectError: regexache.MustCompile(`.*must be a valid AWS Region Code.*`), + ExpectError: regexache.MustCompile(`.*doesn't look like AWS Region.*`), }, { Config: testAccDistributionConfig_originItem(rName, originShieldItem(acctest.CtTrue, `"us-east-1"`)), //lintignore:AWSAT003 From 58bfc784c22adf957238b331af7522a8e37a521f Mon Sep 17 00:00:00 2001 From: Jared Baker Date: Wed, 30 Jul 2025 15:42:53 -0400 Subject: [PATCH 076/365] .github/workflows: pin to action commit SHA (#43610) --- .github/workflows/smarterr.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/smarterr.yml b/.github/workflows/smarterr.yml index b3d65e667d84..b2aa71fd0c0a 100644 --- a/.github/workflows/smarterr.yml +++ b/.github/workflows/smarterr.yml @@ -42,7 +42,7 @@ jobs: path: ~/go/pkg/mod key: ${{ runner.os }}-go-pkg-mod-${{ hashFiles('go.sum') }} # long-running test - - uses: YakDriver/check-smarterr-config@v0.3.0 # v0.3.0 + - uses: YakDriver/check-smarterr-config@6c840c1f0df56a8b550b159c7496770c28c75e51 # v0.3.0 name: Check smarterr config with: base-dir: './internal' From a2b625153e50054bda96a3d424a68662f41c2a15 Mon Sep 17 00:00:00 2001 From: Greg Madro Date: Wed, 30 Jul 2025 17:59:55 -0400 Subject: [PATCH 077/365] feat(cleanrooms): add analytics_engine support to aws_cleanrooms_collaboration --- .changelog/placeholder.txt | 3 ++ internal/service/cleanrooms/collaboration.go | 10 +++++ .../service/cleanrooms/collaboration_test.go | 39 +++++++++++++++++++ .../r/cleanrooms_collaboration.html.markdown | 3 ++ 4 files changed, 55 insertions(+) create mode 100644 .changelog/placeholder.txt diff --git a/.changelog/placeholder.txt b/.changelog/placeholder.txt new file mode 100644 index 000000000000..a9f20d1ef490 --- /dev/null +++ b/.changelog/placeholder.txt @@ -0,0 +1,3 @@ +```release-note:enhancement +resource/aws_cleanrooms_collaboration: Added `analytics_engine` argument (values: CLEAN_ROOMS_SQL, SPARK) +``` \ No newline at end of file diff --git a/internal/service/cleanrooms/collaboration.go b/internal/service/cleanrooms/collaboration.go index 6d4e37fa30d5..6e88f589e14d 100644 --- a/internal/service/cleanrooms/collaboration.go +++ b/internal/service/cleanrooms/collaboration.go @@ -54,6 +54,11 @@ func ResourceCollaboration() *schema.Resource { Type: schema.TypeString, Computed: true, }, + "analytics_engine": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + }, "creator_display_name": { Type: schema.TypeString, ForceNew: true, @@ -170,6 +175,10 @@ func resourceCollaborationCreate(ctx context.Context, d *schema.ResourceData, me Tags: getTagsIn(ctx), } + if v, ok := d.GetOk("analytics_engine"); ok { + input.AnalyticsEngine = types.AnalyticsEngine(v.(string)) + } + queryLogStatus, err := expandQueryLogStatus(d.Get("query_log_status").(string)) if err != nil { return create.AppendDiagError(diags, names.CleanRooms, create.ErrActionCreating, ResNameCollaboration, d.Get(names.AttrName).(string), err) @@ -218,6 +227,7 @@ func resourceCollaborationRead(ctx context.Context, d *schema.ResourceData, meta d.Set(names.AttrARN, collaboration.Arn) d.Set(names.AttrName, collaboration.Name) d.Set(names.AttrDescription, collaboration.Description) + d.Set("analytics_engine", collaboration.AnalyticsEngine) d.Set("creator_display_name", collaboration.CreatorDisplayName) d.Set(names.AttrCreateTime, collaboration.CreateTime.String()) d.Set("update_time", collaboration.UpdateTime.String()) diff --git a/internal/service/cleanrooms/collaboration_test.go b/internal/service/cleanrooms/collaboration_test.go index 8715d8b1a2eb..e1b9b4d590b0 100644 --- a/internal/service/cleanrooms/collaboration_test.go +++ b/internal/service/cleanrooms/collaboration_test.go @@ -541,3 +541,42 @@ resource "aws_cleanrooms_collaboration" "test" { `, name, description, tagValue, creatorMemberAbilities, creatorDisplayName, queryLogStatus, dataEncryptionMetadata, additionalMember) } + +func TestAccCleanRoomsCollaboration_analyticsEngine(t *testing.T) { + resourceName := "aws_cleanrooms_collaboration.test" + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { + acctest.PreCheck(context.Background(), t) + }, + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + Steps: []resource.TestStep{ + { + Config: testAccCleanRoomsCollaborationConfigAnalyticsEngine("SPARK"), + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttr(resourceName, "analytics_engine", "SPARK"), + ), + }, + }, + }) +} + +func testAccCleanRoomsCollaborationConfigAnalyticsEngine(engine string) string { + return fmt.Sprintf(` +resource "aws_cleanrooms_collaboration" "test" { + name = "tf-test-collab" + creator_display_name = "tf-test" + creator_member_abilities = ["CAN_RECEIVE_RESULTS"] + description = "test collaboration" + query_log_status = "ENABLED" + + analytics_engine = "%s" + + member { + account_id = "%s" + display_name = "test-member" + member_abilities = ["CAN_QUERY"] + } +} +`, engine, acctest.AccountID(context.Background())) +} diff --git a/website/docs/r/cleanrooms_collaboration.html.markdown b/website/docs/r/cleanrooms_collaboration.html.markdown index 4f6c3b9b80ff..5b4ea3826767 100644 --- a/website/docs/r/cleanrooms_collaboration.html.markdown +++ b/website/docs/r/cleanrooms_collaboration.html.markdown @@ -22,6 +22,7 @@ resource "aws_cleanrooms_collaboration" "test_collaboration" { creator_display_name = "Creator " description = "I made this collaboration with terraform!" query_log_status = "DISABLED" + analytics_engine = "SPARK" data_encryption_metadata { allow_clear_text = true @@ -54,6 +55,8 @@ This resource supports the following arguments: * `creator_display_name` - (Required - Forces new resource) - The name for the member record for the collaboration creator. * `query_log_status` - (Required - Forces new resource) - Determines if members of the collaboration can enable query logs within their own. emberships. Valid values [may be found here](https://docs.aws.amazon.com/clean-rooms/latest/apireference/API_CreateCollaboration.html#API-CreateCollaboration-request-queryLogStatus). +* `analytics_engine` - (Optional, ForceNew) Specifies the analytics engine used by the collaboration. + Valid values: `CLEAN_ROOMS_SQL` (deprecated), `SPARK`. Defaults to `SPARK`. * `data_encryption_metadata` - (Required - Forces new resource) - a collection of settings which determine how the [c3r client](https://docs.aws.amazon.com/clean-rooms/latest/userguide/crypto-computing.html) will encrypt data for use within this collaboration. * `data_encryption_metadata.allow_clear_text` - (Required - Forces new resource) - Indicates whether encrypted tables can contain cleartext data. This is a boolea field. From 8b6bf5918ecaae4eee1989dc0d51ed36bafc4ebf Mon Sep 17 00:00:00 2001 From: Graham Davison Date: Wed, 30 Jul 2025 16:34:35 -0700 Subject: [PATCH 078/365] Renames `randomIPAddress` to `randomIPv4Address` --- internal/generate/tagstests/main.go | 4 +- .../site_to_site_vpn_attachment.go | 2 +- ...te_to_site_vpn_attachment_tags_gen_test.go | 290 +++++++++--------- .../SiteToSiteVPNAttachment/tags/main_gen.tf | 4 +- .../tagsComputed1/main_gen.tf | 4 +- .../tagsComputed2/main_gen.tf | 4 +- .../tags_defaults/main_gen.tf | 4 +- .../tags_ignore/main_gen.tf | 4 +- .../site_to_site_vpn_attachment_tags.gtpl | 2 +- 9 files changed, 159 insertions(+), 159 deletions(-) diff --git a/internal/generate/tagstests/main.go b/internal/generate/tagstests/main.go index 4ae555588e8a..bad768b0ed81 100644 --- a/internal/generate/tagstests/main.go +++ b/internal/generate/tagstests/main.go @@ -666,8 +666,8 @@ func (v *visitor) processFuncDecl(funcDecl *ast.FuncDecl) { Type: tfVarTypeInt, } } - if attr, ok := args.Keyword["randomIPAddress"]; ok { - varName := "rIPAddress" + if attr, ok := args.Keyword["randomIPv4Address"]; ok { + varName := "rIPv4Address" d.GoImports = append(d.GoImports, goImport{ Path: "github.com/hashicorp/terraform-plugin-testing/helper/acctest", diff --git a/internal/service/networkmanager/site_to_site_vpn_attachment.go b/internal/service/networkmanager/site_to_site_vpn_attachment.go index b4d1d75e1d6f..f1dee4206219 100644 --- a/internal/service/networkmanager/site_to_site_vpn_attachment.go +++ b/internal/service/networkmanager/site_to_site_vpn_attachment.go @@ -30,7 +30,7 @@ import ( // @Testing(existsType="github.com/aws/aws-sdk-go-v2/service/networkmanager/types;awstypes;awstypes.SiteToSiteVpnAttachment") // @Testing(skipEmptyTags=true) // @Testing(randomBgpAsn="64512;65534") -// @Testing(randomIPAddress="172.0.0.0/24") +// @Testing(randomIPv4Address="172.0.0.0/24") func resourceSiteToSiteVPNAttachment() *schema.Resource { return &schema.Resource{ CreateWithoutTimeout: resourceSiteToSiteVPNAttachmentCreate, diff --git a/internal/service/networkmanager/site_to_site_vpn_attachment_tags_gen_test.go b/internal/service/networkmanager/site_to_site_vpn_attachment_tags_gen_test.go index 5638f97d235a..882753aec579 100644 --- a/internal/service/networkmanager/site_to_site_vpn_attachment_tags_gen_test.go +++ b/internal/service/networkmanager/site_to_site_vpn_attachment_tags_gen_test.go @@ -23,7 +23,7 @@ func TestAccNetworkManagerSiteToSiteVPNAttachment_tags(t *testing.T) { resourceName := "aws_networkmanager_site_to_site_vpn_attachment.test" rName := acctest.RandomWithPrefix(t, acctest.ResourcePrefix) rBgpAsn := sdkacctest.RandIntRange(64512, 65534) - rIPAddress, err := sdkacctest.RandIpAddress("172.0.0.0/24") + rIPv4Address, err := sdkacctest.RandIpAddress("172.0.0.0/24") if err != nil { t.Fatal(err) } @@ -41,8 +41,8 @@ func TestAccNetworkManagerSiteToSiteVPNAttachment_tags(t *testing.T) { acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), - "rBgpAsn": config.IntegerVariable(rBgpAsn), - "rIPAddress": config.StringVariable(rIPAddress), + "rBgpAsn": config.IntegerVariable(rBgpAsn), + "rIPv4Address": config.StringVariable(rIPv4Address), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckSiteToSiteVPNAttachmentExists(ctx, resourceName, &v), @@ -74,8 +74,8 @@ func TestAccNetworkManagerSiteToSiteVPNAttachment_tags(t *testing.T) { acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), - "rBgpAsn": config.IntegerVariable(rBgpAsn), - "rIPAddress": config.StringVariable(rIPAddress), + "rBgpAsn": config.IntegerVariable(rBgpAsn), + "rIPv4Address": config.StringVariable(rIPv4Address), }, ResourceName: resourceName, ImportState: true, @@ -89,8 +89,8 @@ func TestAccNetworkManagerSiteToSiteVPNAttachment_tags(t *testing.T) { acctest.CtKey1: config.StringVariable(acctest.CtValue1Updated), acctest.CtKey2: config.StringVariable(acctest.CtValue2), }), - "rBgpAsn": config.IntegerVariable(rBgpAsn), - "rIPAddress": config.StringVariable(rIPAddress), + "rBgpAsn": config.IntegerVariable(rBgpAsn), + "rIPv4Address": config.StringVariable(rIPv4Address), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckSiteToSiteVPNAttachmentExists(ctx, resourceName, &v), @@ -127,8 +127,8 @@ func TestAccNetworkManagerSiteToSiteVPNAttachment_tags(t *testing.T) { acctest.CtKey1: config.StringVariable(acctest.CtValue1Updated), acctest.CtKey2: config.StringVariable(acctest.CtValue2), }), - "rBgpAsn": config.IntegerVariable(rBgpAsn), - "rIPAddress": config.StringVariable(rIPAddress), + "rBgpAsn": config.IntegerVariable(rBgpAsn), + "rIPv4Address": config.StringVariable(rIPv4Address), }, ResourceName: resourceName, ImportState: true, @@ -141,8 +141,8 @@ func TestAccNetworkManagerSiteToSiteVPNAttachment_tags(t *testing.T) { acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ acctest.CtKey2: config.StringVariable(acctest.CtValue2), }), - "rBgpAsn": config.IntegerVariable(rBgpAsn), - "rIPAddress": config.StringVariable(rIPAddress), + "rBgpAsn": config.IntegerVariable(rBgpAsn), + "rIPv4Address": config.StringVariable(rIPv4Address), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckSiteToSiteVPNAttachmentExists(ctx, resourceName, &v), @@ -174,8 +174,8 @@ func TestAccNetworkManagerSiteToSiteVPNAttachment_tags(t *testing.T) { acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ acctest.CtKey2: config.StringVariable(acctest.CtValue2), }), - "rBgpAsn": config.IntegerVariable(rBgpAsn), - "rIPAddress": config.StringVariable(rIPAddress), + "rBgpAsn": config.IntegerVariable(rBgpAsn), + "rIPv4Address": config.StringVariable(rIPv4Address), }, ResourceName: resourceName, ImportState: true, @@ -187,7 +187,7 @@ func TestAccNetworkManagerSiteToSiteVPNAttachment_tags(t *testing.T) { acctest.CtRName: config.StringVariable(rName), acctest.CtResourceTags: nil, "rBgpAsn": config.IntegerVariable(rBgpAsn), - "rIPAddress": config.StringVariable(rIPAddress), + "rIPv4Address": config.StringVariable(rIPv4Address), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckSiteToSiteVPNAttachmentExists(ctx, resourceName, &v), @@ -210,7 +210,7 @@ func TestAccNetworkManagerSiteToSiteVPNAttachment_tags(t *testing.T) { acctest.CtRName: config.StringVariable(rName), acctest.CtResourceTags: nil, "rBgpAsn": config.IntegerVariable(rBgpAsn), - "rIPAddress": config.StringVariable(rIPAddress), + "rIPv4Address": config.StringVariable(rIPv4Address), }, ResourceName: resourceName, ImportState: true, @@ -226,7 +226,7 @@ func TestAccNetworkManagerSiteToSiteVPNAttachment_tags_null(t *testing.T) { resourceName := "aws_networkmanager_site_to_site_vpn_attachment.test" rName := acctest.RandomWithPrefix(t, acctest.ResourcePrefix) rBgpAsn := sdkacctest.RandIntRange(64512, 65534) - rIPAddress, err := sdkacctest.RandIpAddress("172.0.0.0/24") + rIPv4Address, err := sdkacctest.RandIpAddress("172.0.0.0/24") if err != nil { t.Fatal(err) } @@ -244,8 +244,8 @@ func TestAccNetworkManagerSiteToSiteVPNAttachment_tags_null(t *testing.T) { acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ acctest.CtKey1: nil, }), - "rBgpAsn": config.IntegerVariable(rBgpAsn), - "rIPAddress": config.StringVariable(rIPAddress), + "rBgpAsn": config.IntegerVariable(rBgpAsn), + "rIPv4Address": config.StringVariable(rIPv4Address), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckSiteToSiteVPNAttachmentExists(ctx, resourceName, &v), @@ -270,8 +270,8 @@ func TestAccNetworkManagerSiteToSiteVPNAttachment_tags_null(t *testing.T) { acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ acctest.CtKey1: nil, }), - "rBgpAsn": config.IntegerVariable(rBgpAsn), - "rIPAddress": config.StringVariable(rIPAddress), + "rBgpAsn": config.IntegerVariable(rBgpAsn), + "rIPv4Address": config.StringVariable(rIPv4Address), }, ResourceName: resourceName, ImportState: true, @@ -283,7 +283,7 @@ func TestAccNetworkManagerSiteToSiteVPNAttachment_tags_null(t *testing.T) { acctest.CtRName: config.StringVariable(rName), acctest.CtResourceTags: nil, "rBgpAsn": config.IntegerVariable(rBgpAsn), - "rIPAddress": config.StringVariable(rIPAddress), + "rIPv4Address": config.StringVariable(rIPv4Address), }, ConfigPlanChecks: resource.ConfigPlanChecks{ PreApply: []plancheck.PlanCheck{ @@ -304,7 +304,7 @@ func TestAccNetworkManagerSiteToSiteVPNAttachment_tags_EmptyMap(t *testing.T) { resourceName := "aws_networkmanager_site_to_site_vpn_attachment.test" rName := acctest.RandomWithPrefix(t, acctest.ResourcePrefix) rBgpAsn := sdkacctest.RandIntRange(64512, 65534) - rIPAddress, err := sdkacctest.RandIpAddress("172.0.0.0/24") + rIPv4Address, err := sdkacctest.RandIpAddress("172.0.0.0/24") if err != nil { t.Fatal(err) } @@ -321,7 +321,7 @@ func TestAccNetworkManagerSiteToSiteVPNAttachment_tags_EmptyMap(t *testing.T) { acctest.CtRName: config.StringVariable(rName), acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{}), "rBgpAsn": config.IntegerVariable(rBgpAsn), - "rIPAddress": config.StringVariable(rIPAddress), + "rIPv4Address": config.StringVariable(rIPv4Address), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckSiteToSiteVPNAttachmentExists(ctx, resourceName, &v), @@ -345,7 +345,7 @@ func TestAccNetworkManagerSiteToSiteVPNAttachment_tags_EmptyMap(t *testing.T) { acctest.CtRName: config.StringVariable(rName), acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{}), "rBgpAsn": config.IntegerVariable(rBgpAsn), - "rIPAddress": config.StringVariable(rIPAddress), + "rIPv4Address": config.StringVariable(rIPv4Address), }, ResourceName: resourceName, ImportState: true, @@ -357,7 +357,7 @@ func TestAccNetworkManagerSiteToSiteVPNAttachment_tags_EmptyMap(t *testing.T) { acctest.CtRName: config.StringVariable(rName), acctest.CtResourceTags: nil, "rBgpAsn": config.IntegerVariable(rBgpAsn), - "rIPAddress": config.StringVariable(rIPAddress), + "rIPv4Address": config.StringVariable(rIPv4Address), }, ConfigPlanChecks: resource.ConfigPlanChecks{ PreApply: []plancheck.PlanCheck{ @@ -378,7 +378,7 @@ func TestAccNetworkManagerSiteToSiteVPNAttachment_tags_AddOnUpdate(t *testing.T) resourceName := "aws_networkmanager_site_to_site_vpn_attachment.test" rName := acctest.RandomWithPrefix(t, acctest.ResourcePrefix) rBgpAsn := sdkacctest.RandIntRange(64512, 65534) - rIPAddress, err := sdkacctest.RandIpAddress("172.0.0.0/24") + rIPv4Address, err := sdkacctest.RandIpAddress("172.0.0.0/24") if err != nil { t.Fatal(err) } @@ -395,7 +395,7 @@ func TestAccNetworkManagerSiteToSiteVPNAttachment_tags_AddOnUpdate(t *testing.T) acctest.CtRName: config.StringVariable(rName), acctest.CtResourceTags: nil, "rBgpAsn": config.IntegerVariable(rBgpAsn), - "rIPAddress": config.StringVariable(rIPAddress), + "rIPv4Address": config.StringVariable(rIPv4Address), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckSiteToSiteVPNAttachmentExists(ctx, resourceName, &v), @@ -420,8 +420,8 @@ func TestAccNetworkManagerSiteToSiteVPNAttachment_tags_AddOnUpdate(t *testing.T) acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), - "rBgpAsn": config.IntegerVariable(rBgpAsn), - "rIPAddress": config.StringVariable(rIPAddress), + "rBgpAsn": config.IntegerVariable(rBgpAsn), + "rIPv4Address": config.StringVariable(rIPv4Address), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckSiteToSiteVPNAttachmentExists(ctx, resourceName, &v), @@ -453,8 +453,8 @@ func TestAccNetworkManagerSiteToSiteVPNAttachment_tags_AddOnUpdate(t *testing.T) acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), - "rBgpAsn": config.IntegerVariable(rBgpAsn), - "rIPAddress": config.StringVariable(rIPAddress), + "rBgpAsn": config.IntegerVariable(rBgpAsn), + "rIPv4Address": config.StringVariable(rIPv4Address), }, ResourceName: resourceName, ImportState: true, @@ -472,7 +472,7 @@ func TestAccNetworkManagerSiteToSiteVPNAttachment_tags_EmptyTag_OnCreate(t *test resourceName := "aws_networkmanager_site_to_site_vpn_attachment.test" rName := acctest.RandomWithPrefix(t, acctest.ResourcePrefix) rBgpAsn := sdkacctest.RandIntRange(64512, 65534) - rIPAddress, err := sdkacctest.RandIpAddress("172.0.0.0/24") + rIPv4Address, err := sdkacctest.RandIpAddress("172.0.0.0/24") if err != nil { t.Fatal(err) } @@ -490,8 +490,8 @@ func TestAccNetworkManagerSiteToSiteVPNAttachment_tags_EmptyTag_OnCreate(t *test acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ acctest.CtKey1: config.StringVariable(""), }), - "rBgpAsn": config.IntegerVariable(rBgpAsn), - "rIPAddress": config.StringVariable(rIPAddress), + "rBgpAsn": config.IntegerVariable(rBgpAsn), + "rIPv4Address": config.StringVariable(rIPv4Address), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckSiteToSiteVPNAttachmentExists(ctx, resourceName, &v), @@ -522,8 +522,8 @@ func TestAccNetworkManagerSiteToSiteVPNAttachment_tags_EmptyTag_OnCreate(t *test acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ acctest.CtKey1: config.StringVariable(""), }), - "rBgpAsn": config.IntegerVariable(rBgpAsn), - "rIPAddress": config.StringVariable(rIPAddress), + "rBgpAsn": config.IntegerVariable(rBgpAsn), + "rIPv4Address": config.StringVariable(rIPv4Address), }, ResourceName: resourceName, ImportState: true, @@ -535,7 +535,7 @@ func TestAccNetworkManagerSiteToSiteVPNAttachment_tags_EmptyTag_OnCreate(t *test acctest.CtRName: config.StringVariable(rName), acctest.CtResourceTags: nil, "rBgpAsn": config.IntegerVariable(rBgpAsn), - "rIPAddress": config.StringVariable(rIPAddress), + "rIPv4Address": config.StringVariable(rIPv4Address), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckSiteToSiteVPNAttachmentExists(ctx, resourceName, &v), @@ -558,7 +558,7 @@ func TestAccNetworkManagerSiteToSiteVPNAttachment_tags_EmptyTag_OnCreate(t *test acctest.CtRName: config.StringVariable(rName), acctest.CtResourceTags: nil, "rBgpAsn": config.IntegerVariable(rBgpAsn), - "rIPAddress": config.StringVariable(rIPAddress), + "rIPv4Address": config.StringVariable(rIPv4Address), }, ResourceName: resourceName, ImportState: true, @@ -576,7 +576,7 @@ func TestAccNetworkManagerSiteToSiteVPNAttachment_tags_EmptyTag_OnUpdate_Add(t * resourceName := "aws_networkmanager_site_to_site_vpn_attachment.test" rName := acctest.RandomWithPrefix(t, acctest.ResourcePrefix) rBgpAsn := sdkacctest.RandIntRange(64512, 65534) - rIPAddress, err := sdkacctest.RandIpAddress("172.0.0.0/24") + rIPv4Address, err := sdkacctest.RandIpAddress("172.0.0.0/24") if err != nil { t.Fatal(err) } @@ -594,8 +594,8 @@ func TestAccNetworkManagerSiteToSiteVPNAttachment_tags_EmptyTag_OnUpdate_Add(t * acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), - "rBgpAsn": config.IntegerVariable(rBgpAsn), - "rIPAddress": config.StringVariable(rIPAddress), + "rBgpAsn": config.IntegerVariable(rBgpAsn), + "rIPv4Address": config.StringVariable(rIPv4Address), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckSiteToSiteVPNAttachmentExists(ctx, resourceName, &v), @@ -628,8 +628,8 @@ func TestAccNetworkManagerSiteToSiteVPNAttachment_tags_EmptyTag_OnUpdate_Add(t * acctest.CtKey1: config.StringVariable(acctest.CtValue1), acctest.CtKey2: config.StringVariable(""), }), - "rBgpAsn": config.IntegerVariable(rBgpAsn), - "rIPAddress": config.StringVariable(rIPAddress), + "rBgpAsn": config.IntegerVariable(rBgpAsn), + "rIPv4Address": config.StringVariable(rIPv4Address), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckSiteToSiteVPNAttachmentExists(ctx, resourceName, &v), @@ -664,8 +664,8 @@ func TestAccNetworkManagerSiteToSiteVPNAttachment_tags_EmptyTag_OnUpdate_Add(t * acctest.CtKey1: config.StringVariable(acctest.CtValue1), acctest.CtKey2: config.StringVariable(""), }), - "rBgpAsn": config.IntegerVariable(rBgpAsn), - "rIPAddress": config.StringVariable(rIPAddress), + "rBgpAsn": config.IntegerVariable(rBgpAsn), + "rIPv4Address": config.StringVariable(rIPv4Address), }, ResourceName: resourceName, ImportState: true, @@ -678,8 +678,8 @@ func TestAccNetworkManagerSiteToSiteVPNAttachment_tags_EmptyTag_OnUpdate_Add(t * acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), - "rBgpAsn": config.IntegerVariable(rBgpAsn), - "rIPAddress": config.StringVariable(rIPAddress), + "rBgpAsn": config.IntegerVariable(rBgpAsn), + "rIPv4Address": config.StringVariable(rIPv4Address), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckSiteToSiteVPNAttachmentExists(ctx, resourceName, &v), @@ -711,8 +711,8 @@ func TestAccNetworkManagerSiteToSiteVPNAttachment_tags_EmptyTag_OnUpdate_Add(t * acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), - "rBgpAsn": config.IntegerVariable(rBgpAsn), - "rIPAddress": config.StringVariable(rIPAddress), + "rBgpAsn": config.IntegerVariable(rBgpAsn), + "rIPv4Address": config.StringVariable(rIPv4Address), }, ResourceName: resourceName, ImportState: true, @@ -730,7 +730,7 @@ func TestAccNetworkManagerSiteToSiteVPNAttachment_tags_EmptyTag_OnUpdate_Replace resourceName := "aws_networkmanager_site_to_site_vpn_attachment.test" rName := acctest.RandomWithPrefix(t, acctest.ResourcePrefix) rBgpAsn := sdkacctest.RandIntRange(64512, 65534) - rIPAddress, err := sdkacctest.RandIpAddress("172.0.0.0/24") + rIPv4Address, err := sdkacctest.RandIpAddress("172.0.0.0/24") if err != nil { t.Fatal(err) } @@ -748,8 +748,8 @@ func TestAccNetworkManagerSiteToSiteVPNAttachment_tags_EmptyTag_OnUpdate_Replace acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), - "rBgpAsn": config.IntegerVariable(rBgpAsn), - "rIPAddress": config.StringVariable(rIPAddress), + "rBgpAsn": config.IntegerVariable(rBgpAsn), + "rIPv4Address": config.StringVariable(rIPv4Address), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckSiteToSiteVPNAttachmentExists(ctx, resourceName, &v), @@ -781,8 +781,8 @@ func TestAccNetworkManagerSiteToSiteVPNAttachment_tags_EmptyTag_OnUpdate_Replace acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ acctest.CtKey1: config.StringVariable(""), }), - "rBgpAsn": config.IntegerVariable(rBgpAsn), - "rIPAddress": config.StringVariable(rIPAddress), + "rBgpAsn": config.IntegerVariable(rBgpAsn), + "rIPv4Address": config.StringVariable(rIPv4Address), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckSiteToSiteVPNAttachmentExists(ctx, resourceName, &v), @@ -813,8 +813,8 @@ func TestAccNetworkManagerSiteToSiteVPNAttachment_tags_EmptyTag_OnUpdate_Replace acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ acctest.CtKey1: config.StringVariable(""), }), - "rBgpAsn": config.IntegerVariable(rBgpAsn), - "rIPAddress": config.StringVariable(rIPAddress), + "rBgpAsn": config.IntegerVariable(rBgpAsn), + "rIPv4Address": config.StringVariable(rIPv4Address), }, ResourceName: resourceName, ImportState: true, @@ -830,7 +830,7 @@ func TestAccNetworkManagerSiteToSiteVPNAttachment_tags_DefaultTags_providerOnly( resourceName := "aws_networkmanager_site_to_site_vpn_attachment.test" rName := acctest.RandomWithPrefix(t, acctest.ResourcePrefix) rBgpAsn := sdkacctest.RandIntRange(64512, 65534) - rIPAddress, err := sdkacctest.RandIpAddress("172.0.0.0/24") + rIPv4Address, err := sdkacctest.RandIpAddress("172.0.0.0/24") if err != nil { t.Fatal(err) } @@ -850,7 +850,7 @@ func TestAccNetworkManagerSiteToSiteVPNAttachment_tags_DefaultTags_providerOnly( }), acctest.CtResourceTags: nil, "rBgpAsn": config.IntegerVariable(rBgpAsn), - "rIPAddress": config.StringVariable(rIPAddress), + "rIPv4Address": config.StringVariable(rIPv4Address), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckSiteToSiteVPNAttachmentExists(ctx, resourceName, &v), @@ -881,7 +881,7 @@ func TestAccNetworkManagerSiteToSiteVPNAttachment_tags_DefaultTags_providerOnly( }), acctest.CtResourceTags: nil, "rBgpAsn": config.IntegerVariable(rBgpAsn), - "rIPAddress": config.StringVariable(rIPAddress), + "rIPv4Address": config.StringVariable(rIPv4Address), }, ResourceName: resourceName, ImportState: true, @@ -898,7 +898,7 @@ func TestAccNetworkManagerSiteToSiteVPNAttachment_tags_DefaultTags_providerOnly( }), acctest.CtResourceTags: nil, "rBgpAsn": config.IntegerVariable(rBgpAsn), - "rIPAddress": config.StringVariable(rIPAddress), + "rIPv4Address": config.StringVariable(rIPv4Address), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckSiteToSiteVPNAttachmentExists(ctx, resourceName, &v), @@ -932,7 +932,7 @@ func TestAccNetworkManagerSiteToSiteVPNAttachment_tags_DefaultTags_providerOnly( }), acctest.CtResourceTags: nil, "rBgpAsn": config.IntegerVariable(rBgpAsn), - "rIPAddress": config.StringVariable(rIPAddress), + "rIPv4Address": config.StringVariable(rIPv4Address), }, ResourceName: resourceName, ImportState: true, @@ -948,7 +948,7 @@ func TestAccNetworkManagerSiteToSiteVPNAttachment_tags_DefaultTags_providerOnly( }), acctest.CtResourceTags: nil, "rBgpAsn": config.IntegerVariable(rBgpAsn), - "rIPAddress": config.StringVariable(rIPAddress), + "rIPv4Address": config.StringVariable(rIPv4Address), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckSiteToSiteVPNAttachmentExists(ctx, resourceName, &v), @@ -979,7 +979,7 @@ func TestAccNetworkManagerSiteToSiteVPNAttachment_tags_DefaultTags_providerOnly( }), acctest.CtResourceTags: nil, "rBgpAsn": config.IntegerVariable(rBgpAsn), - "rIPAddress": config.StringVariable(rIPAddress), + "rIPv4Address": config.StringVariable(rIPv4Address), }, ResourceName: resourceName, ImportState: true, @@ -992,7 +992,7 @@ func TestAccNetworkManagerSiteToSiteVPNAttachment_tags_DefaultTags_providerOnly( acctest.CtRName: config.StringVariable(rName), acctest.CtResourceTags: nil, "rBgpAsn": config.IntegerVariable(rBgpAsn), - "rIPAddress": config.StringVariable(rIPAddress), + "rIPv4Address": config.StringVariable(rIPv4Address), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckSiteToSiteVPNAttachmentExists(ctx, resourceName, &v), @@ -1016,7 +1016,7 @@ func TestAccNetworkManagerSiteToSiteVPNAttachment_tags_DefaultTags_providerOnly( acctest.CtRName: config.StringVariable(rName), acctest.CtResourceTags: nil, "rBgpAsn": config.IntegerVariable(rBgpAsn), - "rIPAddress": config.StringVariable(rIPAddress), + "rIPv4Address": config.StringVariable(rIPv4Address), }, ResourceName: resourceName, ImportState: true, @@ -1032,7 +1032,7 @@ func TestAccNetworkManagerSiteToSiteVPNAttachment_tags_DefaultTags_nonOverlappin resourceName := "aws_networkmanager_site_to_site_vpn_attachment.test" rName := acctest.RandomWithPrefix(t, acctest.ResourcePrefix) rBgpAsn := sdkacctest.RandIntRange(64512, 65534) - rIPAddress, err := sdkacctest.RandIpAddress("172.0.0.0/24") + rIPv4Address, err := sdkacctest.RandIpAddress("172.0.0.0/24") if err != nil { t.Fatal(err) } @@ -1053,8 +1053,8 @@ func TestAccNetworkManagerSiteToSiteVPNAttachment_tags_DefaultTags_nonOverlappin acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ acctest.CtResourceKey1: config.StringVariable(acctest.CtResourceValue1), }), - "rBgpAsn": config.IntegerVariable(rBgpAsn), - "rIPAddress": config.StringVariable(rIPAddress), + "rBgpAsn": config.IntegerVariable(rBgpAsn), + "rIPv4Address": config.StringVariable(rIPv4Address), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckSiteToSiteVPNAttachmentExists(ctx, resourceName, &v), @@ -1092,8 +1092,8 @@ func TestAccNetworkManagerSiteToSiteVPNAttachment_tags_DefaultTags_nonOverlappin acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ acctest.CtResourceKey1: config.StringVariable(acctest.CtResourceValue1), }), - "rBgpAsn": config.IntegerVariable(rBgpAsn), - "rIPAddress": config.StringVariable(rIPAddress), + "rBgpAsn": config.IntegerVariable(rBgpAsn), + "rIPv4Address": config.StringVariable(rIPv4Address), }, ResourceName: resourceName, ImportState: true, @@ -1111,8 +1111,8 @@ func TestAccNetworkManagerSiteToSiteVPNAttachment_tags_DefaultTags_nonOverlappin acctest.CtResourceKey1: config.StringVariable(acctest.CtResourceValue1Updated), acctest.CtResourceKey2: config.StringVariable(acctest.CtResourceValue2), }), - "rBgpAsn": config.IntegerVariable(rBgpAsn), - "rIPAddress": config.StringVariable(rIPAddress), + "rBgpAsn": config.IntegerVariable(rBgpAsn), + "rIPv4Address": config.StringVariable(rIPv4Address), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckSiteToSiteVPNAttachmentExists(ctx, resourceName, &v), @@ -1155,8 +1155,8 @@ func TestAccNetworkManagerSiteToSiteVPNAttachment_tags_DefaultTags_nonOverlappin acctest.CtResourceKey1: config.StringVariable(acctest.CtResourceValue1Updated), acctest.CtResourceKey2: config.StringVariable(acctest.CtResourceValue2), }), - "rBgpAsn": config.IntegerVariable(rBgpAsn), - "rIPAddress": config.StringVariable(rIPAddress), + "rBgpAsn": config.IntegerVariable(rBgpAsn), + "rIPv4Address": config.StringVariable(rIPv4Address), }, ResourceName: resourceName, ImportState: true, @@ -1169,7 +1169,7 @@ func TestAccNetworkManagerSiteToSiteVPNAttachment_tags_DefaultTags_nonOverlappin acctest.CtRName: config.StringVariable(rName), acctest.CtResourceTags: nil, "rBgpAsn": config.IntegerVariable(rBgpAsn), - "rIPAddress": config.StringVariable(rIPAddress), + "rIPv4Address": config.StringVariable(rIPv4Address), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckSiteToSiteVPNAttachmentExists(ctx, resourceName, &v), @@ -1193,7 +1193,7 @@ func TestAccNetworkManagerSiteToSiteVPNAttachment_tags_DefaultTags_nonOverlappin acctest.CtRName: config.StringVariable(rName), acctest.CtResourceTags: nil, "rBgpAsn": config.IntegerVariable(rBgpAsn), - "rIPAddress": config.StringVariable(rIPAddress), + "rIPv4Address": config.StringVariable(rIPv4Address), }, ResourceName: resourceName, ImportState: true, @@ -1209,7 +1209,7 @@ func TestAccNetworkManagerSiteToSiteVPNAttachment_tags_DefaultTags_overlapping(t resourceName := "aws_networkmanager_site_to_site_vpn_attachment.test" rName := acctest.RandomWithPrefix(t, acctest.ResourcePrefix) rBgpAsn := sdkacctest.RandIntRange(64512, 65534) - rIPAddress, err := sdkacctest.RandIpAddress("172.0.0.0/24") + rIPv4Address, err := sdkacctest.RandIpAddress("172.0.0.0/24") if err != nil { t.Fatal(err) } @@ -1230,8 +1230,8 @@ func TestAccNetworkManagerSiteToSiteVPNAttachment_tags_DefaultTags_overlapping(t acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ acctest.CtOverlapKey1: config.StringVariable(acctest.CtResourceValue1), }), - "rBgpAsn": config.IntegerVariable(rBgpAsn), - "rIPAddress": config.StringVariable(rIPAddress), + "rBgpAsn": config.IntegerVariable(rBgpAsn), + "rIPv4Address": config.StringVariable(rIPv4Address), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckSiteToSiteVPNAttachmentExists(ctx, resourceName, &v), @@ -1267,8 +1267,8 @@ func TestAccNetworkManagerSiteToSiteVPNAttachment_tags_DefaultTags_overlapping(t acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ acctest.CtOverlapKey1: config.StringVariable(acctest.CtResourceValue1), }), - "rBgpAsn": config.IntegerVariable(rBgpAsn), - "rIPAddress": config.StringVariable(rIPAddress), + "rBgpAsn": config.IntegerVariable(rBgpAsn), + "rIPv4Address": config.StringVariable(rIPv4Address), }, ResourceName: resourceName, ImportState: true, @@ -1287,8 +1287,8 @@ func TestAccNetworkManagerSiteToSiteVPNAttachment_tags_DefaultTags_overlapping(t acctest.CtOverlapKey1: config.StringVariable(acctest.CtResourceValue1), acctest.CtOverlapKey2: config.StringVariable(acctest.CtResourceValue2), }), - "rBgpAsn": config.IntegerVariable(rBgpAsn), - "rIPAddress": config.StringVariable(rIPAddress), + "rBgpAsn": config.IntegerVariable(rBgpAsn), + "rIPv4Address": config.StringVariable(rIPv4Address), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckSiteToSiteVPNAttachmentExists(ctx, resourceName, &v), @@ -1330,8 +1330,8 @@ func TestAccNetworkManagerSiteToSiteVPNAttachment_tags_DefaultTags_overlapping(t acctest.CtOverlapKey1: config.StringVariable(acctest.CtResourceValue1), acctest.CtOverlapKey2: config.StringVariable(acctest.CtResourceValue2), }), - "rBgpAsn": config.IntegerVariable(rBgpAsn), - "rIPAddress": config.StringVariable(rIPAddress), + "rBgpAsn": config.IntegerVariable(rBgpAsn), + "rIPv4Address": config.StringVariable(rIPv4Address), }, ResourceName: resourceName, ImportState: true, @@ -1348,8 +1348,8 @@ func TestAccNetworkManagerSiteToSiteVPNAttachment_tags_DefaultTags_overlapping(t acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ acctest.CtOverlapKey1: config.StringVariable(acctest.CtResourceValue2), }), - "rBgpAsn": config.IntegerVariable(rBgpAsn), - "rIPAddress": config.StringVariable(rIPAddress), + "rBgpAsn": config.IntegerVariable(rBgpAsn), + "rIPv4Address": config.StringVariable(rIPv4Address), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckSiteToSiteVPNAttachmentExists(ctx, resourceName, &v), @@ -1385,8 +1385,8 @@ func TestAccNetworkManagerSiteToSiteVPNAttachment_tags_DefaultTags_overlapping(t acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ acctest.CtOverlapKey1: config.StringVariable(acctest.CtResourceValue2), }), - "rBgpAsn": config.IntegerVariable(rBgpAsn), - "rIPAddress": config.StringVariable(rIPAddress), + "rBgpAsn": config.IntegerVariable(rBgpAsn), + "rIPv4Address": config.StringVariable(rIPv4Address), }, ResourceName: resourceName, ImportState: true, @@ -1402,7 +1402,7 @@ func TestAccNetworkManagerSiteToSiteVPNAttachment_tags_DefaultTags_updateToProvi resourceName := "aws_networkmanager_site_to_site_vpn_attachment.test" rName := acctest.RandomWithPrefix(t, acctest.ResourcePrefix) rBgpAsn := sdkacctest.RandIntRange(64512, 65534) - rIPAddress, err := sdkacctest.RandIpAddress("172.0.0.0/24") + rIPv4Address, err := sdkacctest.RandIpAddress("172.0.0.0/24") if err != nil { t.Fatal(err) } @@ -1420,8 +1420,8 @@ func TestAccNetworkManagerSiteToSiteVPNAttachment_tags_DefaultTags_updateToProvi acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), - "rBgpAsn": config.IntegerVariable(rBgpAsn), - "rIPAddress": config.StringVariable(rIPAddress), + "rBgpAsn": config.IntegerVariable(rBgpAsn), + "rIPv4Address": config.StringVariable(rIPv4Address), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckSiteToSiteVPNAttachmentExists(ctx, resourceName, &v), @@ -1456,7 +1456,7 @@ func TestAccNetworkManagerSiteToSiteVPNAttachment_tags_DefaultTags_updateToProvi }), acctest.CtResourceTags: nil, "rBgpAsn": config.IntegerVariable(rBgpAsn), - "rIPAddress": config.StringVariable(rIPAddress), + "rIPv4Address": config.StringVariable(rIPv4Address), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckSiteToSiteVPNAttachmentExists(ctx, resourceName, &v), @@ -1487,7 +1487,7 @@ func TestAccNetworkManagerSiteToSiteVPNAttachment_tags_DefaultTags_updateToProvi }), acctest.CtResourceTags: nil, "rBgpAsn": config.IntegerVariable(rBgpAsn), - "rIPAddress": config.StringVariable(rIPAddress), + "rIPv4Address": config.StringVariable(rIPv4Address), }, ResourceName: resourceName, ImportState: true, @@ -1503,7 +1503,7 @@ func TestAccNetworkManagerSiteToSiteVPNAttachment_tags_DefaultTags_updateToResou resourceName := "aws_networkmanager_site_to_site_vpn_attachment.test" rName := acctest.RandomWithPrefix(t, acctest.ResourcePrefix) rBgpAsn := sdkacctest.RandIntRange(64512, 65534) - rIPAddress, err := sdkacctest.RandIpAddress("172.0.0.0/24") + rIPv4Address, err := sdkacctest.RandIpAddress("172.0.0.0/24") if err != nil { t.Fatal(err) } @@ -1523,7 +1523,7 @@ func TestAccNetworkManagerSiteToSiteVPNAttachment_tags_DefaultTags_updateToResou }), acctest.CtResourceTags: nil, "rBgpAsn": config.IntegerVariable(rBgpAsn), - "rIPAddress": config.StringVariable(rIPAddress), + "rIPv4Address": config.StringVariable(rIPv4Address), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckSiteToSiteVPNAttachmentExists(ctx, resourceName, &v), @@ -1552,8 +1552,8 @@ func TestAccNetworkManagerSiteToSiteVPNAttachment_tags_DefaultTags_updateToResou acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), - "rBgpAsn": config.IntegerVariable(rBgpAsn), - "rIPAddress": config.StringVariable(rIPAddress), + "rBgpAsn": config.IntegerVariable(rBgpAsn), + "rIPv4Address": config.StringVariable(rIPv4Address), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckSiteToSiteVPNAttachmentExists(ctx, resourceName, &v), @@ -1586,8 +1586,8 @@ func TestAccNetworkManagerSiteToSiteVPNAttachment_tags_DefaultTags_updateToResou acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), - "rBgpAsn": config.IntegerVariable(rBgpAsn), - "rIPAddress": config.StringVariable(rIPAddress), + "rBgpAsn": config.IntegerVariable(rBgpAsn), + "rIPv4Address": config.StringVariable(rIPv4Address), }, ResourceName: resourceName, ImportState: true, @@ -1605,7 +1605,7 @@ func TestAccNetworkManagerSiteToSiteVPNAttachment_tags_DefaultTags_emptyResource resourceName := "aws_networkmanager_site_to_site_vpn_attachment.test" rName := acctest.RandomWithPrefix(t, acctest.ResourcePrefix) rBgpAsn := sdkacctest.RandIntRange(64512, 65534) - rIPAddress, err := sdkacctest.RandIpAddress("172.0.0.0/24") + rIPv4Address, err := sdkacctest.RandIpAddress("172.0.0.0/24") if err != nil { t.Fatal(err) } @@ -1626,8 +1626,8 @@ func TestAccNetworkManagerSiteToSiteVPNAttachment_tags_DefaultTags_emptyResource acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ acctest.CtKey1: config.StringVariable(""), }), - "rBgpAsn": config.IntegerVariable(rBgpAsn), - "rIPAddress": config.StringVariable(rIPAddress), + "rBgpAsn": config.IntegerVariable(rBgpAsn), + "rIPv4Address": config.StringVariable(rIPv4Address), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckSiteToSiteVPNAttachmentExists(ctx, resourceName, &v), @@ -1662,8 +1662,8 @@ func TestAccNetworkManagerSiteToSiteVPNAttachment_tags_DefaultTags_emptyResource acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ acctest.CtKey1: config.StringVariable(""), }), - "rBgpAsn": config.IntegerVariable(rBgpAsn), - "rIPAddress": config.StringVariable(rIPAddress), + "rBgpAsn": config.IntegerVariable(rBgpAsn), + "rIPv4Address": config.StringVariable(rIPv4Address), }, ResourceName: resourceName, ImportState: true, @@ -1681,7 +1681,7 @@ func TestAccNetworkManagerSiteToSiteVPNAttachment_tags_DefaultTags_emptyProvider resourceName := "aws_networkmanager_site_to_site_vpn_attachment.test" rName := acctest.RandomWithPrefix(t, acctest.ResourcePrefix) rBgpAsn := sdkacctest.RandIntRange(64512, 65534) - rIPAddress, err := sdkacctest.RandIpAddress("172.0.0.0/24") + rIPv4Address, err := sdkacctest.RandIpAddress("172.0.0.0/24") if err != nil { t.Fatal(err) } @@ -1701,7 +1701,7 @@ func TestAccNetworkManagerSiteToSiteVPNAttachment_tags_DefaultTags_emptyProvider }), acctest.CtResourceTags: nil, "rBgpAsn": config.IntegerVariable(rBgpAsn), - "rIPAddress": config.StringVariable(rIPAddress), + "rIPv4Address": config.StringVariable(rIPv4Address), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckSiteToSiteVPNAttachmentExists(ctx, resourceName, &v), @@ -1731,7 +1731,7 @@ func TestAccNetworkManagerSiteToSiteVPNAttachment_tags_DefaultTags_emptyProvider }), acctest.CtResourceTags: nil, "rBgpAsn": config.IntegerVariable(rBgpAsn), - "rIPAddress": config.StringVariable(rIPAddress), + "rIPv4Address": config.StringVariable(rIPv4Address), }, ResourceName: resourceName, ImportState: true, @@ -1747,7 +1747,7 @@ func TestAccNetworkManagerSiteToSiteVPNAttachment_tags_DefaultTags_nullOverlappi resourceName := "aws_networkmanager_site_to_site_vpn_attachment.test" rName := acctest.RandomWithPrefix(t, acctest.ResourcePrefix) rBgpAsn := sdkacctest.RandIntRange(64512, 65534) - rIPAddress, err := sdkacctest.RandIpAddress("172.0.0.0/24") + rIPv4Address, err := sdkacctest.RandIpAddress("172.0.0.0/24") if err != nil { t.Fatal(err) } @@ -1768,8 +1768,8 @@ func TestAccNetworkManagerSiteToSiteVPNAttachment_tags_DefaultTags_nullOverlappi acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ acctest.CtKey1: nil, }), - "rBgpAsn": config.IntegerVariable(rBgpAsn), - "rIPAddress": config.StringVariable(rIPAddress), + "rBgpAsn": config.IntegerVariable(rBgpAsn), + "rIPv4Address": config.StringVariable(rIPv4Address), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckSiteToSiteVPNAttachmentExists(ctx, resourceName, &v), @@ -1801,8 +1801,8 @@ func TestAccNetworkManagerSiteToSiteVPNAttachment_tags_DefaultTags_nullOverlappi acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ acctest.CtKey1: nil, }), - "rBgpAsn": config.IntegerVariable(rBgpAsn), - "rIPAddress": config.StringVariable(rIPAddress), + "rBgpAsn": config.IntegerVariable(rBgpAsn), + "rIPv4Address": config.StringVariable(rIPv4Address), }, ResourceName: resourceName, ImportState: true, @@ -1818,7 +1818,7 @@ func TestAccNetworkManagerSiteToSiteVPNAttachment_tags_DefaultTags_nullNonOverla resourceName := "aws_networkmanager_site_to_site_vpn_attachment.test" rName := acctest.RandomWithPrefix(t, acctest.ResourcePrefix) rBgpAsn := sdkacctest.RandIntRange(64512, 65534) - rIPAddress, err := sdkacctest.RandIpAddress("172.0.0.0/24") + rIPv4Address, err := sdkacctest.RandIpAddress("172.0.0.0/24") if err != nil { t.Fatal(err) } @@ -1839,8 +1839,8 @@ func TestAccNetworkManagerSiteToSiteVPNAttachment_tags_DefaultTags_nullNonOverla acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ acctest.CtResourceKey1: nil, }), - "rBgpAsn": config.IntegerVariable(rBgpAsn), - "rIPAddress": config.StringVariable(rIPAddress), + "rBgpAsn": config.IntegerVariable(rBgpAsn), + "rIPv4Address": config.StringVariable(rIPv4Address), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckSiteToSiteVPNAttachmentExists(ctx, resourceName, &v), @@ -1872,8 +1872,8 @@ func TestAccNetworkManagerSiteToSiteVPNAttachment_tags_DefaultTags_nullNonOverla acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ acctest.CtResourceKey1: nil, }), - "rBgpAsn": config.IntegerVariable(rBgpAsn), - "rIPAddress": config.StringVariable(rIPAddress), + "rBgpAsn": config.IntegerVariable(rBgpAsn), + "rIPv4Address": config.StringVariable(rIPv4Address), }, ResourceName: resourceName, ImportState: true, @@ -1889,7 +1889,7 @@ func TestAccNetworkManagerSiteToSiteVPNAttachment_tags_ComputedTag_OnCreate(t *t resourceName := "aws_networkmanager_site_to_site_vpn_attachment.test" rName := acctest.RandomWithPrefix(t, acctest.ResourcePrefix) rBgpAsn := sdkacctest.RandIntRange(64512, 65534) - rIPAddress, err := sdkacctest.RandIpAddress("172.0.0.0/24") + rIPv4Address, err := sdkacctest.RandIpAddress("172.0.0.0/24") if err != nil { t.Fatal(err) } @@ -1906,7 +1906,7 @@ func TestAccNetworkManagerSiteToSiteVPNAttachment_tags_ComputedTag_OnCreate(t *t acctest.CtRName: config.StringVariable(rName), "unknownTagKey": config.StringVariable("computedkey1"), "rBgpAsn": config.IntegerVariable(rBgpAsn), - "rIPAddress": config.StringVariable(rIPAddress), + "rIPv4Address": config.StringVariable(rIPv4Address), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckSiteToSiteVPNAttachmentExists(ctx, resourceName, &v), @@ -1937,7 +1937,7 @@ func TestAccNetworkManagerSiteToSiteVPNAttachment_tags_ComputedTag_OnCreate(t *t acctest.CtRName: config.StringVariable(rName), "unknownTagKey": config.StringVariable("computedkey1"), "rBgpAsn": config.IntegerVariable(rBgpAsn), - "rIPAddress": config.StringVariable(rIPAddress), + "rIPv4Address": config.StringVariable(rIPv4Address), }, ResourceName: resourceName, ImportState: true, @@ -1953,7 +1953,7 @@ func TestAccNetworkManagerSiteToSiteVPNAttachment_tags_ComputedTag_OnUpdate_Add( resourceName := "aws_networkmanager_site_to_site_vpn_attachment.test" rName := acctest.RandomWithPrefix(t, acctest.ResourcePrefix) rBgpAsn := sdkacctest.RandIntRange(64512, 65534) - rIPAddress, err := sdkacctest.RandIpAddress("172.0.0.0/24") + rIPv4Address, err := sdkacctest.RandIpAddress("172.0.0.0/24") if err != nil { t.Fatal(err) } @@ -1971,8 +1971,8 @@ func TestAccNetworkManagerSiteToSiteVPNAttachment_tags_ComputedTag_OnUpdate_Add( acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), - "rBgpAsn": config.IntegerVariable(rBgpAsn), - "rIPAddress": config.StringVariable(rIPAddress), + "rBgpAsn": config.IntegerVariable(rBgpAsn), + "rIPv4Address": config.StringVariable(rIPv4Address), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckSiteToSiteVPNAttachmentExists(ctx, resourceName, &v), @@ -2006,7 +2006,7 @@ func TestAccNetworkManagerSiteToSiteVPNAttachment_tags_ComputedTag_OnUpdate_Add( "knownTagKey": config.StringVariable(acctest.CtKey1), "knownTagValue": config.StringVariable(acctest.CtValue1), "rBgpAsn": config.IntegerVariable(rBgpAsn), - "rIPAddress": config.StringVariable(rIPAddress), + "rIPv4Address": config.StringVariable(rIPv4Address), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckSiteToSiteVPNAttachmentExists(ctx, resourceName, &v), @@ -2045,7 +2045,7 @@ func TestAccNetworkManagerSiteToSiteVPNAttachment_tags_ComputedTag_OnUpdate_Add( "knownTagKey": config.StringVariable(acctest.CtKey1), "knownTagValue": config.StringVariable(acctest.CtValue1), "rBgpAsn": config.IntegerVariable(rBgpAsn), - "rIPAddress": config.StringVariable(rIPAddress), + "rIPv4Address": config.StringVariable(rIPv4Address), }, ResourceName: resourceName, ImportState: true, @@ -2061,7 +2061,7 @@ func TestAccNetworkManagerSiteToSiteVPNAttachment_tags_ComputedTag_OnUpdate_Repl resourceName := "aws_networkmanager_site_to_site_vpn_attachment.test" rName := acctest.RandomWithPrefix(t, acctest.ResourcePrefix) rBgpAsn := sdkacctest.RandIntRange(64512, 65534) - rIPAddress, err := sdkacctest.RandIpAddress("172.0.0.0/24") + rIPv4Address, err := sdkacctest.RandIpAddress("172.0.0.0/24") if err != nil { t.Fatal(err) } @@ -2079,8 +2079,8 @@ func TestAccNetworkManagerSiteToSiteVPNAttachment_tags_ComputedTag_OnUpdate_Repl acctest.CtResourceTags: config.MapVariable(map[string]config.Variable{ acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), - "rBgpAsn": config.IntegerVariable(rBgpAsn), - "rIPAddress": config.StringVariable(rIPAddress), + "rBgpAsn": config.IntegerVariable(rBgpAsn), + "rIPv4Address": config.StringVariable(rIPv4Address), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckSiteToSiteVPNAttachmentExists(ctx, resourceName, &v), @@ -2112,7 +2112,7 @@ func TestAccNetworkManagerSiteToSiteVPNAttachment_tags_ComputedTag_OnUpdate_Repl acctest.CtRName: config.StringVariable(rName), "unknownTagKey": config.StringVariable(acctest.CtKey1), "rBgpAsn": config.IntegerVariable(rBgpAsn), - "rIPAddress": config.StringVariable(rIPAddress), + "rIPv4Address": config.StringVariable(rIPv4Address), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckSiteToSiteVPNAttachmentExists(ctx, resourceName, &v), @@ -2143,7 +2143,7 @@ func TestAccNetworkManagerSiteToSiteVPNAttachment_tags_ComputedTag_OnUpdate_Repl acctest.CtRName: config.StringVariable(rName), "unknownTagKey": config.StringVariable(acctest.CtKey1), "rBgpAsn": config.IntegerVariable(rBgpAsn), - "rIPAddress": config.StringVariable(rIPAddress), + "rIPv4Address": config.StringVariable(rIPv4Address), }, ResourceName: resourceName, ImportState: true, @@ -2159,7 +2159,7 @@ func TestAccNetworkManagerSiteToSiteVPNAttachment_tags_IgnoreTags_Overlap_Defaul resourceName := "aws_networkmanager_site_to_site_vpn_attachment.test" rName := acctest.RandomWithPrefix(t, acctest.ResourcePrefix) rBgpAsn := sdkacctest.RandIntRange(64512, 65534) - rIPAddress, err := sdkacctest.RandIpAddress("172.0.0.0/24") + rIPv4Address, err := sdkacctest.RandIpAddress("172.0.0.0/24") if err != nil { t.Fatal(err) } @@ -2184,8 +2184,8 @@ func TestAccNetworkManagerSiteToSiteVPNAttachment_tags_IgnoreTags_Overlap_Defaul "ignore_tag_keys": config.SetVariable( config.StringVariable(acctest.CtProviderKey1), ), - "rBgpAsn": config.IntegerVariable(rBgpAsn), - "rIPAddress": config.StringVariable(rIPAddress), + "rBgpAsn": config.IntegerVariable(rBgpAsn), + "rIPv4Address": config.StringVariable(rIPv4Address), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckSiteToSiteVPNAttachmentExists(ctx, resourceName, &v), @@ -2235,8 +2235,8 @@ func TestAccNetworkManagerSiteToSiteVPNAttachment_tags_IgnoreTags_Overlap_Defaul "ignore_tag_keys": config.SetVariable( config.StringVariable(acctest.CtProviderKey1), ), - "rBgpAsn": config.IntegerVariable(rBgpAsn), - "rIPAddress": config.StringVariable(rIPAddress), + "rBgpAsn": config.IntegerVariable(rBgpAsn), + "rIPv4Address": config.StringVariable(rIPv4Address), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckSiteToSiteVPNAttachmentExists(ctx, resourceName, &v), @@ -2286,8 +2286,8 @@ func TestAccNetworkManagerSiteToSiteVPNAttachment_tags_IgnoreTags_Overlap_Defaul "ignore_tag_keys": config.SetVariable( config.StringVariable(acctest.CtProviderKey1), ), - "rBgpAsn": config.IntegerVariable(rBgpAsn), - "rIPAddress": config.StringVariable(rIPAddress), + "rBgpAsn": config.IntegerVariable(rBgpAsn), + "rIPv4Address": config.StringVariable(rIPv4Address), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckSiteToSiteVPNAttachmentExists(ctx, resourceName, &v), @@ -2332,7 +2332,7 @@ func TestAccNetworkManagerSiteToSiteVPNAttachment_tags_IgnoreTags_Overlap_Resour resourceName := "aws_networkmanager_site_to_site_vpn_attachment.test" rName := acctest.RandomWithPrefix(t, acctest.ResourcePrefix) rBgpAsn := sdkacctest.RandIntRange(64512, 65534) - rIPAddress, err := sdkacctest.RandIpAddress("172.0.0.0/24") + rIPv4Address, err := sdkacctest.RandIpAddress("172.0.0.0/24") if err != nil { t.Fatal(err) } @@ -2355,8 +2355,8 @@ func TestAccNetworkManagerSiteToSiteVPNAttachment_tags_IgnoreTags_Overlap_Resour "ignore_tag_keys": config.SetVariable( config.StringVariable(acctest.CtResourceKey1), ), - "rBgpAsn": config.IntegerVariable(rBgpAsn), - "rIPAddress": config.StringVariable(rIPAddress), + "rBgpAsn": config.IntegerVariable(rBgpAsn), + "rIPv4Address": config.StringVariable(rIPv4Address), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckSiteToSiteVPNAttachmentExists(ctx, resourceName, &v), @@ -2420,8 +2420,8 @@ func TestAccNetworkManagerSiteToSiteVPNAttachment_tags_IgnoreTags_Overlap_Resour "ignore_tag_keys": config.SetVariable( config.StringVariable(acctest.CtResourceKey1), ), - "rBgpAsn": config.IntegerVariable(rBgpAsn), - "rIPAddress": config.StringVariable(rIPAddress), + "rBgpAsn": config.IntegerVariable(rBgpAsn), + "rIPv4Address": config.StringVariable(rIPv4Address), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckSiteToSiteVPNAttachmentExists(ctx, resourceName, &v), @@ -2485,8 +2485,8 @@ func TestAccNetworkManagerSiteToSiteVPNAttachment_tags_IgnoreTags_Overlap_Resour "ignore_tag_keys": config.SetVariable( config.StringVariable(acctest.CtResourceKey1), ), - "rBgpAsn": config.IntegerVariable(rBgpAsn), - "rIPAddress": config.StringVariable(rIPAddress), + "rBgpAsn": config.IntegerVariable(rBgpAsn), + "rIPv4Address": config.StringVariable(rIPv4Address), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckSiteToSiteVPNAttachmentExists(ctx, resourceName, &v), diff --git a/internal/service/networkmanager/testdata/SiteToSiteVPNAttachment/tags/main_gen.tf b/internal/service/networkmanager/testdata/SiteToSiteVPNAttachment/tags/main_gen.tf index 05139b40e4e5..6b4b3581dee8 100644 --- a/internal/service/networkmanager/testdata/SiteToSiteVPNAttachment/tags/main_gen.tf +++ b/internal/service/networkmanager/testdata/SiteToSiteVPNAttachment/tags/main_gen.tf @@ -17,7 +17,7 @@ resource "aws_networkmanager_attachment_accepter" "test" { resource "aws_customer_gateway" "test" { bgp_asn = var.rBgpAsn - ip_address = var.rIPAddress + ip_address = var.rIPv4Address type = "ipsec.1" device_name = var.rName } @@ -92,7 +92,7 @@ variable "rBgpAsn" { nullable = false } -variable "rIPAddress" { +variable "rIPv4Address" { type = string nullable = false } diff --git a/internal/service/networkmanager/testdata/SiteToSiteVPNAttachment/tagsComputed1/main_gen.tf b/internal/service/networkmanager/testdata/SiteToSiteVPNAttachment/tagsComputed1/main_gen.tf index 2313819fba11..f4965cf58343 100644 --- a/internal/service/networkmanager/testdata/SiteToSiteVPNAttachment/tagsComputed1/main_gen.tf +++ b/internal/service/networkmanager/testdata/SiteToSiteVPNAttachment/tagsComputed1/main_gen.tf @@ -21,7 +21,7 @@ resource "aws_networkmanager_attachment_accepter" "test" { resource "aws_customer_gateway" "test" { bgp_asn = var.rBgpAsn - ip_address = var.rIPAddress + ip_address = var.rIPv4Address type = "ipsec.1" device_name = var.rName } @@ -98,7 +98,7 @@ variable "rBgpAsn" { nullable = false } -variable "rIPAddress" { +variable "rIPv4Address" { type = string nullable = false } diff --git a/internal/service/networkmanager/testdata/SiteToSiteVPNAttachment/tagsComputed2/main_gen.tf b/internal/service/networkmanager/testdata/SiteToSiteVPNAttachment/tagsComputed2/main_gen.tf index 9e0272f837c1..237e46eb8662 100644 --- a/internal/service/networkmanager/testdata/SiteToSiteVPNAttachment/tagsComputed2/main_gen.tf +++ b/internal/service/networkmanager/testdata/SiteToSiteVPNAttachment/tagsComputed2/main_gen.tf @@ -22,7 +22,7 @@ resource "aws_networkmanager_attachment_accepter" "test" { resource "aws_customer_gateway" "test" { bgp_asn = var.rBgpAsn - ip_address = var.rIPAddress + ip_address = var.rIPv4Address type = "ipsec.1" device_name = var.rName } @@ -99,7 +99,7 @@ variable "rBgpAsn" { nullable = false } -variable "rIPAddress" { +variable "rIPv4Address" { type = string nullable = false } diff --git a/internal/service/networkmanager/testdata/SiteToSiteVPNAttachment/tags_defaults/main_gen.tf b/internal/service/networkmanager/testdata/SiteToSiteVPNAttachment/tags_defaults/main_gen.tf index 6bbf3be8e977..af21889ac675 100644 --- a/internal/service/networkmanager/testdata/SiteToSiteVPNAttachment/tags_defaults/main_gen.tf +++ b/internal/service/networkmanager/testdata/SiteToSiteVPNAttachment/tags_defaults/main_gen.tf @@ -23,7 +23,7 @@ resource "aws_networkmanager_attachment_accepter" "test" { resource "aws_customer_gateway" "test" { bgp_asn = var.rBgpAsn - ip_address = var.rIPAddress + ip_address = var.rIPv4Address type = "ipsec.1" device_name = var.rName } @@ -98,7 +98,7 @@ variable "rBgpAsn" { nullable = false } -variable "rIPAddress" { +variable "rIPv4Address" { type = string nullable = false } diff --git a/internal/service/networkmanager/testdata/SiteToSiteVPNAttachment/tags_ignore/main_gen.tf b/internal/service/networkmanager/testdata/SiteToSiteVPNAttachment/tags_ignore/main_gen.tf index 30ceb410f52d..8a03d21df8d0 100644 --- a/internal/service/networkmanager/testdata/SiteToSiteVPNAttachment/tags_ignore/main_gen.tf +++ b/internal/service/networkmanager/testdata/SiteToSiteVPNAttachment/tags_ignore/main_gen.tf @@ -26,7 +26,7 @@ resource "aws_networkmanager_attachment_accepter" "test" { resource "aws_customer_gateway" "test" { bgp_asn = var.rBgpAsn - ip_address = var.rIPAddress + ip_address = var.rIPv4Address type = "ipsec.1" device_name = var.rName } @@ -101,7 +101,7 @@ variable "rBgpAsn" { nullable = false } -variable "rIPAddress" { +variable "rIPv4Address" { type = string nullable = false } diff --git a/internal/service/networkmanager/testdata/tmpl/site_to_site_vpn_attachment_tags.gtpl b/internal/service/networkmanager/testdata/tmpl/site_to_site_vpn_attachment_tags.gtpl index 213b7a76e541..0bb64c116877 100644 --- a/internal/service/networkmanager/testdata/tmpl/site_to_site_vpn_attachment_tags.gtpl +++ b/internal/service/networkmanager/testdata/tmpl/site_to_site_vpn_attachment_tags.gtpl @@ -13,7 +13,7 @@ resource "aws_networkmanager_attachment_accepter" "test" { resource "aws_customer_gateway" "test" { bgp_asn = var.rBgpAsn - ip_address = var.rIPAddress + ip_address = var.rIPv4Address type = "ipsec.1" device_name = var.rName } From 3bbfa7c1c0adc958bc38b611f05b4cfe696bb251 Mon Sep 17 00:00:00 2001 From: Graham Davison Date: Wed, 30 Jul 2025 16:34:59 -0700 Subject: [PATCH 079/365] Adds documentation for `randomBsgAsn` and `randomIPv4Address` --- docs/resource-tagging.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/docs/resource-tagging.md b/docs/resource-tagging.md index d7b473fe6ad3..70b745f871ab 100644 --- a/docs/resource-tagging.md +++ b/docs/resource-tagging.md @@ -504,6 +504,16 @@ To override the common name, set the annotation `@Testing(tlsKeyDomain=)`. +The randomly-generated IPv4 address value will be contained within the ``. +The Terraform variable name will be `rIPv4Address`. + No additional parameters can be defined currently. If additional parameters are required, and cannot be derived from `rName`, the resource type must use manually created acceptance tests as described below. From 65da2e6d053a6062bdfcb500e1bcc6aabfc2f2ce Mon Sep 17 00:00:00 2001 From: Greg Madro Date: Wed, 30 Jul 2025 22:10:39 -0400 Subject: [PATCH 080/365] fix(cleanrooms): apply formatting and rename function for analytics_engine PR --- .changelog/{placeholder.txt => 43614.txt} | 0 internal/service/cleanrooms/collaboration_test.go | 10 +++++----- 2 files changed, 5 insertions(+), 5 deletions(-) rename .changelog/{placeholder.txt => 43614.txt} (100%) diff --git a/.changelog/placeholder.txt b/.changelog/43614.txt similarity index 100% rename from .changelog/placeholder.txt rename to .changelog/43614.txt diff --git a/internal/service/cleanrooms/collaboration_test.go b/internal/service/cleanrooms/collaboration_test.go index e1b9b4d590b0..368c4e458227 100644 --- a/internal/service/cleanrooms/collaboration_test.go +++ b/internal/service/cleanrooms/collaboration_test.go @@ -552,7 +552,7 @@ func TestAccCleanRoomsCollaboration_analyticsEngine(t *testing.T) { ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, Steps: []resource.TestStep{ { - Config: testAccCleanRoomsCollaborationConfigAnalyticsEngine("SPARK"), + Config: testAccCollaborationConfigAnalyticsEngine("SPARK"), Check: resource.ComposeTestCheckFunc( resource.TestCheckResourceAttr(resourceName, "analytics_engine", "SPARK"), ), @@ -561,8 +561,8 @@ func TestAccCleanRoomsCollaboration_analyticsEngine(t *testing.T) { }) } -func testAccCleanRoomsCollaborationConfigAnalyticsEngine(engine string) string { - return fmt.Sprintf(` +func testAccCollaborationConfigAnalyticsEngine(engine string) string { + return fmt.Sprintf(` resource "aws_cleanrooms_collaboration" "test" { name = "tf-test-collab" creator_display_name = "tf-test" @@ -573,8 +573,8 @@ resource "aws_cleanrooms_collaboration" "test" { analytics_engine = "%s" member { - account_id = "%s" - display_name = "test-member" + account_id = "%s" + display_name = "test-member" member_abilities = ["CAN_QUERY"] } } From 2657e42980c3eeda6368ffb27578e6de458e14a1 Mon Sep 17 00:00:00 2001 From: Greg Madro Date: Wed, 30 Jul 2025 22:44:16 -0400 Subject: [PATCH 081/365] fix(cleanrooms): fix formatting for analytics_engine PR --- internal/service/cleanrooms/collaboration_test.go | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/internal/service/cleanrooms/collaboration_test.go b/internal/service/cleanrooms/collaboration_test.go index 368c4e458227..03385354493f 100644 --- a/internal/service/cleanrooms/collaboration_test.go +++ b/internal/service/cleanrooms/collaboration_test.go @@ -564,13 +564,12 @@ func TestAccCleanRoomsCollaboration_analyticsEngine(t *testing.T) { func testAccCollaborationConfigAnalyticsEngine(engine string) string { return fmt.Sprintf(` resource "aws_cleanrooms_collaboration" "test" { - name = "tf-test-collab" - creator_display_name = "tf-test" - creator_member_abilities = ["CAN_RECEIVE_RESULTS"] - description = "test collaboration" - query_log_status = "ENABLED" - - analytics_engine = "%s" + name = "tf-test-collab" + creator_display_name = "tf-test" + creator_member_abilities = ["CAN_RECEIVE_RESULTS"] + description = "test collaboration" + query_log_status = "ENABLED" + analytics_engine = "%s" member { account_id = "%s" From d24779efcc89458167b6a08f86def15bb72729ae Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 09:10:59 -0400 Subject: [PATCH 082/365] go get github.com/aws/aws-sdk-go-v2. --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 4909193d5080..3f84247bef3b 100644 --- a/go.mod +++ b/go.mod @@ -11,7 +11,7 @@ require ( github.com/YakDriver/go-version v0.1.0 github.com/YakDriver/regexache v0.24.0 github.com/YakDriver/smarterr v0.6.0 - github.com/aws/aws-sdk-go-v2 v1.37.0 + github.com/aws/aws-sdk-go-v2 v1.37.1 github.com/aws/aws-sdk-go-v2/config v1.30.1 github.com/aws/aws-sdk-go-v2/credentials v1.18.1 github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.18.0 diff --git a/go.sum b/go.sum index 2075f4e06942..52980f0b4152 100644 --- a/go.sum +++ b/go.sum @@ -23,8 +23,8 @@ github.com/apparentlymart/go-textseg/v15 v15.0.0 h1:uYvfpb3DyLSCGWnctWKGj857c6ew github.com/apparentlymart/go-textseg/v15 v15.0.0/go.mod h1:K8XmNZdhEBkdlyDdvbmmsvpAG721bKi0joRfFdHIWJ4= github.com/armon/go-radix v1.0.0 h1:F4z6KzEeeQIMeLFa97iZU6vupzoecKdU5TX24SNppXI= github.com/armon/go-radix v1.0.0/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= -github.com/aws/aws-sdk-go-v2 v1.37.0 h1:YtCOESR/pN4j5oA7cVHSfOwIcuh/KwHC4DOSXFbv5F0= -github.com/aws/aws-sdk-go-v2 v1.37.0/go.mod h1:9Q0OoGQoboYIAJyslFyF1f5K1Ryddop8gqMhWx/n4Wg= +github.com/aws/aws-sdk-go-v2 v1.37.1 h1:SMUxeNz3Z6nqGsXv0JuJXc8w5YMtrQMuIBmDx//bBDY= +github.com/aws/aws-sdk-go-v2 v1.37.1/go.mod h1:9Q0OoGQoboYIAJyslFyF1f5K1Ryddop8gqMhWx/n4Wg= github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.7.0 h1:6GMWV6CNpA/6fbFHnoAjrv4+LGfyTqZz2LtCHnspgDg= github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.7.0/go.mod h1:/mXlTIVG9jbxkqDnr5UQNQxW1HRYxeGklkM9vAFeabg= github.com/aws/aws-sdk-go-v2/config v1.30.1 h1:sHL8g/+9tcZATeV2tEkEfxZeaNokDtKsSjGMGHD49qA= From cfe5ce1f0cb2c2c9a58503d470d2ae42c96b7507 Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 09:11:00 -0400 Subject: [PATCH 083/365] go get github.com/aws/aws-sdk-go-v2/config. --- go.mod | 18 +++++++++--------- go.sum | 36 ++++++++++++++++++------------------ 2 files changed, 27 insertions(+), 27 deletions(-) diff --git a/go.mod b/go.mod index 3f84247bef3b..a7d2dd02f002 100644 --- a/go.mod +++ b/go.mod @@ -12,9 +12,9 @@ require ( github.com/YakDriver/regexache v0.24.0 github.com/YakDriver/smarterr v0.6.0 github.com/aws/aws-sdk-go-v2 v1.37.1 - github.com/aws/aws-sdk-go-v2/config v1.30.1 - github.com/aws/aws-sdk-go-v2/credentials v1.18.1 - github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.18.0 + github.com/aws/aws-sdk-go-v2/config v1.30.2 + github.com/aws/aws-sdk-go-v2/credentials v1.18.2 + github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.18.1 github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.18.1 github.com/aws/aws-sdk-go-v2/service/accessanalyzer v1.41.0 github.com/aws/aws-sdk-go-v2/service/account v1.25.0 @@ -245,10 +245,10 @@ require ( github.com/aws/aws-sdk-go-v2/service/ssmincidents v1.36.0 github.com/aws/aws-sdk-go-v2/service/ssmquicksetup v1.5.0 github.com/aws/aws-sdk-go-v2/service/ssmsap v1.21.0 - github.com/aws/aws-sdk-go-v2/service/sso v1.26.0 + github.com/aws/aws-sdk-go-v2/service/sso v1.26.1 github.com/aws/aws-sdk-go-v2/service/ssoadmin v1.32.0 github.com/aws/aws-sdk-go-v2/service/storagegateway v1.39.0 - github.com/aws/aws-sdk-go-v2/service/sts v1.35.0 + github.com/aws/aws-sdk-go-v2/service/sts v1.35.1 github.com/aws/aws-sdk-go-v2/service/swf v1.29.0 github.com/aws/aws-sdk-go-v2/service/synthetics v1.37.0 github.com/aws/aws-sdk-go-v2/service/taxsettings v1.13.0 @@ -319,16 +319,16 @@ require ( github.com/apparentlymart/go-textseg/v15 v15.0.0 // indirect github.com/armon/go-radix v1.0.0 // indirect github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.7.0 // indirect - github.com/aws/aws-sdk-go-v2/internal/configsources v1.4.0 // indirect - github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.7.0 // indirect + github.com/aws/aws-sdk-go-v2/internal/configsources v1.4.1 // indirect + github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.7.1 // indirect github.com/aws/aws-sdk-go-v2/internal/ini v1.8.3 // indirect github.com/aws/aws-sdk-go-v2/internal/v4a v1.4.0 // indirect github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.13.0 // indirect github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.8.0 // indirect github.com/aws/aws-sdk-go-v2/service/internal/endpoint-discovery v1.11.0 // indirect - github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.13.0 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.13.1 // indirect github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.19.0 // indirect - github.com/aws/aws-sdk-go-v2/service/ssooidc v1.31.0 // indirect + github.com/aws/aws-sdk-go-v2/service/ssooidc v1.31.1 // indirect github.com/bgentry/speakeasy v0.1.0 // indirect github.com/boombuler/barcode v1.0.1-0.20190219062509-6c824513bacc // indirect github.com/cloudflare/circl v1.6.1 // indirect diff --git a/go.sum b/go.sum index 52980f0b4152..f4b11a8887d2 100644 --- a/go.sum +++ b/go.sum @@ -27,18 +27,18 @@ github.com/aws/aws-sdk-go-v2 v1.37.1 h1:SMUxeNz3Z6nqGsXv0JuJXc8w5YMtrQMuIBmDx//b github.com/aws/aws-sdk-go-v2 v1.37.1/go.mod h1:9Q0OoGQoboYIAJyslFyF1f5K1Ryddop8gqMhWx/n4Wg= github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.7.0 h1:6GMWV6CNpA/6fbFHnoAjrv4+LGfyTqZz2LtCHnspgDg= github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.7.0/go.mod h1:/mXlTIVG9jbxkqDnr5UQNQxW1HRYxeGklkM9vAFeabg= -github.com/aws/aws-sdk-go-v2/config v1.30.1 h1:sHL8g/+9tcZATeV2tEkEfxZeaNokDtKsSjGMGHD49qA= -github.com/aws/aws-sdk-go-v2/config v1.30.1/go.mod h1:wkibEyFfxXRyTSzRU4bbF5IUsSXyE4xQ4ZjkGmi5tFo= -github.com/aws/aws-sdk-go-v2/credentials v1.18.1 h1:E55xvOqlX7CvB66Z7rSM9usCrFU1ryUIUHqiXsEzVoE= -github.com/aws/aws-sdk-go-v2/credentials v1.18.1/go.mod h1:iobSQfR5MkvILxssGOvi/P1jjOhrRzfTiCPCzku0vx4= -github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.18.0 h1:9sBTeKQwAvmJUWKIACIoiFSnxxl+sS++YDfr17/ngq0= -github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.18.0/go.mod h1:LW9/PxQD1SYFC7pnWcgqPhoyZprhjEdg5hBK6qYPLW8= +github.com/aws/aws-sdk-go-v2/config v1.30.2 h1:YE1BmSc4fFYqFgN1mN8uzrtc7R9x+7oSWeX8ckoltAw= +github.com/aws/aws-sdk-go-v2/config v1.30.2/go.mod h1:UNrLGZ6jfAVjgVJpkIxjLufRJqTXCVYOpkeVf83kwBo= +github.com/aws/aws-sdk-go-v2/credentials v1.18.2 h1:mfm0GKY/PHLhs7KO0sUaOtFnIQ15Qqxt+wXbO/5fIfs= +github.com/aws/aws-sdk-go-v2/credentials v1.18.2/go.mod h1:v0SdJX6ayPeZFQxgXUKw5RhLpAoZUuynxWDfh8+Eknc= +github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.18.1 h1:owmNBboeA0kHKDcdF8KiSXmrIuXZustfMGGytv6OMkM= +github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.18.1/go.mod h1:Bg1miN59SGxrZqlP8vJZSmXW+1N8Y1MjQDq1OfuNod8= github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.18.1 h1:aAjA/1JZ1xH/F9XvxJu9cXZyp7BqVXtHpztyZ6p799E= github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.18.1/go.mod h1:ia9HASsPba/7o84sp6iE4wZPdNTJ0oicBe5sWQQk+Ys= -github.com/aws/aws-sdk-go-v2/internal/configsources v1.4.0 h1:H2iZoqW/v2Jnrh1FnU725Bq6KJ0k2uP63yH+DcY+HUI= -github.com/aws/aws-sdk-go-v2/internal/configsources v1.4.0/go.mod h1:L0FqLbwMXHvNC/7crWV1iIxUlOKYZUE8KuTIA+TozAI= -github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.7.0 h1:EDped/rNzAhFPhVY0sDGbtD16OKqksfA8OjF/kLEgw8= -github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.7.0/go.mod h1:uUI335jvzpZRPpjYx6ODc/wg1qH+NnoSTK/FwVeK0C0= +github.com/aws/aws-sdk-go-v2/internal/configsources v1.4.1 h1:ksZXBYv80EFTcgc8OJO48aQ8XDWXIQL7gGasPeCoTzI= +github.com/aws/aws-sdk-go-v2/internal/configsources v1.4.1/go.mod h1:HSksQyyJETVZS7uM54cir0IgxttTD+8aEoJMPGepHBI= +github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.7.1 h1:+dn/xF/05utS7tUhjIcndbuaPjfll2LhbH1cCDGLYUQ= +github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.7.1/go.mod h1:hyAGz30LHdm5KBZDI58MXx5lDVZ5CUfvfTZvMu4HCZo= github.com/aws/aws-sdk-go-v2/internal/ini v1.8.3 h1:bIqFDwgGXXN1Kpp99pDOdKMTTb5d2KyU5X/BZxjOkRo= github.com/aws/aws-sdk-go-v2/internal/ini v1.8.3/go.mod h1:H5O/EsxDWyU+LP/V8i5sm8cxoZgc2fdNR9bxlOFrQTo= github.com/aws/aws-sdk-go-v2/internal/v4a v1.4.0 h1:iLvW/zOkHGU3BDU5thWnj+UZ9pjhuVhv1loLj7yVtBw= @@ -295,8 +295,8 @@ github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.8.0 h1:qGyLBQPphYzUf+I github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.8.0/go.mod h1:g+dzKSLXiR/8ATkPXmLhPOI6rDdjLP3tngeo3FvDcIw= github.com/aws/aws-sdk-go-v2/service/internal/endpoint-discovery v1.11.0 h1:d/XdC88Wp2JVsomt1yw+nQgAX42fYwZlEK4K4zzHZuA= github.com/aws/aws-sdk-go-v2/service/internal/endpoint-discovery v1.11.0/go.mod h1:ZfRwNlclmR48RAgflKBOi43bY1MjvraHZPsG3A/i0iw= -github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.13.0 h1:eRhU3Sh8dGbaniI6B+I48XJMrTPRkK4DKo+vqIxziOU= -github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.13.0/go.mod h1:paNLV18DZ6FnWE/bd06RIKPDIFpjuvCkGKWTG/GDBeM= +github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.13.1 h1:ky79ysLMxhwk5rxJtS+ILd3Mc8kC5fhsLBrP27r6h4I= +github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.13.1/go.mod h1:+2MmkvFvPYM1vsozBWduoLJUi5maxFk5B7KJFECujhY= github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.19.0 h1:6jusT+XCcvnD+Elxvm7bUf5sCMTpZEp3AKjYQ4tWJSo= github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.19.0/go.mod h1:LimGpdIF/sTBdgqwOEkrArXLCoTamK/9L9x8IKBFTIc= github.com/aws/aws-sdk-go-v2/service/internetmonitor v1.22.0 h1:p3g8ut8+ep02v6NIXvi9FdXcxf/AfuWVIjI/Bbr5gcI= @@ -511,16 +511,16 @@ github.com/aws/aws-sdk-go-v2/service/ssmquicksetup v1.5.0 h1:wWjsCKZJw54mkjy35Nk github.com/aws/aws-sdk-go-v2/service/ssmquicksetup v1.5.0/go.mod h1:ZYyBNE2vzgYAowj676ZUivzokh3XPyz/IHAOgeUqxB0= github.com/aws/aws-sdk-go-v2/service/ssmsap v1.21.0 h1:R0mhxUklmXU/Jrrp2Su9ZnNZxe8Q/Qj7m9gEW6D7ZCU= github.com/aws/aws-sdk-go-v2/service/ssmsap v1.21.0/go.mod h1:rZActsF6fwFl1Hi0uX5wVWIiuVt9G2u1CNP/xdRf8BI= -github.com/aws/aws-sdk-go-v2/service/sso v1.26.0 h1:cuFWHH87GP1NBGXXfMicUbE7Oty5KpPxN6w4JpmuxYc= -github.com/aws/aws-sdk-go-v2/service/sso v1.26.0/go.mod h1:aJBemdlbCKyOXEXdXBqS7E+8S9XTDcOTaoOjtng54hA= +github.com/aws/aws-sdk-go-v2/service/sso v1.26.1 h1:uWaz3DoNK9MNhm7i6UGxqufwu3BEuJZm72WlpGwyVtY= +github.com/aws/aws-sdk-go-v2/service/sso v1.26.1/go.mod h1:ILpVNjL0BO+Z3Mm0SbEeUoYS9e0eJWV1BxNppp0fcb8= github.com/aws/aws-sdk-go-v2/service/ssoadmin v1.32.0 h1:9ZiC+PGAj6iWfUnyVD13DJKRSVUyoGnjqeoHwYbcp7s= github.com/aws/aws-sdk-go-v2/service/ssoadmin v1.32.0/go.mod h1:THhZIpJD09IpQQXUB3UzSGNbVQWymMPpg+oSzxR1QZk= -github.com/aws/aws-sdk-go-v2/service/ssooidc v1.31.0 h1:t2va+wewPOYIqC6XyJ4MGjiGKkczMAPsgq5W4FtL9ME= -github.com/aws/aws-sdk-go-v2/service/ssooidc v1.31.0/go.mod h1:ExCTcqYqN0hYYRsDlBVU8+68grqlWdgX9/nZJwQW4aY= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.31.1 h1:XdG6/o1/ZDmn3wJU5SRAejHaWgKS4zHv0jBamuKuS2k= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.31.1/go.mod h1:oiotGTKadCOCl3vg/tYh4k45JlDF81Ka8rdumNhEnIQ= github.com/aws/aws-sdk-go-v2/service/storagegateway v1.39.0 h1:ry+7bX8vl2pQzMPpo7KVDaoY/vh6iBiUC1mOL4tXxcw= github.com/aws/aws-sdk-go-v2/service/storagegateway v1.39.0/go.mod h1:nJ6IfH7EAwcH7Ptw1Xs/JnkuHiE6u1KD8CKit2FmUTs= -github.com/aws/aws-sdk-go-v2/service/sts v1.35.0 h1:FD9agdG4CeOGS3ORLByJk56YIXDS7mxFpmZyCtpqExc= -github.com/aws/aws-sdk-go-v2/service/sts v1.35.0/go.mod h1:NDzDPbBF1xtSTZUMuZx0w3hIfWzcL7X2AQ0Tr9becIQ= +github.com/aws/aws-sdk-go-v2/service/sts v1.35.1 h1:iF4Xxkc0H9c/K2dS0zZw3SCkj0Z7n6AMnUiiyoJND+I= +github.com/aws/aws-sdk-go-v2/service/sts v1.35.1/go.mod h1:0bxIatfN0aLq4mjoLDeBpOjOke68OsFlXPDFJ7V0MYw= github.com/aws/aws-sdk-go-v2/service/swf v1.29.0 h1:HVlKNYHTqbr4fKc/20vTgRZ1e/E8TTsHmY6yyXqbAMw= github.com/aws/aws-sdk-go-v2/service/swf v1.29.0/go.mod h1:XnETagEsnuCfvAwFtMjkAYlYR6HcH19q9M8I4sfZ/pc= github.com/aws/aws-sdk-go-v2/service/synthetics v1.37.0 h1:i8ELxsU4cRR5cvUP+KJ38ti/ebcPUCOO6LWjiFy5r0U= From 734b9beee65c840fdc154ff6e1bfc7600e3ad2d9 Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 09:11:03 -0400 Subject: [PATCH 084/365] go get github.com/aws/aws-sdk-go-v2/feature/s3/manager. --- go.mod | 10 +++++----- go.sum | 20 ++++++++++---------- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/go.mod b/go.mod index a7d2dd02f002..2c2ac7e4a517 100644 --- a/go.mod +++ b/go.mod @@ -15,7 +15,7 @@ require ( github.com/aws/aws-sdk-go-v2/config v1.30.2 github.com/aws/aws-sdk-go-v2/credentials v1.18.2 github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.18.1 - github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.18.1 + github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.18.2 github.com/aws/aws-sdk-go-v2/service/accessanalyzer v1.41.0 github.com/aws/aws-sdk-go-v2/service/account v1.25.0 github.com/aws/aws-sdk-go-v2/service/acm v1.34.0 @@ -218,7 +218,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/route53recoveryreadiness v1.23.0 github.com/aws/aws-sdk-go-v2/service/route53resolver v1.37.0 github.com/aws/aws-sdk-go-v2/service/rum v1.25.0 - github.com/aws/aws-sdk-go-v2/service/s3 v1.85.0 + github.com/aws/aws-sdk-go-v2/service/s3 v1.85.1 github.com/aws/aws-sdk-go-v2/service/s3control v1.61.0 github.com/aws/aws-sdk-go-v2/service/s3outposts v1.30.0 github.com/aws/aws-sdk-go-v2/service/s3tables v1.7.0 @@ -322,12 +322,12 @@ require ( github.com/aws/aws-sdk-go-v2/internal/configsources v1.4.1 // indirect github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.7.1 // indirect github.com/aws/aws-sdk-go-v2/internal/ini v1.8.3 // indirect - github.com/aws/aws-sdk-go-v2/internal/v4a v1.4.0 // indirect + github.com/aws/aws-sdk-go-v2/internal/v4a v1.4.1 // indirect github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.13.0 // indirect - github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.8.0 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.8.1 // indirect github.com/aws/aws-sdk-go-v2/service/internal/endpoint-discovery v1.11.0 // indirect github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.13.1 // indirect - github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.19.0 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.19.1 // indirect github.com/aws/aws-sdk-go-v2/service/ssooidc v1.31.1 // indirect github.com/bgentry/speakeasy v0.1.0 // indirect github.com/boombuler/barcode v1.0.1-0.20190219062509-6c824513bacc // indirect diff --git a/go.sum b/go.sum index f4b11a8887d2..f6d09d708876 100644 --- a/go.sum +++ b/go.sum @@ -33,16 +33,16 @@ github.com/aws/aws-sdk-go-v2/credentials v1.18.2 h1:mfm0GKY/PHLhs7KO0sUaOtFnIQ15 github.com/aws/aws-sdk-go-v2/credentials v1.18.2/go.mod h1:v0SdJX6ayPeZFQxgXUKw5RhLpAoZUuynxWDfh8+Eknc= github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.18.1 h1:owmNBboeA0kHKDcdF8KiSXmrIuXZustfMGGytv6OMkM= github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.18.1/go.mod h1:Bg1miN59SGxrZqlP8vJZSmXW+1N8Y1MjQDq1OfuNod8= -github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.18.1 h1:aAjA/1JZ1xH/F9XvxJu9cXZyp7BqVXtHpztyZ6p799E= -github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.18.1/go.mod h1:ia9HASsPba/7o84sp6iE4wZPdNTJ0oicBe5sWQQk+Ys= +github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.18.2 h1:YFX4DvH1CPQXgQR8935b46Om+L7+6jus4aTdKqyDR84= +github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.18.2/go.mod h1:DgMPy7GqxcV0RSyaITnI3rw8HC3lIHB87U3KPQKDxHg= github.com/aws/aws-sdk-go-v2/internal/configsources v1.4.1 h1:ksZXBYv80EFTcgc8OJO48aQ8XDWXIQL7gGasPeCoTzI= github.com/aws/aws-sdk-go-v2/internal/configsources v1.4.1/go.mod h1:HSksQyyJETVZS7uM54cir0IgxttTD+8aEoJMPGepHBI= github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.7.1 h1:+dn/xF/05utS7tUhjIcndbuaPjfll2LhbH1cCDGLYUQ= github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.7.1/go.mod h1:hyAGz30LHdm5KBZDI58MXx5lDVZ5CUfvfTZvMu4HCZo= github.com/aws/aws-sdk-go-v2/internal/ini v1.8.3 h1:bIqFDwgGXXN1Kpp99pDOdKMTTb5d2KyU5X/BZxjOkRo= github.com/aws/aws-sdk-go-v2/internal/ini v1.8.3/go.mod h1:H5O/EsxDWyU+LP/V8i5sm8cxoZgc2fdNR9bxlOFrQTo= -github.com/aws/aws-sdk-go-v2/internal/v4a v1.4.0 h1:iLvW/zOkHGU3BDU5thWnj+UZ9pjhuVhv1loLj7yVtBw= -github.com/aws/aws-sdk-go-v2/internal/v4a v1.4.0/go.mod h1:Fn3gvhdF1x5Rs9nUoCy/fJT1ms8f8dO7RqM9lJHuazQ= +github.com/aws/aws-sdk-go-v2/internal/v4a v1.4.1 h1:4HbnOGE9491a9zYJ9VpPh1ApgEq6ZlD4Kuv1PJenFpc= +github.com/aws/aws-sdk-go-v2/internal/v4a v1.4.1/go.mod h1:Z6QnHC6TmpJWUxAy8FI4JzA7rTwl6EIANkyK9OR5z5w= github.com/aws/aws-sdk-go-v2/service/accessanalyzer v1.41.0 h1:gq76LkmGLcEAoSlHC4gllk8VVnA9FhbP+oCaHyXF0zY= github.com/aws/aws-sdk-go-v2/service/accessanalyzer v1.41.0/go.mod h1:BaNR63fvxHBH+AXizTwftT5bEYUjXqxZe5nJglhqhO8= github.com/aws/aws-sdk-go-v2/service/account v1.25.0 h1:WsqNcDLJSGTvbp0mCaJZanu2FIi3cMIaxNuSzUJmTy4= @@ -291,14 +291,14 @@ github.com/aws/aws-sdk-go-v2/service/inspector2 v1.39.0 h1:wHcexRYlL7cgzOGZQqDIS github.com/aws/aws-sdk-go-v2/service/inspector2 v1.39.0/go.mod h1:DUheDO8F7a/BwQhnle6sizF/XrQ54LSjd6RQ3Xfkr3k= github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.13.0 h1:6+lZi2JeGKtCraAj1rpoZfKqnQ9SptseRZioejfUOLM= github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.13.0/go.mod h1:eb3gfbVIxIoGgJsi9pGne19dhCBpK6opTYpQqAmdy44= -github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.8.0 h1:qGyLBQPphYzUf+IIlb5tHnvg1U2Vc5hXPcP7oRSQfy0= -github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.8.0/go.mod h1:g+dzKSLXiR/8ATkPXmLhPOI6rDdjLP3tngeo3FvDcIw= +github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.8.1 h1:ps3nrmBWdWwakZBydGX1CxeYFK80HsQ79JLMwm7Y4/c= +github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.8.1/go.mod h1:bAdfrfxENre68Hh2swNaGEVuFYE74o0SaSCAlaG9E74= github.com/aws/aws-sdk-go-v2/service/internal/endpoint-discovery v1.11.0 h1:d/XdC88Wp2JVsomt1yw+nQgAX42fYwZlEK4K4zzHZuA= github.com/aws/aws-sdk-go-v2/service/internal/endpoint-discovery v1.11.0/go.mod h1:ZfRwNlclmR48RAgflKBOi43bY1MjvraHZPsG3A/i0iw= github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.13.1 h1:ky79ysLMxhwk5rxJtS+ILd3Mc8kC5fhsLBrP27r6h4I= github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.13.1/go.mod h1:+2MmkvFvPYM1vsozBWduoLJUi5maxFk5B7KJFECujhY= -github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.19.0 h1:6jusT+XCcvnD+Elxvm7bUf5sCMTpZEp3AKjYQ4tWJSo= -github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.19.0/go.mod h1:LimGpdIF/sTBdgqwOEkrArXLCoTamK/9L9x8IKBFTIc= +github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.19.1 h1:MdVYlN5pcQu1t1OYx4Ajo3fKl1IEhzgdPQbYFCRjYS8= +github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.19.1/go.mod h1:iikmNLrvHm2p4a3/4BPeix2S9P+nW8yM1IZW73x8bFA= github.com/aws/aws-sdk-go-v2/service/internetmonitor v1.22.0 h1:p3g8ut8+ep02v6NIXvi9FdXcxf/AfuWVIjI/Bbr5gcI= github.com/aws/aws-sdk-go-v2/service/internetmonitor v1.22.0/go.mod h1:rODw7nLvCzUl+v2+3A1uRTovKAf87HBz6guzsJtbGW8= github.com/aws/aws-sdk-go-v2/service/invoicing v1.3.0 h1:Brk5vEn+/As6+tLhyFrOcOjpnKRqW2MYMlRx0a5wpvk= @@ -457,8 +457,8 @@ github.com/aws/aws-sdk-go-v2/service/route53resolver v1.37.0 h1:5tqCgv4WjDkvz3qA github.com/aws/aws-sdk-go-v2/service/route53resolver v1.37.0/go.mod h1:vwXr/jIQ351u6+2gOfs8vOlCTpcutKFAnhAjqe6PDwg= github.com/aws/aws-sdk-go-v2/service/rum v1.25.0 h1:B8hNp3Ys1WVs12iwka/EotxOvfqvSapYzEEyCY8qi7Y= github.com/aws/aws-sdk-go-v2/service/rum v1.25.0/go.mod h1:wtPsFFOKCW8Wf/VRpe7T1Q59P8JE8bVC7c1wxRZ472I= -github.com/aws/aws-sdk-go-v2/service/s3 v1.85.0 h1:gAV4NEp4A+JOrIdoXkAeyy6IOo7+X2s/jRuaHKYiMaU= -github.com/aws/aws-sdk-go-v2/service/s3 v1.85.0/go.mod h1:JIQwK8sZ5MuKGm5rrFwp9MHUcyYEsQNpVixuPDlnwaU= +github.com/aws/aws-sdk-go-v2/service/s3 v1.85.1 h1:Hsqo8+dFxSdDvv9B2PgIx1AJAnDpqgS0znVI+R+MoGY= +github.com/aws/aws-sdk-go-v2/service/s3 v1.85.1/go.mod h1:8Q0TAPXD68Z8YqlcIGHs/UNIDHsxErV9H4dl4vJEpgw= github.com/aws/aws-sdk-go-v2/service/s3control v1.61.0 h1:5gpA9ClQPwuZHcGuIp9lkw2F+LyfoJcorfG04SL8JYY= github.com/aws/aws-sdk-go-v2/service/s3control v1.61.0/go.mod h1:M6E4vyo70R7StOxwvCuX1KQA8nSdfCpkTN8af6H7GR8= github.com/aws/aws-sdk-go-v2/service/s3outposts v1.30.0 h1:pluWBDXZV7P2rud08CaqinWRCqvhV1muwuBq+jxOHPw= From f5fc1d37f6adf8a4f901df01ed93c75a72090344 Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 09:11:04 -0400 Subject: [PATCH 085/365] go get github.com/aws/aws-sdk-go-v2/service/accessanalyzer. --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 2c2ac7e4a517..f0e24e3cee5c 100644 --- a/go.mod +++ b/go.mod @@ -16,7 +16,7 @@ require ( github.com/aws/aws-sdk-go-v2/credentials v1.18.2 github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.18.1 github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.18.2 - github.com/aws/aws-sdk-go-v2/service/accessanalyzer v1.41.0 + github.com/aws/aws-sdk-go-v2/service/accessanalyzer v1.41.1 github.com/aws/aws-sdk-go-v2/service/account v1.25.0 github.com/aws/aws-sdk-go-v2/service/acm v1.34.0 github.com/aws/aws-sdk-go-v2/service/acmpca v1.41.0 diff --git a/go.sum b/go.sum index f6d09d708876..b4e5eb4f77fd 100644 --- a/go.sum +++ b/go.sum @@ -43,8 +43,8 @@ github.com/aws/aws-sdk-go-v2/internal/ini v1.8.3 h1:bIqFDwgGXXN1Kpp99pDOdKMTTb5d github.com/aws/aws-sdk-go-v2/internal/ini v1.8.3/go.mod h1:H5O/EsxDWyU+LP/V8i5sm8cxoZgc2fdNR9bxlOFrQTo= github.com/aws/aws-sdk-go-v2/internal/v4a v1.4.1 h1:4HbnOGE9491a9zYJ9VpPh1ApgEq6ZlD4Kuv1PJenFpc= github.com/aws/aws-sdk-go-v2/internal/v4a v1.4.1/go.mod h1:Z6QnHC6TmpJWUxAy8FI4JzA7rTwl6EIANkyK9OR5z5w= -github.com/aws/aws-sdk-go-v2/service/accessanalyzer v1.41.0 h1:gq76LkmGLcEAoSlHC4gllk8VVnA9FhbP+oCaHyXF0zY= -github.com/aws/aws-sdk-go-v2/service/accessanalyzer v1.41.0/go.mod h1:BaNR63fvxHBH+AXizTwftT5bEYUjXqxZe5nJglhqhO8= +github.com/aws/aws-sdk-go-v2/service/accessanalyzer v1.41.1 h1:sHIsHhoZZSZkInpvgMzfvUVkf/yeiRam8DNu9090gEE= +github.com/aws/aws-sdk-go-v2/service/accessanalyzer v1.41.1/go.mod h1:8P/8gmNo2309Bc0hyBS2EX0M3MRzhzbiRSXGp1MfcIE= github.com/aws/aws-sdk-go-v2/service/account v1.25.0 h1:WsqNcDLJSGTvbp0mCaJZanu2FIi3cMIaxNuSzUJmTy4= github.com/aws/aws-sdk-go-v2/service/account v1.25.0/go.mod h1:jLDspJe2W3pZ5ztW1Bx2xGTw6p70UQrV9N6TWj38MMo= github.com/aws/aws-sdk-go-v2/service/acm v1.34.0 h1:lx2iQesjev9XicFzktUExyuh9X72gG7mIS+2TbUewWE= From 689fbf59c1af0fa548a8706a2e45b005e5399826 Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 09:11:05 -0400 Subject: [PATCH 086/365] go get github.com/aws/aws-sdk-go-v2/service/account. --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index f0e24e3cee5c..f4c99bc4a08b 100644 --- a/go.mod +++ b/go.mod @@ -17,7 +17,7 @@ require ( github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.18.1 github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.18.2 github.com/aws/aws-sdk-go-v2/service/accessanalyzer v1.41.1 - github.com/aws/aws-sdk-go-v2/service/account v1.25.0 + github.com/aws/aws-sdk-go-v2/service/account v1.25.1 github.com/aws/aws-sdk-go-v2/service/acm v1.34.0 github.com/aws/aws-sdk-go-v2/service/acmpca v1.41.0 github.com/aws/aws-sdk-go-v2/service/amp v1.35.0 diff --git a/go.sum b/go.sum index b4e5eb4f77fd..97f85c78f59d 100644 --- a/go.sum +++ b/go.sum @@ -45,8 +45,8 @@ github.com/aws/aws-sdk-go-v2/internal/v4a v1.4.1 h1:4HbnOGE9491a9zYJ9VpPh1ApgEq6 github.com/aws/aws-sdk-go-v2/internal/v4a v1.4.1/go.mod h1:Z6QnHC6TmpJWUxAy8FI4JzA7rTwl6EIANkyK9OR5z5w= github.com/aws/aws-sdk-go-v2/service/accessanalyzer v1.41.1 h1:sHIsHhoZZSZkInpvgMzfvUVkf/yeiRam8DNu9090gEE= github.com/aws/aws-sdk-go-v2/service/accessanalyzer v1.41.1/go.mod h1:8P/8gmNo2309Bc0hyBS2EX0M3MRzhzbiRSXGp1MfcIE= -github.com/aws/aws-sdk-go-v2/service/account v1.25.0 h1:WsqNcDLJSGTvbp0mCaJZanu2FIi3cMIaxNuSzUJmTy4= -github.com/aws/aws-sdk-go-v2/service/account v1.25.0/go.mod h1:jLDspJe2W3pZ5ztW1Bx2xGTw6p70UQrV9N6TWj38MMo= +github.com/aws/aws-sdk-go-v2/service/account v1.25.1 h1:FmkAacg5OYFEMLXpCa5NWLvQHNumYVRtwcG5sc4UUNk= +github.com/aws/aws-sdk-go-v2/service/account v1.25.1/go.mod h1:QSb7ynpJNa+VKXHxmWN+rs3ByfBGs+p0SAoPFxX67aE= github.com/aws/aws-sdk-go-v2/service/acm v1.34.0 h1:lx2iQesjev9XicFzktUExyuh9X72gG7mIS+2TbUewWE= github.com/aws/aws-sdk-go-v2/service/acm v1.34.0/go.mod h1:4qajh/qxIwI/kyo5Fd3mrPOue15GBp4RcT0kr9ijN4g= github.com/aws/aws-sdk-go-v2/service/acmpca v1.41.0 h1:wBixXmq50emMDxTx4NdTYUq3hUE0i7EynDOB8jGsbUA= From 8d79eaf98afc05f92b1e678455e34113e92a90f9 Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 09:11:06 -0400 Subject: [PATCH 087/365] go get github.com/aws/aws-sdk-go-v2/service/acm. --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index f4c99bc4a08b..b855b6816602 100644 --- a/go.mod +++ b/go.mod @@ -18,7 +18,7 @@ require ( github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.18.2 github.com/aws/aws-sdk-go-v2/service/accessanalyzer v1.41.1 github.com/aws/aws-sdk-go-v2/service/account v1.25.1 - github.com/aws/aws-sdk-go-v2/service/acm v1.34.0 + github.com/aws/aws-sdk-go-v2/service/acm v1.34.1 github.com/aws/aws-sdk-go-v2/service/acmpca v1.41.0 github.com/aws/aws-sdk-go-v2/service/amp v1.35.0 github.com/aws/aws-sdk-go-v2/service/amplify v1.34.0 diff --git a/go.sum b/go.sum index 97f85c78f59d..6679c6935a43 100644 --- a/go.sum +++ b/go.sum @@ -47,8 +47,8 @@ github.com/aws/aws-sdk-go-v2/service/accessanalyzer v1.41.1 h1:sHIsHhoZZSZkInpvg github.com/aws/aws-sdk-go-v2/service/accessanalyzer v1.41.1/go.mod h1:8P/8gmNo2309Bc0hyBS2EX0M3MRzhzbiRSXGp1MfcIE= github.com/aws/aws-sdk-go-v2/service/account v1.25.1 h1:FmkAacg5OYFEMLXpCa5NWLvQHNumYVRtwcG5sc4UUNk= github.com/aws/aws-sdk-go-v2/service/account v1.25.1/go.mod h1:QSb7ynpJNa+VKXHxmWN+rs3ByfBGs+p0SAoPFxX67aE= -github.com/aws/aws-sdk-go-v2/service/acm v1.34.0 h1:lx2iQesjev9XicFzktUExyuh9X72gG7mIS+2TbUewWE= -github.com/aws/aws-sdk-go-v2/service/acm v1.34.0/go.mod h1:4qajh/qxIwI/kyo5Fd3mrPOue15GBp4RcT0kr9ijN4g= +github.com/aws/aws-sdk-go-v2/service/acm v1.34.1 h1:bbwYpBRLNjE55qY4Mb0fnkPKeAmyaCk+ycGuOeI4r9Y= +github.com/aws/aws-sdk-go-v2/service/acm v1.34.1/go.mod h1:mZqY4hx40BypyT3Qm4FWpIoSdkauoV1EUDk/3ByQSuk= github.com/aws/aws-sdk-go-v2/service/acmpca v1.41.0 h1:wBixXmq50emMDxTx4NdTYUq3hUE0i7EynDOB8jGsbUA= github.com/aws/aws-sdk-go-v2/service/acmpca v1.41.0/go.mod h1:yCZJRAcdJ/PdDEtlxnOh2OXescU1GUU9p3gW2U0jyfk= github.com/aws/aws-sdk-go-v2/service/amp v1.35.0 h1:m/a+zBpdDxaHMEowRMflvKeNsW5YeaZ3bUbhKvFmw+E= From 71942062354d5a6fa75db5b64da912c26668995d Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 09:11:07 -0400 Subject: [PATCH 088/365] go get github.com/aws/aws-sdk-go-v2/service/acmpca. --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index b855b6816602..e39c61efaef3 100644 --- a/go.mod +++ b/go.mod @@ -19,7 +19,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/accessanalyzer v1.41.1 github.com/aws/aws-sdk-go-v2/service/account v1.25.1 github.com/aws/aws-sdk-go-v2/service/acm v1.34.1 - github.com/aws/aws-sdk-go-v2/service/acmpca v1.41.0 + github.com/aws/aws-sdk-go-v2/service/acmpca v1.41.1 github.com/aws/aws-sdk-go-v2/service/amp v1.35.0 github.com/aws/aws-sdk-go-v2/service/amplify v1.34.0 github.com/aws/aws-sdk-go-v2/service/apigateway v1.32.0 diff --git a/go.sum b/go.sum index 6679c6935a43..fd982b843d9f 100644 --- a/go.sum +++ b/go.sum @@ -49,8 +49,8 @@ github.com/aws/aws-sdk-go-v2/service/account v1.25.1 h1:FmkAacg5OYFEMLXpCa5NWLvQ github.com/aws/aws-sdk-go-v2/service/account v1.25.1/go.mod h1:QSb7ynpJNa+VKXHxmWN+rs3ByfBGs+p0SAoPFxX67aE= github.com/aws/aws-sdk-go-v2/service/acm v1.34.1 h1:bbwYpBRLNjE55qY4Mb0fnkPKeAmyaCk+ycGuOeI4r9Y= github.com/aws/aws-sdk-go-v2/service/acm v1.34.1/go.mod h1:mZqY4hx40BypyT3Qm4FWpIoSdkauoV1EUDk/3ByQSuk= -github.com/aws/aws-sdk-go-v2/service/acmpca v1.41.0 h1:wBixXmq50emMDxTx4NdTYUq3hUE0i7EynDOB8jGsbUA= -github.com/aws/aws-sdk-go-v2/service/acmpca v1.41.0/go.mod h1:yCZJRAcdJ/PdDEtlxnOh2OXescU1GUU9p3gW2U0jyfk= +github.com/aws/aws-sdk-go-v2/service/acmpca v1.41.1 h1:YQRAmjHJd08P0/1ADX386WVr2SgOlHX5epQ1LGOzG54= +github.com/aws/aws-sdk-go-v2/service/acmpca v1.41.1/go.mod h1:kZGFX2gboWjbnAuuKVLXB+S/TQ8AcY9Q9hWzcJrhink= github.com/aws/aws-sdk-go-v2/service/amp v1.35.0 h1:m/a+zBpdDxaHMEowRMflvKeNsW5YeaZ3bUbhKvFmw+E= github.com/aws/aws-sdk-go-v2/service/amp v1.35.0/go.mod h1:XpdeA/JM+/wgXa1sy9Na95SSbdKFJ7aBzjyJZBY5WaY= github.com/aws/aws-sdk-go-v2/service/amplify v1.34.0 h1:9s5ktEjhJ6f3gxWybaC3SDjdfsyKyO5QwheRBKSIOgg= From d597ebaec9cfe3043454443d281711937d4e9b88 Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 09:11:08 -0400 Subject: [PATCH 089/365] go get github.com/aws/aws-sdk-go-v2/service/amp. --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index e39c61efaef3..e2edbe06b4ac 100644 --- a/go.mod +++ b/go.mod @@ -20,7 +20,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/account v1.25.1 github.com/aws/aws-sdk-go-v2/service/acm v1.34.1 github.com/aws/aws-sdk-go-v2/service/acmpca v1.41.1 - github.com/aws/aws-sdk-go-v2/service/amp v1.35.0 + github.com/aws/aws-sdk-go-v2/service/amp v1.35.1 github.com/aws/aws-sdk-go-v2/service/amplify v1.34.0 github.com/aws/aws-sdk-go-v2/service/apigateway v1.32.0 github.com/aws/aws-sdk-go-v2/service/apigatewayv2 v1.29.0 diff --git a/go.sum b/go.sum index fd982b843d9f..3cdd657b212a 100644 --- a/go.sum +++ b/go.sum @@ -51,8 +51,8 @@ github.com/aws/aws-sdk-go-v2/service/acm v1.34.1 h1:bbwYpBRLNjE55qY4Mb0fnkPKeAmy github.com/aws/aws-sdk-go-v2/service/acm v1.34.1/go.mod h1:mZqY4hx40BypyT3Qm4FWpIoSdkauoV1EUDk/3ByQSuk= github.com/aws/aws-sdk-go-v2/service/acmpca v1.41.1 h1:YQRAmjHJd08P0/1ADX386WVr2SgOlHX5epQ1LGOzG54= github.com/aws/aws-sdk-go-v2/service/acmpca v1.41.1/go.mod h1:kZGFX2gboWjbnAuuKVLXB+S/TQ8AcY9Q9hWzcJrhink= -github.com/aws/aws-sdk-go-v2/service/amp v1.35.0 h1:m/a+zBpdDxaHMEowRMflvKeNsW5YeaZ3bUbhKvFmw+E= -github.com/aws/aws-sdk-go-v2/service/amp v1.35.0/go.mod h1:XpdeA/JM+/wgXa1sy9Na95SSbdKFJ7aBzjyJZBY5WaY= +github.com/aws/aws-sdk-go-v2/service/amp v1.35.1 h1:5p9HHs0vsAaDn5sWSu6eH76iw6xnPRw7h+M3J5u8wp8= +github.com/aws/aws-sdk-go-v2/service/amp v1.35.1/go.mod h1:bKEb2NoSPx/F+m6gzuyuQwYrP1jVWxoEsp8dJaroviY= github.com/aws/aws-sdk-go-v2/service/amplify v1.34.0 h1:9s5ktEjhJ6f3gxWybaC3SDjdfsyKyO5QwheRBKSIOgg= github.com/aws/aws-sdk-go-v2/service/amplify v1.34.0/go.mod h1:tnkDo96G7ZaW441Z8l79sOduo+bSk9aib9C8sKFVo6o= github.com/aws/aws-sdk-go-v2/service/apigateway v1.32.0 h1:iKV8fYBJs3/wGNt+X3vR13k1mrCLspQsXfk5L9UoGaU= From 3a0d1288488c444b7181069498d18ef4ac92e9e4 Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 09:11:09 -0400 Subject: [PATCH 090/365] go get github.com/aws/aws-sdk-go-v2/service/amplify. --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index e2edbe06b4ac..08e1e4fced6a 100644 --- a/go.mod +++ b/go.mod @@ -21,7 +21,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/acm v1.34.1 github.com/aws/aws-sdk-go-v2/service/acmpca v1.41.1 github.com/aws/aws-sdk-go-v2/service/amp v1.35.1 - github.com/aws/aws-sdk-go-v2/service/amplify v1.34.0 + github.com/aws/aws-sdk-go-v2/service/amplify v1.34.1 github.com/aws/aws-sdk-go-v2/service/apigateway v1.32.0 github.com/aws/aws-sdk-go-v2/service/apigatewayv2 v1.29.0 github.com/aws/aws-sdk-go-v2/service/appconfig v1.39.0 diff --git a/go.sum b/go.sum index 3cdd657b212a..e74ef2e695c8 100644 --- a/go.sum +++ b/go.sum @@ -53,8 +53,8 @@ github.com/aws/aws-sdk-go-v2/service/acmpca v1.41.1 h1:YQRAmjHJd08P0/1ADX386WVr2 github.com/aws/aws-sdk-go-v2/service/acmpca v1.41.1/go.mod h1:kZGFX2gboWjbnAuuKVLXB+S/TQ8AcY9Q9hWzcJrhink= github.com/aws/aws-sdk-go-v2/service/amp v1.35.1 h1:5p9HHs0vsAaDn5sWSu6eH76iw6xnPRw7h+M3J5u8wp8= github.com/aws/aws-sdk-go-v2/service/amp v1.35.1/go.mod h1:bKEb2NoSPx/F+m6gzuyuQwYrP1jVWxoEsp8dJaroviY= -github.com/aws/aws-sdk-go-v2/service/amplify v1.34.0 h1:9s5ktEjhJ6f3gxWybaC3SDjdfsyKyO5QwheRBKSIOgg= -github.com/aws/aws-sdk-go-v2/service/amplify v1.34.0/go.mod h1:tnkDo96G7ZaW441Z8l79sOduo+bSk9aib9C8sKFVo6o= +github.com/aws/aws-sdk-go-v2/service/amplify v1.34.1 h1:Av8JqcN88qS1bsfxT7Sdc3V/teB3/RjtTOo3MBU5N6M= +github.com/aws/aws-sdk-go-v2/service/amplify v1.34.1/go.mod h1:UlevIZWf/Y2UXiBXJQ0RZGxSXPtryaYZx8AunJPpR2U= github.com/aws/aws-sdk-go-v2/service/apigateway v1.32.0 h1:iKV8fYBJs3/wGNt+X3vR13k1mrCLspQsXfk5L9UoGaU= github.com/aws/aws-sdk-go-v2/service/apigateway v1.32.0/go.mod h1:o0y/mfhNtGAAlu6oZMdI6Enu2/61bIDuYLgedX4ysSg= github.com/aws/aws-sdk-go-v2/service/apigatewayv2 v1.29.0 h1:YMZAqn1PlVNm/1zsKIV5bllU2+dhKzy6bIsmYtUz83w= From 0d0b50565c61b0b08b4fee53982900acd8a21def Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 09:11:10 -0400 Subject: [PATCH 091/365] go get github.com/aws/aws-sdk-go-v2/service/apigateway. --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 08e1e4fced6a..008dcb683700 100644 --- a/go.mod +++ b/go.mod @@ -22,7 +22,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/acmpca v1.41.1 github.com/aws/aws-sdk-go-v2/service/amp v1.35.1 github.com/aws/aws-sdk-go-v2/service/amplify v1.34.1 - github.com/aws/aws-sdk-go-v2/service/apigateway v1.32.0 + github.com/aws/aws-sdk-go-v2/service/apigateway v1.32.1 github.com/aws/aws-sdk-go-v2/service/apigatewayv2 v1.29.0 github.com/aws/aws-sdk-go-v2/service/appconfig v1.39.0 github.com/aws/aws-sdk-go-v2/service/appfabric v1.13.0 diff --git a/go.sum b/go.sum index e74ef2e695c8..038c15334d24 100644 --- a/go.sum +++ b/go.sum @@ -55,8 +55,8 @@ github.com/aws/aws-sdk-go-v2/service/amp v1.35.1 h1:5p9HHs0vsAaDn5sWSu6eH76iw6xn github.com/aws/aws-sdk-go-v2/service/amp v1.35.1/go.mod h1:bKEb2NoSPx/F+m6gzuyuQwYrP1jVWxoEsp8dJaroviY= github.com/aws/aws-sdk-go-v2/service/amplify v1.34.1 h1:Av8JqcN88qS1bsfxT7Sdc3V/teB3/RjtTOo3MBU5N6M= github.com/aws/aws-sdk-go-v2/service/amplify v1.34.1/go.mod h1:UlevIZWf/Y2UXiBXJQ0RZGxSXPtryaYZx8AunJPpR2U= -github.com/aws/aws-sdk-go-v2/service/apigateway v1.32.0 h1:iKV8fYBJs3/wGNt+X3vR13k1mrCLspQsXfk5L9UoGaU= -github.com/aws/aws-sdk-go-v2/service/apigateway v1.32.0/go.mod h1:o0y/mfhNtGAAlu6oZMdI6Enu2/61bIDuYLgedX4ysSg= +github.com/aws/aws-sdk-go-v2/service/apigateway v1.32.1 h1:XfYB8mz3dzqnYzK0N4iR6FqADNg/eJIrJ3rbOEuYWKo= +github.com/aws/aws-sdk-go-v2/service/apigateway v1.32.1/go.mod h1:xAQ3iEH3mZpJE9/Us5Zw/kdjqEDMllQU7zVSrykSqq0= github.com/aws/aws-sdk-go-v2/service/apigatewayv2 v1.29.0 h1:YMZAqn1PlVNm/1zsKIV5bllU2+dhKzy6bIsmYtUz83w= github.com/aws/aws-sdk-go-v2/service/apigatewayv2 v1.29.0/go.mod h1:rQLiNC1RHIJAb+WI5QYg4cK9zu/LCE25vK5hrbZQCCE= github.com/aws/aws-sdk-go-v2/service/appconfig v1.39.0 h1:DxfBUf+c1c+9LX4cGl5ev8OS/JvvrYroD9iwLGPY9z8= From c10754a9d46b072521d72cd13d194a6cbd0fec11 Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 09:11:11 -0400 Subject: [PATCH 092/365] go get github.com/aws/aws-sdk-go-v2/service/apigatewayv2. --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 008dcb683700..edfe27af53dc 100644 --- a/go.mod +++ b/go.mod @@ -23,7 +23,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/amp v1.35.1 github.com/aws/aws-sdk-go-v2/service/amplify v1.34.1 github.com/aws/aws-sdk-go-v2/service/apigateway v1.32.1 - github.com/aws/aws-sdk-go-v2/service/apigatewayv2 v1.29.0 + github.com/aws/aws-sdk-go-v2/service/apigatewayv2 v1.29.1 github.com/aws/aws-sdk-go-v2/service/appconfig v1.39.0 github.com/aws/aws-sdk-go-v2/service/appfabric v1.13.0 github.com/aws/aws-sdk-go-v2/service/appflow v1.47.0 diff --git a/go.sum b/go.sum index 038c15334d24..85f3d915cd2d 100644 --- a/go.sum +++ b/go.sum @@ -57,8 +57,8 @@ github.com/aws/aws-sdk-go-v2/service/amplify v1.34.1 h1:Av8JqcN88qS1bsfxT7Sdc3V/ github.com/aws/aws-sdk-go-v2/service/amplify v1.34.1/go.mod h1:UlevIZWf/Y2UXiBXJQ0RZGxSXPtryaYZx8AunJPpR2U= github.com/aws/aws-sdk-go-v2/service/apigateway v1.32.1 h1:XfYB8mz3dzqnYzK0N4iR6FqADNg/eJIrJ3rbOEuYWKo= github.com/aws/aws-sdk-go-v2/service/apigateway v1.32.1/go.mod h1:xAQ3iEH3mZpJE9/Us5Zw/kdjqEDMllQU7zVSrykSqq0= -github.com/aws/aws-sdk-go-v2/service/apigatewayv2 v1.29.0 h1:YMZAqn1PlVNm/1zsKIV5bllU2+dhKzy6bIsmYtUz83w= -github.com/aws/aws-sdk-go-v2/service/apigatewayv2 v1.29.0/go.mod h1:rQLiNC1RHIJAb+WI5QYg4cK9zu/LCE25vK5hrbZQCCE= +github.com/aws/aws-sdk-go-v2/service/apigatewayv2 v1.29.1 h1:zIO8otLy+xqjrPDSaWyML1hcmQuwnvS8HsCdU+ljuN8= +github.com/aws/aws-sdk-go-v2/service/apigatewayv2 v1.29.1/go.mod h1:RgLyUe4baqp9nU779yVNqknHpDg/KqV5laDsCfqIfSA= github.com/aws/aws-sdk-go-v2/service/appconfig v1.39.0 h1:DxfBUf+c1c+9LX4cGl5ev8OS/JvvrYroD9iwLGPY9z8= github.com/aws/aws-sdk-go-v2/service/appconfig v1.39.0/go.mod h1:wc6NplB0Z3dj4iF+sSTrJ5LNkm9o/6Z54eJQCELbbzE= github.com/aws/aws-sdk-go-v2/service/appfabric v1.13.0 h1:ZHU+DFbK3/S72VSm6WJdsQkTj6xCJWudA1ebM9XgeiI= From 66d27cb2423b1dad709e3415669193236d226714 Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 09:11:12 -0400 Subject: [PATCH 093/365] go get github.com/aws/aws-sdk-go-v2/service/appconfig. --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index edfe27af53dc..f702650ca4a5 100644 --- a/go.mod +++ b/go.mod @@ -24,7 +24,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/amplify v1.34.1 github.com/aws/aws-sdk-go-v2/service/apigateway v1.32.1 github.com/aws/aws-sdk-go-v2/service/apigatewayv2 v1.29.1 - github.com/aws/aws-sdk-go-v2/service/appconfig v1.39.0 + github.com/aws/aws-sdk-go-v2/service/appconfig v1.39.1 github.com/aws/aws-sdk-go-v2/service/appfabric v1.13.0 github.com/aws/aws-sdk-go-v2/service/appflow v1.47.0 github.com/aws/aws-sdk-go-v2/service/appintegrations v1.33.0 diff --git a/go.sum b/go.sum index 85f3d915cd2d..e6324a2332a4 100644 --- a/go.sum +++ b/go.sum @@ -59,8 +59,8 @@ github.com/aws/aws-sdk-go-v2/service/apigateway v1.32.1 h1:XfYB8mz3dzqnYzK0N4iR6 github.com/aws/aws-sdk-go-v2/service/apigateway v1.32.1/go.mod h1:xAQ3iEH3mZpJE9/Us5Zw/kdjqEDMllQU7zVSrykSqq0= github.com/aws/aws-sdk-go-v2/service/apigatewayv2 v1.29.1 h1:zIO8otLy+xqjrPDSaWyML1hcmQuwnvS8HsCdU+ljuN8= github.com/aws/aws-sdk-go-v2/service/apigatewayv2 v1.29.1/go.mod h1:RgLyUe4baqp9nU779yVNqknHpDg/KqV5laDsCfqIfSA= -github.com/aws/aws-sdk-go-v2/service/appconfig v1.39.0 h1:DxfBUf+c1c+9LX4cGl5ev8OS/JvvrYroD9iwLGPY9z8= -github.com/aws/aws-sdk-go-v2/service/appconfig v1.39.0/go.mod h1:wc6NplB0Z3dj4iF+sSTrJ5LNkm9o/6Z54eJQCELbbzE= +github.com/aws/aws-sdk-go-v2/service/appconfig v1.39.1 h1:3bGMrqprI9jnWqa/40jnp6RwEV6w5pGLTXTZZbBXZkk= +github.com/aws/aws-sdk-go-v2/service/appconfig v1.39.1/go.mod h1:dtjuU/bnTddHETE8FbgcROmOnD/zkW7EX9JNusF3iLs= github.com/aws/aws-sdk-go-v2/service/appfabric v1.13.0 h1:ZHU+DFbK3/S72VSm6WJdsQkTj6xCJWudA1ebM9XgeiI= github.com/aws/aws-sdk-go-v2/service/appfabric v1.13.0/go.mod h1:pvbyBAEHKao1Vxunr5HpHufdpukSVnTz9pnUSOhe0Ow= github.com/aws/aws-sdk-go-v2/service/appflow v1.47.0 h1:kn8ofDMVdo5D9X2YbUe8Nsi2oeK8dFEFku4iDATv3Ik= From 973cd575da112b99252500099a8b991406b305cb Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 09:11:13 -0400 Subject: [PATCH 094/365] go get github.com/aws/aws-sdk-go-v2/service/appfabric. --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index f702650ca4a5..3c4f01a07828 100644 --- a/go.mod +++ b/go.mod @@ -25,7 +25,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/apigateway v1.32.1 github.com/aws/aws-sdk-go-v2/service/apigatewayv2 v1.29.1 github.com/aws/aws-sdk-go-v2/service/appconfig v1.39.1 - github.com/aws/aws-sdk-go-v2/service/appfabric v1.13.0 + github.com/aws/aws-sdk-go-v2/service/appfabric v1.13.1 github.com/aws/aws-sdk-go-v2/service/appflow v1.47.0 github.com/aws/aws-sdk-go-v2/service/appintegrations v1.33.0 github.com/aws/aws-sdk-go-v2/service/applicationautoscaling v1.37.0 diff --git a/go.sum b/go.sum index e6324a2332a4..7426395e0e04 100644 --- a/go.sum +++ b/go.sum @@ -61,8 +61,8 @@ github.com/aws/aws-sdk-go-v2/service/apigatewayv2 v1.29.1 h1:zIO8otLy+xqjrPDSaWy github.com/aws/aws-sdk-go-v2/service/apigatewayv2 v1.29.1/go.mod h1:RgLyUe4baqp9nU779yVNqknHpDg/KqV5laDsCfqIfSA= github.com/aws/aws-sdk-go-v2/service/appconfig v1.39.1 h1:3bGMrqprI9jnWqa/40jnp6RwEV6w5pGLTXTZZbBXZkk= github.com/aws/aws-sdk-go-v2/service/appconfig v1.39.1/go.mod h1:dtjuU/bnTddHETE8FbgcROmOnD/zkW7EX9JNusF3iLs= -github.com/aws/aws-sdk-go-v2/service/appfabric v1.13.0 h1:ZHU+DFbK3/S72VSm6WJdsQkTj6xCJWudA1ebM9XgeiI= -github.com/aws/aws-sdk-go-v2/service/appfabric v1.13.0/go.mod h1:pvbyBAEHKao1Vxunr5HpHufdpukSVnTz9pnUSOhe0Ow= +github.com/aws/aws-sdk-go-v2/service/appfabric v1.13.1 h1:kpb5/Bux2n8fQpAcQ3bP4Sei0TMRpeDHTvBFFR6GuFQ= +github.com/aws/aws-sdk-go-v2/service/appfabric v1.13.1/go.mod h1:9wFbrLrpuBUxnAsL2m7tU9pIY3L+dDZCMbNW4Hpr7dk= github.com/aws/aws-sdk-go-v2/service/appflow v1.47.0 h1:kn8ofDMVdo5D9X2YbUe8Nsi2oeK8dFEFku4iDATv3Ik= github.com/aws/aws-sdk-go-v2/service/appflow v1.47.0/go.mod h1:Vh8NnPu9r4cviqDfktEW3VAY9sazRzMUEi6foimcTmk= github.com/aws/aws-sdk-go-v2/service/appintegrations v1.33.0 h1:kuNwsJcIQZKPTgTqD81+VuvGDd7jFZmdTJY58xeGm/E= From 57895f080891ab5b712d8b6938679313ea1e86de Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 09:11:14 -0400 Subject: [PATCH 095/365] go get github.com/aws/aws-sdk-go-v2/service/appflow. --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 3c4f01a07828..a997dcf0289d 100644 --- a/go.mod +++ b/go.mod @@ -26,7 +26,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/apigatewayv2 v1.29.1 github.com/aws/aws-sdk-go-v2/service/appconfig v1.39.1 github.com/aws/aws-sdk-go-v2/service/appfabric v1.13.1 - github.com/aws/aws-sdk-go-v2/service/appflow v1.47.0 + github.com/aws/aws-sdk-go-v2/service/appflow v1.47.1 github.com/aws/aws-sdk-go-v2/service/appintegrations v1.33.0 github.com/aws/aws-sdk-go-v2/service/applicationautoscaling v1.37.0 github.com/aws/aws-sdk-go-v2/service/applicationinsights v1.31.0 diff --git a/go.sum b/go.sum index 7426395e0e04..bb2a1cff1e9e 100644 --- a/go.sum +++ b/go.sum @@ -63,8 +63,8 @@ github.com/aws/aws-sdk-go-v2/service/appconfig v1.39.1 h1:3bGMrqprI9jnWqa/40jnp6 github.com/aws/aws-sdk-go-v2/service/appconfig v1.39.1/go.mod h1:dtjuU/bnTddHETE8FbgcROmOnD/zkW7EX9JNusF3iLs= github.com/aws/aws-sdk-go-v2/service/appfabric v1.13.1 h1:kpb5/Bux2n8fQpAcQ3bP4Sei0TMRpeDHTvBFFR6GuFQ= github.com/aws/aws-sdk-go-v2/service/appfabric v1.13.1/go.mod h1:9wFbrLrpuBUxnAsL2m7tU9pIY3L+dDZCMbNW4Hpr7dk= -github.com/aws/aws-sdk-go-v2/service/appflow v1.47.0 h1:kn8ofDMVdo5D9X2YbUe8Nsi2oeK8dFEFku4iDATv3Ik= -github.com/aws/aws-sdk-go-v2/service/appflow v1.47.0/go.mod h1:Vh8NnPu9r4cviqDfktEW3VAY9sazRzMUEi6foimcTmk= +github.com/aws/aws-sdk-go-v2/service/appflow v1.47.1 h1:6LIRPPKQWchfkDZbC9iW0FCkvv+V2uQk6PUn+zw1QaQ= +github.com/aws/aws-sdk-go-v2/service/appflow v1.47.1/go.mod h1:bOvWsq5G25xdPP8KN1rfXq+cF5Uh3apZJQ9/xhhqzVU= github.com/aws/aws-sdk-go-v2/service/appintegrations v1.33.0 h1:kuNwsJcIQZKPTgTqD81+VuvGDd7jFZmdTJY58xeGm/E= github.com/aws/aws-sdk-go-v2/service/appintegrations v1.33.0/go.mod h1:WtXV8tBbI+SnqP30Vn0zeVAmLiZDVapWt4ZB9OcQBqE= github.com/aws/aws-sdk-go-v2/service/applicationautoscaling v1.37.0 h1:9bE9SG8peoqYEWiuOBBKaAP2i2LsNNrW68x8Q7PrNaE= From d94dea2dd49ccd39c40be9e1a0d01baa7dbe791d Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 09:11:16 -0400 Subject: [PATCH 096/365] go get github.com/aws/aws-sdk-go-v2/service/appintegrations. --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index a997dcf0289d..94f2a6642b7a 100644 --- a/go.mod +++ b/go.mod @@ -27,7 +27,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/appconfig v1.39.1 github.com/aws/aws-sdk-go-v2/service/appfabric v1.13.1 github.com/aws/aws-sdk-go-v2/service/appflow v1.47.1 - github.com/aws/aws-sdk-go-v2/service/appintegrations v1.33.0 + github.com/aws/aws-sdk-go-v2/service/appintegrations v1.33.1 github.com/aws/aws-sdk-go-v2/service/applicationautoscaling v1.37.0 github.com/aws/aws-sdk-go-v2/service/applicationinsights v1.31.0 github.com/aws/aws-sdk-go-v2/service/applicationsignals v1.12.0 diff --git a/go.sum b/go.sum index bb2a1cff1e9e..b9b09181756b 100644 --- a/go.sum +++ b/go.sum @@ -65,8 +65,8 @@ github.com/aws/aws-sdk-go-v2/service/appfabric v1.13.1 h1:kpb5/Bux2n8fQpAcQ3bP4S github.com/aws/aws-sdk-go-v2/service/appfabric v1.13.1/go.mod h1:9wFbrLrpuBUxnAsL2m7tU9pIY3L+dDZCMbNW4Hpr7dk= github.com/aws/aws-sdk-go-v2/service/appflow v1.47.1 h1:6LIRPPKQWchfkDZbC9iW0FCkvv+V2uQk6PUn+zw1QaQ= github.com/aws/aws-sdk-go-v2/service/appflow v1.47.1/go.mod h1:bOvWsq5G25xdPP8KN1rfXq+cF5Uh3apZJQ9/xhhqzVU= -github.com/aws/aws-sdk-go-v2/service/appintegrations v1.33.0 h1:kuNwsJcIQZKPTgTqD81+VuvGDd7jFZmdTJY58xeGm/E= -github.com/aws/aws-sdk-go-v2/service/appintegrations v1.33.0/go.mod h1:WtXV8tBbI+SnqP30Vn0zeVAmLiZDVapWt4ZB9OcQBqE= +github.com/aws/aws-sdk-go-v2/service/appintegrations v1.33.1 h1:sBqUFcefH0sf+d0uS75pYpPiwFg8AzrINC0PartTgqk= +github.com/aws/aws-sdk-go-v2/service/appintegrations v1.33.1/go.mod h1:unDUxaKaATQsiTmjeLwD1dz9zFR6DUSfdaUuczhqZ60= github.com/aws/aws-sdk-go-v2/service/applicationautoscaling v1.37.0 h1:9bE9SG8peoqYEWiuOBBKaAP2i2LsNNrW68x8Q7PrNaE= github.com/aws/aws-sdk-go-v2/service/applicationautoscaling v1.37.0/go.mod h1:hcLPVx3PUS21WL/F8XVDIrMnZL1LfSDHQCmjC7T0HDE= github.com/aws/aws-sdk-go-v2/service/applicationinsights v1.31.0 h1:hvp21wSai9AFA4vzcIg7l5c3JtmgQRyPGAjbWIxc8co= From 1cf1e2bdb73238f6db34a176127f53d63c64487d Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 09:11:17 -0400 Subject: [PATCH 097/365] go get github.com/aws/aws-sdk-go-v2/service/applicationautoscaling. --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 94f2a6642b7a..3379e60fe533 100644 --- a/go.mod +++ b/go.mod @@ -28,7 +28,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/appfabric v1.13.1 github.com/aws/aws-sdk-go-v2/service/appflow v1.47.1 github.com/aws/aws-sdk-go-v2/service/appintegrations v1.33.1 - github.com/aws/aws-sdk-go-v2/service/applicationautoscaling v1.37.0 + github.com/aws/aws-sdk-go-v2/service/applicationautoscaling v1.37.1 github.com/aws/aws-sdk-go-v2/service/applicationinsights v1.31.0 github.com/aws/aws-sdk-go-v2/service/applicationsignals v1.12.0 github.com/aws/aws-sdk-go-v2/service/appmesh v1.31.0 diff --git a/go.sum b/go.sum index b9b09181756b..d858aafe25d9 100644 --- a/go.sum +++ b/go.sum @@ -67,8 +67,8 @@ github.com/aws/aws-sdk-go-v2/service/appflow v1.47.1 h1:6LIRPPKQWchfkDZbC9iW0FCk github.com/aws/aws-sdk-go-v2/service/appflow v1.47.1/go.mod h1:bOvWsq5G25xdPP8KN1rfXq+cF5Uh3apZJQ9/xhhqzVU= github.com/aws/aws-sdk-go-v2/service/appintegrations v1.33.1 h1:sBqUFcefH0sf+d0uS75pYpPiwFg8AzrINC0PartTgqk= github.com/aws/aws-sdk-go-v2/service/appintegrations v1.33.1/go.mod h1:unDUxaKaATQsiTmjeLwD1dz9zFR6DUSfdaUuczhqZ60= -github.com/aws/aws-sdk-go-v2/service/applicationautoscaling v1.37.0 h1:9bE9SG8peoqYEWiuOBBKaAP2i2LsNNrW68x8Q7PrNaE= -github.com/aws/aws-sdk-go-v2/service/applicationautoscaling v1.37.0/go.mod h1:hcLPVx3PUS21WL/F8XVDIrMnZL1LfSDHQCmjC7T0HDE= +github.com/aws/aws-sdk-go-v2/service/applicationautoscaling v1.37.1 h1:jJscyHRsZoSRMINE7JTaezT1o4hoNrmnq+3LZzsA2KA= +github.com/aws/aws-sdk-go-v2/service/applicationautoscaling v1.37.1/go.mod h1:U6e5PYaKSZZB5h5MHp5M5HZsqa0Fnhh8ts2nU2HUYz8= github.com/aws/aws-sdk-go-v2/service/applicationinsights v1.31.0 h1:hvp21wSai9AFA4vzcIg7l5c3JtmgQRyPGAjbWIxc8co= github.com/aws/aws-sdk-go-v2/service/applicationinsights v1.31.0/go.mod h1:SnU/+b9rlPjAnFYnYltznVGctbaJIZB/GgfakDYMIiY= github.com/aws/aws-sdk-go-v2/service/applicationsignals v1.12.0 h1:BXd7RVhn6tugKwdPgm/yC7b+IO+WlJFTFsZuvZrlffg= From fed3e6aa035011bf7742d3cb25507c3d4465a584 Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 09:11:18 -0400 Subject: [PATCH 098/365] go get github.com/aws/aws-sdk-go-v2/service/applicationinsights. --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 3379e60fe533..6261cc0d9288 100644 --- a/go.mod +++ b/go.mod @@ -29,7 +29,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/appflow v1.47.1 github.com/aws/aws-sdk-go-v2/service/appintegrations v1.33.1 github.com/aws/aws-sdk-go-v2/service/applicationautoscaling v1.37.1 - github.com/aws/aws-sdk-go-v2/service/applicationinsights v1.31.0 + github.com/aws/aws-sdk-go-v2/service/applicationinsights v1.31.1 github.com/aws/aws-sdk-go-v2/service/applicationsignals v1.12.0 github.com/aws/aws-sdk-go-v2/service/appmesh v1.31.0 github.com/aws/aws-sdk-go-v2/service/apprunner v1.35.0 diff --git a/go.sum b/go.sum index d858aafe25d9..19df4446f440 100644 --- a/go.sum +++ b/go.sum @@ -69,8 +69,8 @@ github.com/aws/aws-sdk-go-v2/service/appintegrations v1.33.1 h1:sBqUFcefH0sf+d0u github.com/aws/aws-sdk-go-v2/service/appintegrations v1.33.1/go.mod h1:unDUxaKaATQsiTmjeLwD1dz9zFR6DUSfdaUuczhqZ60= github.com/aws/aws-sdk-go-v2/service/applicationautoscaling v1.37.1 h1:jJscyHRsZoSRMINE7JTaezT1o4hoNrmnq+3LZzsA2KA= github.com/aws/aws-sdk-go-v2/service/applicationautoscaling v1.37.1/go.mod h1:U6e5PYaKSZZB5h5MHp5M5HZsqa0Fnhh8ts2nU2HUYz8= -github.com/aws/aws-sdk-go-v2/service/applicationinsights v1.31.0 h1:hvp21wSai9AFA4vzcIg7l5c3JtmgQRyPGAjbWIxc8co= -github.com/aws/aws-sdk-go-v2/service/applicationinsights v1.31.0/go.mod h1:SnU/+b9rlPjAnFYnYltznVGctbaJIZB/GgfakDYMIiY= +github.com/aws/aws-sdk-go-v2/service/applicationinsights v1.31.1 h1:hL38Wrg+M1ppQsh/7KU3zF4LJ37EYJgP6lxsJzk8JAY= +github.com/aws/aws-sdk-go-v2/service/applicationinsights v1.31.1/go.mod h1:Sb1hExvSSaroiqVyAZvSNSnde+ljebREjCK9NcFgGSw= github.com/aws/aws-sdk-go-v2/service/applicationsignals v1.12.0 h1:BXd7RVhn6tugKwdPgm/yC7b+IO+WlJFTFsZuvZrlffg= github.com/aws/aws-sdk-go-v2/service/applicationsignals v1.12.0/go.mod h1:SlkopoaM3lB8h8eZF4//p+tOaRaoST+6hVMe4JqUHP0= github.com/aws/aws-sdk-go-v2/service/appmesh v1.31.0 h1:qugjZou8+mIsLW+wZXoLOW60gXsvUlm95V0lyC5la8s= From 602584d8f337e49a1da56390a81c8af348d4454e Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 09:11:19 -0400 Subject: [PATCH 099/365] go get github.com/aws/aws-sdk-go-v2/service/applicationsignals. --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 6261cc0d9288..37f49224010a 100644 --- a/go.mod +++ b/go.mod @@ -30,7 +30,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/appintegrations v1.33.1 github.com/aws/aws-sdk-go-v2/service/applicationautoscaling v1.37.1 github.com/aws/aws-sdk-go-v2/service/applicationinsights v1.31.1 - github.com/aws/aws-sdk-go-v2/service/applicationsignals v1.12.0 + github.com/aws/aws-sdk-go-v2/service/applicationsignals v1.12.1 github.com/aws/aws-sdk-go-v2/service/appmesh v1.31.0 github.com/aws/aws-sdk-go-v2/service/apprunner v1.35.0 github.com/aws/aws-sdk-go-v2/service/appstream v1.46.0 diff --git a/go.sum b/go.sum index 19df4446f440..3902202a03b4 100644 --- a/go.sum +++ b/go.sum @@ -71,8 +71,8 @@ github.com/aws/aws-sdk-go-v2/service/applicationautoscaling v1.37.1 h1:jJscyHRsZ github.com/aws/aws-sdk-go-v2/service/applicationautoscaling v1.37.1/go.mod h1:U6e5PYaKSZZB5h5MHp5M5HZsqa0Fnhh8ts2nU2HUYz8= github.com/aws/aws-sdk-go-v2/service/applicationinsights v1.31.1 h1:hL38Wrg+M1ppQsh/7KU3zF4LJ37EYJgP6lxsJzk8JAY= github.com/aws/aws-sdk-go-v2/service/applicationinsights v1.31.1/go.mod h1:Sb1hExvSSaroiqVyAZvSNSnde+ljebREjCK9NcFgGSw= -github.com/aws/aws-sdk-go-v2/service/applicationsignals v1.12.0 h1:BXd7RVhn6tugKwdPgm/yC7b+IO+WlJFTFsZuvZrlffg= -github.com/aws/aws-sdk-go-v2/service/applicationsignals v1.12.0/go.mod h1:SlkopoaM3lB8h8eZF4//p+tOaRaoST+6hVMe4JqUHP0= +github.com/aws/aws-sdk-go-v2/service/applicationsignals v1.12.1 h1:iy4/2jZHe+AZ+dXaajLA9GiFqjCgSr98sNNaBchCWic= +github.com/aws/aws-sdk-go-v2/service/applicationsignals v1.12.1/go.mod h1:m2DMDjqYA42+z/vUFqhCH0JMPSQBRj1x7qzx0xb3BGU= github.com/aws/aws-sdk-go-v2/service/appmesh v1.31.0 h1:qugjZou8+mIsLW+wZXoLOW60gXsvUlm95V0lyC5la8s= github.com/aws/aws-sdk-go-v2/service/appmesh v1.31.0/go.mod h1:bA5fMk8wXx5qBL/V7Ip0EvX/HuvbKmQ0sFd+6cdxM08= github.com/aws/aws-sdk-go-v2/service/apprunner v1.35.0 h1:bS+UgsAvoUY4PosznqH1hyN4iNU8trYovXkdmgO0muQ= From 2368e38eae73c5667364091dcdd4a75223122cd8 Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 09:11:20 -0400 Subject: [PATCH 100/365] go get github.com/aws/aws-sdk-go-v2/service/appmesh. --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 37f49224010a..1821cd635365 100644 --- a/go.mod +++ b/go.mod @@ -31,7 +31,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/applicationautoscaling v1.37.1 github.com/aws/aws-sdk-go-v2/service/applicationinsights v1.31.1 github.com/aws/aws-sdk-go-v2/service/applicationsignals v1.12.1 - github.com/aws/aws-sdk-go-v2/service/appmesh v1.31.0 + github.com/aws/aws-sdk-go-v2/service/appmesh v1.31.1 github.com/aws/aws-sdk-go-v2/service/apprunner v1.35.0 github.com/aws/aws-sdk-go-v2/service/appstream v1.46.0 github.com/aws/aws-sdk-go-v2/service/appsync v1.48.0 diff --git a/go.sum b/go.sum index 3902202a03b4..9306229b5979 100644 --- a/go.sum +++ b/go.sum @@ -73,8 +73,8 @@ github.com/aws/aws-sdk-go-v2/service/applicationinsights v1.31.1 h1:hL38Wrg+M1pp github.com/aws/aws-sdk-go-v2/service/applicationinsights v1.31.1/go.mod h1:Sb1hExvSSaroiqVyAZvSNSnde+ljebREjCK9NcFgGSw= github.com/aws/aws-sdk-go-v2/service/applicationsignals v1.12.1 h1:iy4/2jZHe+AZ+dXaajLA9GiFqjCgSr98sNNaBchCWic= github.com/aws/aws-sdk-go-v2/service/applicationsignals v1.12.1/go.mod h1:m2DMDjqYA42+z/vUFqhCH0JMPSQBRj1x7qzx0xb3BGU= -github.com/aws/aws-sdk-go-v2/service/appmesh v1.31.0 h1:qugjZou8+mIsLW+wZXoLOW60gXsvUlm95V0lyC5la8s= -github.com/aws/aws-sdk-go-v2/service/appmesh v1.31.0/go.mod h1:bA5fMk8wXx5qBL/V7Ip0EvX/HuvbKmQ0sFd+6cdxM08= +github.com/aws/aws-sdk-go-v2/service/appmesh v1.31.1 h1:e8FX41jsKWustjg9j2aCB8U6lGEJc4M2AmQg/4sly4k= +github.com/aws/aws-sdk-go-v2/service/appmesh v1.31.1/go.mod h1:QI0IZBZJ5PDUkH5H3RsywJidrT6FfQ7kPKs+dCBXsfA= github.com/aws/aws-sdk-go-v2/service/apprunner v1.35.0 h1:bS+UgsAvoUY4PosznqH1hyN4iNU8trYovXkdmgO0muQ= github.com/aws/aws-sdk-go-v2/service/apprunner v1.35.0/go.mod h1:U8UVqTW65Tof1p3SRWQQft+d4BpsKrlV6EV0M1vLCtA= github.com/aws/aws-sdk-go-v2/service/appstream v1.46.0 h1:/X5meto+RCnggbkRMmBtd8kBK7oHT1uBEBQ2lEliDZo= From b71e4dd3a8eb85b849543f772bf58876fadd0450 Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 09:11:21 -0400 Subject: [PATCH 101/365] go get github.com/aws/aws-sdk-go-v2/service/apprunner. --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 1821cd635365..6fac1a5da4d7 100644 --- a/go.mod +++ b/go.mod @@ -32,7 +32,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/applicationinsights v1.31.1 github.com/aws/aws-sdk-go-v2/service/applicationsignals v1.12.1 github.com/aws/aws-sdk-go-v2/service/appmesh v1.31.1 - github.com/aws/aws-sdk-go-v2/service/apprunner v1.35.0 + github.com/aws/aws-sdk-go-v2/service/apprunner v1.35.1 github.com/aws/aws-sdk-go-v2/service/appstream v1.46.0 github.com/aws/aws-sdk-go-v2/service/appsync v1.48.0 github.com/aws/aws-sdk-go-v2/service/athena v1.52.0 diff --git a/go.sum b/go.sum index 9306229b5979..e2f5c9d5e5c1 100644 --- a/go.sum +++ b/go.sum @@ -75,8 +75,8 @@ github.com/aws/aws-sdk-go-v2/service/applicationsignals v1.12.1 h1:iy4/2jZHe+AZ+ github.com/aws/aws-sdk-go-v2/service/applicationsignals v1.12.1/go.mod h1:m2DMDjqYA42+z/vUFqhCH0JMPSQBRj1x7qzx0xb3BGU= github.com/aws/aws-sdk-go-v2/service/appmesh v1.31.1 h1:e8FX41jsKWustjg9j2aCB8U6lGEJc4M2AmQg/4sly4k= github.com/aws/aws-sdk-go-v2/service/appmesh v1.31.1/go.mod h1:QI0IZBZJ5PDUkH5H3RsywJidrT6FfQ7kPKs+dCBXsfA= -github.com/aws/aws-sdk-go-v2/service/apprunner v1.35.0 h1:bS+UgsAvoUY4PosznqH1hyN4iNU8trYovXkdmgO0muQ= -github.com/aws/aws-sdk-go-v2/service/apprunner v1.35.0/go.mod h1:U8UVqTW65Tof1p3SRWQQft+d4BpsKrlV6EV0M1vLCtA= +github.com/aws/aws-sdk-go-v2/service/apprunner v1.35.1 h1:+Zn6vfiFbRmQCcGQiyImMftao+e7s360Q/qFhz2Cgmg= +github.com/aws/aws-sdk-go-v2/service/apprunner v1.35.1/go.mod h1:S07Cfmppi5b3wu11h6o3My/N9nUqjQ7u0U+wbISMciU= github.com/aws/aws-sdk-go-v2/service/appstream v1.46.0 h1:/X5meto+RCnggbkRMmBtd8kBK7oHT1uBEBQ2lEliDZo= github.com/aws/aws-sdk-go-v2/service/appstream v1.46.0/go.mod h1:SVsRtEHMs12akMPFckO9wsOzPPpVEjRGjmaW26FhuhM= github.com/aws/aws-sdk-go-v2/service/appsync v1.48.0 h1:ai5DRF3OzbJjB5EQ4xHhKVXB0jf5IZ4ezxYaT6hw7qA= From b170771808cf8942135c935b2c676c77d206263d Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 09:11:22 -0400 Subject: [PATCH 102/365] go get github.com/aws/aws-sdk-go-v2/service/appstream. --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 6fac1a5da4d7..1ccaa2c0492d 100644 --- a/go.mod +++ b/go.mod @@ -33,7 +33,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/applicationsignals v1.12.1 github.com/aws/aws-sdk-go-v2/service/appmesh v1.31.1 github.com/aws/aws-sdk-go-v2/service/apprunner v1.35.1 - github.com/aws/aws-sdk-go-v2/service/appstream v1.46.0 + github.com/aws/aws-sdk-go-v2/service/appstream v1.46.1 github.com/aws/aws-sdk-go-v2/service/appsync v1.48.0 github.com/aws/aws-sdk-go-v2/service/athena v1.52.0 github.com/aws/aws-sdk-go-v2/service/auditmanager v1.41.0 diff --git a/go.sum b/go.sum index e2f5c9d5e5c1..9277c531aaa1 100644 --- a/go.sum +++ b/go.sum @@ -77,8 +77,8 @@ github.com/aws/aws-sdk-go-v2/service/appmesh v1.31.1 h1:e8FX41jsKWustjg9j2aCB8U6 github.com/aws/aws-sdk-go-v2/service/appmesh v1.31.1/go.mod h1:QI0IZBZJ5PDUkH5H3RsywJidrT6FfQ7kPKs+dCBXsfA= github.com/aws/aws-sdk-go-v2/service/apprunner v1.35.1 h1:+Zn6vfiFbRmQCcGQiyImMftao+e7s360Q/qFhz2Cgmg= github.com/aws/aws-sdk-go-v2/service/apprunner v1.35.1/go.mod h1:S07Cfmppi5b3wu11h6o3My/N9nUqjQ7u0U+wbISMciU= -github.com/aws/aws-sdk-go-v2/service/appstream v1.46.0 h1:/X5meto+RCnggbkRMmBtd8kBK7oHT1uBEBQ2lEliDZo= -github.com/aws/aws-sdk-go-v2/service/appstream v1.46.0/go.mod h1:SVsRtEHMs12akMPFckO9wsOzPPpVEjRGjmaW26FhuhM= +github.com/aws/aws-sdk-go-v2/service/appstream v1.46.1 h1:I2q1xR7PWi/LQlEQKuYhs85c5Pe+8lVXhK8MJ6gbiMI= +github.com/aws/aws-sdk-go-v2/service/appstream v1.46.1/go.mod h1:5kFtgc4YQoe7OR0BU2niXUX/gIxvO0e7P3gl0w/qNa0= github.com/aws/aws-sdk-go-v2/service/appsync v1.48.0 h1:ai5DRF3OzbJjB5EQ4xHhKVXB0jf5IZ4ezxYaT6hw7qA= github.com/aws/aws-sdk-go-v2/service/appsync v1.48.0/go.mod h1:lyQZHTY0TgxqlhI0W2c+H+R/8pLKlrJy5dxfxQRRhNs= github.com/aws/aws-sdk-go-v2/service/athena v1.52.0 h1:p9wvhJaEjZSaLH5N4OnspChSz3E4RsDkH13tVM/3B2c= From 18bef9778ace2ed46cfb7ca55699489acb9013e0 Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 09:11:23 -0400 Subject: [PATCH 103/365] go get github.com/aws/aws-sdk-go-v2/service/appsync. --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 1ccaa2c0492d..d491a4043161 100644 --- a/go.mod +++ b/go.mod @@ -34,7 +34,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/appmesh v1.31.1 github.com/aws/aws-sdk-go-v2/service/apprunner v1.35.1 github.com/aws/aws-sdk-go-v2/service/appstream v1.46.1 - github.com/aws/aws-sdk-go-v2/service/appsync v1.48.0 + github.com/aws/aws-sdk-go-v2/service/appsync v1.48.1 github.com/aws/aws-sdk-go-v2/service/athena v1.52.0 github.com/aws/aws-sdk-go-v2/service/auditmanager v1.41.0 github.com/aws/aws-sdk-go-v2/service/autoscaling v1.55.0 diff --git a/go.sum b/go.sum index 9277c531aaa1..98f43294c0ea 100644 --- a/go.sum +++ b/go.sum @@ -79,8 +79,8 @@ github.com/aws/aws-sdk-go-v2/service/apprunner v1.35.1 h1:+Zn6vfiFbRmQCcGQiyImMf github.com/aws/aws-sdk-go-v2/service/apprunner v1.35.1/go.mod h1:S07Cfmppi5b3wu11h6o3My/N9nUqjQ7u0U+wbISMciU= github.com/aws/aws-sdk-go-v2/service/appstream v1.46.1 h1:I2q1xR7PWi/LQlEQKuYhs85c5Pe+8lVXhK8MJ6gbiMI= github.com/aws/aws-sdk-go-v2/service/appstream v1.46.1/go.mod h1:5kFtgc4YQoe7OR0BU2niXUX/gIxvO0e7P3gl0w/qNa0= -github.com/aws/aws-sdk-go-v2/service/appsync v1.48.0 h1:ai5DRF3OzbJjB5EQ4xHhKVXB0jf5IZ4ezxYaT6hw7qA= -github.com/aws/aws-sdk-go-v2/service/appsync v1.48.0/go.mod h1:lyQZHTY0TgxqlhI0W2c+H+R/8pLKlrJy5dxfxQRRhNs= +github.com/aws/aws-sdk-go-v2/service/appsync v1.48.1 h1:ZDL25UdJ53x6+HRznXwBcgoZS3I8YtJKUyNAD9P37F8= +github.com/aws/aws-sdk-go-v2/service/appsync v1.48.1/go.mod h1:E8yfHHkF3MIWOWRmvopbeK8wfCkeiNIqQ5f8G7fPaO4= github.com/aws/aws-sdk-go-v2/service/athena v1.52.0 h1:p9wvhJaEjZSaLH5N4OnspChSz3E4RsDkH13tVM/3B2c= github.com/aws/aws-sdk-go-v2/service/athena v1.52.0/go.mod h1:MKMLKcBoIDwNaHTTq8w8qvGJp3GJX3u2digEKbuzbVY= github.com/aws/aws-sdk-go-v2/service/auditmanager v1.41.0 h1:vBC392sHM7C6jqW2tnAZ1Qmk3JaR8Pj+ZmX0W/PQoFU= From 2e0d0f3fb28200e2cb47e99fbf7a02969f65389d Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 09:11:24 -0400 Subject: [PATCH 104/365] go get github.com/aws/aws-sdk-go-v2/service/athena. --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index d491a4043161..b06f63fb1c8d 100644 --- a/go.mod +++ b/go.mod @@ -35,7 +35,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/apprunner v1.35.1 github.com/aws/aws-sdk-go-v2/service/appstream v1.46.1 github.com/aws/aws-sdk-go-v2/service/appsync v1.48.1 - github.com/aws/aws-sdk-go-v2/service/athena v1.52.0 + github.com/aws/aws-sdk-go-v2/service/athena v1.52.1 github.com/aws/aws-sdk-go-v2/service/auditmanager v1.41.0 github.com/aws/aws-sdk-go-v2/service/autoscaling v1.55.0 github.com/aws/aws-sdk-go-v2/service/autoscalingplans v1.26.0 diff --git a/go.sum b/go.sum index 98f43294c0ea..b305f9b8d0c9 100644 --- a/go.sum +++ b/go.sum @@ -81,8 +81,8 @@ github.com/aws/aws-sdk-go-v2/service/appstream v1.46.1 h1:I2q1xR7PWi/LQlEQKuYhs8 github.com/aws/aws-sdk-go-v2/service/appstream v1.46.1/go.mod h1:5kFtgc4YQoe7OR0BU2niXUX/gIxvO0e7P3gl0w/qNa0= github.com/aws/aws-sdk-go-v2/service/appsync v1.48.1 h1:ZDL25UdJ53x6+HRznXwBcgoZS3I8YtJKUyNAD9P37F8= github.com/aws/aws-sdk-go-v2/service/appsync v1.48.1/go.mod h1:E8yfHHkF3MIWOWRmvopbeK8wfCkeiNIqQ5f8G7fPaO4= -github.com/aws/aws-sdk-go-v2/service/athena v1.52.0 h1:p9wvhJaEjZSaLH5N4OnspChSz3E4RsDkH13tVM/3B2c= -github.com/aws/aws-sdk-go-v2/service/athena v1.52.0/go.mod h1:MKMLKcBoIDwNaHTTq8w8qvGJp3GJX3u2digEKbuzbVY= +github.com/aws/aws-sdk-go-v2/service/athena v1.52.1 h1:5rNoigvi9hF3zv7e8hI5l+iY5KAwKklcZCgpAh56JKI= +github.com/aws/aws-sdk-go-v2/service/athena v1.52.1/go.mod h1:Xu33b8kDuxb2omK+SUaQfbJh48c0QA7t08ne92DvTOM= github.com/aws/aws-sdk-go-v2/service/auditmanager v1.41.0 h1:vBC392sHM7C6jqW2tnAZ1Qmk3JaR8Pj+ZmX0W/PQoFU= github.com/aws/aws-sdk-go-v2/service/auditmanager v1.41.0/go.mod h1:95zemB8g4WOE6JJIBtaaqeBbhohqM1pJFGUngpXSREQ= github.com/aws/aws-sdk-go-v2/service/autoscaling v1.55.0 h1:Yu7EifEr+k3+htelmx8BNZTGcWo27tKGoW4yYYpiPIQ= From 0613d22751d51b41a69b449683a76ad2fb7b49a9 Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 09:11:25 -0400 Subject: [PATCH 105/365] go get github.com/aws/aws-sdk-go-v2/service/auditmanager. --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index b06f63fb1c8d..ffd4d608f1e1 100644 --- a/go.mod +++ b/go.mod @@ -36,7 +36,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/appstream v1.46.1 github.com/aws/aws-sdk-go-v2/service/appsync v1.48.1 github.com/aws/aws-sdk-go-v2/service/athena v1.52.1 - github.com/aws/aws-sdk-go-v2/service/auditmanager v1.41.0 + github.com/aws/aws-sdk-go-v2/service/auditmanager v1.41.1 github.com/aws/aws-sdk-go-v2/service/autoscaling v1.55.0 github.com/aws/aws-sdk-go-v2/service/autoscalingplans v1.26.0 github.com/aws/aws-sdk-go-v2/service/backup v1.44.0 diff --git a/go.sum b/go.sum index b305f9b8d0c9..5adb8260e9e7 100644 --- a/go.sum +++ b/go.sum @@ -83,8 +83,8 @@ github.com/aws/aws-sdk-go-v2/service/appsync v1.48.1 h1:ZDL25UdJ53x6+HRznXwBcgoZ github.com/aws/aws-sdk-go-v2/service/appsync v1.48.1/go.mod h1:E8yfHHkF3MIWOWRmvopbeK8wfCkeiNIqQ5f8G7fPaO4= github.com/aws/aws-sdk-go-v2/service/athena v1.52.1 h1:5rNoigvi9hF3zv7e8hI5l+iY5KAwKklcZCgpAh56JKI= github.com/aws/aws-sdk-go-v2/service/athena v1.52.1/go.mod h1:Xu33b8kDuxb2omK+SUaQfbJh48c0QA7t08ne92DvTOM= -github.com/aws/aws-sdk-go-v2/service/auditmanager v1.41.0 h1:vBC392sHM7C6jqW2tnAZ1Qmk3JaR8Pj+ZmX0W/PQoFU= -github.com/aws/aws-sdk-go-v2/service/auditmanager v1.41.0/go.mod h1:95zemB8g4WOE6JJIBtaaqeBbhohqM1pJFGUngpXSREQ= +github.com/aws/aws-sdk-go-v2/service/auditmanager v1.41.1 h1:Qwhpy/ijOSxxI/V+je0qsHdxbqbDfBWR6MQ3HJF6BEs= +github.com/aws/aws-sdk-go-v2/service/auditmanager v1.41.1/go.mod h1:EarhE4+FhGV6sYnrDvsw7z4+pYSY9zX2xlkbuetUVmg= github.com/aws/aws-sdk-go-v2/service/autoscaling v1.55.0 h1:Yu7EifEr+k3+htelmx8BNZTGcWo27tKGoW4yYYpiPIQ= github.com/aws/aws-sdk-go-v2/service/autoscaling v1.55.0/go.mod h1:IxhwdOzzPBPhHpz1NjzeFaqA8ov9OvngSlijKMradcM= github.com/aws/aws-sdk-go-v2/service/autoscalingplans v1.26.0 h1:8f+Jq2BKy4U6/YU1GSkMxkBTY1CZdblgmFlQwKFffMw= From 122515b93ddb271359dcbc45f0d5aca494274192 Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 09:11:27 -0400 Subject: [PATCH 106/365] go get github.com/aws/aws-sdk-go-v2/service/autoscaling. --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index ffd4d608f1e1..a2c4c3441eb7 100644 --- a/go.mod +++ b/go.mod @@ -37,7 +37,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/appsync v1.48.1 github.com/aws/aws-sdk-go-v2/service/athena v1.52.1 github.com/aws/aws-sdk-go-v2/service/auditmanager v1.41.1 - github.com/aws/aws-sdk-go-v2/service/autoscaling v1.55.0 + github.com/aws/aws-sdk-go-v2/service/autoscaling v1.55.1 github.com/aws/aws-sdk-go-v2/service/autoscalingplans v1.26.0 github.com/aws/aws-sdk-go-v2/service/backup v1.44.0 github.com/aws/aws-sdk-go-v2/service/batch v1.55.0 diff --git a/go.sum b/go.sum index 5adb8260e9e7..3f91c0839c83 100644 --- a/go.sum +++ b/go.sum @@ -85,8 +85,8 @@ github.com/aws/aws-sdk-go-v2/service/athena v1.52.1 h1:5rNoigvi9hF3zv7e8hI5l+iY5 github.com/aws/aws-sdk-go-v2/service/athena v1.52.1/go.mod h1:Xu33b8kDuxb2omK+SUaQfbJh48c0QA7t08ne92DvTOM= github.com/aws/aws-sdk-go-v2/service/auditmanager v1.41.1 h1:Qwhpy/ijOSxxI/V+je0qsHdxbqbDfBWR6MQ3HJF6BEs= github.com/aws/aws-sdk-go-v2/service/auditmanager v1.41.1/go.mod h1:EarhE4+FhGV6sYnrDvsw7z4+pYSY9zX2xlkbuetUVmg= -github.com/aws/aws-sdk-go-v2/service/autoscaling v1.55.0 h1:Yu7EifEr+k3+htelmx8BNZTGcWo27tKGoW4yYYpiPIQ= -github.com/aws/aws-sdk-go-v2/service/autoscaling v1.55.0/go.mod h1:IxhwdOzzPBPhHpz1NjzeFaqA8ov9OvngSlijKMradcM= +github.com/aws/aws-sdk-go-v2/service/autoscaling v1.55.1 h1:zX6/huIuV5ldMXSiVVdmRT2oO1M+xNLzdt0du0QuhVE= +github.com/aws/aws-sdk-go-v2/service/autoscaling v1.55.1/go.mod h1:KWk5jIp+F7eu9vjz6g/UdeIk5FX2zw7zllkf8EwmHjM= github.com/aws/aws-sdk-go-v2/service/autoscalingplans v1.26.0 h1:8f+Jq2BKy4U6/YU1GSkMxkBTY1CZdblgmFlQwKFffMw= github.com/aws/aws-sdk-go-v2/service/autoscalingplans v1.26.0/go.mod h1:XwZCGipecw+2zfgN4d5d9OwbUcVy3UjctRQIdy5UukU= github.com/aws/aws-sdk-go-v2/service/backup v1.44.0 h1:eR1xS3evF+4XG1O1XuM3sN0E8CqI5PQ/NXm+13Rl+Kc= From e8e4d5ee6064d3f41496bb4e8bd6436f62fe968c Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 09:11:28 -0400 Subject: [PATCH 107/365] go get github.com/aws/aws-sdk-go-v2/service/autoscalingplans. --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index a2c4c3441eb7..29e9dd2dc6dd 100644 --- a/go.mod +++ b/go.mod @@ -38,7 +38,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/athena v1.52.1 github.com/aws/aws-sdk-go-v2/service/auditmanager v1.41.1 github.com/aws/aws-sdk-go-v2/service/autoscaling v1.55.1 - github.com/aws/aws-sdk-go-v2/service/autoscalingplans v1.26.0 + github.com/aws/aws-sdk-go-v2/service/autoscalingplans v1.26.1 github.com/aws/aws-sdk-go-v2/service/backup v1.44.0 github.com/aws/aws-sdk-go-v2/service/batch v1.55.0 github.com/aws/aws-sdk-go-v2/service/bcmdataexports v1.9.0 diff --git a/go.sum b/go.sum index 3f91c0839c83..a022dce13346 100644 --- a/go.sum +++ b/go.sum @@ -87,8 +87,8 @@ github.com/aws/aws-sdk-go-v2/service/auditmanager v1.41.1 h1:Qwhpy/ijOSxxI/V+je0 github.com/aws/aws-sdk-go-v2/service/auditmanager v1.41.1/go.mod h1:EarhE4+FhGV6sYnrDvsw7z4+pYSY9zX2xlkbuetUVmg= github.com/aws/aws-sdk-go-v2/service/autoscaling v1.55.1 h1:zX6/huIuV5ldMXSiVVdmRT2oO1M+xNLzdt0du0QuhVE= github.com/aws/aws-sdk-go-v2/service/autoscaling v1.55.1/go.mod h1:KWk5jIp+F7eu9vjz6g/UdeIk5FX2zw7zllkf8EwmHjM= -github.com/aws/aws-sdk-go-v2/service/autoscalingplans v1.26.0 h1:8f+Jq2BKy4U6/YU1GSkMxkBTY1CZdblgmFlQwKFffMw= -github.com/aws/aws-sdk-go-v2/service/autoscalingplans v1.26.0/go.mod h1:XwZCGipecw+2zfgN4d5d9OwbUcVy3UjctRQIdy5UukU= +github.com/aws/aws-sdk-go-v2/service/autoscalingplans v1.26.1 h1:CkI6bqB4xGt4i8WFa4VPqkSS+2pnclSY4Zo0dwuplkE= +github.com/aws/aws-sdk-go-v2/service/autoscalingplans v1.26.1/go.mod h1:kvxZ8JSGk6ZHbsYqn02OFN2IPwKIyPq4gJJP2i68tlE= github.com/aws/aws-sdk-go-v2/service/backup v1.44.0 h1:eR1xS3evF+4XG1O1XuM3sN0E8CqI5PQ/NXm+13Rl+Kc= github.com/aws/aws-sdk-go-v2/service/backup v1.44.0/go.mod h1:li1OG6R/Y7AAyrZx2aTUDqpz0LSs/WN51sKzHfkHP/c= github.com/aws/aws-sdk-go-v2/service/batch v1.55.0 h1:LqqKzoCkvgSjtYRcS2AAPrATnE9fevXOhW3KOcn4yC8= From 522144ad64ca29a1160468c5db528791c386ae6d Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 09:11:29 -0400 Subject: [PATCH 108/365] go get github.com/aws/aws-sdk-go-v2/service/backup. --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 29e9dd2dc6dd..b197e7646976 100644 --- a/go.mod +++ b/go.mod @@ -39,7 +39,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/auditmanager v1.41.1 github.com/aws/aws-sdk-go-v2/service/autoscaling v1.55.1 github.com/aws/aws-sdk-go-v2/service/autoscalingplans v1.26.1 - github.com/aws/aws-sdk-go-v2/service/backup v1.44.0 + github.com/aws/aws-sdk-go-v2/service/backup v1.44.1 github.com/aws/aws-sdk-go-v2/service/batch v1.55.0 github.com/aws/aws-sdk-go-v2/service/bcmdataexports v1.9.0 github.com/aws/aws-sdk-go-v2/service/bedrock v1.40.0 diff --git a/go.sum b/go.sum index a022dce13346..5ba73a45f3af 100644 --- a/go.sum +++ b/go.sum @@ -89,8 +89,8 @@ github.com/aws/aws-sdk-go-v2/service/autoscaling v1.55.1 h1:zX6/huIuV5ldMXSiVVdm github.com/aws/aws-sdk-go-v2/service/autoscaling v1.55.1/go.mod h1:KWk5jIp+F7eu9vjz6g/UdeIk5FX2zw7zllkf8EwmHjM= github.com/aws/aws-sdk-go-v2/service/autoscalingplans v1.26.1 h1:CkI6bqB4xGt4i8WFa4VPqkSS+2pnclSY4Zo0dwuplkE= github.com/aws/aws-sdk-go-v2/service/autoscalingplans v1.26.1/go.mod h1:kvxZ8JSGk6ZHbsYqn02OFN2IPwKIyPq4gJJP2i68tlE= -github.com/aws/aws-sdk-go-v2/service/backup v1.44.0 h1:eR1xS3evF+4XG1O1XuM3sN0E8CqI5PQ/NXm+13Rl+Kc= -github.com/aws/aws-sdk-go-v2/service/backup v1.44.0/go.mod h1:li1OG6R/Y7AAyrZx2aTUDqpz0LSs/WN51sKzHfkHP/c= +github.com/aws/aws-sdk-go-v2/service/backup v1.44.1 h1:g8w8gNNnmpj6IB6f/ZwbTLgCHTq72EP3vFy3LYAQ49k= +github.com/aws/aws-sdk-go-v2/service/backup v1.44.1/go.mod h1:w/Tj0I8Gs1JAz/cDsWZg0Eph8Tq++krpwr5lxzRj9gs= github.com/aws/aws-sdk-go-v2/service/batch v1.55.0 h1:LqqKzoCkvgSjtYRcS2AAPrATnE9fevXOhW3KOcn4yC8= github.com/aws/aws-sdk-go-v2/service/batch v1.55.0/go.mod h1:AVlcYXRLx8dajiWttkFlo4a+4VpXB/NP1xzzvG0Cq4U= github.com/aws/aws-sdk-go-v2/service/bcmdataexports v1.9.0 h1:WrmyKlmtyGRIyvl3ryZ4XESbYWz3Gxo2gMvasHFbQnk= From 0424a3dbd5ae4d00c4b3a22543d7c6abd5a5b187 Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 09:11:30 -0400 Subject: [PATCH 109/365] go get github.com/aws/aws-sdk-go-v2/service/batch. --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index b197e7646976..ac28a5c4db83 100644 --- a/go.mod +++ b/go.mod @@ -40,7 +40,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/autoscaling v1.55.1 github.com/aws/aws-sdk-go-v2/service/autoscalingplans v1.26.1 github.com/aws/aws-sdk-go-v2/service/backup v1.44.1 - github.com/aws/aws-sdk-go-v2/service/batch v1.55.0 + github.com/aws/aws-sdk-go-v2/service/batch v1.55.1 github.com/aws/aws-sdk-go-v2/service/bcmdataexports v1.9.0 github.com/aws/aws-sdk-go-v2/service/bedrock v1.40.0 github.com/aws/aws-sdk-go-v2/service/bedrockagent v1.46.0 diff --git a/go.sum b/go.sum index 5ba73a45f3af..0691bbc49d57 100644 --- a/go.sum +++ b/go.sum @@ -91,8 +91,8 @@ github.com/aws/aws-sdk-go-v2/service/autoscalingplans v1.26.1 h1:CkI6bqB4xGt4i8W github.com/aws/aws-sdk-go-v2/service/autoscalingplans v1.26.1/go.mod h1:kvxZ8JSGk6ZHbsYqn02OFN2IPwKIyPq4gJJP2i68tlE= github.com/aws/aws-sdk-go-v2/service/backup v1.44.1 h1:g8w8gNNnmpj6IB6f/ZwbTLgCHTq72EP3vFy3LYAQ49k= github.com/aws/aws-sdk-go-v2/service/backup v1.44.1/go.mod h1:w/Tj0I8Gs1JAz/cDsWZg0Eph8Tq++krpwr5lxzRj9gs= -github.com/aws/aws-sdk-go-v2/service/batch v1.55.0 h1:LqqKzoCkvgSjtYRcS2AAPrATnE9fevXOhW3KOcn4yC8= -github.com/aws/aws-sdk-go-v2/service/batch v1.55.0/go.mod h1:AVlcYXRLx8dajiWttkFlo4a+4VpXB/NP1xzzvG0Cq4U= +github.com/aws/aws-sdk-go-v2/service/batch v1.55.1 h1:Rw14EEy05ulJ8uVBr0NXS7rBF5blIdKgd+XB8IT9Cvk= +github.com/aws/aws-sdk-go-v2/service/batch v1.55.1/go.mod h1:JfQ32ZzGrphsjC5aSZ6NirIQKQEvIRxd7XOBA2GqP3Q= github.com/aws/aws-sdk-go-v2/service/bcmdataexports v1.9.0 h1:WrmyKlmtyGRIyvl3ryZ4XESbYWz3Gxo2gMvasHFbQnk= github.com/aws/aws-sdk-go-v2/service/bcmdataexports v1.9.0/go.mod h1:W57YXu7pe8M/G86RzC/19XX/NkLiRpiz6zoOV0CikPQ= github.com/aws/aws-sdk-go-v2/service/bedrock v1.40.0 h1:zm35sSNjMd91vO+8W7vh2bch6sxUHiAjEEPaH8NM04o= From eb1c1c99f956e8f9b2f61c4a97adaf1cd64fc4f5 Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 09:11:31 -0400 Subject: [PATCH 110/365] go get github.com/aws/aws-sdk-go-v2/service/bcmdataexports. --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index ac28a5c4db83..1aa121ed80b0 100644 --- a/go.mod +++ b/go.mod @@ -41,7 +41,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/autoscalingplans v1.26.1 github.com/aws/aws-sdk-go-v2/service/backup v1.44.1 github.com/aws/aws-sdk-go-v2/service/batch v1.55.1 - github.com/aws/aws-sdk-go-v2/service/bcmdataexports v1.9.0 + github.com/aws/aws-sdk-go-v2/service/bcmdataexports v1.9.1 github.com/aws/aws-sdk-go-v2/service/bedrock v1.40.0 github.com/aws/aws-sdk-go-v2/service/bedrockagent v1.46.0 github.com/aws/aws-sdk-go-v2/service/billing v1.3.0 diff --git a/go.sum b/go.sum index 0691bbc49d57..c240fc6ca192 100644 --- a/go.sum +++ b/go.sum @@ -93,8 +93,8 @@ github.com/aws/aws-sdk-go-v2/service/backup v1.44.1 h1:g8w8gNNnmpj6IB6f/ZwbTLgCH github.com/aws/aws-sdk-go-v2/service/backup v1.44.1/go.mod h1:w/Tj0I8Gs1JAz/cDsWZg0Eph8Tq++krpwr5lxzRj9gs= github.com/aws/aws-sdk-go-v2/service/batch v1.55.1 h1:Rw14EEy05ulJ8uVBr0NXS7rBF5blIdKgd+XB8IT9Cvk= github.com/aws/aws-sdk-go-v2/service/batch v1.55.1/go.mod h1:JfQ32ZzGrphsjC5aSZ6NirIQKQEvIRxd7XOBA2GqP3Q= -github.com/aws/aws-sdk-go-v2/service/bcmdataexports v1.9.0 h1:WrmyKlmtyGRIyvl3ryZ4XESbYWz3Gxo2gMvasHFbQnk= -github.com/aws/aws-sdk-go-v2/service/bcmdataexports v1.9.0/go.mod h1:W57YXu7pe8M/G86RzC/19XX/NkLiRpiz6zoOV0CikPQ= +github.com/aws/aws-sdk-go-v2/service/bcmdataexports v1.9.1 h1:KLTrvcyHoLx34b0r8DJrg6IveMJ6Rhrr/W7CTtcyHcY= +github.com/aws/aws-sdk-go-v2/service/bcmdataexports v1.9.1/go.mod h1:5ycq8robRvawqh+gGGSYDCtX/lgJcBHSpbXS41G2YZ0= github.com/aws/aws-sdk-go-v2/service/bedrock v1.40.0 h1:zm35sSNjMd91vO+8W7vh2bch6sxUHiAjEEPaH8NM04o= github.com/aws/aws-sdk-go-v2/service/bedrock v1.40.0/go.mod h1:S5IsJtXfvdcm2+yY02K+52oqXeqWQmTjjW5GMrf+FPg= github.com/aws/aws-sdk-go-v2/service/bedrockagent v1.46.0 h1:jCBWnVsagTCEvZLKG/uPy6+71GYP7birkVoKbCJHyok= From 2c430c8700e6140bfdd596628abc70418cc73e6d Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 09:11:32 -0400 Subject: [PATCH 111/365] go get github.com/aws/aws-sdk-go-v2/service/bedrock. --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 1aa121ed80b0..5ef1d2cea3f8 100644 --- a/go.mod +++ b/go.mod @@ -42,7 +42,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/backup v1.44.1 github.com/aws/aws-sdk-go-v2/service/batch v1.55.1 github.com/aws/aws-sdk-go-v2/service/bcmdataexports v1.9.1 - github.com/aws/aws-sdk-go-v2/service/bedrock v1.40.0 + github.com/aws/aws-sdk-go-v2/service/bedrock v1.40.1 github.com/aws/aws-sdk-go-v2/service/bedrockagent v1.46.0 github.com/aws/aws-sdk-go-v2/service/billing v1.3.0 github.com/aws/aws-sdk-go-v2/service/budgets v1.33.0 diff --git a/go.sum b/go.sum index c240fc6ca192..d44791f2e426 100644 --- a/go.sum +++ b/go.sum @@ -95,8 +95,8 @@ github.com/aws/aws-sdk-go-v2/service/batch v1.55.1 h1:Rw14EEy05ulJ8uVBr0NXS7rBF5 github.com/aws/aws-sdk-go-v2/service/batch v1.55.1/go.mod h1:JfQ32ZzGrphsjC5aSZ6NirIQKQEvIRxd7XOBA2GqP3Q= github.com/aws/aws-sdk-go-v2/service/bcmdataexports v1.9.1 h1:KLTrvcyHoLx34b0r8DJrg6IveMJ6Rhrr/W7CTtcyHcY= github.com/aws/aws-sdk-go-v2/service/bcmdataexports v1.9.1/go.mod h1:5ycq8robRvawqh+gGGSYDCtX/lgJcBHSpbXS41G2YZ0= -github.com/aws/aws-sdk-go-v2/service/bedrock v1.40.0 h1:zm35sSNjMd91vO+8W7vh2bch6sxUHiAjEEPaH8NM04o= -github.com/aws/aws-sdk-go-v2/service/bedrock v1.40.0/go.mod h1:S5IsJtXfvdcm2+yY02K+52oqXeqWQmTjjW5GMrf+FPg= +github.com/aws/aws-sdk-go-v2/service/bedrock v1.40.1 h1:sRAcWHE3DQOWNNfXfctc+R5QrVnDUwjqrqepIWo25HU= +github.com/aws/aws-sdk-go-v2/service/bedrock v1.40.1/go.mod h1:ZTp/fekiiAUkmAU4CDYjtk/hlRpPJnbGKaFzMNr+Hq4= github.com/aws/aws-sdk-go-v2/service/bedrockagent v1.46.0 h1:jCBWnVsagTCEvZLKG/uPy6+71GYP7birkVoKbCJHyok= github.com/aws/aws-sdk-go-v2/service/bedrockagent v1.46.0/go.mod h1:4N6mAWgQwjyquPBaCzYdlUlyrieOsWWPKTaiNx9cNPo= github.com/aws/aws-sdk-go-v2/service/billing v1.3.0 h1:tlVjlumzAAw8zP5AAOBqUIKPfoAPjKUTqdMSLghcLZk= From c3028e424d4a41d174306b8e516525e64b143936 Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 09:11:33 -0400 Subject: [PATCH 112/365] go get github.com/aws/aws-sdk-go-v2/service/bedrockagent. --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 5ef1d2cea3f8..46536a21cfd7 100644 --- a/go.mod +++ b/go.mod @@ -43,7 +43,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/batch v1.55.1 github.com/aws/aws-sdk-go-v2/service/bcmdataexports v1.9.1 github.com/aws/aws-sdk-go-v2/service/bedrock v1.40.1 - github.com/aws/aws-sdk-go-v2/service/bedrockagent v1.46.0 + github.com/aws/aws-sdk-go-v2/service/bedrockagent v1.46.1 github.com/aws/aws-sdk-go-v2/service/billing v1.3.0 github.com/aws/aws-sdk-go-v2/service/budgets v1.33.0 github.com/aws/aws-sdk-go-v2/service/chatbot v1.11.0 diff --git a/go.sum b/go.sum index d44791f2e426..136a9e12360f 100644 --- a/go.sum +++ b/go.sum @@ -97,8 +97,8 @@ github.com/aws/aws-sdk-go-v2/service/bcmdataexports v1.9.1 h1:KLTrvcyHoLx34b0r8D github.com/aws/aws-sdk-go-v2/service/bcmdataexports v1.9.1/go.mod h1:5ycq8robRvawqh+gGGSYDCtX/lgJcBHSpbXS41G2YZ0= github.com/aws/aws-sdk-go-v2/service/bedrock v1.40.1 h1:sRAcWHE3DQOWNNfXfctc+R5QrVnDUwjqrqepIWo25HU= github.com/aws/aws-sdk-go-v2/service/bedrock v1.40.1/go.mod h1:ZTp/fekiiAUkmAU4CDYjtk/hlRpPJnbGKaFzMNr+Hq4= -github.com/aws/aws-sdk-go-v2/service/bedrockagent v1.46.0 h1:jCBWnVsagTCEvZLKG/uPy6+71GYP7birkVoKbCJHyok= -github.com/aws/aws-sdk-go-v2/service/bedrockagent v1.46.0/go.mod h1:4N6mAWgQwjyquPBaCzYdlUlyrieOsWWPKTaiNx9cNPo= +github.com/aws/aws-sdk-go-v2/service/bedrockagent v1.46.1 h1:+964aZWEhatObFc4aShL6yyLXcmr4rA6NPGd+y6TlSM= +github.com/aws/aws-sdk-go-v2/service/bedrockagent v1.46.1/go.mod h1:PYXdjAxfDP6jvOtgZIlXn+7DS2rYfMONfDiYxx1I3T0= github.com/aws/aws-sdk-go-v2/service/billing v1.3.0 h1:tlVjlumzAAw8zP5AAOBqUIKPfoAPjKUTqdMSLghcLZk= github.com/aws/aws-sdk-go-v2/service/billing v1.3.0/go.mod h1:WqJByCq6sb3eiEvkCO45UtSRVOHg9rYS2wDo6CZj0nQ= github.com/aws/aws-sdk-go-v2/service/budgets v1.33.0 h1:cemoi5rYYoxOCzM6ZusNIOGGz5pO24fD86K/0DM3N8w= From 38889712d2c1bb0f9d0d91f833748a4a6bdd315d Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 09:11:34 -0400 Subject: [PATCH 113/365] go get github.com/aws/aws-sdk-go-v2/service/billing. --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 46536a21cfd7..83e798898492 100644 --- a/go.mod +++ b/go.mod @@ -44,7 +44,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/bcmdataexports v1.9.1 github.com/aws/aws-sdk-go-v2/service/bedrock v1.40.1 github.com/aws/aws-sdk-go-v2/service/bedrockagent v1.46.1 - github.com/aws/aws-sdk-go-v2/service/billing v1.3.0 + github.com/aws/aws-sdk-go-v2/service/billing v1.3.1 github.com/aws/aws-sdk-go-v2/service/budgets v1.33.0 github.com/aws/aws-sdk-go-v2/service/chatbot v1.11.0 github.com/aws/aws-sdk-go-v2/service/chime v1.37.0 diff --git a/go.sum b/go.sum index 136a9e12360f..2e97bc0500d8 100644 --- a/go.sum +++ b/go.sum @@ -99,8 +99,8 @@ github.com/aws/aws-sdk-go-v2/service/bedrock v1.40.1 h1:sRAcWHE3DQOWNNfXfctc+R5Q github.com/aws/aws-sdk-go-v2/service/bedrock v1.40.1/go.mod h1:ZTp/fekiiAUkmAU4CDYjtk/hlRpPJnbGKaFzMNr+Hq4= github.com/aws/aws-sdk-go-v2/service/bedrockagent v1.46.1 h1:+964aZWEhatObFc4aShL6yyLXcmr4rA6NPGd+y6TlSM= github.com/aws/aws-sdk-go-v2/service/bedrockagent v1.46.1/go.mod h1:PYXdjAxfDP6jvOtgZIlXn+7DS2rYfMONfDiYxx1I3T0= -github.com/aws/aws-sdk-go-v2/service/billing v1.3.0 h1:tlVjlumzAAw8zP5AAOBqUIKPfoAPjKUTqdMSLghcLZk= -github.com/aws/aws-sdk-go-v2/service/billing v1.3.0/go.mod h1:WqJByCq6sb3eiEvkCO45UtSRVOHg9rYS2wDo6CZj0nQ= +github.com/aws/aws-sdk-go-v2/service/billing v1.3.1 h1:ubne5J3y/pp9c/ojwPhTbBy5PJB7Gs1WM6JooUQJzCg= +github.com/aws/aws-sdk-go-v2/service/billing v1.3.1/go.mod h1:YeisxBuT89KEnsEw/BXZy+En8LjBzP4wfVqHf9Lkqzw= github.com/aws/aws-sdk-go-v2/service/budgets v1.33.0 h1:cemoi5rYYoxOCzM6ZusNIOGGz5pO24fD86K/0DM3N8w= github.com/aws/aws-sdk-go-v2/service/budgets v1.33.0/go.mod h1:kGnmJ5Kwa3swYIxAm8rPVTHeiS39Ju3x8Skrw0g3twI= github.com/aws/aws-sdk-go-v2/service/chatbot v1.11.0 h1:olhzCKv3O0HhyBR9EunuIzJWpdaU5obsBSqke0em5XQ= From f52d7d8931808d1e0cef2fc32782b5c8ab92526a Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 09:11:35 -0400 Subject: [PATCH 114/365] go get github.com/aws/aws-sdk-go-v2/service/budgets. --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 83e798898492..8bf210b8dbaa 100644 --- a/go.mod +++ b/go.mod @@ -45,7 +45,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/bedrock v1.40.1 github.com/aws/aws-sdk-go-v2/service/bedrockagent v1.46.1 github.com/aws/aws-sdk-go-v2/service/billing v1.3.1 - github.com/aws/aws-sdk-go-v2/service/budgets v1.33.0 + github.com/aws/aws-sdk-go-v2/service/budgets v1.33.1 github.com/aws/aws-sdk-go-v2/service/chatbot v1.11.0 github.com/aws/aws-sdk-go-v2/service/chime v1.37.0 github.com/aws/aws-sdk-go-v2/service/chimesdkmediapipelines v1.23.0 diff --git a/go.sum b/go.sum index 2e97bc0500d8..e860b001584f 100644 --- a/go.sum +++ b/go.sum @@ -101,8 +101,8 @@ github.com/aws/aws-sdk-go-v2/service/bedrockagent v1.46.1 h1:+964aZWEhatObFc4aSh github.com/aws/aws-sdk-go-v2/service/bedrockagent v1.46.1/go.mod h1:PYXdjAxfDP6jvOtgZIlXn+7DS2rYfMONfDiYxx1I3T0= github.com/aws/aws-sdk-go-v2/service/billing v1.3.1 h1:ubne5J3y/pp9c/ojwPhTbBy5PJB7Gs1WM6JooUQJzCg= github.com/aws/aws-sdk-go-v2/service/billing v1.3.1/go.mod h1:YeisxBuT89KEnsEw/BXZy+En8LjBzP4wfVqHf9Lkqzw= -github.com/aws/aws-sdk-go-v2/service/budgets v1.33.0 h1:cemoi5rYYoxOCzM6ZusNIOGGz5pO24fD86K/0DM3N8w= -github.com/aws/aws-sdk-go-v2/service/budgets v1.33.0/go.mod h1:kGnmJ5Kwa3swYIxAm8rPVTHeiS39Ju3x8Skrw0g3twI= +github.com/aws/aws-sdk-go-v2/service/budgets v1.33.1 h1:Iai284Y0UvwLD8Bz/qDXbmdMGzrYOHCnvAKStFIn78A= +github.com/aws/aws-sdk-go-v2/service/budgets v1.33.1/go.mod h1:KkS6P8P77BprIvQyfB8cX0qkYftuwBSpug2AYjGQRow= github.com/aws/aws-sdk-go-v2/service/chatbot v1.11.0 h1:olhzCKv3O0HhyBR9EunuIzJWpdaU5obsBSqke0em5XQ= github.com/aws/aws-sdk-go-v2/service/chatbot v1.11.0/go.mod h1:ybR4yic7ozuvDzh4WemkL8eqaZQ97EFJytGQ2UPsh5U= github.com/aws/aws-sdk-go-v2/service/chime v1.37.0 h1:GXMcFW1Tb8nDFMo+hvYtag022mSX7Zrr3Wf2RB4p1oY= From 14ad79b26e8df7c703d4f963a1eb10924200b0ee Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 09:11:36 -0400 Subject: [PATCH 115/365] go get github.com/aws/aws-sdk-go-v2/service/chatbot. --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 8bf210b8dbaa..d3b83f649f22 100644 --- a/go.mod +++ b/go.mod @@ -46,7 +46,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/bedrockagent v1.46.1 github.com/aws/aws-sdk-go-v2/service/billing v1.3.1 github.com/aws/aws-sdk-go-v2/service/budgets v1.33.1 - github.com/aws/aws-sdk-go-v2/service/chatbot v1.11.0 + github.com/aws/aws-sdk-go-v2/service/chatbot v1.11.1 github.com/aws/aws-sdk-go-v2/service/chime v1.37.0 github.com/aws/aws-sdk-go-v2/service/chimesdkmediapipelines v1.23.0 github.com/aws/aws-sdk-go-v2/service/chimesdkvoice v1.23.0 diff --git a/go.sum b/go.sum index e860b001584f..7964eed89a38 100644 --- a/go.sum +++ b/go.sum @@ -103,8 +103,8 @@ github.com/aws/aws-sdk-go-v2/service/billing v1.3.1 h1:ubne5J3y/pp9c/ojwPhTbBy5P github.com/aws/aws-sdk-go-v2/service/billing v1.3.1/go.mod h1:YeisxBuT89KEnsEw/BXZy+En8LjBzP4wfVqHf9Lkqzw= github.com/aws/aws-sdk-go-v2/service/budgets v1.33.1 h1:Iai284Y0UvwLD8Bz/qDXbmdMGzrYOHCnvAKStFIn78A= github.com/aws/aws-sdk-go-v2/service/budgets v1.33.1/go.mod h1:KkS6P8P77BprIvQyfB8cX0qkYftuwBSpug2AYjGQRow= -github.com/aws/aws-sdk-go-v2/service/chatbot v1.11.0 h1:olhzCKv3O0HhyBR9EunuIzJWpdaU5obsBSqke0em5XQ= -github.com/aws/aws-sdk-go-v2/service/chatbot v1.11.0/go.mod h1:ybR4yic7ozuvDzh4WemkL8eqaZQ97EFJytGQ2UPsh5U= +github.com/aws/aws-sdk-go-v2/service/chatbot v1.11.1 h1:MQ4cl83vzh3+xNt6p9wpd9Eu4UffTZDwPq3Ow6fr/4E= +github.com/aws/aws-sdk-go-v2/service/chatbot v1.11.1/go.mod h1:6WF++CTyTdZuyhTl1hXbgCe1GUvBop62/HpVvlX7uHY= github.com/aws/aws-sdk-go-v2/service/chime v1.37.0 h1:GXMcFW1Tb8nDFMo+hvYtag022mSX7Zrr3Wf2RB4p1oY= github.com/aws/aws-sdk-go-v2/service/chime v1.37.0/go.mod h1:1eyK5PPnwaamvBUfGJRBISYRM2L/btipnxCdgefFKG4= github.com/aws/aws-sdk-go-v2/service/chimesdkmediapipelines v1.23.0 h1:aV6AaIsh/aERc3DO1DUCf6KDjHdGG4MbIyTTiI7+fIA= From 7eacbd3455f1397664ccd6a133ba0eb9ef4d2e12 Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 09:11:38 -0400 Subject: [PATCH 116/365] go get github.com/aws/aws-sdk-go-v2/service/chime. --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index d3b83f649f22..665d042bcc1c 100644 --- a/go.mod +++ b/go.mod @@ -47,7 +47,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/billing v1.3.1 github.com/aws/aws-sdk-go-v2/service/budgets v1.33.1 github.com/aws/aws-sdk-go-v2/service/chatbot v1.11.1 - github.com/aws/aws-sdk-go-v2/service/chime v1.37.0 + github.com/aws/aws-sdk-go-v2/service/chime v1.37.1 github.com/aws/aws-sdk-go-v2/service/chimesdkmediapipelines v1.23.0 github.com/aws/aws-sdk-go-v2/service/chimesdkvoice v1.23.0 github.com/aws/aws-sdk-go-v2/service/cleanrooms v1.27.0 diff --git a/go.sum b/go.sum index 7964eed89a38..01947f493ede 100644 --- a/go.sum +++ b/go.sum @@ -105,8 +105,8 @@ github.com/aws/aws-sdk-go-v2/service/budgets v1.33.1 h1:Iai284Y0UvwLD8Bz/qDXbmdM github.com/aws/aws-sdk-go-v2/service/budgets v1.33.1/go.mod h1:KkS6P8P77BprIvQyfB8cX0qkYftuwBSpug2AYjGQRow= github.com/aws/aws-sdk-go-v2/service/chatbot v1.11.1 h1:MQ4cl83vzh3+xNt6p9wpd9Eu4UffTZDwPq3Ow6fr/4E= github.com/aws/aws-sdk-go-v2/service/chatbot v1.11.1/go.mod h1:6WF++CTyTdZuyhTl1hXbgCe1GUvBop62/HpVvlX7uHY= -github.com/aws/aws-sdk-go-v2/service/chime v1.37.0 h1:GXMcFW1Tb8nDFMo+hvYtag022mSX7Zrr3Wf2RB4p1oY= -github.com/aws/aws-sdk-go-v2/service/chime v1.37.0/go.mod h1:1eyK5PPnwaamvBUfGJRBISYRM2L/btipnxCdgefFKG4= +github.com/aws/aws-sdk-go-v2/service/chime v1.37.1 h1:uZotozsudJwrN4dmmRz35pXBCsDUyRNREHS6K54UNic= +github.com/aws/aws-sdk-go-v2/service/chime v1.37.1/go.mod h1:RtRWdRgq659iw+IX8GkicgBeUrAi/uM/F6UB2kRXLEw= github.com/aws/aws-sdk-go-v2/service/chimesdkmediapipelines v1.23.0 h1:aV6AaIsh/aERc3DO1DUCf6KDjHdGG4MbIyTTiI7+fIA= github.com/aws/aws-sdk-go-v2/service/chimesdkmediapipelines v1.23.0/go.mod h1:MUB0qeP6ME79LFT+KPiXcE0o+LqWYqZHpJ74bG4ygKY= github.com/aws/aws-sdk-go-v2/service/chimesdkvoice v1.23.0 h1:sk2DOvXZaWw3iEie/25IFSBfuc+F6n3CCpCaDflF9as= From 15fc984c7f85d3b1a847937897a1b28d21b9da58 Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 09:11:39 -0400 Subject: [PATCH 117/365] go get github.com/aws/aws-sdk-go-v2/service/chimesdkmediapipelines. --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 665d042bcc1c..132b427718f6 100644 --- a/go.mod +++ b/go.mod @@ -48,7 +48,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/budgets v1.33.1 github.com/aws/aws-sdk-go-v2/service/chatbot v1.11.1 github.com/aws/aws-sdk-go-v2/service/chime v1.37.1 - github.com/aws/aws-sdk-go-v2/service/chimesdkmediapipelines v1.23.0 + github.com/aws/aws-sdk-go-v2/service/chimesdkmediapipelines v1.23.1 github.com/aws/aws-sdk-go-v2/service/chimesdkvoice v1.23.0 github.com/aws/aws-sdk-go-v2/service/cleanrooms v1.27.0 github.com/aws/aws-sdk-go-v2/service/cloud9 v1.30.0 diff --git a/go.sum b/go.sum index 01947f493ede..e9f4bfac2272 100644 --- a/go.sum +++ b/go.sum @@ -107,8 +107,8 @@ github.com/aws/aws-sdk-go-v2/service/chatbot v1.11.1 h1:MQ4cl83vzh3+xNt6p9wpd9Eu github.com/aws/aws-sdk-go-v2/service/chatbot v1.11.1/go.mod h1:6WF++CTyTdZuyhTl1hXbgCe1GUvBop62/HpVvlX7uHY= github.com/aws/aws-sdk-go-v2/service/chime v1.37.1 h1:uZotozsudJwrN4dmmRz35pXBCsDUyRNREHS6K54UNic= github.com/aws/aws-sdk-go-v2/service/chime v1.37.1/go.mod h1:RtRWdRgq659iw+IX8GkicgBeUrAi/uM/F6UB2kRXLEw= -github.com/aws/aws-sdk-go-v2/service/chimesdkmediapipelines v1.23.0 h1:aV6AaIsh/aERc3DO1DUCf6KDjHdGG4MbIyTTiI7+fIA= -github.com/aws/aws-sdk-go-v2/service/chimesdkmediapipelines v1.23.0/go.mod h1:MUB0qeP6ME79LFT+KPiXcE0o+LqWYqZHpJ74bG4ygKY= +github.com/aws/aws-sdk-go-v2/service/chimesdkmediapipelines v1.23.1 h1:snEGKLwYw3hQWjnFWP4tJgeGB58EJ5pKVRXOQr8mgiM= +github.com/aws/aws-sdk-go-v2/service/chimesdkmediapipelines v1.23.1/go.mod h1:Jw4s1iOrBDZFuypWDpOLuZYnAWT1E7n7NI+F/oPTyR0= github.com/aws/aws-sdk-go-v2/service/chimesdkvoice v1.23.0 h1:sk2DOvXZaWw3iEie/25IFSBfuc+F6n3CCpCaDflF9as= github.com/aws/aws-sdk-go-v2/service/chimesdkvoice v1.23.0/go.mod h1:yoYLnDYicrfC0SVr5RvH7GqrW9nyugiE7nM+H4jFZjI= github.com/aws/aws-sdk-go-v2/service/cleanrooms v1.27.0 h1:/Ol+xQqxsa04P/UndSDV+9mok8hCFS/TwCA8mJ5RXlg= From 3f3bd3a343a1054d3c4efbd9004af8092d49548a Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 09:11:40 -0400 Subject: [PATCH 118/365] go get github.com/aws/aws-sdk-go-v2/service/chimesdkvoice. --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 132b427718f6..7f77135d8b05 100644 --- a/go.mod +++ b/go.mod @@ -49,7 +49,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/chatbot v1.11.1 github.com/aws/aws-sdk-go-v2/service/chime v1.37.1 github.com/aws/aws-sdk-go-v2/service/chimesdkmediapipelines v1.23.1 - github.com/aws/aws-sdk-go-v2/service/chimesdkvoice v1.23.0 + github.com/aws/aws-sdk-go-v2/service/chimesdkvoice v1.23.1 github.com/aws/aws-sdk-go-v2/service/cleanrooms v1.27.0 github.com/aws/aws-sdk-go-v2/service/cloud9 v1.30.0 github.com/aws/aws-sdk-go-v2/service/cloudcontrol v1.25.0 diff --git a/go.sum b/go.sum index e9f4bfac2272..915274c91935 100644 --- a/go.sum +++ b/go.sum @@ -109,8 +109,8 @@ github.com/aws/aws-sdk-go-v2/service/chime v1.37.1 h1:uZotozsudJwrN4dmmRz35pXBCs github.com/aws/aws-sdk-go-v2/service/chime v1.37.1/go.mod h1:RtRWdRgq659iw+IX8GkicgBeUrAi/uM/F6UB2kRXLEw= github.com/aws/aws-sdk-go-v2/service/chimesdkmediapipelines v1.23.1 h1:snEGKLwYw3hQWjnFWP4tJgeGB58EJ5pKVRXOQr8mgiM= github.com/aws/aws-sdk-go-v2/service/chimesdkmediapipelines v1.23.1/go.mod h1:Jw4s1iOrBDZFuypWDpOLuZYnAWT1E7n7NI+F/oPTyR0= -github.com/aws/aws-sdk-go-v2/service/chimesdkvoice v1.23.0 h1:sk2DOvXZaWw3iEie/25IFSBfuc+F6n3CCpCaDflF9as= -github.com/aws/aws-sdk-go-v2/service/chimesdkvoice v1.23.0/go.mod h1:yoYLnDYicrfC0SVr5RvH7GqrW9nyugiE7nM+H4jFZjI= +github.com/aws/aws-sdk-go-v2/service/chimesdkvoice v1.23.1 h1:37kUAkGtiiFvuwB8Q+fx9WwYuCN6UsCAj17hi30mVLs= +github.com/aws/aws-sdk-go-v2/service/chimesdkvoice v1.23.1/go.mod h1:zbl4bbWYNgSrLi2KshZcnXhgUogEMwI7mTu0BL1z3m0= github.com/aws/aws-sdk-go-v2/service/cleanrooms v1.27.0 h1:/Ol+xQqxsa04P/UndSDV+9mok8hCFS/TwCA8mJ5RXlg= github.com/aws/aws-sdk-go-v2/service/cleanrooms v1.27.0/go.mod h1:s82icmZVWAQFn9O1BntEk0RPrRpNG5vOgnINmhln75U= github.com/aws/aws-sdk-go-v2/service/cloud9 v1.30.0 h1:xpm/LVtcoKf6C4WsoUSAL/3ZP2yoNuX7OxsYH9Rzf7I= From 53666151958600c695c58a50d8a47db0db8b5f13 Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 09:11:41 -0400 Subject: [PATCH 119/365] go get github.com/aws/aws-sdk-go-v2/service/cleanrooms. --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 7f77135d8b05..4d868b806202 100644 --- a/go.mod +++ b/go.mod @@ -50,7 +50,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/chime v1.37.1 github.com/aws/aws-sdk-go-v2/service/chimesdkmediapipelines v1.23.1 github.com/aws/aws-sdk-go-v2/service/chimesdkvoice v1.23.1 - github.com/aws/aws-sdk-go-v2/service/cleanrooms v1.27.0 + github.com/aws/aws-sdk-go-v2/service/cleanrooms v1.27.1 github.com/aws/aws-sdk-go-v2/service/cloud9 v1.30.0 github.com/aws/aws-sdk-go-v2/service/cloudcontrol v1.25.0 github.com/aws/aws-sdk-go-v2/service/cloudformation v1.62.0 diff --git a/go.sum b/go.sum index 915274c91935..9c8cef7a22db 100644 --- a/go.sum +++ b/go.sum @@ -111,8 +111,8 @@ github.com/aws/aws-sdk-go-v2/service/chimesdkmediapipelines v1.23.1 h1:snEGKLwYw github.com/aws/aws-sdk-go-v2/service/chimesdkmediapipelines v1.23.1/go.mod h1:Jw4s1iOrBDZFuypWDpOLuZYnAWT1E7n7NI+F/oPTyR0= github.com/aws/aws-sdk-go-v2/service/chimesdkvoice v1.23.1 h1:37kUAkGtiiFvuwB8Q+fx9WwYuCN6UsCAj17hi30mVLs= github.com/aws/aws-sdk-go-v2/service/chimesdkvoice v1.23.1/go.mod h1:zbl4bbWYNgSrLi2KshZcnXhgUogEMwI7mTu0BL1z3m0= -github.com/aws/aws-sdk-go-v2/service/cleanrooms v1.27.0 h1:/Ol+xQqxsa04P/UndSDV+9mok8hCFS/TwCA8mJ5RXlg= -github.com/aws/aws-sdk-go-v2/service/cleanrooms v1.27.0/go.mod h1:s82icmZVWAQFn9O1BntEk0RPrRpNG5vOgnINmhln75U= +github.com/aws/aws-sdk-go-v2/service/cleanrooms v1.27.1 h1:BCWj3VrS1wrgaixwbrJ9VJG9JtdSdA5u5S5RHbv036E= +github.com/aws/aws-sdk-go-v2/service/cleanrooms v1.27.1/go.mod h1:VNBjeDkZNToj7jboiPq4KlPI7Y7OP5m1tN5Y652vNgQ= github.com/aws/aws-sdk-go-v2/service/cloud9 v1.30.0 h1:xpm/LVtcoKf6C4WsoUSAL/3ZP2yoNuX7OxsYH9Rzf7I= github.com/aws/aws-sdk-go-v2/service/cloud9 v1.30.0/go.mod h1:piezSyRAA+8oR+aWY0gLEpGnC5nK9nzbab3oRNNaiMo= github.com/aws/aws-sdk-go-v2/service/cloudcontrol v1.25.0 h1:SfG2oQvAdhkOY+p71HaiITdhyblG4/iIHt5rACaPe4Q= From 0cd68440c1940ae03fce0ad41c316ded6e189574 Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 09:11:42 -0400 Subject: [PATCH 120/365] go get github.com/aws/aws-sdk-go-v2/service/cloud9. --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 4d868b806202..342914273e14 100644 --- a/go.mod +++ b/go.mod @@ -51,7 +51,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/chimesdkmediapipelines v1.23.1 github.com/aws/aws-sdk-go-v2/service/chimesdkvoice v1.23.1 github.com/aws/aws-sdk-go-v2/service/cleanrooms v1.27.1 - github.com/aws/aws-sdk-go-v2/service/cloud9 v1.30.0 + github.com/aws/aws-sdk-go-v2/service/cloud9 v1.30.1 github.com/aws/aws-sdk-go-v2/service/cloudcontrol v1.25.0 github.com/aws/aws-sdk-go-v2/service/cloudformation v1.62.0 github.com/aws/aws-sdk-go-v2/service/cloudfront v1.48.0 diff --git a/go.sum b/go.sum index 9c8cef7a22db..a6d3203725e0 100644 --- a/go.sum +++ b/go.sum @@ -113,8 +113,8 @@ github.com/aws/aws-sdk-go-v2/service/chimesdkvoice v1.23.1 h1:37kUAkGtiiFvuwB8Q+ github.com/aws/aws-sdk-go-v2/service/chimesdkvoice v1.23.1/go.mod h1:zbl4bbWYNgSrLi2KshZcnXhgUogEMwI7mTu0BL1z3m0= github.com/aws/aws-sdk-go-v2/service/cleanrooms v1.27.1 h1:BCWj3VrS1wrgaixwbrJ9VJG9JtdSdA5u5S5RHbv036E= github.com/aws/aws-sdk-go-v2/service/cleanrooms v1.27.1/go.mod h1:VNBjeDkZNToj7jboiPq4KlPI7Y7OP5m1tN5Y652vNgQ= -github.com/aws/aws-sdk-go-v2/service/cloud9 v1.30.0 h1:xpm/LVtcoKf6C4WsoUSAL/3ZP2yoNuX7OxsYH9Rzf7I= -github.com/aws/aws-sdk-go-v2/service/cloud9 v1.30.0/go.mod h1:piezSyRAA+8oR+aWY0gLEpGnC5nK9nzbab3oRNNaiMo= +github.com/aws/aws-sdk-go-v2/service/cloud9 v1.30.1 h1:04cu8ernMSugkM31n9yPzvweuze8bTlifLe1Ky1J+3w= +github.com/aws/aws-sdk-go-v2/service/cloud9 v1.30.1/go.mod h1:vJ5ns5qOlLbAA3A4IhAXNYJ2ao+3ckUkeshi6IuBZxg= github.com/aws/aws-sdk-go-v2/service/cloudcontrol v1.25.0 h1:SfG2oQvAdhkOY+p71HaiITdhyblG4/iIHt5rACaPe4Q= github.com/aws/aws-sdk-go-v2/service/cloudcontrol v1.25.0/go.mod h1:1ht026G9ofTny2K3hqjYACqEUdkk0bnrOkC+z3olb1Q= github.com/aws/aws-sdk-go-v2/service/cloudformation v1.62.0 h1:YzUPWcfGq9yB4AZKOc5OWyM7SL7ypRzu+rVOoUMXaPs= From f97ebbf4268150599c53959eac0ed9b981df7459 Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 09:11:43 -0400 Subject: [PATCH 121/365] go get github.com/aws/aws-sdk-go-v2/service/cloudcontrol. --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 342914273e14..27287e8642bb 100644 --- a/go.mod +++ b/go.mod @@ -52,7 +52,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/chimesdkvoice v1.23.1 github.com/aws/aws-sdk-go-v2/service/cleanrooms v1.27.1 github.com/aws/aws-sdk-go-v2/service/cloud9 v1.30.1 - github.com/aws/aws-sdk-go-v2/service/cloudcontrol v1.25.0 + github.com/aws/aws-sdk-go-v2/service/cloudcontrol v1.25.1 github.com/aws/aws-sdk-go-v2/service/cloudformation v1.62.0 github.com/aws/aws-sdk-go-v2/service/cloudfront v1.48.0 github.com/aws/aws-sdk-go-v2/service/cloudfrontkeyvaluestore v1.10.0 diff --git a/go.sum b/go.sum index a6d3203725e0..88d76001631a 100644 --- a/go.sum +++ b/go.sum @@ -115,8 +115,8 @@ github.com/aws/aws-sdk-go-v2/service/cleanrooms v1.27.1 h1:BCWj3VrS1wrgaixwbrJ9V github.com/aws/aws-sdk-go-v2/service/cleanrooms v1.27.1/go.mod h1:VNBjeDkZNToj7jboiPq4KlPI7Y7OP5m1tN5Y652vNgQ= github.com/aws/aws-sdk-go-v2/service/cloud9 v1.30.1 h1:04cu8ernMSugkM31n9yPzvweuze8bTlifLe1Ky1J+3w= github.com/aws/aws-sdk-go-v2/service/cloud9 v1.30.1/go.mod h1:vJ5ns5qOlLbAA3A4IhAXNYJ2ao+3ckUkeshi6IuBZxg= -github.com/aws/aws-sdk-go-v2/service/cloudcontrol v1.25.0 h1:SfG2oQvAdhkOY+p71HaiITdhyblG4/iIHt5rACaPe4Q= -github.com/aws/aws-sdk-go-v2/service/cloudcontrol v1.25.0/go.mod h1:1ht026G9ofTny2K3hqjYACqEUdkk0bnrOkC+z3olb1Q= +github.com/aws/aws-sdk-go-v2/service/cloudcontrol v1.25.1 h1:7S5JbWI2b7lSCWcWcrgaE0XSYS3muGnt+rrxEWH7c5Y= +github.com/aws/aws-sdk-go-v2/service/cloudcontrol v1.25.1/go.mod h1:bvxQ0XpcdTa32bVV9ORpSQA3dLKBGZbbH+1HFQgx4ng= github.com/aws/aws-sdk-go-v2/service/cloudformation v1.62.0 h1:YzUPWcfGq9yB4AZKOc5OWyM7SL7ypRzu+rVOoUMXaPs= github.com/aws/aws-sdk-go-v2/service/cloudformation v1.62.0/go.mod h1:dREYEG1QUJkefpMU0ldT5pJ3LH2G51Jf8nfXDrK66J8= github.com/aws/aws-sdk-go-v2/service/cloudfront v1.48.0 h1:nosx9hDdZdtSRhNOcR1OhKneUQNgP1U38twtvJyAlkE= From f189694d4ac5dea37490ca81c1297678300b44c1 Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 09:11:44 -0400 Subject: [PATCH 122/365] go get github.com/aws/aws-sdk-go-v2/service/cloudformation. --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 27287e8642bb..f1ce4c30a9ea 100644 --- a/go.mod +++ b/go.mod @@ -53,7 +53,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/cleanrooms v1.27.1 github.com/aws/aws-sdk-go-v2/service/cloud9 v1.30.1 github.com/aws/aws-sdk-go-v2/service/cloudcontrol v1.25.1 - github.com/aws/aws-sdk-go-v2/service/cloudformation v1.62.0 + github.com/aws/aws-sdk-go-v2/service/cloudformation v1.62.1 github.com/aws/aws-sdk-go-v2/service/cloudfront v1.48.0 github.com/aws/aws-sdk-go-v2/service/cloudfrontkeyvaluestore v1.10.0 github.com/aws/aws-sdk-go-v2/service/cloudhsmv2 v1.31.0 diff --git a/go.sum b/go.sum index 88d76001631a..87d43adb07d8 100644 --- a/go.sum +++ b/go.sum @@ -117,8 +117,8 @@ github.com/aws/aws-sdk-go-v2/service/cloud9 v1.30.1 h1:04cu8ernMSugkM31n9yPzvweu github.com/aws/aws-sdk-go-v2/service/cloud9 v1.30.1/go.mod h1:vJ5ns5qOlLbAA3A4IhAXNYJ2ao+3ckUkeshi6IuBZxg= github.com/aws/aws-sdk-go-v2/service/cloudcontrol v1.25.1 h1:7S5JbWI2b7lSCWcWcrgaE0XSYS3muGnt+rrxEWH7c5Y= github.com/aws/aws-sdk-go-v2/service/cloudcontrol v1.25.1/go.mod h1:bvxQ0XpcdTa32bVV9ORpSQA3dLKBGZbbH+1HFQgx4ng= -github.com/aws/aws-sdk-go-v2/service/cloudformation v1.62.0 h1:YzUPWcfGq9yB4AZKOc5OWyM7SL7ypRzu+rVOoUMXaPs= -github.com/aws/aws-sdk-go-v2/service/cloudformation v1.62.0/go.mod h1:dREYEG1QUJkefpMU0ldT5pJ3LH2G51Jf8nfXDrK66J8= +github.com/aws/aws-sdk-go-v2/service/cloudformation v1.62.1 h1:gqN14m9ds7GOyB9B3es0Gv0xf1OaPpqmU1qUGXh8sR0= +github.com/aws/aws-sdk-go-v2/service/cloudformation v1.62.1/go.mod h1:bfVI9myeahAr36mMKS/dtXsU4inMeZd9CCYe1kcHmHA= github.com/aws/aws-sdk-go-v2/service/cloudfront v1.48.0 h1:nosx9hDdZdtSRhNOcR1OhKneUQNgP1U38twtvJyAlkE= github.com/aws/aws-sdk-go-v2/service/cloudfront v1.48.0/go.mod h1:VpWKKLDcnuyyV9S1BNzD7R3o3uKUHdlRcerlXr5oHNU= github.com/aws/aws-sdk-go-v2/service/cloudfrontkeyvaluestore v1.10.0 h1:3KlS3BXo3dV5BMo6hYJh25gtjVrSb7uD0XPJSJeVk8U= From 546382e6bf23c8c831afea86a8034ec2da86255e Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 09:11:45 -0400 Subject: [PATCH 123/365] go get github.com/aws/aws-sdk-go-v2/service/cloudfront. --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index f1ce4c30a9ea..573f4266ba54 100644 --- a/go.mod +++ b/go.mod @@ -54,7 +54,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/cloud9 v1.30.1 github.com/aws/aws-sdk-go-v2/service/cloudcontrol v1.25.1 github.com/aws/aws-sdk-go-v2/service/cloudformation v1.62.1 - github.com/aws/aws-sdk-go-v2/service/cloudfront v1.48.0 + github.com/aws/aws-sdk-go-v2/service/cloudfront v1.49.0 github.com/aws/aws-sdk-go-v2/service/cloudfrontkeyvaluestore v1.10.0 github.com/aws/aws-sdk-go-v2/service/cloudhsmv2 v1.31.0 github.com/aws/aws-sdk-go-v2/service/cloudsearch v1.28.0 diff --git a/go.sum b/go.sum index 87d43adb07d8..cc209ed3a30d 100644 --- a/go.sum +++ b/go.sum @@ -119,8 +119,8 @@ github.com/aws/aws-sdk-go-v2/service/cloudcontrol v1.25.1 h1:7S5JbWI2b7lSCWcWcrg github.com/aws/aws-sdk-go-v2/service/cloudcontrol v1.25.1/go.mod h1:bvxQ0XpcdTa32bVV9ORpSQA3dLKBGZbbH+1HFQgx4ng= github.com/aws/aws-sdk-go-v2/service/cloudformation v1.62.1 h1:gqN14m9ds7GOyB9B3es0Gv0xf1OaPpqmU1qUGXh8sR0= github.com/aws/aws-sdk-go-v2/service/cloudformation v1.62.1/go.mod h1:bfVI9myeahAr36mMKS/dtXsU4inMeZd9CCYe1kcHmHA= -github.com/aws/aws-sdk-go-v2/service/cloudfront v1.48.0 h1:nosx9hDdZdtSRhNOcR1OhKneUQNgP1U38twtvJyAlkE= -github.com/aws/aws-sdk-go-v2/service/cloudfront v1.48.0/go.mod h1:VpWKKLDcnuyyV9S1BNzD7R3o3uKUHdlRcerlXr5oHNU= +github.com/aws/aws-sdk-go-v2/service/cloudfront v1.49.0 h1:ZABkPLtfK+q2GkW1pA+NukaGM/EAKamEUR347B1md2U= +github.com/aws/aws-sdk-go-v2/service/cloudfront v1.49.0/go.mod h1:PHC5ybfgglvCqD7fLaqR5A7LIuJqIoUxhlwF/8faMt0= github.com/aws/aws-sdk-go-v2/service/cloudfrontkeyvaluestore v1.10.0 h1:3KlS3BXo3dV5BMo6hYJh25gtjVrSb7uD0XPJSJeVk8U= github.com/aws/aws-sdk-go-v2/service/cloudfrontkeyvaluestore v1.10.0/go.mod h1:umnKCdKXVDeQR0VO/uTOSftJVHWpqedjPr0Ly+sjTkc= github.com/aws/aws-sdk-go-v2/service/cloudhsmv2 v1.31.0 h1:QGG/oT35qdW9T6neOEn8zrj23JJiLRp3edBcbA5gfro= From 5ddb0e12f4f4d1db691de8350e80f1fafb366035 Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 09:11:47 -0400 Subject: [PATCH 124/365] go get github.com/aws/aws-sdk-go-v2/service/cloudfrontkeyvaluestore. --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 573f4266ba54..6e5947aa3a21 100644 --- a/go.mod +++ b/go.mod @@ -55,7 +55,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/cloudcontrol v1.25.1 github.com/aws/aws-sdk-go-v2/service/cloudformation v1.62.1 github.com/aws/aws-sdk-go-v2/service/cloudfront v1.49.0 - github.com/aws/aws-sdk-go-v2/service/cloudfrontkeyvaluestore v1.10.0 + github.com/aws/aws-sdk-go-v2/service/cloudfrontkeyvaluestore v1.10.1 github.com/aws/aws-sdk-go-v2/service/cloudhsmv2 v1.31.0 github.com/aws/aws-sdk-go-v2/service/cloudsearch v1.28.0 github.com/aws/aws-sdk-go-v2/service/cloudtrail v1.50.0 diff --git a/go.sum b/go.sum index cc209ed3a30d..cb4801fc00d3 100644 --- a/go.sum +++ b/go.sum @@ -121,8 +121,8 @@ github.com/aws/aws-sdk-go-v2/service/cloudformation v1.62.1 h1:gqN14m9ds7GOyB9B3 github.com/aws/aws-sdk-go-v2/service/cloudformation v1.62.1/go.mod h1:bfVI9myeahAr36mMKS/dtXsU4inMeZd9CCYe1kcHmHA= github.com/aws/aws-sdk-go-v2/service/cloudfront v1.49.0 h1:ZABkPLtfK+q2GkW1pA+NukaGM/EAKamEUR347B1md2U= github.com/aws/aws-sdk-go-v2/service/cloudfront v1.49.0/go.mod h1:PHC5ybfgglvCqD7fLaqR5A7LIuJqIoUxhlwF/8faMt0= -github.com/aws/aws-sdk-go-v2/service/cloudfrontkeyvaluestore v1.10.0 h1:3KlS3BXo3dV5BMo6hYJh25gtjVrSb7uD0XPJSJeVk8U= -github.com/aws/aws-sdk-go-v2/service/cloudfrontkeyvaluestore v1.10.0/go.mod h1:umnKCdKXVDeQR0VO/uTOSftJVHWpqedjPr0Ly+sjTkc= +github.com/aws/aws-sdk-go-v2/service/cloudfrontkeyvaluestore v1.10.1 h1:c0BRZh3XLzqzx0UuJ13HsnFQEpPWwpGKDoiONRZmdPg= +github.com/aws/aws-sdk-go-v2/service/cloudfrontkeyvaluestore v1.10.1/go.mod h1:Vyk18vQt9kEsM/YyRmnLKUmLd6DI/JhcL7MeRD60WpQ= github.com/aws/aws-sdk-go-v2/service/cloudhsmv2 v1.31.0 h1:QGG/oT35qdW9T6neOEn8zrj23JJiLRp3edBcbA5gfro= github.com/aws/aws-sdk-go-v2/service/cloudhsmv2 v1.31.0/go.mod h1:nAmM4gdDHejpxTWE7GRDhHQgEUzDSFx2C1AUqZcEFcY= github.com/aws/aws-sdk-go-v2/service/cloudsearch v1.28.0 h1:sduSToDy4gSJzV80ZyGxUDARXrLyPRu/lcU9UbqWb5M= From f3ce29140ebde09a64d50c70a4c7b8a5709af167 Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 09:11:48 -0400 Subject: [PATCH 125/365] go get github.com/aws/aws-sdk-go-v2/service/cloudhsmv2. --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 6e5947aa3a21..f74e926285be 100644 --- a/go.mod +++ b/go.mod @@ -56,7 +56,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/cloudformation v1.62.1 github.com/aws/aws-sdk-go-v2/service/cloudfront v1.49.0 github.com/aws/aws-sdk-go-v2/service/cloudfrontkeyvaluestore v1.10.1 - github.com/aws/aws-sdk-go-v2/service/cloudhsmv2 v1.31.0 + github.com/aws/aws-sdk-go-v2/service/cloudhsmv2 v1.31.1 github.com/aws/aws-sdk-go-v2/service/cloudsearch v1.28.0 github.com/aws/aws-sdk-go-v2/service/cloudtrail v1.50.0 github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.46.0 diff --git a/go.sum b/go.sum index cb4801fc00d3..bbfa53ed6b02 100644 --- a/go.sum +++ b/go.sum @@ -123,8 +123,8 @@ github.com/aws/aws-sdk-go-v2/service/cloudfront v1.49.0 h1:ZABkPLtfK+q2GkW1pA+Nu github.com/aws/aws-sdk-go-v2/service/cloudfront v1.49.0/go.mod h1:PHC5ybfgglvCqD7fLaqR5A7LIuJqIoUxhlwF/8faMt0= github.com/aws/aws-sdk-go-v2/service/cloudfrontkeyvaluestore v1.10.1 h1:c0BRZh3XLzqzx0UuJ13HsnFQEpPWwpGKDoiONRZmdPg= github.com/aws/aws-sdk-go-v2/service/cloudfrontkeyvaluestore v1.10.1/go.mod h1:Vyk18vQt9kEsM/YyRmnLKUmLd6DI/JhcL7MeRD60WpQ= -github.com/aws/aws-sdk-go-v2/service/cloudhsmv2 v1.31.0 h1:QGG/oT35qdW9T6neOEn8zrj23JJiLRp3edBcbA5gfro= -github.com/aws/aws-sdk-go-v2/service/cloudhsmv2 v1.31.0/go.mod h1:nAmM4gdDHejpxTWE7GRDhHQgEUzDSFx2C1AUqZcEFcY= +github.com/aws/aws-sdk-go-v2/service/cloudhsmv2 v1.31.1 h1:beB+ptVgyQsnISH3XjxUmbhtn7oO6cuuB8kwSQp6LfE= +github.com/aws/aws-sdk-go-v2/service/cloudhsmv2 v1.31.1/go.mod h1:lKCraexL7AGqlyR6j4uBJWKDMvMyDydrjOLcSmgCAK8= github.com/aws/aws-sdk-go-v2/service/cloudsearch v1.28.0 h1:sduSToDy4gSJzV80ZyGxUDARXrLyPRu/lcU9UbqWb5M= github.com/aws/aws-sdk-go-v2/service/cloudsearch v1.28.0/go.mod h1:YHaKrV1cIM1ODw6HWja3zT4TvtSmTRIesFLStMOofnM= github.com/aws/aws-sdk-go-v2/service/cloudtrail v1.50.0 h1:7Ckr57IzL3Bf6poBs2+rZFf+1VOgvdkSvwYkEM9CjEQ= From 82f8c95d2cb72074e235b928a0e648f8dda35488 Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 09:11:49 -0400 Subject: [PATCH 126/365] go get github.com/aws/aws-sdk-go-v2/service/cloudsearch. --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index f74e926285be..1ee71586cc7e 100644 --- a/go.mod +++ b/go.mod @@ -57,7 +57,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/cloudfront v1.49.0 github.com/aws/aws-sdk-go-v2/service/cloudfrontkeyvaluestore v1.10.1 github.com/aws/aws-sdk-go-v2/service/cloudhsmv2 v1.31.1 - github.com/aws/aws-sdk-go-v2/service/cloudsearch v1.28.0 + github.com/aws/aws-sdk-go-v2/service/cloudsearch v1.28.1 github.com/aws/aws-sdk-go-v2/service/cloudtrail v1.50.0 github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.46.0 github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs v1.54.0 diff --git a/go.sum b/go.sum index bbfa53ed6b02..7862f97ccb65 100644 --- a/go.sum +++ b/go.sum @@ -125,8 +125,8 @@ github.com/aws/aws-sdk-go-v2/service/cloudfrontkeyvaluestore v1.10.1 h1:c0BRZh3X github.com/aws/aws-sdk-go-v2/service/cloudfrontkeyvaluestore v1.10.1/go.mod h1:Vyk18vQt9kEsM/YyRmnLKUmLd6DI/JhcL7MeRD60WpQ= github.com/aws/aws-sdk-go-v2/service/cloudhsmv2 v1.31.1 h1:beB+ptVgyQsnISH3XjxUmbhtn7oO6cuuB8kwSQp6LfE= github.com/aws/aws-sdk-go-v2/service/cloudhsmv2 v1.31.1/go.mod h1:lKCraexL7AGqlyR6j4uBJWKDMvMyDydrjOLcSmgCAK8= -github.com/aws/aws-sdk-go-v2/service/cloudsearch v1.28.0 h1:sduSToDy4gSJzV80ZyGxUDARXrLyPRu/lcU9UbqWb5M= -github.com/aws/aws-sdk-go-v2/service/cloudsearch v1.28.0/go.mod h1:YHaKrV1cIM1ODw6HWja3zT4TvtSmTRIesFLStMOofnM= +github.com/aws/aws-sdk-go-v2/service/cloudsearch v1.28.1 h1:ggLVSG9dPkP02VXhRAWLpq7FpNxM9S8F6M2UGqKsv98= +github.com/aws/aws-sdk-go-v2/service/cloudsearch v1.28.1/go.mod h1:2+h6rZKo2OMnxiE5gyqLwB50cfGm25PsDYSiamOQ9Dg= github.com/aws/aws-sdk-go-v2/service/cloudtrail v1.50.0 h1:7Ckr57IzL3Bf6poBs2+rZFf+1VOgvdkSvwYkEM9CjEQ= github.com/aws/aws-sdk-go-v2/service/cloudtrail v1.50.0/go.mod h1:ip+DmGef42BaCzyP10Qg2jG4FF8Q4WYqR9zRVIFRbBc= github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.46.0 h1:lP6kYuKewG8msH/O64ta8Kyw5i004cz1Z7j+NRHpZhI= From d5b73903096dc17d11f92c9d0a5dc867887cfb5d Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 09:11:50 -0400 Subject: [PATCH 127/365] go get github.com/aws/aws-sdk-go-v2/service/cloudtrail. --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 1ee71586cc7e..0fcfa2d7f89c 100644 --- a/go.mod +++ b/go.mod @@ -58,7 +58,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/cloudfrontkeyvaluestore v1.10.1 github.com/aws/aws-sdk-go-v2/service/cloudhsmv2 v1.31.1 github.com/aws/aws-sdk-go-v2/service/cloudsearch v1.28.1 - github.com/aws/aws-sdk-go-v2/service/cloudtrail v1.50.0 + github.com/aws/aws-sdk-go-v2/service/cloudtrail v1.50.1 github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.46.0 github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs v1.54.0 github.com/aws/aws-sdk-go-v2/service/codeartifact v1.35.0 diff --git a/go.sum b/go.sum index 7862f97ccb65..e9f04ec08c0c 100644 --- a/go.sum +++ b/go.sum @@ -127,8 +127,8 @@ github.com/aws/aws-sdk-go-v2/service/cloudhsmv2 v1.31.1 h1:beB+ptVgyQsnISH3XjxUm github.com/aws/aws-sdk-go-v2/service/cloudhsmv2 v1.31.1/go.mod h1:lKCraexL7AGqlyR6j4uBJWKDMvMyDydrjOLcSmgCAK8= github.com/aws/aws-sdk-go-v2/service/cloudsearch v1.28.1 h1:ggLVSG9dPkP02VXhRAWLpq7FpNxM9S8F6M2UGqKsv98= github.com/aws/aws-sdk-go-v2/service/cloudsearch v1.28.1/go.mod h1:2+h6rZKo2OMnxiE5gyqLwB50cfGm25PsDYSiamOQ9Dg= -github.com/aws/aws-sdk-go-v2/service/cloudtrail v1.50.0 h1:7Ckr57IzL3Bf6poBs2+rZFf+1VOgvdkSvwYkEM9CjEQ= -github.com/aws/aws-sdk-go-v2/service/cloudtrail v1.50.0/go.mod h1:ip+DmGef42BaCzyP10Qg2jG4FF8Q4WYqR9zRVIFRbBc= +github.com/aws/aws-sdk-go-v2/service/cloudtrail v1.50.1 h1:f+n0I/ayFBFUrq/x9Y7YwJlQr+SkoNjJpWy24scdtps= +github.com/aws/aws-sdk-go-v2/service/cloudtrail v1.50.1/go.mod h1:OE2RTaxbHdirCXEtYu4/2K2VNDT2fJdW2XsGngXLEKA= github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.46.0 h1:lP6kYuKewG8msH/O64ta8Kyw5i004cz1Z7j+NRHpZhI= github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.46.0/go.mod h1:x4mHyW2Hh1bVvuze3yUh6VI77x7sTvYUqGSz56MM2g4= github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs v1.54.0 h1:YBaZkj6OnJvSPKMPMOhhEk3mGq0UzYtvCnEEXk93jko= From d8b3dc35144b914fafd0223477461097040f9a73 Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 09:11:52 -0400 Subject: [PATCH 128/365] go get github.com/aws/aws-sdk-go-v2/service/cloudwatch. --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 0fcfa2d7f89c..768356d22abe 100644 --- a/go.mod +++ b/go.mod @@ -59,7 +59,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/cloudhsmv2 v1.31.1 github.com/aws/aws-sdk-go-v2/service/cloudsearch v1.28.1 github.com/aws/aws-sdk-go-v2/service/cloudtrail v1.50.1 - github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.46.0 + github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.46.1 github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs v1.54.0 github.com/aws/aws-sdk-go-v2/service/codeartifact v1.35.0 github.com/aws/aws-sdk-go-v2/service/codebuild v1.62.0 diff --git a/go.sum b/go.sum index e9f04ec08c0c..e564d7f7ab79 100644 --- a/go.sum +++ b/go.sum @@ -129,8 +129,8 @@ github.com/aws/aws-sdk-go-v2/service/cloudsearch v1.28.1 h1:ggLVSG9dPkP02VXhRAWL github.com/aws/aws-sdk-go-v2/service/cloudsearch v1.28.1/go.mod h1:2+h6rZKo2OMnxiE5gyqLwB50cfGm25PsDYSiamOQ9Dg= github.com/aws/aws-sdk-go-v2/service/cloudtrail v1.50.1 h1:f+n0I/ayFBFUrq/x9Y7YwJlQr+SkoNjJpWy24scdtps= github.com/aws/aws-sdk-go-v2/service/cloudtrail v1.50.1/go.mod h1:OE2RTaxbHdirCXEtYu4/2K2VNDT2fJdW2XsGngXLEKA= -github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.46.0 h1:lP6kYuKewG8msH/O64ta8Kyw5i004cz1Z7j+NRHpZhI= -github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.46.0/go.mod h1:x4mHyW2Hh1bVvuze3yUh6VI77x7sTvYUqGSz56MM2g4= +github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.46.1 h1:jdaLx0Fle7TsNNpd4fe1C5JOtIQCUtYveT5qOsmTHdg= +github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.46.1/go.mod h1:ZCCs9PKEJ2qp3sA1IH7VWYmEJnenvHoR1gEqDH6qNoI= github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs v1.54.0 h1:YBaZkj6OnJvSPKMPMOhhEk3mGq0UzYtvCnEEXk93jko= github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs v1.54.0/go.mod h1:JGvzarQ8vyLLmajh2eV3lfS/BrOE32ryCgEh6mwDGnc= github.com/aws/aws-sdk-go-v2/service/codeartifact v1.35.0 h1:9zqLfQka0S2AYwjlCYgefY5Efx7YqNknLQbSttU9AYc= From a9275b807f0b7cebb441a4e1801cbf580f5f53f9 Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 09:11:53 -0400 Subject: [PATCH 129/365] go get github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs. --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 768356d22abe..07d55663502d 100644 --- a/go.mod +++ b/go.mod @@ -60,7 +60,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/cloudsearch v1.28.1 github.com/aws/aws-sdk-go-v2/service/cloudtrail v1.50.1 github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.46.1 - github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs v1.54.0 + github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs v1.54.1 github.com/aws/aws-sdk-go-v2/service/codeartifact v1.35.0 github.com/aws/aws-sdk-go-v2/service/codebuild v1.62.0 github.com/aws/aws-sdk-go-v2/service/codecatalyst v1.18.0 diff --git a/go.sum b/go.sum index e564d7f7ab79..be3240b08701 100644 --- a/go.sum +++ b/go.sum @@ -131,8 +131,8 @@ github.com/aws/aws-sdk-go-v2/service/cloudtrail v1.50.1 h1:f+n0I/ayFBFUrq/x9Y7Yw github.com/aws/aws-sdk-go-v2/service/cloudtrail v1.50.1/go.mod h1:OE2RTaxbHdirCXEtYu4/2K2VNDT2fJdW2XsGngXLEKA= github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.46.1 h1:jdaLx0Fle7TsNNpd4fe1C5JOtIQCUtYveT5qOsmTHdg= github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.46.1/go.mod h1:ZCCs9PKEJ2qp3sA1IH7VWYmEJnenvHoR1gEqDH6qNoI= -github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs v1.54.0 h1:YBaZkj6OnJvSPKMPMOhhEk3mGq0UzYtvCnEEXk93jko= -github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs v1.54.0/go.mod h1:JGvzarQ8vyLLmajh2eV3lfS/BrOE32ryCgEh6mwDGnc= +github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs v1.54.1 h1:eKC7wj2CjC0dJcTPPZa33ku+mueglsEb3c8L8GMarnQ= +github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs v1.54.1/go.mod h1:+Y32vrMhsQMA+q2x2cyQrox40n9RSkmZ6t+sGujF0ME= github.com/aws/aws-sdk-go-v2/service/codeartifact v1.35.0 h1:9zqLfQka0S2AYwjlCYgefY5Efx7YqNknLQbSttU9AYc= github.com/aws/aws-sdk-go-v2/service/codeartifact v1.35.0/go.mod h1:UYdYH203Cxv34VGcJUhjrggSuIVfxsscKutr5ifoIpQ= github.com/aws/aws-sdk-go-v2/service/codebuild v1.62.0 h1:/WSZbxfukB0mO132n9btwJ7fOnLV5J5tYmDlio4l5lM= From d633363c759aafc414ae742ed772e7a9f2710507 Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 09:11:54 -0400 Subject: [PATCH 130/365] go get github.com/aws/aws-sdk-go-v2/service/codebuild. --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 07d55663502d..0c94d4eddcab 100644 --- a/go.mod +++ b/go.mod @@ -62,7 +62,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.46.1 github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs v1.54.1 github.com/aws/aws-sdk-go-v2/service/codeartifact v1.35.0 - github.com/aws/aws-sdk-go-v2/service/codebuild v1.62.0 + github.com/aws/aws-sdk-go-v2/service/codebuild v1.62.1 github.com/aws/aws-sdk-go-v2/service/codecatalyst v1.18.0 github.com/aws/aws-sdk-go-v2/service/codecommit v1.29.0 github.com/aws/aws-sdk-go-v2/service/codeconnections v1.7.0 diff --git a/go.sum b/go.sum index be3240b08701..c7b8836f4dd6 100644 --- a/go.sum +++ b/go.sum @@ -135,8 +135,8 @@ github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs v1.54.1 h1:eKC7wj2CjC0dJcTPP github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs v1.54.1/go.mod h1:+Y32vrMhsQMA+q2x2cyQrox40n9RSkmZ6t+sGujF0ME= github.com/aws/aws-sdk-go-v2/service/codeartifact v1.35.0 h1:9zqLfQka0S2AYwjlCYgefY5Efx7YqNknLQbSttU9AYc= github.com/aws/aws-sdk-go-v2/service/codeartifact v1.35.0/go.mod h1:UYdYH203Cxv34VGcJUhjrggSuIVfxsscKutr5ifoIpQ= -github.com/aws/aws-sdk-go-v2/service/codebuild v1.62.0 h1:/WSZbxfukB0mO132n9btwJ7fOnLV5J5tYmDlio4l5lM= -github.com/aws/aws-sdk-go-v2/service/codebuild v1.62.0/go.mod h1:fvIq7u+wji2n8ds+G0ZLIBZpguLP9LlnVSiO9bwXOVk= +github.com/aws/aws-sdk-go-v2/service/codebuild v1.62.1 h1:YgQ9aeWfU3BIvgATyl0QmrNJCJvptK1JGLOpSWyrAh8= +github.com/aws/aws-sdk-go-v2/service/codebuild v1.62.1/go.mod h1:WOmjO0fUYhgcNaa2jaqqZ7mpJxcg08OmDcBeOManSrE= github.com/aws/aws-sdk-go-v2/service/codecatalyst v1.18.0 h1:RhURzBc8n70zYDQ+xVTJhF0jMagSxNjZGQDHBcQhh9o= github.com/aws/aws-sdk-go-v2/service/codecatalyst v1.18.0/go.mod h1:xWuwpcUjVmxHcuB0CV6SbOk+yap2uHrNIN9SIGOTSX8= github.com/aws/aws-sdk-go-v2/service/codecommit v1.29.0 h1:YwVtUuwGe7csc/aHNR89GZhmwAzOEy0FHlO4G496qdM= From 62e517d257d149152a585d41cba4eeda6281a7af Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 09:11:55 -0400 Subject: [PATCH 131/365] go get github.com/aws/aws-sdk-go-v2/service/codecatalyst. --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 0c94d4eddcab..5f9392c189dc 100644 --- a/go.mod +++ b/go.mod @@ -63,7 +63,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs v1.54.1 github.com/aws/aws-sdk-go-v2/service/codeartifact v1.35.0 github.com/aws/aws-sdk-go-v2/service/codebuild v1.62.1 - github.com/aws/aws-sdk-go-v2/service/codecatalyst v1.18.0 + github.com/aws/aws-sdk-go-v2/service/codecatalyst v1.18.1 github.com/aws/aws-sdk-go-v2/service/codecommit v1.29.0 github.com/aws/aws-sdk-go-v2/service/codeconnections v1.7.0 github.com/aws/aws-sdk-go-v2/service/codedeploy v1.31.0 diff --git a/go.sum b/go.sum index c7b8836f4dd6..33bf57573224 100644 --- a/go.sum +++ b/go.sum @@ -137,8 +137,8 @@ github.com/aws/aws-sdk-go-v2/service/codeartifact v1.35.0 h1:9zqLfQka0S2AYwjlCYg github.com/aws/aws-sdk-go-v2/service/codeartifact v1.35.0/go.mod h1:UYdYH203Cxv34VGcJUhjrggSuIVfxsscKutr5ifoIpQ= github.com/aws/aws-sdk-go-v2/service/codebuild v1.62.1 h1:YgQ9aeWfU3BIvgATyl0QmrNJCJvptK1JGLOpSWyrAh8= github.com/aws/aws-sdk-go-v2/service/codebuild v1.62.1/go.mod h1:WOmjO0fUYhgcNaa2jaqqZ7mpJxcg08OmDcBeOManSrE= -github.com/aws/aws-sdk-go-v2/service/codecatalyst v1.18.0 h1:RhURzBc8n70zYDQ+xVTJhF0jMagSxNjZGQDHBcQhh9o= -github.com/aws/aws-sdk-go-v2/service/codecatalyst v1.18.0/go.mod h1:xWuwpcUjVmxHcuB0CV6SbOk+yap2uHrNIN9SIGOTSX8= +github.com/aws/aws-sdk-go-v2/service/codecatalyst v1.18.1 h1:w8Ehk06uqB2zyiKTnbkRUqdCiVe65GiLEXlsOXjPkPs= +github.com/aws/aws-sdk-go-v2/service/codecatalyst v1.18.1/go.mod h1:q7wXTFLkr082Ae1N3j+r9as7Qjow+XTu3Ck/dKtksGo= github.com/aws/aws-sdk-go-v2/service/codecommit v1.29.0 h1:YwVtUuwGe7csc/aHNR89GZhmwAzOEy0FHlO4G496qdM= github.com/aws/aws-sdk-go-v2/service/codecommit v1.29.0/go.mod h1:2mAGqG5sAPXaUGHd/iIcfEFtib0/CF8jsDDEXKXchCA= github.com/aws/aws-sdk-go-v2/service/codeconnections v1.7.0 h1:UXWSHvcWR6smWf3G2nDnid9vhJlRNZjXOyO8HY7F75I= From d088b7739c797ac15a98aa6aeb14d8acf700a0e3 Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 09:11:56 -0400 Subject: [PATCH 132/365] go get github.com/aws/aws-sdk-go-v2/service/codecommit. --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 5f9392c189dc..c982d9431487 100644 --- a/go.mod +++ b/go.mod @@ -64,7 +64,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/codeartifact v1.35.0 github.com/aws/aws-sdk-go-v2/service/codebuild v1.62.1 github.com/aws/aws-sdk-go-v2/service/codecatalyst v1.18.1 - github.com/aws/aws-sdk-go-v2/service/codecommit v1.29.0 + github.com/aws/aws-sdk-go-v2/service/codecommit v1.29.1 github.com/aws/aws-sdk-go-v2/service/codeconnections v1.7.0 github.com/aws/aws-sdk-go-v2/service/codedeploy v1.31.0 github.com/aws/aws-sdk-go-v2/service/codeguruprofiler v1.26.0 diff --git a/go.sum b/go.sum index 33bf57573224..6cd3b42de87f 100644 --- a/go.sum +++ b/go.sum @@ -139,8 +139,8 @@ github.com/aws/aws-sdk-go-v2/service/codebuild v1.62.1 h1:YgQ9aeWfU3BIvgATyl0Qmr github.com/aws/aws-sdk-go-v2/service/codebuild v1.62.1/go.mod h1:WOmjO0fUYhgcNaa2jaqqZ7mpJxcg08OmDcBeOManSrE= github.com/aws/aws-sdk-go-v2/service/codecatalyst v1.18.1 h1:w8Ehk06uqB2zyiKTnbkRUqdCiVe65GiLEXlsOXjPkPs= github.com/aws/aws-sdk-go-v2/service/codecatalyst v1.18.1/go.mod h1:q7wXTFLkr082Ae1N3j+r9as7Qjow+XTu3Ck/dKtksGo= -github.com/aws/aws-sdk-go-v2/service/codecommit v1.29.0 h1:YwVtUuwGe7csc/aHNR89GZhmwAzOEy0FHlO4G496qdM= -github.com/aws/aws-sdk-go-v2/service/codecommit v1.29.0/go.mod h1:2mAGqG5sAPXaUGHd/iIcfEFtib0/CF8jsDDEXKXchCA= +github.com/aws/aws-sdk-go-v2/service/codecommit v1.29.1 h1:dpVTBYBDawcWN5Dzs/mEIsvbTIB7DZahTE8ZFbOXfDc= +github.com/aws/aws-sdk-go-v2/service/codecommit v1.29.1/go.mod h1:CDOCvuSESB8TytvDLyElgP4gVMZgYJNEbCBWiVSHbYg= github.com/aws/aws-sdk-go-v2/service/codeconnections v1.7.0 h1:UXWSHvcWR6smWf3G2nDnid9vhJlRNZjXOyO8HY7F75I= github.com/aws/aws-sdk-go-v2/service/codeconnections v1.7.0/go.mod h1:6XXonJ5c9OarAKMladT/MBR2qiAkyoph4HiZ3qogqVQ= github.com/aws/aws-sdk-go-v2/service/codedeploy v1.31.0 h1:btMfxiTo2VTIYo1mAE/0IHUJdfSEEvEfw4a4BTcOnPQ= From 451e097d0ef0f6fac910d432c4aa06d63571e72f Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 09:11:58 -0400 Subject: [PATCH 133/365] go get github.com/aws/aws-sdk-go-v2/service/codeconnections. --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index c982d9431487..e6f69ad7a6c2 100644 --- a/go.mod +++ b/go.mod @@ -65,7 +65,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/codebuild v1.62.1 github.com/aws/aws-sdk-go-v2/service/codecatalyst v1.18.1 github.com/aws/aws-sdk-go-v2/service/codecommit v1.29.1 - github.com/aws/aws-sdk-go-v2/service/codeconnections v1.7.0 + github.com/aws/aws-sdk-go-v2/service/codeconnections v1.7.1 github.com/aws/aws-sdk-go-v2/service/codedeploy v1.31.0 github.com/aws/aws-sdk-go-v2/service/codeguruprofiler v1.26.0 github.com/aws/aws-sdk-go-v2/service/codegurureviewer v1.31.0 diff --git a/go.sum b/go.sum index 6cd3b42de87f..c1b6b8f0d779 100644 --- a/go.sum +++ b/go.sum @@ -141,8 +141,8 @@ github.com/aws/aws-sdk-go-v2/service/codecatalyst v1.18.1 h1:w8Ehk06uqB2zyiKTnbk github.com/aws/aws-sdk-go-v2/service/codecatalyst v1.18.1/go.mod h1:q7wXTFLkr082Ae1N3j+r9as7Qjow+XTu3Ck/dKtksGo= github.com/aws/aws-sdk-go-v2/service/codecommit v1.29.1 h1:dpVTBYBDawcWN5Dzs/mEIsvbTIB7DZahTE8ZFbOXfDc= github.com/aws/aws-sdk-go-v2/service/codecommit v1.29.1/go.mod h1:CDOCvuSESB8TytvDLyElgP4gVMZgYJNEbCBWiVSHbYg= -github.com/aws/aws-sdk-go-v2/service/codeconnections v1.7.0 h1:UXWSHvcWR6smWf3G2nDnid9vhJlRNZjXOyO8HY7F75I= -github.com/aws/aws-sdk-go-v2/service/codeconnections v1.7.0/go.mod h1:6XXonJ5c9OarAKMladT/MBR2qiAkyoph4HiZ3qogqVQ= +github.com/aws/aws-sdk-go-v2/service/codeconnections v1.7.1 h1:f20DiugdjJZGsFhdaKrKX5bF2V7DzE48gPNWVBCtCaE= +github.com/aws/aws-sdk-go-v2/service/codeconnections v1.7.1/go.mod h1:B/DVlqEIwSkOQFdy5IMbTWvmvc/b/lY/v9wZFWlxCqc= github.com/aws/aws-sdk-go-v2/service/codedeploy v1.31.0 h1:btMfxiTo2VTIYo1mAE/0IHUJdfSEEvEfw4a4BTcOnPQ= github.com/aws/aws-sdk-go-v2/service/codedeploy v1.31.0/go.mod h1:E3/+AAdvoo+btz0+PZOpgMlZXHdh7NevLzZDimqVt6Q= github.com/aws/aws-sdk-go-v2/service/codeguruprofiler v1.26.0 h1:vLSZmUIAIKXF1QZXFT0O3GVO/I9QbQ0ZF1zwNEMS97s= From 48c083cca1acca9a3b0f5c1473fd822cb4295c72 Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 09:11:59 -0400 Subject: [PATCH 134/365] go get github.com/aws/aws-sdk-go-v2/service/codedeploy. --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index e6f69ad7a6c2..e80f8e4108d7 100644 --- a/go.mod +++ b/go.mod @@ -66,7 +66,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/codecatalyst v1.18.1 github.com/aws/aws-sdk-go-v2/service/codecommit v1.29.1 github.com/aws/aws-sdk-go-v2/service/codeconnections v1.7.1 - github.com/aws/aws-sdk-go-v2/service/codedeploy v1.31.0 + github.com/aws/aws-sdk-go-v2/service/codedeploy v1.31.1 github.com/aws/aws-sdk-go-v2/service/codeguruprofiler v1.26.0 github.com/aws/aws-sdk-go-v2/service/codegurureviewer v1.31.0 github.com/aws/aws-sdk-go-v2/service/codepipeline v1.43.0 diff --git a/go.sum b/go.sum index c1b6b8f0d779..667afc5bd09b 100644 --- a/go.sum +++ b/go.sum @@ -143,8 +143,8 @@ github.com/aws/aws-sdk-go-v2/service/codecommit v1.29.1 h1:dpVTBYBDawcWN5Dzs/mEI github.com/aws/aws-sdk-go-v2/service/codecommit v1.29.1/go.mod h1:CDOCvuSESB8TytvDLyElgP4gVMZgYJNEbCBWiVSHbYg= github.com/aws/aws-sdk-go-v2/service/codeconnections v1.7.1 h1:f20DiugdjJZGsFhdaKrKX5bF2V7DzE48gPNWVBCtCaE= github.com/aws/aws-sdk-go-v2/service/codeconnections v1.7.1/go.mod h1:B/DVlqEIwSkOQFdy5IMbTWvmvc/b/lY/v9wZFWlxCqc= -github.com/aws/aws-sdk-go-v2/service/codedeploy v1.31.0 h1:btMfxiTo2VTIYo1mAE/0IHUJdfSEEvEfw4a4BTcOnPQ= -github.com/aws/aws-sdk-go-v2/service/codedeploy v1.31.0/go.mod h1:E3/+AAdvoo+btz0+PZOpgMlZXHdh7NevLzZDimqVt6Q= +github.com/aws/aws-sdk-go-v2/service/codedeploy v1.31.1 h1:nLtbuM+D3kr0TANA53zNzfgCn1msUIZIVvO8GQ8zgsw= +github.com/aws/aws-sdk-go-v2/service/codedeploy v1.31.1/go.mod h1:nhyDCGnLTixvFU4RfdiQywPgounyF0se2CAAQZC200c= github.com/aws/aws-sdk-go-v2/service/codeguruprofiler v1.26.0 h1:vLSZmUIAIKXF1QZXFT0O3GVO/I9QbQ0ZF1zwNEMS97s= github.com/aws/aws-sdk-go-v2/service/codeguruprofiler v1.26.0/go.mod h1:dbg06PWE+GQiyy2BHG6wWOF/WxLT76LWTkZ/Vbg0acs= github.com/aws/aws-sdk-go-v2/service/codegurureviewer v1.31.0 h1:9pyVJ400RM2B2HjduqhOR9eCECxcreWONPSM/hr7wLM= From 197e16a91eb9b67628299116316886f9dbcbb0d7 Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 09:12:00 -0400 Subject: [PATCH 135/365] go get github.com/aws/aws-sdk-go-v2/service/codeguruprofiler. --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index e80f8e4108d7..bfd336f68776 100644 --- a/go.mod +++ b/go.mod @@ -67,7 +67,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/codecommit v1.29.1 github.com/aws/aws-sdk-go-v2/service/codeconnections v1.7.1 github.com/aws/aws-sdk-go-v2/service/codedeploy v1.31.1 - github.com/aws/aws-sdk-go-v2/service/codeguruprofiler v1.26.0 + github.com/aws/aws-sdk-go-v2/service/codeguruprofiler v1.26.1 github.com/aws/aws-sdk-go-v2/service/codegurureviewer v1.31.0 github.com/aws/aws-sdk-go-v2/service/codepipeline v1.43.0 github.com/aws/aws-sdk-go-v2/service/codestarconnections v1.31.0 diff --git a/go.sum b/go.sum index 667afc5bd09b..d05d0375cb28 100644 --- a/go.sum +++ b/go.sum @@ -145,8 +145,8 @@ github.com/aws/aws-sdk-go-v2/service/codeconnections v1.7.1 h1:f20DiugdjJZGsFhda github.com/aws/aws-sdk-go-v2/service/codeconnections v1.7.1/go.mod h1:B/DVlqEIwSkOQFdy5IMbTWvmvc/b/lY/v9wZFWlxCqc= github.com/aws/aws-sdk-go-v2/service/codedeploy v1.31.1 h1:nLtbuM+D3kr0TANA53zNzfgCn1msUIZIVvO8GQ8zgsw= github.com/aws/aws-sdk-go-v2/service/codedeploy v1.31.1/go.mod h1:nhyDCGnLTixvFU4RfdiQywPgounyF0se2CAAQZC200c= -github.com/aws/aws-sdk-go-v2/service/codeguruprofiler v1.26.0 h1:vLSZmUIAIKXF1QZXFT0O3GVO/I9QbQ0ZF1zwNEMS97s= -github.com/aws/aws-sdk-go-v2/service/codeguruprofiler v1.26.0/go.mod h1:dbg06PWE+GQiyy2BHG6wWOF/WxLT76LWTkZ/Vbg0acs= +github.com/aws/aws-sdk-go-v2/service/codeguruprofiler v1.26.1 h1:yp9Ilhs7gtUeK90/Lfqr/zXPu+wFVHwI4ASR+EpzBP8= +github.com/aws/aws-sdk-go-v2/service/codeguruprofiler v1.26.1/go.mod h1:M5AqEEJg0YVH0HolYS6qlDmVotbAkIaU1d17sAPFyDI= github.com/aws/aws-sdk-go-v2/service/codegurureviewer v1.31.0 h1:9pyVJ400RM2B2HjduqhOR9eCECxcreWONPSM/hr7wLM= github.com/aws/aws-sdk-go-v2/service/codegurureviewer v1.31.0/go.mod h1:9FYUKV2l7nXI9ZgUfZEpaawbXigStcNHJ8XSI3I/wcY= github.com/aws/aws-sdk-go-v2/service/codepipeline v1.43.0 h1:Rklhj8QJYozMQRJ1i9n9vZqCVNBsjnUlRhy4db1OplE= From 6d95ff8de1af851ec1eca340d9905f4ae94cb64c Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 09:12:01 -0400 Subject: [PATCH 136/365] go get github.com/aws/aws-sdk-go-v2/service/codegurureviewer. --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index bfd336f68776..ee2a141d7b9a 100644 --- a/go.mod +++ b/go.mod @@ -68,7 +68,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/codeconnections v1.7.1 github.com/aws/aws-sdk-go-v2/service/codedeploy v1.31.1 github.com/aws/aws-sdk-go-v2/service/codeguruprofiler v1.26.1 - github.com/aws/aws-sdk-go-v2/service/codegurureviewer v1.31.0 + github.com/aws/aws-sdk-go-v2/service/codegurureviewer v1.31.1 github.com/aws/aws-sdk-go-v2/service/codepipeline v1.43.0 github.com/aws/aws-sdk-go-v2/service/codestarconnections v1.31.0 github.com/aws/aws-sdk-go-v2/service/codestarnotifications v1.28.0 diff --git a/go.sum b/go.sum index d05d0375cb28..3f82887659bb 100644 --- a/go.sum +++ b/go.sum @@ -147,8 +147,8 @@ github.com/aws/aws-sdk-go-v2/service/codedeploy v1.31.1 h1:nLtbuM+D3kr0TANA53zNz github.com/aws/aws-sdk-go-v2/service/codedeploy v1.31.1/go.mod h1:nhyDCGnLTixvFU4RfdiQywPgounyF0se2CAAQZC200c= github.com/aws/aws-sdk-go-v2/service/codeguruprofiler v1.26.1 h1:yp9Ilhs7gtUeK90/Lfqr/zXPu+wFVHwI4ASR+EpzBP8= github.com/aws/aws-sdk-go-v2/service/codeguruprofiler v1.26.1/go.mod h1:M5AqEEJg0YVH0HolYS6qlDmVotbAkIaU1d17sAPFyDI= -github.com/aws/aws-sdk-go-v2/service/codegurureviewer v1.31.0 h1:9pyVJ400RM2B2HjduqhOR9eCECxcreWONPSM/hr7wLM= -github.com/aws/aws-sdk-go-v2/service/codegurureviewer v1.31.0/go.mod h1:9FYUKV2l7nXI9ZgUfZEpaawbXigStcNHJ8XSI3I/wcY= +github.com/aws/aws-sdk-go-v2/service/codegurureviewer v1.31.1 h1:o02/8n6dGGYFrTCE0mqHKLZkprnUjehxqf1WldSWrJ8= +github.com/aws/aws-sdk-go-v2/service/codegurureviewer v1.31.1/go.mod h1:HiWlOR1PpVyB59fCnPuULZ/M0P/qPPV27cJgMZza0+g= github.com/aws/aws-sdk-go-v2/service/codepipeline v1.43.0 h1:Rklhj8QJYozMQRJ1i9n9vZqCVNBsjnUlRhy4db1OplE= github.com/aws/aws-sdk-go-v2/service/codepipeline v1.43.0/go.mod h1:S4ZW7qHqnS6FgKhi7GeRRyqxhHZPKCW/cE7LhDoNKnY= github.com/aws/aws-sdk-go-v2/service/codestarconnections v1.31.0 h1:SkwYSOOcaLSlBpqsm3mkg20yhx1FP8AJi3WH3oQs7ss= From d2e447bed062eb946687ef1729ea6e9f496250d0 Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 09:12:02 -0400 Subject: [PATCH 137/365] go get github.com/aws/aws-sdk-go-v2/service/codepipeline. --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index ee2a141d7b9a..ded0b5ecf186 100644 --- a/go.mod +++ b/go.mod @@ -69,7 +69,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/codedeploy v1.31.1 github.com/aws/aws-sdk-go-v2/service/codeguruprofiler v1.26.1 github.com/aws/aws-sdk-go-v2/service/codegurureviewer v1.31.1 - github.com/aws/aws-sdk-go-v2/service/codepipeline v1.43.0 + github.com/aws/aws-sdk-go-v2/service/codepipeline v1.43.1 github.com/aws/aws-sdk-go-v2/service/codestarconnections v1.31.0 github.com/aws/aws-sdk-go-v2/service/codestarnotifications v1.28.0 github.com/aws/aws-sdk-go-v2/service/cognitoidentity v1.30.0 diff --git a/go.sum b/go.sum index 3f82887659bb..d7dc68f4c53f 100644 --- a/go.sum +++ b/go.sum @@ -149,8 +149,8 @@ github.com/aws/aws-sdk-go-v2/service/codeguruprofiler v1.26.1 h1:yp9Ilhs7gtUeK90 github.com/aws/aws-sdk-go-v2/service/codeguruprofiler v1.26.1/go.mod h1:M5AqEEJg0YVH0HolYS6qlDmVotbAkIaU1d17sAPFyDI= github.com/aws/aws-sdk-go-v2/service/codegurureviewer v1.31.1 h1:o02/8n6dGGYFrTCE0mqHKLZkprnUjehxqf1WldSWrJ8= github.com/aws/aws-sdk-go-v2/service/codegurureviewer v1.31.1/go.mod h1:HiWlOR1PpVyB59fCnPuULZ/M0P/qPPV27cJgMZza0+g= -github.com/aws/aws-sdk-go-v2/service/codepipeline v1.43.0 h1:Rklhj8QJYozMQRJ1i9n9vZqCVNBsjnUlRhy4db1OplE= -github.com/aws/aws-sdk-go-v2/service/codepipeline v1.43.0/go.mod h1:S4ZW7qHqnS6FgKhi7GeRRyqxhHZPKCW/cE7LhDoNKnY= +github.com/aws/aws-sdk-go-v2/service/codepipeline v1.43.1 h1:4f9TwbJesmy9tqPtUbSMo7gg6TLnCK4ylLq7n0qFVWc= +github.com/aws/aws-sdk-go-v2/service/codepipeline v1.43.1/go.mod h1:s6P0ArGOLmTXbc1lIeRczLm6R04ZvayVWeX8k3Z9v6I= github.com/aws/aws-sdk-go-v2/service/codestarconnections v1.31.0 h1:SkwYSOOcaLSlBpqsm3mkg20yhx1FP8AJi3WH3oQs7ss= github.com/aws/aws-sdk-go-v2/service/codestarconnections v1.31.0/go.mod h1:atg1dLH3Fw3M94KE4yMiJwkXn+mq0tItJoCOIyLb3jI= github.com/aws/aws-sdk-go-v2/service/codestarnotifications v1.28.0 h1:YM1ppCuKTcpyAr0K6jT0wvLYLnbWzQ4h40WObnZOxi0= From fc0c89fbde7bf6c85267dbf38b3f25269eb65edc Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 09:12:03 -0400 Subject: [PATCH 138/365] go get github.com/aws/aws-sdk-go-v2/service/codestarconnections. --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index ded0b5ecf186..d9816992f927 100644 --- a/go.mod +++ b/go.mod @@ -70,7 +70,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/codeguruprofiler v1.26.1 github.com/aws/aws-sdk-go-v2/service/codegurureviewer v1.31.1 github.com/aws/aws-sdk-go-v2/service/codepipeline v1.43.1 - github.com/aws/aws-sdk-go-v2/service/codestarconnections v1.31.0 + github.com/aws/aws-sdk-go-v2/service/codestarconnections v1.31.1 github.com/aws/aws-sdk-go-v2/service/codestarnotifications v1.28.0 github.com/aws/aws-sdk-go-v2/service/cognitoidentity v1.30.0 github.com/aws/aws-sdk-go-v2/service/cognitoidentityprovider v1.54.0 diff --git a/go.sum b/go.sum index d7dc68f4c53f..ae118aae0b71 100644 --- a/go.sum +++ b/go.sum @@ -151,8 +151,8 @@ github.com/aws/aws-sdk-go-v2/service/codegurureviewer v1.31.1 h1:o02/8n6dGGYFrTC github.com/aws/aws-sdk-go-v2/service/codegurureviewer v1.31.1/go.mod h1:HiWlOR1PpVyB59fCnPuULZ/M0P/qPPV27cJgMZza0+g= github.com/aws/aws-sdk-go-v2/service/codepipeline v1.43.1 h1:4f9TwbJesmy9tqPtUbSMo7gg6TLnCK4ylLq7n0qFVWc= github.com/aws/aws-sdk-go-v2/service/codepipeline v1.43.1/go.mod h1:s6P0ArGOLmTXbc1lIeRczLm6R04ZvayVWeX8k3Z9v6I= -github.com/aws/aws-sdk-go-v2/service/codestarconnections v1.31.0 h1:SkwYSOOcaLSlBpqsm3mkg20yhx1FP8AJi3WH3oQs7ss= -github.com/aws/aws-sdk-go-v2/service/codestarconnections v1.31.0/go.mod h1:atg1dLH3Fw3M94KE4yMiJwkXn+mq0tItJoCOIyLb3jI= +github.com/aws/aws-sdk-go-v2/service/codestarconnections v1.31.1 h1:YPFqlu6T3bxhmfur9CFazxh5puWiL0uxjrukw2GEFPg= +github.com/aws/aws-sdk-go-v2/service/codestarconnections v1.31.1/go.mod h1:y3qe0icKlqpF2ccL/o6t8fPR8c0o4tGplskz34fvJx4= github.com/aws/aws-sdk-go-v2/service/codestarnotifications v1.28.0 h1:YM1ppCuKTcpyAr0K6jT0wvLYLnbWzQ4h40WObnZOxi0= github.com/aws/aws-sdk-go-v2/service/codestarnotifications v1.28.0/go.mod h1:Hja+UvdOoS738VHDVwY8rMfj2Bdp4MyqnbBW45/hCQY= github.com/aws/aws-sdk-go-v2/service/cognitoidentity v1.30.0 h1:qOf/MjucrSePkhcxqx/J2Acax0cC7hwqJN+HzHXfbJ0= From 3dfb18dc2b694fea9ab74ee1f003598b23f1a049 Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 09:12:04 -0400 Subject: [PATCH 139/365] go get github.com/aws/aws-sdk-go-v2/service/codestarnotifications. --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index d9816992f927..e830389cb46c 100644 --- a/go.mod +++ b/go.mod @@ -71,7 +71,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/codegurureviewer v1.31.1 github.com/aws/aws-sdk-go-v2/service/codepipeline v1.43.1 github.com/aws/aws-sdk-go-v2/service/codestarconnections v1.31.1 - github.com/aws/aws-sdk-go-v2/service/codestarnotifications v1.28.0 + github.com/aws/aws-sdk-go-v2/service/codestarnotifications v1.28.1 github.com/aws/aws-sdk-go-v2/service/cognitoidentity v1.30.0 github.com/aws/aws-sdk-go-v2/service/cognitoidentityprovider v1.54.0 github.com/aws/aws-sdk-go-v2/service/comprehend v1.37.0 diff --git a/go.sum b/go.sum index ae118aae0b71..af08728c6417 100644 --- a/go.sum +++ b/go.sum @@ -153,8 +153,8 @@ github.com/aws/aws-sdk-go-v2/service/codepipeline v1.43.1 h1:4f9TwbJesmy9tqPtUbS github.com/aws/aws-sdk-go-v2/service/codepipeline v1.43.1/go.mod h1:s6P0ArGOLmTXbc1lIeRczLm6R04ZvayVWeX8k3Z9v6I= github.com/aws/aws-sdk-go-v2/service/codestarconnections v1.31.1 h1:YPFqlu6T3bxhmfur9CFazxh5puWiL0uxjrukw2GEFPg= github.com/aws/aws-sdk-go-v2/service/codestarconnections v1.31.1/go.mod h1:y3qe0icKlqpF2ccL/o6t8fPR8c0o4tGplskz34fvJx4= -github.com/aws/aws-sdk-go-v2/service/codestarnotifications v1.28.0 h1:YM1ppCuKTcpyAr0K6jT0wvLYLnbWzQ4h40WObnZOxi0= -github.com/aws/aws-sdk-go-v2/service/codestarnotifications v1.28.0/go.mod h1:Hja+UvdOoS738VHDVwY8rMfj2Bdp4MyqnbBW45/hCQY= +github.com/aws/aws-sdk-go-v2/service/codestarnotifications v1.28.1 h1:fRqouJqnHOFgVHLjhe/UXJWkihuDByU9CBBuZGUU4Ek= +github.com/aws/aws-sdk-go-v2/service/codestarnotifications v1.28.1/go.mod h1:oPiggwnMwW1eRcFq3rImb6gms6HIqgr+h65NSZzOn3o= github.com/aws/aws-sdk-go-v2/service/cognitoidentity v1.30.0 h1:qOf/MjucrSePkhcxqx/J2Acax0cC7hwqJN+HzHXfbJ0= github.com/aws/aws-sdk-go-v2/service/cognitoidentity v1.30.0/go.mod h1:+xtJoyncm21FXfCVZ6W5VvFSiBXAgcM5nt4cImrzHLY= github.com/aws/aws-sdk-go-v2/service/cognitoidentityprovider v1.54.0 h1:zY76J9mkw/lngO8RsccoYiVLRtw0rJ6g2/vYvvmLFaM= From 6e94915fe526a376c636dab44bf73cbf681e908a Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 09:12:05 -0400 Subject: [PATCH 140/365] go get github.com/aws/aws-sdk-go-v2/service/cognitoidentity. --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index e830389cb46c..1acea8d94e25 100644 --- a/go.mod +++ b/go.mod @@ -72,7 +72,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/codepipeline v1.43.1 github.com/aws/aws-sdk-go-v2/service/codestarconnections v1.31.1 github.com/aws/aws-sdk-go-v2/service/codestarnotifications v1.28.1 - github.com/aws/aws-sdk-go-v2/service/cognitoidentity v1.30.0 + github.com/aws/aws-sdk-go-v2/service/cognitoidentity v1.30.1 github.com/aws/aws-sdk-go-v2/service/cognitoidentityprovider v1.54.0 github.com/aws/aws-sdk-go-v2/service/comprehend v1.37.0 github.com/aws/aws-sdk-go-v2/service/computeoptimizer v1.44.0 diff --git a/go.sum b/go.sum index af08728c6417..33fe0bfea57d 100644 --- a/go.sum +++ b/go.sum @@ -155,8 +155,8 @@ github.com/aws/aws-sdk-go-v2/service/codestarconnections v1.31.1 h1:YPFqlu6T3bxh github.com/aws/aws-sdk-go-v2/service/codestarconnections v1.31.1/go.mod h1:y3qe0icKlqpF2ccL/o6t8fPR8c0o4tGplskz34fvJx4= github.com/aws/aws-sdk-go-v2/service/codestarnotifications v1.28.1 h1:fRqouJqnHOFgVHLjhe/UXJWkihuDByU9CBBuZGUU4Ek= github.com/aws/aws-sdk-go-v2/service/codestarnotifications v1.28.1/go.mod h1:oPiggwnMwW1eRcFq3rImb6gms6HIqgr+h65NSZzOn3o= -github.com/aws/aws-sdk-go-v2/service/cognitoidentity v1.30.0 h1:qOf/MjucrSePkhcxqx/J2Acax0cC7hwqJN+HzHXfbJ0= -github.com/aws/aws-sdk-go-v2/service/cognitoidentity v1.30.0/go.mod h1:+xtJoyncm21FXfCVZ6W5VvFSiBXAgcM5nt4cImrzHLY= +github.com/aws/aws-sdk-go-v2/service/cognitoidentity v1.30.1 h1:NB1+cWutptq+UHLSodvhdhNw8mSf3L2slhysVs5HCh8= +github.com/aws/aws-sdk-go-v2/service/cognitoidentity v1.30.1/go.mod h1:nPuM/gz996X+i7RSnw1LNdaP9NFBMgEpamx6YB2mrQQ= github.com/aws/aws-sdk-go-v2/service/cognitoidentityprovider v1.54.0 h1:zY76J9mkw/lngO8RsccoYiVLRtw0rJ6g2/vYvvmLFaM= github.com/aws/aws-sdk-go-v2/service/cognitoidentityprovider v1.54.0/go.mod h1:YYo3xO08uGKAwtDJ2PPi5oEUliR8aZEWP+l7iXJahH4= github.com/aws/aws-sdk-go-v2/service/comprehend v1.37.0 h1:v/5l33Z8Pq8JVAX6OKy7hb1KIAu0VFbnks7nuW20trE= From a9c430bf92eba4867bc0dbc1ed8a4146a3b8d517 Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 09:12:06 -0400 Subject: [PATCH 141/365] go get github.com/aws/aws-sdk-go-v2/service/cognitoidentityprovider. --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 1acea8d94e25..ee5cc5c92a10 100644 --- a/go.mod +++ b/go.mod @@ -73,7 +73,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/codestarconnections v1.31.1 github.com/aws/aws-sdk-go-v2/service/codestarnotifications v1.28.1 github.com/aws/aws-sdk-go-v2/service/cognitoidentity v1.30.1 - github.com/aws/aws-sdk-go-v2/service/cognitoidentityprovider v1.54.0 + github.com/aws/aws-sdk-go-v2/service/cognitoidentityprovider v1.54.1 github.com/aws/aws-sdk-go-v2/service/comprehend v1.37.0 github.com/aws/aws-sdk-go-v2/service/computeoptimizer v1.44.0 github.com/aws/aws-sdk-go-v2/service/configservice v1.54.0 diff --git a/go.sum b/go.sum index 33fe0bfea57d..191aa7e2b717 100644 --- a/go.sum +++ b/go.sum @@ -157,8 +157,8 @@ github.com/aws/aws-sdk-go-v2/service/codestarnotifications v1.28.1 h1:fRqouJqnHO github.com/aws/aws-sdk-go-v2/service/codestarnotifications v1.28.1/go.mod h1:oPiggwnMwW1eRcFq3rImb6gms6HIqgr+h65NSZzOn3o= github.com/aws/aws-sdk-go-v2/service/cognitoidentity v1.30.1 h1:NB1+cWutptq+UHLSodvhdhNw8mSf3L2slhysVs5HCh8= github.com/aws/aws-sdk-go-v2/service/cognitoidentity v1.30.1/go.mod h1:nPuM/gz996X+i7RSnw1LNdaP9NFBMgEpamx6YB2mrQQ= -github.com/aws/aws-sdk-go-v2/service/cognitoidentityprovider v1.54.0 h1:zY76J9mkw/lngO8RsccoYiVLRtw0rJ6g2/vYvvmLFaM= -github.com/aws/aws-sdk-go-v2/service/cognitoidentityprovider v1.54.0/go.mod h1:YYo3xO08uGKAwtDJ2PPi5oEUliR8aZEWP+l7iXJahH4= +github.com/aws/aws-sdk-go-v2/service/cognitoidentityprovider v1.54.1 h1:QS+vL4FEdHfs7wSGj7SQJZmbk3m7SMzNI3uluL8KMwU= +github.com/aws/aws-sdk-go-v2/service/cognitoidentityprovider v1.54.1/go.mod h1:gdYsfThKvm9P3PAqtXR9Lx4up/w83eKGCW0myw5s5wI= github.com/aws/aws-sdk-go-v2/service/comprehend v1.37.0 h1:v/5l33Z8Pq8JVAX6OKy7hb1KIAu0VFbnks7nuW20trE= github.com/aws/aws-sdk-go-v2/service/comprehend v1.37.0/go.mod h1:zSFlP3Il9v0uR8Gxkt4gQCXD15yp+pSNG4SIiCQn/6w= github.com/aws/aws-sdk-go-v2/service/computeoptimizer v1.44.0 h1:wRVDDNMS6XvuUilEwPnvbH9xcdyCM2UFaqu+DOjRLI0= From 6aa5c0f9f8b12737d86c9b5cb50e162d7ef4765a Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 09:12:07 -0400 Subject: [PATCH 142/365] go get github.com/aws/aws-sdk-go-v2/service/comprehend. --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index ee5cc5c92a10..15c96e8b8046 100644 --- a/go.mod +++ b/go.mod @@ -74,7 +74,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/codestarnotifications v1.28.1 github.com/aws/aws-sdk-go-v2/service/cognitoidentity v1.30.1 github.com/aws/aws-sdk-go-v2/service/cognitoidentityprovider v1.54.1 - github.com/aws/aws-sdk-go-v2/service/comprehend v1.37.0 + github.com/aws/aws-sdk-go-v2/service/comprehend v1.37.1 github.com/aws/aws-sdk-go-v2/service/computeoptimizer v1.44.0 github.com/aws/aws-sdk-go-v2/service/configservice v1.54.0 github.com/aws/aws-sdk-go-v2/service/connect v1.132.0 diff --git a/go.sum b/go.sum index 191aa7e2b717..c8ff193d87ba 100644 --- a/go.sum +++ b/go.sum @@ -159,8 +159,8 @@ github.com/aws/aws-sdk-go-v2/service/cognitoidentity v1.30.1 h1:NB1+cWutptq+UHLS github.com/aws/aws-sdk-go-v2/service/cognitoidentity v1.30.1/go.mod h1:nPuM/gz996X+i7RSnw1LNdaP9NFBMgEpamx6YB2mrQQ= github.com/aws/aws-sdk-go-v2/service/cognitoidentityprovider v1.54.1 h1:QS+vL4FEdHfs7wSGj7SQJZmbk3m7SMzNI3uluL8KMwU= github.com/aws/aws-sdk-go-v2/service/cognitoidentityprovider v1.54.1/go.mod h1:gdYsfThKvm9P3PAqtXR9Lx4up/w83eKGCW0myw5s5wI= -github.com/aws/aws-sdk-go-v2/service/comprehend v1.37.0 h1:v/5l33Z8Pq8JVAX6OKy7hb1KIAu0VFbnks7nuW20trE= -github.com/aws/aws-sdk-go-v2/service/comprehend v1.37.0/go.mod h1:zSFlP3Il9v0uR8Gxkt4gQCXD15yp+pSNG4SIiCQn/6w= +github.com/aws/aws-sdk-go-v2/service/comprehend v1.37.1 h1:Xat/BhQMFHWTNCcZeYu6ETUyk1xrTBHmSBabQZsoCTQ= +github.com/aws/aws-sdk-go-v2/service/comprehend v1.37.1/go.mod h1:j9LTyGi9ayVVJTv24l18umZyMghJMBGAz00LNa/FD+Y= github.com/aws/aws-sdk-go-v2/service/computeoptimizer v1.44.0 h1:wRVDDNMS6XvuUilEwPnvbH9xcdyCM2UFaqu+DOjRLI0= github.com/aws/aws-sdk-go-v2/service/computeoptimizer v1.44.0/go.mod h1:+xYQLHezJ9xNMly5Qrvi3evcypdDYomK7gNWrrd1tKo= github.com/aws/aws-sdk-go-v2/service/configservice v1.54.0 h1:jd4gpwRaxZ0p77oZHugdDuI0mEIDT5CGxwLyxI0Bj1Q= From fb9e71b99eb5c9cb757d16e847026a060fec14c3 Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 09:12:08 -0400 Subject: [PATCH 143/365] go get github.com/aws/aws-sdk-go-v2/service/computeoptimizer. --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 15c96e8b8046..6fb6fa00deff 100644 --- a/go.mod +++ b/go.mod @@ -75,7 +75,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/cognitoidentity v1.30.1 github.com/aws/aws-sdk-go-v2/service/cognitoidentityprovider v1.54.1 github.com/aws/aws-sdk-go-v2/service/comprehend v1.37.1 - github.com/aws/aws-sdk-go-v2/service/computeoptimizer v1.44.0 + github.com/aws/aws-sdk-go-v2/service/computeoptimizer v1.44.1 github.com/aws/aws-sdk-go-v2/service/configservice v1.54.0 github.com/aws/aws-sdk-go-v2/service/connect v1.132.0 github.com/aws/aws-sdk-go-v2/service/connectcases v1.27.0 diff --git a/go.sum b/go.sum index c8ff193d87ba..c80606bf91df 100644 --- a/go.sum +++ b/go.sum @@ -161,8 +161,8 @@ github.com/aws/aws-sdk-go-v2/service/cognitoidentityprovider v1.54.1 h1:QS+vL4FE github.com/aws/aws-sdk-go-v2/service/cognitoidentityprovider v1.54.1/go.mod h1:gdYsfThKvm9P3PAqtXR9Lx4up/w83eKGCW0myw5s5wI= github.com/aws/aws-sdk-go-v2/service/comprehend v1.37.1 h1:Xat/BhQMFHWTNCcZeYu6ETUyk1xrTBHmSBabQZsoCTQ= github.com/aws/aws-sdk-go-v2/service/comprehend v1.37.1/go.mod h1:j9LTyGi9ayVVJTv24l18umZyMghJMBGAz00LNa/FD+Y= -github.com/aws/aws-sdk-go-v2/service/computeoptimizer v1.44.0 h1:wRVDDNMS6XvuUilEwPnvbH9xcdyCM2UFaqu+DOjRLI0= -github.com/aws/aws-sdk-go-v2/service/computeoptimizer v1.44.0/go.mod h1:+xYQLHezJ9xNMly5Qrvi3evcypdDYomK7gNWrrd1tKo= +github.com/aws/aws-sdk-go-v2/service/computeoptimizer v1.44.1 h1:Vz3eSSKha0gWpZtUmGDJDUGw+J+CWNUs9NtM2FnOgiE= +github.com/aws/aws-sdk-go-v2/service/computeoptimizer v1.44.1/go.mod h1:/GZI/NTlYrq4ebfgeAWd28CYAIkma0LEhzR6LBxkAsc= github.com/aws/aws-sdk-go-v2/service/configservice v1.54.0 h1:jd4gpwRaxZ0p77oZHugdDuI0mEIDT5CGxwLyxI0Bj1Q= github.com/aws/aws-sdk-go-v2/service/configservice v1.54.0/go.mod h1:fZOMQAVUmB1c1azVfszfjRn3agF7O/X4/9OEfC0uXLQ= github.com/aws/aws-sdk-go-v2/service/connect v1.132.0 h1:/CLNF/SbIH7aw4hT6PZCzPSlLubCl009pJfo8rv6dpQ= From 520edcb5e8c161430bd96dff717dc3683352310a Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 09:12:09 -0400 Subject: [PATCH 144/365] go get github.com/aws/aws-sdk-go-v2/service/configservice. --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 6fb6fa00deff..38c83d0ce8f1 100644 --- a/go.mod +++ b/go.mod @@ -76,7 +76,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/cognitoidentityprovider v1.54.1 github.com/aws/aws-sdk-go-v2/service/comprehend v1.37.1 github.com/aws/aws-sdk-go-v2/service/computeoptimizer v1.44.1 - github.com/aws/aws-sdk-go-v2/service/configservice v1.54.0 + github.com/aws/aws-sdk-go-v2/service/configservice v1.54.1 github.com/aws/aws-sdk-go-v2/service/connect v1.132.0 github.com/aws/aws-sdk-go-v2/service/connectcases v1.27.0 github.com/aws/aws-sdk-go-v2/service/controltower v1.23.0 diff --git a/go.sum b/go.sum index c80606bf91df..1fb774ff0f14 100644 --- a/go.sum +++ b/go.sum @@ -163,8 +163,8 @@ github.com/aws/aws-sdk-go-v2/service/comprehend v1.37.1 h1:Xat/BhQMFHWTNCcZeYu6E github.com/aws/aws-sdk-go-v2/service/comprehend v1.37.1/go.mod h1:j9LTyGi9ayVVJTv24l18umZyMghJMBGAz00LNa/FD+Y= github.com/aws/aws-sdk-go-v2/service/computeoptimizer v1.44.1 h1:Vz3eSSKha0gWpZtUmGDJDUGw+J+CWNUs9NtM2FnOgiE= github.com/aws/aws-sdk-go-v2/service/computeoptimizer v1.44.1/go.mod h1:/GZI/NTlYrq4ebfgeAWd28CYAIkma0LEhzR6LBxkAsc= -github.com/aws/aws-sdk-go-v2/service/configservice v1.54.0 h1:jd4gpwRaxZ0p77oZHugdDuI0mEIDT5CGxwLyxI0Bj1Q= -github.com/aws/aws-sdk-go-v2/service/configservice v1.54.0/go.mod h1:fZOMQAVUmB1c1azVfszfjRn3agF7O/X4/9OEfC0uXLQ= +github.com/aws/aws-sdk-go-v2/service/configservice v1.54.1 h1:f6aReZOJPcBvEdpMUy16fHeOEs9Dy7PwqQ1qMQpYxt8= +github.com/aws/aws-sdk-go-v2/service/configservice v1.54.1/go.mod h1:AF+ERbemhpKFDlA+LTHNgol4p7uY1ovFe9fCB+RLALk= github.com/aws/aws-sdk-go-v2/service/connect v1.132.0 h1:/CLNF/SbIH7aw4hT6PZCzPSlLubCl009pJfo8rv6dpQ= github.com/aws/aws-sdk-go-v2/service/connect v1.132.0/go.mod h1:v9bE3U2p2oXR5qsRvI/p0w5SBh1JO37AdmrbWi8stXc= github.com/aws/aws-sdk-go-v2/service/connectcases v1.27.0 h1:rYTCSq7znZysM9xDQdoyYKfpxxQWAx6w+bEcuP98c4k= From 3b56bf2880b360f566a40c0023e08fe919342bd6 Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 09:12:11 -0400 Subject: [PATCH 145/365] go get github.com/aws/aws-sdk-go-v2/service/connect. --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 38c83d0ce8f1..65e7ebc719c8 100644 --- a/go.mod +++ b/go.mod @@ -77,7 +77,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/comprehend v1.37.1 github.com/aws/aws-sdk-go-v2/service/computeoptimizer v1.44.1 github.com/aws/aws-sdk-go-v2/service/configservice v1.54.1 - github.com/aws/aws-sdk-go-v2/service/connect v1.132.0 + github.com/aws/aws-sdk-go-v2/service/connect v1.132.1 github.com/aws/aws-sdk-go-v2/service/connectcases v1.27.0 github.com/aws/aws-sdk-go-v2/service/controltower v1.23.0 github.com/aws/aws-sdk-go-v2/service/costandusagereportservice v1.30.0 diff --git a/go.sum b/go.sum index 1fb774ff0f14..c87f352b84ba 100644 --- a/go.sum +++ b/go.sum @@ -165,8 +165,8 @@ github.com/aws/aws-sdk-go-v2/service/computeoptimizer v1.44.1 h1:Vz3eSSKha0gWpZt github.com/aws/aws-sdk-go-v2/service/computeoptimizer v1.44.1/go.mod h1:/GZI/NTlYrq4ebfgeAWd28CYAIkma0LEhzR6LBxkAsc= github.com/aws/aws-sdk-go-v2/service/configservice v1.54.1 h1:f6aReZOJPcBvEdpMUy16fHeOEs9Dy7PwqQ1qMQpYxt8= github.com/aws/aws-sdk-go-v2/service/configservice v1.54.1/go.mod h1:AF+ERbemhpKFDlA+LTHNgol4p7uY1ovFe9fCB+RLALk= -github.com/aws/aws-sdk-go-v2/service/connect v1.132.0 h1:/CLNF/SbIH7aw4hT6PZCzPSlLubCl009pJfo8rv6dpQ= -github.com/aws/aws-sdk-go-v2/service/connect v1.132.0/go.mod h1:v9bE3U2p2oXR5qsRvI/p0w5SBh1JO37AdmrbWi8stXc= +github.com/aws/aws-sdk-go-v2/service/connect v1.132.1 h1:eKxoFnZ+WuKSCvnrUSfUYsxniYA1PCKtu97+3fhhdP0= +github.com/aws/aws-sdk-go-v2/service/connect v1.132.1/go.mod h1:rbvCsyvfb8gqfvmS25MbGtytizsOhSUcxLWt1rGCNj0= github.com/aws/aws-sdk-go-v2/service/connectcases v1.27.0 h1:rYTCSq7znZysM9xDQdoyYKfpxxQWAx6w+bEcuP98c4k= github.com/aws/aws-sdk-go-v2/service/connectcases v1.27.0/go.mod h1:Pu5BLAAK6Ro3d9MjZ2set5TxkKdNGtz6JTlmdcZs5gw= github.com/aws/aws-sdk-go-v2/service/controltower v1.23.0 h1:wdhivZJf85vUbuYJ9kQedwzMLeVLhNrYoPli3wNEcq4= From c81642a22f1e61c9b2dcd56017cf940bd40fd513 Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 09:12:12 -0400 Subject: [PATCH 146/365] go get github.com/aws/aws-sdk-go-v2/service/connectcases. --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 65e7ebc719c8..bd2344af5292 100644 --- a/go.mod +++ b/go.mod @@ -78,7 +78,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/computeoptimizer v1.44.1 github.com/aws/aws-sdk-go-v2/service/configservice v1.54.1 github.com/aws/aws-sdk-go-v2/service/connect v1.132.1 - github.com/aws/aws-sdk-go-v2/service/connectcases v1.27.0 + github.com/aws/aws-sdk-go-v2/service/connectcases v1.27.1 github.com/aws/aws-sdk-go-v2/service/controltower v1.23.0 github.com/aws/aws-sdk-go-v2/service/costandusagereportservice v1.30.0 github.com/aws/aws-sdk-go-v2/service/costexplorer v1.52.0 diff --git a/go.sum b/go.sum index c87f352b84ba..af80b4a1e216 100644 --- a/go.sum +++ b/go.sum @@ -167,8 +167,8 @@ github.com/aws/aws-sdk-go-v2/service/configservice v1.54.1 h1:f6aReZOJPcBvEdpMUy github.com/aws/aws-sdk-go-v2/service/configservice v1.54.1/go.mod h1:AF+ERbemhpKFDlA+LTHNgol4p7uY1ovFe9fCB+RLALk= github.com/aws/aws-sdk-go-v2/service/connect v1.132.1 h1:eKxoFnZ+WuKSCvnrUSfUYsxniYA1PCKtu97+3fhhdP0= github.com/aws/aws-sdk-go-v2/service/connect v1.132.1/go.mod h1:rbvCsyvfb8gqfvmS25MbGtytizsOhSUcxLWt1rGCNj0= -github.com/aws/aws-sdk-go-v2/service/connectcases v1.27.0 h1:rYTCSq7znZysM9xDQdoyYKfpxxQWAx6w+bEcuP98c4k= -github.com/aws/aws-sdk-go-v2/service/connectcases v1.27.0/go.mod h1:Pu5BLAAK6Ro3d9MjZ2set5TxkKdNGtz6JTlmdcZs5gw= +github.com/aws/aws-sdk-go-v2/service/connectcases v1.27.1 h1:5aZmKdQjd1rSCDjEBKKt0EzQY5DRfHFCCTpNiw/0haw= +github.com/aws/aws-sdk-go-v2/service/connectcases v1.27.1/go.mod h1:Fv0vm+4lp7bGowaFlHsM6OWGRGsRmhL4R1UZU4F4Y68= github.com/aws/aws-sdk-go-v2/service/controltower v1.23.0 h1:wdhivZJf85vUbuYJ9kQedwzMLeVLhNrYoPli3wNEcq4= github.com/aws/aws-sdk-go-v2/service/controltower v1.23.0/go.mod h1:yvaXBtkaQQDHfe1/DmkFkRo87V6XeR7Ip7+Ij9op7IA= github.com/aws/aws-sdk-go-v2/service/costandusagereportservice v1.30.0 h1:cNNYcPYWvIkxddEv+PYhryXO6UVMMhSu4BpbtGqfUIY= From 826b2acfd76c5e28a8e5b89be26e042c7b5deeab Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 09:12:13 -0400 Subject: [PATCH 147/365] go get github.com/aws/aws-sdk-go-v2/service/controltower. --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index bd2344af5292..7fd43d1886c8 100644 --- a/go.mod +++ b/go.mod @@ -79,7 +79,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/configservice v1.54.1 github.com/aws/aws-sdk-go-v2/service/connect v1.132.1 github.com/aws/aws-sdk-go-v2/service/connectcases v1.27.1 - github.com/aws/aws-sdk-go-v2/service/controltower v1.23.0 + github.com/aws/aws-sdk-go-v2/service/controltower v1.23.1 github.com/aws/aws-sdk-go-v2/service/costandusagereportservice v1.30.0 github.com/aws/aws-sdk-go-v2/service/costexplorer v1.52.0 github.com/aws/aws-sdk-go-v2/service/costoptimizationhub v1.17.0 diff --git a/go.sum b/go.sum index af80b4a1e216..6aae84197e17 100644 --- a/go.sum +++ b/go.sum @@ -169,8 +169,8 @@ github.com/aws/aws-sdk-go-v2/service/connect v1.132.1 h1:eKxoFnZ+WuKSCvnrUSfUYsx github.com/aws/aws-sdk-go-v2/service/connect v1.132.1/go.mod h1:rbvCsyvfb8gqfvmS25MbGtytizsOhSUcxLWt1rGCNj0= github.com/aws/aws-sdk-go-v2/service/connectcases v1.27.1 h1:5aZmKdQjd1rSCDjEBKKt0EzQY5DRfHFCCTpNiw/0haw= github.com/aws/aws-sdk-go-v2/service/connectcases v1.27.1/go.mod h1:Fv0vm+4lp7bGowaFlHsM6OWGRGsRmhL4R1UZU4F4Y68= -github.com/aws/aws-sdk-go-v2/service/controltower v1.23.0 h1:wdhivZJf85vUbuYJ9kQedwzMLeVLhNrYoPli3wNEcq4= -github.com/aws/aws-sdk-go-v2/service/controltower v1.23.0/go.mod h1:yvaXBtkaQQDHfe1/DmkFkRo87V6XeR7Ip7+Ij9op7IA= +github.com/aws/aws-sdk-go-v2/service/controltower v1.23.1 h1:Y3vnotVgNjDLTajaTTH+XbDcmmB9jfQ+Qz/YN1dbONo= +github.com/aws/aws-sdk-go-v2/service/controltower v1.23.1/go.mod h1:nKfpvxTfSBs+V/OSWVlzYV5K7RL9J/P5ZvGNk+0/Mug= github.com/aws/aws-sdk-go-v2/service/costandusagereportservice v1.30.0 h1:cNNYcPYWvIkxddEv+PYhryXO6UVMMhSu4BpbtGqfUIY= github.com/aws/aws-sdk-go-v2/service/costandusagereportservice v1.30.0/go.mod h1:5DlbYM1qHEGBl61qTfk5fQwxkNakd8D6wNxO4MV0pms= github.com/aws/aws-sdk-go-v2/service/costexplorer v1.52.0 h1:Y9msp59ti10zQFEYjSCQW5Q468Cdr5X15voNS8nC5IE= From fd6bf03c08a0bc37f0640f16779884193db0ac7f Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 09:12:14 -0400 Subject: [PATCH 148/365] go get github.com/aws/aws-sdk-go-v2/service/costandusagereportservice. --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 7fd43d1886c8..f94761cf202a 100644 --- a/go.mod +++ b/go.mod @@ -80,7 +80,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/connect v1.132.1 github.com/aws/aws-sdk-go-v2/service/connectcases v1.27.1 github.com/aws/aws-sdk-go-v2/service/controltower v1.23.1 - github.com/aws/aws-sdk-go-v2/service/costandusagereportservice v1.30.0 + github.com/aws/aws-sdk-go-v2/service/costandusagereportservice v1.30.1 github.com/aws/aws-sdk-go-v2/service/costexplorer v1.52.0 github.com/aws/aws-sdk-go-v2/service/costoptimizationhub v1.17.0 github.com/aws/aws-sdk-go-v2/service/customerprofiles v1.48.0 diff --git a/go.sum b/go.sum index 6aae84197e17..fe4af4d235b7 100644 --- a/go.sum +++ b/go.sum @@ -171,8 +171,8 @@ github.com/aws/aws-sdk-go-v2/service/connectcases v1.27.1 h1:5aZmKdQjd1rSCDjEBKK github.com/aws/aws-sdk-go-v2/service/connectcases v1.27.1/go.mod h1:Fv0vm+4lp7bGowaFlHsM6OWGRGsRmhL4R1UZU4F4Y68= github.com/aws/aws-sdk-go-v2/service/controltower v1.23.1 h1:Y3vnotVgNjDLTajaTTH+XbDcmmB9jfQ+Qz/YN1dbONo= github.com/aws/aws-sdk-go-v2/service/controltower v1.23.1/go.mod h1:nKfpvxTfSBs+V/OSWVlzYV5K7RL9J/P5ZvGNk+0/Mug= -github.com/aws/aws-sdk-go-v2/service/costandusagereportservice v1.30.0 h1:cNNYcPYWvIkxddEv+PYhryXO6UVMMhSu4BpbtGqfUIY= -github.com/aws/aws-sdk-go-v2/service/costandusagereportservice v1.30.0/go.mod h1:5DlbYM1qHEGBl61qTfk5fQwxkNakd8D6wNxO4MV0pms= +github.com/aws/aws-sdk-go-v2/service/costandusagereportservice v1.30.1 h1:SYiS9JKkBdWl3sV6v2KMt82XKc+JVUwifpf6JMIyI4U= +github.com/aws/aws-sdk-go-v2/service/costandusagereportservice v1.30.1/go.mod h1:yElKdxGVSH05dS0kzR6AAiyp/+/c0tGk5DoPgffIl2A= github.com/aws/aws-sdk-go-v2/service/costexplorer v1.52.0 h1:Y9msp59ti10zQFEYjSCQW5Q468Cdr5X15voNS8nC5IE= github.com/aws/aws-sdk-go-v2/service/costexplorer v1.52.0/go.mod h1:uX3wxVjCWeWeJbvYpJUmVNuRi/D/DVhRrC6fk/3j+Fk= github.com/aws/aws-sdk-go-v2/service/costoptimizationhub v1.17.0 h1:xgaMYB76fi1qdr8nD7yPxZPCzrU6vFkVDeiF5OObjfw= From 095e5db2cd27e81c4e68e69cbb414f2cbeac0e91 Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 09:12:16 -0400 Subject: [PATCH 149/365] go get github.com/aws/aws-sdk-go-v2/service/costexplorer. --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index f94761cf202a..5aeadef52ab5 100644 --- a/go.mod +++ b/go.mod @@ -81,7 +81,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/connectcases v1.27.1 github.com/aws/aws-sdk-go-v2/service/controltower v1.23.1 github.com/aws/aws-sdk-go-v2/service/costandusagereportservice v1.30.1 - github.com/aws/aws-sdk-go-v2/service/costexplorer v1.52.0 + github.com/aws/aws-sdk-go-v2/service/costexplorer v1.52.1 github.com/aws/aws-sdk-go-v2/service/costoptimizationhub v1.17.0 github.com/aws/aws-sdk-go-v2/service/customerprofiles v1.48.0 github.com/aws/aws-sdk-go-v2/service/databasemigrationservice v1.54.0 diff --git a/go.sum b/go.sum index fe4af4d235b7..e4cec8348cf6 100644 --- a/go.sum +++ b/go.sum @@ -173,8 +173,8 @@ github.com/aws/aws-sdk-go-v2/service/controltower v1.23.1 h1:Y3vnotVgNjDLTajaTTH github.com/aws/aws-sdk-go-v2/service/controltower v1.23.1/go.mod h1:nKfpvxTfSBs+V/OSWVlzYV5K7RL9J/P5ZvGNk+0/Mug= github.com/aws/aws-sdk-go-v2/service/costandusagereportservice v1.30.1 h1:SYiS9JKkBdWl3sV6v2KMt82XKc+JVUwifpf6JMIyI4U= github.com/aws/aws-sdk-go-v2/service/costandusagereportservice v1.30.1/go.mod h1:yElKdxGVSH05dS0kzR6AAiyp/+/c0tGk5DoPgffIl2A= -github.com/aws/aws-sdk-go-v2/service/costexplorer v1.52.0 h1:Y9msp59ti10zQFEYjSCQW5Q468Cdr5X15voNS8nC5IE= -github.com/aws/aws-sdk-go-v2/service/costexplorer v1.52.0/go.mod h1:uX3wxVjCWeWeJbvYpJUmVNuRi/D/DVhRrC6fk/3j+Fk= +github.com/aws/aws-sdk-go-v2/service/costexplorer v1.52.1 h1:MRfsy+UosplTbrTui5cUVJ4era6XBjZv0lEGUgcG86Q= +github.com/aws/aws-sdk-go-v2/service/costexplorer v1.52.1/go.mod h1:XhV87ldg1xBh4WjKcc6aW3SFwzaIjNhuPtDEhZ5/gds= github.com/aws/aws-sdk-go-v2/service/costoptimizationhub v1.17.0 h1:xgaMYB76fi1qdr8nD7yPxZPCzrU6vFkVDeiF5OObjfw= github.com/aws/aws-sdk-go-v2/service/costoptimizationhub v1.17.0/go.mod h1:Zkj5s6IrMxTfUBTrOk88MoUe9I/Uc5dgqCaVznC3LeY= github.com/aws/aws-sdk-go-v2/service/customerprofiles v1.48.0 h1:ngC5gzvIPfu7XrLCBxy4ht2GOFIVfI67n5RqdrgHKyA= From 2df8380a2d90b043bb61eb676b6eef4cfcb12117 Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 09:12:17 -0400 Subject: [PATCH 150/365] go get github.com/aws/aws-sdk-go-v2/service/costoptimizationhub. --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 5aeadef52ab5..5a926c639b7a 100644 --- a/go.mod +++ b/go.mod @@ -82,7 +82,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/controltower v1.23.1 github.com/aws/aws-sdk-go-v2/service/costandusagereportservice v1.30.1 github.com/aws/aws-sdk-go-v2/service/costexplorer v1.52.1 - github.com/aws/aws-sdk-go-v2/service/costoptimizationhub v1.17.0 + github.com/aws/aws-sdk-go-v2/service/costoptimizationhub v1.17.1 github.com/aws/aws-sdk-go-v2/service/customerprofiles v1.48.0 github.com/aws/aws-sdk-go-v2/service/databasemigrationservice v1.54.0 github.com/aws/aws-sdk-go-v2/service/databrew v1.35.0 diff --git a/go.sum b/go.sum index e4cec8348cf6..eadd438cbfd8 100644 --- a/go.sum +++ b/go.sum @@ -175,8 +175,8 @@ github.com/aws/aws-sdk-go-v2/service/costandusagereportservice v1.30.1 h1:SYiS9J github.com/aws/aws-sdk-go-v2/service/costandusagereportservice v1.30.1/go.mod h1:yElKdxGVSH05dS0kzR6AAiyp/+/c0tGk5DoPgffIl2A= github.com/aws/aws-sdk-go-v2/service/costexplorer v1.52.1 h1:MRfsy+UosplTbrTui5cUVJ4era6XBjZv0lEGUgcG86Q= github.com/aws/aws-sdk-go-v2/service/costexplorer v1.52.1/go.mod h1:XhV87ldg1xBh4WjKcc6aW3SFwzaIjNhuPtDEhZ5/gds= -github.com/aws/aws-sdk-go-v2/service/costoptimizationhub v1.17.0 h1:xgaMYB76fi1qdr8nD7yPxZPCzrU6vFkVDeiF5OObjfw= -github.com/aws/aws-sdk-go-v2/service/costoptimizationhub v1.17.0/go.mod h1:Zkj5s6IrMxTfUBTrOk88MoUe9I/Uc5dgqCaVznC3LeY= +github.com/aws/aws-sdk-go-v2/service/costoptimizationhub v1.17.1 h1:wP6PryT7nTlNrnsBh5riZLJXM1zOjzcS0xCKvAqmRnM= +github.com/aws/aws-sdk-go-v2/service/costoptimizationhub v1.17.1/go.mod h1:ptisHEhEb179hVX6qvulR2ZQ2oRJU3BpmouFmM8SRDU= github.com/aws/aws-sdk-go-v2/service/customerprofiles v1.48.0 h1:ngC5gzvIPfu7XrLCBxy4ht2GOFIVfI67n5RqdrgHKyA= github.com/aws/aws-sdk-go-v2/service/customerprofiles v1.48.0/go.mod h1:5joem1uxn9t2b+xbhK9wpcqjum+/dnOhsnZ/HLl5yI0= github.com/aws/aws-sdk-go-v2/service/databasemigrationservice v1.54.0 h1:0nNQ1JHji21BjUeAx2gVLMscdvnKCxyQlt3aep38Tvk= From 0e81b5b558998983fa65b695fb6ec9227b2c59b7 Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 09:12:18 -0400 Subject: [PATCH 151/365] go get github.com/aws/aws-sdk-go-v2/service/customerprofiles. --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 5a926c639b7a..b1493c3bbf65 100644 --- a/go.mod +++ b/go.mod @@ -83,7 +83,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/costandusagereportservice v1.30.1 github.com/aws/aws-sdk-go-v2/service/costexplorer v1.52.1 github.com/aws/aws-sdk-go-v2/service/costoptimizationhub v1.17.1 - github.com/aws/aws-sdk-go-v2/service/customerprofiles v1.48.0 + github.com/aws/aws-sdk-go-v2/service/customerprofiles v1.48.1 github.com/aws/aws-sdk-go-v2/service/databasemigrationservice v1.54.0 github.com/aws/aws-sdk-go-v2/service/databrew v1.35.0 github.com/aws/aws-sdk-go-v2/service/dataexchange v1.36.0 diff --git a/go.sum b/go.sum index eadd438cbfd8..ffda3aac912a 100644 --- a/go.sum +++ b/go.sum @@ -177,8 +177,8 @@ github.com/aws/aws-sdk-go-v2/service/costexplorer v1.52.1 h1:MRfsy+UosplTbrTui5c github.com/aws/aws-sdk-go-v2/service/costexplorer v1.52.1/go.mod h1:XhV87ldg1xBh4WjKcc6aW3SFwzaIjNhuPtDEhZ5/gds= github.com/aws/aws-sdk-go-v2/service/costoptimizationhub v1.17.1 h1:wP6PryT7nTlNrnsBh5riZLJXM1zOjzcS0xCKvAqmRnM= github.com/aws/aws-sdk-go-v2/service/costoptimizationhub v1.17.1/go.mod h1:ptisHEhEb179hVX6qvulR2ZQ2oRJU3BpmouFmM8SRDU= -github.com/aws/aws-sdk-go-v2/service/customerprofiles v1.48.0 h1:ngC5gzvIPfu7XrLCBxy4ht2GOFIVfI67n5RqdrgHKyA= -github.com/aws/aws-sdk-go-v2/service/customerprofiles v1.48.0/go.mod h1:5joem1uxn9t2b+xbhK9wpcqjum+/dnOhsnZ/HLl5yI0= +github.com/aws/aws-sdk-go-v2/service/customerprofiles v1.48.1 h1:3vub+nmiLA8HX92CinuqtoTrcW//t+sAFFcOBioT2BA= +github.com/aws/aws-sdk-go-v2/service/customerprofiles v1.48.1/go.mod h1:E96OYyTW0QrMri8Xc3RYV7BrJhd7SUrqsGL5YYCsneU= github.com/aws/aws-sdk-go-v2/service/databasemigrationservice v1.54.0 h1:0nNQ1JHji21BjUeAx2gVLMscdvnKCxyQlt3aep38Tvk= github.com/aws/aws-sdk-go-v2/service/databasemigrationservice v1.54.0/go.mod h1:0LUvqqAUeFYdAhGt97gq8N2CrI+pvmfC1jh/LHclGKI= github.com/aws/aws-sdk-go-v2/service/databrew v1.35.0 h1:o0pE9OL2ovHeA17PU2Cay/LV3znS353xcNGrryzCvh8= From 98ae7e6fd64ca1c7f8a842fbfcc44c5085336721 Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 09:12:19 -0400 Subject: [PATCH 152/365] go get github.com/aws/aws-sdk-go-v2/service/databasemigrationservice. --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index b1493c3bbf65..a7822188c468 100644 --- a/go.mod +++ b/go.mod @@ -84,7 +84,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/costexplorer v1.52.1 github.com/aws/aws-sdk-go-v2/service/costoptimizationhub v1.17.1 github.com/aws/aws-sdk-go-v2/service/customerprofiles v1.48.1 - github.com/aws/aws-sdk-go-v2/service/databasemigrationservice v1.54.0 + github.com/aws/aws-sdk-go-v2/service/databasemigrationservice v1.54.1 github.com/aws/aws-sdk-go-v2/service/databrew v1.35.0 github.com/aws/aws-sdk-go-v2/service/dataexchange v1.36.0 github.com/aws/aws-sdk-go-v2/service/datapipeline v1.27.0 diff --git a/go.sum b/go.sum index ffda3aac912a..1b9eb66d3bb5 100644 --- a/go.sum +++ b/go.sum @@ -179,8 +179,8 @@ github.com/aws/aws-sdk-go-v2/service/costoptimizationhub v1.17.1 h1:wP6PryT7nTlN github.com/aws/aws-sdk-go-v2/service/costoptimizationhub v1.17.1/go.mod h1:ptisHEhEb179hVX6qvulR2ZQ2oRJU3BpmouFmM8SRDU= github.com/aws/aws-sdk-go-v2/service/customerprofiles v1.48.1 h1:3vub+nmiLA8HX92CinuqtoTrcW//t+sAFFcOBioT2BA= github.com/aws/aws-sdk-go-v2/service/customerprofiles v1.48.1/go.mod h1:E96OYyTW0QrMri8Xc3RYV7BrJhd7SUrqsGL5YYCsneU= -github.com/aws/aws-sdk-go-v2/service/databasemigrationservice v1.54.0 h1:0nNQ1JHji21BjUeAx2gVLMscdvnKCxyQlt3aep38Tvk= -github.com/aws/aws-sdk-go-v2/service/databasemigrationservice v1.54.0/go.mod h1:0LUvqqAUeFYdAhGt97gq8N2CrI+pvmfC1jh/LHclGKI= +github.com/aws/aws-sdk-go-v2/service/databasemigrationservice v1.54.1 h1:tHAEfv1QzqRN0I46Bxc7vNav9B54dDPv8ZyJei+TtUU= +github.com/aws/aws-sdk-go-v2/service/databasemigrationservice v1.54.1/go.mod h1:l/63jy0JYcuPgsIn0sCarneGQZT60Z3VJZCTHg9joJQ= github.com/aws/aws-sdk-go-v2/service/databrew v1.35.0 h1:o0pE9OL2ovHeA17PU2Cay/LV3znS353xcNGrryzCvh8= github.com/aws/aws-sdk-go-v2/service/databrew v1.35.0/go.mod h1:yEv07fXbcl8Z+QtREXBZv3dHl/IKHYv+h7aSrzbzt0E= github.com/aws/aws-sdk-go-v2/service/dataexchange v1.36.0 h1:Zpw1y/7gC6oYoDUNKECEbpPcXyzn0/n0iC/h0WX/8LY= From 64e801d143978f58cfabcbbd900babad93c85d89 Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 09:12:20 -0400 Subject: [PATCH 153/365] go get github.com/aws/aws-sdk-go-v2/service/databrew. --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index a7822188c468..965e7db6d843 100644 --- a/go.mod +++ b/go.mod @@ -85,7 +85,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/costoptimizationhub v1.17.1 github.com/aws/aws-sdk-go-v2/service/customerprofiles v1.48.1 github.com/aws/aws-sdk-go-v2/service/databasemigrationservice v1.54.1 - github.com/aws/aws-sdk-go-v2/service/databrew v1.35.0 + github.com/aws/aws-sdk-go-v2/service/databrew v1.35.1 github.com/aws/aws-sdk-go-v2/service/dataexchange v1.36.0 github.com/aws/aws-sdk-go-v2/service/datapipeline v1.27.0 github.com/aws/aws-sdk-go-v2/service/datasync v1.51.0 diff --git a/go.sum b/go.sum index 1b9eb66d3bb5..8191fe859c05 100644 --- a/go.sum +++ b/go.sum @@ -181,8 +181,8 @@ github.com/aws/aws-sdk-go-v2/service/customerprofiles v1.48.1 h1:3vub+nmiLA8HX92 github.com/aws/aws-sdk-go-v2/service/customerprofiles v1.48.1/go.mod h1:E96OYyTW0QrMri8Xc3RYV7BrJhd7SUrqsGL5YYCsneU= github.com/aws/aws-sdk-go-v2/service/databasemigrationservice v1.54.1 h1:tHAEfv1QzqRN0I46Bxc7vNav9B54dDPv8ZyJei+TtUU= github.com/aws/aws-sdk-go-v2/service/databasemigrationservice v1.54.1/go.mod h1:l/63jy0JYcuPgsIn0sCarneGQZT60Z3VJZCTHg9joJQ= -github.com/aws/aws-sdk-go-v2/service/databrew v1.35.0 h1:o0pE9OL2ovHeA17PU2Cay/LV3znS353xcNGrryzCvh8= -github.com/aws/aws-sdk-go-v2/service/databrew v1.35.0/go.mod h1:yEv07fXbcl8Z+QtREXBZv3dHl/IKHYv+h7aSrzbzt0E= +github.com/aws/aws-sdk-go-v2/service/databrew v1.35.1 h1:WyjDtS3+ZYk6PYc5f+r92dUbl8rKXafSALk4gbSc9sE= +github.com/aws/aws-sdk-go-v2/service/databrew v1.35.1/go.mod h1:ZU262AoIUejl0Sjc4iZcOa3V4tGM9eJGmFl2kVuqXmE= github.com/aws/aws-sdk-go-v2/service/dataexchange v1.36.0 h1:Zpw1y/7gC6oYoDUNKECEbpPcXyzn0/n0iC/h0WX/8LY= github.com/aws/aws-sdk-go-v2/service/dataexchange v1.36.0/go.mod h1:yRM0L2SFRZKKliKwSsIs76VYcrHTpB9T8PgOE7e98Us= github.com/aws/aws-sdk-go-v2/service/datapipeline v1.27.0 h1:kw6BTd1HoU8zZJFNzQeGnQhYQ8Vtv5g0ywbpXTcPbBk= From 57869f3826d5e169e28a3b550f621810c0591775 Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 09:12:21 -0400 Subject: [PATCH 154/365] go get github.com/aws/aws-sdk-go-v2/service/dataexchange. --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 965e7db6d843..83263c66e5af 100644 --- a/go.mod +++ b/go.mod @@ -86,7 +86,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/customerprofiles v1.48.1 github.com/aws/aws-sdk-go-v2/service/databasemigrationservice v1.54.1 github.com/aws/aws-sdk-go-v2/service/databrew v1.35.1 - github.com/aws/aws-sdk-go-v2/service/dataexchange v1.36.0 + github.com/aws/aws-sdk-go-v2/service/dataexchange v1.36.1 github.com/aws/aws-sdk-go-v2/service/datapipeline v1.27.0 github.com/aws/aws-sdk-go-v2/service/datasync v1.51.0 github.com/aws/aws-sdk-go-v2/service/datazone v1.34.0 diff --git a/go.sum b/go.sum index 8191fe859c05..7cd512df7089 100644 --- a/go.sum +++ b/go.sum @@ -183,8 +183,8 @@ github.com/aws/aws-sdk-go-v2/service/databasemigrationservice v1.54.1 h1:tHAEfv1 github.com/aws/aws-sdk-go-v2/service/databasemigrationservice v1.54.1/go.mod h1:l/63jy0JYcuPgsIn0sCarneGQZT60Z3VJZCTHg9joJQ= github.com/aws/aws-sdk-go-v2/service/databrew v1.35.1 h1:WyjDtS3+ZYk6PYc5f+r92dUbl8rKXafSALk4gbSc9sE= github.com/aws/aws-sdk-go-v2/service/databrew v1.35.1/go.mod h1:ZU262AoIUejl0Sjc4iZcOa3V4tGM9eJGmFl2kVuqXmE= -github.com/aws/aws-sdk-go-v2/service/dataexchange v1.36.0 h1:Zpw1y/7gC6oYoDUNKECEbpPcXyzn0/n0iC/h0WX/8LY= -github.com/aws/aws-sdk-go-v2/service/dataexchange v1.36.0/go.mod h1:yRM0L2SFRZKKliKwSsIs76VYcrHTpB9T8PgOE7e98Us= +github.com/aws/aws-sdk-go-v2/service/dataexchange v1.36.1 h1:vhAcPY29FzRoyJEeFZny/cW50gS24Gt94VLgEk00THQ= +github.com/aws/aws-sdk-go-v2/service/dataexchange v1.36.1/go.mod h1:+3KxWI5wJ70b7eCiUOQQArXw1ba9fRWjwrtJ++SlAcE= github.com/aws/aws-sdk-go-v2/service/datapipeline v1.27.0 h1:kw6BTd1HoU8zZJFNzQeGnQhYQ8Vtv5g0ywbpXTcPbBk= github.com/aws/aws-sdk-go-v2/service/datapipeline v1.27.0/go.mod h1:8cdecmdG5JQZUbNcwY2xY9aRUt5sa/nf6FU+trUG2us= github.com/aws/aws-sdk-go-v2/service/datasync v1.51.0 h1:7KtgiOtKxp03XSpQPLizlqA5Plp1T8uv4F8YRdxwNgo= From a4d864f87f750bc37873c5d4717b827f008d28ae Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 09:12:22 -0400 Subject: [PATCH 155/365] go get github.com/aws/aws-sdk-go-v2/service/datapipeline. --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 83263c66e5af..5ac1135f4c94 100644 --- a/go.mod +++ b/go.mod @@ -87,7 +87,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/databasemigrationservice v1.54.1 github.com/aws/aws-sdk-go-v2/service/databrew v1.35.1 github.com/aws/aws-sdk-go-v2/service/dataexchange v1.36.1 - github.com/aws/aws-sdk-go-v2/service/datapipeline v1.27.0 + github.com/aws/aws-sdk-go-v2/service/datapipeline v1.27.1 github.com/aws/aws-sdk-go-v2/service/datasync v1.51.0 github.com/aws/aws-sdk-go-v2/service/datazone v1.34.0 github.com/aws/aws-sdk-go-v2/service/dax v1.25.0 diff --git a/go.sum b/go.sum index 7cd512df7089..38d715098760 100644 --- a/go.sum +++ b/go.sum @@ -185,8 +185,8 @@ github.com/aws/aws-sdk-go-v2/service/databrew v1.35.1 h1:WyjDtS3+ZYk6PYc5f+r92dU github.com/aws/aws-sdk-go-v2/service/databrew v1.35.1/go.mod h1:ZU262AoIUejl0Sjc4iZcOa3V4tGM9eJGmFl2kVuqXmE= github.com/aws/aws-sdk-go-v2/service/dataexchange v1.36.1 h1:vhAcPY29FzRoyJEeFZny/cW50gS24Gt94VLgEk00THQ= github.com/aws/aws-sdk-go-v2/service/dataexchange v1.36.1/go.mod h1:+3KxWI5wJ70b7eCiUOQQArXw1ba9fRWjwrtJ++SlAcE= -github.com/aws/aws-sdk-go-v2/service/datapipeline v1.27.0 h1:kw6BTd1HoU8zZJFNzQeGnQhYQ8Vtv5g0ywbpXTcPbBk= -github.com/aws/aws-sdk-go-v2/service/datapipeline v1.27.0/go.mod h1:8cdecmdG5JQZUbNcwY2xY9aRUt5sa/nf6FU+trUG2us= +github.com/aws/aws-sdk-go-v2/service/datapipeline v1.27.1 h1:yDWeBJrxYOeqZalv6rYH8pKG+yHHcT3IlagoVvWgGaU= +github.com/aws/aws-sdk-go-v2/service/datapipeline v1.27.1/go.mod h1:XOb2itVVqEMQUUsCisw4B2ViGuF8bgnxTJDEUfeQmfA= github.com/aws/aws-sdk-go-v2/service/datasync v1.51.0 h1:7KtgiOtKxp03XSpQPLizlqA5Plp1T8uv4F8YRdxwNgo= github.com/aws/aws-sdk-go-v2/service/datasync v1.51.0/go.mod h1:soOF5lCCxcbxyVQlv+z5AZjrocAZl/vGwxXKgQ5YXtc= github.com/aws/aws-sdk-go-v2/service/datazone v1.34.0 h1:XxehCzm+BXTx/ejG/PjbrPNZtFxAQqc1roGscKLwc94= From cd9f670a1f12afa608166f83fdc7dc2feb493792 Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 09:12:23 -0400 Subject: [PATCH 156/365] go get github.com/aws/aws-sdk-go-v2/service/datasync. --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 5ac1135f4c94..c2d9abf3a8c8 100644 --- a/go.mod +++ b/go.mod @@ -88,7 +88,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/databrew v1.35.1 github.com/aws/aws-sdk-go-v2/service/dataexchange v1.36.1 github.com/aws/aws-sdk-go-v2/service/datapipeline v1.27.1 - github.com/aws/aws-sdk-go-v2/service/datasync v1.51.0 + github.com/aws/aws-sdk-go-v2/service/datasync v1.51.1 github.com/aws/aws-sdk-go-v2/service/datazone v1.34.0 github.com/aws/aws-sdk-go-v2/service/dax v1.25.0 github.com/aws/aws-sdk-go-v2/service/detective v1.34.0 diff --git a/go.sum b/go.sum index 38d715098760..b2c62d17370f 100644 --- a/go.sum +++ b/go.sum @@ -187,8 +187,8 @@ github.com/aws/aws-sdk-go-v2/service/dataexchange v1.36.1 h1:vhAcPY29FzRoyJEeFZn github.com/aws/aws-sdk-go-v2/service/dataexchange v1.36.1/go.mod h1:+3KxWI5wJ70b7eCiUOQQArXw1ba9fRWjwrtJ++SlAcE= github.com/aws/aws-sdk-go-v2/service/datapipeline v1.27.1 h1:yDWeBJrxYOeqZalv6rYH8pKG+yHHcT3IlagoVvWgGaU= github.com/aws/aws-sdk-go-v2/service/datapipeline v1.27.1/go.mod h1:XOb2itVVqEMQUUsCisw4B2ViGuF8bgnxTJDEUfeQmfA= -github.com/aws/aws-sdk-go-v2/service/datasync v1.51.0 h1:7KtgiOtKxp03XSpQPLizlqA5Plp1T8uv4F8YRdxwNgo= -github.com/aws/aws-sdk-go-v2/service/datasync v1.51.0/go.mod h1:soOF5lCCxcbxyVQlv+z5AZjrocAZl/vGwxXKgQ5YXtc= +github.com/aws/aws-sdk-go-v2/service/datasync v1.51.1 h1:OmB6TLQAlHe674BdA6iYos3twoaqlRi3O3D4ugY48PA= +github.com/aws/aws-sdk-go-v2/service/datasync v1.51.1/go.mod h1:sYdcLC2TL27hMrCF22BodOKNHw5qp9p+3lMR8MOhBT0= github.com/aws/aws-sdk-go-v2/service/datazone v1.34.0 h1:XxehCzm+BXTx/ejG/PjbrPNZtFxAQqc1roGscKLwc94= github.com/aws/aws-sdk-go-v2/service/datazone v1.34.0/go.mod h1:XFfZiG5Upg+fr8VTs5oA0OsLfy+ni9NyrQaZhGjM87E= github.com/aws/aws-sdk-go-v2/service/dax v1.25.0 h1:4v21F8HNAyOQ1qcoma3+oxkVxUPxevBAc6Wu1UtwQ0U= From 3b33edf926f3edd69350cbf70e2666f3c79153f2 Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 09:12:25 -0400 Subject: [PATCH 157/365] go get github.com/aws/aws-sdk-go-v2/service/datazone. --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index c2d9abf3a8c8..1058c4fc9d21 100644 --- a/go.mod +++ b/go.mod @@ -89,7 +89,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/dataexchange v1.36.1 github.com/aws/aws-sdk-go-v2/service/datapipeline v1.27.1 github.com/aws/aws-sdk-go-v2/service/datasync v1.51.1 - github.com/aws/aws-sdk-go-v2/service/datazone v1.34.0 + github.com/aws/aws-sdk-go-v2/service/datazone v1.34.1 github.com/aws/aws-sdk-go-v2/service/dax v1.25.0 github.com/aws/aws-sdk-go-v2/service/detective v1.34.0 github.com/aws/aws-sdk-go-v2/service/devicefarm v1.32.0 diff --git a/go.sum b/go.sum index b2c62d17370f..92c4da7d2604 100644 --- a/go.sum +++ b/go.sum @@ -189,8 +189,8 @@ github.com/aws/aws-sdk-go-v2/service/datapipeline v1.27.1 h1:yDWeBJrxYOeqZalv6rY github.com/aws/aws-sdk-go-v2/service/datapipeline v1.27.1/go.mod h1:XOb2itVVqEMQUUsCisw4B2ViGuF8bgnxTJDEUfeQmfA= github.com/aws/aws-sdk-go-v2/service/datasync v1.51.1 h1:OmB6TLQAlHe674BdA6iYos3twoaqlRi3O3D4ugY48PA= github.com/aws/aws-sdk-go-v2/service/datasync v1.51.1/go.mod h1:sYdcLC2TL27hMrCF22BodOKNHw5qp9p+3lMR8MOhBT0= -github.com/aws/aws-sdk-go-v2/service/datazone v1.34.0 h1:XxehCzm+BXTx/ejG/PjbrPNZtFxAQqc1roGscKLwc94= -github.com/aws/aws-sdk-go-v2/service/datazone v1.34.0/go.mod h1:XFfZiG5Upg+fr8VTs5oA0OsLfy+ni9NyrQaZhGjM87E= +github.com/aws/aws-sdk-go-v2/service/datazone v1.34.1 h1:7Vc7AKcOiWiUnEkuKIJym8mx0ZVAElRxek8nO/Fu1JQ= +github.com/aws/aws-sdk-go-v2/service/datazone v1.34.1/go.mod h1:7cSev4IbgiJPWqraB12r4ieb73nrGFfOCvDwuGkTdJ8= github.com/aws/aws-sdk-go-v2/service/dax v1.25.0 h1:4v21F8HNAyOQ1qcoma3+oxkVxUPxevBAc6Wu1UtwQ0U= github.com/aws/aws-sdk-go-v2/service/dax v1.25.0/go.mod h1:zE3wAke1uqedRlOc02HUyRVjoD/nHIRgrbdMzmbugo4= github.com/aws/aws-sdk-go-v2/service/detective v1.34.0 h1:DT4ghZZR33Mra1LjVQbdVsJaldZE79OPWdffNi09j3k= From b912562896c52202f2c462f2aef0174449ba2c2c Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 09:12:25 -0400 Subject: [PATCH 158/365] go get github.com/aws/aws-sdk-go-v2/service/dax. --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 1058c4fc9d21..7731c8e187f6 100644 --- a/go.mod +++ b/go.mod @@ -90,7 +90,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/datapipeline v1.27.1 github.com/aws/aws-sdk-go-v2/service/datasync v1.51.1 github.com/aws/aws-sdk-go-v2/service/datazone v1.34.1 - github.com/aws/aws-sdk-go-v2/service/dax v1.25.0 + github.com/aws/aws-sdk-go-v2/service/dax v1.25.1 github.com/aws/aws-sdk-go-v2/service/detective v1.34.0 github.com/aws/aws-sdk-go-v2/service/devicefarm v1.32.0 github.com/aws/aws-sdk-go-v2/service/devopsguru v1.36.0 diff --git a/go.sum b/go.sum index 92c4da7d2604..65638ba41403 100644 --- a/go.sum +++ b/go.sum @@ -191,8 +191,8 @@ github.com/aws/aws-sdk-go-v2/service/datasync v1.51.1 h1:OmB6TLQAlHe674BdA6iYos3 github.com/aws/aws-sdk-go-v2/service/datasync v1.51.1/go.mod h1:sYdcLC2TL27hMrCF22BodOKNHw5qp9p+3lMR8MOhBT0= github.com/aws/aws-sdk-go-v2/service/datazone v1.34.1 h1:7Vc7AKcOiWiUnEkuKIJym8mx0ZVAElRxek8nO/Fu1JQ= github.com/aws/aws-sdk-go-v2/service/datazone v1.34.1/go.mod h1:7cSev4IbgiJPWqraB12r4ieb73nrGFfOCvDwuGkTdJ8= -github.com/aws/aws-sdk-go-v2/service/dax v1.25.0 h1:4v21F8HNAyOQ1qcoma3+oxkVxUPxevBAc6Wu1UtwQ0U= -github.com/aws/aws-sdk-go-v2/service/dax v1.25.0/go.mod h1:zE3wAke1uqedRlOc02HUyRVjoD/nHIRgrbdMzmbugo4= +github.com/aws/aws-sdk-go-v2/service/dax v1.25.1 h1:r3jbJgyI9lsSbQI8IMFEMmawIzEaD97nk54Xe/Voq0Q= +github.com/aws/aws-sdk-go-v2/service/dax v1.25.1/go.mod h1:PIN6XFvWGPlyg8Mb/P3OEBq4Qh7Ue1CGXNen/kpGi0U= github.com/aws/aws-sdk-go-v2/service/detective v1.34.0 h1:DT4ghZZR33Mra1LjVQbdVsJaldZE79OPWdffNi09j3k= github.com/aws/aws-sdk-go-v2/service/detective v1.34.0/go.mod h1:kYvcZSnvieOVzGsCaXlcDb3XKLX4gtuymtMdYLijuNY= github.com/aws/aws-sdk-go-v2/service/devicefarm v1.32.0 h1:ri7QPDj9pXyJ71yuW3mRSpdzZosYCkjRSHYptcjQ/4Q= From 891306366f4f6eb588df15655e6f87ac0879d8da Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 09:12:27 -0400 Subject: [PATCH 159/365] go get github.com/aws/aws-sdk-go-v2/service/devicefarm. --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 7731c8e187f6..6693ed69127a 100644 --- a/go.mod +++ b/go.mod @@ -92,7 +92,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/datazone v1.34.1 github.com/aws/aws-sdk-go-v2/service/dax v1.25.1 github.com/aws/aws-sdk-go-v2/service/detective v1.34.0 - github.com/aws/aws-sdk-go-v2/service/devicefarm v1.32.0 + github.com/aws/aws-sdk-go-v2/service/devicefarm v1.32.1 github.com/aws/aws-sdk-go-v2/service/devopsguru v1.36.0 github.com/aws/aws-sdk-go-v2/service/directconnect v1.33.0 github.com/aws/aws-sdk-go-v2/service/directoryservice v1.32.0 diff --git a/go.sum b/go.sum index 65638ba41403..51b8f4dc8721 100644 --- a/go.sum +++ b/go.sum @@ -195,8 +195,8 @@ github.com/aws/aws-sdk-go-v2/service/dax v1.25.1 h1:r3jbJgyI9lsSbQI8IMFEMmawIzEa github.com/aws/aws-sdk-go-v2/service/dax v1.25.1/go.mod h1:PIN6XFvWGPlyg8Mb/P3OEBq4Qh7Ue1CGXNen/kpGi0U= github.com/aws/aws-sdk-go-v2/service/detective v1.34.0 h1:DT4ghZZR33Mra1LjVQbdVsJaldZE79OPWdffNi09j3k= github.com/aws/aws-sdk-go-v2/service/detective v1.34.0/go.mod h1:kYvcZSnvieOVzGsCaXlcDb3XKLX4gtuymtMdYLijuNY= -github.com/aws/aws-sdk-go-v2/service/devicefarm v1.32.0 h1:ri7QPDj9pXyJ71yuW3mRSpdzZosYCkjRSHYptcjQ/4Q= -github.com/aws/aws-sdk-go-v2/service/devicefarm v1.32.0/go.mod h1:JgKXSBqZgT7b6n0D+C8OQC0Gly2IExfamcJplUdPiYg= +github.com/aws/aws-sdk-go-v2/service/devicefarm v1.32.1 h1:ReB2/CPevDweGjecwp8ya3vJsmhH6fziyhuYXbW7l8s= +github.com/aws/aws-sdk-go-v2/service/devicefarm v1.32.1/go.mod h1:yiyj6Af9/jK0/N3KwTsNf8HGEMDMzwWuKNeNCv+xq0g= github.com/aws/aws-sdk-go-v2/service/devopsguru v1.36.0 h1:G+x9z1ysBSPtmcVXr36YfoQEFYwHtt3ox20QV88Vv2E= github.com/aws/aws-sdk-go-v2/service/devopsguru v1.36.0/go.mod h1:kDuh3At3j4ACnKh9PqaGD1rbJIh8zOIWjA8lLhDZZio= github.com/aws/aws-sdk-go-v2/service/directconnect v1.33.0 h1:kEJqpW57eydwCb9z27Lf512CWu1/vI4QGnvzUTNy2R4= From df4055942d202d6cd7a9e75fffda8646ab71fa23 Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 09:12:28 -0400 Subject: [PATCH 160/365] go get github.com/aws/aws-sdk-go-v2/service/devopsguru. --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 6693ed69127a..3321bcba107b 100644 --- a/go.mod +++ b/go.mod @@ -93,7 +93,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/dax v1.25.1 github.com/aws/aws-sdk-go-v2/service/detective v1.34.0 github.com/aws/aws-sdk-go-v2/service/devicefarm v1.32.1 - github.com/aws/aws-sdk-go-v2/service/devopsguru v1.36.0 + github.com/aws/aws-sdk-go-v2/service/devopsguru v1.36.1 github.com/aws/aws-sdk-go-v2/service/directconnect v1.33.0 github.com/aws/aws-sdk-go-v2/service/directoryservice v1.32.0 github.com/aws/aws-sdk-go-v2/service/dlm v1.31.0 diff --git a/go.sum b/go.sum index 51b8f4dc8721..aaeedfbf59d3 100644 --- a/go.sum +++ b/go.sum @@ -197,8 +197,8 @@ github.com/aws/aws-sdk-go-v2/service/detective v1.34.0 h1:DT4ghZZR33Mra1LjVQbdVs github.com/aws/aws-sdk-go-v2/service/detective v1.34.0/go.mod h1:kYvcZSnvieOVzGsCaXlcDb3XKLX4gtuymtMdYLijuNY= github.com/aws/aws-sdk-go-v2/service/devicefarm v1.32.1 h1:ReB2/CPevDweGjecwp8ya3vJsmhH6fziyhuYXbW7l8s= github.com/aws/aws-sdk-go-v2/service/devicefarm v1.32.1/go.mod h1:yiyj6Af9/jK0/N3KwTsNf8HGEMDMzwWuKNeNCv+xq0g= -github.com/aws/aws-sdk-go-v2/service/devopsguru v1.36.0 h1:G+x9z1ysBSPtmcVXr36YfoQEFYwHtt3ox20QV88Vv2E= -github.com/aws/aws-sdk-go-v2/service/devopsguru v1.36.0/go.mod h1:kDuh3At3j4ACnKh9PqaGD1rbJIh8zOIWjA8lLhDZZio= +github.com/aws/aws-sdk-go-v2/service/devopsguru v1.36.1 h1:cvXl9NB4eCIcI2OJoGGUP1UTe3lgMwECXu6rKX4/fxA= +github.com/aws/aws-sdk-go-v2/service/devopsguru v1.36.1/go.mod h1:AGvxtUnglcKvdNDclLBhfO/ksr7cPXlcXYcErasXHM8= github.com/aws/aws-sdk-go-v2/service/directconnect v1.33.0 h1:kEJqpW57eydwCb9z27Lf512CWu1/vI4QGnvzUTNy2R4= github.com/aws/aws-sdk-go-v2/service/directconnect v1.33.0/go.mod h1:FfJr4vCV+Z+JFqrBjWnrC393YqgzA1iH55RdkgkC7J8= github.com/aws/aws-sdk-go-v2/service/directoryservice v1.32.0 h1:LI5MVkt2VAp1FklY6oXEArWbbutkOrObjE9pWiIPg6w= From 4cc9fe8b39860bdf24109ad243ffda7da8a1e2b4 Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 09:12:30 -0400 Subject: [PATCH 161/365] go get github.com/aws/aws-sdk-go-v2/service/directconnect. --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 3321bcba107b..fb84f5a8afe1 100644 --- a/go.mod +++ b/go.mod @@ -94,7 +94,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/detective v1.34.0 github.com/aws/aws-sdk-go-v2/service/devicefarm v1.32.1 github.com/aws/aws-sdk-go-v2/service/devopsguru v1.36.1 - github.com/aws/aws-sdk-go-v2/service/directconnect v1.33.0 + github.com/aws/aws-sdk-go-v2/service/directconnect v1.33.1 github.com/aws/aws-sdk-go-v2/service/directoryservice v1.32.0 github.com/aws/aws-sdk-go-v2/service/dlm v1.31.0 github.com/aws/aws-sdk-go-v2/service/docdb v1.42.0 diff --git a/go.sum b/go.sum index aaeedfbf59d3..beb518a5f716 100644 --- a/go.sum +++ b/go.sum @@ -199,8 +199,8 @@ github.com/aws/aws-sdk-go-v2/service/devicefarm v1.32.1 h1:ReB2/CPevDweGjecwp8ya github.com/aws/aws-sdk-go-v2/service/devicefarm v1.32.1/go.mod h1:yiyj6Af9/jK0/N3KwTsNf8HGEMDMzwWuKNeNCv+xq0g= github.com/aws/aws-sdk-go-v2/service/devopsguru v1.36.1 h1:cvXl9NB4eCIcI2OJoGGUP1UTe3lgMwECXu6rKX4/fxA= github.com/aws/aws-sdk-go-v2/service/devopsguru v1.36.1/go.mod h1:AGvxtUnglcKvdNDclLBhfO/ksr7cPXlcXYcErasXHM8= -github.com/aws/aws-sdk-go-v2/service/directconnect v1.33.0 h1:kEJqpW57eydwCb9z27Lf512CWu1/vI4QGnvzUTNy2R4= -github.com/aws/aws-sdk-go-v2/service/directconnect v1.33.0/go.mod h1:FfJr4vCV+Z+JFqrBjWnrC393YqgzA1iH55RdkgkC7J8= +github.com/aws/aws-sdk-go-v2/service/directconnect v1.33.1 h1:ur6teJsonXZ3DQ4HY4F68b5rEvRVxpm7WYaZTTZiYeY= +github.com/aws/aws-sdk-go-v2/service/directconnect v1.33.1/go.mod h1:Zz+wZAdmA+3xJ2/4HFfkDJUqCri4i4wJ51RC08CS39k= github.com/aws/aws-sdk-go-v2/service/directoryservice v1.32.0 h1:LI5MVkt2VAp1FklY6oXEArWbbutkOrObjE9pWiIPg6w= github.com/aws/aws-sdk-go-v2/service/directoryservice v1.32.0/go.mod h1:HsulHFWNWvVt5ywMhr6zcpJvRWBX92GkMK6akXzTTz0= github.com/aws/aws-sdk-go-v2/service/dlm v1.31.0 h1:3kysMjPGvngicdxm8mCiaLHv56epYJIuXfyUg4gP8bo= From 33b03e51c6a29f7ed92c36da1a5601c1b450ec3f Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 09:12:31 -0400 Subject: [PATCH 162/365] go get github.com/aws/aws-sdk-go-v2/service/directoryservice. --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index fb84f5a8afe1..0a896bef4036 100644 --- a/go.mod +++ b/go.mod @@ -95,7 +95,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/devicefarm v1.32.1 github.com/aws/aws-sdk-go-v2/service/devopsguru v1.36.1 github.com/aws/aws-sdk-go-v2/service/directconnect v1.33.1 - github.com/aws/aws-sdk-go-v2/service/directoryservice v1.32.0 + github.com/aws/aws-sdk-go-v2/service/directoryservice v1.33.0 github.com/aws/aws-sdk-go-v2/service/dlm v1.31.0 github.com/aws/aws-sdk-go-v2/service/docdb v1.42.0 github.com/aws/aws-sdk-go-v2/service/docdbelastic v1.16.0 diff --git a/go.sum b/go.sum index beb518a5f716..70e9b13d0ddc 100644 --- a/go.sum +++ b/go.sum @@ -201,8 +201,8 @@ github.com/aws/aws-sdk-go-v2/service/devopsguru v1.36.1 h1:cvXl9NB4eCIcI2OJoGGUP github.com/aws/aws-sdk-go-v2/service/devopsguru v1.36.1/go.mod h1:AGvxtUnglcKvdNDclLBhfO/ksr7cPXlcXYcErasXHM8= github.com/aws/aws-sdk-go-v2/service/directconnect v1.33.1 h1:ur6teJsonXZ3DQ4HY4F68b5rEvRVxpm7WYaZTTZiYeY= github.com/aws/aws-sdk-go-v2/service/directconnect v1.33.1/go.mod h1:Zz+wZAdmA+3xJ2/4HFfkDJUqCri4i4wJ51RC08CS39k= -github.com/aws/aws-sdk-go-v2/service/directoryservice v1.32.0 h1:LI5MVkt2VAp1FklY6oXEArWbbutkOrObjE9pWiIPg6w= -github.com/aws/aws-sdk-go-v2/service/directoryservice v1.32.0/go.mod h1:HsulHFWNWvVt5ywMhr6zcpJvRWBX92GkMK6akXzTTz0= +github.com/aws/aws-sdk-go-v2/service/directoryservice v1.33.0 h1:6Mkvj/XKGR0un5ZN3C/fzbwEQDfvFyiqz9onbul2tXE= +github.com/aws/aws-sdk-go-v2/service/directoryservice v1.33.0/go.mod h1:cE8g6YE7isdWy1WJEuslcG9/O/xYpN56+Gd+v5Nay2Q= github.com/aws/aws-sdk-go-v2/service/dlm v1.31.0 h1:3kysMjPGvngicdxm8mCiaLHv56epYJIuXfyUg4gP8bo= github.com/aws/aws-sdk-go-v2/service/dlm v1.31.0/go.mod h1:5WA+6fC+70sNV2ySJvtfeaYrEQn0AEI0ctuc3iAkR9Q= github.com/aws/aws-sdk-go-v2/service/docdb v1.42.0 h1:4XiBQR3sJVazCDyAbzW7F1RJLtH9+gpYJ7tFqWj/Vl0= From c586ddab0756f28d8d5cb7d5a08a1839186be734 Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 09:12:32 -0400 Subject: [PATCH 163/365] go get github.com/aws/aws-sdk-go-v2/service/dlm. --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 0a896bef4036..623600dde4d3 100644 --- a/go.mod +++ b/go.mod @@ -96,7 +96,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/devopsguru v1.36.1 github.com/aws/aws-sdk-go-v2/service/directconnect v1.33.1 github.com/aws/aws-sdk-go-v2/service/directoryservice v1.33.0 - github.com/aws/aws-sdk-go-v2/service/dlm v1.31.0 + github.com/aws/aws-sdk-go-v2/service/dlm v1.31.1 github.com/aws/aws-sdk-go-v2/service/docdb v1.42.0 github.com/aws/aws-sdk-go-v2/service/docdbelastic v1.16.0 github.com/aws/aws-sdk-go-v2/service/drs v1.32.0 diff --git a/go.sum b/go.sum index 70e9b13d0ddc..c120ab667061 100644 --- a/go.sum +++ b/go.sum @@ -203,8 +203,8 @@ github.com/aws/aws-sdk-go-v2/service/directconnect v1.33.1 h1:ur6teJsonXZ3DQ4HY4 github.com/aws/aws-sdk-go-v2/service/directconnect v1.33.1/go.mod h1:Zz+wZAdmA+3xJ2/4HFfkDJUqCri4i4wJ51RC08CS39k= github.com/aws/aws-sdk-go-v2/service/directoryservice v1.33.0 h1:6Mkvj/XKGR0un5ZN3C/fzbwEQDfvFyiqz9onbul2tXE= github.com/aws/aws-sdk-go-v2/service/directoryservice v1.33.0/go.mod h1:cE8g6YE7isdWy1WJEuslcG9/O/xYpN56+Gd+v5Nay2Q= -github.com/aws/aws-sdk-go-v2/service/dlm v1.31.0 h1:3kysMjPGvngicdxm8mCiaLHv56epYJIuXfyUg4gP8bo= -github.com/aws/aws-sdk-go-v2/service/dlm v1.31.0/go.mod h1:5WA+6fC+70sNV2ySJvtfeaYrEQn0AEI0ctuc3iAkR9Q= +github.com/aws/aws-sdk-go-v2/service/dlm v1.31.1 h1:X3N98uVi57B01cxV5wlSEXmaQDoH0SkT/cPVFNGis3o= +github.com/aws/aws-sdk-go-v2/service/dlm v1.31.1/go.mod h1:8cJzEU8w/u2gkatmGTd3O7EFLoGP0feaIWihDpDsS90= github.com/aws/aws-sdk-go-v2/service/docdb v1.42.0 h1:4XiBQR3sJVazCDyAbzW7F1RJLtH9+gpYJ7tFqWj/Vl0= github.com/aws/aws-sdk-go-v2/service/docdb v1.42.0/go.mod h1:XtRlgTN/VrE0e6SvIel4PeYJJyBsoJO+j8P6ISFxfdo= github.com/aws/aws-sdk-go-v2/service/docdbelastic v1.16.0 h1:XQHWIvUMy+f0oUdYa5vbUIpiVy6Pqdqa9qg2SdQ1LfU= From 46b4dc6c94afbb2c4a690018366f8c42f9694692 Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 09:12:33 -0400 Subject: [PATCH 164/365] go get github.com/aws/aws-sdk-go-v2/service/docdb. --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 623600dde4d3..3fbcbab75e6d 100644 --- a/go.mod +++ b/go.mod @@ -97,7 +97,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/directconnect v1.33.1 github.com/aws/aws-sdk-go-v2/service/directoryservice v1.33.0 github.com/aws/aws-sdk-go-v2/service/dlm v1.31.1 - github.com/aws/aws-sdk-go-v2/service/docdb v1.42.0 + github.com/aws/aws-sdk-go-v2/service/docdb v1.43.0 github.com/aws/aws-sdk-go-v2/service/docdbelastic v1.16.0 github.com/aws/aws-sdk-go-v2/service/drs v1.32.0 github.com/aws/aws-sdk-go-v2/service/dsql v1.6.0 diff --git a/go.sum b/go.sum index c120ab667061..abae39137b20 100644 --- a/go.sum +++ b/go.sum @@ -205,8 +205,8 @@ github.com/aws/aws-sdk-go-v2/service/directoryservice v1.33.0 h1:6Mkvj/XKGR0un5Z github.com/aws/aws-sdk-go-v2/service/directoryservice v1.33.0/go.mod h1:cE8g6YE7isdWy1WJEuslcG9/O/xYpN56+Gd+v5Nay2Q= github.com/aws/aws-sdk-go-v2/service/dlm v1.31.1 h1:X3N98uVi57B01cxV5wlSEXmaQDoH0SkT/cPVFNGis3o= github.com/aws/aws-sdk-go-v2/service/dlm v1.31.1/go.mod h1:8cJzEU8w/u2gkatmGTd3O7EFLoGP0feaIWihDpDsS90= -github.com/aws/aws-sdk-go-v2/service/docdb v1.42.0 h1:4XiBQR3sJVazCDyAbzW7F1RJLtH9+gpYJ7tFqWj/Vl0= -github.com/aws/aws-sdk-go-v2/service/docdb v1.42.0/go.mod h1:XtRlgTN/VrE0e6SvIel4PeYJJyBsoJO+j8P6ISFxfdo= +github.com/aws/aws-sdk-go-v2/service/docdb v1.43.0 h1:KkTo1IeL3eI6bpAUzzte6byFZmO26njFqdfn0fMgrZU= +github.com/aws/aws-sdk-go-v2/service/docdb v1.43.0/go.mod h1:LXUurR6oU0Mur/zfXB6ZUpWeC3nGOv4TZCvKvxyd1Ts= github.com/aws/aws-sdk-go-v2/service/docdbelastic v1.16.0 h1:XQHWIvUMy+f0oUdYa5vbUIpiVy6Pqdqa9qg2SdQ1LfU= github.com/aws/aws-sdk-go-v2/service/docdbelastic v1.16.0/go.mod h1:LU1E3rseSr8OeMXnFzcFQh8Ug1sIfIyJtqVGpZlJKwk= github.com/aws/aws-sdk-go-v2/service/drs v1.32.0 h1:wuzX+2Ch4ib6l/r6rlEN5EskxoUjPF6/0qPrI5nFOVg= From cf1643815fa85e723e8a00872d8fcfbe212b053c Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 09:12:35 -0400 Subject: [PATCH 165/365] go get github.com/aws/aws-sdk-go-v2/service/docdbelastic. --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 3fbcbab75e6d..d6aabcae4c1b 100644 --- a/go.mod +++ b/go.mod @@ -98,7 +98,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/directoryservice v1.33.0 github.com/aws/aws-sdk-go-v2/service/dlm v1.31.1 github.com/aws/aws-sdk-go-v2/service/docdb v1.43.0 - github.com/aws/aws-sdk-go-v2/service/docdbelastic v1.16.0 + github.com/aws/aws-sdk-go-v2/service/docdbelastic v1.16.1 github.com/aws/aws-sdk-go-v2/service/drs v1.32.0 github.com/aws/aws-sdk-go-v2/service/dsql v1.6.0 github.com/aws/aws-sdk-go-v2/service/dynamodb v1.45.0 diff --git a/go.sum b/go.sum index abae39137b20..a2e4016923ab 100644 --- a/go.sum +++ b/go.sum @@ -207,8 +207,8 @@ github.com/aws/aws-sdk-go-v2/service/dlm v1.31.1 h1:X3N98uVi57B01cxV5wlSEXmaQDoH github.com/aws/aws-sdk-go-v2/service/dlm v1.31.1/go.mod h1:8cJzEU8w/u2gkatmGTd3O7EFLoGP0feaIWihDpDsS90= github.com/aws/aws-sdk-go-v2/service/docdb v1.43.0 h1:KkTo1IeL3eI6bpAUzzte6byFZmO26njFqdfn0fMgrZU= github.com/aws/aws-sdk-go-v2/service/docdb v1.43.0/go.mod h1:LXUurR6oU0Mur/zfXB6ZUpWeC3nGOv4TZCvKvxyd1Ts= -github.com/aws/aws-sdk-go-v2/service/docdbelastic v1.16.0 h1:XQHWIvUMy+f0oUdYa5vbUIpiVy6Pqdqa9qg2SdQ1LfU= -github.com/aws/aws-sdk-go-v2/service/docdbelastic v1.16.0/go.mod h1:LU1E3rseSr8OeMXnFzcFQh8Ug1sIfIyJtqVGpZlJKwk= +github.com/aws/aws-sdk-go-v2/service/docdbelastic v1.16.1 h1:NpdGerAwJLMan0qv9FZkMKurlfrfWpB/tuIxQGcIoKQ= +github.com/aws/aws-sdk-go-v2/service/docdbelastic v1.16.1/go.mod h1:Rt5mVlAnNpabHok0G9i2aP2kuCXmZqUluUWu9Gr4L2o= github.com/aws/aws-sdk-go-v2/service/drs v1.32.0 h1:wuzX+2Ch4ib6l/r6rlEN5EskxoUjPF6/0qPrI5nFOVg= github.com/aws/aws-sdk-go-v2/service/drs v1.32.0/go.mod h1:OSZ68J2hGEP+i9eKdYYAK5oHL8IQxs07hVIbz2U19eM= github.com/aws/aws-sdk-go-v2/service/dsql v1.6.0 h1:a3NhtGkjNW8n3fmwZsJFpENOiOHK1xPHvf5076xx9X4= From 16b72c1a5d9143425d20652344bdb2335052f866 Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 09:12:36 -0400 Subject: [PATCH 166/365] go get github.com/aws/aws-sdk-go-v2/service/dsql. --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index d6aabcae4c1b..cc21b2793990 100644 --- a/go.mod +++ b/go.mod @@ -100,7 +100,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/docdb v1.43.0 github.com/aws/aws-sdk-go-v2/service/docdbelastic v1.16.1 github.com/aws/aws-sdk-go-v2/service/drs v1.32.0 - github.com/aws/aws-sdk-go-v2/service/dsql v1.6.0 + github.com/aws/aws-sdk-go-v2/service/dsql v1.6.1 github.com/aws/aws-sdk-go-v2/service/dynamodb v1.45.0 github.com/aws/aws-sdk-go-v2/service/ec2 v1.237.0 github.com/aws/aws-sdk-go-v2/service/ecr v1.47.0 diff --git a/go.sum b/go.sum index a2e4016923ab..7d0f4621448e 100644 --- a/go.sum +++ b/go.sum @@ -211,8 +211,8 @@ github.com/aws/aws-sdk-go-v2/service/docdbelastic v1.16.1 h1:NpdGerAwJLMan0qv9FZ github.com/aws/aws-sdk-go-v2/service/docdbelastic v1.16.1/go.mod h1:Rt5mVlAnNpabHok0G9i2aP2kuCXmZqUluUWu9Gr4L2o= github.com/aws/aws-sdk-go-v2/service/drs v1.32.0 h1:wuzX+2Ch4ib6l/r6rlEN5EskxoUjPF6/0qPrI5nFOVg= github.com/aws/aws-sdk-go-v2/service/drs v1.32.0/go.mod h1:OSZ68J2hGEP+i9eKdYYAK5oHL8IQxs07hVIbz2U19eM= -github.com/aws/aws-sdk-go-v2/service/dsql v1.6.0 h1:a3NhtGkjNW8n3fmwZsJFpENOiOHK1xPHvf5076xx9X4= -github.com/aws/aws-sdk-go-v2/service/dsql v1.6.0/go.mod h1:/nz9MHdhjpcljIPFgOjSwuJdMn3aJt3gx1cY9ymKAmM= +github.com/aws/aws-sdk-go-v2/service/dsql v1.6.1 h1:9gsd5GS4hpu0Dy51zyUZbO48c94BaUL6445wO0puPfk= +github.com/aws/aws-sdk-go-v2/service/dsql v1.6.1/go.mod h1:zCjUFiEqbIipUKwhROZhoOtW7bgBBfOXf1FSGc2uSRQ= github.com/aws/aws-sdk-go-v2/service/dynamodb v1.45.0 h1:b71OPISZ5Tj4ehCRJKnabIq2U68pldgKqhiUMHnVNQ4= github.com/aws/aws-sdk-go-v2/service/dynamodb v1.45.0/go.mod h1:+ZRTIYCk/PNwz8+ZGLBzvFu7Nl1/w7phtbEZFlvOZWc= github.com/aws/aws-sdk-go-v2/service/ec2 v1.237.0 h1:XHE2G+yaDQql32FZt19QmQt4WuisqQJIkMUSCxeCUl8= From 4acfe2daf5be6895791f71925b6bfe315057bff2 Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 09:12:37 -0400 Subject: [PATCH 167/365] go get github.com/aws/aws-sdk-go-v2/service/dynamodb. --- go.mod | 4 ++-- go.sum | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/go.mod b/go.mod index cc21b2793990..a61965f91c98 100644 --- a/go.mod +++ b/go.mod @@ -101,7 +101,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/docdbelastic v1.16.1 github.com/aws/aws-sdk-go-v2/service/drs v1.32.0 github.com/aws/aws-sdk-go-v2/service/dsql v1.6.1 - github.com/aws/aws-sdk-go-v2/service/dynamodb v1.45.0 + github.com/aws/aws-sdk-go-v2/service/dynamodb v1.45.1 github.com/aws/aws-sdk-go-v2/service/ec2 v1.237.0 github.com/aws/aws-sdk-go-v2/service/ecr v1.47.0 github.com/aws/aws-sdk-go-v2/service/ecrpublic v1.34.0 @@ -325,7 +325,7 @@ require ( github.com/aws/aws-sdk-go-v2/internal/v4a v1.4.1 // indirect github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.13.0 // indirect github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.8.1 // indirect - github.com/aws/aws-sdk-go-v2/service/internal/endpoint-discovery v1.11.0 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/endpoint-discovery v1.11.1 // indirect github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.13.1 // indirect github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.19.1 // indirect github.com/aws/aws-sdk-go-v2/service/ssooidc v1.31.1 // indirect diff --git a/go.sum b/go.sum index 7d0f4621448e..c6200b4f1221 100644 --- a/go.sum +++ b/go.sum @@ -213,8 +213,8 @@ github.com/aws/aws-sdk-go-v2/service/drs v1.32.0 h1:wuzX+2Ch4ib6l/r6rlEN5EskxoUj github.com/aws/aws-sdk-go-v2/service/drs v1.32.0/go.mod h1:OSZ68J2hGEP+i9eKdYYAK5oHL8IQxs07hVIbz2U19eM= github.com/aws/aws-sdk-go-v2/service/dsql v1.6.1 h1:9gsd5GS4hpu0Dy51zyUZbO48c94BaUL6445wO0puPfk= github.com/aws/aws-sdk-go-v2/service/dsql v1.6.1/go.mod h1:zCjUFiEqbIipUKwhROZhoOtW7bgBBfOXf1FSGc2uSRQ= -github.com/aws/aws-sdk-go-v2/service/dynamodb v1.45.0 h1:b71OPISZ5Tj4ehCRJKnabIq2U68pldgKqhiUMHnVNQ4= -github.com/aws/aws-sdk-go-v2/service/dynamodb v1.45.0/go.mod h1:+ZRTIYCk/PNwz8+ZGLBzvFu7Nl1/w7phtbEZFlvOZWc= +github.com/aws/aws-sdk-go-v2/service/dynamodb v1.45.1 h1:gFD9BLrXox2Q5zxFwyD2OnGb40YYofQ/anaGxVP848Q= +github.com/aws/aws-sdk-go-v2/service/dynamodb v1.45.1/go.mod h1:J+qJkxNypYjDcwXldBH+ox2T7OshtP6LOq5VhU0v6hg= github.com/aws/aws-sdk-go-v2/service/ec2 v1.237.0 h1:XHE2G+yaDQql32FZt19QmQt4WuisqQJIkMUSCxeCUl8= github.com/aws/aws-sdk-go-v2/service/ec2 v1.237.0/go.mod h1:t11/j/nH9i6bbsPH9xc04BJOsV2nVPUqrB67/TLDsyM= github.com/aws/aws-sdk-go-v2/service/ecr v1.47.0 h1:T+2j6CUZ4z+M5I35cZzguRy5RWLgmqDiGGSUtDVNJgo= @@ -293,8 +293,8 @@ github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.13.0 h1:6+lZi2J github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.13.0/go.mod h1:eb3gfbVIxIoGgJsi9pGne19dhCBpK6opTYpQqAmdy44= github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.8.1 h1:ps3nrmBWdWwakZBydGX1CxeYFK80HsQ79JLMwm7Y4/c= github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.8.1/go.mod h1:bAdfrfxENre68Hh2swNaGEVuFYE74o0SaSCAlaG9E74= -github.com/aws/aws-sdk-go-v2/service/internal/endpoint-discovery v1.11.0 h1:d/XdC88Wp2JVsomt1yw+nQgAX42fYwZlEK4K4zzHZuA= -github.com/aws/aws-sdk-go-v2/service/internal/endpoint-discovery v1.11.0/go.mod h1:ZfRwNlclmR48RAgflKBOi43bY1MjvraHZPsG3A/i0iw= +github.com/aws/aws-sdk-go-v2/service/internal/endpoint-discovery v1.11.1 h1:/E4JUPMI8LRX2XpXsbmKN42l1lZPoLjGJ/Kun97pLc0= +github.com/aws/aws-sdk-go-v2/service/internal/endpoint-discovery v1.11.1/go.mod h1:qgbd/t8S8y5e87KPQ4kC0kyxZ0K6nC1QiDtFMoxlsOo= github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.13.1 h1:ky79ysLMxhwk5rxJtS+ILd3Mc8kC5fhsLBrP27r6h4I= github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.13.1/go.mod h1:+2MmkvFvPYM1vsozBWduoLJUi5maxFk5B7KJFECujhY= github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.19.1 h1:MdVYlN5pcQu1t1OYx4Ajo3fKl1IEhzgdPQbYFCRjYS8= From fb381fa3aa630a36bf5e01a2b28c44ead9affde5 Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 09:12:38 -0400 Subject: [PATCH 168/365] go get github.com/aws/aws-sdk-go-v2/service/ec2. --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index a61965f91c98..23ea2b215a75 100644 --- a/go.mod +++ b/go.mod @@ -102,7 +102,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/drs v1.32.0 github.com/aws/aws-sdk-go-v2/service/dsql v1.6.1 github.com/aws/aws-sdk-go-v2/service/dynamodb v1.45.1 - github.com/aws/aws-sdk-go-v2/service/ec2 v1.237.0 + github.com/aws/aws-sdk-go-v2/service/ec2 v1.238.0 github.com/aws/aws-sdk-go-v2/service/ecr v1.47.0 github.com/aws/aws-sdk-go-v2/service/ecrpublic v1.34.0 github.com/aws/aws-sdk-go-v2/service/ecs v1.61.0 diff --git a/go.sum b/go.sum index c6200b4f1221..f34d73d5d5cc 100644 --- a/go.sum +++ b/go.sum @@ -215,8 +215,8 @@ github.com/aws/aws-sdk-go-v2/service/dsql v1.6.1 h1:9gsd5GS4hpu0Dy51zyUZbO48c94B github.com/aws/aws-sdk-go-v2/service/dsql v1.6.1/go.mod h1:zCjUFiEqbIipUKwhROZhoOtW7bgBBfOXf1FSGc2uSRQ= github.com/aws/aws-sdk-go-v2/service/dynamodb v1.45.1 h1:gFD9BLrXox2Q5zxFwyD2OnGb40YYofQ/anaGxVP848Q= github.com/aws/aws-sdk-go-v2/service/dynamodb v1.45.1/go.mod h1:J+qJkxNypYjDcwXldBH+ox2T7OshtP6LOq5VhU0v6hg= -github.com/aws/aws-sdk-go-v2/service/ec2 v1.237.0 h1:XHE2G+yaDQql32FZt19QmQt4WuisqQJIkMUSCxeCUl8= -github.com/aws/aws-sdk-go-v2/service/ec2 v1.237.0/go.mod h1:t11/j/nH9i6bbsPH9xc04BJOsV2nVPUqrB67/TLDsyM= +github.com/aws/aws-sdk-go-v2/service/ec2 v1.238.0 h1:fXZYx7xDSocFM3ht/mwML7eCP7cPbs1ltXEM8zpwU5o= +github.com/aws/aws-sdk-go-v2/service/ec2 v1.238.0/go.mod h1:lhyI/MJGGbPnOdYmmQRZe07S+2fW2uWI1XrUfAZgXLM= github.com/aws/aws-sdk-go-v2/service/ecr v1.47.0 h1:T+2j6CUZ4z+M5I35cZzguRy5RWLgmqDiGGSUtDVNJgo= github.com/aws/aws-sdk-go-v2/service/ecr v1.47.0/go.mod h1:w3gLtg36GbH9uhJBaGdy82SkCX/79NrrDj5JrdYx5Pc= github.com/aws/aws-sdk-go-v2/service/ecrpublic v1.34.0 h1:gfiAVHG23tpQfoOavFUXMcKdmw4dWFMK+KfYy+G+MlQ= From dd212f4342e6038af2551157a94ae5f23e9e4330 Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 09:12:39 -0400 Subject: [PATCH 169/365] go get github.com/aws/aws-sdk-go-v2/service/ecr. --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 23ea2b215a75..7fb456ea9818 100644 --- a/go.mod +++ b/go.mod @@ -103,7 +103,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/dsql v1.6.1 github.com/aws/aws-sdk-go-v2/service/dynamodb v1.45.1 github.com/aws/aws-sdk-go-v2/service/ec2 v1.238.0 - github.com/aws/aws-sdk-go-v2/service/ecr v1.47.0 + github.com/aws/aws-sdk-go-v2/service/ecr v1.47.1 github.com/aws/aws-sdk-go-v2/service/ecrpublic v1.34.0 github.com/aws/aws-sdk-go-v2/service/ecs v1.61.0 github.com/aws/aws-sdk-go-v2/service/efs v1.37.0 diff --git a/go.sum b/go.sum index f34d73d5d5cc..ee8de3166488 100644 --- a/go.sum +++ b/go.sum @@ -217,8 +217,8 @@ github.com/aws/aws-sdk-go-v2/service/dynamodb v1.45.1 h1:gFD9BLrXox2Q5zxFwyD2OnG github.com/aws/aws-sdk-go-v2/service/dynamodb v1.45.1/go.mod h1:J+qJkxNypYjDcwXldBH+ox2T7OshtP6LOq5VhU0v6hg= github.com/aws/aws-sdk-go-v2/service/ec2 v1.238.0 h1:fXZYx7xDSocFM3ht/mwML7eCP7cPbs1ltXEM8zpwU5o= github.com/aws/aws-sdk-go-v2/service/ec2 v1.238.0/go.mod h1:lhyI/MJGGbPnOdYmmQRZe07S+2fW2uWI1XrUfAZgXLM= -github.com/aws/aws-sdk-go-v2/service/ecr v1.47.0 h1:T+2j6CUZ4z+M5I35cZzguRy5RWLgmqDiGGSUtDVNJgo= -github.com/aws/aws-sdk-go-v2/service/ecr v1.47.0/go.mod h1:w3gLtg36GbH9uhJBaGdy82SkCX/79NrrDj5JrdYx5Pc= +github.com/aws/aws-sdk-go-v2/service/ecr v1.47.1 h1:gwqCrRvz+vnhWyG9/WSzo6HspAO5mWXBeYo9ELFUcIM= +github.com/aws/aws-sdk-go-v2/service/ecr v1.47.1/go.mod h1:VVqrGCL0/zQif1J6axnyUBVRf6lySV5/QhxV9RspEHY= github.com/aws/aws-sdk-go-v2/service/ecrpublic v1.34.0 h1:gfiAVHG23tpQfoOavFUXMcKdmw4dWFMK+KfYy+G+MlQ= github.com/aws/aws-sdk-go-v2/service/ecrpublic v1.34.0/go.mod h1:UArd1ewa8AcfB6zahDOSzfO/aFviMr0rCapAEp58sRE= github.com/aws/aws-sdk-go-v2/service/ecs v1.61.0 h1:2VrFedi1M671QYjgwUoBVTLNnYJLHEWziQGxI4b7VP8= From bde4b6601c41dfcb1853cbb13c2864f90c7c8505 Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 09:12:40 -0400 Subject: [PATCH 170/365] go get github.com/aws/aws-sdk-go-v2/service/ecrpublic. --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 7fb456ea9818..b7f872257a00 100644 --- a/go.mod +++ b/go.mod @@ -104,7 +104,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/dynamodb v1.45.1 github.com/aws/aws-sdk-go-v2/service/ec2 v1.238.0 github.com/aws/aws-sdk-go-v2/service/ecr v1.47.1 - github.com/aws/aws-sdk-go-v2/service/ecrpublic v1.34.0 + github.com/aws/aws-sdk-go-v2/service/ecrpublic v1.34.1 github.com/aws/aws-sdk-go-v2/service/ecs v1.61.0 github.com/aws/aws-sdk-go-v2/service/efs v1.37.0 github.com/aws/aws-sdk-go-v2/service/eks v1.67.0 diff --git a/go.sum b/go.sum index ee8de3166488..6a747d8baff1 100644 --- a/go.sum +++ b/go.sum @@ -219,8 +219,8 @@ github.com/aws/aws-sdk-go-v2/service/ec2 v1.238.0 h1:fXZYx7xDSocFM3ht/mwML7eCP7c github.com/aws/aws-sdk-go-v2/service/ec2 v1.238.0/go.mod h1:lhyI/MJGGbPnOdYmmQRZe07S+2fW2uWI1XrUfAZgXLM= github.com/aws/aws-sdk-go-v2/service/ecr v1.47.1 h1:gwqCrRvz+vnhWyG9/WSzo6HspAO5mWXBeYo9ELFUcIM= github.com/aws/aws-sdk-go-v2/service/ecr v1.47.1/go.mod h1:VVqrGCL0/zQif1J6axnyUBVRf6lySV5/QhxV9RspEHY= -github.com/aws/aws-sdk-go-v2/service/ecrpublic v1.34.0 h1:gfiAVHG23tpQfoOavFUXMcKdmw4dWFMK+KfYy+G+MlQ= -github.com/aws/aws-sdk-go-v2/service/ecrpublic v1.34.0/go.mod h1:UArd1ewa8AcfB6zahDOSzfO/aFviMr0rCapAEp58sRE= +github.com/aws/aws-sdk-go-v2/service/ecrpublic v1.34.1 h1:BiOKbndtmSaZypHR0S7lO0DuffGegLvbkGfq4aNJlFc= +github.com/aws/aws-sdk-go-v2/service/ecrpublic v1.34.1/go.mod h1:rAWV5KSmhcjfXEzn2j+heWufy+JWlNDvkhyirRPB0+o= github.com/aws/aws-sdk-go-v2/service/ecs v1.61.0 h1:2VrFedi1M671QYjgwUoBVTLNnYJLHEWziQGxI4b7VP8= github.com/aws/aws-sdk-go-v2/service/ecs v1.61.0/go.mod h1:y/YTnHG2QTWQ4dPVyY0oFHMGuwpS2Ys+4TfrcY5eqVs= github.com/aws/aws-sdk-go-v2/service/efs v1.37.0 h1:0UpL/E+lNuSlX4JZz/rtTb+DHIpXbCj5sX6/2m+rww4= From ff8d8afd053cb0d3d0469a339d157ea570d8bb8b Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 09:12:41 -0400 Subject: [PATCH 171/365] go get github.com/aws/aws-sdk-go-v2/service/ecs. --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index b7f872257a00..9d7b61517a0e 100644 --- a/go.mod +++ b/go.mod @@ -105,7 +105,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/ec2 v1.238.0 github.com/aws/aws-sdk-go-v2/service/ecr v1.47.1 github.com/aws/aws-sdk-go-v2/service/ecrpublic v1.34.1 - github.com/aws/aws-sdk-go-v2/service/ecs v1.61.0 + github.com/aws/aws-sdk-go-v2/service/ecs v1.61.1 github.com/aws/aws-sdk-go-v2/service/efs v1.37.0 github.com/aws/aws-sdk-go-v2/service/eks v1.67.0 github.com/aws/aws-sdk-go-v2/service/elasticache v1.47.0 diff --git a/go.sum b/go.sum index 6a747d8baff1..0e0a7455ee78 100644 --- a/go.sum +++ b/go.sum @@ -221,8 +221,8 @@ github.com/aws/aws-sdk-go-v2/service/ecr v1.47.1 h1:gwqCrRvz+vnhWyG9/WSzo6HspAO5 github.com/aws/aws-sdk-go-v2/service/ecr v1.47.1/go.mod h1:VVqrGCL0/zQif1J6axnyUBVRf6lySV5/QhxV9RspEHY= github.com/aws/aws-sdk-go-v2/service/ecrpublic v1.34.1 h1:BiOKbndtmSaZypHR0S7lO0DuffGegLvbkGfq4aNJlFc= github.com/aws/aws-sdk-go-v2/service/ecrpublic v1.34.1/go.mod h1:rAWV5KSmhcjfXEzn2j+heWufy+JWlNDvkhyirRPB0+o= -github.com/aws/aws-sdk-go-v2/service/ecs v1.61.0 h1:2VrFedi1M671QYjgwUoBVTLNnYJLHEWziQGxI4b7VP8= -github.com/aws/aws-sdk-go-v2/service/ecs v1.61.0/go.mod h1:y/YTnHG2QTWQ4dPVyY0oFHMGuwpS2Ys+4TfrcY5eqVs= +github.com/aws/aws-sdk-go-v2/service/ecs v1.61.1 h1:C9YpiBJwF9ORx1PNLK7hIT9edNcezQs+ioCT64414+8= +github.com/aws/aws-sdk-go-v2/service/ecs v1.61.1/go.mod h1:NzX/k/6nc9X5l1NShl1p2PLbBZ2IohBcD0d76o7uPtw= github.com/aws/aws-sdk-go-v2/service/efs v1.37.0 h1:0UpL/E+lNuSlX4JZz/rtTb+DHIpXbCj5sX6/2m+rww4= github.com/aws/aws-sdk-go-v2/service/efs v1.37.0/go.mod h1:I04zQ/3fYhdiCLo1LGtDLxHKDOAn8JcvhPXhlfVF9lg= github.com/aws/aws-sdk-go-v2/service/eks v1.67.0 h1:Q6eEFXjq0l2EsOyTiACpHFWMTqPJCI8D/Zqj8m08tlc= From 1079845c2817eb78ead65bb8fecb5845499c93fc Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 09:12:42 -0400 Subject: [PATCH 172/365] go get github.com/aws/aws-sdk-go-v2/service/efs. --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 9d7b61517a0e..6930db33806c 100644 --- a/go.mod +++ b/go.mod @@ -106,7 +106,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/ecr v1.47.1 github.com/aws/aws-sdk-go-v2/service/ecrpublic v1.34.1 github.com/aws/aws-sdk-go-v2/service/ecs v1.61.1 - github.com/aws/aws-sdk-go-v2/service/efs v1.37.0 + github.com/aws/aws-sdk-go-v2/service/efs v1.37.1 github.com/aws/aws-sdk-go-v2/service/eks v1.67.0 github.com/aws/aws-sdk-go-v2/service/elasticache v1.47.0 github.com/aws/aws-sdk-go-v2/service/elasticbeanstalk v1.30.0 diff --git a/go.sum b/go.sum index 0e0a7455ee78..42ced7308471 100644 --- a/go.sum +++ b/go.sum @@ -223,8 +223,8 @@ github.com/aws/aws-sdk-go-v2/service/ecrpublic v1.34.1 h1:BiOKbndtmSaZypHR0S7lO0 github.com/aws/aws-sdk-go-v2/service/ecrpublic v1.34.1/go.mod h1:rAWV5KSmhcjfXEzn2j+heWufy+JWlNDvkhyirRPB0+o= github.com/aws/aws-sdk-go-v2/service/ecs v1.61.1 h1:C9YpiBJwF9ORx1PNLK7hIT9edNcezQs+ioCT64414+8= github.com/aws/aws-sdk-go-v2/service/ecs v1.61.1/go.mod h1:NzX/k/6nc9X5l1NShl1p2PLbBZ2IohBcD0d76o7uPtw= -github.com/aws/aws-sdk-go-v2/service/efs v1.37.0 h1:0UpL/E+lNuSlX4JZz/rtTb+DHIpXbCj5sX6/2m+rww4= -github.com/aws/aws-sdk-go-v2/service/efs v1.37.0/go.mod h1:I04zQ/3fYhdiCLo1LGtDLxHKDOAn8JcvhPXhlfVF9lg= +github.com/aws/aws-sdk-go-v2/service/efs v1.37.1 h1:if46gpuITm8t4b7C/1hWSiHTI35LVWXN55H/SCWowl4= +github.com/aws/aws-sdk-go-v2/service/efs v1.37.1/go.mod h1:ytV6yB7YT5kElfKIubv3CP9nKG1IVEXAMDHOC0Wgrgo= github.com/aws/aws-sdk-go-v2/service/eks v1.67.0 h1:Q6eEFXjq0l2EsOyTiACpHFWMTqPJCI8D/Zqj8m08tlc= github.com/aws/aws-sdk-go-v2/service/eks v1.67.0/go.mod h1:kHfybTXNRagH1UNWrMOLFSxLaQHrwJjXppoXGBo8CXc= github.com/aws/aws-sdk-go-v2/service/elasticache v1.47.0 h1:rdeVbBkLSPlOsPGQt1UjBzMplSN6tJlsLtHk4AWp7Hc= From 3cb4de9499a0363c9c79e28e79ec77ea1f99b9ec Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 09:12:44 -0400 Subject: [PATCH 173/365] go get github.com/aws/aws-sdk-go-v2/service/eks. --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 6930db33806c..e429c84e8fc7 100644 --- a/go.mod +++ b/go.mod @@ -107,7 +107,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/ecrpublic v1.34.1 github.com/aws/aws-sdk-go-v2/service/ecs v1.61.1 github.com/aws/aws-sdk-go-v2/service/efs v1.37.1 - github.com/aws/aws-sdk-go-v2/service/eks v1.67.0 + github.com/aws/aws-sdk-go-v2/service/eks v1.67.1 github.com/aws/aws-sdk-go-v2/service/elasticache v1.47.0 github.com/aws/aws-sdk-go-v2/service/elasticbeanstalk v1.30.0 github.com/aws/aws-sdk-go-v2/service/elasticloadbalancing v1.30.0 diff --git a/go.sum b/go.sum index 42ced7308471..cc26ff3dee04 100644 --- a/go.sum +++ b/go.sum @@ -225,8 +225,8 @@ github.com/aws/aws-sdk-go-v2/service/ecs v1.61.1 h1:C9YpiBJwF9ORx1PNLK7hIT9edNce github.com/aws/aws-sdk-go-v2/service/ecs v1.61.1/go.mod h1:NzX/k/6nc9X5l1NShl1p2PLbBZ2IohBcD0d76o7uPtw= github.com/aws/aws-sdk-go-v2/service/efs v1.37.1 h1:if46gpuITm8t4b7C/1hWSiHTI35LVWXN55H/SCWowl4= github.com/aws/aws-sdk-go-v2/service/efs v1.37.1/go.mod h1:ytV6yB7YT5kElfKIubv3CP9nKG1IVEXAMDHOC0Wgrgo= -github.com/aws/aws-sdk-go-v2/service/eks v1.67.0 h1:Q6eEFXjq0l2EsOyTiACpHFWMTqPJCI8D/Zqj8m08tlc= -github.com/aws/aws-sdk-go-v2/service/eks v1.67.0/go.mod h1:kHfybTXNRagH1UNWrMOLFSxLaQHrwJjXppoXGBo8CXc= +github.com/aws/aws-sdk-go-v2/service/eks v1.67.1 h1:Pw8b30mgnG894pn6DHOvnHqT9tIAqOyg3NuBcsBaL3c= +github.com/aws/aws-sdk-go-v2/service/eks v1.67.1/go.mod h1:ZkszcAXXOpLXbLBZrrog9lCwZF3NyZryUDxXY/InzSM= github.com/aws/aws-sdk-go-v2/service/elasticache v1.47.0 h1:rdeVbBkLSPlOsPGQt1UjBzMplSN6tJlsLtHk4AWp7Hc= github.com/aws/aws-sdk-go-v2/service/elasticache v1.47.0/go.mod h1:5vWa4LGphYB/O9zzyoq6ICz0HP4GQvF/CD8683WVDgg= github.com/aws/aws-sdk-go-v2/service/elasticbeanstalk v1.30.0 h1:AdTGVDlPwyvNVZWbmy92Dgwa7DR3/gp5MGd2rjBm2oY= From 3ee472a0e8432309030cd26b0d1a5435186ff299 Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 09:12:44 -0400 Subject: [PATCH 174/365] go get github.com/aws/aws-sdk-go-v2/service/elasticache. --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index e429c84e8fc7..25bd519e22f9 100644 --- a/go.mod +++ b/go.mod @@ -108,7 +108,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/ecs v1.61.1 github.com/aws/aws-sdk-go-v2/service/efs v1.37.1 github.com/aws/aws-sdk-go-v2/service/eks v1.67.1 - github.com/aws/aws-sdk-go-v2/service/elasticache v1.47.0 + github.com/aws/aws-sdk-go-v2/service/elasticache v1.47.1 github.com/aws/aws-sdk-go-v2/service/elasticbeanstalk v1.30.0 github.com/aws/aws-sdk-go-v2/service/elasticloadbalancing v1.30.0 github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2 v1.47.0 diff --git a/go.sum b/go.sum index cc26ff3dee04..c05942ece8bb 100644 --- a/go.sum +++ b/go.sum @@ -227,8 +227,8 @@ github.com/aws/aws-sdk-go-v2/service/efs v1.37.1 h1:if46gpuITm8t4b7C/1hWSiHTI35L github.com/aws/aws-sdk-go-v2/service/efs v1.37.1/go.mod h1:ytV6yB7YT5kElfKIubv3CP9nKG1IVEXAMDHOC0Wgrgo= github.com/aws/aws-sdk-go-v2/service/eks v1.67.1 h1:Pw8b30mgnG894pn6DHOvnHqT9tIAqOyg3NuBcsBaL3c= github.com/aws/aws-sdk-go-v2/service/eks v1.67.1/go.mod h1:ZkszcAXXOpLXbLBZrrog9lCwZF3NyZryUDxXY/InzSM= -github.com/aws/aws-sdk-go-v2/service/elasticache v1.47.0 h1:rdeVbBkLSPlOsPGQt1UjBzMplSN6tJlsLtHk4AWp7Hc= -github.com/aws/aws-sdk-go-v2/service/elasticache v1.47.0/go.mod h1:5vWa4LGphYB/O9zzyoq6ICz0HP4GQvF/CD8683WVDgg= +github.com/aws/aws-sdk-go-v2/service/elasticache v1.47.1 h1:DIP+2UukVi9P4PHLUF2HXpZEtkbDLmqYcWILuU/m0IQ= +github.com/aws/aws-sdk-go-v2/service/elasticache v1.47.1/go.mod h1:8LEhIVZFKc9OfOrug9sIsm9lTSmiS0KT121aXUnoTPo= github.com/aws/aws-sdk-go-v2/service/elasticbeanstalk v1.30.0 h1:AdTGVDlPwyvNVZWbmy92Dgwa7DR3/gp5MGd2rjBm2oY= github.com/aws/aws-sdk-go-v2/service/elasticbeanstalk v1.30.0/go.mod h1:nOfKd1hMfOzBIQtJOCK1TlImzNaAcvpCSnRJLiE/MSI= github.com/aws/aws-sdk-go-v2/service/elasticloadbalancing v1.30.0 h1:1v0/C1HGgdNjeyV7znEjttZb4Y1i/zItKmGCEF+AQBI= From 7c0b0802a176ad5e9964cfde05726aaefe984933 Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 09:12:45 -0400 Subject: [PATCH 175/365] go get github.com/aws/aws-sdk-go-v2/service/elasticbeanstalk. --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 25bd519e22f9..7409121a24ba 100644 --- a/go.mod +++ b/go.mod @@ -109,7 +109,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/efs v1.37.1 github.com/aws/aws-sdk-go-v2/service/eks v1.67.1 github.com/aws/aws-sdk-go-v2/service/elasticache v1.47.1 - github.com/aws/aws-sdk-go-v2/service/elasticbeanstalk v1.30.0 + github.com/aws/aws-sdk-go-v2/service/elasticbeanstalk v1.30.1 github.com/aws/aws-sdk-go-v2/service/elasticloadbalancing v1.30.0 github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2 v1.47.0 github.com/aws/aws-sdk-go-v2/service/elasticsearchservice v1.34.0 diff --git a/go.sum b/go.sum index c05942ece8bb..d049577e97fe 100644 --- a/go.sum +++ b/go.sum @@ -229,8 +229,8 @@ github.com/aws/aws-sdk-go-v2/service/eks v1.67.1 h1:Pw8b30mgnG894pn6DHOvnHqT9tIA github.com/aws/aws-sdk-go-v2/service/eks v1.67.1/go.mod h1:ZkszcAXXOpLXbLBZrrog9lCwZF3NyZryUDxXY/InzSM= github.com/aws/aws-sdk-go-v2/service/elasticache v1.47.1 h1:DIP+2UukVi9P4PHLUF2HXpZEtkbDLmqYcWILuU/m0IQ= github.com/aws/aws-sdk-go-v2/service/elasticache v1.47.1/go.mod h1:8LEhIVZFKc9OfOrug9sIsm9lTSmiS0KT121aXUnoTPo= -github.com/aws/aws-sdk-go-v2/service/elasticbeanstalk v1.30.0 h1:AdTGVDlPwyvNVZWbmy92Dgwa7DR3/gp5MGd2rjBm2oY= -github.com/aws/aws-sdk-go-v2/service/elasticbeanstalk v1.30.0/go.mod h1:nOfKd1hMfOzBIQtJOCK1TlImzNaAcvpCSnRJLiE/MSI= +github.com/aws/aws-sdk-go-v2/service/elasticbeanstalk v1.30.1 h1:j4jxdx6ZiG2Xcj9DfjHhX65af8gpUZ4uvEZxJsEuTHk= +github.com/aws/aws-sdk-go-v2/service/elasticbeanstalk v1.30.1/go.mod h1:PWa7FRheclz+S0lyhGNw0w4HBoa1fqBzE/a1UXfUqzk= github.com/aws/aws-sdk-go-v2/service/elasticloadbalancing v1.30.0 h1:1v0/C1HGgdNjeyV7znEjttZb4Y1i/zItKmGCEF+AQBI= github.com/aws/aws-sdk-go-v2/service/elasticloadbalancing v1.30.0/go.mod h1:b9JQYkfPes14HlUIF8flWbZGsq6u+t6fXho7oGFIqfg= github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2 v1.47.0 h1:GObrLqUPWrRNJCaQSWyPV3F0hbym6V7kA+tW4VUJ6kY= From 5228f9a8101d718fe461bb006ca694cfa3eb3b7c Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 09:12:46 -0400 Subject: [PATCH 176/365] go get github.com/aws/aws-sdk-go-v2/service/elasticloadbalancing. --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 7409121a24ba..69f3e72c96c6 100644 --- a/go.mod +++ b/go.mod @@ -110,7 +110,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/eks v1.67.1 github.com/aws/aws-sdk-go-v2/service/elasticache v1.47.1 github.com/aws/aws-sdk-go-v2/service/elasticbeanstalk v1.30.1 - github.com/aws/aws-sdk-go-v2/service/elasticloadbalancing v1.30.0 + github.com/aws/aws-sdk-go-v2/service/elasticloadbalancing v1.30.1 github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2 v1.47.0 github.com/aws/aws-sdk-go-v2/service/elasticsearchservice v1.34.0 github.com/aws/aws-sdk-go-v2/service/elastictranscoder v1.29.0 diff --git a/go.sum b/go.sum index d049577e97fe..430963eac71a 100644 --- a/go.sum +++ b/go.sum @@ -231,8 +231,8 @@ github.com/aws/aws-sdk-go-v2/service/elasticache v1.47.1 h1:DIP+2UukVi9P4PHLUF2H github.com/aws/aws-sdk-go-v2/service/elasticache v1.47.1/go.mod h1:8LEhIVZFKc9OfOrug9sIsm9lTSmiS0KT121aXUnoTPo= github.com/aws/aws-sdk-go-v2/service/elasticbeanstalk v1.30.1 h1:j4jxdx6ZiG2Xcj9DfjHhX65af8gpUZ4uvEZxJsEuTHk= github.com/aws/aws-sdk-go-v2/service/elasticbeanstalk v1.30.1/go.mod h1:PWa7FRheclz+S0lyhGNw0w4HBoa1fqBzE/a1UXfUqzk= -github.com/aws/aws-sdk-go-v2/service/elasticloadbalancing v1.30.0 h1:1v0/C1HGgdNjeyV7znEjttZb4Y1i/zItKmGCEF+AQBI= -github.com/aws/aws-sdk-go-v2/service/elasticloadbalancing v1.30.0/go.mod h1:b9JQYkfPes14HlUIF8flWbZGsq6u+t6fXho7oGFIqfg= +github.com/aws/aws-sdk-go-v2/service/elasticloadbalancing v1.30.1 h1:ZZeI9bCwIbqoKu5hll1dmisMJ4ZeBEhdsszV/gOFm1s= +github.com/aws/aws-sdk-go-v2/service/elasticloadbalancing v1.30.1/go.mod h1:fcC73gpU/J/SmRut8/CmwM5oJO3bSpW7wgufVdtWSbg= github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2 v1.47.0 h1:GObrLqUPWrRNJCaQSWyPV3F0hbym6V7kA+tW4VUJ6kY= github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2 v1.47.0/go.mod h1:kT2i/XPJFtec5Pmi6f1dhY+r2t2rzxZJLWs0TnK94ec= github.com/aws/aws-sdk-go-v2/service/elasticsearchservice v1.34.0 h1:5Vocp/WUuq48iLhWdF+hyUSsh7xgT6Ve1Z/fa8+oeMc= From 176b03c406efa09fc2851d6edd1ccc923875cd1c Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 09:12:48 -0400 Subject: [PATCH 177/365] go get github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2. --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 69f3e72c96c6..ec2ca167387d 100644 --- a/go.mod +++ b/go.mod @@ -111,7 +111,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/elasticache v1.47.1 github.com/aws/aws-sdk-go-v2/service/elasticbeanstalk v1.30.1 github.com/aws/aws-sdk-go-v2/service/elasticloadbalancing v1.30.1 - github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2 v1.47.0 + github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2 v1.47.1 github.com/aws/aws-sdk-go-v2/service/elasticsearchservice v1.34.0 github.com/aws/aws-sdk-go-v2/service/elastictranscoder v1.29.0 github.com/aws/aws-sdk-go-v2/service/emr v1.51.0 diff --git a/go.sum b/go.sum index 430963eac71a..81b2d7bce596 100644 --- a/go.sum +++ b/go.sum @@ -233,8 +233,8 @@ github.com/aws/aws-sdk-go-v2/service/elasticbeanstalk v1.30.1 h1:j4jxdx6ZiG2Xcj9 github.com/aws/aws-sdk-go-v2/service/elasticbeanstalk v1.30.1/go.mod h1:PWa7FRheclz+S0lyhGNw0w4HBoa1fqBzE/a1UXfUqzk= github.com/aws/aws-sdk-go-v2/service/elasticloadbalancing v1.30.1 h1:ZZeI9bCwIbqoKu5hll1dmisMJ4ZeBEhdsszV/gOFm1s= github.com/aws/aws-sdk-go-v2/service/elasticloadbalancing v1.30.1/go.mod h1:fcC73gpU/J/SmRut8/CmwM5oJO3bSpW7wgufVdtWSbg= -github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2 v1.47.0 h1:GObrLqUPWrRNJCaQSWyPV3F0hbym6V7kA+tW4VUJ6kY= -github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2 v1.47.0/go.mod h1:kT2i/XPJFtec5Pmi6f1dhY+r2t2rzxZJLWs0TnK94ec= +github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2 v1.47.1 h1:H8+KiNkkY3q3u7IUSjc7oCshnHOOGvYOi7fT6ZJ23OI= +github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2 v1.47.1/go.mod h1:91PY/MUWThH0rH61v9r3QA4e7dS/PfXl+K63wltBeas= github.com/aws/aws-sdk-go-v2/service/elasticsearchservice v1.34.0 h1:5Vocp/WUuq48iLhWdF+hyUSsh7xgT6Ve1Z/fa8+oeMc= github.com/aws/aws-sdk-go-v2/service/elasticsearchservice v1.34.0/go.mod h1:k0OwtLNVqj0K7qVxc0cITY4Ek7ndGbmOQBFTt/NiNPc= github.com/aws/aws-sdk-go-v2/service/elastictranscoder v1.29.0 h1:1R1XMYDghfxze8BN2AYkxFX8YoViY5ckexbhhEKCBn8= From e0881fa9b4ea2daec0441ee50f63e30982da66c1 Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 09:12:49 -0400 Subject: [PATCH 178/365] go get github.com/aws/aws-sdk-go-v2/service/elasticsearchservice. --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index ec2ca167387d..33d9c4ecd2d2 100644 --- a/go.mod +++ b/go.mod @@ -112,7 +112,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/elasticbeanstalk v1.30.1 github.com/aws/aws-sdk-go-v2/service/elasticloadbalancing v1.30.1 github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2 v1.47.1 - github.com/aws/aws-sdk-go-v2/service/elasticsearchservice v1.34.0 + github.com/aws/aws-sdk-go-v2/service/elasticsearchservice v1.34.1 github.com/aws/aws-sdk-go-v2/service/elastictranscoder v1.29.0 github.com/aws/aws-sdk-go-v2/service/emr v1.51.0 github.com/aws/aws-sdk-go-v2/service/emrcontainers v1.36.0 diff --git a/go.sum b/go.sum index 81b2d7bce596..e6524ded0721 100644 --- a/go.sum +++ b/go.sum @@ -235,8 +235,8 @@ github.com/aws/aws-sdk-go-v2/service/elasticloadbalancing v1.30.1 h1:ZZeI9bCwIbq github.com/aws/aws-sdk-go-v2/service/elasticloadbalancing v1.30.1/go.mod h1:fcC73gpU/J/SmRut8/CmwM5oJO3bSpW7wgufVdtWSbg= github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2 v1.47.1 h1:H8+KiNkkY3q3u7IUSjc7oCshnHOOGvYOi7fT6ZJ23OI= github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2 v1.47.1/go.mod h1:91PY/MUWThH0rH61v9r3QA4e7dS/PfXl+K63wltBeas= -github.com/aws/aws-sdk-go-v2/service/elasticsearchservice v1.34.0 h1:5Vocp/WUuq48iLhWdF+hyUSsh7xgT6Ve1Z/fa8+oeMc= -github.com/aws/aws-sdk-go-v2/service/elasticsearchservice v1.34.0/go.mod h1:k0OwtLNVqj0K7qVxc0cITY4Ek7ndGbmOQBFTt/NiNPc= +github.com/aws/aws-sdk-go-v2/service/elasticsearchservice v1.34.1 h1:kVZzJvXCPx1Tkiqfxxw/a4uZmbquVu5NG4FgYXkiHOg= +github.com/aws/aws-sdk-go-v2/service/elasticsearchservice v1.34.1/go.mod h1:yHOWiozIeWy2Twojm1eq+2AV9XSY9NBcGLP81eaxTJs= github.com/aws/aws-sdk-go-v2/service/elastictranscoder v1.29.0 h1:1R1XMYDghfxze8BN2AYkxFX8YoViY5ckexbhhEKCBn8= github.com/aws/aws-sdk-go-v2/service/elastictranscoder v1.29.0/go.mod h1:W6aSnusoVqhANHwXxPi2sQoUVqV4QYLNQdQCwfqLiBE= github.com/aws/aws-sdk-go-v2/service/emr v1.51.0 h1:q9PTEV2UyT2ju3cOyPqnBFfjWILuKYtrZUnKgoQHE0A= From c5f76edef07ad3a7d9c3d5629f6bef61ff90e851 Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 09:12:50 -0400 Subject: [PATCH 179/365] go get github.com/aws/aws-sdk-go-v2/service/elastictranscoder. --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 33d9c4ecd2d2..597196336b7c 100644 --- a/go.mod +++ b/go.mod @@ -113,7 +113,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/elasticloadbalancing v1.30.1 github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2 v1.47.1 github.com/aws/aws-sdk-go-v2/service/elasticsearchservice v1.34.1 - github.com/aws/aws-sdk-go-v2/service/elastictranscoder v1.29.0 + github.com/aws/aws-sdk-go-v2/service/elastictranscoder v1.29.1 github.com/aws/aws-sdk-go-v2/service/emr v1.51.0 github.com/aws/aws-sdk-go-v2/service/emrcontainers v1.36.0 github.com/aws/aws-sdk-go-v2/service/emrserverless v1.33.0 diff --git a/go.sum b/go.sum index e6524ded0721..ff263a861713 100644 --- a/go.sum +++ b/go.sum @@ -237,8 +237,8 @@ github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2 v1.47.1 h1:H8+KiNkkY github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2 v1.47.1/go.mod h1:91PY/MUWThH0rH61v9r3QA4e7dS/PfXl+K63wltBeas= github.com/aws/aws-sdk-go-v2/service/elasticsearchservice v1.34.1 h1:kVZzJvXCPx1Tkiqfxxw/a4uZmbquVu5NG4FgYXkiHOg= github.com/aws/aws-sdk-go-v2/service/elasticsearchservice v1.34.1/go.mod h1:yHOWiozIeWy2Twojm1eq+2AV9XSY9NBcGLP81eaxTJs= -github.com/aws/aws-sdk-go-v2/service/elastictranscoder v1.29.0 h1:1R1XMYDghfxze8BN2AYkxFX8YoViY5ckexbhhEKCBn8= -github.com/aws/aws-sdk-go-v2/service/elastictranscoder v1.29.0/go.mod h1:W6aSnusoVqhANHwXxPi2sQoUVqV4QYLNQdQCwfqLiBE= +github.com/aws/aws-sdk-go-v2/service/elastictranscoder v1.29.1 h1:qMs7UOiRWN5skmmfmBkT+8ygksVYbPEUNflmlqYhTNM= +github.com/aws/aws-sdk-go-v2/service/elastictranscoder v1.29.1/go.mod h1:DThfdXM8k1f9rWh0nUVIqBA35+i8m9oNXdn7vbT9Aig= github.com/aws/aws-sdk-go-v2/service/emr v1.51.0 h1:q9PTEV2UyT2ju3cOyPqnBFfjWILuKYtrZUnKgoQHE0A= github.com/aws/aws-sdk-go-v2/service/emr v1.51.0/go.mod h1:wX9kDECiHBuWv2aorGpSazl7r8ZJOiRF01pp7SZRYgQ= github.com/aws/aws-sdk-go-v2/service/emrcontainers v1.36.0 h1:k7LyV+sWRh89RDfSJnaENz/WljIQymxQ3IXG2wFgN7s= From 1556ee946cc6ada465c4d635a02c254c1dfc6685 Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 09:12:51 -0400 Subject: [PATCH 180/365] go get github.com/aws/aws-sdk-go-v2/service/emr. --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 597196336b7c..3919aadaa86e 100644 --- a/go.mod +++ b/go.mod @@ -114,7 +114,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2 v1.47.1 github.com/aws/aws-sdk-go-v2/service/elasticsearchservice v1.34.1 github.com/aws/aws-sdk-go-v2/service/elastictranscoder v1.29.1 - github.com/aws/aws-sdk-go-v2/service/emr v1.51.0 + github.com/aws/aws-sdk-go-v2/service/emr v1.51.1 github.com/aws/aws-sdk-go-v2/service/emrcontainers v1.36.0 github.com/aws/aws-sdk-go-v2/service/emrserverless v1.33.0 github.com/aws/aws-sdk-go-v2/service/eventbridge v1.42.0 diff --git a/go.sum b/go.sum index ff263a861713..849b5ad22198 100644 --- a/go.sum +++ b/go.sum @@ -239,8 +239,8 @@ github.com/aws/aws-sdk-go-v2/service/elasticsearchservice v1.34.1 h1:kVZzJvXCPx1 github.com/aws/aws-sdk-go-v2/service/elasticsearchservice v1.34.1/go.mod h1:yHOWiozIeWy2Twojm1eq+2AV9XSY9NBcGLP81eaxTJs= github.com/aws/aws-sdk-go-v2/service/elastictranscoder v1.29.1 h1:qMs7UOiRWN5skmmfmBkT+8ygksVYbPEUNflmlqYhTNM= github.com/aws/aws-sdk-go-v2/service/elastictranscoder v1.29.1/go.mod h1:DThfdXM8k1f9rWh0nUVIqBA35+i8m9oNXdn7vbT9Aig= -github.com/aws/aws-sdk-go-v2/service/emr v1.51.0 h1:q9PTEV2UyT2ju3cOyPqnBFfjWILuKYtrZUnKgoQHE0A= -github.com/aws/aws-sdk-go-v2/service/emr v1.51.0/go.mod h1:wX9kDECiHBuWv2aorGpSazl7r8ZJOiRF01pp7SZRYgQ= +github.com/aws/aws-sdk-go-v2/service/emr v1.51.1 h1:uqDQXEq5AEju5XxbycnFiLdsK1+IbmaOqqqt0D3MaRM= +github.com/aws/aws-sdk-go-v2/service/emr v1.51.1/go.mod h1:dYB/K65iH3LBAsSfE2V9hQMMZCWwZ/eskSnvwB+94Dg= github.com/aws/aws-sdk-go-v2/service/emrcontainers v1.36.0 h1:k7LyV+sWRh89RDfSJnaENz/WljIQymxQ3IXG2wFgN7s= github.com/aws/aws-sdk-go-v2/service/emrcontainers v1.36.0/go.mod h1:7ScX/Htt5dQoT1h7ANByeB6w86sYiZJGI7Xda3AaWNE= github.com/aws/aws-sdk-go-v2/service/emrserverless v1.33.0 h1:OpaVhGUsfEOaJpD0vx9xKUjMJKCQMnSb/t45DPffMuU= From 5d1eca0651684dc9f076ec6dd8964cac812f66b0 Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 09:12:52 -0400 Subject: [PATCH 181/365] go get github.com/aws/aws-sdk-go-v2/service/emrcontainers. --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 3919aadaa86e..eceb5b066e37 100644 --- a/go.mod +++ b/go.mod @@ -115,7 +115,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/elasticsearchservice v1.34.1 github.com/aws/aws-sdk-go-v2/service/elastictranscoder v1.29.1 github.com/aws/aws-sdk-go-v2/service/emr v1.51.1 - github.com/aws/aws-sdk-go-v2/service/emrcontainers v1.36.0 + github.com/aws/aws-sdk-go-v2/service/emrcontainers v1.36.1 github.com/aws/aws-sdk-go-v2/service/emrserverless v1.33.0 github.com/aws/aws-sdk-go-v2/service/eventbridge v1.42.0 github.com/aws/aws-sdk-go-v2/service/evidently v1.25.0 diff --git a/go.sum b/go.sum index 849b5ad22198..76b89c555bb4 100644 --- a/go.sum +++ b/go.sum @@ -241,8 +241,8 @@ github.com/aws/aws-sdk-go-v2/service/elastictranscoder v1.29.1 h1:qMs7UOiRWN5skm github.com/aws/aws-sdk-go-v2/service/elastictranscoder v1.29.1/go.mod h1:DThfdXM8k1f9rWh0nUVIqBA35+i8m9oNXdn7vbT9Aig= github.com/aws/aws-sdk-go-v2/service/emr v1.51.1 h1:uqDQXEq5AEju5XxbycnFiLdsK1+IbmaOqqqt0D3MaRM= github.com/aws/aws-sdk-go-v2/service/emr v1.51.1/go.mod h1:dYB/K65iH3LBAsSfE2V9hQMMZCWwZ/eskSnvwB+94Dg= -github.com/aws/aws-sdk-go-v2/service/emrcontainers v1.36.0 h1:k7LyV+sWRh89RDfSJnaENz/WljIQymxQ3IXG2wFgN7s= -github.com/aws/aws-sdk-go-v2/service/emrcontainers v1.36.0/go.mod h1:7ScX/Htt5dQoT1h7ANByeB6w86sYiZJGI7Xda3AaWNE= +github.com/aws/aws-sdk-go-v2/service/emrcontainers v1.36.1 h1:fatKIhCAmO39bB0XvT0aIsABOtNzirPHkY0O0mibr1I= +github.com/aws/aws-sdk-go-v2/service/emrcontainers v1.36.1/go.mod h1:JkeTS9XADAj2PRKxxzXLlp+pyyxAQpbaoIFo7ydRGBM= github.com/aws/aws-sdk-go-v2/service/emrserverless v1.33.0 h1:OpaVhGUsfEOaJpD0vx9xKUjMJKCQMnSb/t45DPffMuU= github.com/aws/aws-sdk-go-v2/service/emrserverless v1.33.0/go.mod h1:nF4xD0Oh/SOv7W2M1E79m2d7Qg4Si4aYAThsfLzxKyA= github.com/aws/aws-sdk-go-v2/service/eventbridge v1.42.0 h1:l27GhRdDuLyPISPOu+JKcdvnYuiyAl4s4yO64zR6qkw= From 2c5977c135b924047f6c01d3478e498fd2e12e55 Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 09:12:53 -0400 Subject: [PATCH 182/365] go get github.com/aws/aws-sdk-go-v2/service/emrserverless. --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index eceb5b066e37..54d8cb83608e 100644 --- a/go.mod +++ b/go.mod @@ -116,7 +116,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/elastictranscoder v1.29.1 github.com/aws/aws-sdk-go-v2/service/emr v1.51.1 github.com/aws/aws-sdk-go-v2/service/emrcontainers v1.36.1 - github.com/aws/aws-sdk-go-v2/service/emrserverless v1.33.0 + github.com/aws/aws-sdk-go-v2/service/emrserverless v1.33.1 github.com/aws/aws-sdk-go-v2/service/eventbridge v1.42.0 github.com/aws/aws-sdk-go-v2/service/evidently v1.25.0 github.com/aws/aws-sdk-go-v2/service/evs v1.1.0 diff --git a/go.sum b/go.sum index 76b89c555bb4..8f6da0075b52 100644 --- a/go.sum +++ b/go.sum @@ -243,8 +243,8 @@ github.com/aws/aws-sdk-go-v2/service/emr v1.51.1 h1:uqDQXEq5AEju5XxbycnFiLdsK1+I github.com/aws/aws-sdk-go-v2/service/emr v1.51.1/go.mod h1:dYB/K65iH3LBAsSfE2V9hQMMZCWwZ/eskSnvwB+94Dg= github.com/aws/aws-sdk-go-v2/service/emrcontainers v1.36.1 h1:fatKIhCAmO39bB0XvT0aIsABOtNzirPHkY0O0mibr1I= github.com/aws/aws-sdk-go-v2/service/emrcontainers v1.36.1/go.mod h1:JkeTS9XADAj2PRKxxzXLlp+pyyxAQpbaoIFo7ydRGBM= -github.com/aws/aws-sdk-go-v2/service/emrserverless v1.33.0 h1:OpaVhGUsfEOaJpD0vx9xKUjMJKCQMnSb/t45DPffMuU= -github.com/aws/aws-sdk-go-v2/service/emrserverless v1.33.0/go.mod h1:nF4xD0Oh/SOv7W2M1E79m2d7Qg4Si4aYAThsfLzxKyA= +github.com/aws/aws-sdk-go-v2/service/emrserverless v1.33.1 h1:uFi7sYl7SR4WLG3h+L1rW/HFolCi/L/hWHG9fnj1c+Y= +github.com/aws/aws-sdk-go-v2/service/emrserverless v1.33.1/go.mod h1:puDjU4Zu69ZZjkh5L2RyR5T3TVJDeWmQhXV0ZpSfZg0= github.com/aws/aws-sdk-go-v2/service/eventbridge v1.42.0 h1:l27GhRdDuLyPISPOu+JKcdvnYuiyAl4s4yO64zR6qkw= github.com/aws/aws-sdk-go-v2/service/eventbridge v1.42.0/go.mod h1:zoKUO71V/CLObAxgUDUrZdiVzTnEDdPLTDs+kioCjhQ= github.com/aws/aws-sdk-go-v2/service/evidently v1.25.0 h1:WEUJQIr1pPIPGvx4H8yNwJ5mtwlgQApajbjlXH9N2Tk= From afc0e42b26dca0692871b029666e8acd393cfdfd Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 09:12:54 -0400 Subject: [PATCH 183/365] go get github.com/aws/aws-sdk-go-v2/service/eventbridge. --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 54d8cb83608e..ff058211c567 100644 --- a/go.mod +++ b/go.mod @@ -117,7 +117,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/emr v1.51.1 github.com/aws/aws-sdk-go-v2/service/emrcontainers v1.36.1 github.com/aws/aws-sdk-go-v2/service/emrserverless v1.33.1 - github.com/aws/aws-sdk-go-v2/service/eventbridge v1.42.0 + github.com/aws/aws-sdk-go-v2/service/eventbridge v1.42.1 github.com/aws/aws-sdk-go-v2/service/evidently v1.25.0 github.com/aws/aws-sdk-go-v2/service/evs v1.1.0 github.com/aws/aws-sdk-go-v2/service/finspace v1.30.0 diff --git a/go.sum b/go.sum index 8f6da0075b52..65d59849fb3a 100644 --- a/go.sum +++ b/go.sum @@ -245,8 +245,8 @@ github.com/aws/aws-sdk-go-v2/service/emrcontainers v1.36.1 h1:fatKIhCAmO39bB0XvT github.com/aws/aws-sdk-go-v2/service/emrcontainers v1.36.1/go.mod h1:JkeTS9XADAj2PRKxxzXLlp+pyyxAQpbaoIFo7ydRGBM= github.com/aws/aws-sdk-go-v2/service/emrserverless v1.33.1 h1:uFi7sYl7SR4WLG3h+L1rW/HFolCi/L/hWHG9fnj1c+Y= github.com/aws/aws-sdk-go-v2/service/emrserverless v1.33.1/go.mod h1:puDjU4Zu69ZZjkh5L2RyR5T3TVJDeWmQhXV0ZpSfZg0= -github.com/aws/aws-sdk-go-v2/service/eventbridge v1.42.0 h1:l27GhRdDuLyPISPOu+JKcdvnYuiyAl4s4yO64zR6qkw= -github.com/aws/aws-sdk-go-v2/service/eventbridge v1.42.0/go.mod h1:zoKUO71V/CLObAxgUDUrZdiVzTnEDdPLTDs+kioCjhQ= +github.com/aws/aws-sdk-go-v2/service/eventbridge v1.42.1 h1:ME8HTzLgCmHN32s9KChZexwyouSyLPvDn2LJl4r89OE= +github.com/aws/aws-sdk-go-v2/service/eventbridge v1.42.1/go.mod h1:lJVM+ARsu8r3lf4dR0RLB1G6NToIJQRb0Gu6ykAMGCM= github.com/aws/aws-sdk-go-v2/service/evidently v1.25.0 h1:WEUJQIr1pPIPGvx4H8yNwJ5mtwlgQApajbjlXH9N2Tk= github.com/aws/aws-sdk-go-v2/service/evidently v1.25.0/go.mod h1:/J0EeOVNuN3qwAiP4Xpl8TJaNUmErD4hzMqCNyZcYcI= github.com/aws/aws-sdk-go-v2/service/evs v1.1.0 h1:ZU++KlQRtBqiYmziZUv0IzsooDkNHpTRFdZS9dLtxag= From ffd5c9b311df87b2fdd4dcb7d069e78a4f8a6236 Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 09:12:55 -0400 Subject: [PATCH 184/365] go get github.com/aws/aws-sdk-go-v2/service/evidently. --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index ff058211c567..bb332b854c62 100644 --- a/go.mod +++ b/go.mod @@ -118,7 +118,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/emrcontainers v1.36.1 github.com/aws/aws-sdk-go-v2/service/emrserverless v1.33.1 github.com/aws/aws-sdk-go-v2/service/eventbridge v1.42.1 - github.com/aws/aws-sdk-go-v2/service/evidently v1.25.0 + github.com/aws/aws-sdk-go-v2/service/evidently v1.25.1 github.com/aws/aws-sdk-go-v2/service/evs v1.1.0 github.com/aws/aws-sdk-go-v2/service/finspace v1.30.0 github.com/aws/aws-sdk-go-v2/service/firehose v1.38.0 diff --git a/go.sum b/go.sum index 65d59849fb3a..d7c58d0d0533 100644 --- a/go.sum +++ b/go.sum @@ -247,8 +247,8 @@ github.com/aws/aws-sdk-go-v2/service/emrserverless v1.33.1 h1:uFi7sYl7SR4WLG3h+L github.com/aws/aws-sdk-go-v2/service/emrserverless v1.33.1/go.mod h1:puDjU4Zu69ZZjkh5L2RyR5T3TVJDeWmQhXV0ZpSfZg0= github.com/aws/aws-sdk-go-v2/service/eventbridge v1.42.1 h1:ME8HTzLgCmHN32s9KChZexwyouSyLPvDn2LJl4r89OE= github.com/aws/aws-sdk-go-v2/service/eventbridge v1.42.1/go.mod h1:lJVM+ARsu8r3lf4dR0RLB1G6NToIJQRb0Gu6ykAMGCM= -github.com/aws/aws-sdk-go-v2/service/evidently v1.25.0 h1:WEUJQIr1pPIPGvx4H8yNwJ5mtwlgQApajbjlXH9N2Tk= -github.com/aws/aws-sdk-go-v2/service/evidently v1.25.0/go.mod h1:/J0EeOVNuN3qwAiP4Xpl8TJaNUmErD4hzMqCNyZcYcI= +github.com/aws/aws-sdk-go-v2/service/evidently v1.25.1 h1:NhuU+ww2xUvZoMLQ2dLmTcZUt9rbU0avHsdAAgkl6fU= +github.com/aws/aws-sdk-go-v2/service/evidently v1.25.1/go.mod h1:tpNT0uaDvJIpW3ykBc3dQ+nr1SEnf/7RgExF6oD3sG4= github.com/aws/aws-sdk-go-v2/service/evs v1.1.0 h1:ZU++KlQRtBqiYmziZUv0IzsooDkNHpTRFdZS9dLtxag= github.com/aws/aws-sdk-go-v2/service/evs v1.1.0/go.mod h1:cWpiiINkFonIOhy6EzG/wiewt8qg75DcP2QleRnmHrs= github.com/aws/aws-sdk-go-v2/service/finspace v1.30.0 h1:2huq+VfgjyU3oJ3sa60omjhqAc0bF3WVqBZJ/uk5wyE= From 84b948b646e622d4bd6290f99bc42d2184b61d6f Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 09:12:56 -0400 Subject: [PATCH 185/365] go get github.com/aws/aws-sdk-go-v2/service/evs. --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index bb332b854c62..3853e7c344b5 100644 --- a/go.mod +++ b/go.mod @@ -119,7 +119,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/emrserverless v1.33.1 github.com/aws/aws-sdk-go-v2/service/eventbridge v1.42.1 github.com/aws/aws-sdk-go-v2/service/evidently v1.25.1 - github.com/aws/aws-sdk-go-v2/service/evs v1.1.0 + github.com/aws/aws-sdk-go-v2/service/evs v1.1.1 github.com/aws/aws-sdk-go-v2/service/finspace v1.30.0 github.com/aws/aws-sdk-go-v2/service/firehose v1.38.0 github.com/aws/aws-sdk-go-v2/service/fis v1.34.0 diff --git a/go.sum b/go.sum index d7c58d0d0533..7eecae014a78 100644 --- a/go.sum +++ b/go.sum @@ -249,8 +249,8 @@ github.com/aws/aws-sdk-go-v2/service/eventbridge v1.42.1 h1:ME8HTzLgCmHN32s9KChZ github.com/aws/aws-sdk-go-v2/service/eventbridge v1.42.1/go.mod h1:lJVM+ARsu8r3lf4dR0RLB1G6NToIJQRb0Gu6ykAMGCM= github.com/aws/aws-sdk-go-v2/service/evidently v1.25.1 h1:NhuU+ww2xUvZoMLQ2dLmTcZUt9rbU0avHsdAAgkl6fU= github.com/aws/aws-sdk-go-v2/service/evidently v1.25.1/go.mod h1:tpNT0uaDvJIpW3ykBc3dQ+nr1SEnf/7RgExF6oD3sG4= -github.com/aws/aws-sdk-go-v2/service/evs v1.1.0 h1:ZU++KlQRtBqiYmziZUv0IzsooDkNHpTRFdZS9dLtxag= -github.com/aws/aws-sdk-go-v2/service/evs v1.1.0/go.mod h1:cWpiiINkFonIOhy6EzG/wiewt8qg75DcP2QleRnmHrs= +github.com/aws/aws-sdk-go-v2/service/evs v1.1.1 h1:/CDLFn0/JzQkRPudFgezHiocIyi466amw3+RcxvfZSY= +github.com/aws/aws-sdk-go-v2/service/evs v1.1.1/go.mod h1:Uz/HiziBhzCTge8mOxy8l2oMiS4Zsqr2uO52hRs7jLI= github.com/aws/aws-sdk-go-v2/service/finspace v1.30.0 h1:2huq+VfgjyU3oJ3sa60omjhqAc0bF3WVqBZJ/uk5wyE= github.com/aws/aws-sdk-go-v2/service/finspace v1.30.0/go.mod h1:Dr73jHRmcVV152WoNWDAlMOoeejVprl7NtRYUBEM/Rw= github.com/aws/aws-sdk-go-v2/service/firehose v1.38.0 h1:+d8gLehVcLuLuW/pm0NkmShfYKUfs5xb138S/rQ71TI= From 6808e8a3a88d581800b06526c779e156bde5a2c7 Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 09:12:58 -0400 Subject: [PATCH 186/365] go get github.com/aws/aws-sdk-go-v2/service/finspace. --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 3853e7c344b5..abef8e80ce99 100644 --- a/go.mod +++ b/go.mod @@ -120,7 +120,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/eventbridge v1.42.1 github.com/aws/aws-sdk-go-v2/service/evidently v1.25.1 github.com/aws/aws-sdk-go-v2/service/evs v1.1.1 - github.com/aws/aws-sdk-go-v2/service/finspace v1.30.0 + github.com/aws/aws-sdk-go-v2/service/finspace v1.30.1 github.com/aws/aws-sdk-go-v2/service/firehose v1.38.0 github.com/aws/aws-sdk-go-v2/service/fis v1.34.0 github.com/aws/aws-sdk-go-v2/service/fms v1.41.0 diff --git a/go.sum b/go.sum index 7eecae014a78..b9191ea8e8d3 100644 --- a/go.sum +++ b/go.sum @@ -251,8 +251,8 @@ github.com/aws/aws-sdk-go-v2/service/evidently v1.25.1 h1:NhuU+ww2xUvZoMLQ2dLmTc github.com/aws/aws-sdk-go-v2/service/evidently v1.25.1/go.mod h1:tpNT0uaDvJIpW3ykBc3dQ+nr1SEnf/7RgExF6oD3sG4= github.com/aws/aws-sdk-go-v2/service/evs v1.1.1 h1:/CDLFn0/JzQkRPudFgezHiocIyi466amw3+RcxvfZSY= github.com/aws/aws-sdk-go-v2/service/evs v1.1.1/go.mod h1:Uz/HiziBhzCTge8mOxy8l2oMiS4Zsqr2uO52hRs7jLI= -github.com/aws/aws-sdk-go-v2/service/finspace v1.30.0 h1:2huq+VfgjyU3oJ3sa60omjhqAc0bF3WVqBZJ/uk5wyE= -github.com/aws/aws-sdk-go-v2/service/finspace v1.30.0/go.mod h1:Dr73jHRmcVV152WoNWDAlMOoeejVprl7NtRYUBEM/Rw= +github.com/aws/aws-sdk-go-v2/service/finspace v1.30.1 h1:V0gqQtpjjOtrt1Lede0xuTIa5DCf5geHAeEnFmeEqdU= +github.com/aws/aws-sdk-go-v2/service/finspace v1.30.1/go.mod h1:rA1xygzkTSu7WWIhd5QS7QHb6910QBIBe2rN+HTtbqo= github.com/aws/aws-sdk-go-v2/service/firehose v1.38.0 h1:+d8gLehVcLuLuW/pm0NkmShfYKUfs5xb138S/rQ71TI= github.com/aws/aws-sdk-go-v2/service/firehose v1.38.0/go.mod h1:2jUHIaZATMAn0IskCYjb/rSn+X9kGlPtqHgjjMUp7Vo= github.com/aws/aws-sdk-go-v2/service/fis v1.34.0 h1:34Des7RjR1iGhV4YPgxGuiCfTF57LzYRWfNksCOV8Js= From 34595b3a5361fa00027847e76a3e0ea144a9f1d5 Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 09:12:59 -0400 Subject: [PATCH 187/365] go get github.com/aws/aws-sdk-go-v2/service/firehose. --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index abef8e80ce99..2fe8eb607f1a 100644 --- a/go.mod +++ b/go.mod @@ -121,7 +121,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/evidently v1.25.1 github.com/aws/aws-sdk-go-v2/service/evs v1.1.1 github.com/aws/aws-sdk-go-v2/service/finspace v1.30.1 - github.com/aws/aws-sdk-go-v2/service/firehose v1.38.0 + github.com/aws/aws-sdk-go-v2/service/firehose v1.38.1 github.com/aws/aws-sdk-go-v2/service/fis v1.34.0 github.com/aws/aws-sdk-go-v2/service/fms v1.41.0 github.com/aws/aws-sdk-go-v2/service/fsx v1.56.0 diff --git a/go.sum b/go.sum index b9191ea8e8d3..31a84ee15cfe 100644 --- a/go.sum +++ b/go.sum @@ -253,8 +253,8 @@ github.com/aws/aws-sdk-go-v2/service/evs v1.1.1 h1:/CDLFn0/JzQkRPudFgezHiocIyi46 github.com/aws/aws-sdk-go-v2/service/evs v1.1.1/go.mod h1:Uz/HiziBhzCTge8mOxy8l2oMiS4Zsqr2uO52hRs7jLI= github.com/aws/aws-sdk-go-v2/service/finspace v1.30.1 h1:V0gqQtpjjOtrt1Lede0xuTIa5DCf5geHAeEnFmeEqdU= github.com/aws/aws-sdk-go-v2/service/finspace v1.30.1/go.mod h1:rA1xygzkTSu7WWIhd5QS7QHb6910QBIBe2rN+HTtbqo= -github.com/aws/aws-sdk-go-v2/service/firehose v1.38.0 h1:+d8gLehVcLuLuW/pm0NkmShfYKUfs5xb138S/rQ71TI= -github.com/aws/aws-sdk-go-v2/service/firehose v1.38.0/go.mod h1:2jUHIaZATMAn0IskCYjb/rSn+X9kGlPtqHgjjMUp7Vo= +github.com/aws/aws-sdk-go-v2/service/firehose v1.38.1 h1:D5mbw/YzZ9ibZT/SZcc+jppu1EC2YPBXC7n60gEYHhw= +github.com/aws/aws-sdk-go-v2/service/firehose v1.38.1/go.mod h1:nvVn2pz5jdhGbwcYzJ/o+kbZXRwjblofi3stc2mfKpk= github.com/aws/aws-sdk-go-v2/service/fis v1.34.0 h1:34Des7RjR1iGhV4YPgxGuiCfTF57LzYRWfNksCOV8Js= github.com/aws/aws-sdk-go-v2/service/fis v1.34.0/go.mod h1:lCVer9bQSEVsBpUJvLuxxEjWptiPB3RGzOa+6wQBtuQ= github.com/aws/aws-sdk-go-v2/service/fms v1.41.0 h1:T1pXmtrxc4mC6xJ7oD8fbxD4fhM4LNkkbZ9X2b/vn/w= From 9fe548690d8550f8e2032bc6a508278734a391d1 Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 09:13:00 -0400 Subject: [PATCH 188/365] go get github.com/aws/aws-sdk-go-v2/service/fis. --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 2fe8eb607f1a..d4a9d9b3bdc4 100644 --- a/go.mod +++ b/go.mod @@ -122,7 +122,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/evs v1.1.1 github.com/aws/aws-sdk-go-v2/service/finspace v1.30.1 github.com/aws/aws-sdk-go-v2/service/firehose v1.38.1 - github.com/aws/aws-sdk-go-v2/service/fis v1.34.0 + github.com/aws/aws-sdk-go-v2/service/fis v1.34.1 github.com/aws/aws-sdk-go-v2/service/fms v1.41.0 github.com/aws/aws-sdk-go-v2/service/fsx v1.56.0 github.com/aws/aws-sdk-go-v2/service/gamelift v1.43.0 diff --git a/go.sum b/go.sum index 31a84ee15cfe..175241a1264d 100644 --- a/go.sum +++ b/go.sum @@ -255,8 +255,8 @@ github.com/aws/aws-sdk-go-v2/service/finspace v1.30.1 h1:V0gqQtpjjOtrt1Lede0xuTI github.com/aws/aws-sdk-go-v2/service/finspace v1.30.1/go.mod h1:rA1xygzkTSu7WWIhd5QS7QHb6910QBIBe2rN+HTtbqo= github.com/aws/aws-sdk-go-v2/service/firehose v1.38.1 h1:D5mbw/YzZ9ibZT/SZcc+jppu1EC2YPBXC7n60gEYHhw= github.com/aws/aws-sdk-go-v2/service/firehose v1.38.1/go.mod h1:nvVn2pz5jdhGbwcYzJ/o+kbZXRwjblofi3stc2mfKpk= -github.com/aws/aws-sdk-go-v2/service/fis v1.34.0 h1:34Des7RjR1iGhV4YPgxGuiCfTF57LzYRWfNksCOV8Js= -github.com/aws/aws-sdk-go-v2/service/fis v1.34.0/go.mod h1:lCVer9bQSEVsBpUJvLuxxEjWptiPB3RGzOa+6wQBtuQ= +github.com/aws/aws-sdk-go-v2/service/fis v1.34.1 h1:gEd15BudHu1LEW7cE+78CjASMvxrK36z1Z1ayzMwnbQ= +github.com/aws/aws-sdk-go-v2/service/fis v1.34.1/go.mod h1:F5SaK324QSusZ4YLbuROwZ2ZUaczsr4uGTNQK0cTjxA= github.com/aws/aws-sdk-go-v2/service/fms v1.41.0 h1:T1pXmtrxc4mC6xJ7oD8fbxD4fhM4LNkkbZ9X2b/vn/w= github.com/aws/aws-sdk-go-v2/service/fms v1.41.0/go.mod h1:wqTDRhJUKSIpBlHpiyK4TIVpaO/6nSO9lEmMF+T/YOY= github.com/aws/aws-sdk-go-v2/service/fsx v1.56.0 h1:DLq+0rS213xUZ/XCXDSmSxI9z0KUGqU/qTmdqQwRNY0= From cb3b5c801562cc26afa4b34694270ac2f636389b Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 09:13:01 -0400 Subject: [PATCH 189/365] go get github.com/aws/aws-sdk-go-v2/service/fms. --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index d4a9d9b3bdc4..354c494b8c7a 100644 --- a/go.mod +++ b/go.mod @@ -123,7 +123,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/finspace v1.30.1 github.com/aws/aws-sdk-go-v2/service/firehose v1.38.1 github.com/aws/aws-sdk-go-v2/service/fis v1.34.1 - github.com/aws/aws-sdk-go-v2/service/fms v1.41.0 + github.com/aws/aws-sdk-go-v2/service/fms v1.41.1 github.com/aws/aws-sdk-go-v2/service/fsx v1.56.0 github.com/aws/aws-sdk-go-v2/service/gamelift v1.43.0 github.com/aws/aws-sdk-go-v2/service/glacier v1.28.0 diff --git a/go.sum b/go.sum index 175241a1264d..15c14040e9d1 100644 --- a/go.sum +++ b/go.sum @@ -257,8 +257,8 @@ github.com/aws/aws-sdk-go-v2/service/firehose v1.38.1 h1:D5mbw/YzZ9ibZT/SZcc+jpp github.com/aws/aws-sdk-go-v2/service/firehose v1.38.1/go.mod h1:nvVn2pz5jdhGbwcYzJ/o+kbZXRwjblofi3stc2mfKpk= github.com/aws/aws-sdk-go-v2/service/fis v1.34.1 h1:gEd15BudHu1LEW7cE+78CjASMvxrK36z1Z1ayzMwnbQ= github.com/aws/aws-sdk-go-v2/service/fis v1.34.1/go.mod h1:F5SaK324QSusZ4YLbuROwZ2ZUaczsr4uGTNQK0cTjxA= -github.com/aws/aws-sdk-go-v2/service/fms v1.41.0 h1:T1pXmtrxc4mC6xJ7oD8fbxD4fhM4LNkkbZ9X2b/vn/w= -github.com/aws/aws-sdk-go-v2/service/fms v1.41.0/go.mod h1:wqTDRhJUKSIpBlHpiyK4TIVpaO/6nSO9lEmMF+T/YOY= +github.com/aws/aws-sdk-go-v2/service/fms v1.41.1 h1:b+ol8ooL9qFSVulRN7gT7LMPbCeSXYhS5irfU3U+gJU= +github.com/aws/aws-sdk-go-v2/service/fms v1.41.1/go.mod h1:H7I1xzO0zfGnTGLO5KxdFi3Sv2aHBm/LSEt/ECnMTbE= github.com/aws/aws-sdk-go-v2/service/fsx v1.56.0 h1:DLq+0rS213xUZ/XCXDSmSxI9z0KUGqU/qTmdqQwRNY0= github.com/aws/aws-sdk-go-v2/service/fsx v1.56.0/go.mod h1:vyVH/XKwbSKgpemHYtmCxmLQQyAhrpKqjPnJQOno+PY= github.com/aws/aws-sdk-go-v2/service/gamelift v1.43.0 h1:9FoSk6Mledd77YvHiIHhKVCQq+0ZcwDBKogzJODXzKI= From ce1de583256a3d55550fe4168af44899e3d5a803 Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 09:13:02 -0400 Subject: [PATCH 190/365] go get github.com/aws/aws-sdk-go-v2/service/fsx. --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 354c494b8c7a..2d0136b162ae 100644 --- a/go.mod +++ b/go.mod @@ -124,7 +124,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/firehose v1.38.1 github.com/aws/aws-sdk-go-v2/service/fis v1.34.1 github.com/aws/aws-sdk-go-v2/service/fms v1.41.1 - github.com/aws/aws-sdk-go-v2/service/fsx v1.56.0 + github.com/aws/aws-sdk-go-v2/service/fsx v1.56.1 github.com/aws/aws-sdk-go-v2/service/gamelift v1.43.0 github.com/aws/aws-sdk-go-v2/service/glacier v1.28.0 github.com/aws/aws-sdk-go-v2/service/globalaccelerator v1.31.0 diff --git a/go.sum b/go.sum index 15c14040e9d1..d7cd00c5a6d6 100644 --- a/go.sum +++ b/go.sum @@ -259,8 +259,8 @@ github.com/aws/aws-sdk-go-v2/service/fis v1.34.1 h1:gEd15BudHu1LEW7cE+78CjASMvxr github.com/aws/aws-sdk-go-v2/service/fis v1.34.1/go.mod h1:F5SaK324QSusZ4YLbuROwZ2ZUaczsr4uGTNQK0cTjxA= github.com/aws/aws-sdk-go-v2/service/fms v1.41.1 h1:b+ol8ooL9qFSVulRN7gT7LMPbCeSXYhS5irfU3U+gJU= github.com/aws/aws-sdk-go-v2/service/fms v1.41.1/go.mod h1:H7I1xzO0zfGnTGLO5KxdFi3Sv2aHBm/LSEt/ECnMTbE= -github.com/aws/aws-sdk-go-v2/service/fsx v1.56.0 h1:DLq+0rS213xUZ/XCXDSmSxI9z0KUGqU/qTmdqQwRNY0= -github.com/aws/aws-sdk-go-v2/service/fsx v1.56.0/go.mod h1:vyVH/XKwbSKgpemHYtmCxmLQQyAhrpKqjPnJQOno+PY= +github.com/aws/aws-sdk-go-v2/service/fsx v1.56.1 h1:CYITpNYHh86TCr2VJbo9x3BCbHepyF5Tah0P/Z12bqg= +github.com/aws/aws-sdk-go-v2/service/fsx v1.56.1/go.mod h1:vAxwTvmBYSfkC8qVllyQyL7XCgwQpYuUbGjyL/djBD4= github.com/aws/aws-sdk-go-v2/service/gamelift v1.43.0 h1:9FoSk6Mledd77YvHiIHhKVCQq+0ZcwDBKogzJODXzKI= github.com/aws/aws-sdk-go-v2/service/gamelift v1.43.0/go.mod h1:LEHLPJxEVb6RIzZVS+BrPiI9DbxM9V/gfnwrRETd5mU= github.com/aws/aws-sdk-go-v2/service/glacier v1.28.0 h1:e6fU7fjvxSd4vEtIK+7NNXIUcCaqxR1atfPY0HfqciU= From 5519bb500234353b44ae46a3e951dd1f34702501 Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 09:13:04 -0400 Subject: [PATCH 191/365] go get github.com/aws/aws-sdk-go-v2/service/gamelift. --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 2d0136b162ae..4c080411ed58 100644 --- a/go.mod +++ b/go.mod @@ -125,7 +125,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/fis v1.34.1 github.com/aws/aws-sdk-go-v2/service/fms v1.41.1 github.com/aws/aws-sdk-go-v2/service/fsx v1.56.1 - github.com/aws/aws-sdk-go-v2/service/gamelift v1.43.0 + github.com/aws/aws-sdk-go-v2/service/gamelift v1.43.1 github.com/aws/aws-sdk-go-v2/service/glacier v1.28.0 github.com/aws/aws-sdk-go-v2/service/globalaccelerator v1.31.0 github.com/aws/aws-sdk-go-v2/service/glue v1.120.0 diff --git a/go.sum b/go.sum index d7cd00c5a6d6..a4b286c18495 100644 --- a/go.sum +++ b/go.sum @@ -261,8 +261,8 @@ github.com/aws/aws-sdk-go-v2/service/fms v1.41.1 h1:b+ol8ooL9qFSVulRN7gT7LMPbCeS github.com/aws/aws-sdk-go-v2/service/fms v1.41.1/go.mod h1:H7I1xzO0zfGnTGLO5KxdFi3Sv2aHBm/LSEt/ECnMTbE= github.com/aws/aws-sdk-go-v2/service/fsx v1.56.1 h1:CYITpNYHh86TCr2VJbo9x3BCbHepyF5Tah0P/Z12bqg= github.com/aws/aws-sdk-go-v2/service/fsx v1.56.1/go.mod h1:vAxwTvmBYSfkC8qVllyQyL7XCgwQpYuUbGjyL/djBD4= -github.com/aws/aws-sdk-go-v2/service/gamelift v1.43.0 h1:9FoSk6Mledd77YvHiIHhKVCQq+0ZcwDBKogzJODXzKI= -github.com/aws/aws-sdk-go-v2/service/gamelift v1.43.0/go.mod h1:LEHLPJxEVb6RIzZVS+BrPiI9DbxM9V/gfnwrRETd5mU= +github.com/aws/aws-sdk-go-v2/service/gamelift v1.43.1 h1:DgDl1xmkazdMYxjQgE6dUAZ/IV4DtEjsbiZAt+VgTc8= +github.com/aws/aws-sdk-go-v2/service/gamelift v1.43.1/go.mod h1:3ovhs4O2fcf1tFiUC0J7D253BXrI9w3/VVo49EBCI1E= github.com/aws/aws-sdk-go-v2/service/glacier v1.28.0 h1:e6fU7fjvxSd4vEtIK+7NNXIUcCaqxR1atfPY0HfqciU= github.com/aws/aws-sdk-go-v2/service/glacier v1.28.0/go.mod h1:XVxpTiuOepErZ9YjF8GR15NwsWumQ0d/9XN8DUK0TfM= github.com/aws/aws-sdk-go-v2/service/globalaccelerator v1.31.0 h1:nJoXTtdukUXmuSP9L5wzZVEqgUizq++ezBlFR5cUBRU= From d3bb1d3b6d574b9922d533d47ac60b4a248b7fe6 Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 09:13:05 -0400 Subject: [PATCH 192/365] go get github.com/aws/aws-sdk-go-v2/service/glacier. --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 4c080411ed58..b0c0c385fb5c 100644 --- a/go.mod +++ b/go.mod @@ -126,7 +126,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/fms v1.41.1 github.com/aws/aws-sdk-go-v2/service/fsx v1.56.1 github.com/aws/aws-sdk-go-v2/service/gamelift v1.43.1 - github.com/aws/aws-sdk-go-v2/service/glacier v1.28.0 + github.com/aws/aws-sdk-go-v2/service/glacier v1.28.1 github.com/aws/aws-sdk-go-v2/service/globalaccelerator v1.31.0 github.com/aws/aws-sdk-go-v2/service/glue v1.120.0 github.com/aws/aws-sdk-go-v2/service/grafana v1.28.0 diff --git a/go.sum b/go.sum index a4b286c18495..7ad2ae1ef002 100644 --- a/go.sum +++ b/go.sum @@ -263,8 +263,8 @@ github.com/aws/aws-sdk-go-v2/service/fsx v1.56.1 h1:CYITpNYHh86TCr2VJbo9x3BCbHep github.com/aws/aws-sdk-go-v2/service/fsx v1.56.1/go.mod h1:vAxwTvmBYSfkC8qVllyQyL7XCgwQpYuUbGjyL/djBD4= github.com/aws/aws-sdk-go-v2/service/gamelift v1.43.1 h1:DgDl1xmkazdMYxjQgE6dUAZ/IV4DtEjsbiZAt+VgTc8= github.com/aws/aws-sdk-go-v2/service/gamelift v1.43.1/go.mod h1:3ovhs4O2fcf1tFiUC0J7D253BXrI9w3/VVo49EBCI1E= -github.com/aws/aws-sdk-go-v2/service/glacier v1.28.0 h1:e6fU7fjvxSd4vEtIK+7NNXIUcCaqxR1atfPY0HfqciU= -github.com/aws/aws-sdk-go-v2/service/glacier v1.28.0/go.mod h1:XVxpTiuOepErZ9YjF8GR15NwsWumQ0d/9XN8DUK0TfM= +github.com/aws/aws-sdk-go-v2/service/glacier v1.28.1 h1:UDiRjAcoJ9pxHvwaR83mGhdkVhXqYY8tnLLyYbR/X+w= +github.com/aws/aws-sdk-go-v2/service/glacier v1.28.1/go.mod h1:JF/OUsjyuN42tFdT6Z7XPMUL0TdgQauFdpAjOlgPzMA= github.com/aws/aws-sdk-go-v2/service/globalaccelerator v1.31.0 h1:nJoXTtdukUXmuSP9L5wzZVEqgUizq++ezBlFR5cUBRU= github.com/aws/aws-sdk-go-v2/service/globalaccelerator v1.31.0/go.mod h1:tKuEYQ3VKTjnWfeZObMNHycMwPgRjliCucHuIipbYQo= github.com/aws/aws-sdk-go-v2/service/glue v1.120.0 h1:37y2TueEaBHD2dsRj6Xbs5NHjpD7iACydF2i3CN8KaI= From baa05e548b8e78f6fed9d5cc1c6f3ab22481a0cf Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 09:13:06 -0400 Subject: [PATCH 193/365] go get github.com/aws/aws-sdk-go-v2/service/globalaccelerator. --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index b0c0c385fb5c..da1f76fbe2c9 100644 --- a/go.mod +++ b/go.mod @@ -127,7 +127,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/fsx v1.56.1 github.com/aws/aws-sdk-go-v2/service/gamelift v1.43.1 github.com/aws/aws-sdk-go-v2/service/glacier v1.28.1 - github.com/aws/aws-sdk-go-v2/service/globalaccelerator v1.31.0 + github.com/aws/aws-sdk-go-v2/service/globalaccelerator v1.31.1 github.com/aws/aws-sdk-go-v2/service/glue v1.120.0 github.com/aws/aws-sdk-go-v2/service/grafana v1.28.0 github.com/aws/aws-sdk-go-v2/service/greengrass v1.29.0 diff --git a/go.sum b/go.sum index 7ad2ae1ef002..a0abf30da76e 100644 --- a/go.sum +++ b/go.sum @@ -265,8 +265,8 @@ github.com/aws/aws-sdk-go-v2/service/gamelift v1.43.1 h1:DgDl1xmkazdMYxjQgE6dUAZ github.com/aws/aws-sdk-go-v2/service/gamelift v1.43.1/go.mod h1:3ovhs4O2fcf1tFiUC0J7D253BXrI9w3/VVo49EBCI1E= github.com/aws/aws-sdk-go-v2/service/glacier v1.28.1 h1:UDiRjAcoJ9pxHvwaR83mGhdkVhXqYY8tnLLyYbR/X+w= github.com/aws/aws-sdk-go-v2/service/glacier v1.28.1/go.mod h1:JF/OUsjyuN42tFdT6Z7XPMUL0TdgQauFdpAjOlgPzMA= -github.com/aws/aws-sdk-go-v2/service/globalaccelerator v1.31.0 h1:nJoXTtdukUXmuSP9L5wzZVEqgUizq++ezBlFR5cUBRU= -github.com/aws/aws-sdk-go-v2/service/globalaccelerator v1.31.0/go.mod h1:tKuEYQ3VKTjnWfeZObMNHycMwPgRjliCucHuIipbYQo= +github.com/aws/aws-sdk-go-v2/service/globalaccelerator v1.31.1 h1:BlojjkVblgLjPzotny0DsKcfLBb/bC4ODhI9fXu/YpM= +github.com/aws/aws-sdk-go-v2/service/globalaccelerator v1.31.1/go.mod h1:BqZ/xicmt1yJLth0oV8o86GKsEIjF7XLKJA6o6+Tb4g= github.com/aws/aws-sdk-go-v2/service/glue v1.120.0 h1:37y2TueEaBHD2dsRj6Xbs5NHjpD7iACydF2i3CN8KaI= github.com/aws/aws-sdk-go-v2/service/glue v1.120.0/go.mod h1:OA/CbaZ2xxDebfm62rCXdhOLG6pbPQgfa1mLLIlpUAY= github.com/aws/aws-sdk-go-v2/service/grafana v1.28.0 h1:oT3CA19oYedSXRyJKMXx4IHVHgcqaPWM63W+d9G4F10= From 00e87d7c78e2b3e31231bac1f348dfa80160ea2d Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 09:13:07 -0400 Subject: [PATCH 194/365] go get github.com/aws/aws-sdk-go-v2/service/glue. --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index da1f76fbe2c9..fb9f32f7158d 100644 --- a/go.mod +++ b/go.mod @@ -128,7 +128,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/gamelift v1.43.1 github.com/aws/aws-sdk-go-v2/service/glacier v1.28.1 github.com/aws/aws-sdk-go-v2/service/globalaccelerator v1.31.1 - github.com/aws/aws-sdk-go-v2/service/glue v1.120.0 + github.com/aws/aws-sdk-go-v2/service/glue v1.120.1 github.com/aws/aws-sdk-go-v2/service/grafana v1.28.0 github.com/aws/aws-sdk-go-v2/service/greengrass v1.29.0 github.com/aws/aws-sdk-go-v2/service/groundstation v1.34.0 diff --git a/go.sum b/go.sum index a0abf30da76e..c0564368e707 100644 --- a/go.sum +++ b/go.sum @@ -267,8 +267,8 @@ github.com/aws/aws-sdk-go-v2/service/glacier v1.28.1 h1:UDiRjAcoJ9pxHvwaR83mGhdk github.com/aws/aws-sdk-go-v2/service/glacier v1.28.1/go.mod h1:JF/OUsjyuN42tFdT6Z7XPMUL0TdgQauFdpAjOlgPzMA= github.com/aws/aws-sdk-go-v2/service/globalaccelerator v1.31.1 h1:BlojjkVblgLjPzotny0DsKcfLBb/bC4ODhI9fXu/YpM= github.com/aws/aws-sdk-go-v2/service/globalaccelerator v1.31.1/go.mod h1:BqZ/xicmt1yJLth0oV8o86GKsEIjF7XLKJA6o6+Tb4g= -github.com/aws/aws-sdk-go-v2/service/glue v1.120.0 h1:37y2TueEaBHD2dsRj6Xbs5NHjpD7iACydF2i3CN8KaI= -github.com/aws/aws-sdk-go-v2/service/glue v1.120.0/go.mod h1:OA/CbaZ2xxDebfm62rCXdhOLG6pbPQgfa1mLLIlpUAY= +github.com/aws/aws-sdk-go-v2/service/glue v1.120.1 h1:+XyO1sIwM4J7Ru5bGlUIkFF3BuSVHp9xHBDKLKt205g= +github.com/aws/aws-sdk-go-v2/service/glue v1.120.1/go.mod h1:GrfuFuhLuhdZy8Tx0W29A6avb0+Xey8DDS0izAj3/gY= github.com/aws/aws-sdk-go-v2/service/grafana v1.28.0 h1:oT3CA19oYedSXRyJKMXx4IHVHgcqaPWM63W+d9G4F10= github.com/aws/aws-sdk-go-v2/service/grafana v1.28.0/go.mod h1:fq5/ey90xYUVylpeEcLpE7B7l+aJ5p5a4VeS67ulNuc= github.com/aws/aws-sdk-go-v2/service/greengrass v1.29.0 h1:5a775AVaSGDIW8B9p5zziOzhR/Tisn5DEd9NOdb4sKg= From 0de1fc9c8685354f5ff027f75d32415ceb4a5fe6 Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 09:13:08 -0400 Subject: [PATCH 195/365] go get github.com/aws/aws-sdk-go-v2/service/grafana. --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index fb9f32f7158d..770f3dfdf77d 100644 --- a/go.mod +++ b/go.mod @@ -129,7 +129,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/glacier v1.28.1 github.com/aws/aws-sdk-go-v2/service/globalaccelerator v1.31.1 github.com/aws/aws-sdk-go-v2/service/glue v1.120.1 - github.com/aws/aws-sdk-go-v2/service/grafana v1.28.0 + github.com/aws/aws-sdk-go-v2/service/grafana v1.28.1 github.com/aws/aws-sdk-go-v2/service/greengrass v1.29.0 github.com/aws/aws-sdk-go-v2/service/groundstation v1.34.0 github.com/aws/aws-sdk-go-v2/service/guardduty v1.58.0 diff --git a/go.sum b/go.sum index c0564368e707..76fd8ba0c7f2 100644 --- a/go.sum +++ b/go.sum @@ -269,8 +269,8 @@ github.com/aws/aws-sdk-go-v2/service/globalaccelerator v1.31.1 h1:BlojjkVblgLjPz github.com/aws/aws-sdk-go-v2/service/globalaccelerator v1.31.1/go.mod h1:BqZ/xicmt1yJLth0oV8o86GKsEIjF7XLKJA6o6+Tb4g= github.com/aws/aws-sdk-go-v2/service/glue v1.120.1 h1:+XyO1sIwM4J7Ru5bGlUIkFF3BuSVHp9xHBDKLKt205g= github.com/aws/aws-sdk-go-v2/service/glue v1.120.1/go.mod h1:GrfuFuhLuhdZy8Tx0W29A6avb0+Xey8DDS0izAj3/gY= -github.com/aws/aws-sdk-go-v2/service/grafana v1.28.0 h1:oT3CA19oYedSXRyJKMXx4IHVHgcqaPWM63W+d9G4F10= -github.com/aws/aws-sdk-go-v2/service/grafana v1.28.0/go.mod h1:fq5/ey90xYUVylpeEcLpE7B7l+aJ5p5a4VeS67ulNuc= +github.com/aws/aws-sdk-go-v2/service/grafana v1.28.1 h1:xef5GSQwdnBBEodb67YGYE7CanW5uuQyI/8q+rMs6IE= +github.com/aws/aws-sdk-go-v2/service/grafana v1.28.1/go.mod h1:wejuc0EF416jLYLVi4yyRZiZLtBwIPHR+L0fUnTlMeU= github.com/aws/aws-sdk-go-v2/service/greengrass v1.29.0 h1:5a775AVaSGDIW8B9p5zziOzhR/Tisn5DEd9NOdb4sKg= github.com/aws/aws-sdk-go-v2/service/greengrass v1.29.0/go.mod h1:Tk/mhJafpWML0i6WgBEQ5jEIMcgLdfbR5FI3O4TuZRg= github.com/aws/aws-sdk-go-v2/service/groundstation v1.34.0 h1:3UJxvzil4EshLiM5q9wFbS8Y0rPFh+yErZzisZC0/3U= From bf8554b63926f3909782b41d5b330f2f33155528 Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 09:13:09 -0400 Subject: [PATCH 196/365] go get github.com/aws/aws-sdk-go-v2/service/greengrass. --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 770f3dfdf77d..c0d51fe89e45 100644 --- a/go.mod +++ b/go.mod @@ -130,7 +130,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/globalaccelerator v1.31.1 github.com/aws/aws-sdk-go-v2/service/glue v1.120.1 github.com/aws/aws-sdk-go-v2/service/grafana v1.28.1 - github.com/aws/aws-sdk-go-v2/service/greengrass v1.29.0 + github.com/aws/aws-sdk-go-v2/service/greengrass v1.29.1 github.com/aws/aws-sdk-go-v2/service/groundstation v1.34.0 github.com/aws/aws-sdk-go-v2/service/guardduty v1.58.0 github.com/aws/aws-sdk-go-v2/service/healthlake v1.31.0 diff --git a/go.sum b/go.sum index 76fd8ba0c7f2..313ee985a61c 100644 --- a/go.sum +++ b/go.sum @@ -271,8 +271,8 @@ github.com/aws/aws-sdk-go-v2/service/glue v1.120.1 h1:+XyO1sIwM4J7Ru5bGlUIkFF3Bu github.com/aws/aws-sdk-go-v2/service/glue v1.120.1/go.mod h1:GrfuFuhLuhdZy8Tx0W29A6avb0+Xey8DDS0izAj3/gY= github.com/aws/aws-sdk-go-v2/service/grafana v1.28.1 h1:xef5GSQwdnBBEodb67YGYE7CanW5uuQyI/8q+rMs6IE= github.com/aws/aws-sdk-go-v2/service/grafana v1.28.1/go.mod h1:wejuc0EF416jLYLVi4yyRZiZLtBwIPHR+L0fUnTlMeU= -github.com/aws/aws-sdk-go-v2/service/greengrass v1.29.0 h1:5a775AVaSGDIW8B9p5zziOzhR/Tisn5DEd9NOdb4sKg= -github.com/aws/aws-sdk-go-v2/service/greengrass v1.29.0/go.mod h1:Tk/mhJafpWML0i6WgBEQ5jEIMcgLdfbR5FI3O4TuZRg= +github.com/aws/aws-sdk-go-v2/service/greengrass v1.29.1 h1:OiVM4eAVc1Ixumpnf4wQTJVHGA01qjzZlvaisWUBx08= +github.com/aws/aws-sdk-go-v2/service/greengrass v1.29.1/go.mod h1:ctd0N/Z5NBrVk8DRHDnVPDGXLYgEIw1UvG2ia2Tgbvg= github.com/aws/aws-sdk-go-v2/service/groundstation v1.34.0 h1:3UJxvzil4EshLiM5q9wFbS8Y0rPFh+yErZzisZC0/3U= github.com/aws/aws-sdk-go-v2/service/groundstation v1.34.0/go.mod h1:96UiU9JwEI8ZYI34Uyl/9sGOWmJ7C/1xuYP7HJBo+zA= github.com/aws/aws-sdk-go-v2/service/guardduty v1.58.0 h1:LKtdhKyA6dArMy69ZkXxfYfCdlb4/LFd6L926ip88nA= From 878d827cd400b26b107e0cfc9902a6bbfcd74f88 Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 09:13:11 -0400 Subject: [PATCH 197/365] go get github.com/aws/aws-sdk-go-v2/service/groundstation. --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index c0d51fe89e45..3910088cfb86 100644 --- a/go.mod +++ b/go.mod @@ -131,7 +131,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/glue v1.120.1 github.com/aws/aws-sdk-go-v2/service/grafana v1.28.1 github.com/aws/aws-sdk-go-v2/service/greengrass v1.29.1 - github.com/aws/aws-sdk-go-v2/service/groundstation v1.34.0 + github.com/aws/aws-sdk-go-v2/service/groundstation v1.34.1 github.com/aws/aws-sdk-go-v2/service/guardduty v1.58.0 github.com/aws/aws-sdk-go-v2/service/healthlake v1.31.0 github.com/aws/aws-sdk-go-v2/service/iam v1.44.0 diff --git a/go.sum b/go.sum index 313ee985a61c..871dc1b67098 100644 --- a/go.sum +++ b/go.sum @@ -273,8 +273,8 @@ github.com/aws/aws-sdk-go-v2/service/grafana v1.28.1 h1:xef5GSQwdnBBEodb67YGYE7C github.com/aws/aws-sdk-go-v2/service/grafana v1.28.1/go.mod h1:wejuc0EF416jLYLVi4yyRZiZLtBwIPHR+L0fUnTlMeU= github.com/aws/aws-sdk-go-v2/service/greengrass v1.29.1 h1:OiVM4eAVc1Ixumpnf4wQTJVHGA01qjzZlvaisWUBx08= github.com/aws/aws-sdk-go-v2/service/greengrass v1.29.1/go.mod h1:ctd0N/Z5NBrVk8DRHDnVPDGXLYgEIw1UvG2ia2Tgbvg= -github.com/aws/aws-sdk-go-v2/service/groundstation v1.34.0 h1:3UJxvzil4EshLiM5q9wFbS8Y0rPFh+yErZzisZC0/3U= -github.com/aws/aws-sdk-go-v2/service/groundstation v1.34.0/go.mod h1:96UiU9JwEI8ZYI34Uyl/9sGOWmJ7C/1xuYP7HJBo+zA= +github.com/aws/aws-sdk-go-v2/service/groundstation v1.34.1 h1:dMBjI+4ScXf5fIeYI+70DHxC35hknZUYs2/u2ou9BZ0= +github.com/aws/aws-sdk-go-v2/service/groundstation v1.34.1/go.mod h1:co4tdt5zpodqW74jxLUio7V/EGMBNimy/8RJP8KF0vk= github.com/aws/aws-sdk-go-v2/service/guardduty v1.58.0 h1:LKtdhKyA6dArMy69ZkXxfYfCdlb4/LFd6L926ip88nA= github.com/aws/aws-sdk-go-v2/service/guardduty v1.58.0/go.mod h1:6g8oDJhcda8zS/7EJil0KMypkTn+uJLKp+Fs4XH7yT4= github.com/aws/aws-sdk-go-v2/service/healthlake v1.31.0 h1:LoxuW3vg4vpt8yhfJxr0PmID9TcoE8NNZ5W/BPU1Diw= From 73c1bb31b7f07db0d07b9a7c557b583012529aa4 Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 09:13:12 -0400 Subject: [PATCH 198/365] go get github.com/aws/aws-sdk-go-v2/service/guardduty. --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 3910088cfb86..669672e6288e 100644 --- a/go.mod +++ b/go.mod @@ -132,7 +132,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/grafana v1.28.1 github.com/aws/aws-sdk-go-v2/service/greengrass v1.29.1 github.com/aws/aws-sdk-go-v2/service/groundstation v1.34.1 - github.com/aws/aws-sdk-go-v2/service/guardduty v1.58.0 + github.com/aws/aws-sdk-go-v2/service/guardduty v1.58.1 github.com/aws/aws-sdk-go-v2/service/healthlake v1.31.0 github.com/aws/aws-sdk-go-v2/service/iam v1.44.0 github.com/aws/aws-sdk-go-v2/service/identitystore v1.29.0 diff --git a/go.sum b/go.sum index 871dc1b67098..e54a9708a459 100644 --- a/go.sum +++ b/go.sum @@ -275,8 +275,8 @@ github.com/aws/aws-sdk-go-v2/service/greengrass v1.29.1 h1:OiVM4eAVc1Ixumpnf4wQT github.com/aws/aws-sdk-go-v2/service/greengrass v1.29.1/go.mod h1:ctd0N/Z5NBrVk8DRHDnVPDGXLYgEIw1UvG2ia2Tgbvg= github.com/aws/aws-sdk-go-v2/service/groundstation v1.34.1 h1:dMBjI+4ScXf5fIeYI+70DHxC35hknZUYs2/u2ou9BZ0= github.com/aws/aws-sdk-go-v2/service/groundstation v1.34.1/go.mod h1:co4tdt5zpodqW74jxLUio7V/EGMBNimy/8RJP8KF0vk= -github.com/aws/aws-sdk-go-v2/service/guardduty v1.58.0 h1:LKtdhKyA6dArMy69ZkXxfYfCdlb4/LFd6L926ip88nA= -github.com/aws/aws-sdk-go-v2/service/guardduty v1.58.0/go.mod h1:6g8oDJhcda8zS/7EJil0KMypkTn+uJLKp+Fs4XH7yT4= +github.com/aws/aws-sdk-go-v2/service/guardduty v1.58.1 h1:rsEOQaTAe6aJqwntPqjzY/o9E2/3HzP4GQajzizEgkA= +github.com/aws/aws-sdk-go-v2/service/guardduty v1.58.1/go.mod h1:eQ9c3TyaAMTn2/P6vjnPjZ6b3ViTaHsTPOY9gdUBvXo= github.com/aws/aws-sdk-go-v2/service/healthlake v1.31.0 h1:LoxuW3vg4vpt8yhfJxr0PmID9TcoE8NNZ5W/BPU1Diw= github.com/aws/aws-sdk-go-v2/service/healthlake v1.31.0/go.mod h1:CtYdcZxsszAkTsJeFmV3z+Cl5C+emkBOgaEzEX2FhO4= github.com/aws/aws-sdk-go-v2/service/iam v1.44.0 h1:xE1lyJEce58QSIcS3nh9pgLwx343J93WOn/kYrqW2jg= From 14db1fda5b65fdf017dfa254820ba35b8e650dfa Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 09:13:13 -0400 Subject: [PATCH 199/365] go get github.com/aws/aws-sdk-go-v2/service/healthlake. --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 669672e6288e..62cd5c3edfd3 100644 --- a/go.mod +++ b/go.mod @@ -133,7 +133,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/greengrass v1.29.1 github.com/aws/aws-sdk-go-v2/service/groundstation v1.34.1 github.com/aws/aws-sdk-go-v2/service/guardduty v1.58.1 - github.com/aws/aws-sdk-go-v2/service/healthlake v1.31.0 + github.com/aws/aws-sdk-go-v2/service/healthlake v1.31.1 github.com/aws/aws-sdk-go-v2/service/iam v1.44.0 github.com/aws/aws-sdk-go-v2/service/identitystore v1.29.0 github.com/aws/aws-sdk-go-v2/service/imagebuilder v1.43.0 diff --git a/go.sum b/go.sum index e54a9708a459..2f2ff06e5882 100644 --- a/go.sum +++ b/go.sum @@ -277,8 +277,8 @@ github.com/aws/aws-sdk-go-v2/service/groundstation v1.34.1 h1:dMBjI+4ScXf5fIeYI+ github.com/aws/aws-sdk-go-v2/service/groundstation v1.34.1/go.mod h1:co4tdt5zpodqW74jxLUio7V/EGMBNimy/8RJP8KF0vk= github.com/aws/aws-sdk-go-v2/service/guardduty v1.58.1 h1:rsEOQaTAe6aJqwntPqjzY/o9E2/3HzP4GQajzizEgkA= github.com/aws/aws-sdk-go-v2/service/guardduty v1.58.1/go.mod h1:eQ9c3TyaAMTn2/P6vjnPjZ6b3ViTaHsTPOY9gdUBvXo= -github.com/aws/aws-sdk-go-v2/service/healthlake v1.31.0 h1:LoxuW3vg4vpt8yhfJxr0PmID9TcoE8NNZ5W/BPU1Diw= -github.com/aws/aws-sdk-go-v2/service/healthlake v1.31.0/go.mod h1:CtYdcZxsszAkTsJeFmV3z+Cl5C+emkBOgaEzEX2FhO4= +github.com/aws/aws-sdk-go-v2/service/healthlake v1.31.1 h1:71vwj+vvOeZJ3w9XuW/9tv80byCdifbQ/Qf5Mc5y2zU= +github.com/aws/aws-sdk-go-v2/service/healthlake v1.31.1/go.mod h1:QrR1Yf1RmLYOxRFL/ctdUAF8ee4LSBHKOa46wV90nQ8= github.com/aws/aws-sdk-go-v2/service/iam v1.44.0 h1:xE1lyJEce58QSIcS3nh9pgLwx343J93WOn/kYrqW2jg= github.com/aws/aws-sdk-go-v2/service/iam v1.44.0/go.mod h1:53RWbnrMMSyphkpNPbthmFf+U507eWbuJvCxk6iMKRM= github.com/aws/aws-sdk-go-v2/service/identitystore v1.29.0 h1:o2Z2Fvbm4bxpa6y9pR5F+nfJ8Hzc81FXTTj4h6KxkKE= From 6a9258424fef03ed13d21a32b689756de36eb81b Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 09:13:14 -0400 Subject: [PATCH 200/365] go get github.com/aws/aws-sdk-go-v2/service/iam. --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 62cd5c3edfd3..bf87a2536895 100644 --- a/go.mod +++ b/go.mod @@ -134,7 +134,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/groundstation v1.34.1 github.com/aws/aws-sdk-go-v2/service/guardduty v1.58.1 github.com/aws/aws-sdk-go-v2/service/healthlake v1.31.1 - github.com/aws/aws-sdk-go-v2/service/iam v1.44.0 + github.com/aws/aws-sdk-go-v2/service/iam v1.44.1 github.com/aws/aws-sdk-go-v2/service/identitystore v1.29.0 github.com/aws/aws-sdk-go-v2/service/imagebuilder v1.43.0 github.com/aws/aws-sdk-go-v2/service/inspector v1.27.0 diff --git a/go.sum b/go.sum index 2f2ff06e5882..290a6016172e 100644 --- a/go.sum +++ b/go.sum @@ -279,8 +279,8 @@ github.com/aws/aws-sdk-go-v2/service/guardduty v1.58.1 h1:rsEOQaTAe6aJqwntPqjzY/ github.com/aws/aws-sdk-go-v2/service/guardduty v1.58.1/go.mod h1:eQ9c3TyaAMTn2/P6vjnPjZ6b3ViTaHsTPOY9gdUBvXo= github.com/aws/aws-sdk-go-v2/service/healthlake v1.31.1 h1:71vwj+vvOeZJ3w9XuW/9tv80byCdifbQ/Qf5Mc5y2zU= github.com/aws/aws-sdk-go-v2/service/healthlake v1.31.1/go.mod h1:QrR1Yf1RmLYOxRFL/ctdUAF8ee4LSBHKOa46wV90nQ8= -github.com/aws/aws-sdk-go-v2/service/iam v1.44.0 h1:xE1lyJEce58QSIcS3nh9pgLwx343J93WOn/kYrqW2jg= -github.com/aws/aws-sdk-go-v2/service/iam v1.44.0/go.mod h1:53RWbnrMMSyphkpNPbthmFf+U507eWbuJvCxk6iMKRM= +github.com/aws/aws-sdk-go-v2/service/iam v1.44.1 h1:V82Oyj0zU2QFJL+qvvdAqt2YYsRO0QNb9RewnvDWpdo= +github.com/aws/aws-sdk-go-v2/service/iam v1.44.1/go.mod h1:aZ7pMz0bZfPi485gVCIinav3M61EbkGENEMlcMMWuhI= github.com/aws/aws-sdk-go-v2/service/identitystore v1.29.0 h1:o2Z2Fvbm4bxpa6y9pR5F+nfJ8Hzc81FXTTj4h6KxkKE= github.com/aws/aws-sdk-go-v2/service/identitystore v1.29.0/go.mod h1:O6qnZVzCEzNHjuFx1RFPWJE2PAJtuE1mBlzqxaUpBT8= github.com/aws/aws-sdk-go-v2/service/imagebuilder v1.43.0 h1:8HIBl/2IrvzfpbElpO1OMGaYdHS/VNWSxkTIM7AptI0= From 73babb85ec1b842f64908aaa520c99f5b8152162 Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 09:13:15 -0400 Subject: [PATCH 201/365] go get github.com/aws/aws-sdk-go-v2/service/identitystore. --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index bf87a2536895..f88c9477d38c 100644 --- a/go.mod +++ b/go.mod @@ -135,7 +135,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/guardduty v1.58.1 github.com/aws/aws-sdk-go-v2/service/healthlake v1.31.1 github.com/aws/aws-sdk-go-v2/service/iam v1.44.1 - github.com/aws/aws-sdk-go-v2/service/identitystore v1.29.0 + github.com/aws/aws-sdk-go-v2/service/identitystore v1.29.1 github.com/aws/aws-sdk-go-v2/service/imagebuilder v1.43.0 github.com/aws/aws-sdk-go-v2/service/inspector v1.27.0 github.com/aws/aws-sdk-go-v2/service/inspector2 v1.39.0 diff --git a/go.sum b/go.sum index 290a6016172e..587f01892585 100644 --- a/go.sum +++ b/go.sum @@ -281,8 +281,8 @@ github.com/aws/aws-sdk-go-v2/service/healthlake v1.31.1 h1:71vwj+vvOeZJ3w9XuW/9t github.com/aws/aws-sdk-go-v2/service/healthlake v1.31.1/go.mod h1:QrR1Yf1RmLYOxRFL/ctdUAF8ee4LSBHKOa46wV90nQ8= github.com/aws/aws-sdk-go-v2/service/iam v1.44.1 h1:V82Oyj0zU2QFJL+qvvdAqt2YYsRO0QNb9RewnvDWpdo= github.com/aws/aws-sdk-go-v2/service/iam v1.44.1/go.mod h1:aZ7pMz0bZfPi485gVCIinav3M61EbkGENEMlcMMWuhI= -github.com/aws/aws-sdk-go-v2/service/identitystore v1.29.0 h1:o2Z2Fvbm4bxpa6y9pR5F+nfJ8Hzc81FXTTj4h6KxkKE= -github.com/aws/aws-sdk-go-v2/service/identitystore v1.29.0/go.mod h1:O6qnZVzCEzNHjuFx1RFPWJE2PAJtuE1mBlzqxaUpBT8= +github.com/aws/aws-sdk-go-v2/service/identitystore v1.29.1 h1:6EYdc0UwxUCGZRj+iGDU9z47XgUAt1Y/Ol+dALGynp0= +github.com/aws/aws-sdk-go-v2/service/identitystore v1.29.1/go.mod h1:S0hd0msvckDEAMvVPpAv3A5ND3slDD/6V3K9an6sn7o= github.com/aws/aws-sdk-go-v2/service/imagebuilder v1.43.0 h1:8HIBl/2IrvzfpbElpO1OMGaYdHS/VNWSxkTIM7AptI0= github.com/aws/aws-sdk-go-v2/service/imagebuilder v1.43.0/go.mod h1:so7mgxy23c/XGSgeoTjM8G3naPgMEcCEhCteudJoNYg= github.com/aws/aws-sdk-go-v2/service/inspector v1.27.0 h1:+yw/E8oU9nH+rrbcIhsY8mPz84+N/2Fe3ja6TiE3A2A= From 8e14f5682c18661fda58a6b501b1014a46b3f6c5 Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 09:13:16 -0400 Subject: [PATCH 202/365] go get github.com/aws/aws-sdk-go-v2/service/imagebuilder. --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index f88c9477d38c..6d0bd8348650 100644 --- a/go.mod +++ b/go.mod @@ -136,7 +136,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/healthlake v1.31.1 github.com/aws/aws-sdk-go-v2/service/iam v1.44.1 github.com/aws/aws-sdk-go-v2/service/identitystore v1.29.1 - github.com/aws/aws-sdk-go-v2/service/imagebuilder v1.43.0 + github.com/aws/aws-sdk-go-v2/service/imagebuilder v1.43.1 github.com/aws/aws-sdk-go-v2/service/inspector v1.27.0 github.com/aws/aws-sdk-go-v2/service/inspector2 v1.39.0 github.com/aws/aws-sdk-go-v2/service/internetmonitor v1.22.0 diff --git a/go.sum b/go.sum index 587f01892585..13222907bb7e 100644 --- a/go.sum +++ b/go.sum @@ -283,8 +283,8 @@ github.com/aws/aws-sdk-go-v2/service/iam v1.44.1 h1:V82Oyj0zU2QFJL+qvvdAqt2YYsRO github.com/aws/aws-sdk-go-v2/service/iam v1.44.1/go.mod h1:aZ7pMz0bZfPi485gVCIinav3M61EbkGENEMlcMMWuhI= github.com/aws/aws-sdk-go-v2/service/identitystore v1.29.1 h1:6EYdc0UwxUCGZRj+iGDU9z47XgUAt1Y/Ol+dALGynp0= github.com/aws/aws-sdk-go-v2/service/identitystore v1.29.1/go.mod h1:S0hd0msvckDEAMvVPpAv3A5ND3slDD/6V3K9an6sn7o= -github.com/aws/aws-sdk-go-v2/service/imagebuilder v1.43.0 h1:8HIBl/2IrvzfpbElpO1OMGaYdHS/VNWSxkTIM7AptI0= -github.com/aws/aws-sdk-go-v2/service/imagebuilder v1.43.0/go.mod h1:so7mgxy23c/XGSgeoTjM8G3naPgMEcCEhCteudJoNYg= +github.com/aws/aws-sdk-go-v2/service/imagebuilder v1.43.1 h1:PmJzM5B+coktfBZWoSqfehsm0x97bg0bEworfDe9rB4= +github.com/aws/aws-sdk-go-v2/service/imagebuilder v1.43.1/go.mod h1:XQjpa5wcTMPwzOW+ur3sj3NRKhwkeyP4ofPuW6OG42A= github.com/aws/aws-sdk-go-v2/service/inspector v1.27.0 h1:+yw/E8oU9nH+rrbcIhsY8mPz84+N/2Fe3ja6TiE3A2A= github.com/aws/aws-sdk-go-v2/service/inspector v1.27.0/go.mod h1:IpxU42hc98h3t+g9BbShfb4GXKBoVM3gPNN7HRjfQ3w= github.com/aws/aws-sdk-go-v2/service/inspector2 v1.39.0 h1:wHcexRYlL7cgzOGZQqDIS7FeY2EL4OaqkzOnu8xQYNA= From 46670978de75af2d08a6823e27895ac2e7f83c9a Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 09:13:17 -0400 Subject: [PATCH 203/365] go get github.com/aws/aws-sdk-go-v2/service/inspector. --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 6d0bd8348650..76168035f5ca 100644 --- a/go.mod +++ b/go.mod @@ -137,7 +137,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/iam v1.44.1 github.com/aws/aws-sdk-go-v2/service/identitystore v1.29.1 github.com/aws/aws-sdk-go-v2/service/imagebuilder v1.43.1 - github.com/aws/aws-sdk-go-v2/service/inspector v1.27.0 + github.com/aws/aws-sdk-go-v2/service/inspector v1.27.1 github.com/aws/aws-sdk-go-v2/service/inspector2 v1.39.0 github.com/aws/aws-sdk-go-v2/service/internetmonitor v1.22.0 github.com/aws/aws-sdk-go-v2/service/invoicing v1.3.0 diff --git a/go.sum b/go.sum index 13222907bb7e..e76c94e964c3 100644 --- a/go.sum +++ b/go.sum @@ -285,8 +285,8 @@ github.com/aws/aws-sdk-go-v2/service/identitystore v1.29.1 h1:6EYdc0UwxUCGZRj+iG github.com/aws/aws-sdk-go-v2/service/identitystore v1.29.1/go.mod h1:S0hd0msvckDEAMvVPpAv3A5ND3slDD/6V3K9an6sn7o= github.com/aws/aws-sdk-go-v2/service/imagebuilder v1.43.1 h1:PmJzM5B+coktfBZWoSqfehsm0x97bg0bEworfDe9rB4= github.com/aws/aws-sdk-go-v2/service/imagebuilder v1.43.1/go.mod h1:XQjpa5wcTMPwzOW+ur3sj3NRKhwkeyP4ofPuW6OG42A= -github.com/aws/aws-sdk-go-v2/service/inspector v1.27.0 h1:+yw/E8oU9nH+rrbcIhsY8mPz84+N/2Fe3ja6TiE3A2A= -github.com/aws/aws-sdk-go-v2/service/inspector v1.27.0/go.mod h1:IpxU42hc98h3t+g9BbShfb4GXKBoVM3gPNN7HRjfQ3w= +github.com/aws/aws-sdk-go-v2/service/inspector v1.27.1 h1:QG8CsTmAhAPFmpowqocbfVfRDkh5WkoNtzv4vW1BiJk= +github.com/aws/aws-sdk-go-v2/service/inspector v1.27.1/go.mod h1:3LVGyTD16Yf0GQ4jl39tnMRYO/nE8VS5rZGsJyAKm4A= github.com/aws/aws-sdk-go-v2/service/inspector2 v1.39.0 h1:wHcexRYlL7cgzOGZQqDIS7FeY2EL4OaqkzOnu8xQYNA= github.com/aws/aws-sdk-go-v2/service/inspector2 v1.39.0/go.mod h1:DUheDO8F7a/BwQhnle6sizF/XrQ54LSjd6RQ3Xfkr3k= github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.13.0 h1:6+lZi2JeGKtCraAj1rpoZfKqnQ9SptseRZioejfUOLM= From ae8cddf98a9b68ea87441fb37381e86155f80e49 Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 09:13:19 -0400 Subject: [PATCH 204/365] go get github.com/aws/aws-sdk-go-v2/service/inspector2. --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 76168035f5ca..a576885208f4 100644 --- a/go.mod +++ b/go.mod @@ -138,7 +138,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/identitystore v1.29.1 github.com/aws/aws-sdk-go-v2/service/imagebuilder v1.43.1 github.com/aws/aws-sdk-go-v2/service/inspector v1.27.1 - github.com/aws/aws-sdk-go-v2/service/inspector2 v1.39.0 + github.com/aws/aws-sdk-go-v2/service/inspector2 v1.39.1 github.com/aws/aws-sdk-go-v2/service/internetmonitor v1.22.0 github.com/aws/aws-sdk-go-v2/service/invoicing v1.3.0 github.com/aws/aws-sdk-go-v2/service/iot v1.65.0 diff --git a/go.sum b/go.sum index e76c94e964c3..9a2ad3fa83bc 100644 --- a/go.sum +++ b/go.sum @@ -287,8 +287,8 @@ github.com/aws/aws-sdk-go-v2/service/imagebuilder v1.43.1 h1:PmJzM5B+coktfBZWoSq github.com/aws/aws-sdk-go-v2/service/imagebuilder v1.43.1/go.mod h1:XQjpa5wcTMPwzOW+ur3sj3NRKhwkeyP4ofPuW6OG42A= github.com/aws/aws-sdk-go-v2/service/inspector v1.27.1 h1:QG8CsTmAhAPFmpowqocbfVfRDkh5WkoNtzv4vW1BiJk= github.com/aws/aws-sdk-go-v2/service/inspector v1.27.1/go.mod h1:3LVGyTD16Yf0GQ4jl39tnMRYO/nE8VS5rZGsJyAKm4A= -github.com/aws/aws-sdk-go-v2/service/inspector2 v1.39.0 h1:wHcexRYlL7cgzOGZQqDIS7FeY2EL4OaqkzOnu8xQYNA= -github.com/aws/aws-sdk-go-v2/service/inspector2 v1.39.0/go.mod h1:DUheDO8F7a/BwQhnle6sizF/XrQ54LSjd6RQ3Xfkr3k= +github.com/aws/aws-sdk-go-v2/service/inspector2 v1.39.1 h1:Uj4kFuhdRozJwkKtDx6lpSpu374B4zUeLAgRCrE6RRg= +github.com/aws/aws-sdk-go-v2/service/inspector2 v1.39.1/go.mod h1:Go5fLgTjY0qKiAVTvcS+nlYH0pHa5IAETQPsoYM/3WY= github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.13.0 h1:6+lZi2JeGKtCraAj1rpoZfKqnQ9SptseRZioejfUOLM= github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.13.0/go.mod h1:eb3gfbVIxIoGgJsi9pGne19dhCBpK6opTYpQqAmdy44= github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.8.1 h1:ps3nrmBWdWwakZBydGX1CxeYFK80HsQ79JLMwm7Y4/c= From fbf417af12826f6adb32aaa2b4585d0ecab58077 Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 09:13:19 -0400 Subject: [PATCH 205/365] go get github.com/aws/aws-sdk-go-v2/service/internetmonitor. --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index a576885208f4..952a33a6dd7a 100644 --- a/go.mod +++ b/go.mod @@ -139,7 +139,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/imagebuilder v1.43.1 github.com/aws/aws-sdk-go-v2/service/inspector v1.27.1 github.com/aws/aws-sdk-go-v2/service/inspector2 v1.39.1 - github.com/aws/aws-sdk-go-v2/service/internetmonitor v1.22.0 + github.com/aws/aws-sdk-go-v2/service/internetmonitor v1.22.1 github.com/aws/aws-sdk-go-v2/service/invoicing v1.3.0 github.com/aws/aws-sdk-go-v2/service/iot v1.65.0 github.com/aws/aws-sdk-go-v2/service/ivs v1.44.0 diff --git a/go.sum b/go.sum index 9a2ad3fa83bc..3ee8104b8794 100644 --- a/go.sum +++ b/go.sum @@ -299,8 +299,8 @@ github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.13.1 h1:ky79ysLMx github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.13.1/go.mod h1:+2MmkvFvPYM1vsozBWduoLJUi5maxFk5B7KJFECujhY= github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.19.1 h1:MdVYlN5pcQu1t1OYx4Ajo3fKl1IEhzgdPQbYFCRjYS8= github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.19.1/go.mod h1:iikmNLrvHm2p4a3/4BPeix2S9P+nW8yM1IZW73x8bFA= -github.com/aws/aws-sdk-go-v2/service/internetmonitor v1.22.0 h1:p3g8ut8+ep02v6NIXvi9FdXcxf/AfuWVIjI/Bbr5gcI= -github.com/aws/aws-sdk-go-v2/service/internetmonitor v1.22.0/go.mod h1:rODw7nLvCzUl+v2+3A1uRTovKAf87HBz6guzsJtbGW8= +github.com/aws/aws-sdk-go-v2/service/internetmonitor v1.22.1 h1:3jvrdU0UOGm8mQ7eMrbsbKErYn13xM2rJVe9t7QFfE8= +github.com/aws/aws-sdk-go-v2/service/internetmonitor v1.22.1/go.mod h1:loi2iyY5Vs3EC7FI5Yp8TWUGZQC8flvpisZK4HQdNBs= github.com/aws/aws-sdk-go-v2/service/invoicing v1.3.0 h1:Brk5vEn+/As6+tLhyFrOcOjpnKRqW2MYMlRx0a5wpvk= github.com/aws/aws-sdk-go-v2/service/invoicing v1.3.0/go.mod h1:QyadL1Mkewe0Z2sOIw6mh2BmOtZIeaEzFfh/KpdhIn8= github.com/aws/aws-sdk-go-v2/service/iot v1.65.0 h1:1dP1vvaHOz6o1Dg2Gu4VG/YZi++065kJxHSoJ+Cy4QY= From 6cec4e52342f0ef217780b0cf3d806b460dc9b62 Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 09:13:20 -0400 Subject: [PATCH 206/365] go get github.com/aws/aws-sdk-go-v2/service/invoicing. --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 952a33a6dd7a..5b3a41ff1e47 100644 --- a/go.mod +++ b/go.mod @@ -140,7 +140,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/inspector v1.27.1 github.com/aws/aws-sdk-go-v2/service/inspector2 v1.39.1 github.com/aws/aws-sdk-go-v2/service/internetmonitor v1.22.1 - github.com/aws/aws-sdk-go-v2/service/invoicing v1.3.0 + github.com/aws/aws-sdk-go-v2/service/invoicing v1.3.1 github.com/aws/aws-sdk-go-v2/service/iot v1.65.0 github.com/aws/aws-sdk-go-v2/service/ivs v1.44.0 github.com/aws/aws-sdk-go-v2/service/ivschat v1.18.0 diff --git a/go.sum b/go.sum index 3ee8104b8794..5ca8ed1e4a5a 100644 --- a/go.sum +++ b/go.sum @@ -301,8 +301,8 @@ github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.19.1 h1:MdVYlN5pcQu1t1 github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.19.1/go.mod h1:iikmNLrvHm2p4a3/4BPeix2S9P+nW8yM1IZW73x8bFA= github.com/aws/aws-sdk-go-v2/service/internetmonitor v1.22.1 h1:3jvrdU0UOGm8mQ7eMrbsbKErYn13xM2rJVe9t7QFfE8= github.com/aws/aws-sdk-go-v2/service/internetmonitor v1.22.1/go.mod h1:loi2iyY5Vs3EC7FI5Yp8TWUGZQC8flvpisZK4HQdNBs= -github.com/aws/aws-sdk-go-v2/service/invoicing v1.3.0 h1:Brk5vEn+/As6+tLhyFrOcOjpnKRqW2MYMlRx0a5wpvk= -github.com/aws/aws-sdk-go-v2/service/invoicing v1.3.0/go.mod h1:QyadL1Mkewe0Z2sOIw6mh2BmOtZIeaEzFfh/KpdhIn8= +github.com/aws/aws-sdk-go-v2/service/invoicing v1.3.1 h1:ZqHny6zHB8yb3NT0Wz9vSIy5Zub1qcqrEAF1d6K3zuE= +github.com/aws/aws-sdk-go-v2/service/invoicing v1.3.1/go.mod h1:K4gG6tXdTb/nIFfe1R5jyW1JRsFORvFiRMDJkGNc9dA= github.com/aws/aws-sdk-go-v2/service/iot v1.65.0 h1:1dP1vvaHOz6o1Dg2Gu4VG/YZi++065kJxHSoJ+Cy4QY= github.com/aws/aws-sdk-go-v2/service/iot v1.65.0/go.mod h1:ypuhAtRDma1YrmIeMUmUxNrTfG6PWMDyqXzUxjrQrPo= github.com/aws/aws-sdk-go-v2/service/ivs v1.44.0 h1:g7mtxczmaaL6zmXpGuUXugOHAaM2bQu9WyknraS7U3I= From 6f3e30f5e81a38736f627384ee9e2c497c42bb9a Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 09:13:21 -0400 Subject: [PATCH 207/365] go get github.com/aws/aws-sdk-go-v2/service/iot. --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 5b3a41ff1e47..15ecca3a8d0a 100644 --- a/go.mod +++ b/go.mod @@ -141,7 +141,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/inspector2 v1.39.1 github.com/aws/aws-sdk-go-v2/service/internetmonitor v1.22.1 github.com/aws/aws-sdk-go-v2/service/invoicing v1.3.1 - github.com/aws/aws-sdk-go-v2/service/iot v1.65.0 + github.com/aws/aws-sdk-go-v2/service/iot v1.65.1 github.com/aws/aws-sdk-go-v2/service/ivs v1.44.0 github.com/aws/aws-sdk-go-v2/service/ivschat v1.18.0 github.com/aws/aws-sdk-go-v2/service/kafka v1.40.0 diff --git a/go.sum b/go.sum index 5ca8ed1e4a5a..3f63a226bbd8 100644 --- a/go.sum +++ b/go.sum @@ -303,8 +303,8 @@ github.com/aws/aws-sdk-go-v2/service/internetmonitor v1.22.1 h1:3jvrdU0UOGm8mQ7e github.com/aws/aws-sdk-go-v2/service/internetmonitor v1.22.1/go.mod h1:loi2iyY5Vs3EC7FI5Yp8TWUGZQC8flvpisZK4HQdNBs= github.com/aws/aws-sdk-go-v2/service/invoicing v1.3.1 h1:ZqHny6zHB8yb3NT0Wz9vSIy5Zub1qcqrEAF1d6K3zuE= github.com/aws/aws-sdk-go-v2/service/invoicing v1.3.1/go.mod h1:K4gG6tXdTb/nIFfe1R5jyW1JRsFORvFiRMDJkGNc9dA= -github.com/aws/aws-sdk-go-v2/service/iot v1.65.0 h1:1dP1vvaHOz6o1Dg2Gu4VG/YZi++065kJxHSoJ+Cy4QY= -github.com/aws/aws-sdk-go-v2/service/iot v1.65.0/go.mod h1:ypuhAtRDma1YrmIeMUmUxNrTfG6PWMDyqXzUxjrQrPo= +github.com/aws/aws-sdk-go-v2/service/iot v1.65.1 h1:viIWoxWPR4NvRHjRGQ2vOKYNzQST+JyPiipbeGPx/7g= +github.com/aws/aws-sdk-go-v2/service/iot v1.65.1/go.mod h1:0ogtONfjFzm7daWG4XWQhmpHkC0P0nTjoO7n4JKzb0U= github.com/aws/aws-sdk-go-v2/service/ivs v1.44.0 h1:g7mtxczmaaL6zmXpGuUXugOHAaM2bQu9WyknraS7U3I= github.com/aws/aws-sdk-go-v2/service/ivs v1.44.0/go.mod h1:GPprUEX0fUCVK/oD0Yy05tt2Nx0GEmZqWuFIrEo13So= github.com/aws/aws-sdk-go-v2/service/ivschat v1.18.0 h1:3XxrR8OfsdZ5CdO0k03FmaBw5Y/u2kMyy/gKgGxEOIg= From a6b6cd0824595a66ddfcff883e27db123b6b1b1b Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 09:13:23 -0400 Subject: [PATCH 208/365] go get github.com/aws/aws-sdk-go-v2/service/ivs. --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 15ecca3a8d0a..efd7d14c414f 100644 --- a/go.mod +++ b/go.mod @@ -142,7 +142,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/internetmonitor v1.22.1 github.com/aws/aws-sdk-go-v2/service/invoicing v1.3.1 github.com/aws/aws-sdk-go-v2/service/iot v1.65.1 - github.com/aws/aws-sdk-go-v2/service/ivs v1.44.0 + github.com/aws/aws-sdk-go-v2/service/ivs v1.44.1 github.com/aws/aws-sdk-go-v2/service/ivschat v1.18.0 github.com/aws/aws-sdk-go-v2/service/kafka v1.40.0 github.com/aws/aws-sdk-go-v2/service/kafkaconnect v1.24.1 diff --git a/go.sum b/go.sum index 3f63a226bbd8..2a1308e7662b 100644 --- a/go.sum +++ b/go.sum @@ -305,8 +305,8 @@ github.com/aws/aws-sdk-go-v2/service/invoicing v1.3.1 h1:ZqHny6zHB8yb3NT0Wz9vSIy github.com/aws/aws-sdk-go-v2/service/invoicing v1.3.1/go.mod h1:K4gG6tXdTb/nIFfe1R5jyW1JRsFORvFiRMDJkGNc9dA= github.com/aws/aws-sdk-go-v2/service/iot v1.65.1 h1:viIWoxWPR4NvRHjRGQ2vOKYNzQST+JyPiipbeGPx/7g= github.com/aws/aws-sdk-go-v2/service/iot v1.65.1/go.mod h1:0ogtONfjFzm7daWG4XWQhmpHkC0P0nTjoO7n4JKzb0U= -github.com/aws/aws-sdk-go-v2/service/ivs v1.44.0 h1:g7mtxczmaaL6zmXpGuUXugOHAaM2bQu9WyknraS7U3I= -github.com/aws/aws-sdk-go-v2/service/ivs v1.44.0/go.mod h1:GPprUEX0fUCVK/oD0Yy05tt2Nx0GEmZqWuFIrEo13So= +github.com/aws/aws-sdk-go-v2/service/ivs v1.44.1 h1:k8SgaBMH/3e3oRv5XyMS6qJAvKtc5/3xTjCSMlkaeFI= +github.com/aws/aws-sdk-go-v2/service/ivs v1.44.1/go.mod h1:Oobt8m2Ut1xg78QLmsw13wnSknC9PnFOmvgFcN3OobA= github.com/aws/aws-sdk-go-v2/service/ivschat v1.18.0 h1:3XxrR8OfsdZ5CdO0k03FmaBw5Y/u2kMyy/gKgGxEOIg= github.com/aws/aws-sdk-go-v2/service/ivschat v1.18.0/go.mod h1:zOkF5itZ8V3WWS1uiTUeUUj0rDHiPb9cZ12wk2c3iy8= github.com/aws/aws-sdk-go-v2/service/kafka v1.40.0 h1:1f2ySd9pIOWeLLrzQGnhsdepjxvQxgiYbHvrLdaxQNs= From cab2ad921e3849b96d0a876d8b61fd573a481f87 Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 09:13:24 -0400 Subject: [PATCH 209/365] go get github.com/aws/aws-sdk-go-v2/service/ivschat. --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index efd7d14c414f..9574f93215fc 100644 --- a/go.mod +++ b/go.mod @@ -143,7 +143,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/invoicing v1.3.1 github.com/aws/aws-sdk-go-v2/service/iot v1.65.1 github.com/aws/aws-sdk-go-v2/service/ivs v1.44.1 - github.com/aws/aws-sdk-go-v2/service/ivschat v1.18.0 + github.com/aws/aws-sdk-go-v2/service/ivschat v1.18.1 github.com/aws/aws-sdk-go-v2/service/kafka v1.40.0 github.com/aws/aws-sdk-go-v2/service/kafkaconnect v1.24.1 github.com/aws/aws-sdk-go-v2/service/kendra v1.57.0 diff --git a/go.sum b/go.sum index 2a1308e7662b..d6a19218c439 100644 --- a/go.sum +++ b/go.sum @@ -307,8 +307,8 @@ github.com/aws/aws-sdk-go-v2/service/iot v1.65.1 h1:viIWoxWPR4NvRHjRGQ2vOKYNzQST github.com/aws/aws-sdk-go-v2/service/iot v1.65.1/go.mod h1:0ogtONfjFzm7daWG4XWQhmpHkC0P0nTjoO7n4JKzb0U= github.com/aws/aws-sdk-go-v2/service/ivs v1.44.1 h1:k8SgaBMH/3e3oRv5XyMS6qJAvKtc5/3xTjCSMlkaeFI= github.com/aws/aws-sdk-go-v2/service/ivs v1.44.1/go.mod h1:Oobt8m2Ut1xg78QLmsw13wnSknC9PnFOmvgFcN3OobA= -github.com/aws/aws-sdk-go-v2/service/ivschat v1.18.0 h1:3XxrR8OfsdZ5CdO0k03FmaBw5Y/u2kMyy/gKgGxEOIg= -github.com/aws/aws-sdk-go-v2/service/ivschat v1.18.0/go.mod h1:zOkF5itZ8V3WWS1uiTUeUUj0rDHiPb9cZ12wk2c3iy8= +github.com/aws/aws-sdk-go-v2/service/ivschat v1.18.1 h1:KeOqEh9bzMzaRbjzil41SOu7UVcHmyPZ415wDhvpRVI= +github.com/aws/aws-sdk-go-v2/service/ivschat v1.18.1/go.mod h1:MHSEX+9G3NOzzTPs/sP88KgGBc1MyJm5eleKu6+4IqQ= github.com/aws/aws-sdk-go-v2/service/kafka v1.40.0 h1:1f2ySd9pIOWeLLrzQGnhsdepjxvQxgiYbHvrLdaxQNs= github.com/aws/aws-sdk-go-v2/service/kafka v1.40.0/go.mod h1:9OLdh3Yy2JDSG/EbsdtHP6ELe0ih4RY2ikxtHR1dRIo= github.com/aws/aws-sdk-go-v2/service/kafkaconnect v1.24.1 h1:KDSWQ5w3ZZbTnlLskITkra2+VpsgFIT06C6rJlhD23g= From a677a86838c3834137317ba0b1e8e1a581632643 Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 09:13:25 -0400 Subject: [PATCH 210/365] go get github.com/aws/aws-sdk-go-v2/service/kafka. --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 9574f93215fc..429a2de97625 100644 --- a/go.mod +++ b/go.mod @@ -144,7 +144,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/iot v1.65.1 github.com/aws/aws-sdk-go-v2/service/ivs v1.44.1 github.com/aws/aws-sdk-go-v2/service/ivschat v1.18.1 - github.com/aws/aws-sdk-go-v2/service/kafka v1.40.0 + github.com/aws/aws-sdk-go-v2/service/kafka v1.40.1 github.com/aws/aws-sdk-go-v2/service/kafkaconnect v1.24.1 github.com/aws/aws-sdk-go-v2/service/kendra v1.57.0 github.com/aws/aws-sdk-go-v2/service/keyspaces v1.20.0 diff --git a/go.sum b/go.sum index d6a19218c439..dc3a91d1caa8 100644 --- a/go.sum +++ b/go.sum @@ -309,8 +309,8 @@ github.com/aws/aws-sdk-go-v2/service/ivs v1.44.1 h1:k8SgaBMH/3e3oRv5XyMS6qJAvKtc github.com/aws/aws-sdk-go-v2/service/ivs v1.44.1/go.mod h1:Oobt8m2Ut1xg78QLmsw13wnSknC9PnFOmvgFcN3OobA= github.com/aws/aws-sdk-go-v2/service/ivschat v1.18.1 h1:KeOqEh9bzMzaRbjzil41SOu7UVcHmyPZ415wDhvpRVI= github.com/aws/aws-sdk-go-v2/service/ivschat v1.18.1/go.mod h1:MHSEX+9G3NOzzTPs/sP88KgGBc1MyJm5eleKu6+4IqQ= -github.com/aws/aws-sdk-go-v2/service/kafka v1.40.0 h1:1f2ySd9pIOWeLLrzQGnhsdepjxvQxgiYbHvrLdaxQNs= -github.com/aws/aws-sdk-go-v2/service/kafka v1.40.0/go.mod h1:9OLdh3Yy2JDSG/EbsdtHP6ELe0ih4RY2ikxtHR1dRIo= +github.com/aws/aws-sdk-go-v2/service/kafka v1.40.1 h1:RpJi/JcawCLe/3Gc7XLr6wJVeaLmfIUcG0VFdqJNVpQ= +github.com/aws/aws-sdk-go-v2/service/kafka v1.40.1/go.mod h1:wHKXRek0tTlaXyzoS24hGiZHD0Nv2sHdv8qV0JwWbvs= github.com/aws/aws-sdk-go-v2/service/kafkaconnect v1.24.1 h1:KDSWQ5w3ZZbTnlLskITkra2+VpsgFIT06C6rJlhD23g= github.com/aws/aws-sdk-go-v2/service/kafkaconnect v1.24.1/go.mod h1:Kd/iJbmERvnoOg3tn18bzYTOCmv6QdDvqfFdKlhvtL0= github.com/aws/aws-sdk-go-v2/service/kendra v1.57.0 h1:wKkwENAJaas/1VedOvykeI7BRznuv0p1wVRuPViG3vA= From 186d15a00a06c21bf998e0fdada76f4ac2d319b8 Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 09:13:26 -0400 Subject: [PATCH 211/365] go get github.com/aws/aws-sdk-go-v2/service/kafkaconnect. --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 429a2de97625..4f0bbacaf0db 100644 --- a/go.mod +++ b/go.mod @@ -145,7 +145,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/ivs v1.44.1 github.com/aws/aws-sdk-go-v2/service/ivschat v1.18.1 github.com/aws/aws-sdk-go-v2/service/kafka v1.40.1 - github.com/aws/aws-sdk-go-v2/service/kafkaconnect v1.24.1 + github.com/aws/aws-sdk-go-v2/service/kafkaconnect v1.24.2 github.com/aws/aws-sdk-go-v2/service/kendra v1.57.0 github.com/aws/aws-sdk-go-v2/service/keyspaces v1.20.0 github.com/aws/aws-sdk-go-v2/service/kinesis v1.36.0 diff --git a/go.sum b/go.sum index dc3a91d1caa8..c60c8c0fd997 100644 --- a/go.sum +++ b/go.sum @@ -311,8 +311,8 @@ github.com/aws/aws-sdk-go-v2/service/ivschat v1.18.1 h1:KeOqEh9bzMzaRbjzil41SOu7 github.com/aws/aws-sdk-go-v2/service/ivschat v1.18.1/go.mod h1:MHSEX+9G3NOzzTPs/sP88KgGBc1MyJm5eleKu6+4IqQ= github.com/aws/aws-sdk-go-v2/service/kafka v1.40.1 h1:RpJi/JcawCLe/3Gc7XLr6wJVeaLmfIUcG0VFdqJNVpQ= github.com/aws/aws-sdk-go-v2/service/kafka v1.40.1/go.mod h1:wHKXRek0tTlaXyzoS24hGiZHD0Nv2sHdv8qV0JwWbvs= -github.com/aws/aws-sdk-go-v2/service/kafkaconnect v1.24.1 h1:KDSWQ5w3ZZbTnlLskITkra2+VpsgFIT06C6rJlhD23g= -github.com/aws/aws-sdk-go-v2/service/kafkaconnect v1.24.1/go.mod h1:Kd/iJbmERvnoOg3tn18bzYTOCmv6QdDvqfFdKlhvtL0= +github.com/aws/aws-sdk-go-v2/service/kafkaconnect v1.24.2 h1:YbmQuJfiHhvtz+KkoVTEX5EJP+b0iLTqtBd0eXL3N8o= +github.com/aws/aws-sdk-go-v2/service/kafkaconnect v1.24.2/go.mod h1:rCCQe2X/+/7Lco7w5rDuepJF4PeTEjMpSJ0jpwOBSp4= github.com/aws/aws-sdk-go-v2/service/kendra v1.57.0 h1:wKkwENAJaas/1VedOvykeI7BRznuv0p1wVRuPViG3vA= github.com/aws/aws-sdk-go-v2/service/kendra v1.57.0/go.mod h1:/lEH8vb3Pz/xgrXK0O9ceuI/9xV7rL2yiqMC/OS5O3M= github.com/aws/aws-sdk-go-v2/service/keyspaces v1.20.0 h1:Z4wix2oghV2o2QqXxRXSQ1waHsufddDlhu+UBFpU/1Y= From c3d37d1a3f845a65134f1f6b748adc374014247e Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 09:13:27 -0400 Subject: [PATCH 212/365] go get github.com/aws/aws-sdk-go-v2/service/kendra. --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 4f0bbacaf0db..82941dc82667 100644 --- a/go.mod +++ b/go.mod @@ -146,7 +146,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/ivschat v1.18.1 github.com/aws/aws-sdk-go-v2/service/kafka v1.40.1 github.com/aws/aws-sdk-go-v2/service/kafkaconnect v1.24.2 - github.com/aws/aws-sdk-go-v2/service/kendra v1.57.0 + github.com/aws/aws-sdk-go-v2/service/kendra v1.57.1 github.com/aws/aws-sdk-go-v2/service/keyspaces v1.20.0 github.com/aws/aws-sdk-go-v2/service/kinesis v1.36.0 github.com/aws/aws-sdk-go-v2/service/kinesisanalytics v1.27.0 diff --git a/go.sum b/go.sum index c60c8c0fd997..05fd8934bca1 100644 --- a/go.sum +++ b/go.sum @@ -313,8 +313,8 @@ github.com/aws/aws-sdk-go-v2/service/kafka v1.40.1 h1:RpJi/JcawCLe/3Gc7XLr6wJVea github.com/aws/aws-sdk-go-v2/service/kafka v1.40.1/go.mod h1:wHKXRek0tTlaXyzoS24hGiZHD0Nv2sHdv8qV0JwWbvs= github.com/aws/aws-sdk-go-v2/service/kafkaconnect v1.24.2 h1:YbmQuJfiHhvtz+KkoVTEX5EJP+b0iLTqtBd0eXL3N8o= github.com/aws/aws-sdk-go-v2/service/kafkaconnect v1.24.2/go.mod h1:rCCQe2X/+/7Lco7w5rDuepJF4PeTEjMpSJ0jpwOBSp4= -github.com/aws/aws-sdk-go-v2/service/kendra v1.57.0 h1:wKkwENAJaas/1VedOvykeI7BRznuv0p1wVRuPViG3vA= -github.com/aws/aws-sdk-go-v2/service/kendra v1.57.0/go.mod h1:/lEH8vb3Pz/xgrXK0O9ceuI/9xV7rL2yiqMC/OS5O3M= +github.com/aws/aws-sdk-go-v2/service/kendra v1.57.1 h1:hJ6rwXUwlPbo+KtQFC+8DPRLLDAm9nLKwK89g1zeBq8= +github.com/aws/aws-sdk-go-v2/service/kendra v1.57.1/go.mod h1:SnU/DUXKZxP2o/WIKJZVa0aRsb4sSN9W2C2mI8hdvIA= github.com/aws/aws-sdk-go-v2/service/keyspaces v1.20.0 h1:Z4wix2oghV2o2QqXxRXSQ1waHsufddDlhu+UBFpU/1Y= github.com/aws/aws-sdk-go-v2/service/keyspaces v1.20.0/go.mod h1:mdZBvfauqfzsncChxf08Ir7pZ0F9AGg0QrzMEznM1Tw= github.com/aws/aws-sdk-go-v2/service/kinesis v1.36.0 h1:PJHaM7x9AzroH0w6owUIqEMNj/Bo87YotXXFXSwXghw= From 574784790a6316b06c87275897f35bba0f0dd79e Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 09:13:28 -0400 Subject: [PATCH 213/365] go get github.com/aws/aws-sdk-go-v2/service/keyspaces. --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 82941dc82667..1d4c97533299 100644 --- a/go.mod +++ b/go.mod @@ -147,7 +147,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/kafka v1.40.1 github.com/aws/aws-sdk-go-v2/service/kafkaconnect v1.24.2 github.com/aws/aws-sdk-go-v2/service/kendra v1.57.1 - github.com/aws/aws-sdk-go-v2/service/keyspaces v1.20.0 + github.com/aws/aws-sdk-go-v2/service/keyspaces v1.20.1 github.com/aws/aws-sdk-go-v2/service/kinesis v1.36.0 github.com/aws/aws-sdk-go-v2/service/kinesisanalytics v1.27.0 github.com/aws/aws-sdk-go-v2/service/kinesisanalyticsv2 v1.33.0 diff --git a/go.sum b/go.sum index 05fd8934bca1..da9225db74fe 100644 --- a/go.sum +++ b/go.sum @@ -315,8 +315,8 @@ github.com/aws/aws-sdk-go-v2/service/kafkaconnect v1.24.2 h1:YbmQuJfiHhvtz+KkoVT github.com/aws/aws-sdk-go-v2/service/kafkaconnect v1.24.2/go.mod h1:rCCQe2X/+/7Lco7w5rDuepJF4PeTEjMpSJ0jpwOBSp4= github.com/aws/aws-sdk-go-v2/service/kendra v1.57.1 h1:hJ6rwXUwlPbo+KtQFC+8DPRLLDAm9nLKwK89g1zeBq8= github.com/aws/aws-sdk-go-v2/service/kendra v1.57.1/go.mod h1:SnU/DUXKZxP2o/WIKJZVa0aRsb4sSN9W2C2mI8hdvIA= -github.com/aws/aws-sdk-go-v2/service/keyspaces v1.20.0 h1:Z4wix2oghV2o2QqXxRXSQ1waHsufddDlhu+UBFpU/1Y= -github.com/aws/aws-sdk-go-v2/service/keyspaces v1.20.0/go.mod h1:mdZBvfauqfzsncChxf08Ir7pZ0F9AGg0QrzMEznM1Tw= +github.com/aws/aws-sdk-go-v2/service/keyspaces v1.20.1 h1:2Jhdp2Tt5zK+fYYtGvZSIUBJKTTOwR/dYFCbvwHTF4s= +github.com/aws/aws-sdk-go-v2/service/keyspaces v1.20.1/go.mod h1:r8yQore6pt2Qd5xYUha+USf7u0iRsRHJh/4gDB7jg/o= github.com/aws/aws-sdk-go-v2/service/kinesis v1.36.0 h1:PJHaM7x9AzroH0w6owUIqEMNj/Bo87YotXXFXSwXghw= github.com/aws/aws-sdk-go-v2/service/kinesis v1.36.0/go.mod h1:w8WZbOc5S4Itxeng16UwriraH60/GKEXPl1WAGutdqw= github.com/aws/aws-sdk-go-v2/service/kinesisanalytics v1.27.0 h1:epaifCF9Gp8gkjivjdR+RX9ox8KlP1iKg+/sRemdn4A= From 7d971d9be6e0c54137da4a00ed1d99011cafd403 Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 09:13:29 -0400 Subject: [PATCH 214/365] go get github.com/aws/aws-sdk-go-v2/service/kinesis. --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 1d4c97533299..3e952fad85b4 100644 --- a/go.mod +++ b/go.mod @@ -148,7 +148,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/kafkaconnect v1.24.2 github.com/aws/aws-sdk-go-v2/service/kendra v1.57.1 github.com/aws/aws-sdk-go-v2/service/keyspaces v1.20.1 - github.com/aws/aws-sdk-go-v2/service/kinesis v1.36.0 + github.com/aws/aws-sdk-go-v2/service/kinesis v1.36.1 github.com/aws/aws-sdk-go-v2/service/kinesisanalytics v1.27.0 github.com/aws/aws-sdk-go-v2/service/kinesisanalyticsv2 v1.33.0 github.com/aws/aws-sdk-go-v2/service/kinesisvideo v1.29.0 diff --git a/go.sum b/go.sum index da9225db74fe..4d7966d5599c 100644 --- a/go.sum +++ b/go.sum @@ -317,8 +317,8 @@ github.com/aws/aws-sdk-go-v2/service/kendra v1.57.1 h1:hJ6rwXUwlPbo+KtQFC+8DPRLL github.com/aws/aws-sdk-go-v2/service/kendra v1.57.1/go.mod h1:SnU/DUXKZxP2o/WIKJZVa0aRsb4sSN9W2C2mI8hdvIA= github.com/aws/aws-sdk-go-v2/service/keyspaces v1.20.1 h1:2Jhdp2Tt5zK+fYYtGvZSIUBJKTTOwR/dYFCbvwHTF4s= github.com/aws/aws-sdk-go-v2/service/keyspaces v1.20.1/go.mod h1:r8yQore6pt2Qd5xYUha+USf7u0iRsRHJh/4gDB7jg/o= -github.com/aws/aws-sdk-go-v2/service/kinesis v1.36.0 h1:PJHaM7x9AzroH0w6owUIqEMNj/Bo87YotXXFXSwXghw= -github.com/aws/aws-sdk-go-v2/service/kinesis v1.36.0/go.mod h1:w8WZbOc5S4Itxeng16UwriraH60/GKEXPl1WAGutdqw= +github.com/aws/aws-sdk-go-v2/service/kinesis v1.36.1 h1:rs+doEUMM7TYDQCm8hse37Nc8RtaOUR3L9yn72cYGEU= +github.com/aws/aws-sdk-go-v2/service/kinesis v1.36.1/go.mod h1:4b3rDh9I9qfJ7otpn9F/QPplu8P70X3QYujWfsabPrU= github.com/aws/aws-sdk-go-v2/service/kinesisanalytics v1.27.0 h1:epaifCF9Gp8gkjivjdR+RX9ox8KlP1iKg+/sRemdn4A= github.com/aws/aws-sdk-go-v2/service/kinesisanalytics v1.27.0/go.mod h1:sZoXiQIHeSkrVQkAD7Kv5KaXaBrTVPOm7TTY8TeVxSg= github.com/aws/aws-sdk-go-v2/service/kinesisanalyticsv2 v1.33.0 h1:IHoYcp5qzdeyke9z5zJ+wqwCtvKxirvSL48kZUsCMrg= From e43c98a0513785d92901c29dc63167d012d6b603 Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 09:13:31 -0400 Subject: [PATCH 215/365] go get github.com/aws/aws-sdk-go-v2/service/kinesisanalytics. --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 3e952fad85b4..39e7d8cf1c4f 100644 --- a/go.mod +++ b/go.mod @@ -149,7 +149,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/kendra v1.57.1 github.com/aws/aws-sdk-go-v2/service/keyspaces v1.20.1 github.com/aws/aws-sdk-go-v2/service/kinesis v1.36.1 - github.com/aws/aws-sdk-go-v2/service/kinesisanalytics v1.27.0 + github.com/aws/aws-sdk-go-v2/service/kinesisanalytics v1.27.1 github.com/aws/aws-sdk-go-v2/service/kinesisanalyticsv2 v1.33.0 github.com/aws/aws-sdk-go-v2/service/kinesisvideo v1.29.0 github.com/aws/aws-sdk-go-v2/service/kms v1.42.0 diff --git a/go.sum b/go.sum index 4d7966d5599c..745a5e964d08 100644 --- a/go.sum +++ b/go.sum @@ -319,8 +319,8 @@ github.com/aws/aws-sdk-go-v2/service/keyspaces v1.20.1 h1:2Jhdp2Tt5zK+fYYtGvZSIU github.com/aws/aws-sdk-go-v2/service/keyspaces v1.20.1/go.mod h1:r8yQore6pt2Qd5xYUha+USf7u0iRsRHJh/4gDB7jg/o= github.com/aws/aws-sdk-go-v2/service/kinesis v1.36.1 h1:rs+doEUMM7TYDQCm8hse37Nc8RtaOUR3L9yn72cYGEU= github.com/aws/aws-sdk-go-v2/service/kinesis v1.36.1/go.mod h1:4b3rDh9I9qfJ7otpn9F/QPplu8P70X3QYujWfsabPrU= -github.com/aws/aws-sdk-go-v2/service/kinesisanalytics v1.27.0 h1:epaifCF9Gp8gkjivjdR+RX9ox8KlP1iKg+/sRemdn4A= -github.com/aws/aws-sdk-go-v2/service/kinesisanalytics v1.27.0/go.mod h1:sZoXiQIHeSkrVQkAD7Kv5KaXaBrTVPOm7TTY8TeVxSg= +github.com/aws/aws-sdk-go-v2/service/kinesisanalytics v1.27.1 h1:HJ/Yqyc+z6yPznLf7HTB2tnnCuV40KJEjwPBKPdIoLo= +github.com/aws/aws-sdk-go-v2/service/kinesisanalytics v1.27.1/go.mod h1:lF63nbQGTaLvFxfl25+flfgcLy+TVUT5ACG8NQkdXbg= github.com/aws/aws-sdk-go-v2/service/kinesisanalyticsv2 v1.33.0 h1:IHoYcp5qzdeyke9z5zJ+wqwCtvKxirvSL48kZUsCMrg= github.com/aws/aws-sdk-go-v2/service/kinesisanalyticsv2 v1.33.0/go.mod h1:hTVgbsCbO3mzqSE7TWLQO7dCFw2a9jqY/mTFdxKnCO0= github.com/aws/aws-sdk-go-v2/service/kinesisvideo v1.29.0 h1:678Qt8KDEmA/9NUd9dNYNNfW2yLGBDqIxZ3WeXboK1M= From 5ef5afdcb7580b1621e8ccef0e7032875bc9fed7 Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 09:13:31 -0400 Subject: [PATCH 216/365] go get github.com/aws/aws-sdk-go-v2/service/kinesisanalyticsv2. --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 39e7d8cf1c4f..d3c46c291e32 100644 --- a/go.mod +++ b/go.mod @@ -150,7 +150,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/keyspaces v1.20.1 github.com/aws/aws-sdk-go-v2/service/kinesis v1.36.1 github.com/aws/aws-sdk-go-v2/service/kinesisanalytics v1.27.1 - github.com/aws/aws-sdk-go-v2/service/kinesisanalyticsv2 v1.33.0 + github.com/aws/aws-sdk-go-v2/service/kinesisanalyticsv2 v1.33.1 github.com/aws/aws-sdk-go-v2/service/kinesisvideo v1.29.0 github.com/aws/aws-sdk-go-v2/service/kms v1.42.0 github.com/aws/aws-sdk-go-v2/service/lakeformation v1.42.0 diff --git a/go.sum b/go.sum index 745a5e964d08..45bc2765ebe9 100644 --- a/go.sum +++ b/go.sum @@ -321,8 +321,8 @@ github.com/aws/aws-sdk-go-v2/service/kinesis v1.36.1 h1:rs+doEUMM7TYDQCm8hse37Nc github.com/aws/aws-sdk-go-v2/service/kinesis v1.36.1/go.mod h1:4b3rDh9I9qfJ7otpn9F/QPplu8P70X3QYujWfsabPrU= github.com/aws/aws-sdk-go-v2/service/kinesisanalytics v1.27.1 h1:HJ/Yqyc+z6yPznLf7HTB2tnnCuV40KJEjwPBKPdIoLo= github.com/aws/aws-sdk-go-v2/service/kinesisanalytics v1.27.1/go.mod h1:lF63nbQGTaLvFxfl25+flfgcLy+TVUT5ACG8NQkdXbg= -github.com/aws/aws-sdk-go-v2/service/kinesisanalyticsv2 v1.33.0 h1:IHoYcp5qzdeyke9z5zJ+wqwCtvKxirvSL48kZUsCMrg= -github.com/aws/aws-sdk-go-v2/service/kinesisanalyticsv2 v1.33.0/go.mod h1:hTVgbsCbO3mzqSE7TWLQO7dCFw2a9jqY/mTFdxKnCO0= +github.com/aws/aws-sdk-go-v2/service/kinesisanalyticsv2 v1.33.1 h1:IUTnaFqzwDoCbbT9dChPffQUwwwNplP9ZMwdVD/zzmM= +github.com/aws/aws-sdk-go-v2/service/kinesisanalyticsv2 v1.33.1/go.mod h1:t8Gl3+K/J7GWoyTEkBF+ehVUIGP67o3OUiKnssQINBA= github.com/aws/aws-sdk-go-v2/service/kinesisvideo v1.29.0 h1:678Qt8KDEmA/9NUd9dNYNNfW2yLGBDqIxZ3WeXboK1M= github.com/aws/aws-sdk-go-v2/service/kinesisvideo v1.29.0/go.mod h1:PR0w/+BRiY3VovyxDtFQ6cGWaK9yNvQjAsl2/zqO9DE= github.com/aws/aws-sdk-go-v2/service/kms v1.42.0 h1:FDIgm/tdNHmtCFb87j555nJtW5RHcZwZQ/XfqBLsM+s= From 57aa1b5fac692a7fdbfbca9c1190dcb7910ba25d Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 09:13:33 -0400 Subject: [PATCH 217/365] go get github.com/aws/aws-sdk-go-v2/service/kinesisvideo. --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index d3c46c291e32..4d31414dc4ae 100644 --- a/go.mod +++ b/go.mod @@ -151,7 +151,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/kinesis v1.36.1 github.com/aws/aws-sdk-go-v2/service/kinesisanalytics v1.27.1 github.com/aws/aws-sdk-go-v2/service/kinesisanalyticsv2 v1.33.1 - github.com/aws/aws-sdk-go-v2/service/kinesisvideo v1.29.0 + github.com/aws/aws-sdk-go-v2/service/kinesisvideo v1.29.1 github.com/aws/aws-sdk-go-v2/service/kms v1.42.0 github.com/aws/aws-sdk-go-v2/service/lakeformation v1.42.0 github.com/aws/aws-sdk-go-v2/service/lambda v1.74.0 diff --git a/go.sum b/go.sum index 45bc2765ebe9..3f100c9d28e7 100644 --- a/go.sum +++ b/go.sum @@ -323,8 +323,8 @@ github.com/aws/aws-sdk-go-v2/service/kinesisanalytics v1.27.1 h1:HJ/Yqyc+z6yPznL github.com/aws/aws-sdk-go-v2/service/kinesisanalytics v1.27.1/go.mod h1:lF63nbQGTaLvFxfl25+flfgcLy+TVUT5ACG8NQkdXbg= github.com/aws/aws-sdk-go-v2/service/kinesisanalyticsv2 v1.33.1 h1:IUTnaFqzwDoCbbT9dChPffQUwwwNplP9ZMwdVD/zzmM= github.com/aws/aws-sdk-go-v2/service/kinesisanalyticsv2 v1.33.1/go.mod h1:t8Gl3+K/J7GWoyTEkBF+ehVUIGP67o3OUiKnssQINBA= -github.com/aws/aws-sdk-go-v2/service/kinesisvideo v1.29.0 h1:678Qt8KDEmA/9NUd9dNYNNfW2yLGBDqIxZ3WeXboK1M= -github.com/aws/aws-sdk-go-v2/service/kinesisvideo v1.29.0/go.mod h1:PR0w/+BRiY3VovyxDtFQ6cGWaK9yNvQjAsl2/zqO9DE= +github.com/aws/aws-sdk-go-v2/service/kinesisvideo v1.29.1 h1:UdzvaZQ7UgNPiWmk2yU9281DsKm1kGUyVAY3wZhZf2s= +github.com/aws/aws-sdk-go-v2/service/kinesisvideo v1.29.1/go.mod h1:FrPChe9AimOwPREPAMrmE9ZPJQY7PLxFaeg7QXHxKD8= github.com/aws/aws-sdk-go-v2/service/kms v1.42.0 h1:FDIgm/tdNHmtCFb87j555nJtW5RHcZwZQ/XfqBLsM+s= github.com/aws/aws-sdk-go-v2/service/kms v1.42.0/go.mod h1:8Bi/K0WuhdopdApsJf3wqnJph9lB72roL449AIH3MtU= github.com/aws/aws-sdk-go-v2/service/lakeformation v1.42.0 h1:4wCqDjUGIorbCUAZMJuRZKQpbEmWuxoLTN5Gouv1t4w= From d5a66a1e750486eed5edb50e949f177e4ad72977 Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 09:13:34 -0400 Subject: [PATCH 218/365] go get github.com/aws/aws-sdk-go-v2/service/kms. --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 4d31414dc4ae..f584df4dcb47 100644 --- a/go.mod +++ b/go.mod @@ -152,7 +152,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/kinesisanalytics v1.27.1 github.com/aws/aws-sdk-go-v2/service/kinesisanalyticsv2 v1.33.1 github.com/aws/aws-sdk-go-v2/service/kinesisvideo v1.29.1 - github.com/aws/aws-sdk-go-v2/service/kms v1.42.0 + github.com/aws/aws-sdk-go-v2/service/kms v1.42.1 github.com/aws/aws-sdk-go-v2/service/lakeformation v1.42.0 github.com/aws/aws-sdk-go-v2/service/lambda v1.74.0 github.com/aws/aws-sdk-go-v2/service/launchwizard v1.10.0 diff --git a/go.sum b/go.sum index 3f100c9d28e7..ac7972b0ee55 100644 --- a/go.sum +++ b/go.sum @@ -325,8 +325,8 @@ github.com/aws/aws-sdk-go-v2/service/kinesisanalyticsv2 v1.33.1 h1:IUTnaFqzwDoCb github.com/aws/aws-sdk-go-v2/service/kinesisanalyticsv2 v1.33.1/go.mod h1:t8Gl3+K/J7GWoyTEkBF+ehVUIGP67o3OUiKnssQINBA= github.com/aws/aws-sdk-go-v2/service/kinesisvideo v1.29.1 h1:UdzvaZQ7UgNPiWmk2yU9281DsKm1kGUyVAY3wZhZf2s= github.com/aws/aws-sdk-go-v2/service/kinesisvideo v1.29.1/go.mod h1:FrPChe9AimOwPREPAMrmE9ZPJQY7PLxFaeg7QXHxKD8= -github.com/aws/aws-sdk-go-v2/service/kms v1.42.0 h1:FDIgm/tdNHmtCFb87j555nJtW5RHcZwZQ/XfqBLsM+s= -github.com/aws/aws-sdk-go-v2/service/kms v1.42.0/go.mod h1:8Bi/K0WuhdopdApsJf3wqnJph9lB72roL449AIH3MtU= +github.com/aws/aws-sdk-go-v2/service/kms v1.42.1 h1:YozphKGMWbikYX1H8Cjmh+QUboGA1c/D48m1pBosDmM= +github.com/aws/aws-sdk-go-v2/service/kms v1.42.1/go.mod h1:I/6K08h6XpKZPzb1jMZb1k5N6HpzLyjS4Z0uBFzvaDc= github.com/aws/aws-sdk-go-v2/service/lakeformation v1.42.0 h1:4wCqDjUGIorbCUAZMJuRZKQpbEmWuxoLTN5Gouv1t4w= github.com/aws/aws-sdk-go-v2/service/lakeformation v1.42.0/go.mod h1:EdGSbWl9q2avsEL3jNpvJTcWkvFywEsW7dJWnLeAhnM= github.com/aws/aws-sdk-go-v2/service/lambda v1.74.0 h1:25nw3h+I1MI2VAxwv3PmrQYGqwTyVCbsaPBNKf8EqCA= From f6071ee2888964582b457ec946c318b5abe5b1c3 Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 09:13:35 -0400 Subject: [PATCH 219/365] go get github.com/aws/aws-sdk-go-v2/service/lakeformation. --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index f584df4dcb47..f9ddb7a2b7ac 100644 --- a/go.mod +++ b/go.mod @@ -153,7 +153,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/kinesisanalyticsv2 v1.33.1 github.com/aws/aws-sdk-go-v2/service/kinesisvideo v1.29.1 github.com/aws/aws-sdk-go-v2/service/kms v1.42.1 - github.com/aws/aws-sdk-go-v2/service/lakeformation v1.42.0 + github.com/aws/aws-sdk-go-v2/service/lakeformation v1.42.1 github.com/aws/aws-sdk-go-v2/service/lambda v1.74.0 github.com/aws/aws-sdk-go-v2/service/launchwizard v1.10.0 github.com/aws/aws-sdk-go-v2/service/lexmodelbuildingservice v1.30.0 diff --git a/go.sum b/go.sum index ac7972b0ee55..11d35ef9c9a2 100644 --- a/go.sum +++ b/go.sum @@ -327,8 +327,8 @@ github.com/aws/aws-sdk-go-v2/service/kinesisvideo v1.29.1 h1:UdzvaZQ7UgNPiWmk2yU github.com/aws/aws-sdk-go-v2/service/kinesisvideo v1.29.1/go.mod h1:FrPChe9AimOwPREPAMrmE9ZPJQY7PLxFaeg7QXHxKD8= github.com/aws/aws-sdk-go-v2/service/kms v1.42.1 h1:YozphKGMWbikYX1H8Cjmh+QUboGA1c/D48m1pBosDmM= github.com/aws/aws-sdk-go-v2/service/kms v1.42.1/go.mod h1:I/6K08h6XpKZPzb1jMZb1k5N6HpzLyjS4Z0uBFzvaDc= -github.com/aws/aws-sdk-go-v2/service/lakeformation v1.42.0 h1:4wCqDjUGIorbCUAZMJuRZKQpbEmWuxoLTN5Gouv1t4w= -github.com/aws/aws-sdk-go-v2/service/lakeformation v1.42.0/go.mod h1:EdGSbWl9q2avsEL3jNpvJTcWkvFywEsW7dJWnLeAhnM= +github.com/aws/aws-sdk-go-v2/service/lakeformation v1.42.1 h1:4CyftMR6RY8OcqPXevgS1DOwiSwYwgTcLK2cdUcVZCo= +github.com/aws/aws-sdk-go-v2/service/lakeformation v1.42.1/go.mod h1:K9YPr/AqAVkWctfBvUQA0cx1rWVhmLK40TuVpSP5f2Y= github.com/aws/aws-sdk-go-v2/service/lambda v1.74.0 h1:25nw3h+I1MI2VAxwv3PmrQYGqwTyVCbsaPBNKf8EqCA= github.com/aws/aws-sdk-go-v2/service/lambda v1.74.0/go.mod h1:hStdY4zUjNqCjhgeaTTqnnkSAmKOxdADY3gRE3LCXWc= github.com/aws/aws-sdk-go-v2/service/launchwizard v1.10.0 h1:t5u7n1MOFvJlSuZyC9vt8e8c6/Ouf17kdNBfMKLc9EM= From 4357633f280a40e1ee9332438fcea23847ab57e7 Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 09:13:36 -0400 Subject: [PATCH 220/365] go get github.com/aws/aws-sdk-go-v2/service/lambda. --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index f9ddb7a2b7ac..dae58ed38f88 100644 --- a/go.mod +++ b/go.mod @@ -154,7 +154,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/kinesisvideo v1.29.1 github.com/aws/aws-sdk-go-v2/service/kms v1.42.1 github.com/aws/aws-sdk-go-v2/service/lakeformation v1.42.1 - github.com/aws/aws-sdk-go-v2/service/lambda v1.74.0 + github.com/aws/aws-sdk-go-v2/service/lambda v1.74.1 github.com/aws/aws-sdk-go-v2/service/launchwizard v1.10.0 github.com/aws/aws-sdk-go-v2/service/lexmodelbuildingservice v1.30.0 github.com/aws/aws-sdk-go-v2/service/lexmodelsv2 v1.53.0 diff --git a/go.sum b/go.sum index 11d35ef9c9a2..e3e82d2a9c23 100644 --- a/go.sum +++ b/go.sum @@ -329,8 +329,8 @@ github.com/aws/aws-sdk-go-v2/service/kms v1.42.1 h1:YozphKGMWbikYX1H8Cjmh+QUboGA github.com/aws/aws-sdk-go-v2/service/kms v1.42.1/go.mod h1:I/6K08h6XpKZPzb1jMZb1k5N6HpzLyjS4Z0uBFzvaDc= github.com/aws/aws-sdk-go-v2/service/lakeformation v1.42.1 h1:4CyftMR6RY8OcqPXevgS1DOwiSwYwgTcLK2cdUcVZCo= github.com/aws/aws-sdk-go-v2/service/lakeformation v1.42.1/go.mod h1:K9YPr/AqAVkWctfBvUQA0cx1rWVhmLK40TuVpSP5f2Y= -github.com/aws/aws-sdk-go-v2/service/lambda v1.74.0 h1:25nw3h+I1MI2VAxwv3PmrQYGqwTyVCbsaPBNKf8EqCA= -github.com/aws/aws-sdk-go-v2/service/lambda v1.74.0/go.mod h1:hStdY4zUjNqCjhgeaTTqnnkSAmKOxdADY3gRE3LCXWc= +github.com/aws/aws-sdk-go-v2/service/lambda v1.74.1 h1:UOf0eSkWmna/6lR+tOwJYJaTSJsA/WFYm86nE2VPklY= +github.com/aws/aws-sdk-go-v2/service/lambda v1.74.1/go.mod h1:6wi1Ji6Z2WhSfVVrFj40GbWCX+cjaCEaTuCXnAVFytM= github.com/aws/aws-sdk-go-v2/service/launchwizard v1.10.0 h1:t5u7n1MOFvJlSuZyC9vt8e8c6/Ouf17kdNBfMKLc9EM= github.com/aws/aws-sdk-go-v2/service/launchwizard v1.10.0/go.mod h1:fXUVxL8k//G6oSMUHj8vxdgRjZ0PgPHdZG/IwZu3beI= github.com/aws/aws-sdk-go-v2/service/lexmodelbuildingservice v1.30.0 h1:BRI+UM9zZIkBdKLB3EoJmpTbQaw4D0Gpj2YIO7ZE5Cc= From 6c91d0db1baff49bfb86ec94cdc09e996ee8108d Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 09:13:37 -0400 Subject: [PATCH 221/365] go get github.com/aws/aws-sdk-go-v2/service/launchwizard. --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index dae58ed38f88..b4f7e8d3a0b6 100644 --- a/go.mod +++ b/go.mod @@ -155,7 +155,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/kms v1.42.1 github.com/aws/aws-sdk-go-v2/service/lakeformation v1.42.1 github.com/aws/aws-sdk-go-v2/service/lambda v1.74.1 - github.com/aws/aws-sdk-go-v2/service/launchwizard v1.10.0 + github.com/aws/aws-sdk-go-v2/service/launchwizard v1.10.1 github.com/aws/aws-sdk-go-v2/service/lexmodelbuildingservice v1.30.0 github.com/aws/aws-sdk-go-v2/service/lexmodelsv2 v1.53.0 github.com/aws/aws-sdk-go-v2/service/licensemanager v1.33.0 diff --git a/go.sum b/go.sum index e3e82d2a9c23..ca2e21364c66 100644 --- a/go.sum +++ b/go.sum @@ -331,8 +331,8 @@ github.com/aws/aws-sdk-go-v2/service/lakeformation v1.42.1 h1:4CyftMR6RY8OcqPXev github.com/aws/aws-sdk-go-v2/service/lakeformation v1.42.1/go.mod h1:K9YPr/AqAVkWctfBvUQA0cx1rWVhmLK40TuVpSP5f2Y= github.com/aws/aws-sdk-go-v2/service/lambda v1.74.1 h1:UOf0eSkWmna/6lR+tOwJYJaTSJsA/WFYm86nE2VPklY= github.com/aws/aws-sdk-go-v2/service/lambda v1.74.1/go.mod h1:6wi1Ji6Z2WhSfVVrFj40GbWCX+cjaCEaTuCXnAVFytM= -github.com/aws/aws-sdk-go-v2/service/launchwizard v1.10.0 h1:t5u7n1MOFvJlSuZyC9vt8e8c6/Ouf17kdNBfMKLc9EM= -github.com/aws/aws-sdk-go-v2/service/launchwizard v1.10.0/go.mod h1:fXUVxL8k//G6oSMUHj8vxdgRjZ0PgPHdZG/IwZu3beI= +github.com/aws/aws-sdk-go-v2/service/launchwizard v1.10.1 h1:UHzprFuR4wfo8uRS3L8v+dgKeh42yksH1B3hByojDcU= +github.com/aws/aws-sdk-go-v2/service/launchwizard v1.10.1/go.mod h1:jvg+B3ZzZjLCMUBKdLCpEIZv5Mz/QqPyWHlCUlQXxjg= github.com/aws/aws-sdk-go-v2/service/lexmodelbuildingservice v1.30.0 h1:BRI+UM9zZIkBdKLB3EoJmpTbQaw4D0Gpj2YIO7ZE5Cc= github.com/aws/aws-sdk-go-v2/service/lexmodelbuildingservice v1.30.0/go.mod h1:0vDLJ+tYsX00G5EEZ7gHwg5I31g3q2RrpGjZQFUJS8U= github.com/aws/aws-sdk-go-v2/service/lexmodelsv2 v1.53.0 h1:Kzff70g8z4ihsBNj4WQ1TvXHTS//6s1eyZgPV876TEE= From cec59854635cf24d39506e21df4e2fd0873efb06 Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 09:13:38 -0400 Subject: [PATCH 222/365] go get github.com/aws/aws-sdk-go-v2/service/lexmodelbuildingservice. --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index b4f7e8d3a0b6..b431ce2e5643 100644 --- a/go.mod +++ b/go.mod @@ -156,7 +156,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/lakeformation v1.42.1 github.com/aws/aws-sdk-go-v2/service/lambda v1.74.1 github.com/aws/aws-sdk-go-v2/service/launchwizard v1.10.1 - github.com/aws/aws-sdk-go-v2/service/lexmodelbuildingservice v1.30.0 + github.com/aws/aws-sdk-go-v2/service/lexmodelbuildingservice v1.30.1 github.com/aws/aws-sdk-go-v2/service/lexmodelsv2 v1.53.0 github.com/aws/aws-sdk-go-v2/service/licensemanager v1.33.0 github.com/aws/aws-sdk-go-v2/service/lightsail v1.44.0 diff --git a/go.sum b/go.sum index ca2e21364c66..6844cb45477a 100644 --- a/go.sum +++ b/go.sum @@ -333,8 +333,8 @@ github.com/aws/aws-sdk-go-v2/service/lambda v1.74.1 h1:UOf0eSkWmna/6lR+tOwJYJaTS github.com/aws/aws-sdk-go-v2/service/lambda v1.74.1/go.mod h1:6wi1Ji6Z2WhSfVVrFj40GbWCX+cjaCEaTuCXnAVFytM= github.com/aws/aws-sdk-go-v2/service/launchwizard v1.10.1 h1:UHzprFuR4wfo8uRS3L8v+dgKeh42yksH1B3hByojDcU= github.com/aws/aws-sdk-go-v2/service/launchwizard v1.10.1/go.mod h1:jvg+B3ZzZjLCMUBKdLCpEIZv5Mz/QqPyWHlCUlQXxjg= -github.com/aws/aws-sdk-go-v2/service/lexmodelbuildingservice v1.30.0 h1:BRI+UM9zZIkBdKLB3EoJmpTbQaw4D0Gpj2YIO7ZE5Cc= -github.com/aws/aws-sdk-go-v2/service/lexmodelbuildingservice v1.30.0/go.mod h1:0vDLJ+tYsX00G5EEZ7gHwg5I31g3q2RrpGjZQFUJS8U= +github.com/aws/aws-sdk-go-v2/service/lexmodelbuildingservice v1.30.1 h1:ZdNwKDTwPA1Bei71W6Q57HdTrAGWTCJEpKD24/r0Avo= +github.com/aws/aws-sdk-go-v2/service/lexmodelbuildingservice v1.30.1/go.mod h1:uYKKga1apHlzaH5HG+Y52OKjXLTJsC0HQ4+XTBkM7qA= github.com/aws/aws-sdk-go-v2/service/lexmodelsv2 v1.53.0 h1:Kzff70g8z4ihsBNj4WQ1TvXHTS//6s1eyZgPV876TEE= github.com/aws/aws-sdk-go-v2/service/lexmodelsv2 v1.53.0/go.mod h1:XDsQ1txaKysUyDEx2Z5G4GEo8yC1J0plmijNm3nZgZw= github.com/aws/aws-sdk-go-v2/service/licensemanager v1.33.0 h1:gREPvB66jMT+3XlrXRhrRF1AaOAq9LWUZ8tsGmH5vKs= From 047d7fcb40ae46633c7ed08b7bb4ff0f82927cc2 Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 09:13:39 -0400 Subject: [PATCH 223/365] go get github.com/aws/aws-sdk-go-v2/service/lexmodelsv2. --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index b431ce2e5643..820bd48e3612 100644 --- a/go.mod +++ b/go.mod @@ -157,7 +157,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/lambda v1.74.1 github.com/aws/aws-sdk-go-v2/service/launchwizard v1.10.1 github.com/aws/aws-sdk-go-v2/service/lexmodelbuildingservice v1.30.1 - github.com/aws/aws-sdk-go-v2/service/lexmodelsv2 v1.53.0 + github.com/aws/aws-sdk-go-v2/service/lexmodelsv2 v1.53.1 github.com/aws/aws-sdk-go-v2/service/licensemanager v1.33.0 github.com/aws/aws-sdk-go-v2/service/lightsail v1.44.0 github.com/aws/aws-sdk-go-v2/service/location v1.46.0 diff --git a/go.sum b/go.sum index 6844cb45477a..95641ff52522 100644 --- a/go.sum +++ b/go.sum @@ -335,8 +335,8 @@ github.com/aws/aws-sdk-go-v2/service/launchwizard v1.10.1 h1:UHzprFuR4wfo8uRS3L8 github.com/aws/aws-sdk-go-v2/service/launchwizard v1.10.1/go.mod h1:jvg+B3ZzZjLCMUBKdLCpEIZv5Mz/QqPyWHlCUlQXxjg= github.com/aws/aws-sdk-go-v2/service/lexmodelbuildingservice v1.30.1 h1:ZdNwKDTwPA1Bei71W6Q57HdTrAGWTCJEpKD24/r0Avo= github.com/aws/aws-sdk-go-v2/service/lexmodelbuildingservice v1.30.1/go.mod h1:uYKKga1apHlzaH5HG+Y52OKjXLTJsC0HQ4+XTBkM7qA= -github.com/aws/aws-sdk-go-v2/service/lexmodelsv2 v1.53.0 h1:Kzff70g8z4ihsBNj4WQ1TvXHTS//6s1eyZgPV876TEE= -github.com/aws/aws-sdk-go-v2/service/lexmodelsv2 v1.53.0/go.mod h1:XDsQ1txaKysUyDEx2Z5G4GEo8yC1J0plmijNm3nZgZw= +github.com/aws/aws-sdk-go-v2/service/lexmodelsv2 v1.53.1 h1:1qKrJXGcgICGlJ1dwlvOHS2gutVQpdBdYweO+spMIAo= +github.com/aws/aws-sdk-go-v2/service/lexmodelsv2 v1.53.1/go.mod h1:IQdDJQwO16pmmylU4iIgbgBSNk5bPhlUnuhsl5HhfS8= github.com/aws/aws-sdk-go-v2/service/licensemanager v1.33.0 h1:gREPvB66jMT+3XlrXRhrRF1AaOAq9LWUZ8tsGmH5vKs= github.com/aws/aws-sdk-go-v2/service/licensemanager v1.33.0/go.mod h1:rkcCcDstRuanMv+H+LCjhItIifSUqfqjZHpqVA5YPts= github.com/aws/aws-sdk-go-v2/service/lightsail v1.44.0 h1:QiiCqpKy0prxq+92uWfESzcb7/8Y9JAamcMOzVYLEoM= From 93df624c4c7e8707816cbb9b3d829221902b037d Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 09:13:40 -0400 Subject: [PATCH 224/365] go get github.com/aws/aws-sdk-go-v2/service/licensemanager. --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 820bd48e3612..5bacba7f15af 100644 --- a/go.mod +++ b/go.mod @@ -158,7 +158,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/launchwizard v1.10.1 github.com/aws/aws-sdk-go-v2/service/lexmodelbuildingservice v1.30.1 github.com/aws/aws-sdk-go-v2/service/lexmodelsv2 v1.53.1 - github.com/aws/aws-sdk-go-v2/service/licensemanager v1.33.0 + github.com/aws/aws-sdk-go-v2/service/licensemanager v1.33.1 github.com/aws/aws-sdk-go-v2/service/lightsail v1.44.0 github.com/aws/aws-sdk-go-v2/service/location v1.46.0 github.com/aws/aws-sdk-go-v2/service/lookoutmetrics v1.33.0 diff --git a/go.sum b/go.sum index 95641ff52522..0a4a66b2d866 100644 --- a/go.sum +++ b/go.sum @@ -337,8 +337,8 @@ github.com/aws/aws-sdk-go-v2/service/lexmodelbuildingservice v1.30.1 h1:ZdNwKDTw github.com/aws/aws-sdk-go-v2/service/lexmodelbuildingservice v1.30.1/go.mod h1:uYKKga1apHlzaH5HG+Y52OKjXLTJsC0HQ4+XTBkM7qA= github.com/aws/aws-sdk-go-v2/service/lexmodelsv2 v1.53.1 h1:1qKrJXGcgICGlJ1dwlvOHS2gutVQpdBdYweO+spMIAo= github.com/aws/aws-sdk-go-v2/service/lexmodelsv2 v1.53.1/go.mod h1:IQdDJQwO16pmmylU4iIgbgBSNk5bPhlUnuhsl5HhfS8= -github.com/aws/aws-sdk-go-v2/service/licensemanager v1.33.0 h1:gREPvB66jMT+3XlrXRhrRF1AaOAq9LWUZ8tsGmH5vKs= -github.com/aws/aws-sdk-go-v2/service/licensemanager v1.33.0/go.mod h1:rkcCcDstRuanMv+H+LCjhItIifSUqfqjZHpqVA5YPts= +github.com/aws/aws-sdk-go-v2/service/licensemanager v1.33.1 h1:BpPBMw8QekkoJpH34s/XYoNpVtMr7QTpDNcxQnMOvhw= +github.com/aws/aws-sdk-go-v2/service/licensemanager v1.33.1/go.mod h1:dSYHIVdITBrd19X2U36SemcuPoX7Mtxif3YjBSgKGa0= github.com/aws/aws-sdk-go-v2/service/lightsail v1.44.0 h1:QiiCqpKy0prxq+92uWfESzcb7/8Y9JAamcMOzVYLEoM= github.com/aws/aws-sdk-go-v2/service/lightsail v1.44.0/go.mod h1:ESppxYqXQCpCY+KWl3BdkQjmsQX6zxKP39SnDtRDoU0= github.com/aws/aws-sdk-go-v2/service/location v1.46.0 h1:5eCyFVJG18Cvz6sf3dJk39hT2kgaIzxXgiDPMn+oG/o= From 9d758eae48c90a0b7a9573c7b51762c3e203b8d3 Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 09:13:41 -0400 Subject: [PATCH 225/365] go get github.com/aws/aws-sdk-go-v2/service/lightsail. --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 5bacba7f15af..f5f915e093e1 100644 --- a/go.mod +++ b/go.mod @@ -159,7 +159,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/lexmodelbuildingservice v1.30.1 github.com/aws/aws-sdk-go-v2/service/lexmodelsv2 v1.53.1 github.com/aws/aws-sdk-go-v2/service/licensemanager v1.33.1 - github.com/aws/aws-sdk-go-v2/service/lightsail v1.44.0 + github.com/aws/aws-sdk-go-v2/service/lightsail v1.44.1 github.com/aws/aws-sdk-go-v2/service/location v1.46.0 github.com/aws/aws-sdk-go-v2/service/lookoutmetrics v1.33.0 github.com/aws/aws-sdk-go-v2/service/m2 v1.22.0 diff --git a/go.sum b/go.sum index 0a4a66b2d866..1e0f832e7c0e 100644 --- a/go.sum +++ b/go.sum @@ -339,8 +339,8 @@ github.com/aws/aws-sdk-go-v2/service/lexmodelsv2 v1.53.1 h1:1qKrJXGcgICGlJ1dwlvO github.com/aws/aws-sdk-go-v2/service/lexmodelsv2 v1.53.1/go.mod h1:IQdDJQwO16pmmylU4iIgbgBSNk5bPhlUnuhsl5HhfS8= github.com/aws/aws-sdk-go-v2/service/licensemanager v1.33.1 h1:BpPBMw8QekkoJpH34s/XYoNpVtMr7QTpDNcxQnMOvhw= github.com/aws/aws-sdk-go-v2/service/licensemanager v1.33.1/go.mod h1:dSYHIVdITBrd19X2U36SemcuPoX7Mtxif3YjBSgKGa0= -github.com/aws/aws-sdk-go-v2/service/lightsail v1.44.0 h1:QiiCqpKy0prxq+92uWfESzcb7/8Y9JAamcMOzVYLEoM= -github.com/aws/aws-sdk-go-v2/service/lightsail v1.44.0/go.mod h1:ESppxYqXQCpCY+KWl3BdkQjmsQX6zxKP39SnDtRDoU0= +github.com/aws/aws-sdk-go-v2/service/lightsail v1.44.1 h1:szsDy+Jx8LhOvlyqJfGzho4sPxist94khUm4QwTG+cs= +github.com/aws/aws-sdk-go-v2/service/lightsail v1.44.1/go.mod h1:FUyjCuISm1KKO++ZK9Lc251IfdJXZBRKo4cHCZa7RcI= github.com/aws/aws-sdk-go-v2/service/location v1.46.0 h1:5eCyFVJG18Cvz6sf3dJk39hT2kgaIzxXgiDPMn+oG/o= github.com/aws/aws-sdk-go-v2/service/location v1.46.0/go.mod h1:hUD8+2JnMcdB0qnmW5J2zv9IgyDFpHM4L9yPf8NC77g= github.com/aws/aws-sdk-go-v2/service/lookoutmetrics v1.33.0 h1:SrvtIfGyaw22vdKKPNwGsi0Bf0NFA7fcgsmnEz2qvZ8= From 38a24a4068408388f06bfce7ac931989981db642 Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 09:13:43 -0400 Subject: [PATCH 226/365] go get github.com/aws/aws-sdk-go-v2/service/location. --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index f5f915e093e1..1389b47b875a 100644 --- a/go.mod +++ b/go.mod @@ -160,7 +160,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/lexmodelsv2 v1.53.1 github.com/aws/aws-sdk-go-v2/service/licensemanager v1.33.1 github.com/aws/aws-sdk-go-v2/service/lightsail v1.44.1 - github.com/aws/aws-sdk-go-v2/service/location v1.46.0 + github.com/aws/aws-sdk-go-v2/service/location v1.46.1 github.com/aws/aws-sdk-go-v2/service/lookoutmetrics v1.33.0 github.com/aws/aws-sdk-go-v2/service/m2 v1.22.0 github.com/aws/aws-sdk-go-v2/service/macie2 v1.46.0 diff --git a/go.sum b/go.sum index 1e0f832e7c0e..92b9a523f6da 100644 --- a/go.sum +++ b/go.sum @@ -341,8 +341,8 @@ github.com/aws/aws-sdk-go-v2/service/licensemanager v1.33.1 h1:BpPBMw8QekkoJpH34 github.com/aws/aws-sdk-go-v2/service/licensemanager v1.33.1/go.mod h1:dSYHIVdITBrd19X2U36SemcuPoX7Mtxif3YjBSgKGa0= github.com/aws/aws-sdk-go-v2/service/lightsail v1.44.1 h1:szsDy+Jx8LhOvlyqJfGzho4sPxist94khUm4QwTG+cs= github.com/aws/aws-sdk-go-v2/service/lightsail v1.44.1/go.mod h1:FUyjCuISm1KKO++ZK9Lc251IfdJXZBRKo4cHCZa7RcI= -github.com/aws/aws-sdk-go-v2/service/location v1.46.0 h1:5eCyFVJG18Cvz6sf3dJk39hT2kgaIzxXgiDPMn+oG/o= -github.com/aws/aws-sdk-go-v2/service/location v1.46.0/go.mod h1:hUD8+2JnMcdB0qnmW5J2zv9IgyDFpHM4L9yPf8NC77g= +github.com/aws/aws-sdk-go-v2/service/location v1.46.1 h1:rWsI4OIvYu8fMV1KbccxlpTKWcQEPk1YKWiUiRLfNgs= +github.com/aws/aws-sdk-go-v2/service/location v1.46.1/go.mod h1:ZW2qOTqxIPQtuMLv7nj4WS+h4utqLoaNzDmCfgeqTNg= github.com/aws/aws-sdk-go-v2/service/lookoutmetrics v1.33.0 h1:SrvtIfGyaw22vdKKPNwGsi0Bf0NFA7fcgsmnEz2qvZ8= github.com/aws/aws-sdk-go-v2/service/lookoutmetrics v1.33.0/go.mod h1:ioFUk+nxNNFp8depbsQ95XloZUpB5cUFA2WL6xW1j4Q= github.com/aws/aws-sdk-go-v2/service/m2 v1.22.0 h1:jKXnubb6qCeGzzwH8zpFaQtrTz+qBWc/I+XMMoeXI+Q= From 00cd3f4e46dc5ff84d5f85a059dacdf798e55fe4 Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 09:13:44 -0400 Subject: [PATCH 227/365] go get github.com/aws/aws-sdk-go-v2/service/lookoutmetrics. --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 1389b47b875a..ee2c7586371d 100644 --- a/go.mod +++ b/go.mod @@ -161,7 +161,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/licensemanager v1.33.1 github.com/aws/aws-sdk-go-v2/service/lightsail v1.44.1 github.com/aws/aws-sdk-go-v2/service/location v1.46.1 - github.com/aws/aws-sdk-go-v2/service/lookoutmetrics v1.33.0 + github.com/aws/aws-sdk-go-v2/service/lookoutmetrics v1.33.1 github.com/aws/aws-sdk-go-v2/service/m2 v1.22.0 github.com/aws/aws-sdk-go-v2/service/macie2 v1.46.0 github.com/aws/aws-sdk-go-v2/service/mediaconnect v1.41.0 diff --git a/go.sum b/go.sum index 92b9a523f6da..2acf9aa28dd0 100644 --- a/go.sum +++ b/go.sum @@ -343,8 +343,8 @@ github.com/aws/aws-sdk-go-v2/service/lightsail v1.44.1 h1:szsDy+Jx8LhOvlyqJfGzho github.com/aws/aws-sdk-go-v2/service/lightsail v1.44.1/go.mod h1:FUyjCuISm1KKO++ZK9Lc251IfdJXZBRKo4cHCZa7RcI= github.com/aws/aws-sdk-go-v2/service/location v1.46.1 h1:rWsI4OIvYu8fMV1KbccxlpTKWcQEPk1YKWiUiRLfNgs= github.com/aws/aws-sdk-go-v2/service/location v1.46.1/go.mod h1:ZW2qOTqxIPQtuMLv7nj4WS+h4utqLoaNzDmCfgeqTNg= -github.com/aws/aws-sdk-go-v2/service/lookoutmetrics v1.33.0 h1:SrvtIfGyaw22vdKKPNwGsi0Bf0NFA7fcgsmnEz2qvZ8= -github.com/aws/aws-sdk-go-v2/service/lookoutmetrics v1.33.0/go.mod h1:ioFUk+nxNNFp8depbsQ95XloZUpB5cUFA2WL6xW1j4Q= +github.com/aws/aws-sdk-go-v2/service/lookoutmetrics v1.33.1 h1:/LIKKQyGfyjLElsw12AAD/b4T1gjvCRpo9PWXFBXG1Y= +github.com/aws/aws-sdk-go-v2/service/lookoutmetrics v1.33.1/go.mod h1:Pw2uocVTqdNrapt5q/mtamq/+D57zWgIx3U+rzGc6To= github.com/aws/aws-sdk-go-v2/service/m2 v1.22.0 h1:jKXnubb6qCeGzzwH8zpFaQtrTz+qBWc/I+XMMoeXI+Q= github.com/aws/aws-sdk-go-v2/service/m2 v1.22.0/go.mod h1:2BdpFk3k48/N5XqGFH/TV3KClzkXrM2QOwKiXW2h4PA= github.com/aws/aws-sdk-go-v2/service/macie2 v1.46.0 h1:DEtkJIg9D+GAR7Q5H67Ncr4Zf3y4hkhmd3iTk+pwYbU= From a418bf82995c90f7daf8241b0ee04969e58c986e Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 09:13:45 -0400 Subject: [PATCH 228/365] go get github.com/aws/aws-sdk-go-v2/service/m2. --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index ee2c7586371d..6c2c0937a5ef 100644 --- a/go.mod +++ b/go.mod @@ -162,7 +162,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/lightsail v1.44.1 github.com/aws/aws-sdk-go-v2/service/location v1.46.1 github.com/aws/aws-sdk-go-v2/service/lookoutmetrics v1.33.1 - github.com/aws/aws-sdk-go-v2/service/m2 v1.22.0 + github.com/aws/aws-sdk-go-v2/service/m2 v1.22.1 github.com/aws/aws-sdk-go-v2/service/macie2 v1.46.0 github.com/aws/aws-sdk-go-v2/service/mediaconnect v1.41.0 github.com/aws/aws-sdk-go-v2/service/mediaconvert v1.78.0 diff --git a/go.sum b/go.sum index 2acf9aa28dd0..8c1cd924a02e 100644 --- a/go.sum +++ b/go.sum @@ -345,8 +345,8 @@ github.com/aws/aws-sdk-go-v2/service/location v1.46.1 h1:rWsI4OIvYu8fMV1KbccxlpT github.com/aws/aws-sdk-go-v2/service/location v1.46.1/go.mod h1:ZW2qOTqxIPQtuMLv7nj4WS+h4utqLoaNzDmCfgeqTNg= github.com/aws/aws-sdk-go-v2/service/lookoutmetrics v1.33.1 h1:/LIKKQyGfyjLElsw12AAD/b4T1gjvCRpo9PWXFBXG1Y= github.com/aws/aws-sdk-go-v2/service/lookoutmetrics v1.33.1/go.mod h1:Pw2uocVTqdNrapt5q/mtamq/+D57zWgIx3U+rzGc6To= -github.com/aws/aws-sdk-go-v2/service/m2 v1.22.0 h1:jKXnubb6qCeGzzwH8zpFaQtrTz+qBWc/I+XMMoeXI+Q= -github.com/aws/aws-sdk-go-v2/service/m2 v1.22.0/go.mod h1:2BdpFk3k48/N5XqGFH/TV3KClzkXrM2QOwKiXW2h4PA= +github.com/aws/aws-sdk-go-v2/service/m2 v1.22.1 h1:tFiMPcBLb+/33azrdMA2hqqc15D+h8H7mAI70dhuKLI= +github.com/aws/aws-sdk-go-v2/service/m2 v1.22.1/go.mod h1:HumPBe3ugDYqq08O7tsa4etAg05gfPRJCnXhVlmUR94= github.com/aws/aws-sdk-go-v2/service/macie2 v1.46.0 h1:DEtkJIg9D+GAR7Q5H67Ncr4Zf3y4hkhmd3iTk+pwYbU= github.com/aws/aws-sdk-go-v2/service/macie2 v1.46.0/go.mod h1:x3oHgXHi9UQ0GCaULPaVbfpV37FC3eFQhfj/SyDbFUk= github.com/aws/aws-sdk-go-v2/service/mediaconnect v1.41.0 h1:TY2Y5tgbug8GkDuQfCs3fA8n0Mj7gk/Y298QC9IsuVU= From 155c8956b6f9f99b54648215d9ae64b31a99e00d Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 09:13:46 -0400 Subject: [PATCH 229/365] go get github.com/aws/aws-sdk-go-v2/service/macie2. --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 6c2c0937a5ef..ba4b4f78498b 100644 --- a/go.mod +++ b/go.mod @@ -163,7 +163,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/location v1.46.1 github.com/aws/aws-sdk-go-v2/service/lookoutmetrics v1.33.1 github.com/aws/aws-sdk-go-v2/service/m2 v1.22.1 - github.com/aws/aws-sdk-go-v2/service/macie2 v1.46.0 + github.com/aws/aws-sdk-go-v2/service/macie2 v1.46.1 github.com/aws/aws-sdk-go-v2/service/mediaconnect v1.41.0 github.com/aws/aws-sdk-go-v2/service/mediaconvert v1.78.0 github.com/aws/aws-sdk-go-v2/service/medialive v1.77.0 diff --git a/go.sum b/go.sum index 8c1cd924a02e..67b52555452e 100644 --- a/go.sum +++ b/go.sum @@ -347,8 +347,8 @@ github.com/aws/aws-sdk-go-v2/service/lookoutmetrics v1.33.1 h1:/LIKKQyGfyjLElsw1 github.com/aws/aws-sdk-go-v2/service/lookoutmetrics v1.33.1/go.mod h1:Pw2uocVTqdNrapt5q/mtamq/+D57zWgIx3U+rzGc6To= github.com/aws/aws-sdk-go-v2/service/m2 v1.22.1 h1:tFiMPcBLb+/33azrdMA2hqqc15D+h8H7mAI70dhuKLI= github.com/aws/aws-sdk-go-v2/service/m2 v1.22.1/go.mod h1:HumPBe3ugDYqq08O7tsa4etAg05gfPRJCnXhVlmUR94= -github.com/aws/aws-sdk-go-v2/service/macie2 v1.46.0 h1:DEtkJIg9D+GAR7Q5H67Ncr4Zf3y4hkhmd3iTk+pwYbU= -github.com/aws/aws-sdk-go-v2/service/macie2 v1.46.0/go.mod h1:x3oHgXHi9UQ0GCaULPaVbfpV37FC3eFQhfj/SyDbFUk= +github.com/aws/aws-sdk-go-v2/service/macie2 v1.46.1 h1:KEtnVAAkIZZ8/G6IKWxyaGKQBMaq9HetTD0QvPfcO4g= +github.com/aws/aws-sdk-go-v2/service/macie2 v1.46.1/go.mod h1:yMp0gljSvRon61sIkFuvhEocyO/YhPgCkwC/BR9t02k= github.com/aws/aws-sdk-go-v2/service/mediaconnect v1.41.0 h1:TY2Y5tgbug8GkDuQfCs3fA8n0Mj7gk/Y298QC9IsuVU= github.com/aws/aws-sdk-go-v2/service/mediaconnect v1.41.0/go.mod h1:Ds6bKq2YZDxQpt4tcMiS+cbk0laqMzzLzSBeXwlMjsQ= github.com/aws/aws-sdk-go-v2/service/mediaconvert v1.78.0 h1:llo2ENJ68zhznD6qsEGosZCRWksKeTqCJhBYxg5qYck= From 5ffd08b002415b4e155dc877f477d9f12b21977d Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 09:13:47 -0400 Subject: [PATCH 230/365] go get github.com/aws/aws-sdk-go-v2/service/mediaconnect. --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index ba4b4f78498b..245926022b67 100644 --- a/go.mod +++ b/go.mod @@ -164,7 +164,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/lookoutmetrics v1.33.1 github.com/aws/aws-sdk-go-v2/service/m2 v1.22.1 github.com/aws/aws-sdk-go-v2/service/macie2 v1.46.1 - github.com/aws/aws-sdk-go-v2/service/mediaconnect v1.41.0 + github.com/aws/aws-sdk-go-v2/service/mediaconnect v1.41.1 github.com/aws/aws-sdk-go-v2/service/mediaconvert v1.78.0 github.com/aws/aws-sdk-go-v2/service/medialive v1.77.0 github.com/aws/aws-sdk-go-v2/service/mediapackage v1.36.0 diff --git a/go.sum b/go.sum index 67b52555452e..a35d0b40ec74 100644 --- a/go.sum +++ b/go.sum @@ -349,8 +349,8 @@ github.com/aws/aws-sdk-go-v2/service/m2 v1.22.1 h1:tFiMPcBLb+/33azrdMA2hqqc15D+h github.com/aws/aws-sdk-go-v2/service/m2 v1.22.1/go.mod h1:HumPBe3ugDYqq08O7tsa4etAg05gfPRJCnXhVlmUR94= github.com/aws/aws-sdk-go-v2/service/macie2 v1.46.1 h1:KEtnVAAkIZZ8/G6IKWxyaGKQBMaq9HetTD0QvPfcO4g= github.com/aws/aws-sdk-go-v2/service/macie2 v1.46.1/go.mod h1:yMp0gljSvRon61sIkFuvhEocyO/YhPgCkwC/BR9t02k= -github.com/aws/aws-sdk-go-v2/service/mediaconnect v1.41.0 h1:TY2Y5tgbug8GkDuQfCs3fA8n0Mj7gk/Y298QC9IsuVU= -github.com/aws/aws-sdk-go-v2/service/mediaconnect v1.41.0/go.mod h1:Ds6bKq2YZDxQpt4tcMiS+cbk0laqMzzLzSBeXwlMjsQ= +github.com/aws/aws-sdk-go-v2/service/mediaconnect v1.41.1 h1:taLUiA6Yq4G+47P/wKx4c0DJvCeb7oIP55hjjd49kXA= +github.com/aws/aws-sdk-go-v2/service/mediaconnect v1.41.1/go.mod h1:SebyqBabeN7s4OeaWRueG654W6sLdfCpx/G1sPuIEls= github.com/aws/aws-sdk-go-v2/service/mediaconvert v1.78.0 h1:llo2ENJ68zhznD6qsEGosZCRWksKeTqCJhBYxg5qYck= github.com/aws/aws-sdk-go-v2/service/mediaconvert v1.78.0/go.mod h1:73Bi9/BoKmD0A01BooLLimw+kKyayQ4L9lon7hJp380= github.com/aws/aws-sdk-go-v2/service/medialive v1.77.0 h1:feJCi8TOPx0O2UxAHociBZaMd4RHHiLn7vey5je5O/g= From de48e5dde3cfa793cdc06e9564dc42841d5b71c7 Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 09:13:49 -0400 Subject: [PATCH 231/365] go get github.com/aws/aws-sdk-go-v2/service/mediaconvert. --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 245926022b67..bef5a2bf0e17 100644 --- a/go.mod +++ b/go.mod @@ -165,7 +165,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/m2 v1.22.1 github.com/aws/aws-sdk-go-v2/service/macie2 v1.46.1 github.com/aws/aws-sdk-go-v2/service/mediaconnect v1.41.1 - github.com/aws/aws-sdk-go-v2/service/mediaconvert v1.78.0 + github.com/aws/aws-sdk-go-v2/service/mediaconvert v1.78.1 github.com/aws/aws-sdk-go-v2/service/medialive v1.77.0 github.com/aws/aws-sdk-go-v2/service/mediapackage v1.36.0 github.com/aws/aws-sdk-go-v2/service/mediapackagev2 v1.27.0 diff --git a/go.sum b/go.sum index a35d0b40ec74..2cb4630556cf 100644 --- a/go.sum +++ b/go.sum @@ -351,8 +351,8 @@ github.com/aws/aws-sdk-go-v2/service/macie2 v1.46.1 h1:KEtnVAAkIZZ8/G6IKWxyaGKQB github.com/aws/aws-sdk-go-v2/service/macie2 v1.46.1/go.mod h1:yMp0gljSvRon61sIkFuvhEocyO/YhPgCkwC/BR9t02k= github.com/aws/aws-sdk-go-v2/service/mediaconnect v1.41.1 h1:taLUiA6Yq4G+47P/wKx4c0DJvCeb7oIP55hjjd49kXA= github.com/aws/aws-sdk-go-v2/service/mediaconnect v1.41.1/go.mod h1:SebyqBabeN7s4OeaWRueG654W6sLdfCpx/G1sPuIEls= -github.com/aws/aws-sdk-go-v2/service/mediaconvert v1.78.0 h1:llo2ENJ68zhznD6qsEGosZCRWksKeTqCJhBYxg5qYck= -github.com/aws/aws-sdk-go-v2/service/mediaconvert v1.78.0/go.mod h1:73Bi9/BoKmD0A01BooLLimw+kKyayQ4L9lon7hJp380= +github.com/aws/aws-sdk-go-v2/service/mediaconvert v1.78.1 h1:ILaU1jUkOz1RsqmpUHv1sha/112LGVCbWMbOj9KdG1U= +github.com/aws/aws-sdk-go-v2/service/mediaconvert v1.78.1/go.mod h1:RZLbG6qHRZJ6IlYG0dBVguA5Q5bBL6KwegIN9nzvxGs= github.com/aws/aws-sdk-go-v2/service/medialive v1.77.0 h1:feJCi8TOPx0O2UxAHociBZaMd4RHHiLn7vey5je5O/g= github.com/aws/aws-sdk-go-v2/service/medialive v1.77.0/go.mod h1:jQxuvb8Mw0nBQWC/2iEumXoIyXlVu/pCOs8shnCthik= github.com/aws/aws-sdk-go-v2/service/mediapackage v1.36.0 h1:apQq0YJ4pOmhzFVVqas9UZCo7ZoTy47GUtgc7lZcwBA= From adabf3be6d817309074ef2b2aac0ab18510400c9 Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 09:13:50 -0400 Subject: [PATCH 232/365] go get github.com/aws/aws-sdk-go-v2/service/medialive. --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index bef5a2bf0e17..ce48defc3dae 100644 --- a/go.mod +++ b/go.mod @@ -166,7 +166,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/macie2 v1.46.1 github.com/aws/aws-sdk-go-v2/service/mediaconnect v1.41.1 github.com/aws/aws-sdk-go-v2/service/mediaconvert v1.78.1 - github.com/aws/aws-sdk-go-v2/service/medialive v1.77.0 + github.com/aws/aws-sdk-go-v2/service/medialive v1.77.1 github.com/aws/aws-sdk-go-v2/service/mediapackage v1.36.0 github.com/aws/aws-sdk-go-v2/service/mediapackagev2 v1.27.0 github.com/aws/aws-sdk-go-v2/service/mediapackagevod v1.36.0 diff --git a/go.sum b/go.sum index 2cb4630556cf..d754817af74a 100644 --- a/go.sum +++ b/go.sum @@ -353,8 +353,8 @@ github.com/aws/aws-sdk-go-v2/service/mediaconnect v1.41.1 h1:taLUiA6Yq4G+47P/wKx github.com/aws/aws-sdk-go-v2/service/mediaconnect v1.41.1/go.mod h1:SebyqBabeN7s4OeaWRueG654W6sLdfCpx/G1sPuIEls= github.com/aws/aws-sdk-go-v2/service/mediaconvert v1.78.1 h1:ILaU1jUkOz1RsqmpUHv1sha/112LGVCbWMbOj9KdG1U= github.com/aws/aws-sdk-go-v2/service/mediaconvert v1.78.1/go.mod h1:RZLbG6qHRZJ6IlYG0dBVguA5Q5bBL6KwegIN9nzvxGs= -github.com/aws/aws-sdk-go-v2/service/medialive v1.77.0 h1:feJCi8TOPx0O2UxAHociBZaMd4RHHiLn7vey5je5O/g= -github.com/aws/aws-sdk-go-v2/service/medialive v1.77.0/go.mod h1:jQxuvb8Mw0nBQWC/2iEumXoIyXlVu/pCOs8shnCthik= +github.com/aws/aws-sdk-go-v2/service/medialive v1.77.1 h1:OXrgpZTIzQDjkXXBy/RQKVqF91IwyC0ryEw+erBjMzY= +github.com/aws/aws-sdk-go-v2/service/medialive v1.77.1/go.mod h1:56LdU29xEz15jYRBxzt8valuQ/2GQDhuftdNowx39io= github.com/aws/aws-sdk-go-v2/service/mediapackage v1.36.0 h1:apQq0YJ4pOmhzFVVqas9UZCo7ZoTy47GUtgc7lZcwBA= github.com/aws/aws-sdk-go-v2/service/mediapackage v1.36.0/go.mod h1:hq6brPE1969qNhhuynU3ZMNOdAMNr3jRZbRq8I4/2CY= github.com/aws/aws-sdk-go-v2/service/mediapackagev2 v1.27.0 h1:R28Ut05B4IA32NiL/pJHafpCnfLkK7w6EJ4cReSXp24= From 5ec01e2989f6b93c2cffc3e44934378aeb81d1d3 Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 09:13:51 -0400 Subject: [PATCH 233/365] go get github.com/aws/aws-sdk-go-v2/service/mediapackage. --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index ce48defc3dae..5361bf9f2f4d 100644 --- a/go.mod +++ b/go.mod @@ -167,7 +167,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/mediaconnect v1.41.1 github.com/aws/aws-sdk-go-v2/service/mediaconvert v1.78.1 github.com/aws/aws-sdk-go-v2/service/medialive v1.77.1 - github.com/aws/aws-sdk-go-v2/service/mediapackage v1.36.0 + github.com/aws/aws-sdk-go-v2/service/mediapackage v1.36.1 github.com/aws/aws-sdk-go-v2/service/mediapackagev2 v1.27.0 github.com/aws/aws-sdk-go-v2/service/mediapackagevod v1.36.0 github.com/aws/aws-sdk-go-v2/service/mediastore v1.26.0 diff --git a/go.sum b/go.sum index d754817af74a..f34dc350a7db 100644 --- a/go.sum +++ b/go.sum @@ -355,8 +355,8 @@ github.com/aws/aws-sdk-go-v2/service/mediaconvert v1.78.1 h1:ILaU1jUkOz1RsqmpUHv github.com/aws/aws-sdk-go-v2/service/mediaconvert v1.78.1/go.mod h1:RZLbG6qHRZJ6IlYG0dBVguA5Q5bBL6KwegIN9nzvxGs= github.com/aws/aws-sdk-go-v2/service/medialive v1.77.1 h1:OXrgpZTIzQDjkXXBy/RQKVqF91IwyC0ryEw+erBjMzY= github.com/aws/aws-sdk-go-v2/service/medialive v1.77.1/go.mod h1:56LdU29xEz15jYRBxzt8valuQ/2GQDhuftdNowx39io= -github.com/aws/aws-sdk-go-v2/service/mediapackage v1.36.0 h1:apQq0YJ4pOmhzFVVqas9UZCo7ZoTy47GUtgc7lZcwBA= -github.com/aws/aws-sdk-go-v2/service/mediapackage v1.36.0/go.mod h1:hq6brPE1969qNhhuynU3ZMNOdAMNr3jRZbRq8I4/2CY= +github.com/aws/aws-sdk-go-v2/service/mediapackage v1.36.1 h1:6sqsETpJLgYGK8IWAd6MX47sCAyqLvPuRGLoENO4sYQ= +github.com/aws/aws-sdk-go-v2/service/mediapackage v1.36.1/go.mod h1:zFu5Y9pAUOvd9APBDiwwaMdexPv8coEizOtJmcTTVKY= github.com/aws/aws-sdk-go-v2/service/mediapackagev2 v1.27.0 h1:R28Ut05B4IA32NiL/pJHafpCnfLkK7w6EJ4cReSXp24= github.com/aws/aws-sdk-go-v2/service/mediapackagev2 v1.27.0/go.mod h1:c5h+IQeS7jS10oGQ4itDVAjCgR6q7hxGHfnh49mK0dw= github.com/aws/aws-sdk-go-v2/service/mediapackagevod v1.36.0 h1:Lf7B/RD6MvHS6UgfKuNjtR725OcuR0ZaPwGP60iBZgE= From b89e89130bf35e2bd3bd36e49a4a897f69f07970 Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 09:13:52 -0400 Subject: [PATCH 234/365] go get github.com/aws/aws-sdk-go-v2/service/mediapackagev2. --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 5361bf9f2f4d..285064c1194a 100644 --- a/go.mod +++ b/go.mod @@ -168,7 +168,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/mediaconvert v1.78.1 github.com/aws/aws-sdk-go-v2/service/medialive v1.77.1 github.com/aws/aws-sdk-go-v2/service/mediapackage v1.36.1 - github.com/aws/aws-sdk-go-v2/service/mediapackagev2 v1.27.0 + github.com/aws/aws-sdk-go-v2/service/mediapackagev2 v1.27.1 github.com/aws/aws-sdk-go-v2/service/mediapackagevod v1.36.0 github.com/aws/aws-sdk-go-v2/service/mediastore v1.26.0 github.com/aws/aws-sdk-go-v2/service/memorydb v1.28.0 diff --git a/go.sum b/go.sum index f34dc350a7db..b999bd44e311 100644 --- a/go.sum +++ b/go.sum @@ -357,8 +357,8 @@ github.com/aws/aws-sdk-go-v2/service/medialive v1.77.1 h1:OXrgpZTIzQDjkXXBy/RQKV github.com/aws/aws-sdk-go-v2/service/medialive v1.77.1/go.mod h1:56LdU29xEz15jYRBxzt8valuQ/2GQDhuftdNowx39io= github.com/aws/aws-sdk-go-v2/service/mediapackage v1.36.1 h1:6sqsETpJLgYGK8IWAd6MX47sCAyqLvPuRGLoENO4sYQ= github.com/aws/aws-sdk-go-v2/service/mediapackage v1.36.1/go.mod h1:zFu5Y9pAUOvd9APBDiwwaMdexPv8coEizOtJmcTTVKY= -github.com/aws/aws-sdk-go-v2/service/mediapackagev2 v1.27.0 h1:R28Ut05B4IA32NiL/pJHafpCnfLkK7w6EJ4cReSXp24= -github.com/aws/aws-sdk-go-v2/service/mediapackagev2 v1.27.0/go.mod h1:c5h+IQeS7jS10oGQ4itDVAjCgR6q7hxGHfnh49mK0dw= +github.com/aws/aws-sdk-go-v2/service/mediapackagev2 v1.27.1 h1:FvjHODeuJ7LCmlOAB1hVQIFvOQyORIVuDJfi3+6R3oo= +github.com/aws/aws-sdk-go-v2/service/mediapackagev2 v1.27.1/go.mod h1:H5n6sQyEZPmFcdU8XSh8iIh/oR7PeJXBKL2TVyAq4Yo= github.com/aws/aws-sdk-go-v2/service/mediapackagevod v1.36.0 h1:Lf7B/RD6MvHS6UgfKuNjtR725OcuR0ZaPwGP60iBZgE= github.com/aws/aws-sdk-go-v2/service/mediapackagevod v1.36.0/go.mod h1:9+LSccaXi23nGjvB4yNtQE8/pAmcfaqEvRtf5qtnZY0= github.com/aws/aws-sdk-go-v2/service/mediastore v1.26.0 h1:lXx9k5BWc6crHEpQVfF7UREtAhaydKOpMcdBokokt5Q= From e31642164f7c48f2519eec0744d70f16320c78da Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 09:13:53 -0400 Subject: [PATCH 235/365] go get github.com/aws/aws-sdk-go-v2/service/mediapackagevod. --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 285064c1194a..5d0ac0ce3d05 100644 --- a/go.mod +++ b/go.mod @@ -169,7 +169,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/medialive v1.77.1 github.com/aws/aws-sdk-go-v2/service/mediapackage v1.36.1 github.com/aws/aws-sdk-go-v2/service/mediapackagev2 v1.27.1 - github.com/aws/aws-sdk-go-v2/service/mediapackagevod v1.36.0 + github.com/aws/aws-sdk-go-v2/service/mediapackagevod v1.36.1 github.com/aws/aws-sdk-go-v2/service/mediastore v1.26.0 github.com/aws/aws-sdk-go-v2/service/memorydb v1.28.0 github.com/aws/aws-sdk-go-v2/service/mgn v1.34.0 diff --git a/go.sum b/go.sum index b999bd44e311..c861975c66b2 100644 --- a/go.sum +++ b/go.sum @@ -359,8 +359,8 @@ github.com/aws/aws-sdk-go-v2/service/mediapackage v1.36.1 h1:6sqsETpJLgYGK8IWAd6 github.com/aws/aws-sdk-go-v2/service/mediapackage v1.36.1/go.mod h1:zFu5Y9pAUOvd9APBDiwwaMdexPv8coEizOtJmcTTVKY= github.com/aws/aws-sdk-go-v2/service/mediapackagev2 v1.27.1 h1:FvjHODeuJ7LCmlOAB1hVQIFvOQyORIVuDJfi3+6R3oo= github.com/aws/aws-sdk-go-v2/service/mediapackagev2 v1.27.1/go.mod h1:H5n6sQyEZPmFcdU8XSh8iIh/oR7PeJXBKL2TVyAq4Yo= -github.com/aws/aws-sdk-go-v2/service/mediapackagevod v1.36.0 h1:Lf7B/RD6MvHS6UgfKuNjtR725OcuR0ZaPwGP60iBZgE= -github.com/aws/aws-sdk-go-v2/service/mediapackagevod v1.36.0/go.mod h1:9+LSccaXi23nGjvB4yNtQE8/pAmcfaqEvRtf5qtnZY0= +github.com/aws/aws-sdk-go-v2/service/mediapackagevod v1.36.1 h1:AQ2g2KbJsfagdo2CwQAGINtwFhDpFo6U6NE/BP9ft54= +github.com/aws/aws-sdk-go-v2/service/mediapackagevod v1.36.1/go.mod h1:C/K0HedKYyj/az2xaZz5yWoi9vv6hpRTcPjCHk7jkTg= github.com/aws/aws-sdk-go-v2/service/mediastore v1.26.0 h1:lXx9k5BWc6crHEpQVfF7UREtAhaydKOpMcdBokokt5Q= github.com/aws/aws-sdk-go-v2/service/mediastore v1.26.0/go.mod h1:9ivDqZj+bWFlZzYkcEkCFvMXBXM9sZ9Lx0O+1jmy0uc= github.com/aws/aws-sdk-go-v2/service/memorydb v1.28.0 h1:EfkktEU1lJahZWV0Oze2Ni1v1OwIB+V5EfA/nU2M8BQ= From 43488bd339956c7184287df2818a21e66a64d1d5 Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 09:13:54 -0400 Subject: [PATCH 236/365] go get github.com/aws/aws-sdk-go-v2/service/mediastore. --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 5d0ac0ce3d05..3ba04f9ef95a 100644 --- a/go.mod +++ b/go.mod @@ -170,7 +170,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/mediapackage v1.36.1 github.com/aws/aws-sdk-go-v2/service/mediapackagev2 v1.27.1 github.com/aws/aws-sdk-go-v2/service/mediapackagevod v1.36.1 - github.com/aws/aws-sdk-go-v2/service/mediastore v1.26.0 + github.com/aws/aws-sdk-go-v2/service/mediastore v1.26.1 github.com/aws/aws-sdk-go-v2/service/memorydb v1.28.0 github.com/aws/aws-sdk-go-v2/service/mgn v1.34.0 github.com/aws/aws-sdk-go-v2/service/mq v1.30.0 diff --git a/go.sum b/go.sum index c861975c66b2..3e11e68defce 100644 --- a/go.sum +++ b/go.sum @@ -361,8 +361,8 @@ github.com/aws/aws-sdk-go-v2/service/mediapackagev2 v1.27.1 h1:FvjHODeuJ7LCmlOAB github.com/aws/aws-sdk-go-v2/service/mediapackagev2 v1.27.1/go.mod h1:H5n6sQyEZPmFcdU8XSh8iIh/oR7PeJXBKL2TVyAq4Yo= github.com/aws/aws-sdk-go-v2/service/mediapackagevod v1.36.1 h1:AQ2g2KbJsfagdo2CwQAGINtwFhDpFo6U6NE/BP9ft54= github.com/aws/aws-sdk-go-v2/service/mediapackagevod v1.36.1/go.mod h1:C/K0HedKYyj/az2xaZz5yWoi9vv6hpRTcPjCHk7jkTg= -github.com/aws/aws-sdk-go-v2/service/mediastore v1.26.0 h1:lXx9k5BWc6crHEpQVfF7UREtAhaydKOpMcdBokokt5Q= -github.com/aws/aws-sdk-go-v2/service/mediastore v1.26.0/go.mod h1:9ivDqZj+bWFlZzYkcEkCFvMXBXM9sZ9Lx0O+1jmy0uc= +github.com/aws/aws-sdk-go-v2/service/mediastore v1.26.1 h1:vqr5cfKyoCtj3FJXYnHpZ/svnPUQ2Qce3wiX2exVKJU= +github.com/aws/aws-sdk-go-v2/service/mediastore v1.26.1/go.mod h1:udUYbqmxEiWg4Pe4v7CoSWSZdVTjjbkvcnUKSY0ANM4= github.com/aws/aws-sdk-go-v2/service/memorydb v1.28.0 h1:EfkktEU1lJahZWV0Oze2Ni1v1OwIB+V5EfA/nU2M8BQ= github.com/aws/aws-sdk-go-v2/service/memorydb v1.28.0/go.mod h1:klU+ogNePu/si9oRwP1XEZ+00nRqX+ZN+oQqzgJCV9w= github.com/aws/aws-sdk-go-v2/service/mgn v1.34.0 h1:4sAEcDeXFESCf0m9aDz2H6ZnVErajnHujFwmUFDh1L4= From d96f00653c2aad3a998c4526c023ea78e7284309 Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 09:13:56 -0400 Subject: [PATCH 237/365] go get github.com/aws/aws-sdk-go-v2/service/memorydb. --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 3ba04f9ef95a..21933d8eea74 100644 --- a/go.mod +++ b/go.mod @@ -171,7 +171,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/mediapackagev2 v1.27.1 github.com/aws/aws-sdk-go-v2/service/mediapackagevod v1.36.1 github.com/aws/aws-sdk-go-v2/service/mediastore v1.26.1 - github.com/aws/aws-sdk-go-v2/service/memorydb v1.28.0 + github.com/aws/aws-sdk-go-v2/service/memorydb v1.28.1 github.com/aws/aws-sdk-go-v2/service/mgn v1.34.0 github.com/aws/aws-sdk-go-v2/service/mq v1.30.0 github.com/aws/aws-sdk-go-v2/service/mwaa v1.36.0 diff --git a/go.sum b/go.sum index 3e11e68defce..7666ed9e16c4 100644 --- a/go.sum +++ b/go.sum @@ -363,8 +363,8 @@ github.com/aws/aws-sdk-go-v2/service/mediapackagevod v1.36.1 h1:AQ2g2KbJsfagdo2C github.com/aws/aws-sdk-go-v2/service/mediapackagevod v1.36.1/go.mod h1:C/K0HedKYyj/az2xaZz5yWoi9vv6hpRTcPjCHk7jkTg= github.com/aws/aws-sdk-go-v2/service/mediastore v1.26.1 h1:vqr5cfKyoCtj3FJXYnHpZ/svnPUQ2Qce3wiX2exVKJU= github.com/aws/aws-sdk-go-v2/service/mediastore v1.26.1/go.mod h1:udUYbqmxEiWg4Pe4v7CoSWSZdVTjjbkvcnUKSY0ANM4= -github.com/aws/aws-sdk-go-v2/service/memorydb v1.28.0 h1:EfkktEU1lJahZWV0Oze2Ni1v1OwIB+V5EfA/nU2M8BQ= -github.com/aws/aws-sdk-go-v2/service/memorydb v1.28.0/go.mod h1:klU+ogNePu/si9oRwP1XEZ+00nRqX+ZN+oQqzgJCV9w= +github.com/aws/aws-sdk-go-v2/service/memorydb v1.28.1 h1:RlrxrWzRLmhIchnmXnBvzuklCur+mEuYJQ670y1YjNI= +github.com/aws/aws-sdk-go-v2/service/memorydb v1.28.1/go.mod h1:dn0CuzrlLsPQwdmrfd/7GjJxMTXiQX3/cYyYPw/cBU4= github.com/aws/aws-sdk-go-v2/service/mgn v1.34.0 h1:4sAEcDeXFESCf0m9aDz2H6ZnVErajnHujFwmUFDh1L4= github.com/aws/aws-sdk-go-v2/service/mgn v1.34.0/go.mod h1:PeFKMjkP+jCQteTxfxG8ozfXOJSGoRv8BdRboJpkz18= github.com/aws/aws-sdk-go-v2/service/mq v1.30.0 h1:iWqTkmfe/llFNKk/zC/CDwhCvb5LJBx8M00JTRGcjgw= From d7dc4dc5c24278dfae843e276d9165f4d8e86914 Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 09:13:57 -0400 Subject: [PATCH 238/365] go get github.com/aws/aws-sdk-go-v2/service/mgn. --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 21933d8eea74..19a8f84f88e2 100644 --- a/go.mod +++ b/go.mod @@ -172,7 +172,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/mediapackagevod v1.36.1 github.com/aws/aws-sdk-go-v2/service/mediastore v1.26.1 github.com/aws/aws-sdk-go-v2/service/memorydb v1.28.1 - github.com/aws/aws-sdk-go-v2/service/mgn v1.34.0 + github.com/aws/aws-sdk-go-v2/service/mgn v1.34.1 github.com/aws/aws-sdk-go-v2/service/mq v1.30.0 github.com/aws/aws-sdk-go-v2/service/mwaa v1.36.0 github.com/aws/aws-sdk-go-v2/service/neptune v1.38.0 diff --git a/go.sum b/go.sum index 7666ed9e16c4..ef078e9ba28e 100644 --- a/go.sum +++ b/go.sum @@ -365,8 +365,8 @@ github.com/aws/aws-sdk-go-v2/service/mediastore v1.26.1 h1:vqr5cfKyoCtj3FJXYnHpZ github.com/aws/aws-sdk-go-v2/service/mediastore v1.26.1/go.mod h1:udUYbqmxEiWg4Pe4v7CoSWSZdVTjjbkvcnUKSY0ANM4= github.com/aws/aws-sdk-go-v2/service/memorydb v1.28.1 h1:RlrxrWzRLmhIchnmXnBvzuklCur+mEuYJQ670y1YjNI= github.com/aws/aws-sdk-go-v2/service/memorydb v1.28.1/go.mod h1:dn0CuzrlLsPQwdmrfd/7GjJxMTXiQX3/cYyYPw/cBU4= -github.com/aws/aws-sdk-go-v2/service/mgn v1.34.0 h1:4sAEcDeXFESCf0m9aDz2H6ZnVErajnHujFwmUFDh1L4= -github.com/aws/aws-sdk-go-v2/service/mgn v1.34.0/go.mod h1:PeFKMjkP+jCQteTxfxG8ozfXOJSGoRv8BdRboJpkz18= +github.com/aws/aws-sdk-go-v2/service/mgn v1.34.1 h1:mcW3ZmVS/c/al7w6/+2ren1FM6ZKsQ5OkffMODe8Yy4= +github.com/aws/aws-sdk-go-v2/service/mgn v1.34.1/go.mod h1:f5LNAteLLvz1d+a8udEyicskowMJv3tClJnA7H2DrHs= github.com/aws/aws-sdk-go-v2/service/mq v1.30.0 h1:iWqTkmfe/llFNKk/zC/CDwhCvb5LJBx8M00JTRGcjgw= github.com/aws/aws-sdk-go-v2/service/mq v1.30.0/go.mod h1:NPxTApH/4LUJQjICbXHb9z/c280RyWtcNAe9LeuGwfw= github.com/aws/aws-sdk-go-v2/service/mwaa v1.36.0 h1:kfpJVOSSNzx37lgJcsk48S8yffY+P5trn3J95CIUxXQ= From f7878c1ef1b999d50d6f6040c031823ecdcac586 Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 09:13:58 -0400 Subject: [PATCH 239/365] go get github.com/aws/aws-sdk-go-v2/service/mq. --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 19a8f84f88e2..d7273eca7887 100644 --- a/go.mod +++ b/go.mod @@ -173,7 +173,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/mediastore v1.26.1 github.com/aws/aws-sdk-go-v2/service/memorydb v1.28.1 github.com/aws/aws-sdk-go-v2/service/mgn v1.34.1 - github.com/aws/aws-sdk-go-v2/service/mq v1.30.0 + github.com/aws/aws-sdk-go-v2/service/mq v1.30.1 github.com/aws/aws-sdk-go-v2/service/mwaa v1.36.0 github.com/aws/aws-sdk-go-v2/service/neptune v1.38.0 github.com/aws/aws-sdk-go-v2/service/neptunegraph v1.18.0 diff --git a/go.sum b/go.sum index ef078e9ba28e..69c72f0a9bb3 100644 --- a/go.sum +++ b/go.sum @@ -367,8 +367,8 @@ github.com/aws/aws-sdk-go-v2/service/memorydb v1.28.1 h1:RlrxrWzRLmhIchnmXnBvzuk github.com/aws/aws-sdk-go-v2/service/memorydb v1.28.1/go.mod h1:dn0CuzrlLsPQwdmrfd/7GjJxMTXiQX3/cYyYPw/cBU4= github.com/aws/aws-sdk-go-v2/service/mgn v1.34.1 h1:mcW3ZmVS/c/al7w6/+2ren1FM6ZKsQ5OkffMODe8Yy4= github.com/aws/aws-sdk-go-v2/service/mgn v1.34.1/go.mod h1:f5LNAteLLvz1d+a8udEyicskowMJv3tClJnA7H2DrHs= -github.com/aws/aws-sdk-go-v2/service/mq v1.30.0 h1:iWqTkmfe/llFNKk/zC/CDwhCvb5LJBx8M00JTRGcjgw= -github.com/aws/aws-sdk-go-v2/service/mq v1.30.0/go.mod h1:NPxTApH/4LUJQjICbXHb9z/c280RyWtcNAe9LeuGwfw= +github.com/aws/aws-sdk-go-v2/service/mq v1.30.1 h1:O9duS6XPKgBYv0JyqNXEjRb0Zp+DJdEqh/P1sTTFL9Y= +github.com/aws/aws-sdk-go-v2/service/mq v1.30.1/go.mod h1:uTgClBQfeUtsIdBJCbaf1xjtE6jCxGiMJSXHsi8WEAM= github.com/aws/aws-sdk-go-v2/service/mwaa v1.36.0 h1:kfpJVOSSNzx37lgJcsk48S8yffY+P5trn3J95CIUxXQ= github.com/aws/aws-sdk-go-v2/service/mwaa v1.36.0/go.mod h1:2ondW70Ly9ucngMuiSVNk0mbHcGH4KyNm6kKJY4Yn24= github.com/aws/aws-sdk-go-v2/service/neptune v1.38.0 h1:kQ+MK2jB1sii4yBxtPa96z0GuocfY6kf0iKKrVPtPeY= From 43e3f19fd3827f72135e28670117a817e83c78b7 Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 09:13:59 -0400 Subject: [PATCH 240/365] go get github.com/aws/aws-sdk-go-v2/service/mwaa. --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index d7273eca7887..c520f6403042 100644 --- a/go.mod +++ b/go.mod @@ -174,7 +174,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/memorydb v1.28.1 github.com/aws/aws-sdk-go-v2/service/mgn v1.34.1 github.com/aws/aws-sdk-go-v2/service/mq v1.30.1 - github.com/aws/aws-sdk-go-v2/service/mwaa v1.36.0 + github.com/aws/aws-sdk-go-v2/service/mwaa v1.36.1 github.com/aws/aws-sdk-go-v2/service/neptune v1.38.0 github.com/aws/aws-sdk-go-v2/service/neptunegraph v1.18.0 github.com/aws/aws-sdk-go-v2/service/networkfirewall v1.52.0 diff --git a/go.sum b/go.sum index 69c72f0a9bb3..275a0b0483a7 100644 --- a/go.sum +++ b/go.sum @@ -369,8 +369,8 @@ github.com/aws/aws-sdk-go-v2/service/mgn v1.34.1 h1:mcW3ZmVS/c/al7w6/+2ren1FM6ZK github.com/aws/aws-sdk-go-v2/service/mgn v1.34.1/go.mod h1:f5LNAteLLvz1d+a8udEyicskowMJv3tClJnA7H2DrHs= github.com/aws/aws-sdk-go-v2/service/mq v1.30.1 h1:O9duS6XPKgBYv0JyqNXEjRb0Zp+DJdEqh/P1sTTFL9Y= github.com/aws/aws-sdk-go-v2/service/mq v1.30.1/go.mod h1:uTgClBQfeUtsIdBJCbaf1xjtE6jCxGiMJSXHsi8WEAM= -github.com/aws/aws-sdk-go-v2/service/mwaa v1.36.0 h1:kfpJVOSSNzx37lgJcsk48S8yffY+P5trn3J95CIUxXQ= -github.com/aws/aws-sdk-go-v2/service/mwaa v1.36.0/go.mod h1:2ondW70Ly9ucngMuiSVNk0mbHcGH4KyNm6kKJY4Yn24= +github.com/aws/aws-sdk-go-v2/service/mwaa v1.36.1 h1:TptI10con5UPABjYCBMaBckWD5/gNMYD0m+88NkscSo= +github.com/aws/aws-sdk-go-v2/service/mwaa v1.36.1/go.mod h1:3pxCY9yQHuj3mntGtK5IR0HADRhEP+lWTOmg74n5ZR0= github.com/aws/aws-sdk-go-v2/service/neptune v1.38.0 h1:kQ+MK2jB1sii4yBxtPa96z0GuocfY6kf0iKKrVPtPeY= github.com/aws/aws-sdk-go-v2/service/neptune v1.38.0/go.mod h1:0bcYM3V5sKaa/8f/B789h3laTvReZreTjqWRjITGEkQ= github.com/aws/aws-sdk-go-v2/service/neptunegraph v1.18.0 h1:9Bo6Di7oLul++5Yi7/KFiqjGHPNIemmmxJcsgMj0phM= From dfdba3b0b4a39ea5591a3067d7a5ecf98db119c8 Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 09:14:00 -0400 Subject: [PATCH 241/365] go get github.com/aws/aws-sdk-go-v2/service/neptune. --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index c520f6403042..6a02efcf66b5 100644 --- a/go.mod +++ b/go.mod @@ -175,7 +175,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/mgn v1.34.1 github.com/aws/aws-sdk-go-v2/service/mq v1.30.1 github.com/aws/aws-sdk-go-v2/service/mwaa v1.36.1 - github.com/aws/aws-sdk-go-v2/service/neptune v1.38.0 + github.com/aws/aws-sdk-go-v2/service/neptune v1.38.1 github.com/aws/aws-sdk-go-v2/service/neptunegraph v1.18.0 github.com/aws/aws-sdk-go-v2/service/networkfirewall v1.52.0 github.com/aws/aws-sdk-go-v2/service/networkmanager v1.36.0 diff --git a/go.sum b/go.sum index 275a0b0483a7..f753285e5674 100644 --- a/go.sum +++ b/go.sum @@ -371,8 +371,8 @@ github.com/aws/aws-sdk-go-v2/service/mq v1.30.1 h1:O9duS6XPKgBYv0JyqNXEjRb0Zp+DJ github.com/aws/aws-sdk-go-v2/service/mq v1.30.1/go.mod h1:uTgClBQfeUtsIdBJCbaf1xjtE6jCxGiMJSXHsi8WEAM= github.com/aws/aws-sdk-go-v2/service/mwaa v1.36.1 h1:TptI10con5UPABjYCBMaBckWD5/gNMYD0m+88NkscSo= github.com/aws/aws-sdk-go-v2/service/mwaa v1.36.1/go.mod h1:3pxCY9yQHuj3mntGtK5IR0HADRhEP+lWTOmg74n5ZR0= -github.com/aws/aws-sdk-go-v2/service/neptune v1.38.0 h1:kQ+MK2jB1sii4yBxtPa96z0GuocfY6kf0iKKrVPtPeY= -github.com/aws/aws-sdk-go-v2/service/neptune v1.38.0/go.mod h1:0bcYM3V5sKaa/8f/B789h3laTvReZreTjqWRjITGEkQ= +github.com/aws/aws-sdk-go-v2/service/neptune v1.38.1 h1:NOYfXtQUnF41UakvQFfi4+mbgZ/4IgO1n5j8RMsIEfg= +github.com/aws/aws-sdk-go-v2/service/neptune v1.38.1/go.mod h1:+12tTJOR1ZRkMm1sBbwxbUJlNh2GRIam7Lc7C/+Pa94= github.com/aws/aws-sdk-go-v2/service/neptunegraph v1.18.0 h1:9Bo6Di7oLul++5Yi7/KFiqjGHPNIemmmxJcsgMj0phM= github.com/aws/aws-sdk-go-v2/service/neptunegraph v1.18.0/go.mod h1:m+WX/GoYTdVoD6kaz+mBFr3+w1lj6FIj/0tHd33KGUQ= github.com/aws/aws-sdk-go-v2/service/networkfirewall v1.52.0 h1:MT/ZhC/j05YJq1sZTv5xNTj/xlKBf9TmazdcjN8Q6JE= From 6c015b76e1c08bf511c27b54aa863f80a39e9068 Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 09:14:02 -0400 Subject: [PATCH 242/365] go get github.com/aws/aws-sdk-go-v2/service/neptunegraph. --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 6a02efcf66b5..d45042949a51 100644 --- a/go.mod +++ b/go.mod @@ -176,7 +176,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/mq v1.30.1 github.com/aws/aws-sdk-go-v2/service/mwaa v1.36.1 github.com/aws/aws-sdk-go-v2/service/neptune v1.38.1 - github.com/aws/aws-sdk-go-v2/service/neptunegraph v1.18.0 + github.com/aws/aws-sdk-go-v2/service/neptunegraph v1.18.1 github.com/aws/aws-sdk-go-v2/service/networkfirewall v1.52.0 github.com/aws/aws-sdk-go-v2/service/networkmanager v1.36.0 github.com/aws/aws-sdk-go-v2/service/networkmonitor v1.9.0 diff --git a/go.sum b/go.sum index f753285e5674..28eaa6a6f55a 100644 --- a/go.sum +++ b/go.sum @@ -373,8 +373,8 @@ github.com/aws/aws-sdk-go-v2/service/mwaa v1.36.1 h1:TptI10con5UPABjYCBMaBckWD5/ github.com/aws/aws-sdk-go-v2/service/mwaa v1.36.1/go.mod h1:3pxCY9yQHuj3mntGtK5IR0HADRhEP+lWTOmg74n5ZR0= github.com/aws/aws-sdk-go-v2/service/neptune v1.38.1 h1:NOYfXtQUnF41UakvQFfi4+mbgZ/4IgO1n5j8RMsIEfg= github.com/aws/aws-sdk-go-v2/service/neptune v1.38.1/go.mod h1:+12tTJOR1ZRkMm1sBbwxbUJlNh2GRIam7Lc7C/+Pa94= -github.com/aws/aws-sdk-go-v2/service/neptunegraph v1.18.0 h1:9Bo6Di7oLul++5Yi7/KFiqjGHPNIemmmxJcsgMj0phM= -github.com/aws/aws-sdk-go-v2/service/neptunegraph v1.18.0/go.mod h1:m+WX/GoYTdVoD6kaz+mBFr3+w1lj6FIj/0tHd33KGUQ= +github.com/aws/aws-sdk-go-v2/service/neptunegraph v1.18.1 h1:wIRxcq1kp678ogQ67us56SmBEr3JntDmtw0hzSnQIWk= +github.com/aws/aws-sdk-go-v2/service/neptunegraph v1.18.1/go.mod h1:lF2OHvTjVdVU8fqeM/Cw7SMO8TWt515zlBFxLjzKEN0= github.com/aws/aws-sdk-go-v2/service/networkfirewall v1.52.0 h1:MT/ZhC/j05YJq1sZTv5xNTj/xlKBf9TmazdcjN8Q6JE= github.com/aws/aws-sdk-go-v2/service/networkfirewall v1.52.0/go.mod h1:WBjTMukObsj8TZBljMWNrLiknTebzG5mGYIqiwSXQ8M= github.com/aws/aws-sdk-go-v2/service/networkmanager v1.36.0 h1:CUof+Aly73D7a/PKHvM/MqQr7DQfyUrMpJueKyRMRd0= From 03ff4c388595a9e60eab31fbc71a1ba2f4767e5d Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 09:14:03 -0400 Subject: [PATCH 243/365] go get github.com/aws/aws-sdk-go-v2/service/networkfirewall. --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index d45042949a51..318df9745765 100644 --- a/go.mod +++ b/go.mod @@ -177,7 +177,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/mwaa v1.36.1 github.com/aws/aws-sdk-go-v2/service/neptune v1.38.1 github.com/aws/aws-sdk-go-v2/service/neptunegraph v1.18.1 - github.com/aws/aws-sdk-go-v2/service/networkfirewall v1.52.0 + github.com/aws/aws-sdk-go-v2/service/networkfirewall v1.52.1 github.com/aws/aws-sdk-go-v2/service/networkmanager v1.36.0 github.com/aws/aws-sdk-go-v2/service/networkmonitor v1.9.0 github.com/aws/aws-sdk-go-v2/service/notifications v1.3.0 diff --git a/go.sum b/go.sum index 28eaa6a6f55a..4e3e2ea61a97 100644 --- a/go.sum +++ b/go.sum @@ -375,8 +375,8 @@ github.com/aws/aws-sdk-go-v2/service/neptune v1.38.1 h1:NOYfXtQUnF41UakvQFfi4+mb github.com/aws/aws-sdk-go-v2/service/neptune v1.38.1/go.mod h1:+12tTJOR1ZRkMm1sBbwxbUJlNh2GRIam7Lc7C/+Pa94= github.com/aws/aws-sdk-go-v2/service/neptunegraph v1.18.1 h1:wIRxcq1kp678ogQ67us56SmBEr3JntDmtw0hzSnQIWk= github.com/aws/aws-sdk-go-v2/service/neptunegraph v1.18.1/go.mod h1:lF2OHvTjVdVU8fqeM/Cw7SMO8TWt515zlBFxLjzKEN0= -github.com/aws/aws-sdk-go-v2/service/networkfirewall v1.52.0 h1:MT/ZhC/j05YJq1sZTv5xNTj/xlKBf9TmazdcjN8Q6JE= -github.com/aws/aws-sdk-go-v2/service/networkfirewall v1.52.0/go.mod h1:WBjTMukObsj8TZBljMWNrLiknTebzG5mGYIqiwSXQ8M= +github.com/aws/aws-sdk-go-v2/service/networkfirewall v1.52.1 h1:iMxoDME9qFjS6TOIYE99yC1ocnYfd1Rw8IMvgbZJBfo= +github.com/aws/aws-sdk-go-v2/service/networkfirewall v1.52.1/go.mod h1:k2KrxH4IGJZsA6VI8CsTx+mGKEkxpbXLRl9XKTcqE2I= github.com/aws/aws-sdk-go-v2/service/networkmanager v1.36.0 h1:CUof+Aly73D7a/PKHvM/MqQr7DQfyUrMpJueKyRMRd0= github.com/aws/aws-sdk-go-v2/service/networkmanager v1.36.0/go.mod h1:9D7PMNcCNIP44ZOP2M2S2Oh9slWq4YQgMvaupyhQHgI= github.com/aws/aws-sdk-go-v2/service/networkmonitor v1.9.0 h1:IYnkcqEtk+4Pw34vUjR6MUylKvyzIRYO4afH4K98xfc= From c0fd83ab354327d8c07295ddfa1a81791d6a03e6 Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 09:14:05 -0400 Subject: [PATCH 244/365] go get github.com/aws/aws-sdk-go-v2/service/networkmanager. --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 318df9745765..d7f3b62ed0d1 100644 --- a/go.mod +++ b/go.mod @@ -178,7 +178,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/neptune v1.38.1 github.com/aws/aws-sdk-go-v2/service/neptunegraph v1.18.1 github.com/aws/aws-sdk-go-v2/service/networkfirewall v1.52.1 - github.com/aws/aws-sdk-go-v2/service/networkmanager v1.36.0 + github.com/aws/aws-sdk-go-v2/service/networkmanager v1.36.1 github.com/aws/aws-sdk-go-v2/service/networkmonitor v1.9.0 github.com/aws/aws-sdk-go-v2/service/notifications v1.3.0 github.com/aws/aws-sdk-go-v2/service/notificationscontacts v1.2.0 diff --git a/go.sum b/go.sum index 4e3e2ea61a97..55471bf5c95e 100644 --- a/go.sum +++ b/go.sum @@ -377,8 +377,8 @@ github.com/aws/aws-sdk-go-v2/service/neptunegraph v1.18.1 h1:wIRxcq1kp678ogQ67us github.com/aws/aws-sdk-go-v2/service/neptunegraph v1.18.1/go.mod h1:lF2OHvTjVdVU8fqeM/Cw7SMO8TWt515zlBFxLjzKEN0= github.com/aws/aws-sdk-go-v2/service/networkfirewall v1.52.1 h1:iMxoDME9qFjS6TOIYE99yC1ocnYfd1Rw8IMvgbZJBfo= github.com/aws/aws-sdk-go-v2/service/networkfirewall v1.52.1/go.mod h1:k2KrxH4IGJZsA6VI8CsTx+mGKEkxpbXLRl9XKTcqE2I= -github.com/aws/aws-sdk-go-v2/service/networkmanager v1.36.0 h1:CUof+Aly73D7a/PKHvM/MqQr7DQfyUrMpJueKyRMRd0= -github.com/aws/aws-sdk-go-v2/service/networkmanager v1.36.0/go.mod h1:9D7PMNcCNIP44ZOP2M2S2Oh9slWq4YQgMvaupyhQHgI= +github.com/aws/aws-sdk-go-v2/service/networkmanager v1.36.1 h1:Ps/spyjORK9/tx2pMpEzEjWOYqoNqR8OMHIXHudzvKg= +github.com/aws/aws-sdk-go-v2/service/networkmanager v1.36.1/go.mod h1:2QEw0rfjtUMjqiHcthI+GdvcHZ935TenF1UQyj++Ehc= github.com/aws/aws-sdk-go-v2/service/networkmonitor v1.9.0 h1:IYnkcqEtk+4Pw34vUjR6MUylKvyzIRYO4afH4K98xfc= github.com/aws/aws-sdk-go-v2/service/networkmonitor v1.9.0/go.mod h1:LB6ILMfk6PF8Qwfah8uzkOdvFSc5Yz4rwQIziwIZcj8= github.com/aws/aws-sdk-go-v2/service/notifications v1.3.0 h1:DwjwsGsuHbNk9pWgGLlVxUUl/ona61AE8wLSYHAx4ys= From b07a4cbc4bfd7c80d2c9e357cfef446461a2e587 Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 09:14:06 -0400 Subject: [PATCH 245/365] go get github.com/aws/aws-sdk-go-v2/service/networkmonitor. --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index d7f3b62ed0d1..d5f9a835fff7 100644 --- a/go.mod +++ b/go.mod @@ -179,7 +179,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/neptunegraph v1.18.1 github.com/aws/aws-sdk-go-v2/service/networkfirewall v1.52.1 github.com/aws/aws-sdk-go-v2/service/networkmanager v1.36.1 - github.com/aws/aws-sdk-go-v2/service/networkmonitor v1.9.0 + github.com/aws/aws-sdk-go-v2/service/networkmonitor v1.9.1 github.com/aws/aws-sdk-go-v2/service/notifications v1.3.0 github.com/aws/aws-sdk-go-v2/service/notificationscontacts v1.2.0 github.com/aws/aws-sdk-go-v2/service/oam v1.19.0 diff --git a/go.sum b/go.sum index 55471bf5c95e..dedf81fed10f 100644 --- a/go.sum +++ b/go.sum @@ -379,8 +379,8 @@ github.com/aws/aws-sdk-go-v2/service/networkfirewall v1.52.1 h1:iMxoDME9qFjS6TOI github.com/aws/aws-sdk-go-v2/service/networkfirewall v1.52.1/go.mod h1:k2KrxH4IGJZsA6VI8CsTx+mGKEkxpbXLRl9XKTcqE2I= github.com/aws/aws-sdk-go-v2/service/networkmanager v1.36.1 h1:Ps/spyjORK9/tx2pMpEzEjWOYqoNqR8OMHIXHudzvKg= github.com/aws/aws-sdk-go-v2/service/networkmanager v1.36.1/go.mod h1:2QEw0rfjtUMjqiHcthI+GdvcHZ935TenF1UQyj++Ehc= -github.com/aws/aws-sdk-go-v2/service/networkmonitor v1.9.0 h1:IYnkcqEtk+4Pw34vUjR6MUylKvyzIRYO4afH4K98xfc= -github.com/aws/aws-sdk-go-v2/service/networkmonitor v1.9.0/go.mod h1:LB6ILMfk6PF8Qwfah8uzkOdvFSc5Yz4rwQIziwIZcj8= +github.com/aws/aws-sdk-go-v2/service/networkmonitor v1.9.1 h1:BdxoAPeLCPbrYHC/osQftQUzW2hkI5yIl36/iEQboXw= +github.com/aws/aws-sdk-go-v2/service/networkmonitor v1.9.1/go.mod h1:ZlR0Ioqx3FHzSvPMLGWRJl7KG8fswWTTaBrZjixWhng= github.com/aws/aws-sdk-go-v2/service/notifications v1.3.0 h1:DwjwsGsuHbNk9pWgGLlVxUUl/ona61AE8wLSYHAx4ys= github.com/aws/aws-sdk-go-v2/service/notifications v1.3.0/go.mod h1:mUNrtQVGSrcnuIS0EgB9HhRlTBuYjVt3KBjgdnSl7q0= github.com/aws/aws-sdk-go-v2/service/notificationscontacts v1.2.0 h1:A2NNUn0ckdycM39tT5ERBfyXsuU3UX3Wg72usET0QsM= From e26c356742dcdf8f1e2cd734a136ca3db53beab7 Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 09:14:08 -0400 Subject: [PATCH 246/365] go get github.com/aws/aws-sdk-go-v2/service/notifications. --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index d5f9a835fff7..04a4dbd39a13 100644 --- a/go.mod +++ b/go.mod @@ -180,7 +180,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/networkfirewall v1.52.1 github.com/aws/aws-sdk-go-v2/service/networkmanager v1.36.1 github.com/aws/aws-sdk-go-v2/service/networkmonitor v1.9.1 - github.com/aws/aws-sdk-go-v2/service/notifications v1.3.0 + github.com/aws/aws-sdk-go-v2/service/notifications v1.3.1 github.com/aws/aws-sdk-go-v2/service/notificationscontacts v1.2.0 github.com/aws/aws-sdk-go-v2/service/oam v1.19.0 github.com/aws/aws-sdk-go-v2/service/opensearch v1.48.0 diff --git a/go.sum b/go.sum index dedf81fed10f..8daa6b860a7b 100644 --- a/go.sum +++ b/go.sum @@ -381,8 +381,8 @@ github.com/aws/aws-sdk-go-v2/service/networkmanager v1.36.1 h1:Ps/spyjORK9/tx2pM github.com/aws/aws-sdk-go-v2/service/networkmanager v1.36.1/go.mod h1:2QEw0rfjtUMjqiHcthI+GdvcHZ935TenF1UQyj++Ehc= github.com/aws/aws-sdk-go-v2/service/networkmonitor v1.9.1 h1:BdxoAPeLCPbrYHC/osQftQUzW2hkI5yIl36/iEQboXw= github.com/aws/aws-sdk-go-v2/service/networkmonitor v1.9.1/go.mod h1:ZlR0Ioqx3FHzSvPMLGWRJl7KG8fswWTTaBrZjixWhng= -github.com/aws/aws-sdk-go-v2/service/notifications v1.3.0 h1:DwjwsGsuHbNk9pWgGLlVxUUl/ona61AE8wLSYHAx4ys= -github.com/aws/aws-sdk-go-v2/service/notifications v1.3.0/go.mod h1:mUNrtQVGSrcnuIS0EgB9HhRlTBuYjVt3KBjgdnSl7q0= +github.com/aws/aws-sdk-go-v2/service/notifications v1.3.1 h1:W/V33HIpFFm3SEczC5rNTSk0oLuCZJiCRt3ftI+OfzQ= +github.com/aws/aws-sdk-go-v2/service/notifications v1.3.1/go.mod h1:lcT7GSBMHxkYhnvfrJ8KASTffPmVmwUVIXQA0+FQR+4= github.com/aws/aws-sdk-go-v2/service/notificationscontacts v1.2.0 h1:A2NNUn0ckdycM39tT5ERBfyXsuU3UX3Wg72usET0QsM= github.com/aws/aws-sdk-go-v2/service/notificationscontacts v1.2.0/go.mod h1:ck29ZSPkQUcP3dhf1eTxObCjKG+NHxlITeA6ozy7wRk= github.com/aws/aws-sdk-go-v2/service/oam v1.19.0 h1:o2jAN4Wz8EhuLqUg2h/MBfHuHLnPQoLfQAspnfZZqQI= From 08d2268965b059dc8a36388ba3404d8689ea6db4 Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 09:14:10 -0400 Subject: [PATCH 247/365] go get github.com/aws/aws-sdk-go-v2/service/notificationscontacts. --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 04a4dbd39a13..8c08ff07a281 100644 --- a/go.mod +++ b/go.mod @@ -181,7 +181,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/networkmanager v1.36.1 github.com/aws/aws-sdk-go-v2/service/networkmonitor v1.9.1 github.com/aws/aws-sdk-go-v2/service/notifications v1.3.1 - github.com/aws/aws-sdk-go-v2/service/notificationscontacts v1.2.0 + github.com/aws/aws-sdk-go-v2/service/notificationscontacts v1.2.1 github.com/aws/aws-sdk-go-v2/service/oam v1.19.0 github.com/aws/aws-sdk-go-v2/service/opensearch v1.48.0 github.com/aws/aws-sdk-go-v2/service/opensearchserverless v1.21.0 diff --git a/go.sum b/go.sum index 8daa6b860a7b..5c2f57a0dcd3 100644 --- a/go.sum +++ b/go.sum @@ -383,8 +383,8 @@ github.com/aws/aws-sdk-go-v2/service/networkmonitor v1.9.1 h1:BdxoAPeLCPbrYHC/os github.com/aws/aws-sdk-go-v2/service/networkmonitor v1.9.1/go.mod h1:ZlR0Ioqx3FHzSvPMLGWRJl7KG8fswWTTaBrZjixWhng= github.com/aws/aws-sdk-go-v2/service/notifications v1.3.1 h1:W/V33HIpFFm3SEczC5rNTSk0oLuCZJiCRt3ftI+OfzQ= github.com/aws/aws-sdk-go-v2/service/notifications v1.3.1/go.mod h1:lcT7GSBMHxkYhnvfrJ8KASTffPmVmwUVIXQA0+FQR+4= -github.com/aws/aws-sdk-go-v2/service/notificationscontacts v1.2.0 h1:A2NNUn0ckdycM39tT5ERBfyXsuU3UX3Wg72usET0QsM= -github.com/aws/aws-sdk-go-v2/service/notificationscontacts v1.2.0/go.mod h1:ck29ZSPkQUcP3dhf1eTxObCjKG+NHxlITeA6ozy7wRk= +github.com/aws/aws-sdk-go-v2/service/notificationscontacts v1.2.1 h1:P9vU+dUkH9J6NR8K1FWpuGCUrGYqPkxj97wDZI2cpYU= +github.com/aws/aws-sdk-go-v2/service/notificationscontacts v1.2.1/go.mod h1:M2m8kz89mBvwsJ3sHJ/sAniRFqQh2U2eQgj0Xcdgi38= github.com/aws/aws-sdk-go-v2/service/oam v1.19.0 h1:o2jAN4Wz8EhuLqUg2h/MBfHuHLnPQoLfQAspnfZZqQI= github.com/aws/aws-sdk-go-v2/service/oam v1.19.0/go.mod h1:9CnYbu+5xGd4rGd6cvVUahUt5etzVdbbsUh77cH6mvo= github.com/aws/aws-sdk-go-v2/service/opensearch v1.48.0 h1:griVlvvPb8QVZe55WvJKAV57vUGCsGi3Hb5o7I8+acc= From e375bb09c86dcca23dfbbaded8b9fc5825704575 Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 09:14:11 -0400 Subject: [PATCH 248/365] go get github.com/aws/aws-sdk-go-v2/service/oam. --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 8c08ff07a281..82bad99f20df 100644 --- a/go.mod +++ b/go.mod @@ -182,7 +182,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/networkmonitor v1.9.1 github.com/aws/aws-sdk-go-v2/service/notifications v1.3.1 github.com/aws/aws-sdk-go-v2/service/notificationscontacts v1.2.1 - github.com/aws/aws-sdk-go-v2/service/oam v1.19.0 + github.com/aws/aws-sdk-go-v2/service/oam v1.19.1 github.com/aws/aws-sdk-go-v2/service/opensearch v1.48.0 github.com/aws/aws-sdk-go-v2/service/opensearchserverless v1.21.0 github.com/aws/aws-sdk-go-v2/service/organizations v1.40.0 diff --git a/go.sum b/go.sum index 5c2f57a0dcd3..4000d17d4dc7 100644 --- a/go.sum +++ b/go.sum @@ -385,8 +385,8 @@ github.com/aws/aws-sdk-go-v2/service/notifications v1.3.1 h1:W/V33HIpFFm3SEczC5r github.com/aws/aws-sdk-go-v2/service/notifications v1.3.1/go.mod h1:lcT7GSBMHxkYhnvfrJ8KASTffPmVmwUVIXQA0+FQR+4= github.com/aws/aws-sdk-go-v2/service/notificationscontacts v1.2.1 h1:P9vU+dUkH9J6NR8K1FWpuGCUrGYqPkxj97wDZI2cpYU= github.com/aws/aws-sdk-go-v2/service/notificationscontacts v1.2.1/go.mod h1:M2m8kz89mBvwsJ3sHJ/sAniRFqQh2U2eQgj0Xcdgi38= -github.com/aws/aws-sdk-go-v2/service/oam v1.19.0 h1:o2jAN4Wz8EhuLqUg2h/MBfHuHLnPQoLfQAspnfZZqQI= -github.com/aws/aws-sdk-go-v2/service/oam v1.19.0/go.mod h1:9CnYbu+5xGd4rGd6cvVUahUt5etzVdbbsUh77cH6mvo= +github.com/aws/aws-sdk-go-v2/service/oam v1.19.1 h1:Qy3Z3Iec62/ZQxeOtNMfGkW+0O+h4m1jlfpMG2v7Jqc= +github.com/aws/aws-sdk-go-v2/service/oam v1.19.1/go.mod h1:SELnx5vYtclgFgk0qAUuW8gPd9QaGGvn9J0gLLAN/qI= github.com/aws/aws-sdk-go-v2/service/opensearch v1.48.0 h1:griVlvvPb8QVZe55WvJKAV57vUGCsGi3Hb5o7I8+acc= github.com/aws/aws-sdk-go-v2/service/opensearch v1.48.0/go.mod h1:4O9QlGDun+ECvbtP0tQRju9wXtkkkn/RRFgGF+zCpsk= github.com/aws/aws-sdk-go-v2/service/opensearchserverless v1.21.0 h1:yOdIEG9495oDc2XK1r3B0ciuCeqtPkS7Dd5Eo6SE0hY= From 8b20142cb1fdcf13413a50636cfb06bcf7eed43d Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 09:14:12 -0400 Subject: [PATCH 249/365] go get github.com/aws/aws-sdk-go-v2/service/opensearch. --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 82bad99f20df..3e37f31193bb 100644 --- a/go.mod +++ b/go.mod @@ -183,7 +183,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/notifications v1.3.1 github.com/aws/aws-sdk-go-v2/service/notificationscontacts v1.2.1 github.com/aws/aws-sdk-go-v2/service/oam v1.19.1 - github.com/aws/aws-sdk-go-v2/service/opensearch v1.48.0 + github.com/aws/aws-sdk-go-v2/service/opensearch v1.48.1 github.com/aws/aws-sdk-go-v2/service/opensearchserverless v1.21.0 github.com/aws/aws-sdk-go-v2/service/organizations v1.40.0 github.com/aws/aws-sdk-go-v2/service/osis v1.16.0 diff --git a/go.sum b/go.sum index 4000d17d4dc7..509efc981f57 100644 --- a/go.sum +++ b/go.sum @@ -387,8 +387,8 @@ github.com/aws/aws-sdk-go-v2/service/notificationscontacts v1.2.1 h1:P9vU+dUkH9J github.com/aws/aws-sdk-go-v2/service/notificationscontacts v1.2.1/go.mod h1:M2m8kz89mBvwsJ3sHJ/sAniRFqQh2U2eQgj0Xcdgi38= github.com/aws/aws-sdk-go-v2/service/oam v1.19.1 h1:Qy3Z3Iec62/ZQxeOtNMfGkW+0O+h4m1jlfpMG2v7Jqc= github.com/aws/aws-sdk-go-v2/service/oam v1.19.1/go.mod h1:SELnx5vYtclgFgk0qAUuW8gPd9QaGGvn9J0gLLAN/qI= -github.com/aws/aws-sdk-go-v2/service/opensearch v1.48.0 h1:griVlvvPb8QVZe55WvJKAV57vUGCsGi3Hb5o7I8+acc= -github.com/aws/aws-sdk-go-v2/service/opensearch v1.48.0/go.mod h1:4O9QlGDun+ECvbtP0tQRju9wXtkkkn/RRFgGF+zCpsk= +github.com/aws/aws-sdk-go-v2/service/opensearch v1.48.1 h1:5waSqIHB7r2/kPEUokYOCbAj94O86BMNEUdt0q5BsqU= +github.com/aws/aws-sdk-go-v2/service/opensearch v1.48.1/go.mod h1:2MLCxAIIw9nb59dvYANZHyhoiOMaajJtKlBqvnyWg0c= github.com/aws/aws-sdk-go-v2/service/opensearchserverless v1.21.0 h1:yOdIEG9495oDc2XK1r3B0ciuCeqtPkS7Dd5Eo6SE0hY= github.com/aws/aws-sdk-go-v2/service/opensearchserverless v1.21.0/go.mod h1:DileQAdc6UOTibuO6Mfl22ExuSlcDDepc/GvkBICdAU= github.com/aws/aws-sdk-go-v2/service/organizations v1.40.0 h1:ysKuFyimEHWXAfX2l31Q/PS0buawt34cDpYXwP9li0Y= From be9bc49d035b5f4705e9c160dbc0a752f619f42c Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 09:14:14 -0400 Subject: [PATCH 250/365] go get github.com/aws/aws-sdk-go-v2/service/opensearchserverless. --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 3e37f31193bb..7f8ac42b9a9a 100644 --- a/go.mod +++ b/go.mod @@ -184,7 +184,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/notificationscontacts v1.2.1 github.com/aws/aws-sdk-go-v2/service/oam v1.19.1 github.com/aws/aws-sdk-go-v2/service/opensearch v1.48.1 - github.com/aws/aws-sdk-go-v2/service/opensearchserverless v1.21.0 + github.com/aws/aws-sdk-go-v2/service/opensearchserverless v1.21.1 github.com/aws/aws-sdk-go-v2/service/organizations v1.40.0 github.com/aws/aws-sdk-go-v2/service/osis v1.16.0 github.com/aws/aws-sdk-go-v2/service/outposts v1.53.0 diff --git a/go.sum b/go.sum index 509efc981f57..6808d6ace778 100644 --- a/go.sum +++ b/go.sum @@ -389,8 +389,8 @@ github.com/aws/aws-sdk-go-v2/service/oam v1.19.1 h1:Qy3Z3Iec62/ZQxeOtNMfGkW+0O+h github.com/aws/aws-sdk-go-v2/service/oam v1.19.1/go.mod h1:SELnx5vYtclgFgk0qAUuW8gPd9QaGGvn9J0gLLAN/qI= github.com/aws/aws-sdk-go-v2/service/opensearch v1.48.1 h1:5waSqIHB7r2/kPEUokYOCbAj94O86BMNEUdt0q5BsqU= github.com/aws/aws-sdk-go-v2/service/opensearch v1.48.1/go.mod h1:2MLCxAIIw9nb59dvYANZHyhoiOMaajJtKlBqvnyWg0c= -github.com/aws/aws-sdk-go-v2/service/opensearchserverless v1.21.0 h1:yOdIEG9495oDc2XK1r3B0ciuCeqtPkS7Dd5Eo6SE0hY= -github.com/aws/aws-sdk-go-v2/service/opensearchserverless v1.21.0/go.mod h1:DileQAdc6UOTibuO6Mfl22ExuSlcDDepc/GvkBICdAU= +github.com/aws/aws-sdk-go-v2/service/opensearchserverless v1.21.1 h1:mbkX8wApJAaoWpV0V0EgnjN1/sI6ymNqQGPE+nakSP8= +github.com/aws/aws-sdk-go-v2/service/opensearchserverless v1.21.1/go.mod h1:C0qtSLUYGv6qGGy3nHPR7T4ZrsBA9/dcMDcov82uoK8= github.com/aws/aws-sdk-go-v2/service/organizations v1.40.0 h1:ysKuFyimEHWXAfX2l31Q/PS0buawt34cDpYXwP9li0Y= github.com/aws/aws-sdk-go-v2/service/organizations v1.40.0/go.mod h1:KDibugj/L26ge1bmaoQ2y3veY0yHUis12wLymmIuWJQ= github.com/aws/aws-sdk-go-v2/service/osis v1.16.0 h1:ABr6yZO+57vNlkEFxwNyJTltD1LJBKlE+E642JhmCnc= From 366caf2b13a77ff4f7674784e5581750ac27d2f3 Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 09:14:16 -0400 Subject: [PATCH 251/365] go get github.com/aws/aws-sdk-go-v2/service/organizations. --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 7f8ac42b9a9a..a3a2d78ff491 100644 --- a/go.mod +++ b/go.mod @@ -185,7 +185,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/oam v1.19.1 github.com/aws/aws-sdk-go-v2/service/opensearch v1.48.1 github.com/aws/aws-sdk-go-v2/service/opensearchserverless v1.21.1 - github.com/aws/aws-sdk-go-v2/service/organizations v1.40.0 + github.com/aws/aws-sdk-go-v2/service/organizations v1.40.1 github.com/aws/aws-sdk-go-v2/service/osis v1.16.0 github.com/aws/aws-sdk-go-v2/service/outposts v1.53.0 github.com/aws/aws-sdk-go-v2/service/paymentcryptography v1.20.0 diff --git a/go.sum b/go.sum index 6808d6ace778..6b42dce3bb69 100644 --- a/go.sum +++ b/go.sum @@ -391,8 +391,8 @@ github.com/aws/aws-sdk-go-v2/service/opensearch v1.48.1 h1:5waSqIHB7r2/kPEUokYOC github.com/aws/aws-sdk-go-v2/service/opensearch v1.48.1/go.mod h1:2MLCxAIIw9nb59dvYANZHyhoiOMaajJtKlBqvnyWg0c= github.com/aws/aws-sdk-go-v2/service/opensearchserverless v1.21.1 h1:mbkX8wApJAaoWpV0V0EgnjN1/sI6ymNqQGPE+nakSP8= github.com/aws/aws-sdk-go-v2/service/opensearchserverless v1.21.1/go.mod h1:C0qtSLUYGv6qGGy3nHPR7T4ZrsBA9/dcMDcov82uoK8= -github.com/aws/aws-sdk-go-v2/service/organizations v1.40.0 h1:ysKuFyimEHWXAfX2l31Q/PS0buawt34cDpYXwP9li0Y= -github.com/aws/aws-sdk-go-v2/service/organizations v1.40.0/go.mod h1:KDibugj/L26ge1bmaoQ2y3veY0yHUis12wLymmIuWJQ= +github.com/aws/aws-sdk-go-v2/service/organizations v1.40.1 h1:9u1hD7vW7BjOxiCmE5TUDvyGk8sZiI6nTHhbUW9npPY= +github.com/aws/aws-sdk-go-v2/service/organizations v1.40.1/go.mod h1:pEuSCVYuJKZHwfkIkbO4Xa40lgUlVxWCiLJgckMppXo= github.com/aws/aws-sdk-go-v2/service/osis v1.16.0 h1:ABr6yZO+57vNlkEFxwNyJTltD1LJBKlE+E642JhmCnc= github.com/aws/aws-sdk-go-v2/service/osis v1.16.0/go.mod h1:9pv9/5zFyenWhp0NU3Y7XkcqMUsJimFnbBWNM2+WQHQ= github.com/aws/aws-sdk-go-v2/service/outposts v1.53.0 h1:S/UtXTDtW7T8o/qAOJHl3wof5nYz/wjTDurbikZ8SVI= From b85044f3da45e4b52054fb183787a8036410517a Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 09:14:18 -0400 Subject: [PATCH 252/365] go get github.com/aws/aws-sdk-go-v2/service/osis. --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index a3a2d78ff491..835daa01fe2c 100644 --- a/go.mod +++ b/go.mod @@ -186,7 +186,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/opensearch v1.48.1 github.com/aws/aws-sdk-go-v2/service/opensearchserverless v1.21.1 github.com/aws/aws-sdk-go-v2/service/organizations v1.40.1 - github.com/aws/aws-sdk-go-v2/service/osis v1.16.0 + github.com/aws/aws-sdk-go-v2/service/osis v1.16.1 github.com/aws/aws-sdk-go-v2/service/outposts v1.53.0 github.com/aws/aws-sdk-go-v2/service/paymentcryptography v1.20.0 github.com/aws/aws-sdk-go-v2/service/pcaconnectorad v1.12.0 diff --git a/go.sum b/go.sum index 6b42dce3bb69..378a9607436f 100644 --- a/go.sum +++ b/go.sum @@ -393,8 +393,8 @@ github.com/aws/aws-sdk-go-v2/service/opensearchserverless v1.21.1 h1:mbkX8wApJAa github.com/aws/aws-sdk-go-v2/service/opensearchserverless v1.21.1/go.mod h1:C0qtSLUYGv6qGGy3nHPR7T4ZrsBA9/dcMDcov82uoK8= github.com/aws/aws-sdk-go-v2/service/organizations v1.40.1 h1:9u1hD7vW7BjOxiCmE5TUDvyGk8sZiI6nTHhbUW9npPY= github.com/aws/aws-sdk-go-v2/service/organizations v1.40.1/go.mod h1:pEuSCVYuJKZHwfkIkbO4Xa40lgUlVxWCiLJgckMppXo= -github.com/aws/aws-sdk-go-v2/service/osis v1.16.0 h1:ABr6yZO+57vNlkEFxwNyJTltD1LJBKlE+E642JhmCnc= -github.com/aws/aws-sdk-go-v2/service/osis v1.16.0/go.mod h1:9pv9/5zFyenWhp0NU3Y7XkcqMUsJimFnbBWNM2+WQHQ= +github.com/aws/aws-sdk-go-v2/service/osis v1.16.1 h1:Mfng5L3nO4JB4PCHqUUWIFgaB40DrMrkAb60hKnSP/o= +github.com/aws/aws-sdk-go-v2/service/osis v1.16.1/go.mod h1:AU8G+nH8NIQKfX1ibliZF+qoe4EwQ071UDRABz9X+Os= github.com/aws/aws-sdk-go-v2/service/outposts v1.53.0 h1:S/UtXTDtW7T8o/qAOJHl3wof5nYz/wjTDurbikZ8SVI= github.com/aws/aws-sdk-go-v2/service/outposts v1.53.0/go.mod h1:pZ/ecwv+c1rWTvDXsL/3TB+8iTulSvTUvZGGVeZulV0= github.com/aws/aws-sdk-go-v2/service/paymentcryptography v1.20.0 h1:ITscSDnlpdlsPDOEyxbZRD6dqpw2c2ZEXN8wok8GVmY= From c0550563b0f45465cf97a84d78a7662f71be3e3e Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 09:14:19 -0400 Subject: [PATCH 253/365] go get github.com/aws/aws-sdk-go-v2/service/outposts. --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 835daa01fe2c..919b984913fd 100644 --- a/go.mod +++ b/go.mod @@ -187,7 +187,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/opensearchserverless v1.21.1 github.com/aws/aws-sdk-go-v2/service/organizations v1.40.1 github.com/aws/aws-sdk-go-v2/service/osis v1.16.1 - github.com/aws/aws-sdk-go-v2/service/outposts v1.53.0 + github.com/aws/aws-sdk-go-v2/service/outposts v1.53.1 github.com/aws/aws-sdk-go-v2/service/paymentcryptography v1.20.0 github.com/aws/aws-sdk-go-v2/service/pcaconnectorad v1.12.0 github.com/aws/aws-sdk-go-v2/service/pcs v1.7.0 diff --git a/go.sum b/go.sum index 378a9607436f..2ccb31bac23e 100644 --- a/go.sum +++ b/go.sum @@ -395,8 +395,8 @@ github.com/aws/aws-sdk-go-v2/service/organizations v1.40.1 h1:9u1hD7vW7BjOxiCmE5 github.com/aws/aws-sdk-go-v2/service/organizations v1.40.1/go.mod h1:pEuSCVYuJKZHwfkIkbO4Xa40lgUlVxWCiLJgckMppXo= github.com/aws/aws-sdk-go-v2/service/osis v1.16.1 h1:Mfng5L3nO4JB4PCHqUUWIFgaB40DrMrkAb60hKnSP/o= github.com/aws/aws-sdk-go-v2/service/osis v1.16.1/go.mod h1:AU8G+nH8NIQKfX1ibliZF+qoe4EwQ071UDRABz9X+Os= -github.com/aws/aws-sdk-go-v2/service/outposts v1.53.0 h1:S/UtXTDtW7T8o/qAOJHl3wof5nYz/wjTDurbikZ8SVI= -github.com/aws/aws-sdk-go-v2/service/outposts v1.53.0/go.mod h1:pZ/ecwv+c1rWTvDXsL/3TB+8iTulSvTUvZGGVeZulV0= +github.com/aws/aws-sdk-go-v2/service/outposts v1.53.1 h1:NXHJcaJajCUFbim84eVwhFHCwUzp3BuGKP2ZACbF/oA= +github.com/aws/aws-sdk-go-v2/service/outposts v1.53.1/go.mod h1:xjh3+zMePLINjP5HtXTCkbKcnF4Ijet/c9yOCuBGxzA= github.com/aws/aws-sdk-go-v2/service/paymentcryptography v1.20.0 h1:ITscSDnlpdlsPDOEyxbZRD6dqpw2c2ZEXN8wok8GVmY= github.com/aws/aws-sdk-go-v2/service/paymentcryptography v1.20.0/go.mod h1:29w2H2dYMd/+EgIT3DYgyDP2nEFzx6janSM68+n8CC4= github.com/aws/aws-sdk-go-v2/service/pcaconnectorad v1.12.0 h1:G+iXFPFI+kkt0LYyO6UMocMZ/ndxn9wydaXvuSde4/A= From 4dfd1bb33f39900675cf49180a81a44811904f5c Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 09:14:20 -0400 Subject: [PATCH 254/365] go get github.com/aws/aws-sdk-go-v2/service/paymentcryptography. --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 919b984913fd..ab2f5e74ef86 100644 --- a/go.mod +++ b/go.mod @@ -188,7 +188,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/organizations v1.40.1 github.com/aws/aws-sdk-go-v2/service/osis v1.16.1 github.com/aws/aws-sdk-go-v2/service/outposts v1.53.1 - github.com/aws/aws-sdk-go-v2/service/paymentcryptography v1.20.0 + github.com/aws/aws-sdk-go-v2/service/paymentcryptography v1.20.1 github.com/aws/aws-sdk-go-v2/service/pcaconnectorad v1.12.0 github.com/aws/aws-sdk-go-v2/service/pcs v1.7.0 github.com/aws/aws-sdk-go-v2/service/pinpoint v1.36.0 diff --git a/go.sum b/go.sum index 2ccb31bac23e..9317ac4d2e6c 100644 --- a/go.sum +++ b/go.sum @@ -397,8 +397,8 @@ github.com/aws/aws-sdk-go-v2/service/osis v1.16.1 h1:Mfng5L3nO4JB4PCHqUUWIFgaB40 github.com/aws/aws-sdk-go-v2/service/osis v1.16.1/go.mod h1:AU8G+nH8NIQKfX1ibliZF+qoe4EwQ071UDRABz9X+Os= github.com/aws/aws-sdk-go-v2/service/outposts v1.53.1 h1:NXHJcaJajCUFbim84eVwhFHCwUzp3BuGKP2ZACbF/oA= github.com/aws/aws-sdk-go-v2/service/outposts v1.53.1/go.mod h1:xjh3+zMePLINjP5HtXTCkbKcnF4Ijet/c9yOCuBGxzA= -github.com/aws/aws-sdk-go-v2/service/paymentcryptography v1.20.0 h1:ITscSDnlpdlsPDOEyxbZRD6dqpw2c2ZEXN8wok8GVmY= -github.com/aws/aws-sdk-go-v2/service/paymentcryptography v1.20.0/go.mod h1:29w2H2dYMd/+EgIT3DYgyDP2nEFzx6janSM68+n8CC4= +github.com/aws/aws-sdk-go-v2/service/paymentcryptography v1.20.1 h1:AX6HWyE3hshMWlMUGzZQ+dMVNaa2f+yJ8VIEnUKbsQg= +github.com/aws/aws-sdk-go-v2/service/paymentcryptography v1.20.1/go.mod h1:fPpm6h3keIbLil7fhZ0W1lLDg9DrfYHVans55yzlFyM= github.com/aws/aws-sdk-go-v2/service/pcaconnectorad v1.12.0 h1:G+iXFPFI+kkt0LYyO6UMocMZ/ndxn9wydaXvuSde4/A= github.com/aws/aws-sdk-go-v2/service/pcaconnectorad v1.12.0/go.mod h1:9gSmVYgCKHZYlYzV3WH6zWcuqipQ2WdQzRFx9C3oZcM= github.com/aws/aws-sdk-go-v2/service/pcs v1.7.0 h1:Lr6Mcc6wZUegTbbpyn4XA3eopEiF7ev26JYRnEUSXug= From b548747940e52a7d2386f481b984b836fcfc9dd8 Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 09:14:22 -0400 Subject: [PATCH 255/365] go get github.com/aws/aws-sdk-go-v2/service/pcaconnectorad. --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index ab2f5e74ef86..e7dbad19c147 100644 --- a/go.mod +++ b/go.mod @@ -189,7 +189,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/osis v1.16.1 github.com/aws/aws-sdk-go-v2/service/outposts v1.53.1 github.com/aws/aws-sdk-go-v2/service/paymentcryptography v1.20.1 - github.com/aws/aws-sdk-go-v2/service/pcaconnectorad v1.12.0 + github.com/aws/aws-sdk-go-v2/service/pcaconnectorad v1.12.1 github.com/aws/aws-sdk-go-v2/service/pcs v1.7.0 github.com/aws/aws-sdk-go-v2/service/pinpoint v1.36.0 github.com/aws/aws-sdk-go-v2/service/pinpointsmsvoicev2 v1.21.0 diff --git a/go.sum b/go.sum index 9317ac4d2e6c..061038ea87ba 100644 --- a/go.sum +++ b/go.sum @@ -399,8 +399,8 @@ github.com/aws/aws-sdk-go-v2/service/outposts v1.53.1 h1:NXHJcaJajCUFbim84eVwhFH github.com/aws/aws-sdk-go-v2/service/outposts v1.53.1/go.mod h1:xjh3+zMePLINjP5HtXTCkbKcnF4Ijet/c9yOCuBGxzA= github.com/aws/aws-sdk-go-v2/service/paymentcryptography v1.20.1 h1:AX6HWyE3hshMWlMUGzZQ+dMVNaa2f+yJ8VIEnUKbsQg= github.com/aws/aws-sdk-go-v2/service/paymentcryptography v1.20.1/go.mod h1:fPpm6h3keIbLil7fhZ0W1lLDg9DrfYHVans55yzlFyM= -github.com/aws/aws-sdk-go-v2/service/pcaconnectorad v1.12.0 h1:G+iXFPFI+kkt0LYyO6UMocMZ/ndxn9wydaXvuSde4/A= -github.com/aws/aws-sdk-go-v2/service/pcaconnectorad v1.12.0/go.mod h1:9gSmVYgCKHZYlYzV3WH6zWcuqipQ2WdQzRFx9C3oZcM= +github.com/aws/aws-sdk-go-v2/service/pcaconnectorad v1.12.1 h1:IZ2DReKRxTvXr2RGhcB/z4DJGesXSfMvY5vSGycCEGk= +github.com/aws/aws-sdk-go-v2/service/pcaconnectorad v1.12.1/go.mod h1:ySW1vL+f/079GdqHIx7tOSP81yiB1Z01uKdtNlH0eb8= github.com/aws/aws-sdk-go-v2/service/pcs v1.7.0 h1:Lr6Mcc6wZUegTbbpyn4XA3eopEiF7ev26JYRnEUSXug= github.com/aws/aws-sdk-go-v2/service/pcs v1.7.0/go.mod h1:zMCSyMYxwSNIAlhJe89a+bybppD8j4p4SlEDrXj/bnA= github.com/aws/aws-sdk-go-v2/service/pinpoint v1.36.0 h1:oY29zSzYnU7swG9Wt+x3eLDRL+b8hkr8cdeD1uZXVhY= From 599ca702de1b1b6836077c70f06ec42d29872bfb Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 09:14:23 -0400 Subject: [PATCH 256/365] go get github.com/aws/aws-sdk-go-v2/service/pcs. --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index e7dbad19c147..cddbf306030e 100644 --- a/go.mod +++ b/go.mod @@ -190,7 +190,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/outposts v1.53.1 github.com/aws/aws-sdk-go-v2/service/paymentcryptography v1.20.1 github.com/aws/aws-sdk-go-v2/service/pcaconnectorad v1.12.1 - github.com/aws/aws-sdk-go-v2/service/pcs v1.7.0 + github.com/aws/aws-sdk-go-v2/service/pcs v1.7.1 github.com/aws/aws-sdk-go-v2/service/pinpoint v1.36.0 github.com/aws/aws-sdk-go-v2/service/pinpointsmsvoicev2 v1.21.0 github.com/aws/aws-sdk-go-v2/service/pipes v1.20.0 diff --git a/go.sum b/go.sum index 061038ea87ba..13597f9d65e7 100644 --- a/go.sum +++ b/go.sum @@ -401,8 +401,8 @@ github.com/aws/aws-sdk-go-v2/service/paymentcryptography v1.20.1 h1:AX6HWyE3hshM github.com/aws/aws-sdk-go-v2/service/paymentcryptography v1.20.1/go.mod h1:fPpm6h3keIbLil7fhZ0W1lLDg9DrfYHVans55yzlFyM= github.com/aws/aws-sdk-go-v2/service/pcaconnectorad v1.12.1 h1:IZ2DReKRxTvXr2RGhcB/z4DJGesXSfMvY5vSGycCEGk= github.com/aws/aws-sdk-go-v2/service/pcaconnectorad v1.12.1/go.mod h1:ySW1vL+f/079GdqHIx7tOSP81yiB1Z01uKdtNlH0eb8= -github.com/aws/aws-sdk-go-v2/service/pcs v1.7.0 h1:Lr6Mcc6wZUegTbbpyn4XA3eopEiF7ev26JYRnEUSXug= -github.com/aws/aws-sdk-go-v2/service/pcs v1.7.0/go.mod h1:zMCSyMYxwSNIAlhJe89a+bybppD8j4p4SlEDrXj/bnA= +github.com/aws/aws-sdk-go-v2/service/pcs v1.7.1 h1:KSAs6CUxcS3ObH0aABXu6lpAdLGYd+KaDO4MqZ8uwpk= +github.com/aws/aws-sdk-go-v2/service/pcs v1.7.1/go.mod h1:06QcV8x3XG2rejuINX53oYb1+owkCEY0wW0orumnvOI= github.com/aws/aws-sdk-go-v2/service/pinpoint v1.36.0 h1:oY29zSzYnU7swG9Wt+x3eLDRL+b8hkr8cdeD1uZXVhY= github.com/aws/aws-sdk-go-v2/service/pinpoint v1.36.0/go.mod h1:mnMOpRScoeiKAWETqdlGuVLE3X4kteplLosY49VIY4M= github.com/aws/aws-sdk-go-v2/service/pinpointsmsvoicev2 v1.21.0 h1:42SaWUaUuKkHxKusqfk0FGCUYsK/VGA/F8HIiy6r95w= From 4f7f5701ee4693f56fc293c66c2019b3e394dbe9 Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 09:14:24 -0400 Subject: [PATCH 257/365] go get github.com/aws/aws-sdk-go-v2/service/pinpoint. --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index cddbf306030e..05d53070cf18 100644 --- a/go.mod +++ b/go.mod @@ -191,7 +191,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/paymentcryptography v1.20.1 github.com/aws/aws-sdk-go-v2/service/pcaconnectorad v1.12.1 github.com/aws/aws-sdk-go-v2/service/pcs v1.7.1 - github.com/aws/aws-sdk-go-v2/service/pinpoint v1.36.0 + github.com/aws/aws-sdk-go-v2/service/pinpoint v1.36.1 github.com/aws/aws-sdk-go-v2/service/pinpointsmsvoicev2 v1.21.0 github.com/aws/aws-sdk-go-v2/service/pipes v1.20.0 github.com/aws/aws-sdk-go-v2/service/polly v1.49.0 diff --git a/go.sum b/go.sum index 13597f9d65e7..cbddb94659d8 100644 --- a/go.sum +++ b/go.sum @@ -403,8 +403,8 @@ github.com/aws/aws-sdk-go-v2/service/pcaconnectorad v1.12.1 h1:IZ2DReKRxTvXr2RGh github.com/aws/aws-sdk-go-v2/service/pcaconnectorad v1.12.1/go.mod h1:ySW1vL+f/079GdqHIx7tOSP81yiB1Z01uKdtNlH0eb8= github.com/aws/aws-sdk-go-v2/service/pcs v1.7.1 h1:KSAs6CUxcS3ObH0aABXu6lpAdLGYd+KaDO4MqZ8uwpk= github.com/aws/aws-sdk-go-v2/service/pcs v1.7.1/go.mod h1:06QcV8x3XG2rejuINX53oYb1+owkCEY0wW0orumnvOI= -github.com/aws/aws-sdk-go-v2/service/pinpoint v1.36.0 h1:oY29zSzYnU7swG9Wt+x3eLDRL+b8hkr8cdeD1uZXVhY= -github.com/aws/aws-sdk-go-v2/service/pinpoint v1.36.0/go.mod h1:mnMOpRScoeiKAWETqdlGuVLE3X4kteplLosY49VIY4M= +github.com/aws/aws-sdk-go-v2/service/pinpoint v1.36.1 h1:7vBcJCy6iXGagB8Z5zaRpF49H8nd3TVdVxLN5DrYYAs= +github.com/aws/aws-sdk-go-v2/service/pinpoint v1.36.1/go.mod h1:D6qGC37YHDdlcGgNc9RA3++WTdWNRNq5gQP00cHFUQ4= github.com/aws/aws-sdk-go-v2/service/pinpointsmsvoicev2 v1.21.0 h1:42SaWUaUuKkHxKusqfk0FGCUYsK/VGA/F8HIiy6r95w= github.com/aws/aws-sdk-go-v2/service/pinpointsmsvoicev2 v1.21.0/go.mod h1:zX+F2DmfDBYQDPk5K5Eu5+lZ7XW+QWzmbPu5wdflADU= github.com/aws/aws-sdk-go-v2/service/pipes v1.20.0 h1:QoYQ6/Dn/J5MAVk7WSbZoOWHfrLJ4kTQtcfWXHhfNVM= From f3c164435c08a7ddc91851f2f1e31da1216b302d Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 09:14:26 -0400 Subject: [PATCH 258/365] go get github.com/aws/aws-sdk-go-v2/service/pinpointsmsvoicev2. --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 05d53070cf18..c19e180ae58a 100644 --- a/go.mod +++ b/go.mod @@ -192,7 +192,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/pcaconnectorad v1.12.1 github.com/aws/aws-sdk-go-v2/service/pcs v1.7.1 github.com/aws/aws-sdk-go-v2/service/pinpoint v1.36.1 - github.com/aws/aws-sdk-go-v2/service/pinpointsmsvoicev2 v1.21.0 + github.com/aws/aws-sdk-go-v2/service/pinpointsmsvoicev2 v1.21.1 github.com/aws/aws-sdk-go-v2/service/pipes v1.20.0 github.com/aws/aws-sdk-go-v2/service/polly v1.49.0 github.com/aws/aws-sdk-go-v2/service/pricing v1.36.0 diff --git a/go.sum b/go.sum index cbddb94659d8..7536a13da553 100644 --- a/go.sum +++ b/go.sum @@ -405,8 +405,8 @@ github.com/aws/aws-sdk-go-v2/service/pcs v1.7.1 h1:KSAs6CUxcS3ObH0aABXu6lpAdLGYd github.com/aws/aws-sdk-go-v2/service/pcs v1.7.1/go.mod h1:06QcV8x3XG2rejuINX53oYb1+owkCEY0wW0orumnvOI= github.com/aws/aws-sdk-go-v2/service/pinpoint v1.36.1 h1:7vBcJCy6iXGagB8Z5zaRpF49H8nd3TVdVxLN5DrYYAs= github.com/aws/aws-sdk-go-v2/service/pinpoint v1.36.1/go.mod h1:D6qGC37YHDdlcGgNc9RA3++WTdWNRNq5gQP00cHFUQ4= -github.com/aws/aws-sdk-go-v2/service/pinpointsmsvoicev2 v1.21.0 h1:42SaWUaUuKkHxKusqfk0FGCUYsK/VGA/F8HIiy6r95w= -github.com/aws/aws-sdk-go-v2/service/pinpointsmsvoicev2 v1.21.0/go.mod h1:zX+F2DmfDBYQDPk5K5Eu5+lZ7XW+QWzmbPu5wdflADU= +github.com/aws/aws-sdk-go-v2/service/pinpointsmsvoicev2 v1.21.1 h1:tzp5DSj5QSMDMSxr9BpxuJBocueIQJ9bFnmaa9kZuLQ= +github.com/aws/aws-sdk-go-v2/service/pinpointsmsvoicev2 v1.21.1/go.mod h1:Fch5jvGSwyCbJp4xaqnXaGAtbA0Hp6WWnTjN5JzRzts= github.com/aws/aws-sdk-go-v2/service/pipes v1.20.0 h1:QoYQ6/Dn/J5MAVk7WSbZoOWHfrLJ4kTQtcfWXHhfNVM= github.com/aws/aws-sdk-go-v2/service/pipes v1.20.0/go.mod h1:uKocwZ1wEcgI95F3KSndhaEVojS9h5AIx+nzsT1uVx4= github.com/aws/aws-sdk-go-v2/service/polly v1.49.0 h1:zM/vX6uucXSPUoD56CLpHECBWWXQUnNXvhpejNrCUso= From 641a43492a2c8601f8a9f7376dff5cdb1bdd2dd8 Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 09:14:27 -0400 Subject: [PATCH 259/365] go get github.com/aws/aws-sdk-go-v2/service/pipes. --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index c19e180ae58a..0dc57163f21d 100644 --- a/go.mod +++ b/go.mod @@ -193,7 +193,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/pcs v1.7.1 github.com/aws/aws-sdk-go-v2/service/pinpoint v1.36.1 github.com/aws/aws-sdk-go-v2/service/pinpointsmsvoicev2 v1.21.1 - github.com/aws/aws-sdk-go-v2/service/pipes v1.20.0 + github.com/aws/aws-sdk-go-v2/service/pipes v1.20.1 github.com/aws/aws-sdk-go-v2/service/polly v1.49.0 github.com/aws/aws-sdk-go-v2/service/pricing v1.36.0 github.com/aws/aws-sdk-go-v2/service/qbusiness v1.29.0 diff --git a/go.sum b/go.sum index 7536a13da553..93cb2b527024 100644 --- a/go.sum +++ b/go.sum @@ -407,8 +407,8 @@ github.com/aws/aws-sdk-go-v2/service/pinpoint v1.36.1 h1:7vBcJCy6iXGagB8Z5zaRpF4 github.com/aws/aws-sdk-go-v2/service/pinpoint v1.36.1/go.mod h1:D6qGC37YHDdlcGgNc9RA3++WTdWNRNq5gQP00cHFUQ4= github.com/aws/aws-sdk-go-v2/service/pinpointsmsvoicev2 v1.21.1 h1:tzp5DSj5QSMDMSxr9BpxuJBocueIQJ9bFnmaa9kZuLQ= github.com/aws/aws-sdk-go-v2/service/pinpointsmsvoicev2 v1.21.1/go.mod h1:Fch5jvGSwyCbJp4xaqnXaGAtbA0Hp6WWnTjN5JzRzts= -github.com/aws/aws-sdk-go-v2/service/pipes v1.20.0 h1:QoYQ6/Dn/J5MAVk7WSbZoOWHfrLJ4kTQtcfWXHhfNVM= -github.com/aws/aws-sdk-go-v2/service/pipes v1.20.0/go.mod h1:uKocwZ1wEcgI95F3KSndhaEVojS9h5AIx+nzsT1uVx4= +github.com/aws/aws-sdk-go-v2/service/pipes v1.20.1 h1:M1knm5Myge9U14SLwnEuJ/jMjnn/vVfk7CYCQd7H0Mg= +github.com/aws/aws-sdk-go-v2/service/pipes v1.20.1/go.mod h1:fi5webS7jgREIhMVEK9HcI1lXGzhyKf0l6JlgaQ4UZs= github.com/aws/aws-sdk-go-v2/service/polly v1.49.0 h1:zM/vX6uucXSPUoD56CLpHECBWWXQUnNXvhpejNrCUso= github.com/aws/aws-sdk-go-v2/service/polly v1.49.0/go.mod h1:/xIA3CG6uFxK2gBef5OhY2QyQmB2qzWWhGJRqkhikT8= github.com/aws/aws-sdk-go-v2/service/pricing v1.36.0 h1:oo+sDKgF0qTLNhjiKs+VasAC2fkeVE7LWEBhz+TKJu8= From fafa667d3ff3465616a7cf7128fd722fcf50e4c3 Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 09:14:28 -0400 Subject: [PATCH 260/365] go get github.com/aws/aws-sdk-go-v2/service/polly. --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 0dc57163f21d..089d5e742224 100644 --- a/go.mod +++ b/go.mod @@ -194,7 +194,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/pinpoint v1.36.1 github.com/aws/aws-sdk-go-v2/service/pinpointsmsvoicev2 v1.21.1 github.com/aws/aws-sdk-go-v2/service/pipes v1.20.1 - github.com/aws/aws-sdk-go-v2/service/polly v1.49.0 + github.com/aws/aws-sdk-go-v2/service/polly v1.49.1 github.com/aws/aws-sdk-go-v2/service/pricing v1.36.0 github.com/aws/aws-sdk-go-v2/service/qbusiness v1.29.0 github.com/aws/aws-sdk-go-v2/service/qldb v1.27.0 diff --git a/go.sum b/go.sum index 93cb2b527024..5231df69c3fa 100644 --- a/go.sum +++ b/go.sum @@ -409,8 +409,8 @@ github.com/aws/aws-sdk-go-v2/service/pinpointsmsvoicev2 v1.21.1 h1:tzp5DSj5QSMDM github.com/aws/aws-sdk-go-v2/service/pinpointsmsvoicev2 v1.21.1/go.mod h1:Fch5jvGSwyCbJp4xaqnXaGAtbA0Hp6WWnTjN5JzRzts= github.com/aws/aws-sdk-go-v2/service/pipes v1.20.1 h1:M1knm5Myge9U14SLwnEuJ/jMjnn/vVfk7CYCQd7H0Mg= github.com/aws/aws-sdk-go-v2/service/pipes v1.20.1/go.mod h1:fi5webS7jgREIhMVEK9HcI1lXGzhyKf0l6JlgaQ4UZs= -github.com/aws/aws-sdk-go-v2/service/polly v1.49.0 h1:zM/vX6uucXSPUoD56CLpHECBWWXQUnNXvhpejNrCUso= -github.com/aws/aws-sdk-go-v2/service/polly v1.49.0/go.mod h1:/xIA3CG6uFxK2gBef5OhY2QyQmB2qzWWhGJRqkhikT8= +github.com/aws/aws-sdk-go-v2/service/polly v1.49.1 h1:g4JAX2yxmN9iJSE42TGR5GnionKpizF5IGqRdkw0aXA= +github.com/aws/aws-sdk-go-v2/service/polly v1.49.1/go.mod h1:meOGU/2EvK6KAjTy4wey28iXOXOkMwYCw+jIQ3+7Mxs= github.com/aws/aws-sdk-go-v2/service/pricing v1.36.0 h1:oo+sDKgF0qTLNhjiKs+VasAC2fkeVE7LWEBhz+TKJu8= github.com/aws/aws-sdk-go-v2/service/pricing v1.36.0/go.mod h1:qgVy1b8Fv+VlNke0RUY7SKDYe1MYB60cIYX7cUm1EJQ= github.com/aws/aws-sdk-go-v2/service/qbusiness v1.29.0 h1:lD0G4L+ggiCGUUp2xEkdgN1C6Mo20zR64W/6/IoiUXc= From 82769967958d9229a0ee0bfdb0893785e3b79629 Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 09:14:29 -0400 Subject: [PATCH 261/365] go get github.com/aws/aws-sdk-go-v2/service/pricing. --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 089d5e742224..d9904909b7b6 100644 --- a/go.mod +++ b/go.mod @@ -195,7 +195,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/pinpointsmsvoicev2 v1.21.1 github.com/aws/aws-sdk-go-v2/service/pipes v1.20.1 github.com/aws/aws-sdk-go-v2/service/polly v1.49.1 - github.com/aws/aws-sdk-go-v2/service/pricing v1.36.0 + github.com/aws/aws-sdk-go-v2/service/pricing v1.36.1 github.com/aws/aws-sdk-go-v2/service/qbusiness v1.29.0 github.com/aws/aws-sdk-go-v2/service/qldb v1.27.0 github.com/aws/aws-sdk-go-v2/service/quicksight v1.89.0 diff --git a/go.sum b/go.sum index 5231df69c3fa..ea6e37ef13b2 100644 --- a/go.sum +++ b/go.sum @@ -411,8 +411,8 @@ github.com/aws/aws-sdk-go-v2/service/pipes v1.20.1 h1:M1knm5Myge9U14SLwnEuJ/jMjn github.com/aws/aws-sdk-go-v2/service/pipes v1.20.1/go.mod h1:fi5webS7jgREIhMVEK9HcI1lXGzhyKf0l6JlgaQ4UZs= github.com/aws/aws-sdk-go-v2/service/polly v1.49.1 h1:g4JAX2yxmN9iJSE42TGR5GnionKpizF5IGqRdkw0aXA= github.com/aws/aws-sdk-go-v2/service/polly v1.49.1/go.mod h1:meOGU/2EvK6KAjTy4wey28iXOXOkMwYCw+jIQ3+7Mxs= -github.com/aws/aws-sdk-go-v2/service/pricing v1.36.0 h1:oo+sDKgF0qTLNhjiKs+VasAC2fkeVE7LWEBhz+TKJu8= -github.com/aws/aws-sdk-go-v2/service/pricing v1.36.0/go.mod h1:qgVy1b8Fv+VlNke0RUY7SKDYe1MYB60cIYX7cUm1EJQ= +github.com/aws/aws-sdk-go-v2/service/pricing v1.36.1 h1:LDR5vJNnAVqg9bZBI9sqSEpjhPGVelVFkxUwdvD6L2s= +github.com/aws/aws-sdk-go-v2/service/pricing v1.36.1/go.mod h1:n6r5jWgZaSRvoEp+hVB18QPHBdlAnqu+nI/vaZXcZ4A= github.com/aws/aws-sdk-go-v2/service/qbusiness v1.29.0 h1:lD0G4L+ggiCGUUp2xEkdgN1C6Mo20zR64W/6/IoiUXc= github.com/aws/aws-sdk-go-v2/service/qbusiness v1.29.0/go.mod h1:pRs7THfCpT8usab/xxCoelRWub8oBgACdVIlSX3UBW8= github.com/aws/aws-sdk-go-v2/service/qldb v1.27.0 h1:BGSyIk69nlqfJrqe7qXFcXqWJwvlpOV3CWRFbgYabvA= From 14f71dbd86b223f8fd331a58781a64969de1e60b Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 09:14:31 -0400 Subject: [PATCH 262/365] go get github.com/aws/aws-sdk-go-v2/service/qbusiness. --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index d9904909b7b6..7d3d7b260806 100644 --- a/go.mod +++ b/go.mod @@ -196,7 +196,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/pipes v1.20.1 github.com/aws/aws-sdk-go-v2/service/polly v1.49.1 github.com/aws/aws-sdk-go-v2/service/pricing v1.36.1 - github.com/aws/aws-sdk-go-v2/service/qbusiness v1.29.0 + github.com/aws/aws-sdk-go-v2/service/qbusiness v1.29.1 github.com/aws/aws-sdk-go-v2/service/qldb v1.27.0 github.com/aws/aws-sdk-go-v2/service/quicksight v1.89.0 github.com/aws/aws-sdk-go-v2/service/ram v1.31.0 diff --git a/go.sum b/go.sum index ea6e37ef13b2..e86ccbdfa534 100644 --- a/go.sum +++ b/go.sum @@ -413,8 +413,8 @@ github.com/aws/aws-sdk-go-v2/service/polly v1.49.1 h1:g4JAX2yxmN9iJSE42TGR5Gnion github.com/aws/aws-sdk-go-v2/service/polly v1.49.1/go.mod h1:meOGU/2EvK6KAjTy4wey28iXOXOkMwYCw+jIQ3+7Mxs= github.com/aws/aws-sdk-go-v2/service/pricing v1.36.1 h1:LDR5vJNnAVqg9bZBI9sqSEpjhPGVelVFkxUwdvD6L2s= github.com/aws/aws-sdk-go-v2/service/pricing v1.36.1/go.mod h1:n6r5jWgZaSRvoEp+hVB18QPHBdlAnqu+nI/vaZXcZ4A= -github.com/aws/aws-sdk-go-v2/service/qbusiness v1.29.0 h1:lD0G4L+ggiCGUUp2xEkdgN1C6Mo20zR64W/6/IoiUXc= -github.com/aws/aws-sdk-go-v2/service/qbusiness v1.29.0/go.mod h1:pRs7THfCpT8usab/xxCoelRWub8oBgACdVIlSX3UBW8= +github.com/aws/aws-sdk-go-v2/service/qbusiness v1.29.1 h1:UEg5RyOrwwTgO3pEPVkBOZBhlZjGiVTJlLzUJcXLKQs= +github.com/aws/aws-sdk-go-v2/service/qbusiness v1.29.1/go.mod h1:RbC8dW2YmTMAE9jWWuOw1imZjbGQXbzZs3i/XzmhZkc= github.com/aws/aws-sdk-go-v2/service/qldb v1.27.0 h1:BGSyIk69nlqfJrqe7qXFcXqWJwvlpOV3CWRFbgYabvA= github.com/aws/aws-sdk-go-v2/service/qldb v1.27.0/go.mod h1:kHu/ZtJs/p1AixzTHZJTSk9Xh0/nW+kZ7C0RBkQQxcI= github.com/aws/aws-sdk-go-v2/service/quicksight v1.89.0 h1:UEH4WaFbcJMScMCu3G2d4g/UPsrx3nB0tGUpdPneCxY= From fbdefaa489574912483a2515d32c357229d25cb2 Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 09:14:33 -0400 Subject: [PATCH 263/365] go get github.com/aws/aws-sdk-go-v2/service/qldb. --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 7d3d7b260806..a6d23d9db5ae 100644 --- a/go.mod +++ b/go.mod @@ -197,7 +197,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/polly v1.49.1 github.com/aws/aws-sdk-go-v2/service/pricing v1.36.1 github.com/aws/aws-sdk-go-v2/service/qbusiness v1.29.1 - github.com/aws/aws-sdk-go-v2/service/qldb v1.27.0 + github.com/aws/aws-sdk-go-v2/service/qldb v1.27.1 github.com/aws/aws-sdk-go-v2/service/quicksight v1.89.0 github.com/aws/aws-sdk-go-v2/service/ram v1.31.0 github.com/aws/aws-sdk-go-v2/service/rbin v1.23.0 diff --git a/go.sum b/go.sum index e86ccbdfa534..fea9ceb6612c 100644 --- a/go.sum +++ b/go.sum @@ -415,8 +415,8 @@ github.com/aws/aws-sdk-go-v2/service/pricing v1.36.1 h1:LDR5vJNnAVqg9bZBI9sqSEpj github.com/aws/aws-sdk-go-v2/service/pricing v1.36.1/go.mod h1:n6r5jWgZaSRvoEp+hVB18QPHBdlAnqu+nI/vaZXcZ4A= github.com/aws/aws-sdk-go-v2/service/qbusiness v1.29.1 h1:UEg5RyOrwwTgO3pEPVkBOZBhlZjGiVTJlLzUJcXLKQs= github.com/aws/aws-sdk-go-v2/service/qbusiness v1.29.1/go.mod h1:RbC8dW2YmTMAE9jWWuOw1imZjbGQXbzZs3i/XzmhZkc= -github.com/aws/aws-sdk-go-v2/service/qldb v1.27.0 h1:BGSyIk69nlqfJrqe7qXFcXqWJwvlpOV3CWRFbgYabvA= -github.com/aws/aws-sdk-go-v2/service/qldb v1.27.0/go.mod h1:kHu/ZtJs/p1AixzTHZJTSk9Xh0/nW+kZ7C0RBkQQxcI= +github.com/aws/aws-sdk-go-v2/service/qldb v1.27.1 h1:M0bDQzEES16it3M8iwvYw0JYWSHtAELprn66MS8jjBo= +github.com/aws/aws-sdk-go-v2/service/qldb v1.27.1/go.mod h1:UCoQ1I3GDheCu90XJjXyvO/v2AUFTwLER6h4QmvSego= github.com/aws/aws-sdk-go-v2/service/quicksight v1.89.0 h1:UEH4WaFbcJMScMCu3G2d4g/UPsrx3nB0tGUpdPneCxY= github.com/aws/aws-sdk-go-v2/service/quicksight v1.89.0/go.mod h1:Hxg63s0Ffeep3BqIpUjpjES0s4tky2HQRse8GR9douA= github.com/aws/aws-sdk-go-v2/service/ram v1.31.0 h1:j2TVGDcIrIMcM4cDTJ0yUchYSQw4fQ+Ynq2pZvd343A= From 8758fbb45c525e0c9a28bd922cb4af3043028f5c Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 09:14:36 -0400 Subject: [PATCH 264/365] go get github.com/aws/aws-sdk-go-v2/service/quicksight. --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index a6d23d9db5ae..c6ec496bb9d3 100644 --- a/go.mod +++ b/go.mod @@ -198,7 +198,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/pricing v1.36.1 github.com/aws/aws-sdk-go-v2/service/qbusiness v1.29.1 github.com/aws/aws-sdk-go-v2/service/qldb v1.27.1 - github.com/aws/aws-sdk-go-v2/service/quicksight v1.89.0 + github.com/aws/aws-sdk-go-v2/service/quicksight v1.89.1 github.com/aws/aws-sdk-go-v2/service/ram v1.31.0 github.com/aws/aws-sdk-go-v2/service/rbin v1.23.0 github.com/aws/aws-sdk-go-v2/service/rds v1.100.0 diff --git a/go.sum b/go.sum index fea9ceb6612c..6502424c2ca3 100644 --- a/go.sum +++ b/go.sum @@ -417,8 +417,8 @@ github.com/aws/aws-sdk-go-v2/service/qbusiness v1.29.1 h1:UEg5RyOrwwTgO3pEPVkBOZ github.com/aws/aws-sdk-go-v2/service/qbusiness v1.29.1/go.mod h1:RbC8dW2YmTMAE9jWWuOw1imZjbGQXbzZs3i/XzmhZkc= github.com/aws/aws-sdk-go-v2/service/qldb v1.27.1 h1:M0bDQzEES16it3M8iwvYw0JYWSHtAELprn66MS8jjBo= github.com/aws/aws-sdk-go-v2/service/qldb v1.27.1/go.mod h1:UCoQ1I3GDheCu90XJjXyvO/v2AUFTwLER6h4QmvSego= -github.com/aws/aws-sdk-go-v2/service/quicksight v1.89.0 h1:UEH4WaFbcJMScMCu3G2d4g/UPsrx3nB0tGUpdPneCxY= -github.com/aws/aws-sdk-go-v2/service/quicksight v1.89.0/go.mod h1:Hxg63s0Ffeep3BqIpUjpjES0s4tky2HQRse8GR9douA= +github.com/aws/aws-sdk-go-v2/service/quicksight v1.89.1 h1:HieaRkHHAJWegQxuuWm3duxdEuiLQBHnApCkfMGVLH0= +github.com/aws/aws-sdk-go-v2/service/quicksight v1.89.1/go.mod h1:YQlQUXV3sa9nZR2W2DyrOVHoLoEDUjcoqe3vGgYTPPg= github.com/aws/aws-sdk-go-v2/service/ram v1.31.0 h1:j2TVGDcIrIMcM4cDTJ0yUchYSQw4fQ+Ynq2pZvd343A= github.com/aws/aws-sdk-go-v2/service/ram v1.31.0/go.mod h1:XAr9Ij8n+yWjoBBAqJ4p36dB/CBOmHliy1PqD2rbaWk= github.com/aws/aws-sdk-go-v2/service/rbin v1.23.0 h1:zQ4vQCRBT1bTb3b5Nvzd1S5kZ93h7O+AUXllfEgcbQA= From 5e800b1ccf799af2062e3491ff575842e0eaaab9 Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 09:14:38 -0400 Subject: [PATCH 265/365] go get github.com/aws/aws-sdk-go-v2/service/ram. --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index c6ec496bb9d3..245e5c50a676 100644 --- a/go.mod +++ b/go.mod @@ -199,7 +199,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/qbusiness v1.29.1 github.com/aws/aws-sdk-go-v2/service/qldb v1.27.1 github.com/aws/aws-sdk-go-v2/service/quicksight v1.89.1 - github.com/aws/aws-sdk-go-v2/service/ram v1.31.0 + github.com/aws/aws-sdk-go-v2/service/ram v1.31.1 github.com/aws/aws-sdk-go-v2/service/rbin v1.23.0 github.com/aws/aws-sdk-go-v2/service/rds v1.100.0 github.com/aws/aws-sdk-go-v2/service/redshift v1.55.0 diff --git a/go.sum b/go.sum index 6502424c2ca3..d6b3d52b8ba7 100644 --- a/go.sum +++ b/go.sum @@ -419,8 +419,8 @@ github.com/aws/aws-sdk-go-v2/service/qldb v1.27.1 h1:M0bDQzEES16it3M8iwvYw0JYWSH github.com/aws/aws-sdk-go-v2/service/qldb v1.27.1/go.mod h1:UCoQ1I3GDheCu90XJjXyvO/v2AUFTwLER6h4QmvSego= github.com/aws/aws-sdk-go-v2/service/quicksight v1.89.1 h1:HieaRkHHAJWegQxuuWm3duxdEuiLQBHnApCkfMGVLH0= github.com/aws/aws-sdk-go-v2/service/quicksight v1.89.1/go.mod h1:YQlQUXV3sa9nZR2W2DyrOVHoLoEDUjcoqe3vGgYTPPg= -github.com/aws/aws-sdk-go-v2/service/ram v1.31.0 h1:j2TVGDcIrIMcM4cDTJ0yUchYSQw4fQ+Ynq2pZvd343A= -github.com/aws/aws-sdk-go-v2/service/ram v1.31.0/go.mod h1:XAr9Ij8n+yWjoBBAqJ4p36dB/CBOmHliy1PqD2rbaWk= +github.com/aws/aws-sdk-go-v2/service/ram v1.31.1 h1:DZ1qMqkin2aoXDI9X4G48hufZ5Unag/11WmDgIEN31w= +github.com/aws/aws-sdk-go-v2/service/ram v1.31.1/go.mod h1:EtWvsAzhCnrUB03jgf70O8Sqi5gmRUQsFExhChPMI3U= github.com/aws/aws-sdk-go-v2/service/rbin v1.23.0 h1:zQ4vQCRBT1bTb3b5Nvzd1S5kZ93h7O+AUXllfEgcbQA= github.com/aws/aws-sdk-go-v2/service/rbin v1.23.0/go.mod h1:9lt08xzCBRZYiiZNRbd/iBOQ0yMVLDmJhhr1vBW/fLg= github.com/aws/aws-sdk-go-v2/service/rds v1.100.0 h1:tv36GhETPIf9IX92SYKMCQeUDlnpAOZ/1Dd9S82YrF0= From 1d1fa3c11fdbf4784a618b0722b274fe20e92629 Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 09:14:39 -0400 Subject: [PATCH 266/365] go get github.com/aws/aws-sdk-go-v2/service/rbin. --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 245e5c50a676..1552bceadc8a 100644 --- a/go.mod +++ b/go.mod @@ -200,7 +200,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/qldb v1.27.1 github.com/aws/aws-sdk-go-v2/service/quicksight v1.89.1 github.com/aws/aws-sdk-go-v2/service/ram v1.31.1 - github.com/aws/aws-sdk-go-v2/service/rbin v1.23.0 + github.com/aws/aws-sdk-go-v2/service/rbin v1.23.1 github.com/aws/aws-sdk-go-v2/service/rds v1.100.0 github.com/aws/aws-sdk-go-v2/service/redshift v1.55.0 github.com/aws/aws-sdk-go-v2/service/redshiftdata v1.34.0 diff --git a/go.sum b/go.sum index d6b3d52b8ba7..db2e812f55ea 100644 --- a/go.sum +++ b/go.sum @@ -421,8 +421,8 @@ github.com/aws/aws-sdk-go-v2/service/quicksight v1.89.1 h1:HieaRkHHAJWegQxuuWm3d github.com/aws/aws-sdk-go-v2/service/quicksight v1.89.1/go.mod h1:YQlQUXV3sa9nZR2W2DyrOVHoLoEDUjcoqe3vGgYTPPg= github.com/aws/aws-sdk-go-v2/service/ram v1.31.1 h1:DZ1qMqkin2aoXDI9X4G48hufZ5Unag/11WmDgIEN31w= github.com/aws/aws-sdk-go-v2/service/ram v1.31.1/go.mod h1:EtWvsAzhCnrUB03jgf70O8Sqi5gmRUQsFExhChPMI3U= -github.com/aws/aws-sdk-go-v2/service/rbin v1.23.0 h1:zQ4vQCRBT1bTb3b5Nvzd1S5kZ93h7O+AUXllfEgcbQA= -github.com/aws/aws-sdk-go-v2/service/rbin v1.23.0/go.mod h1:9lt08xzCBRZYiiZNRbd/iBOQ0yMVLDmJhhr1vBW/fLg= +github.com/aws/aws-sdk-go-v2/service/rbin v1.23.1 h1:MuUdwoKOOY+H54Fb596ADns1ug2qM9QxGUIsgZshhVQ= +github.com/aws/aws-sdk-go-v2/service/rbin v1.23.1/go.mod h1:Gs3msPhLk/QQjEfCDK3iZXEOJltg2JyQJMuQ0hhvFLk= github.com/aws/aws-sdk-go-v2/service/rds v1.100.0 h1:tv36GhETPIf9IX92SYKMCQeUDlnpAOZ/1Dd9S82YrF0= github.com/aws/aws-sdk-go-v2/service/rds v1.100.0/go.mod h1:QjidjpcTEJ3eG6SniuuMtnX4AjuqF3Z4Rhys0xSKWA0= github.com/aws/aws-sdk-go-v2/service/redshift v1.55.0 h1:70T8EpAmUAmh1+iljlPu94NnUKATN9GedtKY0y9I4CY= From 3c87a5c56931c27086efda0265f1b8e0b82b5c1b Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 09:14:40 -0400 Subject: [PATCH 267/365] go get github.com/aws/aws-sdk-go-v2/service/rds. --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 1552bceadc8a..7e279e62221b 100644 --- a/go.mod +++ b/go.mod @@ -201,7 +201,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/quicksight v1.89.1 github.com/aws/aws-sdk-go-v2/service/ram v1.31.1 github.com/aws/aws-sdk-go-v2/service/rbin v1.23.1 - github.com/aws/aws-sdk-go-v2/service/rds v1.100.0 + github.com/aws/aws-sdk-go-v2/service/rds v1.100.1 github.com/aws/aws-sdk-go-v2/service/redshift v1.55.0 github.com/aws/aws-sdk-go-v2/service/redshiftdata v1.34.0 github.com/aws/aws-sdk-go-v2/service/redshiftserverless v1.28.0 diff --git a/go.sum b/go.sum index db2e812f55ea..f8be893d0304 100644 --- a/go.sum +++ b/go.sum @@ -423,8 +423,8 @@ github.com/aws/aws-sdk-go-v2/service/ram v1.31.1 h1:DZ1qMqkin2aoXDI9X4G48hufZ5Un github.com/aws/aws-sdk-go-v2/service/ram v1.31.1/go.mod h1:EtWvsAzhCnrUB03jgf70O8Sqi5gmRUQsFExhChPMI3U= github.com/aws/aws-sdk-go-v2/service/rbin v1.23.1 h1:MuUdwoKOOY+H54Fb596ADns1ug2qM9QxGUIsgZshhVQ= github.com/aws/aws-sdk-go-v2/service/rbin v1.23.1/go.mod h1:Gs3msPhLk/QQjEfCDK3iZXEOJltg2JyQJMuQ0hhvFLk= -github.com/aws/aws-sdk-go-v2/service/rds v1.100.0 h1:tv36GhETPIf9IX92SYKMCQeUDlnpAOZ/1Dd9S82YrF0= -github.com/aws/aws-sdk-go-v2/service/rds v1.100.0/go.mod h1:QjidjpcTEJ3eG6SniuuMtnX4AjuqF3Z4Rhys0xSKWA0= +github.com/aws/aws-sdk-go-v2/service/rds v1.100.1 h1:1QZUBDI1zr0RrVorJMgtgs2heL/23IxiKM0eRdW48Cc= +github.com/aws/aws-sdk-go-v2/service/rds v1.100.1/go.mod h1:7xLgcsUoy294mtsJFC+1/lZBwkZRuhb6Tnr2X/AOrl8= github.com/aws/aws-sdk-go-v2/service/redshift v1.55.0 h1:70T8EpAmUAmh1+iljlPu94NnUKATN9GedtKY0y9I4CY= github.com/aws/aws-sdk-go-v2/service/redshift v1.55.0/go.mod h1:ItDt61dKOBnzf5gY/kvu4UaDKNxdp8LntwS7PaaVpfU= github.com/aws/aws-sdk-go-v2/service/redshiftdata v1.34.0 h1:Ja8MnHjB+B1aKcFa1ZWJCeigiLJecl0bLoQnLwNncyE= From 7ce6a0515607dcb62c2cc485d48e317e70d5ea91 Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 09:14:41 -0400 Subject: [PATCH 268/365] go get github.com/aws/aws-sdk-go-v2/service/redshift. --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 7e279e62221b..a1edda30ad98 100644 --- a/go.mod +++ b/go.mod @@ -202,7 +202,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/ram v1.31.1 github.com/aws/aws-sdk-go-v2/service/rbin v1.23.1 github.com/aws/aws-sdk-go-v2/service/rds v1.100.1 - github.com/aws/aws-sdk-go-v2/service/redshift v1.55.0 + github.com/aws/aws-sdk-go-v2/service/redshift v1.55.1 github.com/aws/aws-sdk-go-v2/service/redshiftdata v1.34.0 github.com/aws/aws-sdk-go-v2/service/redshiftserverless v1.28.0 github.com/aws/aws-sdk-go-v2/service/rekognition v1.48.0 diff --git a/go.sum b/go.sum index f8be893d0304..27354b1a8327 100644 --- a/go.sum +++ b/go.sum @@ -425,8 +425,8 @@ github.com/aws/aws-sdk-go-v2/service/rbin v1.23.1 h1:MuUdwoKOOY+H54Fb596ADns1ug2 github.com/aws/aws-sdk-go-v2/service/rbin v1.23.1/go.mod h1:Gs3msPhLk/QQjEfCDK3iZXEOJltg2JyQJMuQ0hhvFLk= github.com/aws/aws-sdk-go-v2/service/rds v1.100.1 h1:1QZUBDI1zr0RrVorJMgtgs2heL/23IxiKM0eRdW48Cc= github.com/aws/aws-sdk-go-v2/service/rds v1.100.1/go.mod h1:7xLgcsUoy294mtsJFC+1/lZBwkZRuhb6Tnr2X/AOrl8= -github.com/aws/aws-sdk-go-v2/service/redshift v1.55.0 h1:70T8EpAmUAmh1+iljlPu94NnUKATN9GedtKY0y9I4CY= -github.com/aws/aws-sdk-go-v2/service/redshift v1.55.0/go.mod h1:ItDt61dKOBnzf5gY/kvu4UaDKNxdp8LntwS7PaaVpfU= +github.com/aws/aws-sdk-go-v2/service/redshift v1.55.1 h1:g2AXKrTkVjnWpYXBXJ00lU6NaU849/jIIRxLVo10HGM= +github.com/aws/aws-sdk-go-v2/service/redshift v1.55.1/go.mod h1:GGQqtUubSmvzcr23P48Qkkv2auTeatL67pL9SO6/b14= github.com/aws/aws-sdk-go-v2/service/redshiftdata v1.34.0 h1:Ja8MnHjB+B1aKcFa1ZWJCeigiLJecl0bLoQnLwNncyE= github.com/aws/aws-sdk-go-v2/service/redshiftdata v1.34.0/go.mod h1:qeA64l5ipqSqWAp3iBV8p0iZI7l619gWQse/dXqrwWo= github.com/aws/aws-sdk-go-v2/service/redshiftserverless v1.28.0 h1:LoMSlONLh3Ov30lO6sjy5zX5Wz8duDqXm5PrWeZoh9k= From dea7072cb6c5afcfc9b8c61469f496a2e0a96b2c Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 09:14:42 -0400 Subject: [PATCH 269/365] go get github.com/aws/aws-sdk-go-v2/service/redshiftdata. --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index a1edda30ad98..a23d0f9c7051 100644 --- a/go.mod +++ b/go.mod @@ -203,7 +203,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/rbin v1.23.1 github.com/aws/aws-sdk-go-v2/service/rds v1.100.1 github.com/aws/aws-sdk-go-v2/service/redshift v1.55.1 - github.com/aws/aws-sdk-go-v2/service/redshiftdata v1.34.0 + github.com/aws/aws-sdk-go-v2/service/redshiftdata v1.34.1 github.com/aws/aws-sdk-go-v2/service/redshiftserverless v1.28.0 github.com/aws/aws-sdk-go-v2/service/rekognition v1.48.0 github.com/aws/aws-sdk-go-v2/service/resiliencehub v1.31.0 diff --git a/go.sum b/go.sum index 27354b1a8327..de600ce10b27 100644 --- a/go.sum +++ b/go.sum @@ -427,8 +427,8 @@ github.com/aws/aws-sdk-go-v2/service/rds v1.100.1 h1:1QZUBDI1zr0RrVorJMgtgs2heL/ github.com/aws/aws-sdk-go-v2/service/rds v1.100.1/go.mod h1:7xLgcsUoy294mtsJFC+1/lZBwkZRuhb6Tnr2X/AOrl8= github.com/aws/aws-sdk-go-v2/service/redshift v1.55.1 h1:g2AXKrTkVjnWpYXBXJ00lU6NaU849/jIIRxLVo10HGM= github.com/aws/aws-sdk-go-v2/service/redshift v1.55.1/go.mod h1:GGQqtUubSmvzcr23P48Qkkv2auTeatL67pL9SO6/b14= -github.com/aws/aws-sdk-go-v2/service/redshiftdata v1.34.0 h1:Ja8MnHjB+B1aKcFa1ZWJCeigiLJecl0bLoQnLwNncyE= -github.com/aws/aws-sdk-go-v2/service/redshiftdata v1.34.0/go.mod h1:qeA64l5ipqSqWAp3iBV8p0iZI7l619gWQse/dXqrwWo= +github.com/aws/aws-sdk-go-v2/service/redshiftdata v1.34.1 h1:4+OFVGzIg6JcwbR8FKtYdC6AuSg1jV11Hk3RIv6y2oY= +github.com/aws/aws-sdk-go-v2/service/redshiftdata v1.34.1/go.mod h1:heOxElSAAGnh+jfAH0hK9ilW856kSFYBlYRJS5QKbm0= github.com/aws/aws-sdk-go-v2/service/redshiftserverless v1.28.0 h1:LoMSlONLh3Ov30lO6sjy5zX5Wz8duDqXm5PrWeZoh9k= github.com/aws/aws-sdk-go-v2/service/redshiftserverless v1.28.0/go.mod h1:x/DAN+hv2jh09ARxGT7AbVNa437hMiHbtnBvGgMftM8= github.com/aws/aws-sdk-go-v2/service/rekognition v1.48.0 h1:2mSu5NgU4YBSqt49BETif2cGI7wNeYhktHjWf6AJiLU= From 1977a093fb19420433be458923b4a5b19858131b Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 09:14:44 -0400 Subject: [PATCH 270/365] go get github.com/aws/aws-sdk-go-v2/service/redshiftserverless. --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index a23d0f9c7051..43ce00c383f7 100644 --- a/go.mod +++ b/go.mod @@ -204,7 +204,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/rds v1.100.1 github.com/aws/aws-sdk-go-v2/service/redshift v1.55.1 github.com/aws/aws-sdk-go-v2/service/redshiftdata v1.34.1 - github.com/aws/aws-sdk-go-v2/service/redshiftserverless v1.28.0 + github.com/aws/aws-sdk-go-v2/service/redshiftserverless v1.28.1 github.com/aws/aws-sdk-go-v2/service/rekognition v1.48.0 github.com/aws/aws-sdk-go-v2/service/resiliencehub v1.31.0 github.com/aws/aws-sdk-go-v2/service/resourceexplorer2 v1.18.0 diff --git a/go.sum b/go.sum index de600ce10b27..1d90793f8b17 100644 --- a/go.sum +++ b/go.sum @@ -429,8 +429,8 @@ github.com/aws/aws-sdk-go-v2/service/redshift v1.55.1 h1:g2AXKrTkVjnWpYXBXJ00lU6 github.com/aws/aws-sdk-go-v2/service/redshift v1.55.1/go.mod h1:GGQqtUubSmvzcr23P48Qkkv2auTeatL67pL9SO6/b14= github.com/aws/aws-sdk-go-v2/service/redshiftdata v1.34.1 h1:4+OFVGzIg6JcwbR8FKtYdC6AuSg1jV11Hk3RIv6y2oY= github.com/aws/aws-sdk-go-v2/service/redshiftdata v1.34.1/go.mod h1:heOxElSAAGnh+jfAH0hK9ilW856kSFYBlYRJS5QKbm0= -github.com/aws/aws-sdk-go-v2/service/redshiftserverless v1.28.0 h1:LoMSlONLh3Ov30lO6sjy5zX5Wz8duDqXm5PrWeZoh9k= -github.com/aws/aws-sdk-go-v2/service/redshiftserverless v1.28.0/go.mod h1:x/DAN+hv2jh09ARxGT7AbVNa437hMiHbtnBvGgMftM8= +github.com/aws/aws-sdk-go-v2/service/redshiftserverless v1.28.1 h1:Tybcb+WE3hbjkF3kfkppyS6qRigIZwlPbtnFdMN9Hvg= +github.com/aws/aws-sdk-go-v2/service/redshiftserverless v1.28.1/go.mod h1:PD4779i8tDuTz0p6k1XSZTF2RrepnIGeZOTCmuFhFOA= github.com/aws/aws-sdk-go-v2/service/rekognition v1.48.0 h1:2mSu5NgU4YBSqt49BETif2cGI7wNeYhktHjWf6AJiLU= github.com/aws/aws-sdk-go-v2/service/rekognition v1.48.0/go.mod h1:W6WPD7+xgb2DXb+mlaxwoKeFlJ+qTlch26i9754ded4= github.com/aws/aws-sdk-go-v2/service/resiliencehub v1.31.0 h1:MRZ+L7IMnUwpXUfj7J4W9/4v2+Cx3UjmCvedYM13MAc= From a10a6406b58927b525810296be18c60c43dc931e Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 09:14:45 -0400 Subject: [PATCH 271/365] go get github.com/aws/aws-sdk-go-v2/service/rekognition. --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 43ce00c383f7..0b92e6f67511 100644 --- a/go.mod +++ b/go.mod @@ -205,7 +205,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/redshift v1.55.1 github.com/aws/aws-sdk-go-v2/service/redshiftdata v1.34.1 github.com/aws/aws-sdk-go-v2/service/redshiftserverless v1.28.1 - github.com/aws/aws-sdk-go-v2/service/rekognition v1.48.0 + github.com/aws/aws-sdk-go-v2/service/rekognition v1.48.1 github.com/aws/aws-sdk-go-v2/service/resiliencehub v1.31.0 github.com/aws/aws-sdk-go-v2/service/resourceexplorer2 v1.18.0 github.com/aws/aws-sdk-go-v2/service/resourcegroups v1.30.0 diff --git a/go.sum b/go.sum index 1d90793f8b17..3e03a1ab21a4 100644 --- a/go.sum +++ b/go.sum @@ -431,8 +431,8 @@ github.com/aws/aws-sdk-go-v2/service/redshiftdata v1.34.1 h1:4+OFVGzIg6JcwbR8FKt github.com/aws/aws-sdk-go-v2/service/redshiftdata v1.34.1/go.mod h1:heOxElSAAGnh+jfAH0hK9ilW856kSFYBlYRJS5QKbm0= github.com/aws/aws-sdk-go-v2/service/redshiftserverless v1.28.1 h1:Tybcb+WE3hbjkF3kfkppyS6qRigIZwlPbtnFdMN9Hvg= github.com/aws/aws-sdk-go-v2/service/redshiftserverless v1.28.1/go.mod h1:PD4779i8tDuTz0p6k1XSZTF2RrepnIGeZOTCmuFhFOA= -github.com/aws/aws-sdk-go-v2/service/rekognition v1.48.0 h1:2mSu5NgU4YBSqt49BETif2cGI7wNeYhktHjWf6AJiLU= -github.com/aws/aws-sdk-go-v2/service/rekognition v1.48.0/go.mod h1:W6WPD7+xgb2DXb+mlaxwoKeFlJ+qTlch26i9754ded4= +github.com/aws/aws-sdk-go-v2/service/rekognition v1.48.1 h1:MKivszAL8Z3w1hzxV6peGzSQsSekbrYcUaYS0IxjxbI= +github.com/aws/aws-sdk-go-v2/service/rekognition v1.48.1/go.mod h1:cKS/VXrV5GDM0JLURHffLzC17fm3luMz/6XPH2A92fw= github.com/aws/aws-sdk-go-v2/service/resiliencehub v1.31.0 h1:MRZ+L7IMnUwpXUfj7J4W9/4v2+Cx3UjmCvedYM13MAc= github.com/aws/aws-sdk-go-v2/service/resiliencehub v1.31.0/go.mod h1:VBjzNNn7Q20jBD2W/AjVe/yzGGVcWL5qOpa4QukppnE= github.com/aws/aws-sdk-go-v2/service/resourceexplorer2 v1.18.0 h1:H6KNYJs6a1Kx/ZTut6IN/0tLGl708ARSH7GktpDBZYI= From 24db832b0d48b93143560f3b40a79968c311edd6 Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 09:14:46 -0400 Subject: [PATCH 272/365] go get github.com/aws/aws-sdk-go-v2/service/resiliencehub. --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 0b92e6f67511..1472a15cdd4d 100644 --- a/go.mod +++ b/go.mod @@ -206,7 +206,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/redshiftdata v1.34.1 github.com/aws/aws-sdk-go-v2/service/redshiftserverless v1.28.1 github.com/aws/aws-sdk-go-v2/service/rekognition v1.48.1 - github.com/aws/aws-sdk-go-v2/service/resiliencehub v1.31.0 + github.com/aws/aws-sdk-go-v2/service/resiliencehub v1.31.1 github.com/aws/aws-sdk-go-v2/service/resourceexplorer2 v1.18.0 github.com/aws/aws-sdk-go-v2/service/resourcegroups v1.30.0 github.com/aws/aws-sdk-go-v2/service/resourcegroupstaggingapi v1.27.0 diff --git a/go.sum b/go.sum index 3e03a1ab21a4..e3ec41a80017 100644 --- a/go.sum +++ b/go.sum @@ -433,8 +433,8 @@ github.com/aws/aws-sdk-go-v2/service/redshiftserverless v1.28.1 h1:Tybcb+WE3hbjk github.com/aws/aws-sdk-go-v2/service/redshiftserverless v1.28.1/go.mod h1:PD4779i8tDuTz0p6k1XSZTF2RrepnIGeZOTCmuFhFOA= github.com/aws/aws-sdk-go-v2/service/rekognition v1.48.1 h1:MKivszAL8Z3w1hzxV6peGzSQsSekbrYcUaYS0IxjxbI= github.com/aws/aws-sdk-go-v2/service/rekognition v1.48.1/go.mod h1:cKS/VXrV5GDM0JLURHffLzC17fm3luMz/6XPH2A92fw= -github.com/aws/aws-sdk-go-v2/service/resiliencehub v1.31.0 h1:MRZ+L7IMnUwpXUfj7J4W9/4v2+Cx3UjmCvedYM13MAc= -github.com/aws/aws-sdk-go-v2/service/resiliencehub v1.31.0/go.mod h1:VBjzNNn7Q20jBD2W/AjVe/yzGGVcWL5qOpa4QukppnE= +github.com/aws/aws-sdk-go-v2/service/resiliencehub v1.31.1 h1:Y6aoFAl88KNul8+otRs+DRKmp9FUEhWtCpyox/VkZzM= +github.com/aws/aws-sdk-go-v2/service/resiliencehub v1.31.1/go.mod h1:Z0BCXb/w38nvM+lPuYMGXuOHFgKl1y+MY11yzW4WprY= github.com/aws/aws-sdk-go-v2/service/resourceexplorer2 v1.18.0 h1:H6KNYJs6a1Kx/ZTut6IN/0tLGl708ARSH7GktpDBZYI= github.com/aws/aws-sdk-go-v2/service/resourceexplorer2 v1.18.0/go.mod h1:bgCF6PlTIDDHsRkA2hdGnjZaXVAPpJVbP52meVZrc1Q= github.com/aws/aws-sdk-go-v2/service/resourcegroups v1.30.0 h1:T84bfq2DrdXmOSQXYuaCYoeVrs6F6nNouXwU+KrLWDs= From 6b58ffc819e707eca77fca606c7b553b29416546 Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 09:14:47 -0400 Subject: [PATCH 273/365] go get github.com/aws/aws-sdk-go-v2/service/resourceexplorer2. --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 1472a15cdd4d..5c8c6c4c6625 100644 --- a/go.mod +++ b/go.mod @@ -207,7 +207,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/redshiftserverless v1.28.1 github.com/aws/aws-sdk-go-v2/service/rekognition v1.48.1 github.com/aws/aws-sdk-go-v2/service/resiliencehub v1.31.1 - github.com/aws/aws-sdk-go-v2/service/resourceexplorer2 v1.18.0 + github.com/aws/aws-sdk-go-v2/service/resourceexplorer2 v1.18.1 github.com/aws/aws-sdk-go-v2/service/resourcegroups v1.30.0 github.com/aws/aws-sdk-go-v2/service/resourcegroupstaggingapi v1.27.0 github.com/aws/aws-sdk-go-v2/service/rolesanywhere v1.18.0 diff --git a/go.sum b/go.sum index e3ec41a80017..69e469c5e273 100644 --- a/go.sum +++ b/go.sum @@ -435,8 +435,8 @@ github.com/aws/aws-sdk-go-v2/service/rekognition v1.48.1 h1:MKivszAL8Z3w1hzxV6pe github.com/aws/aws-sdk-go-v2/service/rekognition v1.48.1/go.mod h1:cKS/VXrV5GDM0JLURHffLzC17fm3luMz/6XPH2A92fw= github.com/aws/aws-sdk-go-v2/service/resiliencehub v1.31.1 h1:Y6aoFAl88KNul8+otRs+DRKmp9FUEhWtCpyox/VkZzM= github.com/aws/aws-sdk-go-v2/service/resiliencehub v1.31.1/go.mod h1:Z0BCXb/w38nvM+lPuYMGXuOHFgKl1y+MY11yzW4WprY= -github.com/aws/aws-sdk-go-v2/service/resourceexplorer2 v1.18.0 h1:H6KNYJs6a1Kx/ZTut6IN/0tLGl708ARSH7GktpDBZYI= -github.com/aws/aws-sdk-go-v2/service/resourceexplorer2 v1.18.0/go.mod h1:bgCF6PlTIDDHsRkA2hdGnjZaXVAPpJVbP52meVZrc1Q= +github.com/aws/aws-sdk-go-v2/service/resourceexplorer2 v1.18.1 h1:Ocp3eIEr9gyd7YunIdPRRDOAw+bm622Ys2rrw/Iylps= +github.com/aws/aws-sdk-go-v2/service/resourceexplorer2 v1.18.1/go.mod h1:RGYowXd4xqI/xxZdNyvk1b4lO43heRlHt5hvFQgqT8Q= github.com/aws/aws-sdk-go-v2/service/resourcegroups v1.30.0 h1:T84bfq2DrdXmOSQXYuaCYoeVrs6F6nNouXwU+KrLWDs= github.com/aws/aws-sdk-go-v2/service/resourcegroups v1.30.0/go.mod h1:QLS4hY89cSI6WxhiGzowYyi/jcpf0IK6TvR/HusYs0Y= github.com/aws/aws-sdk-go-v2/service/resourcegroupstaggingapi v1.27.0 h1:deQCKTegmjCESMoePcAPin+TmKqEjePr2NOytwE0TGU= From 77073a061e3d806a147cc103a1776fc0f442e950 Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 09:14:48 -0400 Subject: [PATCH 274/365] go get github.com/aws/aws-sdk-go-v2/service/resourcegroups. --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 5c8c6c4c6625..dde46747f28c 100644 --- a/go.mod +++ b/go.mod @@ -208,7 +208,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/rekognition v1.48.1 github.com/aws/aws-sdk-go-v2/service/resiliencehub v1.31.1 github.com/aws/aws-sdk-go-v2/service/resourceexplorer2 v1.18.1 - github.com/aws/aws-sdk-go-v2/service/resourcegroups v1.30.0 + github.com/aws/aws-sdk-go-v2/service/resourcegroups v1.30.1 github.com/aws/aws-sdk-go-v2/service/resourcegroupstaggingapi v1.27.0 github.com/aws/aws-sdk-go-v2/service/rolesanywhere v1.18.0 github.com/aws/aws-sdk-go-v2/service/route53 v1.54.0 diff --git a/go.sum b/go.sum index 69e469c5e273..a01197510acc 100644 --- a/go.sum +++ b/go.sum @@ -437,8 +437,8 @@ github.com/aws/aws-sdk-go-v2/service/resiliencehub v1.31.1 h1:Y6aoFAl88KNul8+otR github.com/aws/aws-sdk-go-v2/service/resiliencehub v1.31.1/go.mod h1:Z0BCXb/w38nvM+lPuYMGXuOHFgKl1y+MY11yzW4WprY= github.com/aws/aws-sdk-go-v2/service/resourceexplorer2 v1.18.1 h1:Ocp3eIEr9gyd7YunIdPRRDOAw+bm622Ys2rrw/Iylps= github.com/aws/aws-sdk-go-v2/service/resourceexplorer2 v1.18.1/go.mod h1:RGYowXd4xqI/xxZdNyvk1b4lO43heRlHt5hvFQgqT8Q= -github.com/aws/aws-sdk-go-v2/service/resourcegroups v1.30.0 h1:T84bfq2DrdXmOSQXYuaCYoeVrs6F6nNouXwU+KrLWDs= -github.com/aws/aws-sdk-go-v2/service/resourcegroups v1.30.0/go.mod h1:QLS4hY89cSI6WxhiGzowYyi/jcpf0IK6TvR/HusYs0Y= +github.com/aws/aws-sdk-go-v2/service/resourcegroups v1.30.1 h1:KhIp2JHWuSUDXyJK7PDfAr30cko1YKDhbE6O1byejkE= +github.com/aws/aws-sdk-go-v2/service/resourcegroups v1.30.1/go.mod h1:2zyaohdBXZBnLMMXhx0e3cd63JycCSl+X9YFNHP7gtY= github.com/aws/aws-sdk-go-v2/service/resourcegroupstaggingapi v1.27.0 h1:deQCKTegmjCESMoePcAPin+TmKqEjePr2NOytwE0TGU= github.com/aws/aws-sdk-go-v2/service/resourcegroupstaggingapi v1.27.0/go.mod h1:BOtk077SCu+iZ/SQAA2xPeVJqrhm9yXqpw4UZ6SgHas= github.com/aws/aws-sdk-go-v2/service/rolesanywhere v1.18.0 h1:2Xg4DSL/wjjFG3uq1qKVIohZ3ToCjNOEdhSIL0xuL9Y= From b8a8313f0658d5ac0ab7bf56fce8770c1929781a Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 09:14:49 -0400 Subject: [PATCH 275/365] go get github.com/aws/aws-sdk-go-v2/service/resourcegroupstaggingapi. --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index dde46747f28c..5412488ba9a3 100644 --- a/go.mod +++ b/go.mod @@ -209,7 +209,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/resiliencehub v1.31.1 github.com/aws/aws-sdk-go-v2/service/resourceexplorer2 v1.18.1 github.com/aws/aws-sdk-go-v2/service/resourcegroups v1.30.1 - github.com/aws/aws-sdk-go-v2/service/resourcegroupstaggingapi v1.27.0 + github.com/aws/aws-sdk-go-v2/service/resourcegroupstaggingapi v1.27.1 github.com/aws/aws-sdk-go-v2/service/rolesanywhere v1.18.0 github.com/aws/aws-sdk-go-v2/service/route53 v1.54.0 github.com/aws/aws-sdk-go-v2/service/route53domains v1.30.0 diff --git a/go.sum b/go.sum index a01197510acc..11d4ce7b2f7b 100644 --- a/go.sum +++ b/go.sum @@ -439,8 +439,8 @@ github.com/aws/aws-sdk-go-v2/service/resourceexplorer2 v1.18.1 h1:Ocp3eIEr9gyd7Y github.com/aws/aws-sdk-go-v2/service/resourceexplorer2 v1.18.1/go.mod h1:RGYowXd4xqI/xxZdNyvk1b4lO43heRlHt5hvFQgqT8Q= github.com/aws/aws-sdk-go-v2/service/resourcegroups v1.30.1 h1:KhIp2JHWuSUDXyJK7PDfAr30cko1YKDhbE6O1byejkE= github.com/aws/aws-sdk-go-v2/service/resourcegroups v1.30.1/go.mod h1:2zyaohdBXZBnLMMXhx0e3cd63JycCSl+X9YFNHP7gtY= -github.com/aws/aws-sdk-go-v2/service/resourcegroupstaggingapi v1.27.0 h1:deQCKTegmjCESMoePcAPin+TmKqEjePr2NOytwE0TGU= -github.com/aws/aws-sdk-go-v2/service/resourcegroupstaggingapi v1.27.0/go.mod h1:BOtk077SCu+iZ/SQAA2xPeVJqrhm9yXqpw4UZ6SgHas= +github.com/aws/aws-sdk-go-v2/service/resourcegroupstaggingapi v1.27.1 h1:dGw/U6NbhnWoW2gw+75/AZvnYjFuxYRtzUpxALoRhLc= +github.com/aws/aws-sdk-go-v2/service/resourcegroupstaggingapi v1.27.1/go.mod h1:ZNIISn1QONFDUbTmkIK53IBTrGn1TbsrBH5pG/BCwew= github.com/aws/aws-sdk-go-v2/service/rolesanywhere v1.18.0 h1:2Xg4DSL/wjjFG3uq1qKVIohZ3ToCjNOEdhSIL0xuL9Y= github.com/aws/aws-sdk-go-v2/service/rolesanywhere v1.18.0/go.mod h1:+YaIHElNSCZDNyAie8PUJ3icWw1lAWHlPze8oV/6NEo= github.com/aws/aws-sdk-go-v2/service/route53 v1.54.0 h1:U//4kAneirDM8j96Vbzjf53y+WW42rsgOqJUKtifY3o= From 19595d279b8bc98e6812f150e2498a8414e8ecd9 Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 09:14:50 -0400 Subject: [PATCH 276/365] go get github.com/aws/aws-sdk-go-v2/service/rolesanywhere. --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 5412488ba9a3..bb1c8bdd87bf 100644 --- a/go.mod +++ b/go.mod @@ -210,7 +210,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/resourceexplorer2 v1.18.1 github.com/aws/aws-sdk-go-v2/service/resourcegroups v1.30.1 github.com/aws/aws-sdk-go-v2/service/resourcegroupstaggingapi v1.27.1 - github.com/aws/aws-sdk-go-v2/service/rolesanywhere v1.18.0 + github.com/aws/aws-sdk-go-v2/service/rolesanywhere v1.18.1 github.com/aws/aws-sdk-go-v2/service/route53 v1.54.0 github.com/aws/aws-sdk-go-v2/service/route53domains v1.30.0 github.com/aws/aws-sdk-go-v2/service/route53profiles v1.6.0 diff --git a/go.sum b/go.sum index 11d4ce7b2f7b..fae0c3c46abd 100644 --- a/go.sum +++ b/go.sum @@ -441,8 +441,8 @@ github.com/aws/aws-sdk-go-v2/service/resourcegroups v1.30.1 h1:KhIp2JHWuSUDXyJK7 github.com/aws/aws-sdk-go-v2/service/resourcegroups v1.30.1/go.mod h1:2zyaohdBXZBnLMMXhx0e3cd63JycCSl+X9YFNHP7gtY= github.com/aws/aws-sdk-go-v2/service/resourcegroupstaggingapi v1.27.1 h1:dGw/U6NbhnWoW2gw+75/AZvnYjFuxYRtzUpxALoRhLc= github.com/aws/aws-sdk-go-v2/service/resourcegroupstaggingapi v1.27.1/go.mod h1:ZNIISn1QONFDUbTmkIK53IBTrGn1TbsrBH5pG/BCwew= -github.com/aws/aws-sdk-go-v2/service/rolesanywhere v1.18.0 h1:2Xg4DSL/wjjFG3uq1qKVIohZ3ToCjNOEdhSIL0xuL9Y= -github.com/aws/aws-sdk-go-v2/service/rolesanywhere v1.18.0/go.mod h1:+YaIHElNSCZDNyAie8PUJ3icWw1lAWHlPze8oV/6NEo= +github.com/aws/aws-sdk-go-v2/service/rolesanywhere v1.18.1 h1:CS6N35VnEJGpPbXUoQEm0LBA/uDpTC/jfrAkkNsbjEo= +github.com/aws/aws-sdk-go-v2/service/rolesanywhere v1.18.1/go.mod h1:tlqfSYOwnjSkzCp1Oc5dT44TX1bvy1SchvixKOXPvTI= github.com/aws/aws-sdk-go-v2/service/route53 v1.54.0 h1:U//4kAneirDM8j96Vbzjf53y+WW42rsgOqJUKtifY3o= github.com/aws/aws-sdk-go-v2/service/route53 v1.54.0/go.mod h1:O3OQTni2n6Es64qG8eOjT7ST3sg40+O3SoPHaw42uHQ= github.com/aws/aws-sdk-go-v2/service/route53domains v1.30.0 h1:YmPhd4lIEpVzES0fb//xZ8Zp77vSFCyVK2N0nnCPQU8= From 10b2ffe9b2181478e27dbe0bf15621fffcb8cd14 Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 09:14:51 -0400 Subject: [PATCH 277/365] go get github.com/aws/aws-sdk-go-v2/service/route53. --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index bb1c8bdd87bf..5ed20c8c0584 100644 --- a/go.mod +++ b/go.mod @@ -211,7 +211,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/resourcegroups v1.30.1 github.com/aws/aws-sdk-go-v2/service/resourcegroupstaggingapi v1.27.1 github.com/aws/aws-sdk-go-v2/service/rolesanywhere v1.18.1 - github.com/aws/aws-sdk-go-v2/service/route53 v1.54.0 + github.com/aws/aws-sdk-go-v2/service/route53 v1.54.1 github.com/aws/aws-sdk-go-v2/service/route53domains v1.30.0 github.com/aws/aws-sdk-go-v2/service/route53profiles v1.6.0 github.com/aws/aws-sdk-go-v2/service/route53recoverycontrolconfig v1.28.0 diff --git a/go.sum b/go.sum index fae0c3c46abd..6b34cd484145 100644 --- a/go.sum +++ b/go.sum @@ -443,8 +443,8 @@ github.com/aws/aws-sdk-go-v2/service/resourcegroupstaggingapi v1.27.1 h1:dGw/U6N github.com/aws/aws-sdk-go-v2/service/resourcegroupstaggingapi v1.27.1/go.mod h1:ZNIISn1QONFDUbTmkIK53IBTrGn1TbsrBH5pG/BCwew= github.com/aws/aws-sdk-go-v2/service/rolesanywhere v1.18.1 h1:CS6N35VnEJGpPbXUoQEm0LBA/uDpTC/jfrAkkNsbjEo= github.com/aws/aws-sdk-go-v2/service/rolesanywhere v1.18.1/go.mod h1:tlqfSYOwnjSkzCp1Oc5dT44TX1bvy1SchvixKOXPvTI= -github.com/aws/aws-sdk-go-v2/service/route53 v1.54.0 h1:U//4kAneirDM8j96Vbzjf53y+WW42rsgOqJUKtifY3o= -github.com/aws/aws-sdk-go-v2/service/route53 v1.54.0/go.mod h1:O3OQTni2n6Es64qG8eOjT7ST3sg40+O3SoPHaw42uHQ= +github.com/aws/aws-sdk-go-v2/service/route53 v1.54.1 h1:DvwcqU6ec5NNCACSSEYKuTg9J3PDFFlngkwV0k7wvaI= +github.com/aws/aws-sdk-go-v2/service/route53 v1.54.1/go.mod h1:POH50FEbIpazXJUVj2hbpJT819o2UF547G+BJBM7HQM= github.com/aws/aws-sdk-go-v2/service/route53domains v1.30.0 h1:YmPhd4lIEpVzES0fb//xZ8Zp77vSFCyVK2N0nnCPQU8= github.com/aws/aws-sdk-go-v2/service/route53domains v1.30.0/go.mod h1:zQLvxxhuX8iqjd/H5b3+OXrJVyhz9lHZdnP3dF+Rm3w= github.com/aws/aws-sdk-go-v2/service/route53profiles v1.6.0 h1:CbNHTbEFYcq/QxQV1tRygdoaaSbhtGkmxUO8l9wqGNc= From 82cbfffeda38a82d73b6defb0b61814f9cc6b226 Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 09:14:53 -0400 Subject: [PATCH 278/365] go get github.com/aws/aws-sdk-go-v2/service/route53domains. --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 5ed20c8c0584..bd69ac066123 100644 --- a/go.mod +++ b/go.mod @@ -212,7 +212,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/resourcegroupstaggingapi v1.27.1 github.com/aws/aws-sdk-go-v2/service/rolesanywhere v1.18.1 github.com/aws/aws-sdk-go-v2/service/route53 v1.54.1 - github.com/aws/aws-sdk-go-v2/service/route53domains v1.30.0 + github.com/aws/aws-sdk-go-v2/service/route53domains v1.30.1 github.com/aws/aws-sdk-go-v2/service/route53profiles v1.6.0 github.com/aws/aws-sdk-go-v2/service/route53recoverycontrolconfig v1.28.0 github.com/aws/aws-sdk-go-v2/service/route53recoveryreadiness v1.23.0 diff --git a/go.sum b/go.sum index 6b34cd484145..e0cf028bef6a 100644 --- a/go.sum +++ b/go.sum @@ -445,8 +445,8 @@ github.com/aws/aws-sdk-go-v2/service/rolesanywhere v1.18.1 h1:CS6N35VnEJGpPbXUoQ github.com/aws/aws-sdk-go-v2/service/rolesanywhere v1.18.1/go.mod h1:tlqfSYOwnjSkzCp1Oc5dT44TX1bvy1SchvixKOXPvTI= github.com/aws/aws-sdk-go-v2/service/route53 v1.54.1 h1:DvwcqU6ec5NNCACSSEYKuTg9J3PDFFlngkwV0k7wvaI= github.com/aws/aws-sdk-go-v2/service/route53 v1.54.1/go.mod h1:POH50FEbIpazXJUVj2hbpJT819o2UF547G+BJBM7HQM= -github.com/aws/aws-sdk-go-v2/service/route53domains v1.30.0 h1:YmPhd4lIEpVzES0fb//xZ8Zp77vSFCyVK2N0nnCPQU8= -github.com/aws/aws-sdk-go-v2/service/route53domains v1.30.0/go.mod h1:zQLvxxhuX8iqjd/H5b3+OXrJVyhz9lHZdnP3dF+Rm3w= +github.com/aws/aws-sdk-go-v2/service/route53domains v1.30.1 h1:+0csOL9MiuIxe57+7TsHl/yzxIT1Jf0ai6qnp1bXGoA= +github.com/aws/aws-sdk-go-v2/service/route53domains v1.30.1/go.mod h1:EbsE1mwREHAclraVgQhu89uyy2oE/C1ETLghnTE7ghs= github.com/aws/aws-sdk-go-v2/service/route53profiles v1.6.0 h1:CbNHTbEFYcq/QxQV1tRygdoaaSbhtGkmxUO8l9wqGNc= github.com/aws/aws-sdk-go-v2/service/route53profiles v1.6.0/go.mod h1:GMRfBw/tiPFdCIYXm+lFEWKZA9BQuL1NFNv3qtFXO5c= github.com/aws/aws-sdk-go-v2/service/route53recoverycontrolconfig v1.28.0 h1:MS+YfLBiqDuTTFJpWcWGC1Cy1BFPrZmEdnRKGeYIwSw= From 464ec8fe0574d5c0c62e8a3e4edde7c2d01a0b68 Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 09:14:54 -0400 Subject: [PATCH 279/365] go get github.com/aws/aws-sdk-go-v2/service/route53profiles. --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index bd69ac066123..4d8da6719857 100644 --- a/go.mod +++ b/go.mod @@ -213,7 +213,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/rolesanywhere v1.18.1 github.com/aws/aws-sdk-go-v2/service/route53 v1.54.1 github.com/aws/aws-sdk-go-v2/service/route53domains v1.30.1 - github.com/aws/aws-sdk-go-v2/service/route53profiles v1.6.0 + github.com/aws/aws-sdk-go-v2/service/route53profiles v1.6.1 github.com/aws/aws-sdk-go-v2/service/route53recoverycontrolconfig v1.28.0 github.com/aws/aws-sdk-go-v2/service/route53recoveryreadiness v1.23.0 github.com/aws/aws-sdk-go-v2/service/route53resolver v1.37.0 diff --git a/go.sum b/go.sum index e0cf028bef6a..11d945261f66 100644 --- a/go.sum +++ b/go.sum @@ -447,8 +447,8 @@ github.com/aws/aws-sdk-go-v2/service/route53 v1.54.1 h1:DvwcqU6ec5NNCACSSEYKuTg9 github.com/aws/aws-sdk-go-v2/service/route53 v1.54.1/go.mod h1:POH50FEbIpazXJUVj2hbpJT819o2UF547G+BJBM7HQM= github.com/aws/aws-sdk-go-v2/service/route53domains v1.30.1 h1:+0csOL9MiuIxe57+7TsHl/yzxIT1Jf0ai6qnp1bXGoA= github.com/aws/aws-sdk-go-v2/service/route53domains v1.30.1/go.mod h1:EbsE1mwREHAclraVgQhu89uyy2oE/C1ETLghnTE7ghs= -github.com/aws/aws-sdk-go-v2/service/route53profiles v1.6.0 h1:CbNHTbEFYcq/QxQV1tRygdoaaSbhtGkmxUO8l9wqGNc= -github.com/aws/aws-sdk-go-v2/service/route53profiles v1.6.0/go.mod h1:GMRfBw/tiPFdCIYXm+lFEWKZA9BQuL1NFNv3qtFXO5c= +github.com/aws/aws-sdk-go-v2/service/route53profiles v1.6.1 h1:OjU8qqebap7OqDkLU0/70sQ3LBxrR+kxzj8b+3aLJ5o= +github.com/aws/aws-sdk-go-v2/service/route53profiles v1.6.1/go.mod h1:iTrcT7Arr04ilWo5huHKWP2Z+j9S5aRyZvuomlckusw= github.com/aws/aws-sdk-go-v2/service/route53recoverycontrolconfig v1.28.0 h1:MS+YfLBiqDuTTFJpWcWGC1Cy1BFPrZmEdnRKGeYIwSw= github.com/aws/aws-sdk-go-v2/service/route53recoverycontrolconfig v1.28.0/go.mod h1:4pzD9Hf8n/5yeqNDM1Bcb/JfCnnchW0gNsE1YuFMLCA= github.com/aws/aws-sdk-go-v2/service/route53recoveryreadiness v1.23.0 h1:sNulW2aXV7h5pUfLNShxMxWDn8bBXEkxrzOWtp1FAbQ= From 3caf9617ae1744a1c88ccc5d27d892bed8cf3b92 Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 09:14:55 -0400 Subject: [PATCH 280/365] go get github.com/aws/aws-sdk-go-v2/service/route53recoverycontrolconfig. --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 4d8da6719857..df9f69c79c50 100644 --- a/go.mod +++ b/go.mod @@ -214,7 +214,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/route53 v1.54.1 github.com/aws/aws-sdk-go-v2/service/route53domains v1.30.1 github.com/aws/aws-sdk-go-v2/service/route53profiles v1.6.1 - github.com/aws/aws-sdk-go-v2/service/route53recoverycontrolconfig v1.28.0 + github.com/aws/aws-sdk-go-v2/service/route53recoverycontrolconfig v1.28.1 github.com/aws/aws-sdk-go-v2/service/route53recoveryreadiness v1.23.0 github.com/aws/aws-sdk-go-v2/service/route53resolver v1.37.0 github.com/aws/aws-sdk-go-v2/service/rum v1.25.0 diff --git a/go.sum b/go.sum index 11d945261f66..503a66660ccc 100644 --- a/go.sum +++ b/go.sum @@ -449,8 +449,8 @@ github.com/aws/aws-sdk-go-v2/service/route53domains v1.30.1 h1:+0csOL9MiuIxe57+7 github.com/aws/aws-sdk-go-v2/service/route53domains v1.30.1/go.mod h1:EbsE1mwREHAclraVgQhu89uyy2oE/C1ETLghnTE7ghs= github.com/aws/aws-sdk-go-v2/service/route53profiles v1.6.1 h1:OjU8qqebap7OqDkLU0/70sQ3LBxrR+kxzj8b+3aLJ5o= github.com/aws/aws-sdk-go-v2/service/route53profiles v1.6.1/go.mod h1:iTrcT7Arr04ilWo5huHKWP2Z+j9S5aRyZvuomlckusw= -github.com/aws/aws-sdk-go-v2/service/route53recoverycontrolconfig v1.28.0 h1:MS+YfLBiqDuTTFJpWcWGC1Cy1BFPrZmEdnRKGeYIwSw= -github.com/aws/aws-sdk-go-v2/service/route53recoverycontrolconfig v1.28.0/go.mod h1:4pzD9Hf8n/5yeqNDM1Bcb/JfCnnchW0gNsE1YuFMLCA= +github.com/aws/aws-sdk-go-v2/service/route53recoverycontrolconfig v1.28.1 h1:P5ZnN/WfxPJ0lD6iZY0TvXKViw2U3m5LIs9pMCOvUH4= +github.com/aws/aws-sdk-go-v2/service/route53recoverycontrolconfig v1.28.1/go.mod h1:Ng+ThDA2vsPOfe5nYvmWHMuCy8d4c1Jty3vLJ29fKF0= github.com/aws/aws-sdk-go-v2/service/route53recoveryreadiness v1.23.0 h1:sNulW2aXV7h5pUfLNShxMxWDn8bBXEkxrzOWtp1FAbQ= github.com/aws/aws-sdk-go-v2/service/route53recoveryreadiness v1.23.0/go.mod h1:8G+IEg/exLH4b2W1a573ZpDCZBtfmeAH2PYD9RgiTeI= github.com/aws/aws-sdk-go-v2/service/route53resolver v1.37.0 h1:5tqCgv4WjDkvz3qAeFqIms2H9wrE/ocLwxvLka1LJF8= From 2d805182d013d39d4efa4e3cc1d9205313b4246a Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 09:14:56 -0400 Subject: [PATCH 281/365] go get github.com/aws/aws-sdk-go-v2/service/route53recoveryreadiness. --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index df9f69c79c50..9e97fc6b7d47 100644 --- a/go.mod +++ b/go.mod @@ -215,7 +215,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/route53domains v1.30.1 github.com/aws/aws-sdk-go-v2/service/route53profiles v1.6.1 github.com/aws/aws-sdk-go-v2/service/route53recoverycontrolconfig v1.28.1 - github.com/aws/aws-sdk-go-v2/service/route53recoveryreadiness v1.23.0 + github.com/aws/aws-sdk-go-v2/service/route53recoveryreadiness v1.23.1 github.com/aws/aws-sdk-go-v2/service/route53resolver v1.37.0 github.com/aws/aws-sdk-go-v2/service/rum v1.25.0 github.com/aws/aws-sdk-go-v2/service/s3 v1.85.1 diff --git a/go.sum b/go.sum index 503a66660ccc..0ab3523ac51f 100644 --- a/go.sum +++ b/go.sum @@ -451,8 +451,8 @@ github.com/aws/aws-sdk-go-v2/service/route53profiles v1.6.1 h1:OjU8qqebap7OqDkLU github.com/aws/aws-sdk-go-v2/service/route53profiles v1.6.1/go.mod h1:iTrcT7Arr04ilWo5huHKWP2Z+j9S5aRyZvuomlckusw= github.com/aws/aws-sdk-go-v2/service/route53recoverycontrolconfig v1.28.1 h1:P5ZnN/WfxPJ0lD6iZY0TvXKViw2U3m5LIs9pMCOvUH4= github.com/aws/aws-sdk-go-v2/service/route53recoverycontrolconfig v1.28.1/go.mod h1:Ng+ThDA2vsPOfe5nYvmWHMuCy8d4c1Jty3vLJ29fKF0= -github.com/aws/aws-sdk-go-v2/service/route53recoveryreadiness v1.23.0 h1:sNulW2aXV7h5pUfLNShxMxWDn8bBXEkxrzOWtp1FAbQ= -github.com/aws/aws-sdk-go-v2/service/route53recoveryreadiness v1.23.0/go.mod h1:8G+IEg/exLH4b2W1a573ZpDCZBtfmeAH2PYD9RgiTeI= +github.com/aws/aws-sdk-go-v2/service/route53recoveryreadiness v1.23.1 h1:AX9S7S7hvb4UJKIgZQ9SJ84LjTF3/fF5SBYjyu9/c6A= +github.com/aws/aws-sdk-go-v2/service/route53recoveryreadiness v1.23.1/go.mod h1:pbDtCWqLwS6CyyTiOpZVRtv+O/Es7VkhhLWbT9zMEas= github.com/aws/aws-sdk-go-v2/service/route53resolver v1.37.0 h1:5tqCgv4WjDkvz3qAeFqIms2H9wrE/ocLwxvLka1LJF8= github.com/aws/aws-sdk-go-v2/service/route53resolver v1.37.0/go.mod h1:vwXr/jIQ351u6+2gOfs8vOlCTpcutKFAnhAjqe6PDwg= github.com/aws/aws-sdk-go-v2/service/rum v1.25.0 h1:B8hNp3Ys1WVs12iwka/EotxOvfqvSapYzEEyCY8qi7Y= From 4428aec2cd3832b18bd766e65498e57e7e589443 Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 09:14:57 -0400 Subject: [PATCH 282/365] go get github.com/aws/aws-sdk-go-v2/service/route53resolver. --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 9e97fc6b7d47..c3760939c524 100644 --- a/go.mod +++ b/go.mod @@ -216,7 +216,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/route53profiles v1.6.1 github.com/aws/aws-sdk-go-v2/service/route53recoverycontrolconfig v1.28.1 github.com/aws/aws-sdk-go-v2/service/route53recoveryreadiness v1.23.1 - github.com/aws/aws-sdk-go-v2/service/route53resolver v1.37.0 + github.com/aws/aws-sdk-go-v2/service/route53resolver v1.37.1 github.com/aws/aws-sdk-go-v2/service/rum v1.25.0 github.com/aws/aws-sdk-go-v2/service/s3 v1.85.1 github.com/aws/aws-sdk-go-v2/service/s3control v1.61.0 diff --git a/go.sum b/go.sum index 0ab3523ac51f..de081143872c 100644 --- a/go.sum +++ b/go.sum @@ -453,8 +453,8 @@ github.com/aws/aws-sdk-go-v2/service/route53recoverycontrolconfig v1.28.1 h1:P5Z github.com/aws/aws-sdk-go-v2/service/route53recoverycontrolconfig v1.28.1/go.mod h1:Ng+ThDA2vsPOfe5nYvmWHMuCy8d4c1Jty3vLJ29fKF0= github.com/aws/aws-sdk-go-v2/service/route53recoveryreadiness v1.23.1 h1:AX9S7S7hvb4UJKIgZQ9SJ84LjTF3/fF5SBYjyu9/c6A= github.com/aws/aws-sdk-go-v2/service/route53recoveryreadiness v1.23.1/go.mod h1:pbDtCWqLwS6CyyTiOpZVRtv+O/Es7VkhhLWbT9zMEas= -github.com/aws/aws-sdk-go-v2/service/route53resolver v1.37.0 h1:5tqCgv4WjDkvz3qAeFqIms2H9wrE/ocLwxvLka1LJF8= -github.com/aws/aws-sdk-go-v2/service/route53resolver v1.37.0/go.mod h1:vwXr/jIQ351u6+2gOfs8vOlCTpcutKFAnhAjqe6PDwg= +github.com/aws/aws-sdk-go-v2/service/route53resolver v1.37.1 h1:mp3ADBMz3nLgY4k9bNUrID8kB8H3WoyNGKTV/TnGs/g= +github.com/aws/aws-sdk-go-v2/service/route53resolver v1.37.1/go.mod h1:nQNdcvkdveeChWT7i/0yD/vFsttMOqK/VbCOcsyx+E4= github.com/aws/aws-sdk-go-v2/service/rum v1.25.0 h1:B8hNp3Ys1WVs12iwka/EotxOvfqvSapYzEEyCY8qi7Y= github.com/aws/aws-sdk-go-v2/service/rum v1.25.0/go.mod h1:wtPsFFOKCW8Wf/VRpe7T1Q59P8JE8bVC7c1wxRZ472I= github.com/aws/aws-sdk-go-v2/service/s3 v1.85.1 h1:Hsqo8+dFxSdDvv9B2PgIx1AJAnDpqgS0znVI+R+MoGY= From 981d4905bc87d35ebb4d0ad9a10b127c4534508d Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 09:14:58 -0400 Subject: [PATCH 283/365] go get github.com/aws/aws-sdk-go-v2/service/rum. --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index c3760939c524..7fc5479de42e 100644 --- a/go.mod +++ b/go.mod @@ -217,7 +217,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/route53recoverycontrolconfig v1.28.1 github.com/aws/aws-sdk-go-v2/service/route53recoveryreadiness v1.23.1 github.com/aws/aws-sdk-go-v2/service/route53resolver v1.37.1 - github.com/aws/aws-sdk-go-v2/service/rum v1.25.0 + github.com/aws/aws-sdk-go-v2/service/rum v1.25.1 github.com/aws/aws-sdk-go-v2/service/s3 v1.85.1 github.com/aws/aws-sdk-go-v2/service/s3control v1.61.0 github.com/aws/aws-sdk-go-v2/service/s3outposts v1.30.0 diff --git a/go.sum b/go.sum index de081143872c..fa72c156facf 100644 --- a/go.sum +++ b/go.sum @@ -455,8 +455,8 @@ github.com/aws/aws-sdk-go-v2/service/route53recoveryreadiness v1.23.1 h1:AX9S7S7 github.com/aws/aws-sdk-go-v2/service/route53recoveryreadiness v1.23.1/go.mod h1:pbDtCWqLwS6CyyTiOpZVRtv+O/Es7VkhhLWbT9zMEas= github.com/aws/aws-sdk-go-v2/service/route53resolver v1.37.1 h1:mp3ADBMz3nLgY4k9bNUrID8kB8H3WoyNGKTV/TnGs/g= github.com/aws/aws-sdk-go-v2/service/route53resolver v1.37.1/go.mod h1:nQNdcvkdveeChWT7i/0yD/vFsttMOqK/VbCOcsyx+E4= -github.com/aws/aws-sdk-go-v2/service/rum v1.25.0 h1:B8hNp3Ys1WVs12iwka/EotxOvfqvSapYzEEyCY8qi7Y= -github.com/aws/aws-sdk-go-v2/service/rum v1.25.0/go.mod h1:wtPsFFOKCW8Wf/VRpe7T1Q59P8JE8bVC7c1wxRZ472I= +github.com/aws/aws-sdk-go-v2/service/rum v1.25.1 h1:IPGVJBSdfbowzlpJ2WamBS6X5bbIG22VjWp961JEkoI= +github.com/aws/aws-sdk-go-v2/service/rum v1.25.1/go.mod h1:bP77oXsN8c23i7o1A46SQmqlmuslx4OmYtX2Ns4p0R8= github.com/aws/aws-sdk-go-v2/service/s3 v1.85.1 h1:Hsqo8+dFxSdDvv9B2PgIx1AJAnDpqgS0znVI+R+MoGY= github.com/aws/aws-sdk-go-v2/service/s3 v1.85.1/go.mod h1:8Q0TAPXD68Z8YqlcIGHs/UNIDHsxErV9H4dl4vJEpgw= github.com/aws/aws-sdk-go-v2/service/s3control v1.61.0 h1:5gpA9ClQPwuZHcGuIp9lkw2F+LyfoJcorfG04SL8JYY= From e8f7ab37abde814a8c0c69a693a67f132028641c Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 09:15:00 -0400 Subject: [PATCH 284/365] go get github.com/aws/aws-sdk-go-v2/service/s3control. --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 7fc5479de42e..aba16ddc9318 100644 --- a/go.mod +++ b/go.mod @@ -219,7 +219,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/route53resolver v1.37.1 github.com/aws/aws-sdk-go-v2/service/rum v1.25.1 github.com/aws/aws-sdk-go-v2/service/s3 v1.85.1 - github.com/aws/aws-sdk-go-v2/service/s3control v1.61.0 + github.com/aws/aws-sdk-go-v2/service/s3control v1.61.1 github.com/aws/aws-sdk-go-v2/service/s3outposts v1.30.0 github.com/aws/aws-sdk-go-v2/service/s3tables v1.7.0 github.com/aws/aws-sdk-go-v2/service/sagemaker v1.203.0 diff --git a/go.sum b/go.sum index fa72c156facf..a6bfd71b232f 100644 --- a/go.sum +++ b/go.sum @@ -459,8 +459,8 @@ github.com/aws/aws-sdk-go-v2/service/rum v1.25.1 h1:IPGVJBSdfbowzlpJ2WamBS6X5bbI github.com/aws/aws-sdk-go-v2/service/rum v1.25.1/go.mod h1:bP77oXsN8c23i7o1A46SQmqlmuslx4OmYtX2Ns4p0R8= github.com/aws/aws-sdk-go-v2/service/s3 v1.85.1 h1:Hsqo8+dFxSdDvv9B2PgIx1AJAnDpqgS0znVI+R+MoGY= github.com/aws/aws-sdk-go-v2/service/s3 v1.85.1/go.mod h1:8Q0TAPXD68Z8YqlcIGHs/UNIDHsxErV9H4dl4vJEpgw= -github.com/aws/aws-sdk-go-v2/service/s3control v1.61.0 h1:5gpA9ClQPwuZHcGuIp9lkw2F+LyfoJcorfG04SL8JYY= -github.com/aws/aws-sdk-go-v2/service/s3control v1.61.0/go.mod h1:M6E4vyo70R7StOxwvCuX1KQA8nSdfCpkTN8af6H7GR8= +github.com/aws/aws-sdk-go-v2/service/s3control v1.61.1 h1:Fu6ZEW0t68B6Tjp/ubiOBa2OCRx2sHnRl1/1ehRU1Hc= +github.com/aws/aws-sdk-go-v2/service/s3control v1.61.1/go.mod h1:E6DME7R1bQBJaH/dIS2070dgcgba97shJWUTWMrTbgM= github.com/aws/aws-sdk-go-v2/service/s3outposts v1.30.0 h1:pluWBDXZV7P2rud08CaqinWRCqvhV1muwuBq+jxOHPw= github.com/aws/aws-sdk-go-v2/service/s3outposts v1.30.0/go.mod h1:wXa8ZTGg/QZxLulyo+MhFTlYxaO8W24Yx1LCWHfnzK4= github.com/aws/aws-sdk-go-v2/service/s3tables v1.7.0 h1:U6h5Cs/8RRInyo3ZKBCbG8KrSrX1nsaguC+hj4qkGKU= From e55cc5d12be6f9e2ac545a06785b40d19506a695 Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 09:15:01 -0400 Subject: [PATCH 285/365] go get github.com/aws/aws-sdk-go-v2/service/s3outposts. --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index aba16ddc9318..4a8ef6fef6f5 100644 --- a/go.mod +++ b/go.mod @@ -220,7 +220,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/rum v1.25.1 github.com/aws/aws-sdk-go-v2/service/s3 v1.85.1 github.com/aws/aws-sdk-go-v2/service/s3control v1.61.1 - github.com/aws/aws-sdk-go-v2/service/s3outposts v1.30.0 + github.com/aws/aws-sdk-go-v2/service/s3outposts v1.30.1 github.com/aws/aws-sdk-go-v2/service/s3tables v1.7.0 github.com/aws/aws-sdk-go-v2/service/sagemaker v1.203.0 github.com/aws/aws-sdk-go-v2/service/scheduler v1.14.0 diff --git a/go.sum b/go.sum index a6bfd71b232f..3977ee49c344 100644 --- a/go.sum +++ b/go.sum @@ -461,8 +461,8 @@ github.com/aws/aws-sdk-go-v2/service/s3 v1.85.1 h1:Hsqo8+dFxSdDvv9B2PgIx1AJAnDpq github.com/aws/aws-sdk-go-v2/service/s3 v1.85.1/go.mod h1:8Q0TAPXD68Z8YqlcIGHs/UNIDHsxErV9H4dl4vJEpgw= github.com/aws/aws-sdk-go-v2/service/s3control v1.61.1 h1:Fu6ZEW0t68B6Tjp/ubiOBa2OCRx2sHnRl1/1ehRU1Hc= github.com/aws/aws-sdk-go-v2/service/s3control v1.61.1/go.mod h1:E6DME7R1bQBJaH/dIS2070dgcgba97shJWUTWMrTbgM= -github.com/aws/aws-sdk-go-v2/service/s3outposts v1.30.0 h1:pluWBDXZV7P2rud08CaqinWRCqvhV1muwuBq+jxOHPw= -github.com/aws/aws-sdk-go-v2/service/s3outposts v1.30.0/go.mod h1:wXa8ZTGg/QZxLulyo+MhFTlYxaO8W24Yx1LCWHfnzK4= +github.com/aws/aws-sdk-go-v2/service/s3outposts v1.30.1 h1:iOFQNXtgNsVQjQLJQTvGC5NsIv43fW07igtoDHEIvKs= +github.com/aws/aws-sdk-go-v2/service/s3outposts v1.30.1/go.mod h1:ANvlkElAoLD7KBmZAXJv+BmB42Ifw8DhKb4eEhmveMA= github.com/aws/aws-sdk-go-v2/service/s3tables v1.7.0 h1:U6h5Cs/8RRInyo3ZKBCbG8KrSrX1nsaguC+hj4qkGKU= github.com/aws/aws-sdk-go-v2/service/s3tables v1.7.0/go.mod h1:fFY/o7JpIV8g09P9tWUi0nKunbOGr6KWEzu+laUrt/4= github.com/aws/aws-sdk-go-v2/service/sagemaker v1.203.0 h1:5siZkkhSlz+3xgZEGBv2wiMZegl/S0QsBt7oURJ6IrE= From 65887caf2e5ca14546fcf9c85a06f0e7cf9fdfdb Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 09:15:02 -0400 Subject: [PATCH 286/365] go get github.com/aws/aws-sdk-go-v2/service/s3tables. --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 4a8ef6fef6f5..ee357775466b 100644 --- a/go.mod +++ b/go.mod @@ -221,7 +221,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/s3 v1.85.1 github.com/aws/aws-sdk-go-v2/service/s3control v1.61.1 github.com/aws/aws-sdk-go-v2/service/s3outposts v1.30.1 - github.com/aws/aws-sdk-go-v2/service/s3tables v1.7.0 + github.com/aws/aws-sdk-go-v2/service/s3tables v1.7.1 github.com/aws/aws-sdk-go-v2/service/sagemaker v1.203.0 github.com/aws/aws-sdk-go-v2/service/scheduler v1.14.0 github.com/aws/aws-sdk-go-v2/service/schemas v1.30.0 diff --git a/go.sum b/go.sum index 3977ee49c344..8d7115d00f0e 100644 --- a/go.sum +++ b/go.sum @@ -463,8 +463,8 @@ github.com/aws/aws-sdk-go-v2/service/s3control v1.61.1 h1:Fu6ZEW0t68B6Tjp/ubiOBa github.com/aws/aws-sdk-go-v2/service/s3control v1.61.1/go.mod h1:E6DME7R1bQBJaH/dIS2070dgcgba97shJWUTWMrTbgM= github.com/aws/aws-sdk-go-v2/service/s3outposts v1.30.1 h1:iOFQNXtgNsVQjQLJQTvGC5NsIv43fW07igtoDHEIvKs= github.com/aws/aws-sdk-go-v2/service/s3outposts v1.30.1/go.mod h1:ANvlkElAoLD7KBmZAXJv+BmB42Ifw8DhKb4eEhmveMA= -github.com/aws/aws-sdk-go-v2/service/s3tables v1.7.0 h1:U6h5Cs/8RRInyo3ZKBCbG8KrSrX1nsaguC+hj4qkGKU= -github.com/aws/aws-sdk-go-v2/service/s3tables v1.7.0/go.mod h1:fFY/o7JpIV8g09P9tWUi0nKunbOGr6KWEzu+laUrt/4= +github.com/aws/aws-sdk-go-v2/service/s3tables v1.7.1 h1:Shyve/4zbd4pdKluYyXtcrBoZ1Olwodu/lbL9Dc6xOo= +github.com/aws/aws-sdk-go-v2/service/s3tables v1.7.1/go.mod h1:7M+LyYRRMZQOXS/7SbLOFKuFPp4+SsqDMmyoxzX8YGU= github.com/aws/aws-sdk-go-v2/service/sagemaker v1.203.0 h1:5siZkkhSlz+3xgZEGBv2wiMZegl/S0QsBt7oURJ6IrE= github.com/aws/aws-sdk-go-v2/service/sagemaker v1.203.0/go.mod h1:39AFpvOndpk/XRw+SCN6v+VzjKyW6iIEGuK5+c+WCHQ= github.com/aws/aws-sdk-go-v2/service/scheduler v1.14.0 h1:IgnShAGL+CbT48yiOiZgh+QGiA8PXN1mqAi0hHcL9kk= From dcc871cc43843217de61e04c868a1da0ed95f2fc Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 09:15:04 -0400 Subject: [PATCH 287/365] go get github.com/aws/aws-sdk-go-v2/service/sagemaker. --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index ee357775466b..304fbae03fa2 100644 --- a/go.mod +++ b/go.mod @@ -222,7 +222,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/s3control v1.61.1 github.com/aws/aws-sdk-go-v2/service/s3outposts v1.30.1 github.com/aws/aws-sdk-go-v2/service/s3tables v1.7.1 - github.com/aws/aws-sdk-go-v2/service/sagemaker v1.203.0 + github.com/aws/aws-sdk-go-v2/service/sagemaker v1.203.1 github.com/aws/aws-sdk-go-v2/service/scheduler v1.14.0 github.com/aws/aws-sdk-go-v2/service/schemas v1.30.0 github.com/aws/aws-sdk-go-v2/service/secretsmanager v1.36.0 diff --git a/go.sum b/go.sum index 8d7115d00f0e..d9e463c98184 100644 --- a/go.sum +++ b/go.sum @@ -465,8 +465,8 @@ github.com/aws/aws-sdk-go-v2/service/s3outposts v1.30.1 h1:iOFQNXtgNsVQjQLJQTvGC github.com/aws/aws-sdk-go-v2/service/s3outposts v1.30.1/go.mod h1:ANvlkElAoLD7KBmZAXJv+BmB42Ifw8DhKb4eEhmveMA= github.com/aws/aws-sdk-go-v2/service/s3tables v1.7.1 h1:Shyve/4zbd4pdKluYyXtcrBoZ1Olwodu/lbL9Dc6xOo= github.com/aws/aws-sdk-go-v2/service/s3tables v1.7.1/go.mod h1:7M+LyYRRMZQOXS/7SbLOFKuFPp4+SsqDMmyoxzX8YGU= -github.com/aws/aws-sdk-go-v2/service/sagemaker v1.203.0 h1:5siZkkhSlz+3xgZEGBv2wiMZegl/S0QsBt7oURJ6IrE= -github.com/aws/aws-sdk-go-v2/service/sagemaker v1.203.0/go.mod h1:39AFpvOndpk/XRw+SCN6v+VzjKyW6iIEGuK5+c+WCHQ= +github.com/aws/aws-sdk-go-v2/service/sagemaker v1.203.1 h1:jjitDItJQ3kdF5Jtkr1JMQ2Miu+X1axdpv+uJmU5eu4= +github.com/aws/aws-sdk-go-v2/service/sagemaker v1.203.1/go.mod h1:VTFTvNY3kYVqdwZBTRSfnqQBBuBGtRjUSOFGIHDy4AI= github.com/aws/aws-sdk-go-v2/service/scheduler v1.14.0 h1:IgnShAGL+CbT48yiOiZgh+QGiA8PXN1mqAi0hHcL9kk= github.com/aws/aws-sdk-go-v2/service/scheduler v1.14.0/go.mod h1:l1Xw9XiQadHfghuM/7vAKduoX7F0djgG8v1Cy4ebRzg= github.com/aws/aws-sdk-go-v2/service/schemas v1.30.0 h1:h4/zdDDNHNvyqUYcs+zNQZG4Sf5oVvlnHBa+np+gWF4= From 0556a07bb5f72e50b9cc599d06aed3497de43de4 Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 09:15:04 -0400 Subject: [PATCH 288/365] go get github.com/aws/aws-sdk-go-v2/service/scheduler. --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 304fbae03fa2..374655ca7ea2 100644 --- a/go.mod +++ b/go.mod @@ -223,7 +223,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/s3outposts v1.30.1 github.com/aws/aws-sdk-go-v2/service/s3tables v1.7.1 github.com/aws/aws-sdk-go-v2/service/sagemaker v1.203.1 - github.com/aws/aws-sdk-go-v2/service/scheduler v1.14.0 + github.com/aws/aws-sdk-go-v2/service/scheduler v1.14.1 github.com/aws/aws-sdk-go-v2/service/schemas v1.30.0 github.com/aws/aws-sdk-go-v2/service/secretsmanager v1.36.0 github.com/aws/aws-sdk-go-v2/service/securityhub v1.59.0 diff --git a/go.sum b/go.sum index d9e463c98184..c63d1281c19a 100644 --- a/go.sum +++ b/go.sum @@ -467,8 +467,8 @@ github.com/aws/aws-sdk-go-v2/service/s3tables v1.7.1 h1:Shyve/4zbd4pdKluYyXtcrBo github.com/aws/aws-sdk-go-v2/service/s3tables v1.7.1/go.mod h1:7M+LyYRRMZQOXS/7SbLOFKuFPp4+SsqDMmyoxzX8YGU= github.com/aws/aws-sdk-go-v2/service/sagemaker v1.203.1 h1:jjitDItJQ3kdF5Jtkr1JMQ2Miu+X1axdpv+uJmU5eu4= github.com/aws/aws-sdk-go-v2/service/sagemaker v1.203.1/go.mod h1:VTFTvNY3kYVqdwZBTRSfnqQBBuBGtRjUSOFGIHDy4AI= -github.com/aws/aws-sdk-go-v2/service/scheduler v1.14.0 h1:IgnShAGL+CbT48yiOiZgh+QGiA8PXN1mqAi0hHcL9kk= -github.com/aws/aws-sdk-go-v2/service/scheduler v1.14.0/go.mod h1:l1Xw9XiQadHfghuM/7vAKduoX7F0djgG8v1Cy4ebRzg= +github.com/aws/aws-sdk-go-v2/service/scheduler v1.14.1 h1:Q2mO7GN5wcU4HVWXLT3Wwu317fiAwkiUoq0QeiqsZBY= +github.com/aws/aws-sdk-go-v2/service/scheduler v1.14.1/go.mod h1:3Fdk8jqhTM6Eivjt0v6HBIMarExmWKnXEaUFhogCVSc= github.com/aws/aws-sdk-go-v2/service/schemas v1.30.0 h1:h4/zdDDNHNvyqUYcs+zNQZG4Sf5oVvlnHBa+np+gWF4= github.com/aws/aws-sdk-go-v2/service/schemas v1.30.0/go.mod h1:Zfi80WTbgVDxHXMSWsMXQhzRZQdIF6wDh0U4K8uIknA= github.com/aws/aws-sdk-go-v2/service/secretsmanager v1.36.0 h1:kDac/4Lmh6ErC8tE8JJ+Z6xiwhcIEpiHEG//7XJuY3M= From 1cc488b05dee16b44725a9171e58cb84ebfed8ee Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 09:15:05 -0400 Subject: [PATCH 289/365] go get github.com/aws/aws-sdk-go-v2/service/schemas. --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 374655ca7ea2..a463c1937448 100644 --- a/go.mod +++ b/go.mod @@ -224,7 +224,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/s3tables v1.7.1 github.com/aws/aws-sdk-go-v2/service/sagemaker v1.203.1 github.com/aws/aws-sdk-go-v2/service/scheduler v1.14.1 - github.com/aws/aws-sdk-go-v2/service/schemas v1.30.0 + github.com/aws/aws-sdk-go-v2/service/schemas v1.30.1 github.com/aws/aws-sdk-go-v2/service/secretsmanager v1.36.0 github.com/aws/aws-sdk-go-v2/service/securityhub v1.59.0 github.com/aws/aws-sdk-go-v2/service/securitylake v1.21.0 diff --git a/go.sum b/go.sum index c63d1281c19a..fc4106cfd5f9 100644 --- a/go.sum +++ b/go.sum @@ -469,8 +469,8 @@ github.com/aws/aws-sdk-go-v2/service/sagemaker v1.203.1 h1:jjitDItJQ3kdF5Jtkr1JM github.com/aws/aws-sdk-go-v2/service/sagemaker v1.203.1/go.mod h1:VTFTvNY3kYVqdwZBTRSfnqQBBuBGtRjUSOFGIHDy4AI= github.com/aws/aws-sdk-go-v2/service/scheduler v1.14.1 h1:Q2mO7GN5wcU4HVWXLT3Wwu317fiAwkiUoq0QeiqsZBY= github.com/aws/aws-sdk-go-v2/service/scheduler v1.14.1/go.mod h1:3Fdk8jqhTM6Eivjt0v6HBIMarExmWKnXEaUFhogCVSc= -github.com/aws/aws-sdk-go-v2/service/schemas v1.30.0 h1:h4/zdDDNHNvyqUYcs+zNQZG4Sf5oVvlnHBa+np+gWF4= -github.com/aws/aws-sdk-go-v2/service/schemas v1.30.0/go.mod h1:Zfi80WTbgVDxHXMSWsMXQhzRZQdIF6wDh0U4K8uIknA= +github.com/aws/aws-sdk-go-v2/service/schemas v1.30.1 h1:AeR1HvScTM6v8FIL5ONZhOKxdiI+QJH2L/RGmg3vTEE= +github.com/aws/aws-sdk-go-v2/service/schemas v1.30.1/go.mod h1:RNx0SkALkXNDSJKm/I1cAMmUfdTKB/KHIq/ddWG6tvg= github.com/aws/aws-sdk-go-v2/service/secretsmanager v1.36.0 h1:kDac/4Lmh6ErC8tE8JJ+Z6xiwhcIEpiHEG//7XJuY3M= github.com/aws/aws-sdk-go-v2/service/secretsmanager v1.36.0/go.mod h1:JWcrmzDG74XgnKxTdbaCPl5q4H4ijv6+XCk4VhHBEUw= github.com/aws/aws-sdk-go-v2/service/securityhub v1.59.0 h1:iBWLXmX75XSzUvWryxeTu1Bkbwslzlyl1PoXFDSWYEc= From 0b282208716238b2a94c2b4db716f48b0055eb56 Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 09:15:06 -0400 Subject: [PATCH 290/365] go get github.com/aws/aws-sdk-go-v2/service/secretsmanager. --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index a463c1937448..861e332bccf7 100644 --- a/go.mod +++ b/go.mod @@ -225,7 +225,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/sagemaker v1.203.1 github.com/aws/aws-sdk-go-v2/service/scheduler v1.14.1 github.com/aws/aws-sdk-go-v2/service/schemas v1.30.1 - github.com/aws/aws-sdk-go-v2/service/secretsmanager v1.36.0 + github.com/aws/aws-sdk-go-v2/service/secretsmanager v1.36.1 github.com/aws/aws-sdk-go-v2/service/securityhub v1.59.0 github.com/aws/aws-sdk-go-v2/service/securitylake v1.21.0 github.com/aws/aws-sdk-go-v2/service/serverlessapplicationrepository v1.26.0 diff --git a/go.sum b/go.sum index fc4106cfd5f9..509ab02884e3 100644 --- a/go.sum +++ b/go.sum @@ -471,8 +471,8 @@ github.com/aws/aws-sdk-go-v2/service/scheduler v1.14.1 h1:Q2mO7GN5wcU4HVWXLT3Wwu github.com/aws/aws-sdk-go-v2/service/scheduler v1.14.1/go.mod h1:3Fdk8jqhTM6Eivjt0v6HBIMarExmWKnXEaUFhogCVSc= github.com/aws/aws-sdk-go-v2/service/schemas v1.30.1 h1:AeR1HvScTM6v8FIL5ONZhOKxdiI+QJH2L/RGmg3vTEE= github.com/aws/aws-sdk-go-v2/service/schemas v1.30.1/go.mod h1:RNx0SkALkXNDSJKm/I1cAMmUfdTKB/KHIq/ddWG6tvg= -github.com/aws/aws-sdk-go-v2/service/secretsmanager v1.36.0 h1:kDac/4Lmh6ErC8tE8JJ+Z6xiwhcIEpiHEG//7XJuY3M= -github.com/aws/aws-sdk-go-v2/service/secretsmanager v1.36.0/go.mod h1:JWcrmzDG74XgnKxTdbaCPl5q4H4ijv6+XCk4VhHBEUw= +github.com/aws/aws-sdk-go-v2/service/secretsmanager v1.36.1 h1:fnOIjzwTVrtVnkRef3Qs+uTr3qYKwXuFom5pqdZERNQ= +github.com/aws/aws-sdk-go-v2/service/secretsmanager v1.36.1/go.mod h1:/19D53IxSX9W8uu5bo0t89oCLncvNP68V1KiRthhLd4= github.com/aws/aws-sdk-go-v2/service/securityhub v1.59.0 h1:iBWLXmX75XSzUvWryxeTu1Bkbwslzlyl1PoXFDSWYEc= github.com/aws/aws-sdk-go-v2/service/securityhub v1.59.0/go.mod h1:aWMqfM32AE1+DkQ3Hl1G5Q7BGex6sdsi56dqFl7zvEk= github.com/aws/aws-sdk-go-v2/service/securitylake v1.21.0 h1:zlOSZdN5UsZYU6VNd8gDwT6bq5fKqXBNwjjc81qslQg= From caf058147e3af83c2e62b51f26e1ce67a62a3640 Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 09:15:07 -0400 Subject: [PATCH 291/365] go get github.com/aws/aws-sdk-go-v2/service/securityhub. --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 861e332bccf7..1870f2433a08 100644 --- a/go.mod +++ b/go.mod @@ -226,7 +226,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/scheduler v1.14.1 github.com/aws/aws-sdk-go-v2/service/schemas v1.30.1 github.com/aws/aws-sdk-go-v2/service/secretsmanager v1.36.1 - github.com/aws/aws-sdk-go-v2/service/securityhub v1.59.0 + github.com/aws/aws-sdk-go-v2/service/securityhub v1.59.1 github.com/aws/aws-sdk-go-v2/service/securitylake v1.21.0 github.com/aws/aws-sdk-go-v2/service/serverlessapplicationrepository v1.26.0 github.com/aws/aws-sdk-go-v2/service/servicecatalog v1.35.0 diff --git a/go.sum b/go.sum index 509ab02884e3..6f5d38999709 100644 --- a/go.sum +++ b/go.sum @@ -473,8 +473,8 @@ github.com/aws/aws-sdk-go-v2/service/schemas v1.30.1 h1:AeR1HvScTM6v8FIL5ONZhOKx github.com/aws/aws-sdk-go-v2/service/schemas v1.30.1/go.mod h1:RNx0SkALkXNDSJKm/I1cAMmUfdTKB/KHIq/ddWG6tvg= github.com/aws/aws-sdk-go-v2/service/secretsmanager v1.36.1 h1:fnOIjzwTVrtVnkRef3Qs+uTr3qYKwXuFom5pqdZERNQ= github.com/aws/aws-sdk-go-v2/service/secretsmanager v1.36.1/go.mod h1:/19D53IxSX9W8uu5bo0t89oCLncvNP68V1KiRthhLd4= -github.com/aws/aws-sdk-go-v2/service/securityhub v1.59.0 h1:iBWLXmX75XSzUvWryxeTu1Bkbwslzlyl1PoXFDSWYEc= -github.com/aws/aws-sdk-go-v2/service/securityhub v1.59.0/go.mod h1:aWMqfM32AE1+DkQ3Hl1G5Q7BGex6sdsi56dqFl7zvEk= +github.com/aws/aws-sdk-go-v2/service/securityhub v1.59.1 h1:q/3LLpo4PcoM2GUTyE1GMiEtDekkuKjtqD9mw6K+g2s= +github.com/aws/aws-sdk-go-v2/service/securityhub v1.59.1/go.mod h1:vZ92NituujfniQ/4SuNBn87qTvD2mNreUhaR3Kscm8U= github.com/aws/aws-sdk-go-v2/service/securitylake v1.21.0 h1:zlOSZdN5UsZYU6VNd8gDwT6bq5fKqXBNwjjc81qslQg= github.com/aws/aws-sdk-go-v2/service/securitylake v1.21.0/go.mod h1:Ivs5nTSoHtZxXASSGgGcRCmignPo+lDIaIqANG5M5rA= github.com/aws/aws-sdk-go-v2/service/serverlessapplicationrepository v1.26.0 h1:hK3aneCAjV1cXykY43xfLKOlr1vbiSud4GhPO70wGIk= From f9d04c5b07687596b3ec249166bae37db7071a4b Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 09:15:08 -0400 Subject: [PATCH 292/365] go get github.com/aws/aws-sdk-go-v2/service/securitylake. --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 1870f2433a08..f4c7ce461dfe 100644 --- a/go.mod +++ b/go.mod @@ -227,7 +227,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/schemas v1.30.1 github.com/aws/aws-sdk-go-v2/service/secretsmanager v1.36.1 github.com/aws/aws-sdk-go-v2/service/securityhub v1.59.1 - github.com/aws/aws-sdk-go-v2/service/securitylake v1.21.0 + github.com/aws/aws-sdk-go-v2/service/securitylake v1.21.1 github.com/aws/aws-sdk-go-v2/service/serverlessapplicationrepository v1.26.0 github.com/aws/aws-sdk-go-v2/service/servicecatalog v1.35.0 github.com/aws/aws-sdk-go-v2/service/servicecatalogappregistry v1.32.0 diff --git a/go.sum b/go.sum index 6f5d38999709..2a225c5ff646 100644 --- a/go.sum +++ b/go.sum @@ -475,8 +475,8 @@ github.com/aws/aws-sdk-go-v2/service/secretsmanager v1.36.1 h1:fnOIjzwTVrtVnkRef github.com/aws/aws-sdk-go-v2/service/secretsmanager v1.36.1/go.mod h1:/19D53IxSX9W8uu5bo0t89oCLncvNP68V1KiRthhLd4= github.com/aws/aws-sdk-go-v2/service/securityhub v1.59.1 h1:q/3LLpo4PcoM2GUTyE1GMiEtDekkuKjtqD9mw6K+g2s= github.com/aws/aws-sdk-go-v2/service/securityhub v1.59.1/go.mod h1:vZ92NituujfniQ/4SuNBn87qTvD2mNreUhaR3Kscm8U= -github.com/aws/aws-sdk-go-v2/service/securitylake v1.21.0 h1:zlOSZdN5UsZYU6VNd8gDwT6bq5fKqXBNwjjc81qslQg= -github.com/aws/aws-sdk-go-v2/service/securitylake v1.21.0/go.mod h1:Ivs5nTSoHtZxXASSGgGcRCmignPo+lDIaIqANG5M5rA= +github.com/aws/aws-sdk-go-v2/service/securitylake v1.21.1 h1:/RKW3AGx4P4zBoiBevP9omqR4nawRTFcIaSX27l4fDE= +github.com/aws/aws-sdk-go-v2/service/securitylake v1.21.1/go.mod h1:NamZRs6fW0/J8Di0CqJXRwbB58f4xVPNTfohMxi5lB0= github.com/aws/aws-sdk-go-v2/service/serverlessapplicationrepository v1.26.0 h1:hK3aneCAjV1cXykY43xfLKOlr1vbiSud4GhPO70wGIk= github.com/aws/aws-sdk-go-v2/service/serverlessapplicationrepository v1.26.0/go.mod h1:Te5pszE4oQtguiWSvpaBHeDgmmakG8KnX1qGeHephac= github.com/aws/aws-sdk-go-v2/service/servicecatalog v1.35.0 h1:r21Dg9on5ij6OU/5UdsM5LbdoSd8rviM6Ku9Kv6SWjg= From 2c91351ee5d7ec71cdbd0ca5b2e7dbb14445ab92 Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 09:15:09 -0400 Subject: [PATCH 293/365] go get github.com/aws/aws-sdk-go-v2/service/serverlessapplicationrepository. --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index f4c7ce461dfe..ee51ec89a371 100644 --- a/go.mod +++ b/go.mod @@ -228,7 +228,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/secretsmanager v1.36.1 github.com/aws/aws-sdk-go-v2/service/securityhub v1.59.1 github.com/aws/aws-sdk-go-v2/service/securitylake v1.21.1 - github.com/aws/aws-sdk-go-v2/service/serverlessapplicationrepository v1.26.0 + github.com/aws/aws-sdk-go-v2/service/serverlessapplicationrepository v1.26.1 github.com/aws/aws-sdk-go-v2/service/servicecatalog v1.35.0 github.com/aws/aws-sdk-go-v2/service/servicecatalogappregistry v1.32.0 github.com/aws/aws-sdk-go-v2/service/servicediscovery v1.36.0 diff --git a/go.sum b/go.sum index 2a225c5ff646..f1de84bd0187 100644 --- a/go.sum +++ b/go.sum @@ -477,8 +477,8 @@ github.com/aws/aws-sdk-go-v2/service/securityhub v1.59.1 h1:q/3LLpo4PcoM2GUTyE1G github.com/aws/aws-sdk-go-v2/service/securityhub v1.59.1/go.mod h1:vZ92NituujfniQ/4SuNBn87qTvD2mNreUhaR3Kscm8U= github.com/aws/aws-sdk-go-v2/service/securitylake v1.21.1 h1:/RKW3AGx4P4zBoiBevP9omqR4nawRTFcIaSX27l4fDE= github.com/aws/aws-sdk-go-v2/service/securitylake v1.21.1/go.mod h1:NamZRs6fW0/J8Di0CqJXRwbB58f4xVPNTfohMxi5lB0= -github.com/aws/aws-sdk-go-v2/service/serverlessapplicationrepository v1.26.0 h1:hK3aneCAjV1cXykY43xfLKOlr1vbiSud4GhPO70wGIk= -github.com/aws/aws-sdk-go-v2/service/serverlessapplicationrepository v1.26.0/go.mod h1:Te5pszE4oQtguiWSvpaBHeDgmmakG8KnX1qGeHephac= +github.com/aws/aws-sdk-go-v2/service/serverlessapplicationrepository v1.26.1 h1:G00kAq1ULynJ5Sl4yBoa+7CKd35YVJj4nLMl8s0OXsM= +github.com/aws/aws-sdk-go-v2/service/serverlessapplicationrepository v1.26.1/go.mod h1:l21Hlsg40fSBVz2QqhI1+w0iSmJ8j35V6pxsp+4rne4= github.com/aws/aws-sdk-go-v2/service/servicecatalog v1.35.0 h1:r21Dg9on5ij6OU/5UdsM5LbdoSd8rviM6Ku9Kv6SWjg= github.com/aws/aws-sdk-go-v2/service/servicecatalog v1.35.0/go.mod h1:TPIQ8jwqJtuNnP1+k3iLcF5BmTReF2ozNndMqLhOOac= github.com/aws/aws-sdk-go-v2/service/servicecatalogappregistry v1.32.0 h1:WsAFwFxvDmRYofwmAsbVrxWBojLF3c8x476pUCy2Teg= From b0b0d76b17c8041a1d9bde2d5b509afbbb46c800 Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 09:15:10 -0400 Subject: [PATCH 294/365] go get github.com/aws/aws-sdk-go-v2/service/servicecatalog. --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index ee51ec89a371..113c9ad9dab8 100644 --- a/go.mod +++ b/go.mod @@ -229,7 +229,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/securityhub v1.59.1 github.com/aws/aws-sdk-go-v2/service/securitylake v1.21.1 github.com/aws/aws-sdk-go-v2/service/serverlessapplicationrepository v1.26.1 - github.com/aws/aws-sdk-go-v2/service/servicecatalog v1.35.0 + github.com/aws/aws-sdk-go-v2/service/servicecatalog v1.35.1 github.com/aws/aws-sdk-go-v2/service/servicecatalogappregistry v1.32.0 github.com/aws/aws-sdk-go-v2/service/servicediscovery v1.36.0 github.com/aws/aws-sdk-go-v2/service/servicequotas v1.29.0 diff --git a/go.sum b/go.sum index f1de84bd0187..8e635724cc7d 100644 --- a/go.sum +++ b/go.sum @@ -479,8 +479,8 @@ github.com/aws/aws-sdk-go-v2/service/securitylake v1.21.1 h1:/RKW3AGx4P4zBoiBevP github.com/aws/aws-sdk-go-v2/service/securitylake v1.21.1/go.mod h1:NamZRs6fW0/J8Di0CqJXRwbB58f4xVPNTfohMxi5lB0= github.com/aws/aws-sdk-go-v2/service/serverlessapplicationrepository v1.26.1 h1:G00kAq1ULynJ5Sl4yBoa+7CKd35YVJj4nLMl8s0OXsM= github.com/aws/aws-sdk-go-v2/service/serverlessapplicationrepository v1.26.1/go.mod h1:l21Hlsg40fSBVz2QqhI1+w0iSmJ8j35V6pxsp+4rne4= -github.com/aws/aws-sdk-go-v2/service/servicecatalog v1.35.0 h1:r21Dg9on5ij6OU/5UdsM5LbdoSd8rviM6Ku9Kv6SWjg= -github.com/aws/aws-sdk-go-v2/service/servicecatalog v1.35.0/go.mod h1:TPIQ8jwqJtuNnP1+k3iLcF5BmTReF2ozNndMqLhOOac= +github.com/aws/aws-sdk-go-v2/service/servicecatalog v1.35.1 h1:YnjdZk67nAaojegCz1QfvCjW6KxXRDbs3nONIaKd7R0= +github.com/aws/aws-sdk-go-v2/service/servicecatalog v1.35.1/go.mod h1:ErWa3lU2aQKBwkdbwpccUW2nodv+S1Fn/R4bU7Rc18g= github.com/aws/aws-sdk-go-v2/service/servicecatalogappregistry v1.32.0 h1:WsAFwFxvDmRYofwmAsbVrxWBojLF3c8x476pUCy2Teg= github.com/aws/aws-sdk-go-v2/service/servicecatalogappregistry v1.32.0/go.mod h1:U7rell0g8Vuh7fral0C64slZUS1JjTh7Y3nNh1dcPmQ= github.com/aws/aws-sdk-go-v2/service/servicediscovery v1.36.0 h1:5FSPQZwZnU78yU1LFZ2v9hx5xxqlQCJL9FPX74bXvtY= From 3da576c9a9e988f1656578b20be6d24caab303de Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 09:15:11 -0400 Subject: [PATCH 295/365] go get github.com/aws/aws-sdk-go-v2/service/servicecatalogappregistry. --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 113c9ad9dab8..80c58a994ad1 100644 --- a/go.mod +++ b/go.mod @@ -230,7 +230,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/securitylake v1.21.1 github.com/aws/aws-sdk-go-v2/service/serverlessapplicationrepository v1.26.1 github.com/aws/aws-sdk-go-v2/service/servicecatalog v1.35.1 - github.com/aws/aws-sdk-go-v2/service/servicecatalogappregistry v1.32.0 + github.com/aws/aws-sdk-go-v2/service/servicecatalogappregistry v1.32.1 github.com/aws/aws-sdk-go-v2/service/servicediscovery v1.36.0 github.com/aws/aws-sdk-go-v2/service/servicequotas v1.29.0 github.com/aws/aws-sdk-go-v2/service/ses v1.31.0 diff --git a/go.sum b/go.sum index 8e635724cc7d..673e0624cfcb 100644 --- a/go.sum +++ b/go.sum @@ -481,8 +481,8 @@ github.com/aws/aws-sdk-go-v2/service/serverlessapplicationrepository v1.26.1 h1: github.com/aws/aws-sdk-go-v2/service/serverlessapplicationrepository v1.26.1/go.mod h1:l21Hlsg40fSBVz2QqhI1+w0iSmJ8j35V6pxsp+4rne4= github.com/aws/aws-sdk-go-v2/service/servicecatalog v1.35.1 h1:YnjdZk67nAaojegCz1QfvCjW6KxXRDbs3nONIaKd7R0= github.com/aws/aws-sdk-go-v2/service/servicecatalog v1.35.1/go.mod h1:ErWa3lU2aQKBwkdbwpccUW2nodv+S1Fn/R4bU7Rc18g= -github.com/aws/aws-sdk-go-v2/service/servicecatalogappregistry v1.32.0 h1:WsAFwFxvDmRYofwmAsbVrxWBojLF3c8x476pUCy2Teg= -github.com/aws/aws-sdk-go-v2/service/servicecatalogappregistry v1.32.0/go.mod h1:U7rell0g8Vuh7fral0C64slZUS1JjTh7Y3nNh1dcPmQ= +github.com/aws/aws-sdk-go-v2/service/servicecatalogappregistry v1.32.1 h1:bqfWM2gefpr4FOCZrEuKxV9LQdxKkmFBSxyAbeDoBj8= +github.com/aws/aws-sdk-go-v2/service/servicecatalogappregistry v1.32.1/go.mod h1:TQJFC/xYbI6XAHE3Wz8GV63G0hEjlZzqtSCD/+DcjFg= github.com/aws/aws-sdk-go-v2/service/servicediscovery v1.36.0 h1:5FSPQZwZnU78yU1LFZ2v9hx5xxqlQCJL9FPX74bXvtY= github.com/aws/aws-sdk-go-v2/service/servicediscovery v1.36.0/go.mod h1:MppZj1d92oElxaKtuaKqmp6AG3YcrDpnChkBQxYv8tI= github.com/aws/aws-sdk-go-v2/service/servicequotas v1.29.0 h1:n5zIWwfkbRAGOZSXe6IcarzS8p6oT4jhx49qqpNeA04= From 8f221021ef07db76882244ef05fb451172436ef3 Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 09:15:13 -0400 Subject: [PATCH 296/365] go get github.com/aws/aws-sdk-go-v2/service/servicediscovery. --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 80c58a994ad1..e16720d370c4 100644 --- a/go.mod +++ b/go.mod @@ -231,7 +231,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/serverlessapplicationrepository v1.26.1 github.com/aws/aws-sdk-go-v2/service/servicecatalog v1.35.1 github.com/aws/aws-sdk-go-v2/service/servicecatalogappregistry v1.32.1 - github.com/aws/aws-sdk-go-v2/service/servicediscovery v1.36.0 + github.com/aws/aws-sdk-go-v2/service/servicediscovery v1.36.1 github.com/aws/aws-sdk-go-v2/service/servicequotas v1.29.0 github.com/aws/aws-sdk-go-v2/service/ses v1.31.0 github.com/aws/aws-sdk-go-v2/service/sesv2 v1.48.0 diff --git a/go.sum b/go.sum index 673e0624cfcb..0d0988c0e80e 100644 --- a/go.sum +++ b/go.sum @@ -483,8 +483,8 @@ github.com/aws/aws-sdk-go-v2/service/servicecatalog v1.35.1 h1:YnjdZk67nAaojegCz github.com/aws/aws-sdk-go-v2/service/servicecatalog v1.35.1/go.mod h1:ErWa3lU2aQKBwkdbwpccUW2nodv+S1Fn/R4bU7Rc18g= github.com/aws/aws-sdk-go-v2/service/servicecatalogappregistry v1.32.1 h1:bqfWM2gefpr4FOCZrEuKxV9LQdxKkmFBSxyAbeDoBj8= github.com/aws/aws-sdk-go-v2/service/servicecatalogappregistry v1.32.1/go.mod h1:TQJFC/xYbI6XAHE3Wz8GV63G0hEjlZzqtSCD/+DcjFg= -github.com/aws/aws-sdk-go-v2/service/servicediscovery v1.36.0 h1:5FSPQZwZnU78yU1LFZ2v9hx5xxqlQCJL9FPX74bXvtY= -github.com/aws/aws-sdk-go-v2/service/servicediscovery v1.36.0/go.mod h1:MppZj1d92oElxaKtuaKqmp6AG3YcrDpnChkBQxYv8tI= +github.com/aws/aws-sdk-go-v2/service/servicediscovery v1.36.1 h1:EqupyVMtt84ZljchBzq+X+pPwuYhUT7dzfBoDqC0DB4= +github.com/aws/aws-sdk-go-v2/service/servicediscovery v1.36.1/go.mod h1:HrkmhW8FU7GObElHC6Lm3sosolbig21w00VOm77Vsss= github.com/aws/aws-sdk-go-v2/service/servicequotas v1.29.0 h1:n5zIWwfkbRAGOZSXe6IcarzS8p6oT4jhx49qqpNeA04= github.com/aws/aws-sdk-go-v2/service/servicequotas v1.29.0/go.mod h1:IZwmZ3r5PW29Mn5xeI6e5yDVE1sCtNZmi5LrI0Nzfgs= github.com/aws/aws-sdk-go-v2/service/ses v1.31.0 h1:QL0j3NDlU0y6GcIiQGZ1fLmdycX046GuPjAApl5XtMA= From ea497b3af641e6191bee08958d970a6dcbacb2da Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 09:15:14 -0400 Subject: [PATCH 297/365] go get github.com/aws/aws-sdk-go-v2/service/servicequotas. --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index e16720d370c4..52b75986dc5e 100644 --- a/go.mod +++ b/go.mod @@ -232,7 +232,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/servicecatalog v1.35.1 github.com/aws/aws-sdk-go-v2/service/servicecatalogappregistry v1.32.1 github.com/aws/aws-sdk-go-v2/service/servicediscovery v1.36.1 - github.com/aws/aws-sdk-go-v2/service/servicequotas v1.29.0 + github.com/aws/aws-sdk-go-v2/service/servicequotas v1.29.1 github.com/aws/aws-sdk-go-v2/service/ses v1.31.0 github.com/aws/aws-sdk-go-v2/service/sesv2 v1.48.0 github.com/aws/aws-sdk-go-v2/service/sfn v1.36.0 diff --git a/go.sum b/go.sum index 0d0988c0e80e..4445303b1ab9 100644 --- a/go.sum +++ b/go.sum @@ -485,8 +485,8 @@ github.com/aws/aws-sdk-go-v2/service/servicecatalogappregistry v1.32.1 h1:bqfWM2 github.com/aws/aws-sdk-go-v2/service/servicecatalogappregistry v1.32.1/go.mod h1:TQJFC/xYbI6XAHE3Wz8GV63G0hEjlZzqtSCD/+DcjFg= github.com/aws/aws-sdk-go-v2/service/servicediscovery v1.36.1 h1:EqupyVMtt84ZljchBzq+X+pPwuYhUT7dzfBoDqC0DB4= github.com/aws/aws-sdk-go-v2/service/servicediscovery v1.36.1/go.mod h1:HrkmhW8FU7GObElHC6Lm3sosolbig21w00VOm77Vsss= -github.com/aws/aws-sdk-go-v2/service/servicequotas v1.29.0 h1:n5zIWwfkbRAGOZSXe6IcarzS8p6oT4jhx49qqpNeA04= -github.com/aws/aws-sdk-go-v2/service/servicequotas v1.29.0/go.mod h1:IZwmZ3r5PW29Mn5xeI6e5yDVE1sCtNZmi5LrI0Nzfgs= +github.com/aws/aws-sdk-go-v2/service/servicequotas v1.29.1 h1:woOK9lW27mtpdERfmnV9DFdNmYBKZv0W+DbSMB7c8DI= +github.com/aws/aws-sdk-go-v2/service/servicequotas v1.29.1/go.mod h1:Bfj6o/QIVdpFkd95vGIY3fTEaTJZpu0vks/D8VKwLnU= github.com/aws/aws-sdk-go-v2/service/ses v1.31.0 h1:QL0j3NDlU0y6GcIiQGZ1fLmdycX046GuPjAApl5XtMA= github.com/aws/aws-sdk-go-v2/service/ses v1.31.0/go.mod h1:cTzJKF+z4rdBv2oYyY33ftekIRP+ql8MoCJIPu2qWyw= github.com/aws/aws-sdk-go-v2/service/sesv2 v1.48.0 h1:e2r7d8sq9t/A7izZdlZuif2wSbVOAsqJq9qz+RLz8to= From 400196fb0e15078c8a17d2e23d25e6005b446dbb Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 09:15:15 -0400 Subject: [PATCH 298/365] go get github.com/aws/aws-sdk-go-v2/service/ses. --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 52b75986dc5e..ec68d5909a92 100644 --- a/go.mod +++ b/go.mod @@ -233,7 +233,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/servicecatalogappregistry v1.32.1 github.com/aws/aws-sdk-go-v2/service/servicediscovery v1.36.1 github.com/aws/aws-sdk-go-v2/service/servicequotas v1.29.1 - github.com/aws/aws-sdk-go-v2/service/ses v1.31.0 + github.com/aws/aws-sdk-go-v2/service/ses v1.31.1 github.com/aws/aws-sdk-go-v2/service/sesv2 v1.48.0 github.com/aws/aws-sdk-go-v2/service/sfn v1.36.0 github.com/aws/aws-sdk-go-v2/service/shield v1.31.0 diff --git a/go.sum b/go.sum index 4445303b1ab9..09cdfbce67cc 100644 --- a/go.sum +++ b/go.sum @@ -487,8 +487,8 @@ github.com/aws/aws-sdk-go-v2/service/servicediscovery v1.36.1 h1:EqupyVMtt84Zljc github.com/aws/aws-sdk-go-v2/service/servicediscovery v1.36.1/go.mod h1:HrkmhW8FU7GObElHC6Lm3sosolbig21w00VOm77Vsss= github.com/aws/aws-sdk-go-v2/service/servicequotas v1.29.1 h1:woOK9lW27mtpdERfmnV9DFdNmYBKZv0W+DbSMB7c8DI= github.com/aws/aws-sdk-go-v2/service/servicequotas v1.29.1/go.mod h1:Bfj6o/QIVdpFkd95vGIY3fTEaTJZpu0vks/D8VKwLnU= -github.com/aws/aws-sdk-go-v2/service/ses v1.31.0 h1:QL0j3NDlU0y6GcIiQGZ1fLmdycX046GuPjAApl5XtMA= -github.com/aws/aws-sdk-go-v2/service/ses v1.31.0/go.mod h1:cTzJKF+z4rdBv2oYyY33ftekIRP+ql8MoCJIPu2qWyw= +github.com/aws/aws-sdk-go-v2/service/ses v1.31.1 h1:hi11Ld0VefrexMU5GL7/hNKzm6eplrSF4A3xe0S0M0U= +github.com/aws/aws-sdk-go-v2/service/ses v1.31.1/go.mod h1:YEsycIZqO487LztPmM2Q1U/g0ynw7Zj7zSD4Jt79SDY= github.com/aws/aws-sdk-go-v2/service/sesv2 v1.48.0 h1:e2r7d8sq9t/A7izZdlZuif2wSbVOAsqJq9qz+RLz8to= github.com/aws/aws-sdk-go-v2/service/sesv2 v1.48.0/go.mod h1:Ovv7uw9l/lfTJBbXWXrCZ8R6NbK01VlgoC0+HnTPRwg= github.com/aws/aws-sdk-go-v2/service/sfn v1.36.0 h1:fgw5oZ1lwculHXdldWwlCZVM+6LG78bnChrseYo4IUw= From fe846cca018a2cb5083994fc48339b6286bb8981 Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 09:15:16 -0400 Subject: [PATCH 299/365] go get github.com/aws/aws-sdk-go-v2/service/sesv2. --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index ec68d5909a92..d06f03fad393 100644 --- a/go.mod +++ b/go.mod @@ -234,7 +234,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/servicediscovery v1.36.1 github.com/aws/aws-sdk-go-v2/service/servicequotas v1.29.1 github.com/aws/aws-sdk-go-v2/service/ses v1.31.1 - github.com/aws/aws-sdk-go-v2/service/sesv2 v1.48.0 + github.com/aws/aws-sdk-go-v2/service/sesv2 v1.48.1 github.com/aws/aws-sdk-go-v2/service/sfn v1.36.0 github.com/aws/aws-sdk-go-v2/service/shield v1.31.0 github.com/aws/aws-sdk-go-v2/service/signer v1.28.0 diff --git a/go.sum b/go.sum index 09cdfbce67cc..1d4af39f4e90 100644 --- a/go.sum +++ b/go.sum @@ -489,8 +489,8 @@ github.com/aws/aws-sdk-go-v2/service/servicequotas v1.29.1 h1:woOK9lW27mtpdERfmn github.com/aws/aws-sdk-go-v2/service/servicequotas v1.29.1/go.mod h1:Bfj6o/QIVdpFkd95vGIY3fTEaTJZpu0vks/D8VKwLnU= github.com/aws/aws-sdk-go-v2/service/ses v1.31.1 h1:hi11Ld0VefrexMU5GL7/hNKzm6eplrSF4A3xe0S0M0U= github.com/aws/aws-sdk-go-v2/service/ses v1.31.1/go.mod h1:YEsycIZqO487LztPmM2Q1U/g0ynw7Zj7zSD4Jt79SDY= -github.com/aws/aws-sdk-go-v2/service/sesv2 v1.48.0 h1:e2r7d8sq9t/A7izZdlZuif2wSbVOAsqJq9qz+RLz8to= -github.com/aws/aws-sdk-go-v2/service/sesv2 v1.48.0/go.mod h1:Ovv7uw9l/lfTJBbXWXrCZ8R6NbK01VlgoC0+HnTPRwg= +github.com/aws/aws-sdk-go-v2/service/sesv2 v1.48.1 h1:IxgjwuZ/AGKFFYU6yYT8rZAysL/4oSPEwtfUgQChv+w= +github.com/aws/aws-sdk-go-v2/service/sesv2 v1.48.1/go.mod h1:GvobvR4QPd7vuWZIyvKyRUddjjSKkUHqYa8aBfpIKh4= github.com/aws/aws-sdk-go-v2/service/sfn v1.36.0 h1:fgw5oZ1lwculHXdldWwlCZVM+6LG78bnChrseYo4IUw= github.com/aws/aws-sdk-go-v2/service/sfn v1.36.0/go.mod h1:gjegO53PBn/Uu7OHV1Cw0tmJXkjMVNHQJnpMzXsgddc= github.com/aws/aws-sdk-go-v2/service/shield v1.31.0 h1:xiyt8GY9yqSFhyAfpuUTKmsMAzrVFE+I0JcNjcj/neE= From 37e0d4b6d87996614ae469656e98033e4eaf0e8c Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 09:15:17 -0400 Subject: [PATCH 300/365] go get github.com/aws/aws-sdk-go-v2/service/sfn. --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index d06f03fad393..f921cf72e93c 100644 --- a/go.mod +++ b/go.mod @@ -235,7 +235,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/servicequotas v1.29.1 github.com/aws/aws-sdk-go-v2/service/ses v1.31.1 github.com/aws/aws-sdk-go-v2/service/sesv2 v1.48.1 - github.com/aws/aws-sdk-go-v2/service/sfn v1.36.0 + github.com/aws/aws-sdk-go-v2/service/sfn v1.36.1 github.com/aws/aws-sdk-go-v2/service/shield v1.31.0 github.com/aws/aws-sdk-go-v2/service/signer v1.28.0 github.com/aws/aws-sdk-go-v2/service/sns v1.35.0 diff --git a/go.sum b/go.sum index 1d4af39f4e90..9131b4b4bb9a 100644 --- a/go.sum +++ b/go.sum @@ -491,8 +491,8 @@ github.com/aws/aws-sdk-go-v2/service/ses v1.31.1 h1:hi11Ld0VefrexMU5GL7/hNKzm6ep github.com/aws/aws-sdk-go-v2/service/ses v1.31.1/go.mod h1:YEsycIZqO487LztPmM2Q1U/g0ynw7Zj7zSD4Jt79SDY= github.com/aws/aws-sdk-go-v2/service/sesv2 v1.48.1 h1:IxgjwuZ/AGKFFYU6yYT8rZAysL/4oSPEwtfUgQChv+w= github.com/aws/aws-sdk-go-v2/service/sesv2 v1.48.1/go.mod h1:GvobvR4QPd7vuWZIyvKyRUddjjSKkUHqYa8aBfpIKh4= -github.com/aws/aws-sdk-go-v2/service/sfn v1.36.0 h1:fgw5oZ1lwculHXdldWwlCZVM+6LG78bnChrseYo4IUw= -github.com/aws/aws-sdk-go-v2/service/sfn v1.36.0/go.mod h1:gjegO53PBn/Uu7OHV1Cw0tmJXkjMVNHQJnpMzXsgddc= +github.com/aws/aws-sdk-go-v2/service/sfn v1.36.1 h1:VEOUJkplqcaFW+Z3ZOFSWSVsmXVs10SFxb3Y6IGX+bc= +github.com/aws/aws-sdk-go-v2/service/sfn v1.36.1/go.mod h1:bwaYtZOogLKo3c/rpHpBQe7vnoieV5rQn+nQ52HFaz8= github.com/aws/aws-sdk-go-v2/service/shield v1.31.0 h1:xiyt8GY9yqSFhyAfpuUTKmsMAzrVFE+I0JcNjcj/neE= github.com/aws/aws-sdk-go-v2/service/shield v1.31.0/go.mod h1:7dWLpEpp3W2qgWEBi053m1jVfkWJFhbPCEt5JAGKBW8= github.com/aws/aws-sdk-go-v2/service/signer v1.28.0 h1:CJ5PBq3ZNBfAaSVXL/zghZ0rkZ2Am5s2ASCjr3ZLLT8= From 174b76995180858ceaab4a2a0e07eb886fa44c79 Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 09:15:18 -0400 Subject: [PATCH 301/365] go get github.com/aws/aws-sdk-go-v2/service/shield. --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index f921cf72e93c..8cde0f78c1fb 100644 --- a/go.mod +++ b/go.mod @@ -236,7 +236,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/ses v1.31.1 github.com/aws/aws-sdk-go-v2/service/sesv2 v1.48.1 github.com/aws/aws-sdk-go-v2/service/sfn v1.36.1 - github.com/aws/aws-sdk-go-v2/service/shield v1.31.0 + github.com/aws/aws-sdk-go-v2/service/shield v1.31.1 github.com/aws/aws-sdk-go-v2/service/signer v1.28.0 github.com/aws/aws-sdk-go-v2/service/sns v1.35.0 github.com/aws/aws-sdk-go-v2/service/sqs v1.39.0 diff --git a/go.sum b/go.sum index 9131b4b4bb9a..aaf7d88df381 100644 --- a/go.sum +++ b/go.sum @@ -493,8 +493,8 @@ github.com/aws/aws-sdk-go-v2/service/sesv2 v1.48.1 h1:IxgjwuZ/AGKFFYU6yYT8rZAysL github.com/aws/aws-sdk-go-v2/service/sesv2 v1.48.1/go.mod h1:GvobvR4QPd7vuWZIyvKyRUddjjSKkUHqYa8aBfpIKh4= github.com/aws/aws-sdk-go-v2/service/sfn v1.36.1 h1:VEOUJkplqcaFW+Z3ZOFSWSVsmXVs10SFxb3Y6IGX+bc= github.com/aws/aws-sdk-go-v2/service/sfn v1.36.1/go.mod h1:bwaYtZOogLKo3c/rpHpBQe7vnoieV5rQn+nQ52HFaz8= -github.com/aws/aws-sdk-go-v2/service/shield v1.31.0 h1:xiyt8GY9yqSFhyAfpuUTKmsMAzrVFE+I0JcNjcj/neE= -github.com/aws/aws-sdk-go-v2/service/shield v1.31.0/go.mod h1:7dWLpEpp3W2qgWEBi053m1jVfkWJFhbPCEt5JAGKBW8= +github.com/aws/aws-sdk-go-v2/service/shield v1.31.1 h1:xVThf6EHHHIacded51XqxPMEnmruw/VXtrtbMim26Zc= +github.com/aws/aws-sdk-go-v2/service/shield v1.31.1/go.mod h1:Gr5mZJ4DgXyZBskh7KgfNUb+zqhywkI4tOizNK0ado0= github.com/aws/aws-sdk-go-v2/service/signer v1.28.0 h1:CJ5PBq3ZNBfAaSVXL/zghZ0rkZ2Am5s2ASCjr3ZLLT8= github.com/aws/aws-sdk-go-v2/service/signer v1.28.0/go.mod h1:mK/U/89vI+K5nueWZA1L9oKWtvWyoaRNaBcKnaIN7WY= github.com/aws/aws-sdk-go-v2/service/sns v1.35.0 h1:5/RoSyuSK0m7JaCL9dE0srXVRwsKUQyBobd0WBcR1RU= From e0ebc40e83cf6e23d547dd08a2ad49c538e81bd3 Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 09:15:19 -0400 Subject: [PATCH 302/365] go get github.com/aws/aws-sdk-go-v2/service/signer. --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 8cde0f78c1fb..e145a83905fa 100644 --- a/go.mod +++ b/go.mod @@ -237,7 +237,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/sesv2 v1.48.1 github.com/aws/aws-sdk-go-v2/service/sfn v1.36.1 github.com/aws/aws-sdk-go-v2/service/shield v1.31.1 - github.com/aws/aws-sdk-go-v2/service/signer v1.28.0 + github.com/aws/aws-sdk-go-v2/service/signer v1.28.1 github.com/aws/aws-sdk-go-v2/service/sns v1.35.0 github.com/aws/aws-sdk-go-v2/service/sqs v1.39.0 github.com/aws/aws-sdk-go-v2/service/ssm v1.61.0 diff --git a/go.sum b/go.sum index aaf7d88df381..a2c25d7dfc41 100644 --- a/go.sum +++ b/go.sum @@ -495,8 +495,8 @@ github.com/aws/aws-sdk-go-v2/service/sfn v1.36.1 h1:VEOUJkplqcaFW+Z3ZOFSWSVsmXVs github.com/aws/aws-sdk-go-v2/service/sfn v1.36.1/go.mod h1:bwaYtZOogLKo3c/rpHpBQe7vnoieV5rQn+nQ52HFaz8= github.com/aws/aws-sdk-go-v2/service/shield v1.31.1 h1:xVThf6EHHHIacded51XqxPMEnmruw/VXtrtbMim26Zc= github.com/aws/aws-sdk-go-v2/service/shield v1.31.1/go.mod h1:Gr5mZJ4DgXyZBskh7KgfNUb+zqhywkI4tOizNK0ado0= -github.com/aws/aws-sdk-go-v2/service/signer v1.28.0 h1:CJ5PBq3ZNBfAaSVXL/zghZ0rkZ2Am5s2ASCjr3ZLLT8= -github.com/aws/aws-sdk-go-v2/service/signer v1.28.0/go.mod h1:mK/U/89vI+K5nueWZA1L9oKWtvWyoaRNaBcKnaIN7WY= +github.com/aws/aws-sdk-go-v2/service/signer v1.28.1 h1:9LIObcOOXWwrT3fdo//lXO5evcqhkzzFLpqkdwcg3/Y= +github.com/aws/aws-sdk-go-v2/service/signer v1.28.1/go.mod h1:L2cwuhZJxxw/dvQJLkkUW3iTBWAoHC+8EyI/14imqhs= github.com/aws/aws-sdk-go-v2/service/sns v1.35.0 h1:5/RoSyuSK0m7JaCL9dE0srXVRwsKUQyBobd0WBcR1RU= github.com/aws/aws-sdk-go-v2/service/sns v1.35.0/go.mod h1:hBuVN2n4PF8FXQsjl9FLiwPr5d4vrYBuoZ0ugwoFtfc= github.com/aws/aws-sdk-go-v2/service/sqs v1.39.0 h1:i/RufAS5Qy+fEMF9A/PpIBXCtu1otrrGLlI3V3a2+ko= From 7879fa6ad7519bd902ff3f559f588164e456eb9f Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 09:15:20 -0400 Subject: [PATCH 303/365] go get github.com/aws/aws-sdk-go-v2/service/sns. --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index e145a83905fa..46b94893199d 100644 --- a/go.mod +++ b/go.mod @@ -238,7 +238,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/sfn v1.36.1 github.com/aws/aws-sdk-go-v2/service/shield v1.31.1 github.com/aws/aws-sdk-go-v2/service/signer v1.28.1 - github.com/aws/aws-sdk-go-v2/service/sns v1.35.0 + github.com/aws/aws-sdk-go-v2/service/sns v1.35.1 github.com/aws/aws-sdk-go-v2/service/sqs v1.39.0 github.com/aws/aws-sdk-go-v2/service/ssm v1.61.0 github.com/aws/aws-sdk-go-v2/service/ssmcontacts v1.28.0 diff --git a/go.sum b/go.sum index a2c25d7dfc41..f0748063da36 100644 --- a/go.sum +++ b/go.sum @@ -497,8 +497,8 @@ github.com/aws/aws-sdk-go-v2/service/shield v1.31.1 h1:xVThf6EHHHIacded51XqxPMEn github.com/aws/aws-sdk-go-v2/service/shield v1.31.1/go.mod h1:Gr5mZJ4DgXyZBskh7KgfNUb+zqhywkI4tOizNK0ado0= github.com/aws/aws-sdk-go-v2/service/signer v1.28.1 h1:9LIObcOOXWwrT3fdo//lXO5evcqhkzzFLpqkdwcg3/Y= github.com/aws/aws-sdk-go-v2/service/signer v1.28.1/go.mod h1:L2cwuhZJxxw/dvQJLkkUW3iTBWAoHC+8EyI/14imqhs= -github.com/aws/aws-sdk-go-v2/service/sns v1.35.0 h1:5/RoSyuSK0m7JaCL9dE0srXVRwsKUQyBobd0WBcR1RU= -github.com/aws/aws-sdk-go-v2/service/sns v1.35.0/go.mod h1:hBuVN2n4PF8FXQsjl9FLiwPr5d4vrYBuoZ0ugwoFtfc= +github.com/aws/aws-sdk-go-v2/service/sns v1.35.1 h1:rXYKNcWkL86HT+vbkf/3YSCFCoNFcUlyFJp78dF36Rk= +github.com/aws/aws-sdk-go-v2/service/sns v1.35.1/go.mod h1:el2B16jJPkZCHv7NcBt3uf/JLLt0TBxcHcsjsyG+L40= github.com/aws/aws-sdk-go-v2/service/sqs v1.39.0 h1:i/RufAS5Qy+fEMF9A/PpIBXCtu1otrrGLlI3V3a2+ko= github.com/aws/aws-sdk-go-v2/service/sqs v1.39.0/go.mod h1:d+t4DavxGo524hNXZugRjOmnofs+NKW2tu43KMzo+rQ= github.com/aws/aws-sdk-go-v2/service/ssm v1.61.0 h1:JRd8S8zteNH3TB2LgA8woCObScv/LImxfNyr+bE7jKw= From 42ff75792e1184fdfcf48a307f8625d925212606 Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 09:15:21 -0400 Subject: [PATCH 304/365] go get github.com/aws/aws-sdk-go-v2/service/sqs. --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 46b94893199d..a4bd4deb1fb1 100644 --- a/go.mod +++ b/go.mod @@ -239,7 +239,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/shield v1.31.1 github.com/aws/aws-sdk-go-v2/service/signer v1.28.1 github.com/aws/aws-sdk-go-v2/service/sns v1.35.1 - github.com/aws/aws-sdk-go-v2/service/sqs v1.39.0 + github.com/aws/aws-sdk-go-v2/service/sqs v1.39.1 github.com/aws/aws-sdk-go-v2/service/ssm v1.61.0 github.com/aws/aws-sdk-go-v2/service/ssmcontacts v1.28.0 github.com/aws/aws-sdk-go-v2/service/ssmincidents v1.36.0 diff --git a/go.sum b/go.sum index f0748063da36..61bae586c040 100644 --- a/go.sum +++ b/go.sum @@ -499,8 +499,8 @@ github.com/aws/aws-sdk-go-v2/service/signer v1.28.1 h1:9LIObcOOXWwrT3fdo//lXO5ev github.com/aws/aws-sdk-go-v2/service/signer v1.28.1/go.mod h1:L2cwuhZJxxw/dvQJLkkUW3iTBWAoHC+8EyI/14imqhs= github.com/aws/aws-sdk-go-v2/service/sns v1.35.1 h1:rXYKNcWkL86HT+vbkf/3YSCFCoNFcUlyFJp78dF36Rk= github.com/aws/aws-sdk-go-v2/service/sns v1.35.1/go.mod h1:el2B16jJPkZCHv7NcBt3uf/JLLt0TBxcHcsjsyG+L40= -github.com/aws/aws-sdk-go-v2/service/sqs v1.39.0 h1:i/RufAS5Qy+fEMF9A/PpIBXCtu1otrrGLlI3V3a2+ko= -github.com/aws/aws-sdk-go-v2/service/sqs v1.39.0/go.mod h1:d+t4DavxGo524hNXZugRjOmnofs+NKW2tu43KMzo+rQ= +github.com/aws/aws-sdk-go-v2/service/sqs v1.39.1 h1:fkHJs2m1rKVBsE0n6tKi988JhpOMIu2MO2ZIHQQfeho= +github.com/aws/aws-sdk-go-v2/service/sqs v1.39.1/go.mod h1:uo+sko7ERytamU7kYji04fBiMbPAgTHxzr0MX7KznO4= github.com/aws/aws-sdk-go-v2/service/ssm v1.61.0 h1:JRd8S8zteNH3TB2LgA8woCObScv/LImxfNyr+bE7jKw= github.com/aws/aws-sdk-go-v2/service/ssm v1.61.0/go.mod h1:4xJVAEeQ2GRGZW7nSyOYXFHdxHf2mkz16+hm7Z+acgU= github.com/aws/aws-sdk-go-v2/service/ssmcontacts v1.28.0 h1:s6eTaMetnHj3m8ZLxepkoGIcGDQIj1jAtniG62Y4iIg= From e9ed84ce83f5b6604886e87a2b8d160076f67863 Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 09:15:22 -0400 Subject: [PATCH 305/365] go get github.com/aws/aws-sdk-go-v2/service/ssm. --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index a4bd4deb1fb1..93bf9c924786 100644 --- a/go.mod +++ b/go.mod @@ -240,7 +240,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/signer v1.28.1 github.com/aws/aws-sdk-go-v2/service/sns v1.35.1 github.com/aws/aws-sdk-go-v2/service/sqs v1.39.1 - github.com/aws/aws-sdk-go-v2/service/ssm v1.61.0 + github.com/aws/aws-sdk-go-v2/service/ssm v1.61.1 github.com/aws/aws-sdk-go-v2/service/ssmcontacts v1.28.0 github.com/aws/aws-sdk-go-v2/service/ssmincidents v1.36.0 github.com/aws/aws-sdk-go-v2/service/ssmquicksetup v1.5.0 diff --git a/go.sum b/go.sum index 61bae586c040..6169f2f977e8 100644 --- a/go.sum +++ b/go.sum @@ -501,8 +501,8 @@ github.com/aws/aws-sdk-go-v2/service/sns v1.35.1 h1:rXYKNcWkL86HT+vbkf/3YSCFCoNF github.com/aws/aws-sdk-go-v2/service/sns v1.35.1/go.mod h1:el2B16jJPkZCHv7NcBt3uf/JLLt0TBxcHcsjsyG+L40= github.com/aws/aws-sdk-go-v2/service/sqs v1.39.1 h1:fkHJs2m1rKVBsE0n6tKi988JhpOMIu2MO2ZIHQQfeho= github.com/aws/aws-sdk-go-v2/service/sqs v1.39.1/go.mod h1:uo+sko7ERytamU7kYji04fBiMbPAgTHxzr0MX7KznO4= -github.com/aws/aws-sdk-go-v2/service/ssm v1.61.0 h1:JRd8S8zteNH3TB2LgA8woCObScv/LImxfNyr+bE7jKw= -github.com/aws/aws-sdk-go-v2/service/ssm v1.61.0/go.mod h1:4xJVAEeQ2GRGZW7nSyOYXFHdxHf2mkz16+hm7Z+acgU= +github.com/aws/aws-sdk-go-v2/service/ssm v1.61.1 h1:Pu5hveFc6RslFZP61W5SEMOoPd6RR2yrOu11ZxCkr+Y= +github.com/aws/aws-sdk-go-v2/service/ssm v1.61.1/go.mod h1:8OOmGP4EK2O8eJIKIgTUXTfznuhC1BBarYzb+B5ep44= github.com/aws/aws-sdk-go-v2/service/ssmcontacts v1.28.0 h1:s6eTaMetnHj3m8ZLxepkoGIcGDQIj1jAtniG62Y4iIg= github.com/aws/aws-sdk-go-v2/service/ssmcontacts v1.28.0/go.mod h1:YRzXmrrfbRBAenwYxR+JDzMy8X73jOllzuWV39Se80o= github.com/aws/aws-sdk-go-v2/service/ssmincidents v1.36.0 h1:7hM6PhMZ5hBcjfb+lHdEBBIHF1+2MkKmKCjBQwlVSMk= From 3997919c9213efd0b88728f8c65613ffc1d8e95f Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 09:15:23 -0400 Subject: [PATCH 306/365] go get github.com/aws/aws-sdk-go-v2/service/ssmcontacts. --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 93bf9c924786..d9fb11d364f9 100644 --- a/go.mod +++ b/go.mod @@ -241,7 +241,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/sns v1.35.1 github.com/aws/aws-sdk-go-v2/service/sqs v1.39.1 github.com/aws/aws-sdk-go-v2/service/ssm v1.61.1 - github.com/aws/aws-sdk-go-v2/service/ssmcontacts v1.28.0 + github.com/aws/aws-sdk-go-v2/service/ssmcontacts v1.28.1 github.com/aws/aws-sdk-go-v2/service/ssmincidents v1.36.0 github.com/aws/aws-sdk-go-v2/service/ssmquicksetup v1.5.0 github.com/aws/aws-sdk-go-v2/service/ssmsap v1.21.0 diff --git a/go.sum b/go.sum index 6169f2f977e8..e96021108862 100644 --- a/go.sum +++ b/go.sum @@ -503,8 +503,8 @@ github.com/aws/aws-sdk-go-v2/service/sqs v1.39.1 h1:fkHJs2m1rKVBsE0n6tKi988JhpOM github.com/aws/aws-sdk-go-v2/service/sqs v1.39.1/go.mod h1:uo+sko7ERytamU7kYji04fBiMbPAgTHxzr0MX7KznO4= github.com/aws/aws-sdk-go-v2/service/ssm v1.61.1 h1:Pu5hveFc6RslFZP61W5SEMOoPd6RR2yrOu11ZxCkr+Y= github.com/aws/aws-sdk-go-v2/service/ssm v1.61.1/go.mod h1:8OOmGP4EK2O8eJIKIgTUXTfznuhC1BBarYzb+B5ep44= -github.com/aws/aws-sdk-go-v2/service/ssmcontacts v1.28.0 h1:s6eTaMetnHj3m8ZLxepkoGIcGDQIj1jAtniG62Y4iIg= -github.com/aws/aws-sdk-go-v2/service/ssmcontacts v1.28.0/go.mod h1:YRzXmrrfbRBAenwYxR+JDzMy8X73jOllzuWV39Se80o= +github.com/aws/aws-sdk-go-v2/service/ssmcontacts v1.28.1 h1:1H1jDOo0680oHHo25w2z5zhQ18anlw3iyGBHEQ4KnHM= +github.com/aws/aws-sdk-go-v2/service/ssmcontacts v1.28.1/go.mod h1:20JJUbKRkWn+Ln9Xt8J3U4IfpM8Sbb0ks9KoQmgIGPA= github.com/aws/aws-sdk-go-v2/service/ssmincidents v1.36.0 h1:7hM6PhMZ5hBcjfb+lHdEBBIHF1+2MkKmKCjBQwlVSMk= github.com/aws/aws-sdk-go-v2/service/ssmincidents v1.36.0/go.mod h1:9q1HtMh3aG6tLq7nnemNLM12lv5TQLyGJZPw8TXTu+o= github.com/aws/aws-sdk-go-v2/service/ssmquicksetup v1.5.0 h1:wWjsCKZJw54mkjy35NkhzQvTqu6/cteQ52NMEIyZa6s= From 2e9b9eaf1467effe9646d9dbdba8d5df04cce2ae Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 09:15:24 -0400 Subject: [PATCH 307/365] go get github.com/aws/aws-sdk-go-v2/service/ssmincidents. --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index d9fb11d364f9..80046cdb7b48 100644 --- a/go.mod +++ b/go.mod @@ -242,7 +242,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/sqs v1.39.1 github.com/aws/aws-sdk-go-v2/service/ssm v1.61.1 github.com/aws/aws-sdk-go-v2/service/ssmcontacts v1.28.1 - github.com/aws/aws-sdk-go-v2/service/ssmincidents v1.36.0 + github.com/aws/aws-sdk-go-v2/service/ssmincidents v1.36.1 github.com/aws/aws-sdk-go-v2/service/ssmquicksetup v1.5.0 github.com/aws/aws-sdk-go-v2/service/ssmsap v1.21.0 github.com/aws/aws-sdk-go-v2/service/sso v1.26.1 diff --git a/go.sum b/go.sum index e96021108862..0674539db0c0 100644 --- a/go.sum +++ b/go.sum @@ -505,8 +505,8 @@ github.com/aws/aws-sdk-go-v2/service/ssm v1.61.1 h1:Pu5hveFc6RslFZP61W5SEMOoPd6R github.com/aws/aws-sdk-go-v2/service/ssm v1.61.1/go.mod h1:8OOmGP4EK2O8eJIKIgTUXTfznuhC1BBarYzb+B5ep44= github.com/aws/aws-sdk-go-v2/service/ssmcontacts v1.28.1 h1:1H1jDOo0680oHHo25w2z5zhQ18anlw3iyGBHEQ4KnHM= github.com/aws/aws-sdk-go-v2/service/ssmcontacts v1.28.1/go.mod h1:20JJUbKRkWn+Ln9Xt8J3U4IfpM8Sbb0ks9KoQmgIGPA= -github.com/aws/aws-sdk-go-v2/service/ssmincidents v1.36.0 h1:7hM6PhMZ5hBcjfb+lHdEBBIHF1+2MkKmKCjBQwlVSMk= -github.com/aws/aws-sdk-go-v2/service/ssmincidents v1.36.0/go.mod h1:9q1HtMh3aG6tLq7nnemNLM12lv5TQLyGJZPw8TXTu+o= +github.com/aws/aws-sdk-go-v2/service/ssmincidents v1.36.1 h1:1/T3AGKsL3mUURd6Dk0qJa2Pgmeqx6ZjpY+cM4iHcX0= +github.com/aws/aws-sdk-go-v2/service/ssmincidents v1.36.1/go.mod h1:a9gXJaVGkxv3DRJd9ZafQSCBaoBDSYOQnNzshN869gM= github.com/aws/aws-sdk-go-v2/service/ssmquicksetup v1.5.0 h1:wWjsCKZJw54mkjy35NkhzQvTqu6/cteQ52NMEIyZa6s= github.com/aws/aws-sdk-go-v2/service/ssmquicksetup v1.5.0/go.mod h1:ZYyBNE2vzgYAowj676ZUivzokh3XPyz/IHAOgeUqxB0= github.com/aws/aws-sdk-go-v2/service/ssmsap v1.21.0 h1:R0mhxUklmXU/Jrrp2Su9ZnNZxe8Q/Qj7m9gEW6D7ZCU= From b1edf474b6e2be4294ff59099f81995f64f51f0c Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 09:15:26 -0400 Subject: [PATCH 308/365] go get github.com/aws/aws-sdk-go-v2/service/ssmquicksetup. --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 80046cdb7b48..d64c95fddd33 100644 --- a/go.mod +++ b/go.mod @@ -243,7 +243,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/ssm v1.61.1 github.com/aws/aws-sdk-go-v2/service/ssmcontacts v1.28.1 github.com/aws/aws-sdk-go-v2/service/ssmincidents v1.36.1 - github.com/aws/aws-sdk-go-v2/service/ssmquicksetup v1.5.0 + github.com/aws/aws-sdk-go-v2/service/ssmquicksetup v1.5.1 github.com/aws/aws-sdk-go-v2/service/ssmsap v1.21.0 github.com/aws/aws-sdk-go-v2/service/sso v1.26.1 github.com/aws/aws-sdk-go-v2/service/ssoadmin v1.32.0 diff --git a/go.sum b/go.sum index 0674539db0c0..377e7c15124c 100644 --- a/go.sum +++ b/go.sum @@ -507,8 +507,8 @@ github.com/aws/aws-sdk-go-v2/service/ssmcontacts v1.28.1 h1:1H1jDOo0680oHHo25w2z github.com/aws/aws-sdk-go-v2/service/ssmcontacts v1.28.1/go.mod h1:20JJUbKRkWn+Ln9Xt8J3U4IfpM8Sbb0ks9KoQmgIGPA= github.com/aws/aws-sdk-go-v2/service/ssmincidents v1.36.1 h1:1/T3AGKsL3mUURd6Dk0qJa2Pgmeqx6ZjpY+cM4iHcX0= github.com/aws/aws-sdk-go-v2/service/ssmincidents v1.36.1/go.mod h1:a9gXJaVGkxv3DRJd9ZafQSCBaoBDSYOQnNzshN869gM= -github.com/aws/aws-sdk-go-v2/service/ssmquicksetup v1.5.0 h1:wWjsCKZJw54mkjy35NkhzQvTqu6/cteQ52NMEIyZa6s= -github.com/aws/aws-sdk-go-v2/service/ssmquicksetup v1.5.0/go.mod h1:ZYyBNE2vzgYAowj676ZUivzokh3XPyz/IHAOgeUqxB0= +github.com/aws/aws-sdk-go-v2/service/ssmquicksetup v1.5.1 h1:kpAZB/7E8vcJabxjuBgOS14H4vew0vpE4/OXyzZh4/U= +github.com/aws/aws-sdk-go-v2/service/ssmquicksetup v1.5.1/go.mod h1:5Paze51it1WMLnEuoMWZhJeXxAUThOdl0LNHqbFkVmY= github.com/aws/aws-sdk-go-v2/service/ssmsap v1.21.0 h1:R0mhxUklmXU/Jrrp2Su9ZnNZxe8Q/Qj7m9gEW6D7ZCU= github.com/aws/aws-sdk-go-v2/service/ssmsap v1.21.0/go.mod h1:rZActsF6fwFl1Hi0uX5wVWIiuVt9G2u1CNP/xdRf8BI= github.com/aws/aws-sdk-go-v2/service/sso v1.26.1 h1:uWaz3DoNK9MNhm7i6UGxqufwu3BEuJZm72WlpGwyVtY= From cf76c04d9d56a4ee3aa7f5bafcf715b6d10f58be Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 09:15:26 -0400 Subject: [PATCH 309/365] go get github.com/aws/aws-sdk-go-v2/service/ssmsap. --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index d64c95fddd33..027c944a3a68 100644 --- a/go.mod +++ b/go.mod @@ -244,7 +244,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/ssmcontacts v1.28.1 github.com/aws/aws-sdk-go-v2/service/ssmincidents v1.36.1 github.com/aws/aws-sdk-go-v2/service/ssmquicksetup v1.5.1 - github.com/aws/aws-sdk-go-v2/service/ssmsap v1.21.0 + github.com/aws/aws-sdk-go-v2/service/ssmsap v1.21.1 github.com/aws/aws-sdk-go-v2/service/sso v1.26.1 github.com/aws/aws-sdk-go-v2/service/ssoadmin v1.32.0 github.com/aws/aws-sdk-go-v2/service/storagegateway v1.39.0 diff --git a/go.sum b/go.sum index 377e7c15124c..8d66980828fb 100644 --- a/go.sum +++ b/go.sum @@ -509,8 +509,8 @@ github.com/aws/aws-sdk-go-v2/service/ssmincidents v1.36.1 h1:1/T3AGKsL3mUURd6Dk0 github.com/aws/aws-sdk-go-v2/service/ssmincidents v1.36.1/go.mod h1:a9gXJaVGkxv3DRJd9ZafQSCBaoBDSYOQnNzshN869gM= github.com/aws/aws-sdk-go-v2/service/ssmquicksetup v1.5.1 h1:kpAZB/7E8vcJabxjuBgOS14H4vew0vpE4/OXyzZh4/U= github.com/aws/aws-sdk-go-v2/service/ssmquicksetup v1.5.1/go.mod h1:5Paze51it1WMLnEuoMWZhJeXxAUThOdl0LNHqbFkVmY= -github.com/aws/aws-sdk-go-v2/service/ssmsap v1.21.0 h1:R0mhxUklmXU/Jrrp2Su9ZnNZxe8Q/Qj7m9gEW6D7ZCU= -github.com/aws/aws-sdk-go-v2/service/ssmsap v1.21.0/go.mod h1:rZActsF6fwFl1Hi0uX5wVWIiuVt9G2u1CNP/xdRf8BI= +github.com/aws/aws-sdk-go-v2/service/ssmsap v1.21.1 h1:qHmgtw+6t+U3HoGEfBGRlnWyWH90u7g4yNT5r4YSBHQ= +github.com/aws/aws-sdk-go-v2/service/ssmsap v1.21.1/go.mod h1:dls7w/cdUdzL0r0oCbz/zNMtnuBNIayq2wDDYr57Mmo= github.com/aws/aws-sdk-go-v2/service/sso v1.26.1 h1:uWaz3DoNK9MNhm7i6UGxqufwu3BEuJZm72WlpGwyVtY= github.com/aws/aws-sdk-go-v2/service/sso v1.26.1/go.mod h1:ILpVNjL0BO+Z3Mm0SbEeUoYS9e0eJWV1BxNppp0fcb8= github.com/aws/aws-sdk-go-v2/service/ssoadmin v1.32.0 h1:9ZiC+PGAj6iWfUnyVD13DJKRSVUyoGnjqeoHwYbcp7s= From 27b01e4eecfd07317552dc4bf251fda473d972b0 Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 09:15:28 -0400 Subject: [PATCH 310/365] go get github.com/aws/aws-sdk-go-v2/service/ssoadmin. --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 027c944a3a68..c5843e2e6d5f 100644 --- a/go.mod +++ b/go.mod @@ -246,7 +246,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/ssmquicksetup v1.5.1 github.com/aws/aws-sdk-go-v2/service/ssmsap v1.21.1 github.com/aws/aws-sdk-go-v2/service/sso v1.26.1 - github.com/aws/aws-sdk-go-v2/service/ssoadmin v1.32.0 + github.com/aws/aws-sdk-go-v2/service/ssoadmin v1.32.1 github.com/aws/aws-sdk-go-v2/service/storagegateway v1.39.0 github.com/aws/aws-sdk-go-v2/service/sts v1.35.1 github.com/aws/aws-sdk-go-v2/service/swf v1.29.0 diff --git a/go.sum b/go.sum index 8d66980828fb..02ba9d85380f 100644 --- a/go.sum +++ b/go.sum @@ -513,8 +513,8 @@ github.com/aws/aws-sdk-go-v2/service/ssmsap v1.21.1 h1:qHmgtw+6t+U3HoGEfBGRlnWyW github.com/aws/aws-sdk-go-v2/service/ssmsap v1.21.1/go.mod h1:dls7w/cdUdzL0r0oCbz/zNMtnuBNIayq2wDDYr57Mmo= github.com/aws/aws-sdk-go-v2/service/sso v1.26.1 h1:uWaz3DoNK9MNhm7i6UGxqufwu3BEuJZm72WlpGwyVtY= github.com/aws/aws-sdk-go-v2/service/sso v1.26.1/go.mod h1:ILpVNjL0BO+Z3Mm0SbEeUoYS9e0eJWV1BxNppp0fcb8= -github.com/aws/aws-sdk-go-v2/service/ssoadmin v1.32.0 h1:9ZiC+PGAj6iWfUnyVD13DJKRSVUyoGnjqeoHwYbcp7s= -github.com/aws/aws-sdk-go-v2/service/ssoadmin v1.32.0/go.mod h1:THhZIpJD09IpQQXUB3UzSGNbVQWymMPpg+oSzxR1QZk= +github.com/aws/aws-sdk-go-v2/service/ssoadmin v1.32.1 h1:Wqti4CxhMVIQU0ucF/RSIhgqy8i7jO/kX+s1uw73YH0= +github.com/aws/aws-sdk-go-v2/service/ssoadmin v1.32.1/go.mod h1:TbMaMLH88FDGdgBJ/7lbx0fiUP/Zz0QloIaATlW8e2w= github.com/aws/aws-sdk-go-v2/service/ssooidc v1.31.1 h1:XdG6/o1/ZDmn3wJU5SRAejHaWgKS4zHv0jBamuKuS2k= github.com/aws/aws-sdk-go-v2/service/ssooidc v1.31.1/go.mod h1:oiotGTKadCOCl3vg/tYh4k45JlDF81Ka8rdumNhEnIQ= github.com/aws/aws-sdk-go-v2/service/storagegateway v1.39.0 h1:ry+7bX8vl2pQzMPpo7KVDaoY/vh6iBiUC1mOL4tXxcw= From 07812b584161dbf42b6c79a08e8d725ec3e70618 Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 09:15:29 -0400 Subject: [PATCH 311/365] go get github.com/aws/aws-sdk-go-v2/service/storagegateway. --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index c5843e2e6d5f..386de5b58713 100644 --- a/go.mod +++ b/go.mod @@ -247,7 +247,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/ssmsap v1.21.1 github.com/aws/aws-sdk-go-v2/service/sso v1.26.1 github.com/aws/aws-sdk-go-v2/service/ssoadmin v1.32.1 - github.com/aws/aws-sdk-go-v2/service/storagegateway v1.39.0 + github.com/aws/aws-sdk-go-v2/service/storagegateway v1.39.1 github.com/aws/aws-sdk-go-v2/service/sts v1.35.1 github.com/aws/aws-sdk-go-v2/service/swf v1.29.0 github.com/aws/aws-sdk-go-v2/service/synthetics v1.37.0 diff --git a/go.sum b/go.sum index 02ba9d85380f..38b8f2361c2c 100644 --- a/go.sum +++ b/go.sum @@ -517,8 +517,8 @@ github.com/aws/aws-sdk-go-v2/service/ssoadmin v1.32.1 h1:Wqti4CxhMVIQU0ucF/RSIhg github.com/aws/aws-sdk-go-v2/service/ssoadmin v1.32.1/go.mod h1:TbMaMLH88FDGdgBJ/7lbx0fiUP/Zz0QloIaATlW8e2w= github.com/aws/aws-sdk-go-v2/service/ssooidc v1.31.1 h1:XdG6/o1/ZDmn3wJU5SRAejHaWgKS4zHv0jBamuKuS2k= github.com/aws/aws-sdk-go-v2/service/ssooidc v1.31.1/go.mod h1:oiotGTKadCOCl3vg/tYh4k45JlDF81Ka8rdumNhEnIQ= -github.com/aws/aws-sdk-go-v2/service/storagegateway v1.39.0 h1:ry+7bX8vl2pQzMPpo7KVDaoY/vh6iBiUC1mOL4tXxcw= -github.com/aws/aws-sdk-go-v2/service/storagegateway v1.39.0/go.mod h1:nJ6IfH7EAwcH7Ptw1Xs/JnkuHiE6u1KD8CKit2FmUTs= +github.com/aws/aws-sdk-go-v2/service/storagegateway v1.39.1 h1:O5zyb5Nag2fUvcIXMK1v+ZXWaPFCoPmqX6WAR0Jmsno= +github.com/aws/aws-sdk-go-v2/service/storagegateway v1.39.1/go.mod h1:AQSOz7HtJBbLMExu5ftB5sN8B9ZaHE00Rc/8P3MPpjo= github.com/aws/aws-sdk-go-v2/service/sts v1.35.1 h1:iF4Xxkc0H9c/K2dS0zZw3SCkj0Z7n6AMnUiiyoJND+I= github.com/aws/aws-sdk-go-v2/service/sts v1.35.1/go.mod h1:0bxIatfN0aLq4mjoLDeBpOjOke68OsFlXPDFJ7V0MYw= github.com/aws/aws-sdk-go-v2/service/swf v1.29.0 h1:HVlKNYHTqbr4fKc/20vTgRZ1e/E8TTsHmY6yyXqbAMw= From 9098ba44b8cfdf636e6b50f6482e2ab7a81adc74 Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 09:15:31 -0400 Subject: [PATCH 312/365] go get github.com/aws/aws-sdk-go-v2/service/swf. --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 386de5b58713..19f727fbc5af 100644 --- a/go.mod +++ b/go.mod @@ -249,7 +249,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/ssoadmin v1.32.1 github.com/aws/aws-sdk-go-v2/service/storagegateway v1.39.1 github.com/aws/aws-sdk-go-v2/service/sts v1.35.1 - github.com/aws/aws-sdk-go-v2/service/swf v1.29.0 + github.com/aws/aws-sdk-go-v2/service/swf v1.29.1 github.com/aws/aws-sdk-go-v2/service/synthetics v1.37.0 github.com/aws/aws-sdk-go-v2/service/taxsettings v1.13.0 github.com/aws/aws-sdk-go-v2/service/timestreaminfluxdb v1.12.0 diff --git a/go.sum b/go.sum index 38b8f2361c2c..b53edcd2ea1a 100644 --- a/go.sum +++ b/go.sum @@ -521,8 +521,8 @@ github.com/aws/aws-sdk-go-v2/service/storagegateway v1.39.1 h1:O5zyb5Nag2fUvcIXM github.com/aws/aws-sdk-go-v2/service/storagegateway v1.39.1/go.mod h1:AQSOz7HtJBbLMExu5ftB5sN8B9ZaHE00Rc/8P3MPpjo= github.com/aws/aws-sdk-go-v2/service/sts v1.35.1 h1:iF4Xxkc0H9c/K2dS0zZw3SCkj0Z7n6AMnUiiyoJND+I= github.com/aws/aws-sdk-go-v2/service/sts v1.35.1/go.mod h1:0bxIatfN0aLq4mjoLDeBpOjOke68OsFlXPDFJ7V0MYw= -github.com/aws/aws-sdk-go-v2/service/swf v1.29.0 h1:HVlKNYHTqbr4fKc/20vTgRZ1e/E8TTsHmY6yyXqbAMw= -github.com/aws/aws-sdk-go-v2/service/swf v1.29.0/go.mod h1:XnETagEsnuCfvAwFtMjkAYlYR6HcH19q9M8I4sfZ/pc= +github.com/aws/aws-sdk-go-v2/service/swf v1.29.1 h1:3MokmeLAz3SAzZW/PT3+QebJYVUtzNDpHrSpO0SQtPs= +github.com/aws/aws-sdk-go-v2/service/swf v1.29.1/go.mod h1:KBITTXjOcUqvzGilyMCW/lLL2aLTN6PxS+OxMJsoitw= github.com/aws/aws-sdk-go-v2/service/synthetics v1.37.0 h1:i8ELxsU4cRR5cvUP+KJ38ti/ebcPUCOO6LWjiFy5r0U= github.com/aws/aws-sdk-go-v2/service/synthetics v1.37.0/go.mod h1:DasI/CdA7QZPJuqPWBeoSSQAGwkvoKaQbf6Y34vtlSo= github.com/aws/aws-sdk-go-v2/service/taxsettings v1.13.0 h1:76Gl8pwXvNPWASpibpkQErvMSSvfyrOw9kA1INHvejw= From 857b397ee2dbe8a30786559da534ee314f577211 Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 09:15:32 -0400 Subject: [PATCH 313/365] go get github.com/aws/aws-sdk-go-v2/service/synthetics. --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 19f727fbc5af..881f9d88dd62 100644 --- a/go.mod +++ b/go.mod @@ -250,7 +250,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/storagegateway v1.39.1 github.com/aws/aws-sdk-go-v2/service/sts v1.35.1 github.com/aws/aws-sdk-go-v2/service/swf v1.29.1 - github.com/aws/aws-sdk-go-v2/service/synthetics v1.37.0 + github.com/aws/aws-sdk-go-v2/service/synthetics v1.37.1 github.com/aws/aws-sdk-go-v2/service/taxsettings v1.13.0 github.com/aws/aws-sdk-go-v2/service/timestreaminfluxdb v1.12.0 github.com/aws/aws-sdk-go-v2/service/timestreamquery v1.32.0 diff --git a/go.sum b/go.sum index b53edcd2ea1a..f7350c74e038 100644 --- a/go.sum +++ b/go.sum @@ -523,8 +523,8 @@ github.com/aws/aws-sdk-go-v2/service/sts v1.35.1 h1:iF4Xxkc0H9c/K2dS0zZw3SCkj0Z7 github.com/aws/aws-sdk-go-v2/service/sts v1.35.1/go.mod h1:0bxIatfN0aLq4mjoLDeBpOjOke68OsFlXPDFJ7V0MYw= github.com/aws/aws-sdk-go-v2/service/swf v1.29.1 h1:3MokmeLAz3SAzZW/PT3+QebJYVUtzNDpHrSpO0SQtPs= github.com/aws/aws-sdk-go-v2/service/swf v1.29.1/go.mod h1:KBITTXjOcUqvzGilyMCW/lLL2aLTN6PxS+OxMJsoitw= -github.com/aws/aws-sdk-go-v2/service/synthetics v1.37.0 h1:i8ELxsU4cRR5cvUP+KJ38ti/ebcPUCOO6LWjiFy5r0U= -github.com/aws/aws-sdk-go-v2/service/synthetics v1.37.0/go.mod h1:DasI/CdA7QZPJuqPWBeoSSQAGwkvoKaQbf6Y34vtlSo= +github.com/aws/aws-sdk-go-v2/service/synthetics v1.37.1 h1:bWH6tBabdGAWbpbV3FFukqUlY54I6jjzHHQWE/1YJbY= +github.com/aws/aws-sdk-go-v2/service/synthetics v1.37.1/go.mod h1:BedpiqRrnMFzbm/g8ZuUnA1/TjAzT475hVNpUiNWpaM= github.com/aws/aws-sdk-go-v2/service/taxsettings v1.13.0 h1:76Gl8pwXvNPWASpibpkQErvMSSvfyrOw9kA1INHvejw= github.com/aws/aws-sdk-go-v2/service/taxsettings v1.13.0/go.mod h1:j8AA3BKL3TrYeZGC/pvOo77BovIBWA8SRwo8hoZjXtU= github.com/aws/aws-sdk-go-v2/service/timestreaminfluxdb v1.12.0 h1:xcGhIgi2aePQJGpAiKrDgWEVjA3IXCcGAvF8Fxi8Ygc= From 097f8303f767a344e5840814e863c9798fb8278a Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 09:15:34 -0400 Subject: [PATCH 314/365] go get github.com/aws/aws-sdk-go-v2/service/taxsettings. --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 881f9d88dd62..20b96c4b50f4 100644 --- a/go.mod +++ b/go.mod @@ -251,7 +251,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/sts v1.35.1 github.com/aws/aws-sdk-go-v2/service/swf v1.29.1 github.com/aws/aws-sdk-go-v2/service/synthetics v1.37.1 - github.com/aws/aws-sdk-go-v2/service/taxsettings v1.13.0 + github.com/aws/aws-sdk-go-v2/service/taxsettings v1.13.1 github.com/aws/aws-sdk-go-v2/service/timestreaminfluxdb v1.12.0 github.com/aws/aws-sdk-go-v2/service/timestreamquery v1.32.0 github.com/aws/aws-sdk-go-v2/service/timestreamwrite v1.32.0 diff --git a/go.sum b/go.sum index f7350c74e038..c10cdf011dd4 100644 --- a/go.sum +++ b/go.sum @@ -525,8 +525,8 @@ github.com/aws/aws-sdk-go-v2/service/swf v1.29.1 h1:3MokmeLAz3SAzZW/PT3+QebJYVUt github.com/aws/aws-sdk-go-v2/service/swf v1.29.1/go.mod h1:KBITTXjOcUqvzGilyMCW/lLL2aLTN6PxS+OxMJsoitw= github.com/aws/aws-sdk-go-v2/service/synthetics v1.37.1 h1:bWH6tBabdGAWbpbV3FFukqUlY54I6jjzHHQWE/1YJbY= github.com/aws/aws-sdk-go-v2/service/synthetics v1.37.1/go.mod h1:BedpiqRrnMFzbm/g8ZuUnA1/TjAzT475hVNpUiNWpaM= -github.com/aws/aws-sdk-go-v2/service/taxsettings v1.13.0 h1:76Gl8pwXvNPWASpibpkQErvMSSvfyrOw9kA1INHvejw= -github.com/aws/aws-sdk-go-v2/service/taxsettings v1.13.0/go.mod h1:j8AA3BKL3TrYeZGC/pvOo77BovIBWA8SRwo8hoZjXtU= +github.com/aws/aws-sdk-go-v2/service/taxsettings v1.13.1 h1:1LsFNUBiAu20C/+DCTw3uhTmfgrenBJPGzNo5TkKPro= +github.com/aws/aws-sdk-go-v2/service/taxsettings v1.13.1/go.mod h1:5WaC771ktHDgK0787PVcUQ98ptYdxmYTCK4ymuQC4OE= github.com/aws/aws-sdk-go-v2/service/timestreaminfluxdb v1.12.0 h1:xcGhIgi2aePQJGpAiKrDgWEVjA3IXCcGAvF8Fxi8Ygc= github.com/aws/aws-sdk-go-v2/service/timestreaminfluxdb v1.12.0/go.mod h1:jlm+1UibTlgwje1gX6OOOq2QgcYZVErsJax78P/Lfk0= github.com/aws/aws-sdk-go-v2/service/timestreamquery v1.32.0 h1:SQ6dYo+XJUwoG3z8PKEvSvjY4G67rxFUqguDwDxQt6w= From 64af9b45d2c9a09cf0cc0756858315d00b47a4e3 Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 09:15:35 -0400 Subject: [PATCH 315/365] go get github.com/aws/aws-sdk-go-v2/service/timestreaminfluxdb. --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 20b96c4b50f4..4876306e1bd5 100644 --- a/go.mod +++ b/go.mod @@ -252,7 +252,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/swf v1.29.1 github.com/aws/aws-sdk-go-v2/service/synthetics v1.37.1 github.com/aws/aws-sdk-go-v2/service/taxsettings v1.13.1 - github.com/aws/aws-sdk-go-v2/service/timestreaminfluxdb v1.12.0 + github.com/aws/aws-sdk-go-v2/service/timestreaminfluxdb v1.12.1 github.com/aws/aws-sdk-go-v2/service/timestreamquery v1.32.0 github.com/aws/aws-sdk-go-v2/service/timestreamwrite v1.32.0 github.com/aws/aws-sdk-go-v2/service/transcribe v1.48.0 diff --git a/go.sum b/go.sum index c10cdf011dd4..bf8487e1318c 100644 --- a/go.sum +++ b/go.sum @@ -527,8 +527,8 @@ github.com/aws/aws-sdk-go-v2/service/synthetics v1.37.1 h1:bWH6tBabdGAWbpbV3FFuk github.com/aws/aws-sdk-go-v2/service/synthetics v1.37.1/go.mod h1:BedpiqRrnMFzbm/g8ZuUnA1/TjAzT475hVNpUiNWpaM= github.com/aws/aws-sdk-go-v2/service/taxsettings v1.13.1 h1:1LsFNUBiAu20C/+DCTw3uhTmfgrenBJPGzNo5TkKPro= github.com/aws/aws-sdk-go-v2/service/taxsettings v1.13.1/go.mod h1:5WaC771ktHDgK0787PVcUQ98ptYdxmYTCK4ymuQC4OE= -github.com/aws/aws-sdk-go-v2/service/timestreaminfluxdb v1.12.0 h1:xcGhIgi2aePQJGpAiKrDgWEVjA3IXCcGAvF8Fxi8Ygc= -github.com/aws/aws-sdk-go-v2/service/timestreaminfluxdb v1.12.0/go.mod h1:jlm+1UibTlgwje1gX6OOOq2QgcYZVErsJax78P/Lfk0= +github.com/aws/aws-sdk-go-v2/service/timestreaminfluxdb v1.12.1 h1:izKMjMihlIJdADsWKFDu2Q3epWiT1ee5w2fHnvMQ80E= +github.com/aws/aws-sdk-go-v2/service/timestreaminfluxdb v1.12.1/go.mod h1:Sbgai5mZj8POGBYyMxpwajp6PNHF2lf/i5oLv3lI9qo= github.com/aws/aws-sdk-go-v2/service/timestreamquery v1.32.0 h1:SQ6dYo+XJUwoG3z8PKEvSvjY4G67rxFUqguDwDxQt6w= github.com/aws/aws-sdk-go-v2/service/timestreamquery v1.32.0/go.mod h1:RZa3kR+D9EnwQgTstoWOfPZNvzmkkdK9v31Se3IQS3Q= github.com/aws/aws-sdk-go-v2/service/timestreamwrite v1.32.0 h1:wdVe8h72FlW/o6r1311/cVHvG+K9fOfY5cQmldas+7I= From ca07a87fee08aab26ebd83a96c8fdd60ee275a8a Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 09:15:36 -0400 Subject: [PATCH 316/365] go get github.com/aws/aws-sdk-go-v2/service/timestreamquery. --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 4876306e1bd5..9e347f7a372f 100644 --- a/go.mod +++ b/go.mod @@ -253,7 +253,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/synthetics v1.37.1 github.com/aws/aws-sdk-go-v2/service/taxsettings v1.13.1 github.com/aws/aws-sdk-go-v2/service/timestreaminfluxdb v1.12.1 - github.com/aws/aws-sdk-go-v2/service/timestreamquery v1.32.0 + github.com/aws/aws-sdk-go-v2/service/timestreamquery v1.32.1 github.com/aws/aws-sdk-go-v2/service/timestreamwrite v1.32.0 github.com/aws/aws-sdk-go-v2/service/transcribe v1.48.0 github.com/aws/aws-sdk-go-v2/service/transfer v1.62.0 diff --git a/go.sum b/go.sum index bf8487e1318c..82885d741dc2 100644 --- a/go.sum +++ b/go.sum @@ -529,8 +529,8 @@ github.com/aws/aws-sdk-go-v2/service/taxsettings v1.13.1 h1:1LsFNUBiAu20C/+DCTw3 github.com/aws/aws-sdk-go-v2/service/taxsettings v1.13.1/go.mod h1:5WaC771ktHDgK0787PVcUQ98ptYdxmYTCK4ymuQC4OE= github.com/aws/aws-sdk-go-v2/service/timestreaminfluxdb v1.12.1 h1:izKMjMihlIJdADsWKFDu2Q3epWiT1ee5w2fHnvMQ80E= github.com/aws/aws-sdk-go-v2/service/timestreaminfluxdb v1.12.1/go.mod h1:Sbgai5mZj8POGBYyMxpwajp6PNHF2lf/i5oLv3lI9qo= -github.com/aws/aws-sdk-go-v2/service/timestreamquery v1.32.0 h1:SQ6dYo+XJUwoG3z8PKEvSvjY4G67rxFUqguDwDxQt6w= -github.com/aws/aws-sdk-go-v2/service/timestreamquery v1.32.0/go.mod h1:RZa3kR+D9EnwQgTstoWOfPZNvzmkkdK9v31Se3IQS3Q= +github.com/aws/aws-sdk-go-v2/service/timestreamquery v1.32.1 h1:TZ2ntXpVhqDub8hqOZnMJBFNETeYoFvy1gfTaIWB9vE= +github.com/aws/aws-sdk-go-v2/service/timestreamquery v1.32.1/go.mod h1:FSe0ILWhP9eujXt5nq9j3MkDDeLs3/Mv7xxG2MR4sN0= github.com/aws/aws-sdk-go-v2/service/timestreamwrite v1.32.0 h1:wdVe8h72FlW/o6r1311/cVHvG+K9fOfY5cQmldas+7I= github.com/aws/aws-sdk-go-v2/service/timestreamwrite v1.32.0/go.mod h1:rnxcp7Vl8LIFmTF7+dP2e/E1N4Yma0z0TLeWmBb+iNk= github.com/aws/aws-sdk-go-v2/service/transcribe v1.48.0 h1:t5DJ9WjlhFVJPsO/1WYsb2/HfQPj4vjozM+W/4wd+sU= From 188141659efdd5e1d32186a4c0c7b91602a17bd4 Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 09:15:37 -0400 Subject: [PATCH 317/365] go get github.com/aws/aws-sdk-go-v2/service/timestreamwrite. --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 9e347f7a372f..6723e63f2931 100644 --- a/go.mod +++ b/go.mod @@ -254,7 +254,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/taxsettings v1.13.1 github.com/aws/aws-sdk-go-v2/service/timestreaminfluxdb v1.12.1 github.com/aws/aws-sdk-go-v2/service/timestreamquery v1.32.1 - github.com/aws/aws-sdk-go-v2/service/timestreamwrite v1.32.0 + github.com/aws/aws-sdk-go-v2/service/timestreamwrite v1.32.1 github.com/aws/aws-sdk-go-v2/service/transcribe v1.48.0 github.com/aws/aws-sdk-go-v2/service/transfer v1.62.0 github.com/aws/aws-sdk-go-v2/service/verifiedpermissions v1.25.0 diff --git a/go.sum b/go.sum index 82885d741dc2..be352c0d1f9a 100644 --- a/go.sum +++ b/go.sum @@ -531,8 +531,8 @@ github.com/aws/aws-sdk-go-v2/service/timestreaminfluxdb v1.12.1 h1:izKMjMihlIJdA github.com/aws/aws-sdk-go-v2/service/timestreaminfluxdb v1.12.1/go.mod h1:Sbgai5mZj8POGBYyMxpwajp6PNHF2lf/i5oLv3lI9qo= github.com/aws/aws-sdk-go-v2/service/timestreamquery v1.32.1 h1:TZ2ntXpVhqDub8hqOZnMJBFNETeYoFvy1gfTaIWB9vE= github.com/aws/aws-sdk-go-v2/service/timestreamquery v1.32.1/go.mod h1:FSe0ILWhP9eujXt5nq9j3MkDDeLs3/Mv7xxG2MR4sN0= -github.com/aws/aws-sdk-go-v2/service/timestreamwrite v1.32.0 h1:wdVe8h72FlW/o6r1311/cVHvG+K9fOfY5cQmldas+7I= -github.com/aws/aws-sdk-go-v2/service/timestreamwrite v1.32.0/go.mod h1:rnxcp7Vl8LIFmTF7+dP2e/E1N4Yma0z0TLeWmBb+iNk= +github.com/aws/aws-sdk-go-v2/service/timestreamwrite v1.32.1 h1:zh3Jm1emj0IZeZAdimPPHwo2kscIYxxW4fCa+eL1SUE= +github.com/aws/aws-sdk-go-v2/service/timestreamwrite v1.32.1/go.mod h1:a74kIao0vSolFoqFuqoU/ZLbQdE7ean791+w7ke3UmI= github.com/aws/aws-sdk-go-v2/service/transcribe v1.48.0 h1:t5DJ9WjlhFVJPsO/1WYsb2/HfQPj4vjozM+W/4wd+sU= github.com/aws/aws-sdk-go-v2/service/transcribe v1.48.0/go.mod h1:9jZTwjgAOKAO+hfV1T2FhTkWSGKUx7J5Vc20YT7T7d0= github.com/aws/aws-sdk-go-v2/service/transfer v1.62.0 h1:dwFlqBAPn6zdLmJsw1rT+GhKSYgRxL/S2xThFCQBZjI= From c7d163427a38a5eb17a5631ae70754840715426e Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 09:15:38 -0400 Subject: [PATCH 318/365] go get github.com/aws/aws-sdk-go-v2/service/transcribe. --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 6723e63f2931..6abd5b8db9e1 100644 --- a/go.mod +++ b/go.mod @@ -255,7 +255,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/timestreaminfluxdb v1.12.1 github.com/aws/aws-sdk-go-v2/service/timestreamquery v1.32.1 github.com/aws/aws-sdk-go-v2/service/timestreamwrite v1.32.1 - github.com/aws/aws-sdk-go-v2/service/transcribe v1.48.0 + github.com/aws/aws-sdk-go-v2/service/transcribe v1.48.1 github.com/aws/aws-sdk-go-v2/service/transfer v1.62.0 github.com/aws/aws-sdk-go-v2/service/verifiedpermissions v1.25.0 github.com/aws/aws-sdk-go-v2/service/vpclattice v1.15.0 diff --git a/go.sum b/go.sum index be352c0d1f9a..d0104b70a403 100644 --- a/go.sum +++ b/go.sum @@ -533,8 +533,8 @@ github.com/aws/aws-sdk-go-v2/service/timestreamquery v1.32.1 h1:TZ2ntXpVhqDub8hq github.com/aws/aws-sdk-go-v2/service/timestreamquery v1.32.1/go.mod h1:FSe0ILWhP9eujXt5nq9j3MkDDeLs3/Mv7xxG2MR4sN0= github.com/aws/aws-sdk-go-v2/service/timestreamwrite v1.32.1 h1:zh3Jm1emj0IZeZAdimPPHwo2kscIYxxW4fCa+eL1SUE= github.com/aws/aws-sdk-go-v2/service/timestreamwrite v1.32.1/go.mod h1:a74kIao0vSolFoqFuqoU/ZLbQdE7ean791+w7ke3UmI= -github.com/aws/aws-sdk-go-v2/service/transcribe v1.48.0 h1:t5DJ9WjlhFVJPsO/1WYsb2/HfQPj4vjozM+W/4wd+sU= -github.com/aws/aws-sdk-go-v2/service/transcribe v1.48.0/go.mod h1:9jZTwjgAOKAO+hfV1T2FhTkWSGKUx7J5Vc20YT7T7d0= +github.com/aws/aws-sdk-go-v2/service/transcribe v1.48.1 h1:ydeDmQyYbaVk4Kk4rT7rasqar7WKizpIZc/MtTwx3XU= +github.com/aws/aws-sdk-go-v2/service/transcribe v1.48.1/go.mod h1:yebrHNdyMhIz0hKhQzHaKtr7GnfjCWfQXR8fI+biDOY= github.com/aws/aws-sdk-go-v2/service/transfer v1.62.0 h1:dwFlqBAPn6zdLmJsw1rT+GhKSYgRxL/S2xThFCQBZjI= github.com/aws/aws-sdk-go-v2/service/transfer v1.62.0/go.mod h1:T5A9C386y05G4eSf7qBCevBhAkz29/VgzEsz5Qxk/Ww= github.com/aws/aws-sdk-go-v2/service/verifiedpermissions v1.25.0 h1:rZQ1PyV+n6D+IckOc3GR6LaGhnQgzCsDavrMracHOYw= From e975f58c9bd6b163459cffda803b78820b46a744 Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 09:15:39 -0400 Subject: [PATCH 319/365] go get github.com/aws/aws-sdk-go-v2/service/transfer. --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 6abd5b8db9e1..dfdbacb414ff 100644 --- a/go.mod +++ b/go.mod @@ -256,7 +256,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/timestreamquery v1.32.1 github.com/aws/aws-sdk-go-v2/service/timestreamwrite v1.32.1 github.com/aws/aws-sdk-go-v2/service/transcribe v1.48.1 - github.com/aws/aws-sdk-go-v2/service/transfer v1.62.0 + github.com/aws/aws-sdk-go-v2/service/transfer v1.62.1 github.com/aws/aws-sdk-go-v2/service/verifiedpermissions v1.25.0 github.com/aws/aws-sdk-go-v2/service/vpclattice v1.15.0 github.com/aws/aws-sdk-go-v2/service/waf v1.27.0 diff --git a/go.sum b/go.sum index d0104b70a403..12397e3f4a77 100644 --- a/go.sum +++ b/go.sum @@ -535,8 +535,8 @@ github.com/aws/aws-sdk-go-v2/service/timestreamwrite v1.32.1 h1:zh3Jm1emj0IZeZAd github.com/aws/aws-sdk-go-v2/service/timestreamwrite v1.32.1/go.mod h1:a74kIao0vSolFoqFuqoU/ZLbQdE7ean791+w7ke3UmI= github.com/aws/aws-sdk-go-v2/service/transcribe v1.48.1 h1:ydeDmQyYbaVk4Kk4rT7rasqar7WKizpIZc/MtTwx3XU= github.com/aws/aws-sdk-go-v2/service/transcribe v1.48.1/go.mod h1:yebrHNdyMhIz0hKhQzHaKtr7GnfjCWfQXR8fI+biDOY= -github.com/aws/aws-sdk-go-v2/service/transfer v1.62.0 h1:dwFlqBAPn6zdLmJsw1rT+GhKSYgRxL/S2xThFCQBZjI= -github.com/aws/aws-sdk-go-v2/service/transfer v1.62.0/go.mod h1:T5A9C386y05G4eSf7qBCevBhAkz29/VgzEsz5Qxk/Ww= +github.com/aws/aws-sdk-go-v2/service/transfer v1.62.1 h1:h7ztYoDpj4P9TF6Tl22F2bK4ceiaxt6UR05KYvSXZ6Q= +github.com/aws/aws-sdk-go-v2/service/transfer v1.62.1/go.mod h1:pcob4Kb6kNQartCIk7k5DvcMgUWfFHgpvUmT6NJ+tfA= github.com/aws/aws-sdk-go-v2/service/verifiedpermissions v1.25.0 h1:rZQ1PyV+n6D+IckOc3GR6LaGhnQgzCsDavrMracHOYw= github.com/aws/aws-sdk-go-v2/service/verifiedpermissions v1.25.0/go.mod h1:CkYLyGgVZ7ub37T5YS8CXp/XdE1vCr2bzfp5qG5KKMs= github.com/aws/aws-sdk-go-v2/service/vpclattice v1.15.0 h1:nqnVrwFG3InW7aIDI30bAc1kzowt/mh/VHVqdvS++Xg= From 72eb91b0fd791a3b602e861f8432d677bf74f80c Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 09:15:40 -0400 Subject: [PATCH 320/365] go get github.com/aws/aws-sdk-go-v2/service/verifiedpermissions. --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index dfdbacb414ff..bb3c90636c98 100644 --- a/go.mod +++ b/go.mod @@ -257,7 +257,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/timestreamwrite v1.32.1 github.com/aws/aws-sdk-go-v2/service/transcribe v1.48.1 github.com/aws/aws-sdk-go-v2/service/transfer v1.62.1 - github.com/aws/aws-sdk-go-v2/service/verifiedpermissions v1.25.0 + github.com/aws/aws-sdk-go-v2/service/verifiedpermissions v1.25.1 github.com/aws/aws-sdk-go-v2/service/vpclattice v1.15.0 github.com/aws/aws-sdk-go-v2/service/waf v1.27.0 github.com/aws/aws-sdk-go-v2/service/wafregional v1.27.0 diff --git a/go.sum b/go.sum index 12397e3f4a77..6fa6b47148f5 100644 --- a/go.sum +++ b/go.sum @@ -537,8 +537,8 @@ github.com/aws/aws-sdk-go-v2/service/transcribe v1.48.1 h1:ydeDmQyYbaVk4Kk4rT7ra github.com/aws/aws-sdk-go-v2/service/transcribe v1.48.1/go.mod h1:yebrHNdyMhIz0hKhQzHaKtr7GnfjCWfQXR8fI+biDOY= github.com/aws/aws-sdk-go-v2/service/transfer v1.62.1 h1:h7ztYoDpj4P9TF6Tl22F2bK4ceiaxt6UR05KYvSXZ6Q= github.com/aws/aws-sdk-go-v2/service/transfer v1.62.1/go.mod h1:pcob4Kb6kNQartCIk7k5DvcMgUWfFHgpvUmT6NJ+tfA= -github.com/aws/aws-sdk-go-v2/service/verifiedpermissions v1.25.0 h1:rZQ1PyV+n6D+IckOc3GR6LaGhnQgzCsDavrMracHOYw= -github.com/aws/aws-sdk-go-v2/service/verifiedpermissions v1.25.0/go.mod h1:CkYLyGgVZ7ub37T5YS8CXp/XdE1vCr2bzfp5qG5KKMs= +github.com/aws/aws-sdk-go-v2/service/verifiedpermissions v1.25.1 h1:YfjBV97VKP7BzolXmhkpoIIhfW2bMcxHbMOiK+bXVjA= +github.com/aws/aws-sdk-go-v2/service/verifiedpermissions v1.25.1/go.mod h1:5Eyf+GB1CKpvbvZFT7MIO5Mk3gPHBcyx+WC7Jb1WeIs= github.com/aws/aws-sdk-go-v2/service/vpclattice v1.15.0 h1:nqnVrwFG3InW7aIDI30bAc1kzowt/mh/VHVqdvS++Xg= github.com/aws/aws-sdk-go-v2/service/vpclattice v1.15.0/go.mod h1:O1/ULTHJoedjmo0d6rPBGK1Lrj4KTIQRAR/f3zYo/gU= github.com/aws/aws-sdk-go-v2/service/waf v1.27.0 h1:L7KoAfR9t5g0kQbimmkVhBvFikDoRCSR+m0DjJM+eIM= From 84c18c995b552dbfe578d87e54ccf7effa9f0850 Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 09:15:41 -0400 Subject: [PATCH 321/365] go get github.com/aws/aws-sdk-go-v2/service/vpclattice. --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index bb3c90636c98..751da8209de3 100644 --- a/go.mod +++ b/go.mod @@ -258,7 +258,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/transcribe v1.48.1 github.com/aws/aws-sdk-go-v2/service/transfer v1.62.1 github.com/aws/aws-sdk-go-v2/service/verifiedpermissions v1.25.1 - github.com/aws/aws-sdk-go-v2/service/vpclattice v1.15.0 + github.com/aws/aws-sdk-go-v2/service/vpclattice v1.15.1 github.com/aws/aws-sdk-go-v2/service/waf v1.27.0 github.com/aws/aws-sdk-go-v2/service/wafregional v1.27.0 github.com/aws/aws-sdk-go-v2/service/wafv2 v1.64.0 diff --git a/go.sum b/go.sum index 6fa6b47148f5..64915d85ab33 100644 --- a/go.sum +++ b/go.sum @@ -539,8 +539,8 @@ github.com/aws/aws-sdk-go-v2/service/transfer v1.62.1 h1:h7ztYoDpj4P9TF6Tl22F2bK github.com/aws/aws-sdk-go-v2/service/transfer v1.62.1/go.mod h1:pcob4Kb6kNQartCIk7k5DvcMgUWfFHgpvUmT6NJ+tfA= github.com/aws/aws-sdk-go-v2/service/verifiedpermissions v1.25.1 h1:YfjBV97VKP7BzolXmhkpoIIhfW2bMcxHbMOiK+bXVjA= github.com/aws/aws-sdk-go-v2/service/verifiedpermissions v1.25.1/go.mod h1:5Eyf+GB1CKpvbvZFT7MIO5Mk3gPHBcyx+WC7Jb1WeIs= -github.com/aws/aws-sdk-go-v2/service/vpclattice v1.15.0 h1:nqnVrwFG3InW7aIDI30bAc1kzowt/mh/VHVqdvS++Xg= -github.com/aws/aws-sdk-go-v2/service/vpclattice v1.15.0/go.mod h1:O1/ULTHJoedjmo0d6rPBGK1Lrj4KTIQRAR/f3zYo/gU= +github.com/aws/aws-sdk-go-v2/service/vpclattice v1.15.1 h1:yNH2+yM+Fjdm7qyAkZ8jSvvGNJLY1B6Ojf0y1bxtnNU= +github.com/aws/aws-sdk-go-v2/service/vpclattice v1.15.1/go.mod h1:PIVQ2MlMezvs5/JN23nZQtdiCcXw1pck5Dc14UYXFys= github.com/aws/aws-sdk-go-v2/service/waf v1.27.0 h1:L7KoAfR9t5g0kQbimmkVhBvFikDoRCSR+m0DjJM+eIM= github.com/aws/aws-sdk-go-v2/service/waf v1.27.0/go.mod h1:t77KZK//vlR+u0G4EeMaHJPK5yz2dHLK5HUnglJlcQY= github.com/aws/aws-sdk-go-v2/service/wafregional v1.27.0 h1:PfgcWqQSbzK24px5xSOh1BMX9T5XTWsgL6Jag/FYbgY= From f2a8af9eb468bda9d97568305602af2672aa0199 Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 09:15:42 -0400 Subject: [PATCH 322/365] go get github.com/aws/aws-sdk-go-v2/service/waf. --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 751da8209de3..26d08cbae069 100644 --- a/go.mod +++ b/go.mod @@ -259,7 +259,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/transfer v1.62.1 github.com/aws/aws-sdk-go-v2/service/verifiedpermissions v1.25.1 github.com/aws/aws-sdk-go-v2/service/vpclattice v1.15.1 - github.com/aws/aws-sdk-go-v2/service/waf v1.27.0 + github.com/aws/aws-sdk-go-v2/service/waf v1.27.1 github.com/aws/aws-sdk-go-v2/service/wafregional v1.27.0 github.com/aws/aws-sdk-go-v2/service/wafv2 v1.64.0 github.com/aws/aws-sdk-go-v2/service/wellarchitected v1.36.0 diff --git a/go.sum b/go.sum index 64915d85ab33..2f4f82d637d2 100644 --- a/go.sum +++ b/go.sum @@ -541,8 +541,8 @@ github.com/aws/aws-sdk-go-v2/service/verifiedpermissions v1.25.1 h1:YfjBV97VKP7B github.com/aws/aws-sdk-go-v2/service/verifiedpermissions v1.25.1/go.mod h1:5Eyf+GB1CKpvbvZFT7MIO5Mk3gPHBcyx+WC7Jb1WeIs= github.com/aws/aws-sdk-go-v2/service/vpclattice v1.15.1 h1:yNH2+yM+Fjdm7qyAkZ8jSvvGNJLY1B6Ojf0y1bxtnNU= github.com/aws/aws-sdk-go-v2/service/vpclattice v1.15.1/go.mod h1:PIVQ2MlMezvs5/JN23nZQtdiCcXw1pck5Dc14UYXFys= -github.com/aws/aws-sdk-go-v2/service/waf v1.27.0 h1:L7KoAfR9t5g0kQbimmkVhBvFikDoRCSR+m0DjJM+eIM= -github.com/aws/aws-sdk-go-v2/service/waf v1.27.0/go.mod h1:t77KZK//vlR+u0G4EeMaHJPK5yz2dHLK5HUnglJlcQY= +github.com/aws/aws-sdk-go-v2/service/waf v1.27.1 h1:KXfH2cD/09HuOfEMy4+dOSgswvjsLlIq4MfZq54XVTE= +github.com/aws/aws-sdk-go-v2/service/waf v1.27.1/go.mod h1:3Ox1y+Ece8qh6sh5SwhIApyChTMjB9M+ZPkfFrso9E8= github.com/aws/aws-sdk-go-v2/service/wafregional v1.27.0 h1:PfgcWqQSbzK24px5xSOh1BMX9T5XTWsgL6Jag/FYbgY= github.com/aws/aws-sdk-go-v2/service/wafregional v1.27.0/go.mod h1:XdjVVW1OfR3FpAjY2oRcRCR0ESpH6rIgSe1Xbgr9LJw= github.com/aws/aws-sdk-go-v2/service/wafv2 v1.64.0 h1:A95Km+i98UC4iLDGXr0t3ySuVv7UUxn76nJwMupc5MA= From a75241f87307b0aa5c76bf6c7efe5f1ec8d09792 Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 09:15:43 -0400 Subject: [PATCH 323/365] go get github.com/aws/aws-sdk-go-v2/service/wafregional. --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 26d08cbae069..ce9e2284b4ec 100644 --- a/go.mod +++ b/go.mod @@ -260,7 +260,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/verifiedpermissions v1.25.1 github.com/aws/aws-sdk-go-v2/service/vpclattice v1.15.1 github.com/aws/aws-sdk-go-v2/service/waf v1.27.1 - github.com/aws/aws-sdk-go-v2/service/wafregional v1.27.0 + github.com/aws/aws-sdk-go-v2/service/wafregional v1.27.1 github.com/aws/aws-sdk-go-v2/service/wafv2 v1.64.0 github.com/aws/aws-sdk-go-v2/service/wellarchitected v1.36.0 github.com/aws/aws-sdk-go-v2/service/workspaces v1.59.0 diff --git a/go.sum b/go.sum index 2f4f82d637d2..db5914ab97cc 100644 --- a/go.sum +++ b/go.sum @@ -543,8 +543,8 @@ github.com/aws/aws-sdk-go-v2/service/vpclattice v1.15.1 h1:yNH2+yM+Fjdm7qyAkZ8jS github.com/aws/aws-sdk-go-v2/service/vpclattice v1.15.1/go.mod h1:PIVQ2MlMezvs5/JN23nZQtdiCcXw1pck5Dc14UYXFys= github.com/aws/aws-sdk-go-v2/service/waf v1.27.1 h1:KXfH2cD/09HuOfEMy4+dOSgswvjsLlIq4MfZq54XVTE= github.com/aws/aws-sdk-go-v2/service/waf v1.27.1/go.mod h1:3Ox1y+Ece8qh6sh5SwhIApyChTMjB9M+ZPkfFrso9E8= -github.com/aws/aws-sdk-go-v2/service/wafregional v1.27.0 h1:PfgcWqQSbzK24px5xSOh1BMX9T5XTWsgL6Jag/FYbgY= -github.com/aws/aws-sdk-go-v2/service/wafregional v1.27.0/go.mod h1:XdjVVW1OfR3FpAjY2oRcRCR0ESpH6rIgSe1Xbgr9LJw= +github.com/aws/aws-sdk-go-v2/service/wafregional v1.27.1 h1:cT33VIS4q26eNlgc0BmJ3PztzPYz9fc2dZLwITYqLbA= +github.com/aws/aws-sdk-go-v2/service/wafregional v1.27.1/go.mod h1:WTjSh2yRo99f7MXyTkQJ2+jrWyyiSKpUpVdeoPFBdqI= github.com/aws/aws-sdk-go-v2/service/wafv2 v1.64.0 h1:A95Km+i98UC4iLDGXr0t3ySuVv7UUxn76nJwMupc5MA= github.com/aws/aws-sdk-go-v2/service/wafv2 v1.64.0/go.mod h1:J3Ge5PKa1EojSrm1iY9mnH6NzTfTLEInw+BbRD03spw= github.com/aws/aws-sdk-go-v2/service/wellarchitected v1.36.0 h1:BI5uub7SmZkSzfd5Iu9FIxxyj6uG+UPDiHZ2BruFohY= From 9cfbb24972e86eb19ae971aab4898b0ab8dbdfc3 Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 09:15:44 -0400 Subject: [PATCH 324/365] go get github.com/aws/aws-sdk-go-v2/service/wafv2. --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index ce9e2284b4ec..33010bf68bb9 100644 --- a/go.mod +++ b/go.mod @@ -261,7 +261,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/vpclattice v1.15.1 github.com/aws/aws-sdk-go-v2/service/waf v1.27.1 github.com/aws/aws-sdk-go-v2/service/wafregional v1.27.1 - github.com/aws/aws-sdk-go-v2/service/wafv2 v1.64.0 + github.com/aws/aws-sdk-go-v2/service/wafv2 v1.64.1 github.com/aws/aws-sdk-go-v2/service/wellarchitected v1.36.0 github.com/aws/aws-sdk-go-v2/service/workspaces v1.59.0 github.com/aws/aws-sdk-go-v2/service/workspacesweb v1.28.0 diff --git a/go.sum b/go.sum index db5914ab97cc..fb64ace991d6 100644 --- a/go.sum +++ b/go.sum @@ -545,8 +545,8 @@ github.com/aws/aws-sdk-go-v2/service/waf v1.27.1 h1:KXfH2cD/09HuOfEMy4+dOSgswvjs github.com/aws/aws-sdk-go-v2/service/waf v1.27.1/go.mod h1:3Ox1y+Ece8qh6sh5SwhIApyChTMjB9M+ZPkfFrso9E8= github.com/aws/aws-sdk-go-v2/service/wafregional v1.27.1 h1:cT33VIS4q26eNlgc0BmJ3PztzPYz9fc2dZLwITYqLbA= github.com/aws/aws-sdk-go-v2/service/wafregional v1.27.1/go.mod h1:WTjSh2yRo99f7MXyTkQJ2+jrWyyiSKpUpVdeoPFBdqI= -github.com/aws/aws-sdk-go-v2/service/wafv2 v1.64.0 h1:A95Km+i98UC4iLDGXr0t3ySuVv7UUxn76nJwMupc5MA= -github.com/aws/aws-sdk-go-v2/service/wafv2 v1.64.0/go.mod h1:J3Ge5PKa1EojSrm1iY9mnH6NzTfTLEInw+BbRD03spw= +github.com/aws/aws-sdk-go-v2/service/wafv2 v1.64.1 h1:oP8eLLYrvxRaOKd8P2Cx0v6BnlBHp9I7ke0hVIVM7Ow= +github.com/aws/aws-sdk-go-v2/service/wafv2 v1.64.1/go.mod h1:hOrt3LfmAbeUsafBWZpHYkKLzX4Lhd1O9Fgy5Jahr/g= github.com/aws/aws-sdk-go-v2/service/wellarchitected v1.36.0 h1:BI5uub7SmZkSzfd5Iu9FIxxyj6uG+UPDiHZ2BruFohY= github.com/aws/aws-sdk-go-v2/service/wellarchitected v1.36.0/go.mod h1:sUmq+Loqe89MCpXoiitpyvgoWjpAiKlqhi+3T3tz1Dw= github.com/aws/aws-sdk-go-v2/service/workspaces v1.59.0 h1:1AtQvDj5ntF+feqJ9opboJwAY8O/pNzkxYmO7bfW6IM= From 508be36d8bf3532b6a595138baf80c02daec3c82 Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 09:15:46 -0400 Subject: [PATCH 325/365] go get github.com/aws/aws-sdk-go-v2/service/wellarchitected. --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 33010bf68bb9..ec2bee879d9e 100644 --- a/go.mod +++ b/go.mod @@ -262,7 +262,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/waf v1.27.1 github.com/aws/aws-sdk-go-v2/service/wafregional v1.27.1 github.com/aws/aws-sdk-go-v2/service/wafv2 v1.64.1 - github.com/aws/aws-sdk-go-v2/service/wellarchitected v1.36.0 + github.com/aws/aws-sdk-go-v2/service/wellarchitected v1.36.1 github.com/aws/aws-sdk-go-v2/service/workspaces v1.59.0 github.com/aws/aws-sdk-go-v2/service/workspacesweb v1.28.0 github.com/aws/aws-sdk-go-v2/service/xray v1.32.0 diff --git a/go.sum b/go.sum index fb64ace991d6..320f3c021798 100644 --- a/go.sum +++ b/go.sum @@ -547,8 +547,8 @@ github.com/aws/aws-sdk-go-v2/service/wafregional v1.27.1 h1:cT33VIS4q26eNlgc0BmJ github.com/aws/aws-sdk-go-v2/service/wafregional v1.27.1/go.mod h1:WTjSh2yRo99f7MXyTkQJ2+jrWyyiSKpUpVdeoPFBdqI= github.com/aws/aws-sdk-go-v2/service/wafv2 v1.64.1 h1:oP8eLLYrvxRaOKd8P2Cx0v6BnlBHp9I7ke0hVIVM7Ow= github.com/aws/aws-sdk-go-v2/service/wafv2 v1.64.1/go.mod h1:hOrt3LfmAbeUsafBWZpHYkKLzX4Lhd1O9Fgy5Jahr/g= -github.com/aws/aws-sdk-go-v2/service/wellarchitected v1.36.0 h1:BI5uub7SmZkSzfd5Iu9FIxxyj6uG+UPDiHZ2BruFohY= -github.com/aws/aws-sdk-go-v2/service/wellarchitected v1.36.0/go.mod h1:sUmq+Loqe89MCpXoiitpyvgoWjpAiKlqhi+3T3tz1Dw= +github.com/aws/aws-sdk-go-v2/service/wellarchitected v1.36.1 h1:u5PVGnXaDhUzAi496HM0AqSHLMxsH8AXDGI+hvGGceg= +github.com/aws/aws-sdk-go-v2/service/wellarchitected v1.36.1/go.mod h1:9T+lndTY7HGyy99UmFciMfeG8DvHJxQLgKcZkVpfxtA= github.com/aws/aws-sdk-go-v2/service/workspaces v1.59.0 h1:1AtQvDj5ntF+feqJ9opboJwAY8O/pNzkxYmO7bfW6IM= github.com/aws/aws-sdk-go-v2/service/workspaces v1.59.0/go.mod h1:b/koNSIXnO8bU3UVujwJo6q4A7E0PJ/NX9d7VtKy+AI= github.com/aws/aws-sdk-go-v2/service/workspacesweb v1.28.0 h1:AyIDajyS22zmmK+Nnf9M6CCrVmqdXDqUJEeejbBaZok= From 2fd20a063f146f835cb738f716682dbed22c575e Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 09:15:47 -0400 Subject: [PATCH 326/365] go get github.com/aws/aws-sdk-go-v2/service/workspaces. --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index ec2bee879d9e..d9d7a952d0dc 100644 --- a/go.mod +++ b/go.mod @@ -263,7 +263,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/wafregional v1.27.1 github.com/aws/aws-sdk-go-v2/service/wafv2 v1.64.1 github.com/aws/aws-sdk-go-v2/service/wellarchitected v1.36.1 - github.com/aws/aws-sdk-go-v2/service/workspaces v1.59.0 + github.com/aws/aws-sdk-go-v2/service/workspaces v1.59.1 github.com/aws/aws-sdk-go-v2/service/workspacesweb v1.28.0 github.com/aws/aws-sdk-go-v2/service/xray v1.32.0 github.com/aws/smithy-go v1.22.5 diff --git a/go.sum b/go.sum index 320f3c021798..0646c6853c0f 100644 --- a/go.sum +++ b/go.sum @@ -549,8 +549,8 @@ github.com/aws/aws-sdk-go-v2/service/wafv2 v1.64.1 h1:oP8eLLYrvxRaOKd8P2Cx0v6Bnl github.com/aws/aws-sdk-go-v2/service/wafv2 v1.64.1/go.mod h1:hOrt3LfmAbeUsafBWZpHYkKLzX4Lhd1O9Fgy5Jahr/g= github.com/aws/aws-sdk-go-v2/service/wellarchitected v1.36.1 h1:u5PVGnXaDhUzAi496HM0AqSHLMxsH8AXDGI+hvGGceg= github.com/aws/aws-sdk-go-v2/service/wellarchitected v1.36.1/go.mod h1:9T+lndTY7HGyy99UmFciMfeG8DvHJxQLgKcZkVpfxtA= -github.com/aws/aws-sdk-go-v2/service/workspaces v1.59.0 h1:1AtQvDj5ntF+feqJ9opboJwAY8O/pNzkxYmO7bfW6IM= -github.com/aws/aws-sdk-go-v2/service/workspaces v1.59.0/go.mod h1:b/koNSIXnO8bU3UVujwJo6q4A7E0PJ/NX9d7VtKy+AI= +github.com/aws/aws-sdk-go-v2/service/workspaces v1.59.1 h1:pHLxmX312+1Y4TPvAKS1cVS8ky4Lcqlv0tfmjvSQO7Y= +github.com/aws/aws-sdk-go-v2/service/workspaces v1.59.1/go.mod h1:GKRVmQy+p6FxWidtWnsx/qbxIKyu96pEYCdMrcuTgeM= github.com/aws/aws-sdk-go-v2/service/workspacesweb v1.28.0 h1:AyIDajyS22zmmK+Nnf9M6CCrVmqdXDqUJEeejbBaZok= github.com/aws/aws-sdk-go-v2/service/workspacesweb v1.28.0/go.mod h1:MVrQqUFcb/EQYr+JeF4/o/fp7LL1r7LuXaN1NqQJjs0= github.com/aws/aws-sdk-go-v2/service/xray v1.32.0 h1:PKSZrvIwbhjdi2Po+uQ4/uEG3AFf95Eov24WReGqCkA= From 6f78f13f60b6f6831a4d30944bea2dcec52ab6df Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 09:15:48 -0400 Subject: [PATCH 327/365] go get github.com/aws/aws-sdk-go-v2/service/workspacesweb. --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index d9d7a952d0dc..1c4ce4208f47 100644 --- a/go.mod +++ b/go.mod @@ -264,7 +264,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/wafv2 v1.64.1 github.com/aws/aws-sdk-go-v2/service/wellarchitected v1.36.1 github.com/aws/aws-sdk-go-v2/service/workspaces v1.59.1 - github.com/aws/aws-sdk-go-v2/service/workspacesweb v1.28.0 + github.com/aws/aws-sdk-go-v2/service/workspacesweb v1.28.1 github.com/aws/aws-sdk-go-v2/service/xray v1.32.0 github.com/aws/smithy-go v1.22.5 github.com/beevik/etree v1.5.1 diff --git a/go.sum b/go.sum index 0646c6853c0f..9058bdcedb73 100644 --- a/go.sum +++ b/go.sum @@ -551,8 +551,8 @@ github.com/aws/aws-sdk-go-v2/service/wellarchitected v1.36.1 h1:u5PVGnXaDhUzAi49 github.com/aws/aws-sdk-go-v2/service/wellarchitected v1.36.1/go.mod h1:9T+lndTY7HGyy99UmFciMfeG8DvHJxQLgKcZkVpfxtA= github.com/aws/aws-sdk-go-v2/service/workspaces v1.59.1 h1:pHLxmX312+1Y4TPvAKS1cVS8ky4Lcqlv0tfmjvSQO7Y= github.com/aws/aws-sdk-go-v2/service/workspaces v1.59.1/go.mod h1:GKRVmQy+p6FxWidtWnsx/qbxIKyu96pEYCdMrcuTgeM= -github.com/aws/aws-sdk-go-v2/service/workspacesweb v1.28.0 h1:AyIDajyS22zmmK+Nnf9M6CCrVmqdXDqUJEeejbBaZok= -github.com/aws/aws-sdk-go-v2/service/workspacesweb v1.28.0/go.mod h1:MVrQqUFcb/EQYr+JeF4/o/fp7LL1r7LuXaN1NqQJjs0= +github.com/aws/aws-sdk-go-v2/service/workspacesweb v1.28.1 h1:EUGE9p+/Yfs3gsuazAvn9yDY5k+yjaPZD117hum4BUo= +github.com/aws/aws-sdk-go-v2/service/workspacesweb v1.28.1/go.mod h1:gUs8tCNAp6COwgYIef9axji/vDiM5KXzjxXpSHrIz9U= github.com/aws/aws-sdk-go-v2/service/xray v1.32.0 h1:PKSZrvIwbhjdi2Po+uQ4/uEG3AFf95Eov24WReGqCkA= github.com/aws/aws-sdk-go-v2/service/xray v1.32.0/go.mod h1:kdMUXphf0aSOUtDYUyzWukPmeuX1okO3BoXmX97kBIk= github.com/aws/smithy-go v1.22.5 h1:P9ATCXPMb2mPjYBgueqJNCA5S9UfktsW0tTxi+a7eqw= From 047238cb8a8a69a26642d8e79909efd56d89ec3e Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 09:15:49 -0400 Subject: [PATCH 328/365] go get github.com/aws/aws-sdk-go-v2/service/xray. --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 1c4ce4208f47..2ccef460811a 100644 --- a/go.mod +++ b/go.mod @@ -265,7 +265,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/wellarchitected v1.36.1 github.com/aws/aws-sdk-go-v2/service/workspaces v1.59.1 github.com/aws/aws-sdk-go-v2/service/workspacesweb v1.28.1 - github.com/aws/aws-sdk-go-v2/service/xray v1.32.0 + github.com/aws/aws-sdk-go-v2/service/xray v1.32.1 github.com/aws/smithy-go v1.22.5 github.com/beevik/etree v1.5.1 github.com/cedar-policy/cedar-go v0.1.0 diff --git a/go.sum b/go.sum index 9058bdcedb73..d112b85933e3 100644 --- a/go.sum +++ b/go.sum @@ -553,8 +553,8 @@ github.com/aws/aws-sdk-go-v2/service/workspaces v1.59.1 h1:pHLxmX312+1Y4TPvAKS1c github.com/aws/aws-sdk-go-v2/service/workspaces v1.59.1/go.mod h1:GKRVmQy+p6FxWidtWnsx/qbxIKyu96pEYCdMrcuTgeM= github.com/aws/aws-sdk-go-v2/service/workspacesweb v1.28.1 h1:EUGE9p+/Yfs3gsuazAvn9yDY5k+yjaPZD117hum4BUo= github.com/aws/aws-sdk-go-v2/service/workspacesweb v1.28.1/go.mod h1:gUs8tCNAp6COwgYIef9axji/vDiM5KXzjxXpSHrIz9U= -github.com/aws/aws-sdk-go-v2/service/xray v1.32.0 h1:PKSZrvIwbhjdi2Po+uQ4/uEG3AFf95Eov24WReGqCkA= -github.com/aws/aws-sdk-go-v2/service/xray v1.32.0/go.mod h1:kdMUXphf0aSOUtDYUyzWukPmeuX1okO3BoXmX97kBIk= +github.com/aws/aws-sdk-go-v2/service/xray v1.32.1 h1:cEgIUA7e2jJX6dtw7QZHZC4Npgzc3qAhI6VgBAJhLys= +github.com/aws/aws-sdk-go-v2/service/xray v1.32.1/go.mod h1:yNBhxYF0/a7HxlvvPZ9pljsw3wSh6ooyxg5llocFwBQ= github.com/aws/smithy-go v1.22.5 h1:P9ATCXPMb2mPjYBgueqJNCA5S9UfktsW0tTxi+a7eqw= github.com/aws/smithy-go v1.22.5/go.mod h1:t1ufH5HMublsJYulve2RKmHDC15xu1f26kHCp/HgceI= github.com/beevik/etree v1.5.1 h1:TC3zyxYp+81wAmbsi8SWUpZCurbxa6S8RITYRSkNRwo= From e29e8bf5d9c546b339678e3c0eb4e1999e87d1dd Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 09:18:25 -0400 Subject: [PATCH 329/365] go get github.com/aws/aws-sdk-go-v2/service/codeartifact. --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 2ccef460811a..9dbdcd7760cf 100644 --- a/go.mod +++ b/go.mod @@ -61,7 +61,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/cloudtrail v1.50.1 github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.46.1 github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs v1.54.1 - github.com/aws/aws-sdk-go-v2/service/codeartifact v1.35.0 + github.com/aws/aws-sdk-go-v2/service/codeartifact v1.35.1 github.com/aws/aws-sdk-go-v2/service/codebuild v1.62.1 github.com/aws/aws-sdk-go-v2/service/codecatalyst v1.18.1 github.com/aws/aws-sdk-go-v2/service/codecommit v1.29.1 diff --git a/go.sum b/go.sum index d112b85933e3..eae89e3bfe93 100644 --- a/go.sum +++ b/go.sum @@ -133,8 +133,8 @@ github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.46.1 h1:jdaLx0Fle7TsNNpd4fe1C github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.46.1/go.mod h1:ZCCs9PKEJ2qp3sA1IH7VWYmEJnenvHoR1gEqDH6qNoI= github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs v1.54.1 h1:eKC7wj2CjC0dJcTPPZa33ku+mueglsEb3c8L8GMarnQ= github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs v1.54.1/go.mod h1:+Y32vrMhsQMA+q2x2cyQrox40n9RSkmZ6t+sGujF0ME= -github.com/aws/aws-sdk-go-v2/service/codeartifact v1.35.0 h1:9zqLfQka0S2AYwjlCYgefY5Efx7YqNknLQbSttU9AYc= -github.com/aws/aws-sdk-go-v2/service/codeartifact v1.35.0/go.mod h1:UYdYH203Cxv34VGcJUhjrggSuIVfxsscKutr5ifoIpQ= +github.com/aws/aws-sdk-go-v2/service/codeartifact v1.35.1 h1:q99yNK/Gt8XzQ7hfxIDlK97S9Vmjsg/R0ihMS4P+QPw= +github.com/aws/aws-sdk-go-v2/service/codeartifact v1.35.1/go.mod h1:VKj4D43shqsd8dQPL/ToiS07uq+T0EZrQAxSA/CpXJQ= github.com/aws/aws-sdk-go-v2/service/codebuild v1.62.1 h1:YgQ9aeWfU3BIvgATyl0QmrNJCJvptK1JGLOpSWyrAh8= github.com/aws/aws-sdk-go-v2/service/codebuild v1.62.1/go.mod h1:WOmjO0fUYhgcNaa2jaqqZ7mpJxcg08OmDcBeOManSrE= github.com/aws/aws-sdk-go-v2/service/codecatalyst v1.18.1 h1:w8Ehk06uqB2zyiKTnbkRUqdCiVe65GiLEXlsOXjPkPs= From 93b56f2a87731aa4b9982f53c8a73d4026186a4d Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 09:18:43 -0400 Subject: [PATCH 330/365] go get github.com/aws/aws-sdk-go-v2/service/detective. --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 9dbdcd7760cf..4288a2e52add 100644 --- a/go.mod +++ b/go.mod @@ -91,7 +91,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/datasync v1.51.1 github.com/aws/aws-sdk-go-v2/service/datazone v1.34.1 github.com/aws/aws-sdk-go-v2/service/dax v1.25.1 - github.com/aws/aws-sdk-go-v2/service/detective v1.34.0 + github.com/aws/aws-sdk-go-v2/service/detective v1.34.1 github.com/aws/aws-sdk-go-v2/service/devicefarm v1.32.1 github.com/aws/aws-sdk-go-v2/service/devopsguru v1.36.1 github.com/aws/aws-sdk-go-v2/service/directconnect v1.33.1 diff --git a/go.sum b/go.sum index eae89e3bfe93..cacf5113680e 100644 --- a/go.sum +++ b/go.sum @@ -193,8 +193,8 @@ github.com/aws/aws-sdk-go-v2/service/datazone v1.34.1 h1:7Vc7AKcOiWiUnEkuKIJym8m github.com/aws/aws-sdk-go-v2/service/datazone v1.34.1/go.mod h1:7cSev4IbgiJPWqraB12r4ieb73nrGFfOCvDwuGkTdJ8= github.com/aws/aws-sdk-go-v2/service/dax v1.25.1 h1:r3jbJgyI9lsSbQI8IMFEMmawIzEaD97nk54Xe/Voq0Q= github.com/aws/aws-sdk-go-v2/service/dax v1.25.1/go.mod h1:PIN6XFvWGPlyg8Mb/P3OEBq4Qh7Ue1CGXNen/kpGi0U= -github.com/aws/aws-sdk-go-v2/service/detective v1.34.0 h1:DT4ghZZR33Mra1LjVQbdVsJaldZE79OPWdffNi09j3k= -github.com/aws/aws-sdk-go-v2/service/detective v1.34.0/go.mod h1:kYvcZSnvieOVzGsCaXlcDb3XKLX4gtuymtMdYLijuNY= +github.com/aws/aws-sdk-go-v2/service/detective v1.34.1 h1:R1+JPYi15Sow0hS36G0vbg7A6Xk5u3vUxDXSm/wry4c= +github.com/aws/aws-sdk-go-v2/service/detective v1.34.1/go.mod h1:76n0ZZINIlFxYRJAJE036Es05+2B29Ry9ua6sbwmeNc= github.com/aws/aws-sdk-go-v2/service/devicefarm v1.32.1 h1:ReB2/CPevDweGjecwp8ya3vJsmhH6fziyhuYXbW7l8s= github.com/aws/aws-sdk-go-v2/service/devicefarm v1.32.1/go.mod h1:yiyj6Af9/jK0/N3KwTsNf8HGEMDMzwWuKNeNCv+xq0g= github.com/aws/aws-sdk-go-v2/service/devopsguru v1.36.1 h1:cvXl9NB4eCIcI2OJoGGUP1UTe3lgMwECXu6rKX4/fxA= From dc170514f6905a78a86120e83833911c5b3572a8 Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 09:18:55 -0400 Subject: [PATCH 331/365] go get github.com/aws/aws-sdk-go-v2/service/drs. --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 4288a2e52add..8a3452a3e4cf 100644 --- a/go.mod +++ b/go.mod @@ -99,7 +99,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/dlm v1.31.1 github.com/aws/aws-sdk-go-v2/service/docdb v1.43.0 github.com/aws/aws-sdk-go-v2/service/docdbelastic v1.16.1 - github.com/aws/aws-sdk-go-v2/service/drs v1.32.0 + github.com/aws/aws-sdk-go-v2/service/drs v1.32.1 github.com/aws/aws-sdk-go-v2/service/dsql v1.6.1 github.com/aws/aws-sdk-go-v2/service/dynamodb v1.45.1 github.com/aws/aws-sdk-go-v2/service/ec2 v1.238.0 diff --git a/go.sum b/go.sum index cacf5113680e..370c61ff6b31 100644 --- a/go.sum +++ b/go.sum @@ -209,8 +209,8 @@ github.com/aws/aws-sdk-go-v2/service/docdb v1.43.0 h1:KkTo1IeL3eI6bpAUzzte6byFZm github.com/aws/aws-sdk-go-v2/service/docdb v1.43.0/go.mod h1:LXUurR6oU0Mur/zfXB6ZUpWeC3nGOv4TZCvKvxyd1Ts= github.com/aws/aws-sdk-go-v2/service/docdbelastic v1.16.1 h1:NpdGerAwJLMan0qv9FZkMKurlfrfWpB/tuIxQGcIoKQ= github.com/aws/aws-sdk-go-v2/service/docdbelastic v1.16.1/go.mod h1:Rt5mVlAnNpabHok0G9i2aP2kuCXmZqUluUWu9Gr4L2o= -github.com/aws/aws-sdk-go-v2/service/drs v1.32.0 h1:wuzX+2Ch4ib6l/r6rlEN5EskxoUjPF6/0qPrI5nFOVg= -github.com/aws/aws-sdk-go-v2/service/drs v1.32.0/go.mod h1:OSZ68J2hGEP+i9eKdYYAK5oHL8IQxs07hVIbz2U19eM= +github.com/aws/aws-sdk-go-v2/service/drs v1.32.1 h1:Bnca8nXq9fzKneUaKGg6EPs6BRokMoCMjCjxOujPsok= +github.com/aws/aws-sdk-go-v2/service/drs v1.32.1/go.mod h1:GkjA421JeU3rZw+OtqtRhcTX5/oMV4eCktMTP49RjEY= github.com/aws/aws-sdk-go-v2/service/dsql v1.6.1 h1:9gsd5GS4hpu0Dy51zyUZbO48c94BaUL6445wO0puPfk= github.com/aws/aws-sdk-go-v2/service/dsql v1.6.1/go.mod h1:zCjUFiEqbIipUKwhROZhoOtW7bgBBfOXf1FSGc2uSRQ= github.com/aws/aws-sdk-go-v2/service/dynamodb v1.45.1 h1:gFD9BLrXox2Q5zxFwyD2OnGb40YYofQ/anaGxVP848Q= From ee283d967f90c0e73e0dcaf5e3118741fe3ffb4c Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 09:19:47 -0400 Subject: [PATCH 332/365] Run 'make clean-tidy'. --- tools/tfsdk2fw/go.mod | 526 ++++++++++----------- tools/tfsdk2fw/go.sum | 1052 ++++++++++++++++++++--------------------- 2 files changed, 789 insertions(+), 789 deletions(-) diff --git a/tools/tfsdk2fw/go.mod b/tools/tfsdk2fw/go.mod index 4ec678f04e4f..8f04ce38f793 100644 --- a/tools/tfsdk2fw/go.mod +++ b/tools/tfsdk2fw/go.mod @@ -18,272 +18,272 @@ require ( github.com/agext/levenshtein v1.2.3 // indirect github.com/apparentlymart/go-textseg/v15 v15.0.0 // indirect github.com/armon/go-radix v1.0.0 // indirect - github.com/aws/aws-sdk-go-v2 v1.37.0 // indirect + github.com/aws/aws-sdk-go-v2 v1.37.1 // indirect github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.7.0 // indirect - github.com/aws/aws-sdk-go-v2/config v1.30.1 // indirect - github.com/aws/aws-sdk-go-v2/credentials v1.18.1 // indirect - github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.18.0 // indirect - github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.18.1 // indirect - github.com/aws/aws-sdk-go-v2/internal/configsources v1.4.0 // indirect - github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.7.0 // indirect + github.com/aws/aws-sdk-go-v2/config v1.30.2 // indirect + github.com/aws/aws-sdk-go-v2/credentials v1.18.2 // indirect + github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.18.1 // indirect + github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.18.2 // indirect + github.com/aws/aws-sdk-go-v2/internal/configsources v1.4.1 // indirect + github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.7.1 // indirect github.com/aws/aws-sdk-go-v2/internal/ini v1.8.3 // indirect - github.com/aws/aws-sdk-go-v2/internal/v4a v1.4.0 // indirect - github.com/aws/aws-sdk-go-v2/service/accessanalyzer v1.41.0 // indirect - github.com/aws/aws-sdk-go-v2/service/account v1.25.0 // indirect - github.com/aws/aws-sdk-go-v2/service/acm v1.34.0 // indirect - github.com/aws/aws-sdk-go-v2/service/acmpca v1.41.0 // indirect - github.com/aws/aws-sdk-go-v2/service/amp v1.35.0 // indirect - github.com/aws/aws-sdk-go-v2/service/amplify v1.34.0 // indirect - github.com/aws/aws-sdk-go-v2/service/apigateway v1.32.0 // indirect - github.com/aws/aws-sdk-go-v2/service/apigatewayv2 v1.29.0 // indirect - github.com/aws/aws-sdk-go-v2/service/appconfig v1.39.0 // indirect - github.com/aws/aws-sdk-go-v2/service/appfabric v1.13.0 // indirect - github.com/aws/aws-sdk-go-v2/service/appflow v1.47.0 // indirect - github.com/aws/aws-sdk-go-v2/service/appintegrations v1.33.0 // indirect - github.com/aws/aws-sdk-go-v2/service/applicationautoscaling v1.37.0 // indirect - github.com/aws/aws-sdk-go-v2/service/applicationinsights v1.31.0 // indirect - github.com/aws/aws-sdk-go-v2/service/applicationsignals v1.12.0 // indirect - github.com/aws/aws-sdk-go-v2/service/appmesh v1.31.0 // indirect - github.com/aws/aws-sdk-go-v2/service/apprunner v1.35.0 // indirect - github.com/aws/aws-sdk-go-v2/service/appstream v1.46.0 // indirect - github.com/aws/aws-sdk-go-v2/service/appsync v1.48.0 // indirect - github.com/aws/aws-sdk-go-v2/service/athena v1.52.0 // indirect - github.com/aws/aws-sdk-go-v2/service/auditmanager v1.41.0 // indirect - github.com/aws/aws-sdk-go-v2/service/autoscaling v1.55.0 // indirect - github.com/aws/aws-sdk-go-v2/service/autoscalingplans v1.26.0 // indirect - github.com/aws/aws-sdk-go-v2/service/backup v1.44.0 // indirect - github.com/aws/aws-sdk-go-v2/service/batch v1.55.0 // indirect - github.com/aws/aws-sdk-go-v2/service/bcmdataexports v1.9.0 // indirect - github.com/aws/aws-sdk-go-v2/service/bedrock v1.40.0 // indirect - github.com/aws/aws-sdk-go-v2/service/bedrockagent v1.46.0 // indirect - github.com/aws/aws-sdk-go-v2/service/billing v1.3.0 // indirect - github.com/aws/aws-sdk-go-v2/service/budgets v1.33.0 // indirect - github.com/aws/aws-sdk-go-v2/service/chatbot v1.11.0 // indirect - github.com/aws/aws-sdk-go-v2/service/chime v1.37.0 // indirect - github.com/aws/aws-sdk-go-v2/service/chimesdkmediapipelines v1.23.0 // indirect - github.com/aws/aws-sdk-go-v2/service/chimesdkvoice v1.23.0 // indirect - github.com/aws/aws-sdk-go-v2/service/cleanrooms v1.27.0 // indirect - github.com/aws/aws-sdk-go-v2/service/cloud9 v1.30.0 // indirect - github.com/aws/aws-sdk-go-v2/service/cloudcontrol v1.25.0 // indirect - github.com/aws/aws-sdk-go-v2/service/cloudformation v1.62.0 // indirect - github.com/aws/aws-sdk-go-v2/service/cloudfront v1.48.0 // indirect - github.com/aws/aws-sdk-go-v2/service/cloudfrontkeyvaluestore v1.10.0 // indirect - github.com/aws/aws-sdk-go-v2/service/cloudhsmv2 v1.31.0 // indirect - github.com/aws/aws-sdk-go-v2/service/cloudsearch v1.28.0 // indirect - github.com/aws/aws-sdk-go-v2/service/cloudtrail v1.50.0 // indirect - github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.46.0 // indirect - github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs v1.54.0 // indirect - github.com/aws/aws-sdk-go-v2/service/codeartifact v1.35.0 // indirect - github.com/aws/aws-sdk-go-v2/service/codebuild v1.62.0 // indirect - github.com/aws/aws-sdk-go-v2/service/codecatalyst v1.18.0 // indirect - github.com/aws/aws-sdk-go-v2/service/codecommit v1.29.0 // indirect - github.com/aws/aws-sdk-go-v2/service/codeconnections v1.7.0 // indirect - github.com/aws/aws-sdk-go-v2/service/codedeploy v1.31.0 // indirect - github.com/aws/aws-sdk-go-v2/service/codeguruprofiler v1.26.0 // indirect - github.com/aws/aws-sdk-go-v2/service/codegurureviewer v1.31.0 // indirect - github.com/aws/aws-sdk-go-v2/service/codepipeline v1.43.0 // indirect - github.com/aws/aws-sdk-go-v2/service/codestarconnections v1.31.0 // indirect - github.com/aws/aws-sdk-go-v2/service/codestarnotifications v1.28.0 // indirect - github.com/aws/aws-sdk-go-v2/service/cognitoidentity v1.30.0 // indirect - github.com/aws/aws-sdk-go-v2/service/cognitoidentityprovider v1.54.0 // indirect - github.com/aws/aws-sdk-go-v2/service/comprehend v1.37.0 // indirect - github.com/aws/aws-sdk-go-v2/service/computeoptimizer v1.44.0 // indirect - github.com/aws/aws-sdk-go-v2/service/configservice v1.54.0 // indirect - github.com/aws/aws-sdk-go-v2/service/connect v1.132.0 // indirect - github.com/aws/aws-sdk-go-v2/service/connectcases v1.27.0 // indirect - github.com/aws/aws-sdk-go-v2/service/controltower v1.23.0 // indirect - github.com/aws/aws-sdk-go-v2/service/costandusagereportservice v1.30.0 // indirect - github.com/aws/aws-sdk-go-v2/service/costexplorer v1.52.0 // indirect - github.com/aws/aws-sdk-go-v2/service/costoptimizationhub v1.17.0 // indirect - github.com/aws/aws-sdk-go-v2/service/customerprofiles v1.48.0 // indirect - github.com/aws/aws-sdk-go-v2/service/databasemigrationservice v1.54.0 // indirect - github.com/aws/aws-sdk-go-v2/service/databrew v1.35.0 // indirect - github.com/aws/aws-sdk-go-v2/service/dataexchange v1.36.0 // indirect - github.com/aws/aws-sdk-go-v2/service/datapipeline v1.27.0 // indirect - github.com/aws/aws-sdk-go-v2/service/datasync v1.51.0 // indirect - github.com/aws/aws-sdk-go-v2/service/datazone v1.34.0 // indirect - github.com/aws/aws-sdk-go-v2/service/dax v1.25.0 // indirect - github.com/aws/aws-sdk-go-v2/service/detective v1.34.0 // indirect - github.com/aws/aws-sdk-go-v2/service/devicefarm v1.32.0 // indirect - github.com/aws/aws-sdk-go-v2/service/devopsguru v1.36.0 // indirect - github.com/aws/aws-sdk-go-v2/service/directconnect v1.33.0 // indirect - github.com/aws/aws-sdk-go-v2/service/directoryservice v1.32.0 // indirect - github.com/aws/aws-sdk-go-v2/service/dlm v1.31.0 // indirect - github.com/aws/aws-sdk-go-v2/service/docdb v1.42.0 // indirect - github.com/aws/aws-sdk-go-v2/service/docdbelastic v1.16.0 // indirect - github.com/aws/aws-sdk-go-v2/service/drs v1.32.0 // indirect - github.com/aws/aws-sdk-go-v2/service/dsql v1.6.0 // indirect - github.com/aws/aws-sdk-go-v2/service/dynamodb v1.45.0 // indirect - github.com/aws/aws-sdk-go-v2/service/ec2 v1.237.0 // indirect - github.com/aws/aws-sdk-go-v2/service/ecr v1.47.0 // indirect - github.com/aws/aws-sdk-go-v2/service/ecrpublic v1.34.0 // indirect - github.com/aws/aws-sdk-go-v2/service/ecs v1.61.0 // indirect - github.com/aws/aws-sdk-go-v2/service/efs v1.37.0 // indirect - github.com/aws/aws-sdk-go-v2/service/eks v1.67.0 // indirect - github.com/aws/aws-sdk-go-v2/service/elasticache v1.47.0 // indirect - github.com/aws/aws-sdk-go-v2/service/elasticbeanstalk v1.30.0 // indirect - github.com/aws/aws-sdk-go-v2/service/elasticloadbalancing v1.30.0 // indirect - github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2 v1.47.0 // indirect - github.com/aws/aws-sdk-go-v2/service/elasticsearchservice v1.34.0 // indirect - github.com/aws/aws-sdk-go-v2/service/elastictranscoder v1.29.0 // indirect - github.com/aws/aws-sdk-go-v2/service/emr v1.51.0 // indirect - github.com/aws/aws-sdk-go-v2/service/emrcontainers v1.36.0 // indirect - github.com/aws/aws-sdk-go-v2/service/emrserverless v1.33.0 // indirect - github.com/aws/aws-sdk-go-v2/service/eventbridge v1.42.0 // indirect - github.com/aws/aws-sdk-go-v2/service/evidently v1.25.0 // indirect - github.com/aws/aws-sdk-go-v2/service/evs v1.1.0 // indirect - github.com/aws/aws-sdk-go-v2/service/finspace v1.30.0 // indirect - github.com/aws/aws-sdk-go-v2/service/firehose v1.38.0 // indirect - github.com/aws/aws-sdk-go-v2/service/fis v1.34.0 // indirect - github.com/aws/aws-sdk-go-v2/service/fms v1.41.0 // indirect - github.com/aws/aws-sdk-go-v2/service/fsx v1.56.0 // indirect - github.com/aws/aws-sdk-go-v2/service/gamelift v1.43.0 // indirect - github.com/aws/aws-sdk-go-v2/service/glacier v1.28.0 // indirect - github.com/aws/aws-sdk-go-v2/service/globalaccelerator v1.31.0 // indirect - github.com/aws/aws-sdk-go-v2/service/glue v1.120.0 // indirect - github.com/aws/aws-sdk-go-v2/service/grafana v1.28.0 // indirect - github.com/aws/aws-sdk-go-v2/service/greengrass v1.29.0 // indirect - github.com/aws/aws-sdk-go-v2/service/groundstation v1.34.0 // indirect - github.com/aws/aws-sdk-go-v2/service/guardduty v1.58.0 // indirect - github.com/aws/aws-sdk-go-v2/service/healthlake v1.31.0 // indirect - github.com/aws/aws-sdk-go-v2/service/iam v1.44.0 // indirect - github.com/aws/aws-sdk-go-v2/service/identitystore v1.29.0 // indirect - github.com/aws/aws-sdk-go-v2/service/imagebuilder v1.43.0 // indirect - github.com/aws/aws-sdk-go-v2/service/inspector v1.27.0 // indirect - github.com/aws/aws-sdk-go-v2/service/inspector2 v1.39.0 // indirect + github.com/aws/aws-sdk-go-v2/internal/v4a v1.4.1 // indirect + github.com/aws/aws-sdk-go-v2/service/accessanalyzer v1.41.1 // indirect + github.com/aws/aws-sdk-go-v2/service/account v1.25.1 // indirect + github.com/aws/aws-sdk-go-v2/service/acm v1.34.1 // indirect + github.com/aws/aws-sdk-go-v2/service/acmpca v1.41.1 // indirect + github.com/aws/aws-sdk-go-v2/service/amp v1.35.1 // indirect + github.com/aws/aws-sdk-go-v2/service/amplify v1.34.1 // indirect + github.com/aws/aws-sdk-go-v2/service/apigateway v1.32.1 // indirect + github.com/aws/aws-sdk-go-v2/service/apigatewayv2 v1.29.1 // indirect + github.com/aws/aws-sdk-go-v2/service/appconfig v1.39.1 // indirect + github.com/aws/aws-sdk-go-v2/service/appfabric v1.13.1 // indirect + github.com/aws/aws-sdk-go-v2/service/appflow v1.47.1 // indirect + github.com/aws/aws-sdk-go-v2/service/appintegrations v1.33.1 // indirect + github.com/aws/aws-sdk-go-v2/service/applicationautoscaling v1.37.1 // indirect + github.com/aws/aws-sdk-go-v2/service/applicationinsights v1.31.1 // indirect + github.com/aws/aws-sdk-go-v2/service/applicationsignals v1.12.1 // indirect + github.com/aws/aws-sdk-go-v2/service/appmesh v1.31.1 // indirect + github.com/aws/aws-sdk-go-v2/service/apprunner v1.35.1 // indirect + github.com/aws/aws-sdk-go-v2/service/appstream v1.46.1 // indirect + github.com/aws/aws-sdk-go-v2/service/appsync v1.48.1 // indirect + github.com/aws/aws-sdk-go-v2/service/athena v1.52.1 // indirect + github.com/aws/aws-sdk-go-v2/service/auditmanager v1.41.1 // indirect + github.com/aws/aws-sdk-go-v2/service/autoscaling v1.55.1 // indirect + github.com/aws/aws-sdk-go-v2/service/autoscalingplans v1.26.1 // indirect + github.com/aws/aws-sdk-go-v2/service/backup v1.44.1 // indirect + github.com/aws/aws-sdk-go-v2/service/batch v1.55.1 // indirect + github.com/aws/aws-sdk-go-v2/service/bcmdataexports v1.9.1 // indirect + github.com/aws/aws-sdk-go-v2/service/bedrock v1.40.1 // indirect + github.com/aws/aws-sdk-go-v2/service/bedrockagent v1.46.1 // indirect + github.com/aws/aws-sdk-go-v2/service/billing v1.3.1 // indirect + github.com/aws/aws-sdk-go-v2/service/budgets v1.33.1 // indirect + github.com/aws/aws-sdk-go-v2/service/chatbot v1.11.1 // indirect + github.com/aws/aws-sdk-go-v2/service/chime v1.37.1 // indirect + github.com/aws/aws-sdk-go-v2/service/chimesdkmediapipelines v1.23.1 // indirect + github.com/aws/aws-sdk-go-v2/service/chimesdkvoice v1.23.1 // indirect + github.com/aws/aws-sdk-go-v2/service/cleanrooms v1.27.1 // indirect + github.com/aws/aws-sdk-go-v2/service/cloud9 v1.30.1 // indirect + github.com/aws/aws-sdk-go-v2/service/cloudcontrol v1.25.1 // indirect + github.com/aws/aws-sdk-go-v2/service/cloudformation v1.62.1 // indirect + github.com/aws/aws-sdk-go-v2/service/cloudfront v1.49.0 // indirect + github.com/aws/aws-sdk-go-v2/service/cloudfrontkeyvaluestore v1.10.1 // indirect + github.com/aws/aws-sdk-go-v2/service/cloudhsmv2 v1.31.1 // indirect + github.com/aws/aws-sdk-go-v2/service/cloudsearch v1.28.1 // indirect + github.com/aws/aws-sdk-go-v2/service/cloudtrail v1.50.1 // indirect + github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.46.1 // indirect + github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs v1.54.1 // indirect + github.com/aws/aws-sdk-go-v2/service/codeartifact v1.35.1 // indirect + github.com/aws/aws-sdk-go-v2/service/codebuild v1.62.1 // indirect + github.com/aws/aws-sdk-go-v2/service/codecatalyst v1.18.1 // indirect + github.com/aws/aws-sdk-go-v2/service/codecommit v1.29.1 // indirect + github.com/aws/aws-sdk-go-v2/service/codeconnections v1.7.1 // indirect + github.com/aws/aws-sdk-go-v2/service/codedeploy v1.31.1 // indirect + github.com/aws/aws-sdk-go-v2/service/codeguruprofiler v1.26.1 // indirect + github.com/aws/aws-sdk-go-v2/service/codegurureviewer v1.31.1 // indirect + github.com/aws/aws-sdk-go-v2/service/codepipeline v1.43.1 // indirect + github.com/aws/aws-sdk-go-v2/service/codestarconnections v1.31.1 // indirect + github.com/aws/aws-sdk-go-v2/service/codestarnotifications v1.28.1 // indirect + github.com/aws/aws-sdk-go-v2/service/cognitoidentity v1.30.1 // indirect + github.com/aws/aws-sdk-go-v2/service/cognitoidentityprovider v1.54.1 // indirect + github.com/aws/aws-sdk-go-v2/service/comprehend v1.37.1 // indirect + github.com/aws/aws-sdk-go-v2/service/computeoptimizer v1.44.1 // indirect + github.com/aws/aws-sdk-go-v2/service/configservice v1.54.1 // indirect + github.com/aws/aws-sdk-go-v2/service/connect v1.132.1 // indirect + github.com/aws/aws-sdk-go-v2/service/connectcases v1.27.1 // indirect + github.com/aws/aws-sdk-go-v2/service/controltower v1.23.1 // indirect + github.com/aws/aws-sdk-go-v2/service/costandusagereportservice v1.30.1 // indirect + github.com/aws/aws-sdk-go-v2/service/costexplorer v1.52.1 // indirect + github.com/aws/aws-sdk-go-v2/service/costoptimizationhub v1.17.1 // indirect + github.com/aws/aws-sdk-go-v2/service/customerprofiles v1.48.1 // indirect + github.com/aws/aws-sdk-go-v2/service/databasemigrationservice v1.54.1 // indirect + github.com/aws/aws-sdk-go-v2/service/databrew v1.35.1 // indirect + github.com/aws/aws-sdk-go-v2/service/dataexchange v1.36.1 // indirect + github.com/aws/aws-sdk-go-v2/service/datapipeline v1.27.1 // indirect + github.com/aws/aws-sdk-go-v2/service/datasync v1.51.1 // indirect + github.com/aws/aws-sdk-go-v2/service/datazone v1.34.1 // indirect + github.com/aws/aws-sdk-go-v2/service/dax v1.25.1 // indirect + github.com/aws/aws-sdk-go-v2/service/detective v1.34.1 // indirect + github.com/aws/aws-sdk-go-v2/service/devicefarm v1.32.1 // indirect + github.com/aws/aws-sdk-go-v2/service/devopsguru v1.36.1 // indirect + github.com/aws/aws-sdk-go-v2/service/directconnect v1.33.1 // indirect + github.com/aws/aws-sdk-go-v2/service/directoryservice v1.33.0 // indirect + github.com/aws/aws-sdk-go-v2/service/dlm v1.31.1 // indirect + github.com/aws/aws-sdk-go-v2/service/docdb v1.43.0 // indirect + github.com/aws/aws-sdk-go-v2/service/docdbelastic v1.16.1 // indirect + github.com/aws/aws-sdk-go-v2/service/drs v1.32.1 // indirect + github.com/aws/aws-sdk-go-v2/service/dsql v1.6.1 // indirect + github.com/aws/aws-sdk-go-v2/service/dynamodb v1.45.1 // indirect + github.com/aws/aws-sdk-go-v2/service/ec2 v1.238.0 // indirect + github.com/aws/aws-sdk-go-v2/service/ecr v1.47.1 // indirect + github.com/aws/aws-sdk-go-v2/service/ecrpublic v1.34.1 // indirect + github.com/aws/aws-sdk-go-v2/service/ecs v1.61.1 // indirect + github.com/aws/aws-sdk-go-v2/service/efs v1.37.1 // indirect + github.com/aws/aws-sdk-go-v2/service/eks v1.67.1 // indirect + github.com/aws/aws-sdk-go-v2/service/elasticache v1.47.1 // indirect + github.com/aws/aws-sdk-go-v2/service/elasticbeanstalk v1.30.1 // indirect + github.com/aws/aws-sdk-go-v2/service/elasticloadbalancing v1.30.1 // indirect + github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2 v1.47.1 // indirect + github.com/aws/aws-sdk-go-v2/service/elasticsearchservice v1.34.1 // indirect + github.com/aws/aws-sdk-go-v2/service/elastictranscoder v1.29.1 // indirect + github.com/aws/aws-sdk-go-v2/service/emr v1.51.1 // indirect + github.com/aws/aws-sdk-go-v2/service/emrcontainers v1.36.1 // indirect + github.com/aws/aws-sdk-go-v2/service/emrserverless v1.33.1 // indirect + github.com/aws/aws-sdk-go-v2/service/eventbridge v1.42.1 // indirect + github.com/aws/aws-sdk-go-v2/service/evidently v1.25.1 // indirect + github.com/aws/aws-sdk-go-v2/service/evs v1.1.1 // indirect + github.com/aws/aws-sdk-go-v2/service/finspace v1.30.1 // indirect + github.com/aws/aws-sdk-go-v2/service/firehose v1.38.1 // indirect + github.com/aws/aws-sdk-go-v2/service/fis v1.34.1 // indirect + github.com/aws/aws-sdk-go-v2/service/fms v1.41.1 // indirect + github.com/aws/aws-sdk-go-v2/service/fsx v1.56.1 // indirect + github.com/aws/aws-sdk-go-v2/service/gamelift v1.43.1 // indirect + github.com/aws/aws-sdk-go-v2/service/glacier v1.28.1 // indirect + github.com/aws/aws-sdk-go-v2/service/globalaccelerator v1.31.1 // indirect + github.com/aws/aws-sdk-go-v2/service/glue v1.120.1 // indirect + github.com/aws/aws-sdk-go-v2/service/grafana v1.28.1 // indirect + github.com/aws/aws-sdk-go-v2/service/greengrass v1.29.1 // indirect + github.com/aws/aws-sdk-go-v2/service/groundstation v1.34.1 // indirect + github.com/aws/aws-sdk-go-v2/service/guardduty v1.58.1 // indirect + github.com/aws/aws-sdk-go-v2/service/healthlake v1.31.1 // indirect + github.com/aws/aws-sdk-go-v2/service/iam v1.44.1 // indirect + github.com/aws/aws-sdk-go-v2/service/identitystore v1.29.1 // indirect + github.com/aws/aws-sdk-go-v2/service/imagebuilder v1.43.1 // indirect + github.com/aws/aws-sdk-go-v2/service/inspector v1.27.1 // indirect + github.com/aws/aws-sdk-go-v2/service/inspector2 v1.39.1 // indirect github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.13.0 // indirect - github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.8.0 // indirect - github.com/aws/aws-sdk-go-v2/service/internal/endpoint-discovery v1.11.0 // indirect - github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.13.0 // indirect - github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.19.0 // indirect - github.com/aws/aws-sdk-go-v2/service/internetmonitor v1.22.0 // indirect - github.com/aws/aws-sdk-go-v2/service/invoicing v1.3.0 // indirect - github.com/aws/aws-sdk-go-v2/service/iot v1.65.0 // indirect - github.com/aws/aws-sdk-go-v2/service/ivs v1.44.0 // indirect - github.com/aws/aws-sdk-go-v2/service/ivschat v1.18.0 // indirect - github.com/aws/aws-sdk-go-v2/service/kafka v1.40.0 // indirect - github.com/aws/aws-sdk-go-v2/service/kafkaconnect v1.24.1 // indirect - github.com/aws/aws-sdk-go-v2/service/kendra v1.57.0 // indirect - github.com/aws/aws-sdk-go-v2/service/keyspaces v1.20.0 // indirect - github.com/aws/aws-sdk-go-v2/service/kinesis v1.36.0 // indirect - github.com/aws/aws-sdk-go-v2/service/kinesisanalytics v1.27.0 // indirect - github.com/aws/aws-sdk-go-v2/service/kinesisanalyticsv2 v1.33.0 // indirect - github.com/aws/aws-sdk-go-v2/service/kinesisvideo v1.29.0 // indirect - github.com/aws/aws-sdk-go-v2/service/kms v1.42.0 // indirect - github.com/aws/aws-sdk-go-v2/service/lakeformation v1.42.0 // indirect - github.com/aws/aws-sdk-go-v2/service/lambda v1.74.0 // indirect - github.com/aws/aws-sdk-go-v2/service/launchwizard v1.10.0 // indirect - github.com/aws/aws-sdk-go-v2/service/lexmodelbuildingservice v1.30.0 // indirect - github.com/aws/aws-sdk-go-v2/service/lexmodelsv2 v1.53.0 // indirect - github.com/aws/aws-sdk-go-v2/service/licensemanager v1.33.0 // indirect - github.com/aws/aws-sdk-go-v2/service/lightsail v1.44.0 // indirect - github.com/aws/aws-sdk-go-v2/service/location v1.46.0 // indirect - github.com/aws/aws-sdk-go-v2/service/lookoutmetrics v1.33.0 // indirect - github.com/aws/aws-sdk-go-v2/service/m2 v1.22.0 // indirect - github.com/aws/aws-sdk-go-v2/service/macie2 v1.46.0 // indirect - github.com/aws/aws-sdk-go-v2/service/mediaconnect v1.41.0 // indirect - github.com/aws/aws-sdk-go-v2/service/mediaconvert v1.78.0 // indirect - github.com/aws/aws-sdk-go-v2/service/medialive v1.77.0 // indirect - github.com/aws/aws-sdk-go-v2/service/mediapackage v1.36.0 // indirect - github.com/aws/aws-sdk-go-v2/service/mediapackagev2 v1.27.0 // indirect - github.com/aws/aws-sdk-go-v2/service/mediapackagevod v1.36.0 // indirect - github.com/aws/aws-sdk-go-v2/service/mediastore v1.26.0 // indirect - github.com/aws/aws-sdk-go-v2/service/memorydb v1.28.0 // indirect - github.com/aws/aws-sdk-go-v2/service/mgn v1.34.0 // indirect - github.com/aws/aws-sdk-go-v2/service/mq v1.30.0 // indirect - github.com/aws/aws-sdk-go-v2/service/mwaa v1.36.0 // indirect - github.com/aws/aws-sdk-go-v2/service/neptune v1.38.0 // indirect - github.com/aws/aws-sdk-go-v2/service/neptunegraph v1.18.0 // indirect - github.com/aws/aws-sdk-go-v2/service/networkfirewall v1.52.0 // indirect - github.com/aws/aws-sdk-go-v2/service/networkmanager v1.36.0 // indirect - github.com/aws/aws-sdk-go-v2/service/networkmonitor v1.9.0 // indirect - github.com/aws/aws-sdk-go-v2/service/notifications v1.3.0 // indirect - github.com/aws/aws-sdk-go-v2/service/notificationscontacts v1.2.0 // indirect - github.com/aws/aws-sdk-go-v2/service/oam v1.19.0 // indirect - github.com/aws/aws-sdk-go-v2/service/opensearch v1.48.0 // indirect - github.com/aws/aws-sdk-go-v2/service/opensearchserverless v1.21.0 // indirect - github.com/aws/aws-sdk-go-v2/service/organizations v1.40.0 // indirect - github.com/aws/aws-sdk-go-v2/service/osis v1.16.0 // indirect - github.com/aws/aws-sdk-go-v2/service/outposts v1.53.0 // indirect - github.com/aws/aws-sdk-go-v2/service/paymentcryptography v1.20.0 // indirect - github.com/aws/aws-sdk-go-v2/service/pcaconnectorad v1.12.0 // indirect - github.com/aws/aws-sdk-go-v2/service/pcs v1.7.0 // indirect - github.com/aws/aws-sdk-go-v2/service/pinpoint v1.36.0 // indirect - github.com/aws/aws-sdk-go-v2/service/pinpointsmsvoicev2 v1.21.0 // indirect - github.com/aws/aws-sdk-go-v2/service/pipes v1.20.0 // indirect - github.com/aws/aws-sdk-go-v2/service/polly v1.49.0 // indirect - github.com/aws/aws-sdk-go-v2/service/pricing v1.36.0 // indirect - github.com/aws/aws-sdk-go-v2/service/qbusiness v1.29.0 // indirect - github.com/aws/aws-sdk-go-v2/service/qldb v1.27.0 // indirect - github.com/aws/aws-sdk-go-v2/service/quicksight v1.89.0 // indirect - github.com/aws/aws-sdk-go-v2/service/ram v1.31.0 // indirect - github.com/aws/aws-sdk-go-v2/service/rbin v1.23.0 // indirect - github.com/aws/aws-sdk-go-v2/service/rds v1.100.0 // indirect - github.com/aws/aws-sdk-go-v2/service/redshift v1.55.0 // indirect - github.com/aws/aws-sdk-go-v2/service/redshiftdata v1.34.0 // indirect - github.com/aws/aws-sdk-go-v2/service/redshiftserverless v1.28.0 // indirect - github.com/aws/aws-sdk-go-v2/service/rekognition v1.48.0 // indirect - github.com/aws/aws-sdk-go-v2/service/resiliencehub v1.31.0 // indirect - github.com/aws/aws-sdk-go-v2/service/resourceexplorer2 v1.18.0 // indirect - github.com/aws/aws-sdk-go-v2/service/resourcegroups v1.30.0 // indirect - github.com/aws/aws-sdk-go-v2/service/resourcegroupstaggingapi v1.27.0 // indirect - github.com/aws/aws-sdk-go-v2/service/rolesanywhere v1.18.0 // indirect - github.com/aws/aws-sdk-go-v2/service/route53 v1.54.0 // indirect - github.com/aws/aws-sdk-go-v2/service/route53domains v1.30.0 // indirect - github.com/aws/aws-sdk-go-v2/service/route53profiles v1.6.0 // indirect - github.com/aws/aws-sdk-go-v2/service/route53recoverycontrolconfig v1.28.0 // indirect - github.com/aws/aws-sdk-go-v2/service/route53recoveryreadiness v1.23.0 // indirect - github.com/aws/aws-sdk-go-v2/service/route53resolver v1.37.0 // indirect - github.com/aws/aws-sdk-go-v2/service/rum v1.25.0 // indirect - github.com/aws/aws-sdk-go-v2/service/s3 v1.85.0 // indirect - github.com/aws/aws-sdk-go-v2/service/s3control v1.61.0 // indirect - github.com/aws/aws-sdk-go-v2/service/s3outposts v1.30.0 // indirect - github.com/aws/aws-sdk-go-v2/service/s3tables v1.7.0 // indirect - github.com/aws/aws-sdk-go-v2/service/sagemaker v1.203.0 // indirect - github.com/aws/aws-sdk-go-v2/service/scheduler v1.14.0 // indirect - github.com/aws/aws-sdk-go-v2/service/schemas v1.30.0 // indirect - github.com/aws/aws-sdk-go-v2/service/secretsmanager v1.36.0 // indirect - github.com/aws/aws-sdk-go-v2/service/securityhub v1.59.0 // indirect - github.com/aws/aws-sdk-go-v2/service/securitylake v1.21.0 // indirect - github.com/aws/aws-sdk-go-v2/service/serverlessapplicationrepository v1.26.0 // indirect - github.com/aws/aws-sdk-go-v2/service/servicecatalog v1.35.0 // indirect - github.com/aws/aws-sdk-go-v2/service/servicecatalogappregistry v1.32.0 // indirect - github.com/aws/aws-sdk-go-v2/service/servicediscovery v1.36.0 // indirect - github.com/aws/aws-sdk-go-v2/service/servicequotas v1.29.0 // indirect - github.com/aws/aws-sdk-go-v2/service/ses v1.31.0 // indirect - github.com/aws/aws-sdk-go-v2/service/sesv2 v1.48.0 // indirect - github.com/aws/aws-sdk-go-v2/service/sfn v1.36.0 // indirect - github.com/aws/aws-sdk-go-v2/service/shield v1.31.0 // indirect - github.com/aws/aws-sdk-go-v2/service/signer v1.28.0 // indirect - github.com/aws/aws-sdk-go-v2/service/sns v1.35.0 // indirect - github.com/aws/aws-sdk-go-v2/service/sqs v1.39.0 // indirect - github.com/aws/aws-sdk-go-v2/service/ssm v1.61.0 // indirect - github.com/aws/aws-sdk-go-v2/service/ssmcontacts v1.28.0 // indirect - github.com/aws/aws-sdk-go-v2/service/ssmincidents v1.36.0 // indirect - github.com/aws/aws-sdk-go-v2/service/ssmquicksetup v1.5.0 // indirect - github.com/aws/aws-sdk-go-v2/service/ssmsap v1.21.0 // indirect - github.com/aws/aws-sdk-go-v2/service/sso v1.26.0 // indirect - github.com/aws/aws-sdk-go-v2/service/ssoadmin v1.32.0 // indirect - github.com/aws/aws-sdk-go-v2/service/ssooidc v1.31.0 // indirect - github.com/aws/aws-sdk-go-v2/service/storagegateway v1.39.0 // indirect - github.com/aws/aws-sdk-go-v2/service/sts v1.35.0 // indirect - github.com/aws/aws-sdk-go-v2/service/swf v1.29.0 // indirect - github.com/aws/aws-sdk-go-v2/service/synthetics v1.37.0 // indirect - github.com/aws/aws-sdk-go-v2/service/taxsettings v1.13.0 // indirect - github.com/aws/aws-sdk-go-v2/service/timestreaminfluxdb v1.12.0 // indirect - github.com/aws/aws-sdk-go-v2/service/timestreamquery v1.32.0 // indirect - github.com/aws/aws-sdk-go-v2/service/timestreamwrite v1.32.0 // indirect - github.com/aws/aws-sdk-go-v2/service/transcribe v1.48.0 // indirect - github.com/aws/aws-sdk-go-v2/service/transfer v1.62.0 // indirect - github.com/aws/aws-sdk-go-v2/service/verifiedpermissions v1.25.0 // indirect - github.com/aws/aws-sdk-go-v2/service/vpclattice v1.15.0 // indirect - github.com/aws/aws-sdk-go-v2/service/waf v1.27.0 // indirect - github.com/aws/aws-sdk-go-v2/service/wafregional v1.27.0 // indirect - github.com/aws/aws-sdk-go-v2/service/wafv2 v1.64.0 // indirect - github.com/aws/aws-sdk-go-v2/service/wellarchitected v1.36.0 // indirect - github.com/aws/aws-sdk-go-v2/service/workspaces v1.59.0 // indirect - github.com/aws/aws-sdk-go-v2/service/workspacesweb v1.28.0 // indirect - github.com/aws/aws-sdk-go-v2/service/xray v1.32.0 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.8.1 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/endpoint-discovery v1.11.1 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.13.1 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.19.1 // indirect + github.com/aws/aws-sdk-go-v2/service/internetmonitor v1.22.1 // indirect + github.com/aws/aws-sdk-go-v2/service/invoicing v1.3.1 // indirect + github.com/aws/aws-sdk-go-v2/service/iot v1.65.1 // indirect + github.com/aws/aws-sdk-go-v2/service/ivs v1.44.1 // indirect + github.com/aws/aws-sdk-go-v2/service/ivschat v1.18.1 // indirect + github.com/aws/aws-sdk-go-v2/service/kafka v1.40.1 // indirect + github.com/aws/aws-sdk-go-v2/service/kafkaconnect v1.24.2 // indirect + github.com/aws/aws-sdk-go-v2/service/kendra v1.57.1 // indirect + github.com/aws/aws-sdk-go-v2/service/keyspaces v1.20.1 // indirect + github.com/aws/aws-sdk-go-v2/service/kinesis v1.36.1 // indirect + github.com/aws/aws-sdk-go-v2/service/kinesisanalytics v1.27.1 // indirect + github.com/aws/aws-sdk-go-v2/service/kinesisanalyticsv2 v1.33.1 // indirect + github.com/aws/aws-sdk-go-v2/service/kinesisvideo v1.29.1 // indirect + github.com/aws/aws-sdk-go-v2/service/kms v1.42.1 // indirect + github.com/aws/aws-sdk-go-v2/service/lakeformation v1.42.1 // indirect + github.com/aws/aws-sdk-go-v2/service/lambda v1.74.1 // indirect + github.com/aws/aws-sdk-go-v2/service/launchwizard v1.10.1 // indirect + github.com/aws/aws-sdk-go-v2/service/lexmodelbuildingservice v1.30.1 // indirect + github.com/aws/aws-sdk-go-v2/service/lexmodelsv2 v1.53.1 // indirect + github.com/aws/aws-sdk-go-v2/service/licensemanager v1.33.1 // indirect + github.com/aws/aws-sdk-go-v2/service/lightsail v1.44.1 // indirect + github.com/aws/aws-sdk-go-v2/service/location v1.46.1 // indirect + github.com/aws/aws-sdk-go-v2/service/lookoutmetrics v1.33.1 // indirect + github.com/aws/aws-sdk-go-v2/service/m2 v1.22.1 // indirect + github.com/aws/aws-sdk-go-v2/service/macie2 v1.46.1 // indirect + github.com/aws/aws-sdk-go-v2/service/mediaconnect v1.41.1 // indirect + github.com/aws/aws-sdk-go-v2/service/mediaconvert v1.78.1 // indirect + github.com/aws/aws-sdk-go-v2/service/medialive v1.77.1 // indirect + github.com/aws/aws-sdk-go-v2/service/mediapackage v1.36.1 // indirect + github.com/aws/aws-sdk-go-v2/service/mediapackagev2 v1.27.1 // indirect + github.com/aws/aws-sdk-go-v2/service/mediapackagevod v1.36.1 // indirect + github.com/aws/aws-sdk-go-v2/service/mediastore v1.26.1 // indirect + github.com/aws/aws-sdk-go-v2/service/memorydb v1.28.1 // indirect + github.com/aws/aws-sdk-go-v2/service/mgn v1.34.1 // indirect + github.com/aws/aws-sdk-go-v2/service/mq v1.30.1 // indirect + github.com/aws/aws-sdk-go-v2/service/mwaa v1.36.1 // indirect + github.com/aws/aws-sdk-go-v2/service/neptune v1.38.1 // indirect + github.com/aws/aws-sdk-go-v2/service/neptunegraph v1.18.1 // indirect + github.com/aws/aws-sdk-go-v2/service/networkfirewall v1.52.1 // indirect + github.com/aws/aws-sdk-go-v2/service/networkmanager v1.36.1 // indirect + github.com/aws/aws-sdk-go-v2/service/networkmonitor v1.9.1 // indirect + github.com/aws/aws-sdk-go-v2/service/notifications v1.3.1 // indirect + github.com/aws/aws-sdk-go-v2/service/notificationscontacts v1.2.1 // indirect + github.com/aws/aws-sdk-go-v2/service/oam v1.19.1 // indirect + github.com/aws/aws-sdk-go-v2/service/opensearch v1.48.1 // indirect + github.com/aws/aws-sdk-go-v2/service/opensearchserverless v1.21.1 // indirect + github.com/aws/aws-sdk-go-v2/service/organizations v1.40.1 // indirect + github.com/aws/aws-sdk-go-v2/service/osis v1.16.1 // indirect + github.com/aws/aws-sdk-go-v2/service/outposts v1.53.1 // indirect + github.com/aws/aws-sdk-go-v2/service/paymentcryptography v1.20.1 // indirect + github.com/aws/aws-sdk-go-v2/service/pcaconnectorad v1.12.1 // indirect + github.com/aws/aws-sdk-go-v2/service/pcs v1.7.1 // indirect + github.com/aws/aws-sdk-go-v2/service/pinpoint v1.36.1 // indirect + github.com/aws/aws-sdk-go-v2/service/pinpointsmsvoicev2 v1.21.1 // indirect + github.com/aws/aws-sdk-go-v2/service/pipes v1.20.1 // indirect + github.com/aws/aws-sdk-go-v2/service/polly v1.49.1 // indirect + github.com/aws/aws-sdk-go-v2/service/pricing v1.36.1 // indirect + github.com/aws/aws-sdk-go-v2/service/qbusiness v1.29.1 // indirect + github.com/aws/aws-sdk-go-v2/service/qldb v1.27.1 // indirect + github.com/aws/aws-sdk-go-v2/service/quicksight v1.89.1 // indirect + github.com/aws/aws-sdk-go-v2/service/ram v1.31.1 // indirect + github.com/aws/aws-sdk-go-v2/service/rbin v1.23.1 // indirect + github.com/aws/aws-sdk-go-v2/service/rds v1.100.1 // indirect + github.com/aws/aws-sdk-go-v2/service/redshift v1.55.1 // indirect + github.com/aws/aws-sdk-go-v2/service/redshiftdata v1.34.1 // indirect + github.com/aws/aws-sdk-go-v2/service/redshiftserverless v1.28.1 // indirect + github.com/aws/aws-sdk-go-v2/service/rekognition v1.48.1 // indirect + github.com/aws/aws-sdk-go-v2/service/resiliencehub v1.31.1 // indirect + github.com/aws/aws-sdk-go-v2/service/resourceexplorer2 v1.18.1 // indirect + github.com/aws/aws-sdk-go-v2/service/resourcegroups v1.30.1 // indirect + github.com/aws/aws-sdk-go-v2/service/resourcegroupstaggingapi v1.27.1 // indirect + github.com/aws/aws-sdk-go-v2/service/rolesanywhere v1.18.1 // indirect + github.com/aws/aws-sdk-go-v2/service/route53 v1.54.1 // indirect + github.com/aws/aws-sdk-go-v2/service/route53domains v1.30.1 // indirect + github.com/aws/aws-sdk-go-v2/service/route53profiles v1.6.1 // indirect + github.com/aws/aws-sdk-go-v2/service/route53recoverycontrolconfig v1.28.1 // indirect + github.com/aws/aws-sdk-go-v2/service/route53recoveryreadiness v1.23.1 // indirect + github.com/aws/aws-sdk-go-v2/service/route53resolver v1.37.1 // indirect + github.com/aws/aws-sdk-go-v2/service/rum v1.25.1 // indirect + github.com/aws/aws-sdk-go-v2/service/s3 v1.85.1 // indirect + github.com/aws/aws-sdk-go-v2/service/s3control v1.61.1 // indirect + github.com/aws/aws-sdk-go-v2/service/s3outposts v1.30.1 // indirect + github.com/aws/aws-sdk-go-v2/service/s3tables v1.7.1 // indirect + github.com/aws/aws-sdk-go-v2/service/sagemaker v1.203.1 // indirect + github.com/aws/aws-sdk-go-v2/service/scheduler v1.14.1 // indirect + github.com/aws/aws-sdk-go-v2/service/schemas v1.30.1 // indirect + github.com/aws/aws-sdk-go-v2/service/secretsmanager v1.36.1 // indirect + github.com/aws/aws-sdk-go-v2/service/securityhub v1.59.1 // indirect + github.com/aws/aws-sdk-go-v2/service/securitylake v1.21.1 // indirect + github.com/aws/aws-sdk-go-v2/service/serverlessapplicationrepository v1.26.1 // indirect + github.com/aws/aws-sdk-go-v2/service/servicecatalog v1.35.1 // indirect + github.com/aws/aws-sdk-go-v2/service/servicecatalogappregistry v1.32.1 // indirect + github.com/aws/aws-sdk-go-v2/service/servicediscovery v1.36.1 // indirect + github.com/aws/aws-sdk-go-v2/service/servicequotas v1.29.1 // indirect + github.com/aws/aws-sdk-go-v2/service/ses v1.31.1 // indirect + github.com/aws/aws-sdk-go-v2/service/sesv2 v1.48.1 // indirect + github.com/aws/aws-sdk-go-v2/service/sfn v1.36.1 // indirect + github.com/aws/aws-sdk-go-v2/service/shield v1.31.1 // indirect + github.com/aws/aws-sdk-go-v2/service/signer v1.28.1 // indirect + github.com/aws/aws-sdk-go-v2/service/sns v1.35.1 // indirect + github.com/aws/aws-sdk-go-v2/service/sqs v1.39.1 // indirect + github.com/aws/aws-sdk-go-v2/service/ssm v1.61.1 // indirect + github.com/aws/aws-sdk-go-v2/service/ssmcontacts v1.28.1 // indirect + github.com/aws/aws-sdk-go-v2/service/ssmincidents v1.36.1 // indirect + github.com/aws/aws-sdk-go-v2/service/ssmquicksetup v1.5.1 // indirect + github.com/aws/aws-sdk-go-v2/service/ssmsap v1.21.1 // indirect + github.com/aws/aws-sdk-go-v2/service/sso v1.26.1 // indirect + github.com/aws/aws-sdk-go-v2/service/ssoadmin v1.32.1 // indirect + github.com/aws/aws-sdk-go-v2/service/ssooidc v1.31.1 // indirect + github.com/aws/aws-sdk-go-v2/service/storagegateway v1.39.1 // indirect + github.com/aws/aws-sdk-go-v2/service/sts v1.35.1 // indirect + github.com/aws/aws-sdk-go-v2/service/swf v1.29.1 // indirect + github.com/aws/aws-sdk-go-v2/service/synthetics v1.37.1 // indirect + github.com/aws/aws-sdk-go-v2/service/taxsettings v1.13.1 // indirect + github.com/aws/aws-sdk-go-v2/service/timestreaminfluxdb v1.12.1 // indirect + github.com/aws/aws-sdk-go-v2/service/timestreamquery v1.32.1 // indirect + github.com/aws/aws-sdk-go-v2/service/timestreamwrite v1.32.1 // indirect + github.com/aws/aws-sdk-go-v2/service/transcribe v1.48.1 // indirect + github.com/aws/aws-sdk-go-v2/service/transfer v1.62.1 // indirect + github.com/aws/aws-sdk-go-v2/service/verifiedpermissions v1.25.1 // indirect + github.com/aws/aws-sdk-go-v2/service/vpclattice v1.15.1 // indirect + github.com/aws/aws-sdk-go-v2/service/waf v1.27.1 // indirect + github.com/aws/aws-sdk-go-v2/service/wafregional v1.27.1 // indirect + github.com/aws/aws-sdk-go-v2/service/wafv2 v1.64.1 // indirect + github.com/aws/aws-sdk-go-v2/service/wellarchitected v1.36.1 // indirect + github.com/aws/aws-sdk-go-v2/service/workspaces v1.59.1 // indirect + github.com/aws/aws-sdk-go-v2/service/workspacesweb v1.28.1 // indirect + github.com/aws/aws-sdk-go-v2/service/xray v1.32.1 // indirect github.com/aws/smithy-go v1.22.5 // indirect github.com/beevik/etree v1.5.1 // indirect github.com/bgentry/speakeasy v0.1.0 // indirect diff --git a/tools/tfsdk2fw/go.sum b/tools/tfsdk2fw/go.sum index 1be608cf8318..8f91e7da0a08 100644 --- a/tools/tfsdk2fw/go.sum +++ b/tools/tfsdk2fw/go.sum @@ -23,538 +23,538 @@ github.com/apparentlymart/go-textseg/v15 v15.0.0 h1:uYvfpb3DyLSCGWnctWKGj857c6ew github.com/apparentlymart/go-textseg/v15 v15.0.0/go.mod h1:K8XmNZdhEBkdlyDdvbmmsvpAG721bKi0joRfFdHIWJ4= github.com/armon/go-radix v1.0.0 h1:F4z6KzEeeQIMeLFa97iZU6vupzoecKdU5TX24SNppXI= github.com/armon/go-radix v1.0.0/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= -github.com/aws/aws-sdk-go-v2 v1.37.0 h1:YtCOESR/pN4j5oA7cVHSfOwIcuh/KwHC4DOSXFbv5F0= -github.com/aws/aws-sdk-go-v2 v1.37.0/go.mod h1:9Q0OoGQoboYIAJyslFyF1f5K1Ryddop8gqMhWx/n4Wg= +github.com/aws/aws-sdk-go-v2 v1.37.1 h1:SMUxeNz3Z6nqGsXv0JuJXc8w5YMtrQMuIBmDx//bBDY= +github.com/aws/aws-sdk-go-v2 v1.37.1/go.mod h1:9Q0OoGQoboYIAJyslFyF1f5K1Ryddop8gqMhWx/n4Wg= github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.7.0 h1:6GMWV6CNpA/6fbFHnoAjrv4+LGfyTqZz2LtCHnspgDg= github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.7.0/go.mod h1:/mXlTIVG9jbxkqDnr5UQNQxW1HRYxeGklkM9vAFeabg= -github.com/aws/aws-sdk-go-v2/config v1.30.1 h1:sHL8g/+9tcZATeV2tEkEfxZeaNokDtKsSjGMGHD49qA= -github.com/aws/aws-sdk-go-v2/config v1.30.1/go.mod h1:wkibEyFfxXRyTSzRU4bbF5IUsSXyE4xQ4ZjkGmi5tFo= -github.com/aws/aws-sdk-go-v2/credentials v1.18.1 h1:E55xvOqlX7CvB66Z7rSM9usCrFU1ryUIUHqiXsEzVoE= -github.com/aws/aws-sdk-go-v2/credentials v1.18.1/go.mod h1:iobSQfR5MkvILxssGOvi/P1jjOhrRzfTiCPCzku0vx4= -github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.18.0 h1:9sBTeKQwAvmJUWKIACIoiFSnxxl+sS++YDfr17/ngq0= -github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.18.0/go.mod h1:LW9/PxQD1SYFC7pnWcgqPhoyZprhjEdg5hBK6qYPLW8= -github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.18.1 h1:aAjA/1JZ1xH/F9XvxJu9cXZyp7BqVXtHpztyZ6p799E= -github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.18.1/go.mod h1:ia9HASsPba/7o84sp6iE4wZPdNTJ0oicBe5sWQQk+Ys= -github.com/aws/aws-sdk-go-v2/internal/configsources v1.4.0 h1:H2iZoqW/v2Jnrh1FnU725Bq6KJ0k2uP63yH+DcY+HUI= -github.com/aws/aws-sdk-go-v2/internal/configsources v1.4.0/go.mod h1:L0FqLbwMXHvNC/7crWV1iIxUlOKYZUE8KuTIA+TozAI= -github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.7.0 h1:EDped/rNzAhFPhVY0sDGbtD16OKqksfA8OjF/kLEgw8= -github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.7.0/go.mod h1:uUI335jvzpZRPpjYx6ODc/wg1qH+NnoSTK/FwVeK0C0= +github.com/aws/aws-sdk-go-v2/config v1.30.2 h1:YE1BmSc4fFYqFgN1mN8uzrtc7R9x+7oSWeX8ckoltAw= +github.com/aws/aws-sdk-go-v2/config v1.30.2/go.mod h1:UNrLGZ6jfAVjgVJpkIxjLufRJqTXCVYOpkeVf83kwBo= +github.com/aws/aws-sdk-go-v2/credentials v1.18.2 h1:mfm0GKY/PHLhs7KO0sUaOtFnIQ15Qqxt+wXbO/5fIfs= +github.com/aws/aws-sdk-go-v2/credentials v1.18.2/go.mod h1:v0SdJX6ayPeZFQxgXUKw5RhLpAoZUuynxWDfh8+Eknc= +github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.18.1 h1:owmNBboeA0kHKDcdF8KiSXmrIuXZustfMGGytv6OMkM= +github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.18.1/go.mod h1:Bg1miN59SGxrZqlP8vJZSmXW+1N8Y1MjQDq1OfuNod8= +github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.18.2 h1:YFX4DvH1CPQXgQR8935b46Om+L7+6jus4aTdKqyDR84= +github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.18.2/go.mod h1:DgMPy7GqxcV0RSyaITnI3rw8HC3lIHB87U3KPQKDxHg= +github.com/aws/aws-sdk-go-v2/internal/configsources v1.4.1 h1:ksZXBYv80EFTcgc8OJO48aQ8XDWXIQL7gGasPeCoTzI= +github.com/aws/aws-sdk-go-v2/internal/configsources v1.4.1/go.mod h1:HSksQyyJETVZS7uM54cir0IgxttTD+8aEoJMPGepHBI= +github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.7.1 h1:+dn/xF/05utS7tUhjIcndbuaPjfll2LhbH1cCDGLYUQ= +github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.7.1/go.mod h1:hyAGz30LHdm5KBZDI58MXx5lDVZ5CUfvfTZvMu4HCZo= github.com/aws/aws-sdk-go-v2/internal/ini v1.8.3 h1:bIqFDwgGXXN1Kpp99pDOdKMTTb5d2KyU5X/BZxjOkRo= github.com/aws/aws-sdk-go-v2/internal/ini v1.8.3/go.mod h1:H5O/EsxDWyU+LP/V8i5sm8cxoZgc2fdNR9bxlOFrQTo= -github.com/aws/aws-sdk-go-v2/internal/v4a v1.4.0 h1:iLvW/zOkHGU3BDU5thWnj+UZ9pjhuVhv1loLj7yVtBw= -github.com/aws/aws-sdk-go-v2/internal/v4a v1.4.0/go.mod h1:Fn3gvhdF1x5Rs9nUoCy/fJT1ms8f8dO7RqM9lJHuazQ= -github.com/aws/aws-sdk-go-v2/service/accessanalyzer v1.41.0 h1:gq76LkmGLcEAoSlHC4gllk8VVnA9FhbP+oCaHyXF0zY= -github.com/aws/aws-sdk-go-v2/service/accessanalyzer v1.41.0/go.mod h1:BaNR63fvxHBH+AXizTwftT5bEYUjXqxZe5nJglhqhO8= -github.com/aws/aws-sdk-go-v2/service/account v1.25.0 h1:WsqNcDLJSGTvbp0mCaJZanu2FIi3cMIaxNuSzUJmTy4= -github.com/aws/aws-sdk-go-v2/service/account v1.25.0/go.mod h1:jLDspJe2W3pZ5ztW1Bx2xGTw6p70UQrV9N6TWj38MMo= -github.com/aws/aws-sdk-go-v2/service/acm v1.34.0 h1:lx2iQesjev9XicFzktUExyuh9X72gG7mIS+2TbUewWE= -github.com/aws/aws-sdk-go-v2/service/acm v1.34.0/go.mod h1:4qajh/qxIwI/kyo5Fd3mrPOue15GBp4RcT0kr9ijN4g= -github.com/aws/aws-sdk-go-v2/service/acmpca v1.41.0 h1:wBixXmq50emMDxTx4NdTYUq3hUE0i7EynDOB8jGsbUA= -github.com/aws/aws-sdk-go-v2/service/acmpca v1.41.0/go.mod h1:yCZJRAcdJ/PdDEtlxnOh2OXescU1GUU9p3gW2U0jyfk= -github.com/aws/aws-sdk-go-v2/service/amp v1.35.0 h1:m/a+zBpdDxaHMEowRMflvKeNsW5YeaZ3bUbhKvFmw+E= -github.com/aws/aws-sdk-go-v2/service/amp v1.35.0/go.mod h1:XpdeA/JM+/wgXa1sy9Na95SSbdKFJ7aBzjyJZBY5WaY= -github.com/aws/aws-sdk-go-v2/service/amplify v1.34.0 h1:9s5ktEjhJ6f3gxWybaC3SDjdfsyKyO5QwheRBKSIOgg= -github.com/aws/aws-sdk-go-v2/service/amplify v1.34.0/go.mod h1:tnkDo96G7ZaW441Z8l79sOduo+bSk9aib9C8sKFVo6o= -github.com/aws/aws-sdk-go-v2/service/apigateway v1.32.0 h1:iKV8fYBJs3/wGNt+X3vR13k1mrCLspQsXfk5L9UoGaU= -github.com/aws/aws-sdk-go-v2/service/apigateway v1.32.0/go.mod h1:o0y/mfhNtGAAlu6oZMdI6Enu2/61bIDuYLgedX4ysSg= -github.com/aws/aws-sdk-go-v2/service/apigatewayv2 v1.29.0 h1:YMZAqn1PlVNm/1zsKIV5bllU2+dhKzy6bIsmYtUz83w= -github.com/aws/aws-sdk-go-v2/service/apigatewayv2 v1.29.0/go.mod h1:rQLiNC1RHIJAb+WI5QYg4cK9zu/LCE25vK5hrbZQCCE= -github.com/aws/aws-sdk-go-v2/service/appconfig v1.39.0 h1:DxfBUf+c1c+9LX4cGl5ev8OS/JvvrYroD9iwLGPY9z8= -github.com/aws/aws-sdk-go-v2/service/appconfig v1.39.0/go.mod h1:wc6NplB0Z3dj4iF+sSTrJ5LNkm9o/6Z54eJQCELbbzE= -github.com/aws/aws-sdk-go-v2/service/appfabric v1.13.0 h1:ZHU+DFbK3/S72VSm6WJdsQkTj6xCJWudA1ebM9XgeiI= -github.com/aws/aws-sdk-go-v2/service/appfabric v1.13.0/go.mod h1:pvbyBAEHKao1Vxunr5HpHufdpukSVnTz9pnUSOhe0Ow= -github.com/aws/aws-sdk-go-v2/service/appflow v1.47.0 h1:kn8ofDMVdo5D9X2YbUe8Nsi2oeK8dFEFku4iDATv3Ik= -github.com/aws/aws-sdk-go-v2/service/appflow v1.47.0/go.mod h1:Vh8NnPu9r4cviqDfktEW3VAY9sazRzMUEi6foimcTmk= -github.com/aws/aws-sdk-go-v2/service/appintegrations v1.33.0 h1:kuNwsJcIQZKPTgTqD81+VuvGDd7jFZmdTJY58xeGm/E= -github.com/aws/aws-sdk-go-v2/service/appintegrations v1.33.0/go.mod h1:WtXV8tBbI+SnqP30Vn0zeVAmLiZDVapWt4ZB9OcQBqE= -github.com/aws/aws-sdk-go-v2/service/applicationautoscaling v1.37.0 h1:9bE9SG8peoqYEWiuOBBKaAP2i2LsNNrW68x8Q7PrNaE= -github.com/aws/aws-sdk-go-v2/service/applicationautoscaling v1.37.0/go.mod h1:hcLPVx3PUS21WL/F8XVDIrMnZL1LfSDHQCmjC7T0HDE= -github.com/aws/aws-sdk-go-v2/service/applicationinsights v1.31.0 h1:hvp21wSai9AFA4vzcIg7l5c3JtmgQRyPGAjbWIxc8co= -github.com/aws/aws-sdk-go-v2/service/applicationinsights v1.31.0/go.mod h1:SnU/+b9rlPjAnFYnYltznVGctbaJIZB/GgfakDYMIiY= -github.com/aws/aws-sdk-go-v2/service/applicationsignals v1.12.0 h1:BXd7RVhn6tugKwdPgm/yC7b+IO+WlJFTFsZuvZrlffg= -github.com/aws/aws-sdk-go-v2/service/applicationsignals v1.12.0/go.mod h1:SlkopoaM3lB8h8eZF4//p+tOaRaoST+6hVMe4JqUHP0= -github.com/aws/aws-sdk-go-v2/service/appmesh v1.31.0 h1:qugjZou8+mIsLW+wZXoLOW60gXsvUlm95V0lyC5la8s= -github.com/aws/aws-sdk-go-v2/service/appmesh v1.31.0/go.mod h1:bA5fMk8wXx5qBL/V7Ip0EvX/HuvbKmQ0sFd+6cdxM08= -github.com/aws/aws-sdk-go-v2/service/apprunner v1.35.0 h1:bS+UgsAvoUY4PosznqH1hyN4iNU8trYovXkdmgO0muQ= -github.com/aws/aws-sdk-go-v2/service/apprunner v1.35.0/go.mod h1:U8UVqTW65Tof1p3SRWQQft+d4BpsKrlV6EV0M1vLCtA= -github.com/aws/aws-sdk-go-v2/service/appstream v1.46.0 h1:/X5meto+RCnggbkRMmBtd8kBK7oHT1uBEBQ2lEliDZo= -github.com/aws/aws-sdk-go-v2/service/appstream v1.46.0/go.mod h1:SVsRtEHMs12akMPFckO9wsOzPPpVEjRGjmaW26FhuhM= -github.com/aws/aws-sdk-go-v2/service/appsync v1.48.0 h1:ai5DRF3OzbJjB5EQ4xHhKVXB0jf5IZ4ezxYaT6hw7qA= -github.com/aws/aws-sdk-go-v2/service/appsync v1.48.0/go.mod h1:lyQZHTY0TgxqlhI0W2c+H+R/8pLKlrJy5dxfxQRRhNs= -github.com/aws/aws-sdk-go-v2/service/athena v1.52.0 h1:p9wvhJaEjZSaLH5N4OnspChSz3E4RsDkH13tVM/3B2c= -github.com/aws/aws-sdk-go-v2/service/athena v1.52.0/go.mod h1:MKMLKcBoIDwNaHTTq8w8qvGJp3GJX3u2digEKbuzbVY= -github.com/aws/aws-sdk-go-v2/service/auditmanager v1.41.0 h1:vBC392sHM7C6jqW2tnAZ1Qmk3JaR8Pj+ZmX0W/PQoFU= -github.com/aws/aws-sdk-go-v2/service/auditmanager v1.41.0/go.mod h1:95zemB8g4WOE6JJIBtaaqeBbhohqM1pJFGUngpXSREQ= -github.com/aws/aws-sdk-go-v2/service/autoscaling v1.55.0 h1:Yu7EifEr+k3+htelmx8BNZTGcWo27tKGoW4yYYpiPIQ= -github.com/aws/aws-sdk-go-v2/service/autoscaling v1.55.0/go.mod h1:IxhwdOzzPBPhHpz1NjzeFaqA8ov9OvngSlijKMradcM= -github.com/aws/aws-sdk-go-v2/service/autoscalingplans v1.26.0 h1:8f+Jq2BKy4U6/YU1GSkMxkBTY1CZdblgmFlQwKFffMw= -github.com/aws/aws-sdk-go-v2/service/autoscalingplans v1.26.0/go.mod h1:XwZCGipecw+2zfgN4d5d9OwbUcVy3UjctRQIdy5UukU= -github.com/aws/aws-sdk-go-v2/service/backup v1.44.0 h1:eR1xS3evF+4XG1O1XuM3sN0E8CqI5PQ/NXm+13Rl+Kc= -github.com/aws/aws-sdk-go-v2/service/backup v1.44.0/go.mod h1:li1OG6R/Y7AAyrZx2aTUDqpz0LSs/WN51sKzHfkHP/c= -github.com/aws/aws-sdk-go-v2/service/batch v1.55.0 h1:LqqKzoCkvgSjtYRcS2AAPrATnE9fevXOhW3KOcn4yC8= -github.com/aws/aws-sdk-go-v2/service/batch v1.55.0/go.mod h1:AVlcYXRLx8dajiWttkFlo4a+4VpXB/NP1xzzvG0Cq4U= -github.com/aws/aws-sdk-go-v2/service/bcmdataexports v1.9.0 h1:WrmyKlmtyGRIyvl3ryZ4XESbYWz3Gxo2gMvasHFbQnk= -github.com/aws/aws-sdk-go-v2/service/bcmdataexports v1.9.0/go.mod h1:W57YXu7pe8M/G86RzC/19XX/NkLiRpiz6zoOV0CikPQ= -github.com/aws/aws-sdk-go-v2/service/bedrock v1.40.0 h1:zm35sSNjMd91vO+8W7vh2bch6sxUHiAjEEPaH8NM04o= -github.com/aws/aws-sdk-go-v2/service/bedrock v1.40.0/go.mod h1:S5IsJtXfvdcm2+yY02K+52oqXeqWQmTjjW5GMrf+FPg= -github.com/aws/aws-sdk-go-v2/service/bedrockagent v1.46.0 h1:jCBWnVsagTCEvZLKG/uPy6+71GYP7birkVoKbCJHyok= -github.com/aws/aws-sdk-go-v2/service/bedrockagent v1.46.0/go.mod h1:4N6mAWgQwjyquPBaCzYdlUlyrieOsWWPKTaiNx9cNPo= -github.com/aws/aws-sdk-go-v2/service/billing v1.3.0 h1:tlVjlumzAAw8zP5AAOBqUIKPfoAPjKUTqdMSLghcLZk= -github.com/aws/aws-sdk-go-v2/service/billing v1.3.0/go.mod h1:WqJByCq6sb3eiEvkCO45UtSRVOHg9rYS2wDo6CZj0nQ= -github.com/aws/aws-sdk-go-v2/service/budgets v1.33.0 h1:cemoi5rYYoxOCzM6ZusNIOGGz5pO24fD86K/0DM3N8w= -github.com/aws/aws-sdk-go-v2/service/budgets v1.33.0/go.mod h1:kGnmJ5Kwa3swYIxAm8rPVTHeiS39Ju3x8Skrw0g3twI= -github.com/aws/aws-sdk-go-v2/service/chatbot v1.11.0 h1:olhzCKv3O0HhyBR9EunuIzJWpdaU5obsBSqke0em5XQ= -github.com/aws/aws-sdk-go-v2/service/chatbot v1.11.0/go.mod h1:ybR4yic7ozuvDzh4WemkL8eqaZQ97EFJytGQ2UPsh5U= -github.com/aws/aws-sdk-go-v2/service/chime v1.37.0 h1:GXMcFW1Tb8nDFMo+hvYtag022mSX7Zrr3Wf2RB4p1oY= -github.com/aws/aws-sdk-go-v2/service/chime v1.37.0/go.mod h1:1eyK5PPnwaamvBUfGJRBISYRM2L/btipnxCdgefFKG4= -github.com/aws/aws-sdk-go-v2/service/chimesdkmediapipelines v1.23.0 h1:aV6AaIsh/aERc3DO1DUCf6KDjHdGG4MbIyTTiI7+fIA= -github.com/aws/aws-sdk-go-v2/service/chimesdkmediapipelines v1.23.0/go.mod h1:MUB0qeP6ME79LFT+KPiXcE0o+LqWYqZHpJ74bG4ygKY= -github.com/aws/aws-sdk-go-v2/service/chimesdkvoice v1.23.0 h1:sk2DOvXZaWw3iEie/25IFSBfuc+F6n3CCpCaDflF9as= -github.com/aws/aws-sdk-go-v2/service/chimesdkvoice v1.23.0/go.mod h1:yoYLnDYicrfC0SVr5RvH7GqrW9nyugiE7nM+H4jFZjI= -github.com/aws/aws-sdk-go-v2/service/cleanrooms v1.27.0 h1:/Ol+xQqxsa04P/UndSDV+9mok8hCFS/TwCA8mJ5RXlg= -github.com/aws/aws-sdk-go-v2/service/cleanrooms v1.27.0/go.mod h1:s82icmZVWAQFn9O1BntEk0RPrRpNG5vOgnINmhln75U= -github.com/aws/aws-sdk-go-v2/service/cloud9 v1.30.0 h1:xpm/LVtcoKf6C4WsoUSAL/3ZP2yoNuX7OxsYH9Rzf7I= -github.com/aws/aws-sdk-go-v2/service/cloud9 v1.30.0/go.mod h1:piezSyRAA+8oR+aWY0gLEpGnC5nK9nzbab3oRNNaiMo= -github.com/aws/aws-sdk-go-v2/service/cloudcontrol v1.25.0 h1:SfG2oQvAdhkOY+p71HaiITdhyblG4/iIHt5rACaPe4Q= -github.com/aws/aws-sdk-go-v2/service/cloudcontrol v1.25.0/go.mod h1:1ht026G9ofTny2K3hqjYACqEUdkk0bnrOkC+z3olb1Q= -github.com/aws/aws-sdk-go-v2/service/cloudformation v1.62.0 h1:YzUPWcfGq9yB4AZKOc5OWyM7SL7ypRzu+rVOoUMXaPs= -github.com/aws/aws-sdk-go-v2/service/cloudformation v1.62.0/go.mod h1:dREYEG1QUJkefpMU0ldT5pJ3LH2G51Jf8nfXDrK66J8= -github.com/aws/aws-sdk-go-v2/service/cloudfront v1.48.0 h1:nosx9hDdZdtSRhNOcR1OhKneUQNgP1U38twtvJyAlkE= -github.com/aws/aws-sdk-go-v2/service/cloudfront v1.48.0/go.mod h1:VpWKKLDcnuyyV9S1BNzD7R3o3uKUHdlRcerlXr5oHNU= -github.com/aws/aws-sdk-go-v2/service/cloudfrontkeyvaluestore v1.10.0 h1:3KlS3BXo3dV5BMo6hYJh25gtjVrSb7uD0XPJSJeVk8U= -github.com/aws/aws-sdk-go-v2/service/cloudfrontkeyvaluestore v1.10.0/go.mod h1:umnKCdKXVDeQR0VO/uTOSftJVHWpqedjPr0Ly+sjTkc= -github.com/aws/aws-sdk-go-v2/service/cloudhsmv2 v1.31.0 h1:QGG/oT35qdW9T6neOEn8zrj23JJiLRp3edBcbA5gfro= -github.com/aws/aws-sdk-go-v2/service/cloudhsmv2 v1.31.0/go.mod h1:nAmM4gdDHejpxTWE7GRDhHQgEUzDSFx2C1AUqZcEFcY= -github.com/aws/aws-sdk-go-v2/service/cloudsearch v1.28.0 h1:sduSToDy4gSJzV80ZyGxUDARXrLyPRu/lcU9UbqWb5M= -github.com/aws/aws-sdk-go-v2/service/cloudsearch v1.28.0/go.mod h1:YHaKrV1cIM1ODw6HWja3zT4TvtSmTRIesFLStMOofnM= -github.com/aws/aws-sdk-go-v2/service/cloudtrail v1.50.0 h1:7Ckr57IzL3Bf6poBs2+rZFf+1VOgvdkSvwYkEM9CjEQ= -github.com/aws/aws-sdk-go-v2/service/cloudtrail v1.50.0/go.mod h1:ip+DmGef42BaCzyP10Qg2jG4FF8Q4WYqR9zRVIFRbBc= -github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.46.0 h1:lP6kYuKewG8msH/O64ta8Kyw5i004cz1Z7j+NRHpZhI= -github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.46.0/go.mod h1:x4mHyW2Hh1bVvuze3yUh6VI77x7sTvYUqGSz56MM2g4= -github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs v1.54.0 h1:YBaZkj6OnJvSPKMPMOhhEk3mGq0UzYtvCnEEXk93jko= -github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs v1.54.0/go.mod h1:JGvzarQ8vyLLmajh2eV3lfS/BrOE32ryCgEh6mwDGnc= -github.com/aws/aws-sdk-go-v2/service/codeartifact v1.35.0 h1:9zqLfQka0S2AYwjlCYgefY5Efx7YqNknLQbSttU9AYc= -github.com/aws/aws-sdk-go-v2/service/codeartifact v1.35.0/go.mod h1:UYdYH203Cxv34VGcJUhjrggSuIVfxsscKutr5ifoIpQ= -github.com/aws/aws-sdk-go-v2/service/codebuild v1.62.0 h1:/WSZbxfukB0mO132n9btwJ7fOnLV5J5tYmDlio4l5lM= -github.com/aws/aws-sdk-go-v2/service/codebuild v1.62.0/go.mod h1:fvIq7u+wji2n8ds+G0ZLIBZpguLP9LlnVSiO9bwXOVk= -github.com/aws/aws-sdk-go-v2/service/codecatalyst v1.18.0 h1:RhURzBc8n70zYDQ+xVTJhF0jMagSxNjZGQDHBcQhh9o= -github.com/aws/aws-sdk-go-v2/service/codecatalyst v1.18.0/go.mod h1:xWuwpcUjVmxHcuB0CV6SbOk+yap2uHrNIN9SIGOTSX8= -github.com/aws/aws-sdk-go-v2/service/codecommit v1.29.0 h1:YwVtUuwGe7csc/aHNR89GZhmwAzOEy0FHlO4G496qdM= -github.com/aws/aws-sdk-go-v2/service/codecommit v1.29.0/go.mod h1:2mAGqG5sAPXaUGHd/iIcfEFtib0/CF8jsDDEXKXchCA= -github.com/aws/aws-sdk-go-v2/service/codeconnections v1.7.0 h1:UXWSHvcWR6smWf3G2nDnid9vhJlRNZjXOyO8HY7F75I= -github.com/aws/aws-sdk-go-v2/service/codeconnections v1.7.0/go.mod h1:6XXonJ5c9OarAKMladT/MBR2qiAkyoph4HiZ3qogqVQ= -github.com/aws/aws-sdk-go-v2/service/codedeploy v1.31.0 h1:btMfxiTo2VTIYo1mAE/0IHUJdfSEEvEfw4a4BTcOnPQ= -github.com/aws/aws-sdk-go-v2/service/codedeploy v1.31.0/go.mod h1:E3/+AAdvoo+btz0+PZOpgMlZXHdh7NevLzZDimqVt6Q= -github.com/aws/aws-sdk-go-v2/service/codeguruprofiler v1.26.0 h1:vLSZmUIAIKXF1QZXFT0O3GVO/I9QbQ0ZF1zwNEMS97s= -github.com/aws/aws-sdk-go-v2/service/codeguruprofiler v1.26.0/go.mod h1:dbg06PWE+GQiyy2BHG6wWOF/WxLT76LWTkZ/Vbg0acs= -github.com/aws/aws-sdk-go-v2/service/codegurureviewer v1.31.0 h1:9pyVJ400RM2B2HjduqhOR9eCECxcreWONPSM/hr7wLM= -github.com/aws/aws-sdk-go-v2/service/codegurureviewer v1.31.0/go.mod h1:9FYUKV2l7nXI9ZgUfZEpaawbXigStcNHJ8XSI3I/wcY= -github.com/aws/aws-sdk-go-v2/service/codepipeline v1.43.0 h1:Rklhj8QJYozMQRJ1i9n9vZqCVNBsjnUlRhy4db1OplE= -github.com/aws/aws-sdk-go-v2/service/codepipeline v1.43.0/go.mod h1:S4ZW7qHqnS6FgKhi7GeRRyqxhHZPKCW/cE7LhDoNKnY= -github.com/aws/aws-sdk-go-v2/service/codestarconnections v1.31.0 h1:SkwYSOOcaLSlBpqsm3mkg20yhx1FP8AJi3WH3oQs7ss= -github.com/aws/aws-sdk-go-v2/service/codestarconnections v1.31.0/go.mod h1:atg1dLH3Fw3M94KE4yMiJwkXn+mq0tItJoCOIyLb3jI= -github.com/aws/aws-sdk-go-v2/service/codestarnotifications v1.28.0 h1:YM1ppCuKTcpyAr0K6jT0wvLYLnbWzQ4h40WObnZOxi0= -github.com/aws/aws-sdk-go-v2/service/codestarnotifications v1.28.0/go.mod h1:Hja+UvdOoS738VHDVwY8rMfj2Bdp4MyqnbBW45/hCQY= -github.com/aws/aws-sdk-go-v2/service/cognitoidentity v1.30.0 h1:qOf/MjucrSePkhcxqx/J2Acax0cC7hwqJN+HzHXfbJ0= -github.com/aws/aws-sdk-go-v2/service/cognitoidentity v1.30.0/go.mod h1:+xtJoyncm21FXfCVZ6W5VvFSiBXAgcM5nt4cImrzHLY= -github.com/aws/aws-sdk-go-v2/service/cognitoidentityprovider v1.54.0 h1:zY76J9mkw/lngO8RsccoYiVLRtw0rJ6g2/vYvvmLFaM= -github.com/aws/aws-sdk-go-v2/service/cognitoidentityprovider v1.54.0/go.mod h1:YYo3xO08uGKAwtDJ2PPi5oEUliR8aZEWP+l7iXJahH4= -github.com/aws/aws-sdk-go-v2/service/comprehend v1.37.0 h1:v/5l33Z8Pq8JVAX6OKy7hb1KIAu0VFbnks7nuW20trE= -github.com/aws/aws-sdk-go-v2/service/comprehend v1.37.0/go.mod h1:zSFlP3Il9v0uR8Gxkt4gQCXD15yp+pSNG4SIiCQn/6w= -github.com/aws/aws-sdk-go-v2/service/computeoptimizer v1.44.0 h1:wRVDDNMS6XvuUilEwPnvbH9xcdyCM2UFaqu+DOjRLI0= -github.com/aws/aws-sdk-go-v2/service/computeoptimizer v1.44.0/go.mod h1:+xYQLHezJ9xNMly5Qrvi3evcypdDYomK7gNWrrd1tKo= -github.com/aws/aws-sdk-go-v2/service/configservice v1.54.0 h1:jd4gpwRaxZ0p77oZHugdDuI0mEIDT5CGxwLyxI0Bj1Q= -github.com/aws/aws-sdk-go-v2/service/configservice v1.54.0/go.mod h1:fZOMQAVUmB1c1azVfszfjRn3agF7O/X4/9OEfC0uXLQ= -github.com/aws/aws-sdk-go-v2/service/connect v1.132.0 h1:/CLNF/SbIH7aw4hT6PZCzPSlLubCl009pJfo8rv6dpQ= -github.com/aws/aws-sdk-go-v2/service/connect v1.132.0/go.mod h1:v9bE3U2p2oXR5qsRvI/p0w5SBh1JO37AdmrbWi8stXc= -github.com/aws/aws-sdk-go-v2/service/connectcases v1.27.0 h1:rYTCSq7znZysM9xDQdoyYKfpxxQWAx6w+bEcuP98c4k= -github.com/aws/aws-sdk-go-v2/service/connectcases v1.27.0/go.mod h1:Pu5BLAAK6Ro3d9MjZ2set5TxkKdNGtz6JTlmdcZs5gw= -github.com/aws/aws-sdk-go-v2/service/controltower v1.23.0 h1:wdhivZJf85vUbuYJ9kQedwzMLeVLhNrYoPli3wNEcq4= -github.com/aws/aws-sdk-go-v2/service/controltower v1.23.0/go.mod h1:yvaXBtkaQQDHfe1/DmkFkRo87V6XeR7Ip7+Ij9op7IA= -github.com/aws/aws-sdk-go-v2/service/costandusagereportservice v1.30.0 h1:cNNYcPYWvIkxddEv+PYhryXO6UVMMhSu4BpbtGqfUIY= -github.com/aws/aws-sdk-go-v2/service/costandusagereportservice v1.30.0/go.mod h1:5DlbYM1qHEGBl61qTfk5fQwxkNakd8D6wNxO4MV0pms= -github.com/aws/aws-sdk-go-v2/service/costexplorer v1.52.0 h1:Y9msp59ti10zQFEYjSCQW5Q468Cdr5X15voNS8nC5IE= -github.com/aws/aws-sdk-go-v2/service/costexplorer v1.52.0/go.mod h1:uX3wxVjCWeWeJbvYpJUmVNuRi/D/DVhRrC6fk/3j+Fk= -github.com/aws/aws-sdk-go-v2/service/costoptimizationhub v1.17.0 h1:xgaMYB76fi1qdr8nD7yPxZPCzrU6vFkVDeiF5OObjfw= -github.com/aws/aws-sdk-go-v2/service/costoptimizationhub v1.17.0/go.mod h1:Zkj5s6IrMxTfUBTrOk88MoUe9I/Uc5dgqCaVznC3LeY= -github.com/aws/aws-sdk-go-v2/service/customerprofiles v1.48.0 h1:ngC5gzvIPfu7XrLCBxy4ht2GOFIVfI67n5RqdrgHKyA= -github.com/aws/aws-sdk-go-v2/service/customerprofiles v1.48.0/go.mod h1:5joem1uxn9t2b+xbhK9wpcqjum+/dnOhsnZ/HLl5yI0= -github.com/aws/aws-sdk-go-v2/service/databasemigrationservice v1.54.0 h1:0nNQ1JHji21BjUeAx2gVLMscdvnKCxyQlt3aep38Tvk= -github.com/aws/aws-sdk-go-v2/service/databasemigrationservice v1.54.0/go.mod h1:0LUvqqAUeFYdAhGt97gq8N2CrI+pvmfC1jh/LHclGKI= -github.com/aws/aws-sdk-go-v2/service/databrew v1.35.0 h1:o0pE9OL2ovHeA17PU2Cay/LV3znS353xcNGrryzCvh8= -github.com/aws/aws-sdk-go-v2/service/databrew v1.35.0/go.mod h1:yEv07fXbcl8Z+QtREXBZv3dHl/IKHYv+h7aSrzbzt0E= -github.com/aws/aws-sdk-go-v2/service/dataexchange v1.36.0 h1:Zpw1y/7gC6oYoDUNKECEbpPcXyzn0/n0iC/h0WX/8LY= -github.com/aws/aws-sdk-go-v2/service/dataexchange v1.36.0/go.mod h1:yRM0L2SFRZKKliKwSsIs76VYcrHTpB9T8PgOE7e98Us= -github.com/aws/aws-sdk-go-v2/service/datapipeline v1.27.0 h1:kw6BTd1HoU8zZJFNzQeGnQhYQ8Vtv5g0ywbpXTcPbBk= -github.com/aws/aws-sdk-go-v2/service/datapipeline v1.27.0/go.mod h1:8cdecmdG5JQZUbNcwY2xY9aRUt5sa/nf6FU+trUG2us= -github.com/aws/aws-sdk-go-v2/service/datasync v1.51.0 h1:7KtgiOtKxp03XSpQPLizlqA5Plp1T8uv4F8YRdxwNgo= -github.com/aws/aws-sdk-go-v2/service/datasync v1.51.0/go.mod h1:soOF5lCCxcbxyVQlv+z5AZjrocAZl/vGwxXKgQ5YXtc= -github.com/aws/aws-sdk-go-v2/service/datazone v1.34.0 h1:XxehCzm+BXTx/ejG/PjbrPNZtFxAQqc1roGscKLwc94= -github.com/aws/aws-sdk-go-v2/service/datazone v1.34.0/go.mod h1:XFfZiG5Upg+fr8VTs5oA0OsLfy+ni9NyrQaZhGjM87E= -github.com/aws/aws-sdk-go-v2/service/dax v1.25.0 h1:4v21F8HNAyOQ1qcoma3+oxkVxUPxevBAc6Wu1UtwQ0U= -github.com/aws/aws-sdk-go-v2/service/dax v1.25.0/go.mod h1:zE3wAke1uqedRlOc02HUyRVjoD/nHIRgrbdMzmbugo4= -github.com/aws/aws-sdk-go-v2/service/detective v1.34.0 h1:DT4ghZZR33Mra1LjVQbdVsJaldZE79OPWdffNi09j3k= -github.com/aws/aws-sdk-go-v2/service/detective v1.34.0/go.mod h1:kYvcZSnvieOVzGsCaXlcDb3XKLX4gtuymtMdYLijuNY= -github.com/aws/aws-sdk-go-v2/service/devicefarm v1.32.0 h1:ri7QPDj9pXyJ71yuW3mRSpdzZosYCkjRSHYptcjQ/4Q= -github.com/aws/aws-sdk-go-v2/service/devicefarm v1.32.0/go.mod h1:JgKXSBqZgT7b6n0D+C8OQC0Gly2IExfamcJplUdPiYg= -github.com/aws/aws-sdk-go-v2/service/devopsguru v1.36.0 h1:G+x9z1ysBSPtmcVXr36YfoQEFYwHtt3ox20QV88Vv2E= -github.com/aws/aws-sdk-go-v2/service/devopsguru v1.36.0/go.mod h1:kDuh3At3j4ACnKh9PqaGD1rbJIh8zOIWjA8lLhDZZio= -github.com/aws/aws-sdk-go-v2/service/directconnect v1.33.0 h1:kEJqpW57eydwCb9z27Lf512CWu1/vI4QGnvzUTNy2R4= -github.com/aws/aws-sdk-go-v2/service/directconnect v1.33.0/go.mod h1:FfJr4vCV+Z+JFqrBjWnrC393YqgzA1iH55RdkgkC7J8= -github.com/aws/aws-sdk-go-v2/service/directoryservice v1.32.0 h1:LI5MVkt2VAp1FklY6oXEArWbbutkOrObjE9pWiIPg6w= -github.com/aws/aws-sdk-go-v2/service/directoryservice v1.32.0/go.mod h1:HsulHFWNWvVt5ywMhr6zcpJvRWBX92GkMK6akXzTTz0= -github.com/aws/aws-sdk-go-v2/service/dlm v1.31.0 h1:3kysMjPGvngicdxm8mCiaLHv56epYJIuXfyUg4gP8bo= -github.com/aws/aws-sdk-go-v2/service/dlm v1.31.0/go.mod h1:5WA+6fC+70sNV2ySJvtfeaYrEQn0AEI0ctuc3iAkR9Q= -github.com/aws/aws-sdk-go-v2/service/docdb v1.42.0 h1:4XiBQR3sJVazCDyAbzW7F1RJLtH9+gpYJ7tFqWj/Vl0= -github.com/aws/aws-sdk-go-v2/service/docdb v1.42.0/go.mod h1:XtRlgTN/VrE0e6SvIel4PeYJJyBsoJO+j8P6ISFxfdo= -github.com/aws/aws-sdk-go-v2/service/docdbelastic v1.16.0 h1:XQHWIvUMy+f0oUdYa5vbUIpiVy6Pqdqa9qg2SdQ1LfU= -github.com/aws/aws-sdk-go-v2/service/docdbelastic v1.16.0/go.mod h1:LU1E3rseSr8OeMXnFzcFQh8Ug1sIfIyJtqVGpZlJKwk= -github.com/aws/aws-sdk-go-v2/service/drs v1.32.0 h1:wuzX+2Ch4ib6l/r6rlEN5EskxoUjPF6/0qPrI5nFOVg= -github.com/aws/aws-sdk-go-v2/service/drs v1.32.0/go.mod h1:OSZ68J2hGEP+i9eKdYYAK5oHL8IQxs07hVIbz2U19eM= -github.com/aws/aws-sdk-go-v2/service/dsql v1.6.0 h1:a3NhtGkjNW8n3fmwZsJFpENOiOHK1xPHvf5076xx9X4= -github.com/aws/aws-sdk-go-v2/service/dsql v1.6.0/go.mod h1:/nz9MHdhjpcljIPFgOjSwuJdMn3aJt3gx1cY9ymKAmM= -github.com/aws/aws-sdk-go-v2/service/dynamodb v1.45.0 h1:b71OPISZ5Tj4ehCRJKnabIq2U68pldgKqhiUMHnVNQ4= -github.com/aws/aws-sdk-go-v2/service/dynamodb v1.45.0/go.mod h1:+ZRTIYCk/PNwz8+ZGLBzvFu7Nl1/w7phtbEZFlvOZWc= -github.com/aws/aws-sdk-go-v2/service/ec2 v1.237.0 h1:XHE2G+yaDQql32FZt19QmQt4WuisqQJIkMUSCxeCUl8= -github.com/aws/aws-sdk-go-v2/service/ec2 v1.237.0/go.mod h1:t11/j/nH9i6bbsPH9xc04BJOsV2nVPUqrB67/TLDsyM= -github.com/aws/aws-sdk-go-v2/service/ecr v1.47.0 h1:T+2j6CUZ4z+M5I35cZzguRy5RWLgmqDiGGSUtDVNJgo= -github.com/aws/aws-sdk-go-v2/service/ecr v1.47.0/go.mod h1:w3gLtg36GbH9uhJBaGdy82SkCX/79NrrDj5JrdYx5Pc= -github.com/aws/aws-sdk-go-v2/service/ecrpublic v1.34.0 h1:gfiAVHG23tpQfoOavFUXMcKdmw4dWFMK+KfYy+G+MlQ= -github.com/aws/aws-sdk-go-v2/service/ecrpublic v1.34.0/go.mod h1:UArd1ewa8AcfB6zahDOSzfO/aFviMr0rCapAEp58sRE= -github.com/aws/aws-sdk-go-v2/service/ecs v1.61.0 h1:2VrFedi1M671QYjgwUoBVTLNnYJLHEWziQGxI4b7VP8= -github.com/aws/aws-sdk-go-v2/service/ecs v1.61.0/go.mod h1:y/YTnHG2QTWQ4dPVyY0oFHMGuwpS2Ys+4TfrcY5eqVs= -github.com/aws/aws-sdk-go-v2/service/efs v1.37.0 h1:0UpL/E+lNuSlX4JZz/rtTb+DHIpXbCj5sX6/2m+rww4= -github.com/aws/aws-sdk-go-v2/service/efs v1.37.0/go.mod h1:I04zQ/3fYhdiCLo1LGtDLxHKDOAn8JcvhPXhlfVF9lg= -github.com/aws/aws-sdk-go-v2/service/eks v1.67.0 h1:Q6eEFXjq0l2EsOyTiACpHFWMTqPJCI8D/Zqj8m08tlc= -github.com/aws/aws-sdk-go-v2/service/eks v1.67.0/go.mod h1:kHfybTXNRagH1UNWrMOLFSxLaQHrwJjXppoXGBo8CXc= -github.com/aws/aws-sdk-go-v2/service/elasticache v1.47.0 h1:rdeVbBkLSPlOsPGQt1UjBzMplSN6tJlsLtHk4AWp7Hc= -github.com/aws/aws-sdk-go-v2/service/elasticache v1.47.0/go.mod h1:5vWa4LGphYB/O9zzyoq6ICz0HP4GQvF/CD8683WVDgg= -github.com/aws/aws-sdk-go-v2/service/elasticbeanstalk v1.30.0 h1:AdTGVDlPwyvNVZWbmy92Dgwa7DR3/gp5MGd2rjBm2oY= -github.com/aws/aws-sdk-go-v2/service/elasticbeanstalk v1.30.0/go.mod h1:nOfKd1hMfOzBIQtJOCK1TlImzNaAcvpCSnRJLiE/MSI= -github.com/aws/aws-sdk-go-v2/service/elasticloadbalancing v1.30.0 h1:1v0/C1HGgdNjeyV7znEjttZb4Y1i/zItKmGCEF+AQBI= -github.com/aws/aws-sdk-go-v2/service/elasticloadbalancing v1.30.0/go.mod h1:b9JQYkfPes14HlUIF8flWbZGsq6u+t6fXho7oGFIqfg= -github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2 v1.47.0 h1:GObrLqUPWrRNJCaQSWyPV3F0hbym6V7kA+tW4VUJ6kY= -github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2 v1.47.0/go.mod h1:kT2i/XPJFtec5Pmi6f1dhY+r2t2rzxZJLWs0TnK94ec= -github.com/aws/aws-sdk-go-v2/service/elasticsearchservice v1.34.0 h1:5Vocp/WUuq48iLhWdF+hyUSsh7xgT6Ve1Z/fa8+oeMc= -github.com/aws/aws-sdk-go-v2/service/elasticsearchservice v1.34.0/go.mod h1:k0OwtLNVqj0K7qVxc0cITY4Ek7ndGbmOQBFTt/NiNPc= -github.com/aws/aws-sdk-go-v2/service/elastictranscoder v1.29.0 h1:1R1XMYDghfxze8BN2AYkxFX8YoViY5ckexbhhEKCBn8= -github.com/aws/aws-sdk-go-v2/service/elastictranscoder v1.29.0/go.mod h1:W6aSnusoVqhANHwXxPi2sQoUVqV4QYLNQdQCwfqLiBE= -github.com/aws/aws-sdk-go-v2/service/emr v1.51.0 h1:q9PTEV2UyT2ju3cOyPqnBFfjWILuKYtrZUnKgoQHE0A= -github.com/aws/aws-sdk-go-v2/service/emr v1.51.0/go.mod h1:wX9kDECiHBuWv2aorGpSazl7r8ZJOiRF01pp7SZRYgQ= -github.com/aws/aws-sdk-go-v2/service/emrcontainers v1.36.0 h1:k7LyV+sWRh89RDfSJnaENz/WljIQymxQ3IXG2wFgN7s= -github.com/aws/aws-sdk-go-v2/service/emrcontainers v1.36.0/go.mod h1:7ScX/Htt5dQoT1h7ANByeB6w86sYiZJGI7Xda3AaWNE= -github.com/aws/aws-sdk-go-v2/service/emrserverless v1.33.0 h1:OpaVhGUsfEOaJpD0vx9xKUjMJKCQMnSb/t45DPffMuU= -github.com/aws/aws-sdk-go-v2/service/emrserverless v1.33.0/go.mod h1:nF4xD0Oh/SOv7W2M1E79m2d7Qg4Si4aYAThsfLzxKyA= -github.com/aws/aws-sdk-go-v2/service/eventbridge v1.42.0 h1:l27GhRdDuLyPISPOu+JKcdvnYuiyAl4s4yO64zR6qkw= -github.com/aws/aws-sdk-go-v2/service/eventbridge v1.42.0/go.mod h1:zoKUO71V/CLObAxgUDUrZdiVzTnEDdPLTDs+kioCjhQ= -github.com/aws/aws-sdk-go-v2/service/evidently v1.25.0 h1:WEUJQIr1pPIPGvx4H8yNwJ5mtwlgQApajbjlXH9N2Tk= -github.com/aws/aws-sdk-go-v2/service/evidently v1.25.0/go.mod h1:/J0EeOVNuN3qwAiP4Xpl8TJaNUmErD4hzMqCNyZcYcI= -github.com/aws/aws-sdk-go-v2/service/evs v1.1.0 h1:ZU++KlQRtBqiYmziZUv0IzsooDkNHpTRFdZS9dLtxag= -github.com/aws/aws-sdk-go-v2/service/evs v1.1.0/go.mod h1:cWpiiINkFonIOhy6EzG/wiewt8qg75DcP2QleRnmHrs= -github.com/aws/aws-sdk-go-v2/service/finspace v1.30.0 h1:2huq+VfgjyU3oJ3sa60omjhqAc0bF3WVqBZJ/uk5wyE= -github.com/aws/aws-sdk-go-v2/service/finspace v1.30.0/go.mod h1:Dr73jHRmcVV152WoNWDAlMOoeejVprl7NtRYUBEM/Rw= -github.com/aws/aws-sdk-go-v2/service/firehose v1.38.0 h1:+d8gLehVcLuLuW/pm0NkmShfYKUfs5xb138S/rQ71TI= -github.com/aws/aws-sdk-go-v2/service/firehose v1.38.0/go.mod h1:2jUHIaZATMAn0IskCYjb/rSn+X9kGlPtqHgjjMUp7Vo= -github.com/aws/aws-sdk-go-v2/service/fis v1.34.0 h1:34Des7RjR1iGhV4YPgxGuiCfTF57LzYRWfNksCOV8Js= -github.com/aws/aws-sdk-go-v2/service/fis v1.34.0/go.mod h1:lCVer9bQSEVsBpUJvLuxxEjWptiPB3RGzOa+6wQBtuQ= -github.com/aws/aws-sdk-go-v2/service/fms v1.41.0 h1:T1pXmtrxc4mC6xJ7oD8fbxD4fhM4LNkkbZ9X2b/vn/w= -github.com/aws/aws-sdk-go-v2/service/fms v1.41.0/go.mod h1:wqTDRhJUKSIpBlHpiyK4TIVpaO/6nSO9lEmMF+T/YOY= -github.com/aws/aws-sdk-go-v2/service/fsx v1.56.0 h1:DLq+0rS213xUZ/XCXDSmSxI9z0KUGqU/qTmdqQwRNY0= -github.com/aws/aws-sdk-go-v2/service/fsx v1.56.0/go.mod h1:vyVH/XKwbSKgpemHYtmCxmLQQyAhrpKqjPnJQOno+PY= -github.com/aws/aws-sdk-go-v2/service/gamelift v1.43.0 h1:9FoSk6Mledd77YvHiIHhKVCQq+0ZcwDBKogzJODXzKI= -github.com/aws/aws-sdk-go-v2/service/gamelift v1.43.0/go.mod h1:LEHLPJxEVb6RIzZVS+BrPiI9DbxM9V/gfnwrRETd5mU= -github.com/aws/aws-sdk-go-v2/service/glacier v1.28.0 h1:e6fU7fjvxSd4vEtIK+7NNXIUcCaqxR1atfPY0HfqciU= -github.com/aws/aws-sdk-go-v2/service/glacier v1.28.0/go.mod h1:XVxpTiuOepErZ9YjF8GR15NwsWumQ0d/9XN8DUK0TfM= -github.com/aws/aws-sdk-go-v2/service/globalaccelerator v1.31.0 h1:nJoXTtdukUXmuSP9L5wzZVEqgUizq++ezBlFR5cUBRU= -github.com/aws/aws-sdk-go-v2/service/globalaccelerator v1.31.0/go.mod h1:tKuEYQ3VKTjnWfeZObMNHycMwPgRjliCucHuIipbYQo= -github.com/aws/aws-sdk-go-v2/service/glue v1.120.0 h1:37y2TueEaBHD2dsRj6Xbs5NHjpD7iACydF2i3CN8KaI= -github.com/aws/aws-sdk-go-v2/service/glue v1.120.0/go.mod h1:OA/CbaZ2xxDebfm62rCXdhOLG6pbPQgfa1mLLIlpUAY= -github.com/aws/aws-sdk-go-v2/service/grafana v1.28.0 h1:oT3CA19oYedSXRyJKMXx4IHVHgcqaPWM63W+d9G4F10= -github.com/aws/aws-sdk-go-v2/service/grafana v1.28.0/go.mod h1:fq5/ey90xYUVylpeEcLpE7B7l+aJ5p5a4VeS67ulNuc= -github.com/aws/aws-sdk-go-v2/service/greengrass v1.29.0 h1:5a775AVaSGDIW8B9p5zziOzhR/Tisn5DEd9NOdb4sKg= -github.com/aws/aws-sdk-go-v2/service/greengrass v1.29.0/go.mod h1:Tk/mhJafpWML0i6WgBEQ5jEIMcgLdfbR5FI3O4TuZRg= -github.com/aws/aws-sdk-go-v2/service/groundstation v1.34.0 h1:3UJxvzil4EshLiM5q9wFbS8Y0rPFh+yErZzisZC0/3U= -github.com/aws/aws-sdk-go-v2/service/groundstation v1.34.0/go.mod h1:96UiU9JwEI8ZYI34Uyl/9sGOWmJ7C/1xuYP7HJBo+zA= -github.com/aws/aws-sdk-go-v2/service/guardduty v1.58.0 h1:LKtdhKyA6dArMy69ZkXxfYfCdlb4/LFd6L926ip88nA= -github.com/aws/aws-sdk-go-v2/service/guardduty v1.58.0/go.mod h1:6g8oDJhcda8zS/7EJil0KMypkTn+uJLKp+Fs4XH7yT4= -github.com/aws/aws-sdk-go-v2/service/healthlake v1.31.0 h1:LoxuW3vg4vpt8yhfJxr0PmID9TcoE8NNZ5W/BPU1Diw= -github.com/aws/aws-sdk-go-v2/service/healthlake v1.31.0/go.mod h1:CtYdcZxsszAkTsJeFmV3z+Cl5C+emkBOgaEzEX2FhO4= -github.com/aws/aws-sdk-go-v2/service/iam v1.44.0 h1:xE1lyJEce58QSIcS3nh9pgLwx343J93WOn/kYrqW2jg= -github.com/aws/aws-sdk-go-v2/service/iam v1.44.0/go.mod h1:53RWbnrMMSyphkpNPbthmFf+U507eWbuJvCxk6iMKRM= -github.com/aws/aws-sdk-go-v2/service/identitystore v1.29.0 h1:o2Z2Fvbm4bxpa6y9pR5F+nfJ8Hzc81FXTTj4h6KxkKE= -github.com/aws/aws-sdk-go-v2/service/identitystore v1.29.0/go.mod h1:O6qnZVzCEzNHjuFx1RFPWJE2PAJtuE1mBlzqxaUpBT8= -github.com/aws/aws-sdk-go-v2/service/imagebuilder v1.43.0 h1:8HIBl/2IrvzfpbElpO1OMGaYdHS/VNWSxkTIM7AptI0= -github.com/aws/aws-sdk-go-v2/service/imagebuilder v1.43.0/go.mod h1:so7mgxy23c/XGSgeoTjM8G3naPgMEcCEhCteudJoNYg= -github.com/aws/aws-sdk-go-v2/service/inspector v1.27.0 h1:+yw/E8oU9nH+rrbcIhsY8mPz84+N/2Fe3ja6TiE3A2A= -github.com/aws/aws-sdk-go-v2/service/inspector v1.27.0/go.mod h1:IpxU42hc98h3t+g9BbShfb4GXKBoVM3gPNN7HRjfQ3w= -github.com/aws/aws-sdk-go-v2/service/inspector2 v1.39.0 h1:wHcexRYlL7cgzOGZQqDIS7FeY2EL4OaqkzOnu8xQYNA= -github.com/aws/aws-sdk-go-v2/service/inspector2 v1.39.0/go.mod h1:DUheDO8F7a/BwQhnle6sizF/XrQ54LSjd6RQ3Xfkr3k= +github.com/aws/aws-sdk-go-v2/internal/v4a v1.4.1 h1:4HbnOGE9491a9zYJ9VpPh1ApgEq6ZlD4Kuv1PJenFpc= +github.com/aws/aws-sdk-go-v2/internal/v4a v1.4.1/go.mod h1:Z6QnHC6TmpJWUxAy8FI4JzA7rTwl6EIANkyK9OR5z5w= +github.com/aws/aws-sdk-go-v2/service/accessanalyzer v1.41.1 h1:sHIsHhoZZSZkInpvgMzfvUVkf/yeiRam8DNu9090gEE= +github.com/aws/aws-sdk-go-v2/service/accessanalyzer v1.41.1/go.mod h1:8P/8gmNo2309Bc0hyBS2EX0M3MRzhzbiRSXGp1MfcIE= +github.com/aws/aws-sdk-go-v2/service/account v1.25.1 h1:FmkAacg5OYFEMLXpCa5NWLvQHNumYVRtwcG5sc4UUNk= +github.com/aws/aws-sdk-go-v2/service/account v1.25.1/go.mod h1:QSb7ynpJNa+VKXHxmWN+rs3ByfBGs+p0SAoPFxX67aE= +github.com/aws/aws-sdk-go-v2/service/acm v1.34.1 h1:bbwYpBRLNjE55qY4Mb0fnkPKeAmyaCk+ycGuOeI4r9Y= +github.com/aws/aws-sdk-go-v2/service/acm v1.34.1/go.mod h1:mZqY4hx40BypyT3Qm4FWpIoSdkauoV1EUDk/3ByQSuk= +github.com/aws/aws-sdk-go-v2/service/acmpca v1.41.1 h1:YQRAmjHJd08P0/1ADX386WVr2SgOlHX5epQ1LGOzG54= +github.com/aws/aws-sdk-go-v2/service/acmpca v1.41.1/go.mod h1:kZGFX2gboWjbnAuuKVLXB+S/TQ8AcY9Q9hWzcJrhink= +github.com/aws/aws-sdk-go-v2/service/amp v1.35.1 h1:5p9HHs0vsAaDn5sWSu6eH76iw6xnPRw7h+M3J5u8wp8= +github.com/aws/aws-sdk-go-v2/service/amp v1.35.1/go.mod h1:bKEb2NoSPx/F+m6gzuyuQwYrP1jVWxoEsp8dJaroviY= +github.com/aws/aws-sdk-go-v2/service/amplify v1.34.1 h1:Av8JqcN88qS1bsfxT7Sdc3V/teB3/RjtTOo3MBU5N6M= +github.com/aws/aws-sdk-go-v2/service/amplify v1.34.1/go.mod h1:UlevIZWf/Y2UXiBXJQ0RZGxSXPtryaYZx8AunJPpR2U= +github.com/aws/aws-sdk-go-v2/service/apigateway v1.32.1 h1:XfYB8mz3dzqnYzK0N4iR6FqADNg/eJIrJ3rbOEuYWKo= +github.com/aws/aws-sdk-go-v2/service/apigateway v1.32.1/go.mod h1:xAQ3iEH3mZpJE9/Us5Zw/kdjqEDMllQU7zVSrykSqq0= +github.com/aws/aws-sdk-go-v2/service/apigatewayv2 v1.29.1 h1:zIO8otLy+xqjrPDSaWyML1hcmQuwnvS8HsCdU+ljuN8= +github.com/aws/aws-sdk-go-v2/service/apigatewayv2 v1.29.1/go.mod h1:RgLyUe4baqp9nU779yVNqknHpDg/KqV5laDsCfqIfSA= +github.com/aws/aws-sdk-go-v2/service/appconfig v1.39.1 h1:3bGMrqprI9jnWqa/40jnp6RwEV6w5pGLTXTZZbBXZkk= +github.com/aws/aws-sdk-go-v2/service/appconfig v1.39.1/go.mod h1:dtjuU/bnTddHETE8FbgcROmOnD/zkW7EX9JNusF3iLs= +github.com/aws/aws-sdk-go-v2/service/appfabric v1.13.1 h1:kpb5/Bux2n8fQpAcQ3bP4Sei0TMRpeDHTvBFFR6GuFQ= +github.com/aws/aws-sdk-go-v2/service/appfabric v1.13.1/go.mod h1:9wFbrLrpuBUxnAsL2m7tU9pIY3L+dDZCMbNW4Hpr7dk= +github.com/aws/aws-sdk-go-v2/service/appflow v1.47.1 h1:6LIRPPKQWchfkDZbC9iW0FCkvv+V2uQk6PUn+zw1QaQ= +github.com/aws/aws-sdk-go-v2/service/appflow v1.47.1/go.mod h1:bOvWsq5G25xdPP8KN1rfXq+cF5Uh3apZJQ9/xhhqzVU= +github.com/aws/aws-sdk-go-v2/service/appintegrations v1.33.1 h1:sBqUFcefH0sf+d0uS75pYpPiwFg8AzrINC0PartTgqk= +github.com/aws/aws-sdk-go-v2/service/appintegrations v1.33.1/go.mod h1:unDUxaKaATQsiTmjeLwD1dz9zFR6DUSfdaUuczhqZ60= +github.com/aws/aws-sdk-go-v2/service/applicationautoscaling v1.37.1 h1:jJscyHRsZoSRMINE7JTaezT1o4hoNrmnq+3LZzsA2KA= +github.com/aws/aws-sdk-go-v2/service/applicationautoscaling v1.37.1/go.mod h1:U6e5PYaKSZZB5h5MHp5M5HZsqa0Fnhh8ts2nU2HUYz8= +github.com/aws/aws-sdk-go-v2/service/applicationinsights v1.31.1 h1:hL38Wrg+M1ppQsh/7KU3zF4LJ37EYJgP6lxsJzk8JAY= +github.com/aws/aws-sdk-go-v2/service/applicationinsights v1.31.1/go.mod h1:Sb1hExvSSaroiqVyAZvSNSnde+ljebREjCK9NcFgGSw= +github.com/aws/aws-sdk-go-v2/service/applicationsignals v1.12.1 h1:iy4/2jZHe+AZ+dXaajLA9GiFqjCgSr98sNNaBchCWic= +github.com/aws/aws-sdk-go-v2/service/applicationsignals v1.12.1/go.mod h1:m2DMDjqYA42+z/vUFqhCH0JMPSQBRj1x7qzx0xb3BGU= +github.com/aws/aws-sdk-go-v2/service/appmesh v1.31.1 h1:e8FX41jsKWustjg9j2aCB8U6lGEJc4M2AmQg/4sly4k= +github.com/aws/aws-sdk-go-v2/service/appmesh v1.31.1/go.mod h1:QI0IZBZJ5PDUkH5H3RsywJidrT6FfQ7kPKs+dCBXsfA= +github.com/aws/aws-sdk-go-v2/service/apprunner v1.35.1 h1:+Zn6vfiFbRmQCcGQiyImMftao+e7s360Q/qFhz2Cgmg= +github.com/aws/aws-sdk-go-v2/service/apprunner v1.35.1/go.mod h1:S07Cfmppi5b3wu11h6o3My/N9nUqjQ7u0U+wbISMciU= +github.com/aws/aws-sdk-go-v2/service/appstream v1.46.1 h1:I2q1xR7PWi/LQlEQKuYhs85c5Pe+8lVXhK8MJ6gbiMI= +github.com/aws/aws-sdk-go-v2/service/appstream v1.46.1/go.mod h1:5kFtgc4YQoe7OR0BU2niXUX/gIxvO0e7P3gl0w/qNa0= +github.com/aws/aws-sdk-go-v2/service/appsync v1.48.1 h1:ZDL25UdJ53x6+HRznXwBcgoZS3I8YtJKUyNAD9P37F8= +github.com/aws/aws-sdk-go-v2/service/appsync v1.48.1/go.mod h1:E8yfHHkF3MIWOWRmvopbeK8wfCkeiNIqQ5f8G7fPaO4= +github.com/aws/aws-sdk-go-v2/service/athena v1.52.1 h1:5rNoigvi9hF3zv7e8hI5l+iY5KAwKklcZCgpAh56JKI= +github.com/aws/aws-sdk-go-v2/service/athena v1.52.1/go.mod h1:Xu33b8kDuxb2omK+SUaQfbJh48c0QA7t08ne92DvTOM= +github.com/aws/aws-sdk-go-v2/service/auditmanager v1.41.1 h1:Qwhpy/ijOSxxI/V+je0qsHdxbqbDfBWR6MQ3HJF6BEs= +github.com/aws/aws-sdk-go-v2/service/auditmanager v1.41.1/go.mod h1:EarhE4+FhGV6sYnrDvsw7z4+pYSY9zX2xlkbuetUVmg= +github.com/aws/aws-sdk-go-v2/service/autoscaling v1.55.1 h1:zX6/huIuV5ldMXSiVVdmRT2oO1M+xNLzdt0du0QuhVE= +github.com/aws/aws-sdk-go-v2/service/autoscaling v1.55.1/go.mod h1:KWk5jIp+F7eu9vjz6g/UdeIk5FX2zw7zllkf8EwmHjM= +github.com/aws/aws-sdk-go-v2/service/autoscalingplans v1.26.1 h1:CkI6bqB4xGt4i8WFa4VPqkSS+2pnclSY4Zo0dwuplkE= +github.com/aws/aws-sdk-go-v2/service/autoscalingplans v1.26.1/go.mod h1:kvxZ8JSGk6ZHbsYqn02OFN2IPwKIyPq4gJJP2i68tlE= +github.com/aws/aws-sdk-go-v2/service/backup v1.44.1 h1:g8w8gNNnmpj6IB6f/ZwbTLgCHTq72EP3vFy3LYAQ49k= +github.com/aws/aws-sdk-go-v2/service/backup v1.44.1/go.mod h1:w/Tj0I8Gs1JAz/cDsWZg0Eph8Tq++krpwr5lxzRj9gs= +github.com/aws/aws-sdk-go-v2/service/batch v1.55.1 h1:Rw14EEy05ulJ8uVBr0NXS7rBF5blIdKgd+XB8IT9Cvk= +github.com/aws/aws-sdk-go-v2/service/batch v1.55.1/go.mod h1:JfQ32ZzGrphsjC5aSZ6NirIQKQEvIRxd7XOBA2GqP3Q= +github.com/aws/aws-sdk-go-v2/service/bcmdataexports v1.9.1 h1:KLTrvcyHoLx34b0r8DJrg6IveMJ6Rhrr/W7CTtcyHcY= +github.com/aws/aws-sdk-go-v2/service/bcmdataexports v1.9.1/go.mod h1:5ycq8robRvawqh+gGGSYDCtX/lgJcBHSpbXS41G2YZ0= +github.com/aws/aws-sdk-go-v2/service/bedrock v1.40.1 h1:sRAcWHE3DQOWNNfXfctc+R5QrVnDUwjqrqepIWo25HU= +github.com/aws/aws-sdk-go-v2/service/bedrock v1.40.1/go.mod h1:ZTp/fekiiAUkmAU4CDYjtk/hlRpPJnbGKaFzMNr+Hq4= +github.com/aws/aws-sdk-go-v2/service/bedrockagent v1.46.1 h1:+964aZWEhatObFc4aShL6yyLXcmr4rA6NPGd+y6TlSM= +github.com/aws/aws-sdk-go-v2/service/bedrockagent v1.46.1/go.mod h1:PYXdjAxfDP6jvOtgZIlXn+7DS2rYfMONfDiYxx1I3T0= +github.com/aws/aws-sdk-go-v2/service/billing v1.3.1 h1:ubne5J3y/pp9c/ojwPhTbBy5PJB7Gs1WM6JooUQJzCg= +github.com/aws/aws-sdk-go-v2/service/billing v1.3.1/go.mod h1:YeisxBuT89KEnsEw/BXZy+En8LjBzP4wfVqHf9Lkqzw= +github.com/aws/aws-sdk-go-v2/service/budgets v1.33.1 h1:Iai284Y0UvwLD8Bz/qDXbmdMGzrYOHCnvAKStFIn78A= +github.com/aws/aws-sdk-go-v2/service/budgets v1.33.1/go.mod h1:KkS6P8P77BprIvQyfB8cX0qkYftuwBSpug2AYjGQRow= +github.com/aws/aws-sdk-go-v2/service/chatbot v1.11.1 h1:MQ4cl83vzh3+xNt6p9wpd9Eu4UffTZDwPq3Ow6fr/4E= +github.com/aws/aws-sdk-go-v2/service/chatbot v1.11.1/go.mod h1:6WF++CTyTdZuyhTl1hXbgCe1GUvBop62/HpVvlX7uHY= +github.com/aws/aws-sdk-go-v2/service/chime v1.37.1 h1:uZotozsudJwrN4dmmRz35pXBCsDUyRNREHS6K54UNic= +github.com/aws/aws-sdk-go-v2/service/chime v1.37.1/go.mod h1:RtRWdRgq659iw+IX8GkicgBeUrAi/uM/F6UB2kRXLEw= +github.com/aws/aws-sdk-go-v2/service/chimesdkmediapipelines v1.23.1 h1:snEGKLwYw3hQWjnFWP4tJgeGB58EJ5pKVRXOQr8mgiM= +github.com/aws/aws-sdk-go-v2/service/chimesdkmediapipelines v1.23.1/go.mod h1:Jw4s1iOrBDZFuypWDpOLuZYnAWT1E7n7NI+F/oPTyR0= +github.com/aws/aws-sdk-go-v2/service/chimesdkvoice v1.23.1 h1:37kUAkGtiiFvuwB8Q+fx9WwYuCN6UsCAj17hi30mVLs= +github.com/aws/aws-sdk-go-v2/service/chimesdkvoice v1.23.1/go.mod h1:zbl4bbWYNgSrLi2KshZcnXhgUogEMwI7mTu0BL1z3m0= +github.com/aws/aws-sdk-go-v2/service/cleanrooms v1.27.1 h1:BCWj3VrS1wrgaixwbrJ9VJG9JtdSdA5u5S5RHbv036E= +github.com/aws/aws-sdk-go-v2/service/cleanrooms v1.27.1/go.mod h1:VNBjeDkZNToj7jboiPq4KlPI7Y7OP5m1tN5Y652vNgQ= +github.com/aws/aws-sdk-go-v2/service/cloud9 v1.30.1 h1:04cu8ernMSugkM31n9yPzvweuze8bTlifLe1Ky1J+3w= +github.com/aws/aws-sdk-go-v2/service/cloud9 v1.30.1/go.mod h1:vJ5ns5qOlLbAA3A4IhAXNYJ2ao+3ckUkeshi6IuBZxg= +github.com/aws/aws-sdk-go-v2/service/cloudcontrol v1.25.1 h1:7S5JbWI2b7lSCWcWcrgaE0XSYS3muGnt+rrxEWH7c5Y= +github.com/aws/aws-sdk-go-v2/service/cloudcontrol v1.25.1/go.mod h1:bvxQ0XpcdTa32bVV9ORpSQA3dLKBGZbbH+1HFQgx4ng= +github.com/aws/aws-sdk-go-v2/service/cloudformation v1.62.1 h1:gqN14m9ds7GOyB9B3es0Gv0xf1OaPpqmU1qUGXh8sR0= +github.com/aws/aws-sdk-go-v2/service/cloudformation v1.62.1/go.mod h1:bfVI9myeahAr36mMKS/dtXsU4inMeZd9CCYe1kcHmHA= +github.com/aws/aws-sdk-go-v2/service/cloudfront v1.49.0 h1:ZABkPLtfK+q2GkW1pA+NukaGM/EAKamEUR347B1md2U= +github.com/aws/aws-sdk-go-v2/service/cloudfront v1.49.0/go.mod h1:PHC5ybfgglvCqD7fLaqR5A7LIuJqIoUxhlwF/8faMt0= +github.com/aws/aws-sdk-go-v2/service/cloudfrontkeyvaluestore v1.10.1 h1:c0BRZh3XLzqzx0UuJ13HsnFQEpPWwpGKDoiONRZmdPg= +github.com/aws/aws-sdk-go-v2/service/cloudfrontkeyvaluestore v1.10.1/go.mod h1:Vyk18vQt9kEsM/YyRmnLKUmLd6DI/JhcL7MeRD60WpQ= +github.com/aws/aws-sdk-go-v2/service/cloudhsmv2 v1.31.1 h1:beB+ptVgyQsnISH3XjxUmbhtn7oO6cuuB8kwSQp6LfE= +github.com/aws/aws-sdk-go-v2/service/cloudhsmv2 v1.31.1/go.mod h1:lKCraexL7AGqlyR6j4uBJWKDMvMyDydrjOLcSmgCAK8= +github.com/aws/aws-sdk-go-v2/service/cloudsearch v1.28.1 h1:ggLVSG9dPkP02VXhRAWLpq7FpNxM9S8F6M2UGqKsv98= +github.com/aws/aws-sdk-go-v2/service/cloudsearch v1.28.1/go.mod h1:2+h6rZKo2OMnxiE5gyqLwB50cfGm25PsDYSiamOQ9Dg= +github.com/aws/aws-sdk-go-v2/service/cloudtrail v1.50.1 h1:f+n0I/ayFBFUrq/x9Y7YwJlQr+SkoNjJpWy24scdtps= +github.com/aws/aws-sdk-go-v2/service/cloudtrail v1.50.1/go.mod h1:OE2RTaxbHdirCXEtYu4/2K2VNDT2fJdW2XsGngXLEKA= +github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.46.1 h1:jdaLx0Fle7TsNNpd4fe1C5JOtIQCUtYveT5qOsmTHdg= +github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.46.1/go.mod h1:ZCCs9PKEJ2qp3sA1IH7VWYmEJnenvHoR1gEqDH6qNoI= +github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs v1.54.1 h1:eKC7wj2CjC0dJcTPPZa33ku+mueglsEb3c8L8GMarnQ= +github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs v1.54.1/go.mod h1:+Y32vrMhsQMA+q2x2cyQrox40n9RSkmZ6t+sGujF0ME= +github.com/aws/aws-sdk-go-v2/service/codeartifact v1.35.1 h1:q99yNK/Gt8XzQ7hfxIDlK97S9Vmjsg/R0ihMS4P+QPw= +github.com/aws/aws-sdk-go-v2/service/codeartifact v1.35.1/go.mod h1:VKj4D43shqsd8dQPL/ToiS07uq+T0EZrQAxSA/CpXJQ= +github.com/aws/aws-sdk-go-v2/service/codebuild v1.62.1 h1:YgQ9aeWfU3BIvgATyl0QmrNJCJvptK1JGLOpSWyrAh8= +github.com/aws/aws-sdk-go-v2/service/codebuild v1.62.1/go.mod h1:WOmjO0fUYhgcNaa2jaqqZ7mpJxcg08OmDcBeOManSrE= +github.com/aws/aws-sdk-go-v2/service/codecatalyst v1.18.1 h1:w8Ehk06uqB2zyiKTnbkRUqdCiVe65GiLEXlsOXjPkPs= +github.com/aws/aws-sdk-go-v2/service/codecatalyst v1.18.1/go.mod h1:q7wXTFLkr082Ae1N3j+r9as7Qjow+XTu3Ck/dKtksGo= +github.com/aws/aws-sdk-go-v2/service/codecommit v1.29.1 h1:dpVTBYBDawcWN5Dzs/mEIsvbTIB7DZahTE8ZFbOXfDc= +github.com/aws/aws-sdk-go-v2/service/codecommit v1.29.1/go.mod h1:CDOCvuSESB8TytvDLyElgP4gVMZgYJNEbCBWiVSHbYg= +github.com/aws/aws-sdk-go-v2/service/codeconnections v1.7.1 h1:f20DiugdjJZGsFhdaKrKX5bF2V7DzE48gPNWVBCtCaE= +github.com/aws/aws-sdk-go-v2/service/codeconnections v1.7.1/go.mod h1:B/DVlqEIwSkOQFdy5IMbTWvmvc/b/lY/v9wZFWlxCqc= +github.com/aws/aws-sdk-go-v2/service/codedeploy v1.31.1 h1:nLtbuM+D3kr0TANA53zNzfgCn1msUIZIVvO8GQ8zgsw= +github.com/aws/aws-sdk-go-v2/service/codedeploy v1.31.1/go.mod h1:nhyDCGnLTixvFU4RfdiQywPgounyF0se2CAAQZC200c= +github.com/aws/aws-sdk-go-v2/service/codeguruprofiler v1.26.1 h1:yp9Ilhs7gtUeK90/Lfqr/zXPu+wFVHwI4ASR+EpzBP8= +github.com/aws/aws-sdk-go-v2/service/codeguruprofiler v1.26.1/go.mod h1:M5AqEEJg0YVH0HolYS6qlDmVotbAkIaU1d17sAPFyDI= +github.com/aws/aws-sdk-go-v2/service/codegurureviewer v1.31.1 h1:o02/8n6dGGYFrTCE0mqHKLZkprnUjehxqf1WldSWrJ8= +github.com/aws/aws-sdk-go-v2/service/codegurureviewer v1.31.1/go.mod h1:HiWlOR1PpVyB59fCnPuULZ/M0P/qPPV27cJgMZza0+g= +github.com/aws/aws-sdk-go-v2/service/codepipeline v1.43.1 h1:4f9TwbJesmy9tqPtUbSMo7gg6TLnCK4ylLq7n0qFVWc= +github.com/aws/aws-sdk-go-v2/service/codepipeline v1.43.1/go.mod h1:s6P0ArGOLmTXbc1lIeRczLm6R04ZvayVWeX8k3Z9v6I= +github.com/aws/aws-sdk-go-v2/service/codestarconnections v1.31.1 h1:YPFqlu6T3bxhmfur9CFazxh5puWiL0uxjrukw2GEFPg= +github.com/aws/aws-sdk-go-v2/service/codestarconnections v1.31.1/go.mod h1:y3qe0icKlqpF2ccL/o6t8fPR8c0o4tGplskz34fvJx4= +github.com/aws/aws-sdk-go-v2/service/codestarnotifications v1.28.1 h1:fRqouJqnHOFgVHLjhe/UXJWkihuDByU9CBBuZGUU4Ek= +github.com/aws/aws-sdk-go-v2/service/codestarnotifications v1.28.1/go.mod h1:oPiggwnMwW1eRcFq3rImb6gms6HIqgr+h65NSZzOn3o= +github.com/aws/aws-sdk-go-v2/service/cognitoidentity v1.30.1 h1:NB1+cWutptq+UHLSodvhdhNw8mSf3L2slhysVs5HCh8= +github.com/aws/aws-sdk-go-v2/service/cognitoidentity v1.30.1/go.mod h1:nPuM/gz996X+i7RSnw1LNdaP9NFBMgEpamx6YB2mrQQ= +github.com/aws/aws-sdk-go-v2/service/cognitoidentityprovider v1.54.1 h1:QS+vL4FEdHfs7wSGj7SQJZmbk3m7SMzNI3uluL8KMwU= +github.com/aws/aws-sdk-go-v2/service/cognitoidentityprovider v1.54.1/go.mod h1:gdYsfThKvm9P3PAqtXR9Lx4up/w83eKGCW0myw5s5wI= +github.com/aws/aws-sdk-go-v2/service/comprehend v1.37.1 h1:Xat/BhQMFHWTNCcZeYu6ETUyk1xrTBHmSBabQZsoCTQ= +github.com/aws/aws-sdk-go-v2/service/comprehend v1.37.1/go.mod h1:j9LTyGi9ayVVJTv24l18umZyMghJMBGAz00LNa/FD+Y= +github.com/aws/aws-sdk-go-v2/service/computeoptimizer v1.44.1 h1:Vz3eSSKha0gWpZtUmGDJDUGw+J+CWNUs9NtM2FnOgiE= +github.com/aws/aws-sdk-go-v2/service/computeoptimizer v1.44.1/go.mod h1:/GZI/NTlYrq4ebfgeAWd28CYAIkma0LEhzR6LBxkAsc= +github.com/aws/aws-sdk-go-v2/service/configservice v1.54.1 h1:f6aReZOJPcBvEdpMUy16fHeOEs9Dy7PwqQ1qMQpYxt8= +github.com/aws/aws-sdk-go-v2/service/configservice v1.54.1/go.mod h1:AF+ERbemhpKFDlA+LTHNgol4p7uY1ovFe9fCB+RLALk= +github.com/aws/aws-sdk-go-v2/service/connect v1.132.1 h1:eKxoFnZ+WuKSCvnrUSfUYsxniYA1PCKtu97+3fhhdP0= +github.com/aws/aws-sdk-go-v2/service/connect v1.132.1/go.mod h1:rbvCsyvfb8gqfvmS25MbGtytizsOhSUcxLWt1rGCNj0= +github.com/aws/aws-sdk-go-v2/service/connectcases v1.27.1 h1:5aZmKdQjd1rSCDjEBKKt0EzQY5DRfHFCCTpNiw/0haw= +github.com/aws/aws-sdk-go-v2/service/connectcases v1.27.1/go.mod h1:Fv0vm+4lp7bGowaFlHsM6OWGRGsRmhL4R1UZU4F4Y68= +github.com/aws/aws-sdk-go-v2/service/controltower v1.23.1 h1:Y3vnotVgNjDLTajaTTH+XbDcmmB9jfQ+Qz/YN1dbONo= +github.com/aws/aws-sdk-go-v2/service/controltower v1.23.1/go.mod h1:nKfpvxTfSBs+V/OSWVlzYV5K7RL9J/P5ZvGNk+0/Mug= +github.com/aws/aws-sdk-go-v2/service/costandusagereportservice v1.30.1 h1:SYiS9JKkBdWl3sV6v2KMt82XKc+JVUwifpf6JMIyI4U= +github.com/aws/aws-sdk-go-v2/service/costandusagereportservice v1.30.1/go.mod h1:yElKdxGVSH05dS0kzR6AAiyp/+/c0tGk5DoPgffIl2A= +github.com/aws/aws-sdk-go-v2/service/costexplorer v1.52.1 h1:MRfsy+UosplTbrTui5cUVJ4era6XBjZv0lEGUgcG86Q= +github.com/aws/aws-sdk-go-v2/service/costexplorer v1.52.1/go.mod h1:XhV87ldg1xBh4WjKcc6aW3SFwzaIjNhuPtDEhZ5/gds= +github.com/aws/aws-sdk-go-v2/service/costoptimizationhub v1.17.1 h1:wP6PryT7nTlNrnsBh5riZLJXM1zOjzcS0xCKvAqmRnM= +github.com/aws/aws-sdk-go-v2/service/costoptimizationhub v1.17.1/go.mod h1:ptisHEhEb179hVX6qvulR2ZQ2oRJU3BpmouFmM8SRDU= +github.com/aws/aws-sdk-go-v2/service/customerprofiles v1.48.1 h1:3vub+nmiLA8HX92CinuqtoTrcW//t+sAFFcOBioT2BA= +github.com/aws/aws-sdk-go-v2/service/customerprofiles v1.48.1/go.mod h1:E96OYyTW0QrMri8Xc3RYV7BrJhd7SUrqsGL5YYCsneU= +github.com/aws/aws-sdk-go-v2/service/databasemigrationservice v1.54.1 h1:tHAEfv1QzqRN0I46Bxc7vNav9B54dDPv8ZyJei+TtUU= +github.com/aws/aws-sdk-go-v2/service/databasemigrationservice v1.54.1/go.mod h1:l/63jy0JYcuPgsIn0sCarneGQZT60Z3VJZCTHg9joJQ= +github.com/aws/aws-sdk-go-v2/service/databrew v1.35.1 h1:WyjDtS3+ZYk6PYc5f+r92dUbl8rKXafSALk4gbSc9sE= +github.com/aws/aws-sdk-go-v2/service/databrew v1.35.1/go.mod h1:ZU262AoIUejl0Sjc4iZcOa3V4tGM9eJGmFl2kVuqXmE= +github.com/aws/aws-sdk-go-v2/service/dataexchange v1.36.1 h1:vhAcPY29FzRoyJEeFZny/cW50gS24Gt94VLgEk00THQ= +github.com/aws/aws-sdk-go-v2/service/dataexchange v1.36.1/go.mod h1:+3KxWI5wJ70b7eCiUOQQArXw1ba9fRWjwrtJ++SlAcE= +github.com/aws/aws-sdk-go-v2/service/datapipeline v1.27.1 h1:yDWeBJrxYOeqZalv6rYH8pKG+yHHcT3IlagoVvWgGaU= +github.com/aws/aws-sdk-go-v2/service/datapipeline v1.27.1/go.mod h1:XOb2itVVqEMQUUsCisw4B2ViGuF8bgnxTJDEUfeQmfA= +github.com/aws/aws-sdk-go-v2/service/datasync v1.51.1 h1:OmB6TLQAlHe674BdA6iYos3twoaqlRi3O3D4ugY48PA= +github.com/aws/aws-sdk-go-v2/service/datasync v1.51.1/go.mod h1:sYdcLC2TL27hMrCF22BodOKNHw5qp9p+3lMR8MOhBT0= +github.com/aws/aws-sdk-go-v2/service/datazone v1.34.1 h1:7Vc7AKcOiWiUnEkuKIJym8mx0ZVAElRxek8nO/Fu1JQ= +github.com/aws/aws-sdk-go-v2/service/datazone v1.34.1/go.mod h1:7cSev4IbgiJPWqraB12r4ieb73nrGFfOCvDwuGkTdJ8= +github.com/aws/aws-sdk-go-v2/service/dax v1.25.1 h1:r3jbJgyI9lsSbQI8IMFEMmawIzEaD97nk54Xe/Voq0Q= +github.com/aws/aws-sdk-go-v2/service/dax v1.25.1/go.mod h1:PIN6XFvWGPlyg8Mb/P3OEBq4Qh7Ue1CGXNen/kpGi0U= +github.com/aws/aws-sdk-go-v2/service/detective v1.34.1 h1:R1+JPYi15Sow0hS36G0vbg7A6Xk5u3vUxDXSm/wry4c= +github.com/aws/aws-sdk-go-v2/service/detective v1.34.1/go.mod h1:76n0ZZINIlFxYRJAJE036Es05+2B29Ry9ua6sbwmeNc= +github.com/aws/aws-sdk-go-v2/service/devicefarm v1.32.1 h1:ReB2/CPevDweGjecwp8ya3vJsmhH6fziyhuYXbW7l8s= +github.com/aws/aws-sdk-go-v2/service/devicefarm v1.32.1/go.mod h1:yiyj6Af9/jK0/N3KwTsNf8HGEMDMzwWuKNeNCv+xq0g= +github.com/aws/aws-sdk-go-v2/service/devopsguru v1.36.1 h1:cvXl9NB4eCIcI2OJoGGUP1UTe3lgMwECXu6rKX4/fxA= +github.com/aws/aws-sdk-go-v2/service/devopsguru v1.36.1/go.mod h1:AGvxtUnglcKvdNDclLBhfO/ksr7cPXlcXYcErasXHM8= +github.com/aws/aws-sdk-go-v2/service/directconnect v1.33.1 h1:ur6teJsonXZ3DQ4HY4F68b5rEvRVxpm7WYaZTTZiYeY= +github.com/aws/aws-sdk-go-v2/service/directconnect v1.33.1/go.mod h1:Zz+wZAdmA+3xJ2/4HFfkDJUqCri4i4wJ51RC08CS39k= +github.com/aws/aws-sdk-go-v2/service/directoryservice v1.33.0 h1:6Mkvj/XKGR0un5ZN3C/fzbwEQDfvFyiqz9onbul2tXE= +github.com/aws/aws-sdk-go-v2/service/directoryservice v1.33.0/go.mod h1:cE8g6YE7isdWy1WJEuslcG9/O/xYpN56+Gd+v5Nay2Q= +github.com/aws/aws-sdk-go-v2/service/dlm v1.31.1 h1:X3N98uVi57B01cxV5wlSEXmaQDoH0SkT/cPVFNGis3o= +github.com/aws/aws-sdk-go-v2/service/dlm v1.31.1/go.mod h1:8cJzEU8w/u2gkatmGTd3O7EFLoGP0feaIWihDpDsS90= +github.com/aws/aws-sdk-go-v2/service/docdb v1.43.0 h1:KkTo1IeL3eI6bpAUzzte6byFZmO26njFqdfn0fMgrZU= +github.com/aws/aws-sdk-go-v2/service/docdb v1.43.0/go.mod h1:LXUurR6oU0Mur/zfXB6ZUpWeC3nGOv4TZCvKvxyd1Ts= +github.com/aws/aws-sdk-go-v2/service/docdbelastic v1.16.1 h1:NpdGerAwJLMan0qv9FZkMKurlfrfWpB/tuIxQGcIoKQ= +github.com/aws/aws-sdk-go-v2/service/docdbelastic v1.16.1/go.mod h1:Rt5mVlAnNpabHok0G9i2aP2kuCXmZqUluUWu9Gr4L2o= +github.com/aws/aws-sdk-go-v2/service/drs v1.32.1 h1:Bnca8nXq9fzKneUaKGg6EPs6BRokMoCMjCjxOujPsok= +github.com/aws/aws-sdk-go-v2/service/drs v1.32.1/go.mod h1:GkjA421JeU3rZw+OtqtRhcTX5/oMV4eCktMTP49RjEY= +github.com/aws/aws-sdk-go-v2/service/dsql v1.6.1 h1:9gsd5GS4hpu0Dy51zyUZbO48c94BaUL6445wO0puPfk= +github.com/aws/aws-sdk-go-v2/service/dsql v1.6.1/go.mod h1:zCjUFiEqbIipUKwhROZhoOtW7bgBBfOXf1FSGc2uSRQ= +github.com/aws/aws-sdk-go-v2/service/dynamodb v1.45.1 h1:gFD9BLrXox2Q5zxFwyD2OnGb40YYofQ/anaGxVP848Q= +github.com/aws/aws-sdk-go-v2/service/dynamodb v1.45.1/go.mod h1:J+qJkxNypYjDcwXldBH+ox2T7OshtP6LOq5VhU0v6hg= +github.com/aws/aws-sdk-go-v2/service/ec2 v1.238.0 h1:fXZYx7xDSocFM3ht/mwML7eCP7cPbs1ltXEM8zpwU5o= +github.com/aws/aws-sdk-go-v2/service/ec2 v1.238.0/go.mod h1:lhyI/MJGGbPnOdYmmQRZe07S+2fW2uWI1XrUfAZgXLM= +github.com/aws/aws-sdk-go-v2/service/ecr v1.47.1 h1:gwqCrRvz+vnhWyG9/WSzo6HspAO5mWXBeYo9ELFUcIM= +github.com/aws/aws-sdk-go-v2/service/ecr v1.47.1/go.mod h1:VVqrGCL0/zQif1J6axnyUBVRf6lySV5/QhxV9RspEHY= +github.com/aws/aws-sdk-go-v2/service/ecrpublic v1.34.1 h1:BiOKbndtmSaZypHR0S7lO0DuffGegLvbkGfq4aNJlFc= +github.com/aws/aws-sdk-go-v2/service/ecrpublic v1.34.1/go.mod h1:rAWV5KSmhcjfXEzn2j+heWufy+JWlNDvkhyirRPB0+o= +github.com/aws/aws-sdk-go-v2/service/ecs v1.61.1 h1:C9YpiBJwF9ORx1PNLK7hIT9edNcezQs+ioCT64414+8= +github.com/aws/aws-sdk-go-v2/service/ecs v1.61.1/go.mod h1:NzX/k/6nc9X5l1NShl1p2PLbBZ2IohBcD0d76o7uPtw= +github.com/aws/aws-sdk-go-v2/service/efs v1.37.1 h1:if46gpuITm8t4b7C/1hWSiHTI35LVWXN55H/SCWowl4= +github.com/aws/aws-sdk-go-v2/service/efs v1.37.1/go.mod h1:ytV6yB7YT5kElfKIubv3CP9nKG1IVEXAMDHOC0Wgrgo= +github.com/aws/aws-sdk-go-v2/service/eks v1.67.1 h1:Pw8b30mgnG894pn6DHOvnHqT9tIAqOyg3NuBcsBaL3c= +github.com/aws/aws-sdk-go-v2/service/eks v1.67.1/go.mod h1:ZkszcAXXOpLXbLBZrrog9lCwZF3NyZryUDxXY/InzSM= +github.com/aws/aws-sdk-go-v2/service/elasticache v1.47.1 h1:DIP+2UukVi9P4PHLUF2HXpZEtkbDLmqYcWILuU/m0IQ= +github.com/aws/aws-sdk-go-v2/service/elasticache v1.47.1/go.mod h1:8LEhIVZFKc9OfOrug9sIsm9lTSmiS0KT121aXUnoTPo= +github.com/aws/aws-sdk-go-v2/service/elasticbeanstalk v1.30.1 h1:j4jxdx6ZiG2Xcj9DfjHhX65af8gpUZ4uvEZxJsEuTHk= +github.com/aws/aws-sdk-go-v2/service/elasticbeanstalk v1.30.1/go.mod h1:PWa7FRheclz+S0lyhGNw0w4HBoa1fqBzE/a1UXfUqzk= +github.com/aws/aws-sdk-go-v2/service/elasticloadbalancing v1.30.1 h1:ZZeI9bCwIbqoKu5hll1dmisMJ4ZeBEhdsszV/gOFm1s= +github.com/aws/aws-sdk-go-v2/service/elasticloadbalancing v1.30.1/go.mod h1:fcC73gpU/J/SmRut8/CmwM5oJO3bSpW7wgufVdtWSbg= +github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2 v1.47.1 h1:H8+KiNkkY3q3u7IUSjc7oCshnHOOGvYOi7fT6ZJ23OI= +github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2 v1.47.1/go.mod h1:91PY/MUWThH0rH61v9r3QA4e7dS/PfXl+K63wltBeas= +github.com/aws/aws-sdk-go-v2/service/elasticsearchservice v1.34.1 h1:kVZzJvXCPx1Tkiqfxxw/a4uZmbquVu5NG4FgYXkiHOg= +github.com/aws/aws-sdk-go-v2/service/elasticsearchservice v1.34.1/go.mod h1:yHOWiozIeWy2Twojm1eq+2AV9XSY9NBcGLP81eaxTJs= +github.com/aws/aws-sdk-go-v2/service/elastictranscoder v1.29.1 h1:qMs7UOiRWN5skmmfmBkT+8ygksVYbPEUNflmlqYhTNM= +github.com/aws/aws-sdk-go-v2/service/elastictranscoder v1.29.1/go.mod h1:DThfdXM8k1f9rWh0nUVIqBA35+i8m9oNXdn7vbT9Aig= +github.com/aws/aws-sdk-go-v2/service/emr v1.51.1 h1:uqDQXEq5AEju5XxbycnFiLdsK1+IbmaOqqqt0D3MaRM= +github.com/aws/aws-sdk-go-v2/service/emr v1.51.1/go.mod h1:dYB/K65iH3LBAsSfE2V9hQMMZCWwZ/eskSnvwB+94Dg= +github.com/aws/aws-sdk-go-v2/service/emrcontainers v1.36.1 h1:fatKIhCAmO39bB0XvT0aIsABOtNzirPHkY0O0mibr1I= +github.com/aws/aws-sdk-go-v2/service/emrcontainers v1.36.1/go.mod h1:JkeTS9XADAj2PRKxxzXLlp+pyyxAQpbaoIFo7ydRGBM= +github.com/aws/aws-sdk-go-v2/service/emrserverless v1.33.1 h1:uFi7sYl7SR4WLG3h+L1rW/HFolCi/L/hWHG9fnj1c+Y= +github.com/aws/aws-sdk-go-v2/service/emrserverless v1.33.1/go.mod h1:puDjU4Zu69ZZjkh5L2RyR5T3TVJDeWmQhXV0ZpSfZg0= +github.com/aws/aws-sdk-go-v2/service/eventbridge v1.42.1 h1:ME8HTzLgCmHN32s9KChZexwyouSyLPvDn2LJl4r89OE= +github.com/aws/aws-sdk-go-v2/service/eventbridge v1.42.1/go.mod h1:lJVM+ARsu8r3lf4dR0RLB1G6NToIJQRb0Gu6ykAMGCM= +github.com/aws/aws-sdk-go-v2/service/evidently v1.25.1 h1:NhuU+ww2xUvZoMLQ2dLmTcZUt9rbU0avHsdAAgkl6fU= +github.com/aws/aws-sdk-go-v2/service/evidently v1.25.1/go.mod h1:tpNT0uaDvJIpW3ykBc3dQ+nr1SEnf/7RgExF6oD3sG4= +github.com/aws/aws-sdk-go-v2/service/evs v1.1.1 h1:/CDLFn0/JzQkRPudFgezHiocIyi466amw3+RcxvfZSY= +github.com/aws/aws-sdk-go-v2/service/evs v1.1.1/go.mod h1:Uz/HiziBhzCTge8mOxy8l2oMiS4Zsqr2uO52hRs7jLI= +github.com/aws/aws-sdk-go-v2/service/finspace v1.30.1 h1:V0gqQtpjjOtrt1Lede0xuTIa5DCf5geHAeEnFmeEqdU= +github.com/aws/aws-sdk-go-v2/service/finspace v1.30.1/go.mod h1:rA1xygzkTSu7WWIhd5QS7QHb6910QBIBe2rN+HTtbqo= +github.com/aws/aws-sdk-go-v2/service/firehose v1.38.1 h1:D5mbw/YzZ9ibZT/SZcc+jppu1EC2YPBXC7n60gEYHhw= +github.com/aws/aws-sdk-go-v2/service/firehose v1.38.1/go.mod h1:nvVn2pz5jdhGbwcYzJ/o+kbZXRwjblofi3stc2mfKpk= +github.com/aws/aws-sdk-go-v2/service/fis v1.34.1 h1:gEd15BudHu1LEW7cE+78CjASMvxrK36z1Z1ayzMwnbQ= +github.com/aws/aws-sdk-go-v2/service/fis v1.34.1/go.mod h1:F5SaK324QSusZ4YLbuROwZ2ZUaczsr4uGTNQK0cTjxA= +github.com/aws/aws-sdk-go-v2/service/fms v1.41.1 h1:b+ol8ooL9qFSVulRN7gT7LMPbCeSXYhS5irfU3U+gJU= +github.com/aws/aws-sdk-go-v2/service/fms v1.41.1/go.mod h1:H7I1xzO0zfGnTGLO5KxdFi3Sv2aHBm/LSEt/ECnMTbE= +github.com/aws/aws-sdk-go-v2/service/fsx v1.56.1 h1:CYITpNYHh86TCr2VJbo9x3BCbHepyF5Tah0P/Z12bqg= +github.com/aws/aws-sdk-go-v2/service/fsx v1.56.1/go.mod h1:vAxwTvmBYSfkC8qVllyQyL7XCgwQpYuUbGjyL/djBD4= +github.com/aws/aws-sdk-go-v2/service/gamelift v1.43.1 h1:DgDl1xmkazdMYxjQgE6dUAZ/IV4DtEjsbiZAt+VgTc8= +github.com/aws/aws-sdk-go-v2/service/gamelift v1.43.1/go.mod h1:3ovhs4O2fcf1tFiUC0J7D253BXrI9w3/VVo49EBCI1E= +github.com/aws/aws-sdk-go-v2/service/glacier v1.28.1 h1:UDiRjAcoJ9pxHvwaR83mGhdkVhXqYY8tnLLyYbR/X+w= +github.com/aws/aws-sdk-go-v2/service/glacier v1.28.1/go.mod h1:JF/OUsjyuN42tFdT6Z7XPMUL0TdgQauFdpAjOlgPzMA= +github.com/aws/aws-sdk-go-v2/service/globalaccelerator v1.31.1 h1:BlojjkVblgLjPzotny0DsKcfLBb/bC4ODhI9fXu/YpM= +github.com/aws/aws-sdk-go-v2/service/globalaccelerator v1.31.1/go.mod h1:BqZ/xicmt1yJLth0oV8o86GKsEIjF7XLKJA6o6+Tb4g= +github.com/aws/aws-sdk-go-v2/service/glue v1.120.1 h1:+XyO1sIwM4J7Ru5bGlUIkFF3BuSVHp9xHBDKLKt205g= +github.com/aws/aws-sdk-go-v2/service/glue v1.120.1/go.mod h1:GrfuFuhLuhdZy8Tx0W29A6avb0+Xey8DDS0izAj3/gY= +github.com/aws/aws-sdk-go-v2/service/grafana v1.28.1 h1:xef5GSQwdnBBEodb67YGYE7CanW5uuQyI/8q+rMs6IE= +github.com/aws/aws-sdk-go-v2/service/grafana v1.28.1/go.mod h1:wejuc0EF416jLYLVi4yyRZiZLtBwIPHR+L0fUnTlMeU= +github.com/aws/aws-sdk-go-v2/service/greengrass v1.29.1 h1:OiVM4eAVc1Ixumpnf4wQTJVHGA01qjzZlvaisWUBx08= +github.com/aws/aws-sdk-go-v2/service/greengrass v1.29.1/go.mod h1:ctd0N/Z5NBrVk8DRHDnVPDGXLYgEIw1UvG2ia2Tgbvg= +github.com/aws/aws-sdk-go-v2/service/groundstation v1.34.1 h1:dMBjI+4ScXf5fIeYI+70DHxC35hknZUYs2/u2ou9BZ0= +github.com/aws/aws-sdk-go-v2/service/groundstation v1.34.1/go.mod h1:co4tdt5zpodqW74jxLUio7V/EGMBNimy/8RJP8KF0vk= +github.com/aws/aws-sdk-go-v2/service/guardduty v1.58.1 h1:rsEOQaTAe6aJqwntPqjzY/o9E2/3HzP4GQajzizEgkA= +github.com/aws/aws-sdk-go-v2/service/guardduty v1.58.1/go.mod h1:eQ9c3TyaAMTn2/P6vjnPjZ6b3ViTaHsTPOY9gdUBvXo= +github.com/aws/aws-sdk-go-v2/service/healthlake v1.31.1 h1:71vwj+vvOeZJ3w9XuW/9tv80byCdifbQ/Qf5Mc5y2zU= +github.com/aws/aws-sdk-go-v2/service/healthlake v1.31.1/go.mod h1:QrR1Yf1RmLYOxRFL/ctdUAF8ee4LSBHKOa46wV90nQ8= +github.com/aws/aws-sdk-go-v2/service/iam v1.44.1 h1:V82Oyj0zU2QFJL+qvvdAqt2YYsRO0QNb9RewnvDWpdo= +github.com/aws/aws-sdk-go-v2/service/iam v1.44.1/go.mod h1:aZ7pMz0bZfPi485gVCIinav3M61EbkGENEMlcMMWuhI= +github.com/aws/aws-sdk-go-v2/service/identitystore v1.29.1 h1:6EYdc0UwxUCGZRj+iGDU9z47XgUAt1Y/Ol+dALGynp0= +github.com/aws/aws-sdk-go-v2/service/identitystore v1.29.1/go.mod h1:S0hd0msvckDEAMvVPpAv3A5ND3slDD/6V3K9an6sn7o= +github.com/aws/aws-sdk-go-v2/service/imagebuilder v1.43.1 h1:PmJzM5B+coktfBZWoSqfehsm0x97bg0bEworfDe9rB4= +github.com/aws/aws-sdk-go-v2/service/imagebuilder v1.43.1/go.mod h1:XQjpa5wcTMPwzOW+ur3sj3NRKhwkeyP4ofPuW6OG42A= +github.com/aws/aws-sdk-go-v2/service/inspector v1.27.1 h1:QG8CsTmAhAPFmpowqocbfVfRDkh5WkoNtzv4vW1BiJk= +github.com/aws/aws-sdk-go-v2/service/inspector v1.27.1/go.mod h1:3LVGyTD16Yf0GQ4jl39tnMRYO/nE8VS5rZGsJyAKm4A= +github.com/aws/aws-sdk-go-v2/service/inspector2 v1.39.1 h1:Uj4kFuhdRozJwkKtDx6lpSpu374B4zUeLAgRCrE6RRg= +github.com/aws/aws-sdk-go-v2/service/inspector2 v1.39.1/go.mod h1:Go5fLgTjY0qKiAVTvcS+nlYH0pHa5IAETQPsoYM/3WY= github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.13.0 h1:6+lZi2JeGKtCraAj1rpoZfKqnQ9SptseRZioejfUOLM= github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.13.0/go.mod h1:eb3gfbVIxIoGgJsi9pGne19dhCBpK6opTYpQqAmdy44= -github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.8.0 h1:qGyLBQPphYzUf+IIlb5tHnvg1U2Vc5hXPcP7oRSQfy0= -github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.8.0/go.mod h1:g+dzKSLXiR/8ATkPXmLhPOI6rDdjLP3tngeo3FvDcIw= -github.com/aws/aws-sdk-go-v2/service/internal/endpoint-discovery v1.11.0 h1:d/XdC88Wp2JVsomt1yw+nQgAX42fYwZlEK4K4zzHZuA= -github.com/aws/aws-sdk-go-v2/service/internal/endpoint-discovery v1.11.0/go.mod h1:ZfRwNlclmR48RAgflKBOi43bY1MjvraHZPsG3A/i0iw= -github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.13.0 h1:eRhU3Sh8dGbaniI6B+I48XJMrTPRkK4DKo+vqIxziOU= -github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.13.0/go.mod h1:paNLV18DZ6FnWE/bd06RIKPDIFpjuvCkGKWTG/GDBeM= -github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.19.0 h1:6jusT+XCcvnD+Elxvm7bUf5sCMTpZEp3AKjYQ4tWJSo= -github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.19.0/go.mod h1:LimGpdIF/sTBdgqwOEkrArXLCoTamK/9L9x8IKBFTIc= -github.com/aws/aws-sdk-go-v2/service/internetmonitor v1.22.0 h1:p3g8ut8+ep02v6NIXvi9FdXcxf/AfuWVIjI/Bbr5gcI= -github.com/aws/aws-sdk-go-v2/service/internetmonitor v1.22.0/go.mod h1:rODw7nLvCzUl+v2+3A1uRTovKAf87HBz6guzsJtbGW8= -github.com/aws/aws-sdk-go-v2/service/invoicing v1.3.0 h1:Brk5vEn+/As6+tLhyFrOcOjpnKRqW2MYMlRx0a5wpvk= -github.com/aws/aws-sdk-go-v2/service/invoicing v1.3.0/go.mod h1:QyadL1Mkewe0Z2sOIw6mh2BmOtZIeaEzFfh/KpdhIn8= -github.com/aws/aws-sdk-go-v2/service/iot v1.65.0 h1:1dP1vvaHOz6o1Dg2Gu4VG/YZi++065kJxHSoJ+Cy4QY= -github.com/aws/aws-sdk-go-v2/service/iot v1.65.0/go.mod h1:ypuhAtRDma1YrmIeMUmUxNrTfG6PWMDyqXzUxjrQrPo= -github.com/aws/aws-sdk-go-v2/service/ivs v1.44.0 h1:g7mtxczmaaL6zmXpGuUXugOHAaM2bQu9WyknraS7U3I= -github.com/aws/aws-sdk-go-v2/service/ivs v1.44.0/go.mod h1:GPprUEX0fUCVK/oD0Yy05tt2Nx0GEmZqWuFIrEo13So= -github.com/aws/aws-sdk-go-v2/service/ivschat v1.18.0 h1:3XxrR8OfsdZ5CdO0k03FmaBw5Y/u2kMyy/gKgGxEOIg= -github.com/aws/aws-sdk-go-v2/service/ivschat v1.18.0/go.mod h1:zOkF5itZ8V3WWS1uiTUeUUj0rDHiPb9cZ12wk2c3iy8= -github.com/aws/aws-sdk-go-v2/service/kafka v1.40.0 h1:1f2ySd9pIOWeLLrzQGnhsdepjxvQxgiYbHvrLdaxQNs= -github.com/aws/aws-sdk-go-v2/service/kafka v1.40.0/go.mod h1:9OLdh3Yy2JDSG/EbsdtHP6ELe0ih4RY2ikxtHR1dRIo= -github.com/aws/aws-sdk-go-v2/service/kafkaconnect v1.24.1 h1:KDSWQ5w3ZZbTnlLskITkra2+VpsgFIT06C6rJlhD23g= -github.com/aws/aws-sdk-go-v2/service/kafkaconnect v1.24.1/go.mod h1:Kd/iJbmERvnoOg3tn18bzYTOCmv6QdDvqfFdKlhvtL0= -github.com/aws/aws-sdk-go-v2/service/kendra v1.57.0 h1:wKkwENAJaas/1VedOvykeI7BRznuv0p1wVRuPViG3vA= -github.com/aws/aws-sdk-go-v2/service/kendra v1.57.0/go.mod h1:/lEH8vb3Pz/xgrXK0O9ceuI/9xV7rL2yiqMC/OS5O3M= -github.com/aws/aws-sdk-go-v2/service/keyspaces v1.20.0 h1:Z4wix2oghV2o2QqXxRXSQ1waHsufddDlhu+UBFpU/1Y= -github.com/aws/aws-sdk-go-v2/service/keyspaces v1.20.0/go.mod h1:mdZBvfauqfzsncChxf08Ir7pZ0F9AGg0QrzMEznM1Tw= -github.com/aws/aws-sdk-go-v2/service/kinesis v1.36.0 h1:PJHaM7x9AzroH0w6owUIqEMNj/Bo87YotXXFXSwXghw= -github.com/aws/aws-sdk-go-v2/service/kinesis v1.36.0/go.mod h1:w8WZbOc5S4Itxeng16UwriraH60/GKEXPl1WAGutdqw= -github.com/aws/aws-sdk-go-v2/service/kinesisanalytics v1.27.0 h1:epaifCF9Gp8gkjivjdR+RX9ox8KlP1iKg+/sRemdn4A= -github.com/aws/aws-sdk-go-v2/service/kinesisanalytics v1.27.0/go.mod h1:sZoXiQIHeSkrVQkAD7Kv5KaXaBrTVPOm7TTY8TeVxSg= -github.com/aws/aws-sdk-go-v2/service/kinesisanalyticsv2 v1.33.0 h1:IHoYcp5qzdeyke9z5zJ+wqwCtvKxirvSL48kZUsCMrg= -github.com/aws/aws-sdk-go-v2/service/kinesisanalyticsv2 v1.33.0/go.mod h1:hTVgbsCbO3mzqSE7TWLQO7dCFw2a9jqY/mTFdxKnCO0= -github.com/aws/aws-sdk-go-v2/service/kinesisvideo v1.29.0 h1:678Qt8KDEmA/9NUd9dNYNNfW2yLGBDqIxZ3WeXboK1M= -github.com/aws/aws-sdk-go-v2/service/kinesisvideo v1.29.0/go.mod h1:PR0w/+BRiY3VovyxDtFQ6cGWaK9yNvQjAsl2/zqO9DE= -github.com/aws/aws-sdk-go-v2/service/kms v1.42.0 h1:FDIgm/tdNHmtCFb87j555nJtW5RHcZwZQ/XfqBLsM+s= -github.com/aws/aws-sdk-go-v2/service/kms v1.42.0/go.mod h1:8Bi/K0WuhdopdApsJf3wqnJph9lB72roL449AIH3MtU= -github.com/aws/aws-sdk-go-v2/service/lakeformation v1.42.0 h1:4wCqDjUGIorbCUAZMJuRZKQpbEmWuxoLTN5Gouv1t4w= -github.com/aws/aws-sdk-go-v2/service/lakeformation v1.42.0/go.mod h1:EdGSbWl9q2avsEL3jNpvJTcWkvFywEsW7dJWnLeAhnM= -github.com/aws/aws-sdk-go-v2/service/lambda v1.74.0 h1:25nw3h+I1MI2VAxwv3PmrQYGqwTyVCbsaPBNKf8EqCA= -github.com/aws/aws-sdk-go-v2/service/lambda v1.74.0/go.mod h1:hStdY4zUjNqCjhgeaTTqnnkSAmKOxdADY3gRE3LCXWc= -github.com/aws/aws-sdk-go-v2/service/launchwizard v1.10.0 h1:t5u7n1MOFvJlSuZyC9vt8e8c6/Ouf17kdNBfMKLc9EM= -github.com/aws/aws-sdk-go-v2/service/launchwizard v1.10.0/go.mod h1:fXUVxL8k//G6oSMUHj8vxdgRjZ0PgPHdZG/IwZu3beI= -github.com/aws/aws-sdk-go-v2/service/lexmodelbuildingservice v1.30.0 h1:BRI+UM9zZIkBdKLB3EoJmpTbQaw4D0Gpj2YIO7ZE5Cc= -github.com/aws/aws-sdk-go-v2/service/lexmodelbuildingservice v1.30.0/go.mod h1:0vDLJ+tYsX00G5EEZ7gHwg5I31g3q2RrpGjZQFUJS8U= -github.com/aws/aws-sdk-go-v2/service/lexmodelsv2 v1.53.0 h1:Kzff70g8z4ihsBNj4WQ1TvXHTS//6s1eyZgPV876TEE= -github.com/aws/aws-sdk-go-v2/service/lexmodelsv2 v1.53.0/go.mod h1:XDsQ1txaKysUyDEx2Z5G4GEo8yC1J0plmijNm3nZgZw= -github.com/aws/aws-sdk-go-v2/service/licensemanager v1.33.0 h1:gREPvB66jMT+3XlrXRhrRF1AaOAq9LWUZ8tsGmH5vKs= -github.com/aws/aws-sdk-go-v2/service/licensemanager v1.33.0/go.mod h1:rkcCcDstRuanMv+H+LCjhItIifSUqfqjZHpqVA5YPts= -github.com/aws/aws-sdk-go-v2/service/lightsail v1.44.0 h1:QiiCqpKy0prxq+92uWfESzcb7/8Y9JAamcMOzVYLEoM= -github.com/aws/aws-sdk-go-v2/service/lightsail v1.44.0/go.mod h1:ESppxYqXQCpCY+KWl3BdkQjmsQX6zxKP39SnDtRDoU0= -github.com/aws/aws-sdk-go-v2/service/location v1.46.0 h1:5eCyFVJG18Cvz6sf3dJk39hT2kgaIzxXgiDPMn+oG/o= -github.com/aws/aws-sdk-go-v2/service/location v1.46.0/go.mod h1:hUD8+2JnMcdB0qnmW5J2zv9IgyDFpHM4L9yPf8NC77g= -github.com/aws/aws-sdk-go-v2/service/lookoutmetrics v1.33.0 h1:SrvtIfGyaw22vdKKPNwGsi0Bf0NFA7fcgsmnEz2qvZ8= -github.com/aws/aws-sdk-go-v2/service/lookoutmetrics v1.33.0/go.mod h1:ioFUk+nxNNFp8depbsQ95XloZUpB5cUFA2WL6xW1j4Q= -github.com/aws/aws-sdk-go-v2/service/m2 v1.22.0 h1:jKXnubb6qCeGzzwH8zpFaQtrTz+qBWc/I+XMMoeXI+Q= -github.com/aws/aws-sdk-go-v2/service/m2 v1.22.0/go.mod h1:2BdpFk3k48/N5XqGFH/TV3KClzkXrM2QOwKiXW2h4PA= -github.com/aws/aws-sdk-go-v2/service/macie2 v1.46.0 h1:DEtkJIg9D+GAR7Q5H67Ncr4Zf3y4hkhmd3iTk+pwYbU= -github.com/aws/aws-sdk-go-v2/service/macie2 v1.46.0/go.mod h1:x3oHgXHi9UQ0GCaULPaVbfpV37FC3eFQhfj/SyDbFUk= -github.com/aws/aws-sdk-go-v2/service/mediaconnect v1.41.0 h1:TY2Y5tgbug8GkDuQfCs3fA8n0Mj7gk/Y298QC9IsuVU= -github.com/aws/aws-sdk-go-v2/service/mediaconnect v1.41.0/go.mod h1:Ds6bKq2YZDxQpt4tcMiS+cbk0laqMzzLzSBeXwlMjsQ= -github.com/aws/aws-sdk-go-v2/service/mediaconvert v1.78.0 h1:llo2ENJ68zhznD6qsEGosZCRWksKeTqCJhBYxg5qYck= -github.com/aws/aws-sdk-go-v2/service/mediaconvert v1.78.0/go.mod h1:73Bi9/BoKmD0A01BooLLimw+kKyayQ4L9lon7hJp380= -github.com/aws/aws-sdk-go-v2/service/medialive v1.77.0 h1:feJCi8TOPx0O2UxAHociBZaMd4RHHiLn7vey5je5O/g= -github.com/aws/aws-sdk-go-v2/service/medialive v1.77.0/go.mod h1:jQxuvb8Mw0nBQWC/2iEumXoIyXlVu/pCOs8shnCthik= -github.com/aws/aws-sdk-go-v2/service/mediapackage v1.36.0 h1:apQq0YJ4pOmhzFVVqas9UZCo7ZoTy47GUtgc7lZcwBA= -github.com/aws/aws-sdk-go-v2/service/mediapackage v1.36.0/go.mod h1:hq6brPE1969qNhhuynU3ZMNOdAMNr3jRZbRq8I4/2CY= -github.com/aws/aws-sdk-go-v2/service/mediapackagev2 v1.27.0 h1:R28Ut05B4IA32NiL/pJHafpCnfLkK7w6EJ4cReSXp24= -github.com/aws/aws-sdk-go-v2/service/mediapackagev2 v1.27.0/go.mod h1:c5h+IQeS7jS10oGQ4itDVAjCgR6q7hxGHfnh49mK0dw= -github.com/aws/aws-sdk-go-v2/service/mediapackagevod v1.36.0 h1:Lf7B/RD6MvHS6UgfKuNjtR725OcuR0ZaPwGP60iBZgE= -github.com/aws/aws-sdk-go-v2/service/mediapackagevod v1.36.0/go.mod h1:9+LSccaXi23nGjvB4yNtQE8/pAmcfaqEvRtf5qtnZY0= -github.com/aws/aws-sdk-go-v2/service/mediastore v1.26.0 h1:lXx9k5BWc6crHEpQVfF7UREtAhaydKOpMcdBokokt5Q= -github.com/aws/aws-sdk-go-v2/service/mediastore v1.26.0/go.mod h1:9ivDqZj+bWFlZzYkcEkCFvMXBXM9sZ9Lx0O+1jmy0uc= -github.com/aws/aws-sdk-go-v2/service/memorydb v1.28.0 h1:EfkktEU1lJahZWV0Oze2Ni1v1OwIB+V5EfA/nU2M8BQ= -github.com/aws/aws-sdk-go-v2/service/memorydb v1.28.0/go.mod h1:klU+ogNePu/si9oRwP1XEZ+00nRqX+ZN+oQqzgJCV9w= -github.com/aws/aws-sdk-go-v2/service/mgn v1.34.0 h1:4sAEcDeXFESCf0m9aDz2H6ZnVErajnHujFwmUFDh1L4= -github.com/aws/aws-sdk-go-v2/service/mgn v1.34.0/go.mod h1:PeFKMjkP+jCQteTxfxG8ozfXOJSGoRv8BdRboJpkz18= -github.com/aws/aws-sdk-go-v2/service/mq v1.30.0 h1:iWqTkmfe/llFNKk/zC/CDwhCvb5LJBx8M00JTRGcjgw= -github.com/aws/aws-sdk-go-v2/service/mq v1.30.0/go.mod h1:NPxTApH/4LUJQjICbXHb9z/c280RyWtcNAe9LeuGwfw= -github.com/aws/aws-sdk-go-v2/service/mwaa v1.36.0 h1:kfpJVOSSNzx37lgJcsk48S8yffY+P5trn3J95CIUxXQ= -github.com/aws/aws-sdk-go-v2/service/mwaa v1.36.0/go.mod h1:2ondW70Ly9ucngMuiSVNk0mbHcGH4KyNm6kKJY4Yn24= -github.com/aws/aws-sdk-go-v2/service/neptune v1.38.0 h1:kQ+MK2jB1sii4yBxtPa96z0GuocfY6kf0iKKrVPtPeY= -github.com/aws/aws-sdk-go-v2/service/neptune v1.38.0/go.mod h1:0bcYM3V5sKaa/8f/B789h3laTvReZreTjqWRjITGEkQ= -github.com/aws/aws-sdk-go-v2/service/neptunegraph v1.18.0 h1:9Bo6Di7oLul++5Yi7/KFiqjGHPNIemmmxJcsgMj0phM= -github.com/aws/aws-sdk-go-v2/service/neptunegraph v1.18.0/go.mod h1:m+WX/GoYTdVoD6kaz+mBFr3+w1lj6FIj/0tHd33KGUQ= -github.com/aws/aws-sdk-go-v2/service/networkfirewall v1.52.0 h1:MT/ZhC/j05YJq1sZTv5xNTj/xlKBf9TmazdcjN8Q6JE= -github.com/aws/aws-sdk-go-v2/service/networkfirewall v1.52.0/go.mod h1:WBjTMukObsj8TZBljMWNrLiknTebzG5mGYIqiwSXQ8M= -github.com/aws/aws-sdk-go-v2/service/networkmanager v1.36.0 h1:CUof+Aly73D7a/PKHvM/MqQr7DQfyUrMpJueKyRMRd0= -github.com/aws/aws-sdk-go-v2/service/networkmanager v1.36.0/go.mod h1:9D7PMNcCNIP44ZOP2M2S2Oh9slWq4YQgMvaupyhQHgI= -github.com/aws/aws-sdk-go-v2/service/networkmonitor v1.9.0 h1:IYnkcqEtk+4Pw34vUjR6MUylKvyzIRYO4afH4K98xfc= -github.com/aws/aws-sdk-go-v2/service/networkmonitor v1.9.0/go.mod h1:LB6ILMfk6PF8Qwfah8uzkOdvFSc5Yz4rwQIziwIZcj8= -github.com/aws/aws-sdk-go-v2/service/notifications v1.3.0 h1:DwjwsGsuHbNk9pWgGLlVxUUl/ona61AE8wLSYHAx4ys= -github.com/aws/aws-sdk-go-v2/service/notifications v1.3.0/go.mod h1:mUNrtQVGSrcnuIS0EgB9HhRlTBuYjVt3KBjgdnSl7q0= -github.com/aws/aws-sdk-go-v2/service/notificationscontacts v1.2.0 h1:A2NNUn0ckdycM39tT5ERBfyXsuU3UX3Wg72usET0QsM= -github.com/aws/aws-sdk-go-v2/service/notificationscontacts v1.2.0/go.mod h1:ck29ZSPkQUcP3dhf1eTxObCjKG+NHxlITeA6ozy7wRk= -github.com/aws/aws-sdk-go-v2/service/oam v1.19.0 h1:o2jAN4Wz8EhuLqUg2h/MBfHuHLnPQoLfQAspnfZZqQI= -github.com/aws/aws-sdk-go-v2/service/oam v1.19.0/go.mod h1:9CnYbu+5xGd4rGd6cvVUahUt5etzVdbbsUh77cH6mvo= -github.com/aws/aws-sdk-go-v2/service/opensearch v1.48.0 h1:griVlvvPb8QVZe55WvJKAV57vUGCsGi3Hb5o7I8+acc= -github.com/aws/aws-sdk-go-v2/service/opensearch v1.48.0/go.mod h1:4O9QlGDun+ECvbtP0tQRju9wXtkkkn/RRFgGF+zCpsk= -github.com/aws/aws-sdk-go-v2/service/opensearchserverless v1.21.0 h1:yOdIEG9495oDc2XK1r3B0ciuCeqtPkS7Dd5Eo6SE0hY= -github.com/aws/aws-sdk-go-v2/service/opensearchserverless v1.21.0/go.mod h1:DileQAdc6UOTibuO6Mfl22ExuSlcDDepc/GvkBICdAU= -github.com/aws/aws-sdk-go-v2/service/organizations v1.40.0 h1:ysKuFyimEHWXAfX2l31Q/PS0buawt34cDpYXwP9li0Y= -github.com/aws/aws-sdk-go-v2/service/organizations v1.40.0/go.mod h1:KDibugj/L26ge1bmaoQ2y3veY0yHUis12wLymmIuWJQ= -github.com/aws/aws-sdk-go-v2/service/osis v1.16.0 h1:ABr6yZO+57vNlkEFxwNyJTltD1LJBKlE+E642JhmCnc= -github.com/aws/aws-sdk-go-v2/service/osis v1.16.0/go.mod h1:9pv9/5zFyenWhp0NU3Y7XkcqMUsJimFnbBWNM2+WQHQ= -github.com/aws/aws-sdk-go-v2/service/outposts v1.53.0 h1:S/UtXTDtW7T8o/qAOJHl3wof5nYz/wjTDurbikZ8SVI= -github.com/aws/aws-sdk-go-v2/service/outposts v1.53.0/go.mod h1:pZ/ecwv+c1rWTvDXsL/3TB+8iTulSvTUvZGGVeZulV0= -github.com/aws/aws-sdk-go-v2/service/paymentcryptography v1.20.0 h1:ITscSDnlpdlsPDOEyxbZRD6dqpw2c2ZEXN8wok8GVmY= -github.com/aws/aws-sdk-go-v2/service/paymentcryptography v1.20.0/go.mod h1:29w2H2dYMd/+EgIT3DYgyDP2nEFzx6janSM68+n8CC4= -github.com/aws/aws-sdk-go-v2/service/pcaconnectorad v1.12.0 h1:G+iXFPFI+kkt0LYyO6UMocMZ/ndxn9wydaXvuSde4/A= -github.com/aws/aws-sdk-go-v2/service/pcaconnectorad v1.12.0/go.mod h1:9gSmVYgCKHZYlYzV3WH6zWcuqipQ2WdQzRFx9C3oZcM= -github.com/aws/aws-sdk-go-v2/service/pcs v1.7.0 h1:Lr6Mcc6wZUegTbbpyn4XA3eopEiF7ev26JYRnEUSXug= -github.com/aws/aws-sdk-go-v2/service/pcs v1.7.0/go.mod h1:zMCSyMYxwSNIAlhJe89a+bybppD8j4p4SlEDrXj/bnA= -github.com/aws/aws-sdk-go-v2/service/pinpoint v1.36.0 h1:oY29zSzYnU7swG9Wt+x3eLDRL+b8hkr8cdeD1uZXVhY= -github.com/aws/aws-sdk-go-v2/service/pinpoint v1.36.0/go.mod h1:mnMOpRScoeiKAWETqdlGuVLE3X4kteplLosY49VIY4M= -github.com/aws/aws-sdk-go-v2/service/pinpointsmsvoicev2 v1.21.0 h1:42SaWUaUuKkHxKusqfk0FGCUYsK/VGA/F8HIiy6r95w= -github.com/aws/aws-sdk-go-v2/service/pinpointsmsvoicev2 v1.21.0/go.mod h1:zX+F2DmfDBYQDPk5K5Eu5+lZ7XW+QWzmbPu5wdflADU= -github.com/aws/aws-sdk-go-v2/service/pipes v1.20.0 h1:QoYQ6/Dn/J5MAVk7WSbZoOWHfrLJ4kTQtcfWXHhfNVM= -github.com/aws/aws-sdk-go-v2/service/pipes v1.20.0/go.mod h1:uKocwZ1wEcgI95F3KSndhaEVojS9h5AIx+nzsT1uVx4= -github.com/aws/aws-sdk-go-v2/service/polly v1.49.0 h1:zM/vX6uucXSPUoD56CLpHECBWWXQUnNXvhpejNrCUso= -github.com/aws/aws-sdk-go-v2/service/polly v1.49.0/go.mod h1:/xIA3CG6uFxK2gBef5OhY2QyQmB2qzWWhGJRqkhikT8= -github.com/aws/aws-sdk-go-v2/service/pricing v1.36.0 h1:oo+sDKgF0qTLNhjiKs+VasAC2fkeVE7LWEBhz+TKJu8= -github.com/aws/aws-sdk-go-v2/service/pricing v1.36.0/go.mod h1:qgVy1b8Fv+VlNke0RUY7SKDYe1MYB60cIYX7cUm1EJQ= -github.com/aws/aws-sdk-go-v2/service/qbusiness v1.29.0 h1:lD0G4L+ggiCGUUp2xEkdgN1C6Mo20zR64W/6/IoiUXc= -github.com/aws/aws-sdk-go-v2/service/qbusiness v1.29.0/go.mod h1:pRs7THfCpT8usab/xxCoelRWub8oBgACdVIlSX3UBW8= -github.com/aws/aws-sdk-go-v2/service/qldb v1.27.0 h1:BGSyIk69nlqfJrqe7qXFcXqWJwvlpOV3CWRFbgYabvA= -github.com/aws/aws-sdk-go-v2/service/qldb v1.27.0/go.mod h1:kHu/ZtJs/p1AixzTHZJTSk9Xh0/nW+kZ7C0RBkQQxcI= -github.com/aws/aws-sdk-go-v2/service/quicksight v1.89.0 h1:UEH4WaFbcJMScMCu3G2d4g/UPsrx3nB0tGUpdPneCxY= -github.com/aws/aws-sdk-go-v2/service/quicksight v1.89.0/go.mod h1:Hxg63s0Ffeep3BqIpUjpjES0s4tky2HQRse8GR9douA= -github.com/aws/aws-sdk-go-v2/service/ram v1.31.0 h1:j2TVGDcIrIMcM4cDTJ0yUchYSQw4fQ+Ynq2pZvd343A= -github.com/aws/aws-sdk-go-v2/service/ram v1.31.0/go.mod h1:XAr9Ij8n+yWjoBBAqJ4p36dB/CBOmHliy1PqD2rbaWk= -github.com/aws/aws-sdk-go-v2/service/rbin v1.23.0 h1:zQ4vQCRBT1bTb3b5Nvzd1S5kZ93h7O+AUXllfEgcbQA= -github.com/aws/aws-sdk-go-v2/service/rbin v1.23.0/go.mod h1:9lt08xzCBRZYiiZNRbd/iBOQ0yMVLDmJhhr1vBW/fLg= -github.com/aws/aws-sdk-go-v2/service/rds v1.100.0 h1:tv36GhETPIf9IX92SYKMCQeUDlnpAOZ/1Dd9S82YrF0= -github.com/aws/aws-sdk-go-v2/service/rds v1.100.0/go.mod h1:QjidjpcTEJ3eG6SniuuMtnX4AjuqF3Z4Rhys0xSKWA0= -github.com/aws/aws-sdk-go-v2/service/redshift v1.55.0 h1:70T8EpAmUAmh1+iljlPu94NnUKATN9GedtKY0y9I4CY= -github.com/aws/aws-sdk-go-v2/service/redshift v1.55.0/go.mod h1:ItDt61dKOBnzf5gY/kvu4UaDKNxdp8LntwS7PaaVpfU= -github.com/aws/aws-sdk-go-v2/service/redshiftdata v1.34.0 h1:Ja8MnHjB+B1aKcFa1ZWJCeigiLJecl0bLoQnLwNncyE= -github.com/aws/aws-sdk-go-v2/service/redshiftdata v1.34.0/go.mod h1:qeA64l5ipqSqWAp3iBV8p0iZI7l619gWQse/dXqrwWo= -github.com/aws/aws-sdk-go-v2/service/redshiftserverless v1.28.0 h1:LoMSlONLh3Ov30lO6sjy5zX5Wz8duDqXm5PrWeZoh9k= -github.com/aws/aws-sdk-go-v2/service/redshiftserverless v1.28.0/go.mod h1:x/DAN+hv2jh09ARxGT7AbVNa437hMiHbtnBvGgMftM8= -github.com/aws/aws-sdk-go-v2/service/rekognition v1.48.0 h1:2mSu5NgU4YBSqt49BETif2cGI7wNeYhktHjWf6AJiLU= -github.com/aws/aws-sdk-go-v2/service/rekognition v1.48.0/go.mod h1:W6WPD7+xgb2DXb+mlaxwoKeFlJ+qTlch26i9754ded4= -github.com/aws/aws-sdk-go-v2/service/resiliencehub v1.31.0 h1:MRZ+L7IMnUwpXUfj7J4W9/4v2+Cx3UjmCvedYM13MAc= -github.com/aws/aws-sdk-go-v2/service/resiliencehub v1.31.0/go.mod h1:VBjzNNn7Q20jBD2W/AjVe/yzGGVcWL5qOpa4QukppnE= -github.com/aws/aws-sdk-go-v2/service/resourceexplorer2 v1.18.0 h1:H6KNYJs6a1Kx/ZTut6IN/0tLGl708ARSH7GktpDBZYI= -github.com/aws/aws-sdk-go-v2/service/resourceexplorer2 v1.18.0/go.mod h1:bgCF6PlTIDDHsRkA2hdGnjZaXVAPpJVbP52meVZrc1Q= -github.com/aws/aws-sdk-go-v2/service/resourcegroups v1.30.0 h1:T84bfq2DrdXmOSQXYuaCYoeVrs6F6nNouXwU+KrLWDs= -github.com/aws/aws-sdk-go-v2/service/resourcegroups v1.30.0/go.mod h1:QLS4hY89cSI6WxhiGzowYyi/jcpf0IK6TvR/HusYs0Y= -github.com/aws/aws-sdk-go-v2/service/resourcegroupstaggingapi v1.27.0 h1:deQCKTegmjCESMoePcAPin+TmKqEjePr2NOytwE0TGU= -github.com/aws/aws-sdk-go-v2/service/resourcegroupstaggingapi v1.27.0/go.mod h1:BOtk077SCu+iZ/SQAA2xPeVJqrhm9yXqpw4UZ6SgHas= -github.com/aws/aws-sdk-go-v2/service/rolesanywhere v1.18.0 h1:2Xg4DSL/wjjFG3uq1qKVIohZ3ToCjNOEdhSIL0xuL9Y= -github.com/aws/aws-sdk-go-v2/service/rolesanywhere v1.18.0/go.mod h1:+YaIHElNSCZDNyAie8PUJ3icWw1lAWHlPze8oV/6NEo= -github.com/aws/aws-sdk-go-v2/service/route53 v1.54.0 h1:U//4kAneirDM8j96Vbzjf53y+WW42rsgOqJUKtifY3o= -github.com/aws/aws-sdk-go-v2/service/route53 v1.54.0/go.mod h1:O3OQTni2n6Es64qG8eOjT7ST3sg40+O3SoPHaw42uHQ= -github.com/aws/aws-sdk-go-v2/service/route53domains v1.30.0 h1:YmPhd4lIEpVzES0fb//xZ8Zp77vSFCyVK2N0nnCPQU8= -github.com/aws/aws-sdk-go-v2/service/route53domains v1.30.0/go.mod h1:zQLvxxhuX8iqjd/H5b3+OXrJVyhz9lHZdnP3dF+Rm3w= -github.com/aws/aws-sdk-go-v2/service/route53profiles v1.6.0 h1:CbNHTbEFYcq/QxQV1tRygdoaaSbhtGkmxUO8l9wqGNc= -github.com/aws/aws-sdk-go-v2/service/route53profiles v1.6.0/go.mod h1:GMRfBw/tiPFdCIYXm+lFEWKZA9BQuL1NFNv3qtFXO5c= -github.com/aws/aws-sdk-go-v2/service/route53recoverycontrolconfig v1.28.0 h1:MS+YfLBiqDuTTFJpWcWGC1Cy1BFPrZmEdnRKGeYIwSw= -github.com/aws/aws-sdk-go-v2/service/route53recoverycontrolconfig v1.28.0/go.mod h1:4pzD9Hf8n/5yeqNDM1Bcb/JfCnnchW0gNsE1YuFMLCA= -github.com/aws/aws-sdk-go-v2/service/route53recoveryreadiness v1.23.0 h1:sNulW2aXV7h5pUfLNShxMxWDn8bBXEkxrzOWtp1FAbQ= -github.com/aws/aws-sdk-go-v2/service/route53recoveryreadiness v1.23.0/go.mod h1:8G+IEg/exLH4b2W1a573ZpDCZBtfmeAH2PYD9RgiTeI= -github.com/aws/aws-sdk-go-v2/service/route53resolver v1.37.0 h1:5tqCgv4WjDkvz3qAeFqIms2H9wrE/ocLwxvLka1LJF8= -github.com/aws/aws-sdk-go-v2/service/route53resolver v1.37.0/go.mod h1:vwXr/jIQ351u6+2gOfs8vOlCTpcutKFAnhAjqe6PDwg= -github.com/aws/aws-sdk-go-v2/service/rum v1.25.0 h1:B8hNp3Ys1WVs12iwka/EotxOvfqvSapYzEEyCY8qi7Y= -github.com/aws/aws-sdk-go-v2/service/rum v1.25.0/go.mod h1:wtPsFFOKCW8Wf/VRpe7T1Q59P8JE8bVC7c1wxRZ472I= -github.com/aws/aws-sdk-go-v2/service/s3 v1.85.0 h1:gAV4NEp4A+JOrIdoXkAeyy6IOo7+X2s/jRuaHKYiMaU= -github.com/aws/aws-sdk-go-v2/service/s3 v1.85.0/go.mod h1:JIQwK8sZ5MuKGm5rrFwp9MHUcyYEsQNpVixuPDlnwaU= -github.com/aws/aws-sdk-go-v2/service/s3control v1.61.0 h1:5gpA9ClQPwuZHcGuIp9lkw2F+LyfoJcorfG04SL8JYY= -github.com/aws/aws-sdk-go-v2/service/s3control v1.61.0/go.mod h1:M6E4vyo70R7StOxwvCuX1KQA8nSdfCpkTN8af6H7GR8= -github.com/aws/aws-sdk-go-v2/service/s3outposts v1.30.0 h1:pluWBDXZV7P2rud08CaqinWRCqvhV1muwuBq+jxOHPw= -github.com/aws/aws-sdk-go-v2/service/s3outposts v1.30.0/go.mod h1:wXa8ZTGg/QZxLulyo+MhFTlYxaO8W24Yx1LCWHfnzK4= -github.com/aws/aws-sdk-go-v2/service/s3tables v1.7.0 h1:U6h5Cs/8RRInyo3ZKBCbG8KrSrX1nsaguC+hj4qkGKU= -github.com/aws/aws-sdk-go-v2/service/s3tables v1.7.0/go.mod h1:fFY/o7JpIV8g09P9tWUi0nKunbOGr6KWEzu+laUrt/4= -github.com/aws/aws-sdk-go-v2/service/sagemaker v1.203.0 h1:5siZkkhSlz+3xgZEGBv2wiMZegl/S0QsBt7oURJ6IrE= -github.com/aws/aws-sdk-go-v2/service/sagemaker v1.203.0/go.mod h1:39AFpvOndpk/XRw+SCN6v+VzjKyW6iIEGuK5+c+WCHQ= -github.com/aws/aws-sdk-go-v2/service/scheduler v1.14.0 h1:IgnShAGL+CbT48yiOiZgh+QGiA8PXN1mqAi0hHcL9kk= -github.com/aws/aws-sdk-go-v2/service/scheduler v1.14.0/go.mod h1:l1Xw9XiQadHfghuM/7vAKduoX7F0djgG8v1Cy4ebRzg= -github.com/aws/aws-sdk-go-v2/service/schemas v1.30.0 h1:h4/zdDDNHNvyqUYcs+zNQZG4Sf5oVvlnHBa+np+gWF4= -github.com/aws/aws-sdk-go-v2/service/schemas v1.30.0/go.mod h1:Zfi80WTbgVDxHXMSWsMXQhzRZQdIF6wDh0U4K8uIknA= -github.com/aws/aws-sdk-go-v2/service/secretsmanager v1.36.0 h1:kDac/4Lmh6ErC8tE8JJ+Z6xiwhcIEpiHEG//7XJuY3M= -github.com/aws/aws-sdk-go-v2/service/secretsmanager v1.36.0/go.mod h1:JWcrmzDG74XgnKxTdbaCPl5q4H4ijv6+XCk4VhHBEUw= -github.com/aws/aws-sdk-go-v2/service/securityhub v1.59.0 h1:iBWLXmX75XSzUvWryxeTu1Bkbwslzlyl1PoXFDSWYEc= -github.com/aws/aws-sdk-go-v2/service/securityhub v1.59.0/go.mod h1:aWMqfM32AE1+DkQ3Hl1G5Q7BGex6sdsi56dqFl7zvEk= -github.com/aws/aws-sdk-go-v2/service/securitylake v1.21.0 h1:zlOSZdN5UsZYU6VNd8gDwT6bq5fKqXBNwjjc81qslQg= -github.com/aws/aws-sdk-go-v2/service/securitylake v1.21.0/go.mod h1:Ivs5nTSoHtZxXASSGgGcRCmignPo+lDIaIqANG5M5rA= -github.com/aws/aws-sdk-go-v2/service/serverlessapplicationrepository v1.26.0 h1:hK3aneCAjV1cXykY43xfLKOlr1vbiSud4GhPO70wGIk= -github.com/aws/aws-sdk-go-v2/service/serverlessapplicationrepository v1.26.0/go.mod h1:Te5pszE4oQtguiWSvpaBHeDgmmakG8KnX1qGeHephac= -github.com/aws/aws-sdk-go-v2/service/servicecatalog v1.35.0 h1:r21Dg9on5ij6OU/5UdsM5LbdoSd8rviM6Ku9Kv6SWjg= -github.com/aws/aws-sdk-go-v2/service/servicecatalog v1.35.0/go.mod h1:TPIQ8jwqJtuNnP1+k3iLcF5BmTReF2ozNndMqLhOOac= -github.com/aws/aws-sdk-go-v2/service/servicecatalogappregistry v1.32.0 h1:WsAFwFxvDmRYofwmAsbVrxWBojLF3c8x476pUCy2Teg= -github.com/aws/aws-sdk-go-v2/service/servicecatalogappregistry v1.32.0/go.mod h1:U7rell0g8Vuh7fral0C64slZUS1JjTh7Y3nNh1dcPmQ= -github.com/aws/aws-sdk-go-v2/service/servicediscovery v1.36.0 h1:5FSPQZwZnU78yU1LFZ2v9hx5xxqlQCJL9FPX74bXvtY= -github.com/aws/aws-sdk-go-v2/service/servicediscovery v1.36.0/go.mod h1:MppZj1d92oElxaKtuaKqmp6AG3YcrDpnChkBQxYv8tI= -github.com/aws/aws-sdk-go-v2/service/servicequotas v1.29.0 h1:n5zIWwfkbRAGOZSXe6IcarzS8p6oT4jhx49qqpNeA04= -github.com/aws/aws-sdk-go-v2/service/servicequotas v1.29.0/go.mod h1:IZwmZ3r5PW29Mn5xeI6e5yDVE1sCtNZmi5LrI0Nzfgs= -github.com/aws/aws-sdk-go-v2/service/ses v1.31.0 h1:QL0j3NDlU0y6GcIiQGZ1fLmdycX046GuPjAApl5XtMA= -github.com/aws/aws-sdk-go-v2/service/ses v1.31.0/go.mod h1:cTzJKF+z4rdBv2oYyY33ftekIRP+ql8MoCJIPu2qWyw= -github.com/aws/aws-sdk-go-v2/service/sesv2 v1.48.0 h1:e2r7d8sq9t/A7izZdlZuif2wSbVOAsqJq9qz+RLz8to= -github.com/aws/aws-sdk-go-v2/service/sesv2 v1.48.0/go.mod h1:Ovv7uw9l/lfTJBbXWXrCZ8R6NbK01VlgoC0+HnTPRwg= -github.com/aws/aws-sdk-go-v2/service/sfn v1.36.0 h1:fgw5oZ1lwculHXdldWwlCZVM+6LG78bnChrseYo4IUw= -github.com/aws/aws-sdk-go-v2/service/sfn v1.36.0/go.mod h1:gjegO53PBn/Uu7OHV1Cw0tmJXkjMVNHQJnpMzXsgddc= -github.com/aws/aws-sdk-go-v2/service/shield v1.31.0 h1:xiyt8GY9yqSFhyAfpuUTKmsMAzrVFE+I0JcNjcj/neE= -github.com/aws/aws-sdk-go-v2/service/shield v1.31.0/go.mod h1:7dWLpEpp3W2qgWEBi053m1jVfkWJFhbPCEt5JAGKBW8= -github.com/aws/aws-sdk-go-v2/service/signer v1.28.0 h1:CJ5PBq3ZNBfAaSVXL/zghZ0rkZ2Am5s2ASCjr3ZLLT8= -github.com/aws/aws-sdk-go-v2/service/signer v1.28.0/go.mod h1:mK/U/89vI+K5nueWZA1L9oKWtvWyoaRNaBcKnaIN7WY= -github.com/aws/aws-sdk-go-v2/service/sns v1.35.0 h1:5/RoSyuSK0m7JaCL9dE0srXVRwsKUQyBobd0WBcR1RU= -github.com/aws/aws-sdk-go-v2/service/sns v1.35.0/go.mod h1:hBuVN2n4PF8FXQsjl9FLiwPr5d4vrYBuoZ0ugwoFtfc= -github.com/aws/aws-sdk-go-v2/service/sqs v1.39.0 h1:i/RufAS5Qy+fEMF9A/PpIBXCtu1otrrGLlI3V3a2+ko= -github.com/aws/aws-sdk-go-v2/service/sqs v1.39.0/go.mod h1:d+t4DavxGo524hNXZugRjOmnofs+NKW2tu43KMzo+rQ= -github.com/aws/aws-sdk-go-v2/service/ssm v1.61.0 h1:JRd8S8zteNH3TB2LgA8woCObScv/LImxfNyr+bE7jKw= -github.com/aws/aws-sdk-go-v2/service/ssm v1.61.0/go.mod h1:4xJVAEeQ2GRGZW7nSyOYXFHdxHf2mkz16+hm7Z+acgU= -github.com/aws/aws-sdk-go-v2/service/ssmcontacts v1.28.0 h1:s6eTaMetnHj3m8ZLxepkoGIcGDQIj1jAtniG62Y4iIg= -github.com/aws/aws-sdk-go-v2/service/ssmcontacts v1.28.0/go.mod h1:YRzXmrrfbRBAenwYxR+JDzMy8X73jOllzuWV39Se80o= -github.com/aws/aws-sdk-go-v2/service/ssmincidents v1.36.0 h1:7hM6PhMZ5hBcjfb+lHdEBBIHF1+2MkKmKCjBQwlVSMk= -github.com/aws/aws-sdk-go-v2/service/ssmincidents v1.36.0/go.mod h1:9q1HtMh3aG6tLq7nnemNLM12lv5TQLyGJZPw8TXTu+o= -github.com/aws/aws-sdk-go-v2/service/ssmquicksetup v1.5.0 h1:wWjsCKZJw54mkjy35NkhzQvTqu6/cteQ52NMEIyZa6s= -github.com/aws/aws-sdk-go-v2/service/ssmquicksetup v1.5.0/go.mod h1:ZYyBNE2vzgYAowj676ZUivzokh3XPyz/IHAOgeUqxB0= -github.com/aws/aws-sdk-go-v2/service/ssmsap v1.21.0 h1:R0mhxUklmXU/Jrrp2Su9ZnNZxe8Q/Qj7m9gEW6D7ZCU= -github.com/aws/aws-sdk-go-v2/service/ssmsap v1.21.0/go.mod h1:rZActsF6fwFl1Hi0uX5wVWIiuVt9G2u1CNP/xdRf8BI= -github.com/aws/aws-sdk-go-v2/service/sso v1.26.0 h1:cuFWHH87GP1NBGXXfMicUbE7Oty5KpPxN6w4JpmuxYc= -github.com/aws/aws-sdk-go-v2/service/sso v1.26.0/go.mod h1:aJBemdlbCKyOXEXdXBqS7E+8S9XTDcOTaoOjtng54hA= -github.com/aws/aws-sdk-go-v2/service/ssoadmin v1.32.0 h1:9ZiC+PGAj6iWfUnyVD13DJKRSVUyoGnjqeoHwYbcp7s= -github.com/aws/aws-sdk-go-v2/service/ssoadmin v1.32.0/go.mod h1:THhZIpJD09IpQQXUB3UzSGNbVQWymMPpg+oSzxR1QZk= -github.com/aws/aws-sdk-go-v2/service/ssooidc v1.31.0 h1:t2va+wewPOYIqC6XyJ4MGjiGKkczMAPsgq5W4FtL9ME= -github.com/aws/aws-sdk-go-v2/service/ssooidc v1.31.0/go.mod h1:ExCTcqYqN0hYYRsDlBVU8+68grqlWdgX9/nZJwQW4aY= -github.com/aws/aws-sdk-go-v2/service/storagegateway v1.39.0 h1:ry+7bX8vl2pQzMPpo7KVDaoY/vh6iBiUC1mOL4tXxcw= -github.com/aws/aws-sdk-go-v2/service/storagegateway v1.39.0/go.mod h1:nJ6IfH7EAwcH7Ptw1Xs/JnkuHiE6u1KD8CKit2FmUTs= -github.com/aws/aws-sdk-go-v2/service/sts v1.35.0 h1:FD9agdG4CeOGS3ORLByJk56YIXDS7mxFpmZyCtpqExc= -github.com/aws/aws-sdk-go-v2/service/sts v1.35.0/go.mod h1:NDzDPbBF1xtSTZUMuZx0w3hIfWzcL7X2AQ0Tr9becIQ= -github.com/aws/aws-sdk-go-v2/service/swf v1.29.0 h1:HVlKNYHTqbr4fKc/20vTgRZ1e/E8TTsHmY6yyXqbAMw= -github.com/aws/aws-sdk-go-v2/service/swf v1.29.0/go.mod h1:XnETagEsnuCfvAwFtMjkAYlYR6HcH19q9M8I4sfZ/pc= -github.com/aws/aws-sdk-go-v2/service/synthetics v1.37.0 h1:i8ELxsU4cRR5cvUP+KJ38ti/ebcPUCOO6LWjiFy5r0U= -github.com/aws/aws-sdk-go-v2/service/synthetics v1.37.0/go.mod h1:DasI/CdA7QZPJuqPWBeoSSQAGwkvoKaQbf6Y34vtlSo= -github.com/aws/aws-sdk-go-v2/service/taxsettings v1.13.0 h1:76Gl8pwXvNPWASpibpkQErvMSSvfyrOw9kA1INHvejw= -github.com/aws/aws-sdk-go-v2/service/taxsettings v1.13.0/go.mod h1:j8AA3BKL3TrYeZGC/pvOo77BovIBWA8SRwo8hoZjXtU= -github.com/aws/aws-sdk-go-v2/service/timestreaminfluxdb v1.12.0 h1:xcGhIgi2aePQJGpAiKrDgWEVjA3IXCcGAvF8Fxi8Ygc= -github.com/aws/aws-sdk-go-v2/service/timestreaminfluxdb v1.12.0/go.mod h1:jlm+1UibTlgwje1gX6OOOq2QgcYZVErsJax78P/Lfk0= -github.com/aws/aws-sdk-go-v2/service/timestreamquery v1.32.0 h1:SQ6dYo+XJUwoG3z8PKEvSvjY4G67rxFUqguDwDxQt6w= -github.com/aws/aws-sdk-go-v2/service/timestreamquery v1.32.0/go.mod h1:RZa3kR+D9EnwQgTstoWOfPZNvzmkkdK9v31Se3IQS3Q= -github.com/aws/aws-sdk-go-v2/service/timestreamwrite v1.32.0 h1:wdVe8h72FlW/o6r1311/cVHvG+K9fOfY5cQmldas+7I= -github.com/aws/aws-sdk-go-v2/service/timestreamwrite v1.32.0/go.mod h1:rnxcp7Vl8LIFmTF7+dP2e/E1N4Yma0z0TLeWmBb+iNk= -github.com/aws/aws-sdk-go-v2/service/transcribe v1.48.0 h1:t5DJ9WjlhFVJPsO/1WYsb2/HfQPj4vjozM+W/4wd+sU= -github.com/aws/aws-sdk-go-v2/service/transcribe v1.48.0/go.mod h1:9jZTwjgAOKAO+hfV1T2FhTkWSGKUx7J5Vc20YT7T7d0= -github.com/aws/aws-sdk-go-v2/service/transfer v1.62.0 h1:dwFlqBAPn6zdLmJsw1rT+GhKSYgRxL/S2xThFCQBZjI= -github.com/aws/aws-sdk-go-v2/service/transfer v1.62.0/go.mod h1:T5A9C386y05G4eSf7qBCevBhAkz29/VgzEsz5Qxk/Ww= -github.com/aws/aws-sdk-go-v2/service/verifiedpermissions v1.25.0 h1:rZQ1PyV+n6D+IckOc3GR6LaGhnQgzCsDavrMracHOYw= -github.com/aws/aws-sdk-go-v2/service/verifiedpermissions v1.25.0/go.mod h1:CkYLyGgVZ7ub37T5YS8CXp/XdE1vCr2bzfp5qG5KKMs= -github.com/aws/aws-sdk-go-v2/service/vpclattice v1.15.0 h1:nqnVrwFG3InW7aIDI30bAc1kzowt/mh/VHVqdvS++Xg= -github.com/aws/aws-sdk-go-v2/service/vpclattice v1.15.0/go.mod h1:O1/ULTHJoedjmo0d6rPBGK1Lrj4KTIQRAR/f3zYo/gU= -github.com/aws/aws-sdk-go-v2/service/waf v1.27.0 h1:L7KoAfR9t5g0kQbimmkVhBvFikDoRCSR+m0DjJM+eIM= -github.com/aws/aws-sdk-go-v2/service/waf v1.27.0/go.mod h1:t77KZK//vlR+u0G4EeMaHJPK5yz2dHLK5HUnglJlcQY= -github.com/aws/aws-sdk-go-v2/service/wafregional v1.27.0 h1:PfgcWqQSbzK24px5xSOh1BMX9T5XTWsgL6Jag/FYbgY= -github.com/aws/aws-sdk-go-v2/service/wafregional v1.27.0/go.mod h1:XdjVVW1OfR3FpAjY2oRcRCR0ESpH6rIgSe1Xbgr9LJw= -github.com/aws/aws-sdk-go-v2/service/wafv2 v1.64.0 h1:A95Km+i98UC4iLDGXr0t3ySuVv7UUxn76nJwMupc5MA= -github.com/aws/aws-sdk-go-v2/service/wafv2 v1.64.0/go.mod h1:J3Ge5PKa1EojSrm1iY9mnH6NzTfTLEInw+BbRD03spw= -github.com/aws/aws-sdk-go-v2/service/wellarchitected v1.36.0 h1:BI5uub7SmZkSzfd5Iu9FIxxyj6uG+UPDiHZ2BruFohY= -github.com/aws/aws-sdk-go-v2/service/wellarchitected v1.36.0/go.mod h1:sUmq+Loqe89MCpXoiitpyvgoWjpAiKlqhi+3T3tz1Dw= -github.com/aws/aws-sdk-go-v2/service/workspaces v1.59.0 h1:1AtQvDj5ntF+feqJ9opboJwAY8O/pNzkxYmO7bfW6IM= -github.com/aws/aws-sdk-go-v2/service/workspaces v1.59.0/go.mod h1:b/koNSIXnO8bU3UVujwJo6q4A7E0PJ/NX9d7VtKy+AI= -github.com/aws/aws-sdk-go-v2/service/workspacesweb v1.28.0 h1:AyIDajyS22zmmK+Nnf9M6CCrVmqdXDqUJEeejbBaZok= -github.com/aws/aws-sdk-go-v2/service/workspacesweb v1.28.0/go.mod h1:MVrQqUFcb/EQYr+JeF4/o/fp7LL1r7LuXaN1NqQJjs0= -github.com/aws/aws-sdk-go-v2/service/xray v1.32.0 h1:PKSZrvIwbhjdi2Po+uQ4/uEG3AFf95Eov24WReGqCkA= -github.com/aws/aws-sdk-go-v2/service/xray v1.32.0/go.mod h1:kdMUXphf0aSOUtDYUyzWukPmeuX1okO3BoXmX97kBIk= +github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.8.1 h1:ps3nrmBWdWwakZBydGX1CxeYFK80HsQ79JLMwm7Y4/c= +github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.8.1/go.mod h1:bAdfrfxENre68Hh2swNaGEVuFYE74o0SaSCAlaG9E74= +github.com/aws/aws-sdk-go-v2/service/internal/endpoint-discovery v1.11.1 h1:/E4JUPMI8LRX2XpXsbmKN42l1lZPoLjGJ/Kun97pLc0= +github.com/aws/aws-sdk-go-v2/service/internal/endpoint-discovery v1.11.1/go.mod h1:qgbd/t8S8y5e87KPQ4kC0kyxZ0K6nC1QiDtFMoxlsOo= +github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.13.1 h1:ky79ysLMxhwk5rxJtS+ILd3Mc8kC5fhsLBrP27r6h4I= +github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.13.1/go.mod h1:+2MmkvFvPYM1vsozBWduoLJUi5maxFk5B7KJFECujhY= +github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.19.1 h1:MdVYlN5pcQu1t1OYx4Ajo3fKl1IEhzgdPQbYFCRjYS8= +github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.19.1/go.mod h1:iikmNLrvHm2p4a3/4BPeix2S9P+nW8yM1IZW73x8bFA= +github.com/aws/aws-sdk-go-v2/service/internetmonitor v1.22.1 h1:3jvrdU0UOGm8mQ7eMrbsbKErYn13xM2rJVe9t7QFfE8= +github.com/aws/aws-sdk-go-v2/service/internetmonitor v1.22.1/go.mod h1:loi2iyY5Vs3EC7FI5Yp8TWUGZQC8flvpisZK4HQdNBs= +github.com/aws/aws-sdk-go-v2/service/invoicing v1.3.1 h1:ZqHny6zHB8yb3NT0Wz9vSIy5Zub1qcqrEAF1d6K3zuE= +github.com/aws/aws-sdk-go-v2/service/invoicing v1.3.1/go.mod h1:K4gG6tXdTb/nIFfe1R5jyW1JRsFORvFiRMDJkGNc9dA= +github.com/aws/aws-sdk-go-v2/service/iot v1.65.1 h1:viIWoxWPR4NvRHjRGQ2vOKYNzQST+JyPiipbeGPx/7g= +github.com/aws/aws-sdk-go-v2/service/iot v1.65.1/go.mod h1:0ogtONfjFzm7daWG4XWQhmpHkC0P0nTjoO7n4JKzb0U= +github.com/aws/aws-sdk-go-v2/service/ivs v1.44.1 h1:k8SgaBMH/3e3oRv5XyMS6qJAvKtc5/3xTjCSMlkaeFI= +github.com/aws/aws-sdk-go-v2/service/ivs v1.44.1/go.mod h1:Oobt8m2Ut1xg78QLmsw13wnSknC9PnFOmvgFcN3OobA= +github.com/aws/aws-sdk-go-v2/service/ivschat v1.18.1 h1:KeOqEh9bzMzaRbjzil41SOu7UVcHmyPZ415wDhvpRVI= +github.com/aws/aws-sdk-go-v2/service/ivschat v1.18.1/go.mod h1:MHSEX+9G3NOzzTPs/sP88KgGBc1MyJm5eleKu6+4IqQ= +github.com/aws/aws-sdk-go-v2/service/kafka v1.40.1 h1:RpJi/JcawCLe/3Gc7XLr6wJVeaLmfIUcG0VFdqJNVpQ= +github.com/aws/aws-sdk-go-v2/service/kafka v1.40.1/go.mod h1:wHKXRek0tTlaXyzoS24hGiZHD0Nv2sHdv8qV0JwWbvs= +github.com/aws/aws-sdk-go-v2/service/kafkaconnect v1.24.2 h1:YbmQuJfiHhvtz+KkoVTEX5EJP+b0iLTqtBd0eXL3N8o= +github.com/aws/aws-sdk-go-v2/service/kafkaconnect v1.24.2/go.mod h1:rCCQe2X/+/7Lco7w5rDuepJF4PeTEjMpSJ0jpwOBSp4= +github.com/aws/aws-sdk-go-v2/service/kendra v1.57.1 h1:hJ6rwXUwlPbo+KtQFC+8DPRLLDAm9nLKwK89g1zeBq8= +github.com/aws/aws-sdk-go-v2/service/kendra v1.57.1/go.mod h1:SnU/DUXKZxP2o/WIKJZVa0aRsb4sSN9W2C2mI8hdvIA= +github.com/aws/aws-sdk-go-v2/service/keyspaces v1.20.1 h1:2Jhdp2Tt5zK+fYYtGvZSIUBJKTTOwR/dYFCbvwHTF4s= +github.com/aws/aws-sdk-go-v2/service/keyspaces v1.20.1/go.mod h1:r8yQore6pt2Qd5xYUha+USf7u0iRsRHJh/4gDB7jg/o= +github.com/aws/aws-sdk-go-v2/service/kinesis v1.36.1 h1:rs+doEUMM7TYDQCm8hse37Nc8RtaOUR3L9yn72cYGEU= +github.com/aws/aws-sdk-go-v2/service/kinesis v1.36.1/go.mod h1:4b3rDh9I9qfJ7otpn9F/QPplu8P70X3QYujWfsabPrU= +github.com/aws/aws-sdk-go-v2/service/kinesisanalytics v1.27.1 h1:HJ/Yqyc+z6yPznLf7HTB2tnnCuV40KJEjwPBKPdIoLo= +github.com/aws/aws-sdk-go-v2/service/kinesisanalytics v1.27.1/go.mod h1:lF63nbQGTaLvFxfl25+flfgcLy+TVUT5ACG8NQkdXbg= +github.com/aws/aws-sdk-go-v2/service/kinesisanalyticsv2 v1.33.1 h1:IUTnaFqzwDoCbbT9dChPffQUwwwNplP9ZMwdVD/zzmM= +github.com/aws/aws-sdk-go-v2/service/kinesisanalyticsv2 v1.33.1/go.mod h1:t8Gl3+K/J7GWoyTEkBF+ehVUIGP67o3OUiKnssQINBA= +github.com/aws/aws-sdk-go-v2/service/kinesisvideo v1.29.1 h1:UdzvaZQ7UgNPiWmk2yU9281DsKm1kGUyVAY3wZhZf2s= +github.com/aws/aws-sdk-go-v2/service/kinesisvideo v1.29.1/go.mod h1:FrPChe9AimOwPREPAMrmE9ZPJQY7PLxFaeg7QXHxKD8= +github.com/aws/aws-sdk-go-v2/service/kms v1.42.1 h1:YozphKGMWbikYX1H8Cjmh+QUboGA1c/D48m1pBosDmM= +github.com/aws/aws-sdk-go-v2/service/kms v1.42.1/go.mod h1:I/6K08h6XpKZPzb1jMZb1k5N6HpzLyjS4Z0uBFzvaDc= +github.com/aws/aws-sdk-go-v2/service/lakeformation v1.42.1 h1:4CyftMR6RY8OcqPXevgS1DOwiSwYwgTcLK2cdUcVZCo= +github.com/aws/aws-sdk-go-v2/service/lakeformation v1.42.1/go.mod h1:K9YPr/AqAVkWctfBvUQA0cx1rWVhmLK40TuVpSP5f2Y= +github.com/aws/aws-sdk-go-v2/service/lambda v1.74.1 h1:UOf0eSkWmna/6lR+tOwJYJaTSJsA/WFYm86nE2VPklY= +github.com/aws/aws-sdk-go-v2/service/lambda v1.74.1/go.mod h1:6wi1Ji6Z2WhSfVVrFj40GbWCX+cjaCEaTuCXnAVFytM= +github.com/aws/aws-sdk-go-v2/service/launchwizard v1.10.1 h1:UHzprFuR4wfo8uRS3L8v+dgKeh42yksH1B3hByojDcU= +github.com/aws/aws-sdk-go-v2/service/launchwizard v1.10.1/go.mod h1:jvg+B3ZzZjLCMUBKdLCpEIZv5Mz/QqPyWHlCUlQXxjg= +github.com/aws/aws-sdk-go-v2/service/lexmodelbuildingservice v1.30.1 h1:ZdNwKDTwPA1Bei71W6Q57HdTrAGWTCJEpKD24/r0Avo= +github.com/aws/aws-sdk-go-v2/service/lexmodelbuildingservice v1.30.1/go.mod h1:uYKKga1apHlzaH5HG+Y52OKjXLTJsC0HQ4+XTBkM7qA= +github.com/aws/aws-sdk-go-v2/service/lexmodelsv2 v1.53.1 h1:1qKrJXGcgICGlJ1dwlvOHS2gutVQpdBdYweO+spMIAo= +github.com/aws/aws-sdk-go-v2/service/lexmodelsv2 v1.53.1/go.mod h1:IQdDJQwO16pmmylU4iIgbgBSNk5bPhlUnuhsl5HhfS8= +github.com/aws/aws-sdk-go-v2/service/licensemanager v1.33.1 h1:BpPBMw8QekkoJpH34s/XYoNpVtMr7QTpDNcxQnMOvhw= +github.com/aws/aws-sdk-go-v2/service/licensemanager v1.33.1/go.mod h1:dSYHIVdITBrd19X2U36SemcuPoX7Mtxif3YjBSgKGa0= +github.com/aws/aws-sdk-go-v2/service/lightsail v1.44.1 h1:szsDy+Jx8LhOvlyqJfGzho4sPxist94khUm4QwTG+cs= +github.com/aws/aws-sdk-go-v2/service/lightsail v1.44.1/go.mod h1:FUyjCuISm1KKO++ZK9Lc251IfdJXZBRKo4cHCZa7RcI= +github.com/aws/aws-sdk-go-v2/service/location v1.46.1 h1:rWsI4OIvYu8fMV1KbccxlpTKWcQEPk1YKWiUiRLfNgs= +github.com/aws/aws-sdk-go-v2/service/location v1.46.1/go.mod h1:ZW2qOTqxIPQtuMLv7nj4WS+h4utqLoaNzDmCfgeqTNg= +github.com/aws/aws-sdk-go-v2/service/lookoutmetrics v1.33.1 h1:/LIKKQyGfyjLElsw12AAD/b4T1gjvCRpo9PWXFBXG1Y= +github.com/aws/aws-sdk-go-v2/service/lookoutmetrics v1.33.1/go.mod h1:Pw2uocVTqdNrapt5q/mtamq/+D57zWgIx3U+rzGc6To= +github.com/aws/aws-sdk-go-v2/service/m2 v1.22.1 h1:tFiMPcBLb+/33azrdMA2hqqc15D+h8H7mAI70dhuKLI= +github.com/aws/aws-sdk-go-v2/service/m2 v1.22.1/go.mod h1:HumPBe3ugDYqq08O7tsa4etAg05gfPRJCnXhVlmUR94= +github.com/aws/aws-sdk-go-v2/service/macie2 v1.46.1 h1:KEtnVAAkIZZ8/G6IKWxyaGKQBMaq9HetTD0QvPfcO4g= +github.com/aws/aws-sdk-go-v2/service/macie2 v1.46.1/go.mod h1:yMp0gljSvRon61sIkFuvhEocyO/YhPgCkwC/BR9t02k= +github.com/aws/aws-sdk-go-v2/service/mediaconnect v1.41.1 h1:taLUiA6Yq4G+47P/wKx4c0DJvCeb7oIP55hjjd49kXA= +github.com/aws/aws-sdk-go-v2/service/mediaconnect v1.41.1/go.mod h1:SebyqBabeN7s4OeaWRueG654W6sLdfCpx/G1sPuIEls= +github.com/aws/aws-sdk-go-v2/service/mediaconvert v1.78.1 h1:ILaU1jUkOz1RsqmpUHv1sha/112LGVCbWMbOj9KdG1U= +github.com/aws/aws-sdk-go-v2/service/mediaconvert v1.78.1/go.mod h1:RZLbG6qHRZJ6IlYG0dBVguA5Q5bBL6KwegIN9nzvxGs= +github.com/aws/aws-sdk-go-v2/service/medialive v1.77.1 h1:OXrgpZTIzQDjkXXBy/RQKVqF91IwyC0ryEw+erBjMzY= +github.com/aws/aws-sdk-go-v2/service/medialive v1.77.1/go.mod h1:56LdU29xEz15jYRBxzt8valuQ/2GQDhuftdNowx39io= +github.com/aws/aws-sdk-go-v2/service/mediapackage v1.36.1 h1:6sqsETpJLgYGK8IWAd6MX47sCAyqLvPuRGLoENO4sYQ= +github.com/aws/aws-sdk-go-v2/service/mediapackage v1.36.1/go.mod h1:zFu5Y9pAUOvd9APBDiwwaMdexPv8coEizOtJmcTTVKY= +github.com/aws/aws-sdk-go-v2/service/mediapackagev2 v1.27.1 h1:FvjHODeuJ7LCmlOAB1hVQIFvOQyORIVuDJfi3+6R3oo= +github.com/aws/aws-sdk-go-v2/service/mediapackagev2 v1.27.1/go.mod h1:H5n6sQyEZPmFcdU8XSh8iIh/oR7PeJXBKL2TVyAq4Yo= +github.com/aws/aws-sdk-go-v2/service/mediapackagevod v1.36.1 h1:AQ2g2KbJsfagdo2CwQAGINtwFhDpFo6U6NE/BP9ft54= +github.com/aws/aws-sdk-go-v2/service/mediapackagevod v1.36.1/go.mod h1:C/K0HedKYyj/az2xaZz5yWoi9vv6hpRTcPjCHk7jkTg= +github.com/aws/aws-sdk-go-v2/service/mediastore v1.26.1 h1:vqr5cfKyoCtj3FJXYnHpZ/svnPUQ2Qce3wiX2exVKJU= +github.com/aws/aws-sdk-go-v2/service/mediastore v1.26.1/go.mod h1:udUYbqmxEiWg4Pe4v7CoSWSZdVTjjbkvcnUKSY0ANM4= +github.com/aws/aws-sdk-go-v2/service/memorydb v1.28.1 h1:RlrxrWzRLmhIchnmXnBvzuklCur+mEuYJQ670y1YjNI= +github.com/aws/aws-sdk-go-v2/service/memorydb v1.28.1/go.mod h1:dn0CuzrlLsPQwdmrfd/7GjJxMTXiQX3/cYyYPw/cBU4= +github.com/aws/aws-sdk-go-v2/service/mgn v1.34.1 h1:mcW3ZmVS/c/al7w6/+2ren1FM6ZKsQ5OkffMODe8Yy4= +github.com/aws/aws-sdk-go-v2/service/mgn v1.34.1/go.mod h1:f5LNAteLLvz1d+a8udEyicskowMJv3tClJnA7H2DrHs= +github.com/aws/aws-sdk-go-v2/service/mq v1.30.1 h1:O9duS6XPKgBYv0JyqNXEjRb0Zp+DJdEqh/P1sTTFL9Y= +github.com/aws/aws-sdk-go-v2/service/mq v1.30.1/go.mod h1:uTgClBQfeUtsIdBJCbaf1xjtE6jCxGiMJSXHsi8WEAM= +github.com/aws/aws-sdk-go-v2/service/mwaa v1.36.1 h1:TptI10con5UPABjYCBMaBckWD5/gNMYD0m+88NkscSo= +github.com/aws/aws-sdk-go-v2/service/mwaa v1.36.1/go.mod h1:3pxCY9yQHuj3mntGtK5IR0HADRhEP+lWTOmg74n5ZR0= +github.com/aws/aws-sdk-go-v2/service/neptune v1.38.1 h1:NOYfXtQUnF41UakvQFfi4+mbgZ/4IgO1n5j8RMsIEfg= +github.com/aws/aws-sdk-go-v2/service/neptune v1.38.1/go.mod h1:+12tTJOR1ZRkMm1sBbwxbUJlNh2GRIam7Lc7C/+Pa94= +github.com/aws/aws-sdk-go-v2/service/neptunegraph v1.18.1 h1:wIRxcq1kp678ogQ67us56SmBEr3JntDmtw0hzSnQIWk= +github.com/aws/aws-sdk-go-v2/service/neptunegraph v1.18.1/go.mod h1:lF2OHvTjVdVU8fqeM/Cw7SMO8TWt515zlBFxLjzKEN0= +github.com/aws/aws-sdk-go-v2/service/networkfirewall v1.52.1 h1:iMxoDME9qFjS6TOIYE99yC1ocnYfd1Rw8IMvgbZJBfo= +github.com/aws/aws-sdk-go-v2/service/networkfirewall v1.52.1/go.mod h1:k2KrxH4IGJZsA6VI8CsTx+mGKEkxpbXLRl9XKTcqE2I= +github.com/aws/aws-sdk-go-v2/service/networkmanager v1.36.1 h1:Ps/spyjORK9/tx2pMpEzEjWOYqoNqR8OMHIXHudzvKg= +github.com/aws/aws-sdk-go-v2/service/networkmanager v1.36.1/go.mod h1:2QEw0rfjtUMjqiHcthI+GdvcHZ935TenF1UQyj++Ehc= +github.com/aws/aws-sdk-go-v2/service/networkmonitor v1.9.1 h1:BdxoAPeLCPbrYHC/osQftQUzW2hkI5yIl36/iEQboXw= +github.com/aws/aws-sdk-go-v2/service/networkmonitor v1.9.1/go.mod h1:ZlR0Ioqx3FHzSvPMLGWRJl7KG8fswWTTaBrZjixWhng= +github.com/aws/aws-sdk-go-v2/service/notifications v1.3.1 h1:W/V33HIpFFm3SEczC5rNTSk0oLuCZJiCRt3ftI+OfzQ= +github.com/aws/aws-sdk-go-v2/service/notifications v1.3.1/go.mod h1:lcT7GSBMHxkYhnvfrJ8KASTffPmVmwUVIXQA0+FQR+4= +github.com/aws/aws-sdk-go-v2/service/notificationscontacts v1.2.1 h1:P9vU+dUkH9J6NR8K1FWpuGCUrGYqPkxj97wDZI2cpYU= +github.com/aws/aws-sdk-go-v2/service/notificationscontacts v1.2.1/go.mod h1:M2m8kz89mBvwsJ3sHJ/sAniRFqQh2U2eQgj0Xcdgi38= +github.com/aws/aws-sdk-go-v2/service/oam v1.19.1 h1:Qy3Z3Iec62/ZQxeOtNMfGkW+0O+h4m1jlfpMG2v7Jqc= +github.com/aws/aws-sdk-go-v2/service/oam v1.19.1/go.mod h1:SELnx5vYtclgFgk0qAUuW8gPd9QaGGvn9J0gLLAN/qI= +github.com/aws/aws-sdk-go-v2/service/opensearch v1.48.1 h1:5waSqIHB7r2/kPEUokYOCbAj94O86BMNEUdt0q5BsqU= +github.com/aws/aws-sdk-go-v2/service/opensearch v1.48.1/go.mod h1:2MLCxAIIw9nb59dvYANZHyhoiOMaajJtKlBqvnyWg0c= +github.com/aws/aws-sdk-go-v2/service/opensearchserverless v1.21.1 h1:mbkX8wApJAaoWpV0V0EgnjN1/sI6ymNqQGPE+nakSP8= +github.com/aws/aws-sdk-go-v2/service/opensearchserverless v1.21.1/go.mod h1:C0qtSLUYGv6qGGy3nHPR7T4ZrsBA9/dcMDcov82uoK8= +github.com/aws/aws-sdk-go-v2/service/organizations v1.40.1 h1:9u1hD7vW7BjOxiCmE5TUDvyGk8sZiI6nTHhbUW9npPY= +github.com/aws/aws-sdk-go-v2/service/organizations v1.40.1/go.mod h1:pEuSCVYuJKZHwfkIkbO4Xa40lgUlVxWCiLJgckMppXo= +github.com/aws/aws-sdk-go-v2/service/osis v1.16.1 h1:Mfng5L3nO4JB4PCHqUUWIFgaB40DrMrkAb60hKnSP/o= +github.com/aws/aws-sdk-go-v2/service/osis v1.16.1/go.mod h1:AU8G+nH8NIQKfX1ibliZF+qoe4EwQ071UDRABz9X+Os= +github.com/aws/aws-sdk-go-v2/service/outposts v1.53.1 h1:NXHJcaJajCUFbim84eVwhFHCwUzp3BuGKP2ZACbF/oA= +github.com/aws/aws-sdk-go-v2/service/outposts v1.53.1/go.mod h1:xjh3+zMePLINjP5HtXTCkbKcnF4Ijet/c9yOCuBGxzA= +github.com/aws/aws-sdk-go-v2/service/paymentcryptography v1.20.1 h1:AX6HWyE3hshMWlMUGzZQ+dMVNaa2f+yJ8VIEnUKbsQg= +github.com/aws/aws-sdk-go-v2/service/paymentcryptography v1.20.1/go.mod h1:fPpm6h3keIbLil7fhZ0W1lLDg9DrfYHVans55yzlFyM= +github.com/aws/aws-sdk-go-v2/service/pcaconnectorad v1.12.1 h1:IZ2DReKRxTvXr2RGhcB/z4DJGesXSfMvY5vSGycCEGk= +github.com/aws/aws-sdk-go-v2/service/pcaconnectorad v1.12.1/go.mod h1:ySW1vL+f/079GdqHIx7tOSP81yiB1Z01uKdtNlH0eb8= +github.com/aws/aws-sdk-go-v2/service/pcs v1.7.1 h1:KSAs6CUxcS3ObH0aABXu6lpAdLGYd+KaDO4MqZ8uwpk= +github.com/aws/aws-sdk-go-v2/service/pcs v1.7.1/go.mod h1:06QcV8x3XG2rejuINX53oYb1+owkCEY0wW0orumnvOI= +github.com/aws/aws-sdk-go-v2/service/pinpoint v1.36.1 h1:7vBcJCy6iXGagB8Z5zaRpF49H8nd3TVdVxLN5DrYYAs= +github.com/aws/aws-sdk-go-v2/service/pinpoint v1.36.1/go.mod h1:D6qGC37YHDdlcGgNc9RA3++WTdWNRNq5gQP00cHFUQ4= +github.com/aws/aws-sdk-go-v2/service/pinpointsmsvoicev2 v1.21.1 h1:tzp5DSj5QSMDMSxr9BpxuJBocueIQJ9bFnmaa9kZuLQ= +github.com/aws/aws-sdk-go-v2/service/pinpointsmsvoicev2 v1.21.1/go.mod h1:Fch5jvGSwyCbJp4xaqnXaGAtbA0Hp6WWnTjN5JzRzts= +github.com/aws/aws-sdk-go-v2/service/pipes v1.20.1 h1:M1knm5Myge9U14SLwnEuJ/jMjnn/vVfk7CYCQd7H0Mg= +github.com/aws/aws-sdk-go-v2/service/pipes v1.20.1/go.mod h1:fi5webS7jgREIhMVEK9HcI1lXGzhyKf0l6JlgaQ4UZs= +github.com/aws/aws-sdk-go-v2/service/polly v1.49.1 h1:g4JAX2yxmN9iJSE42TGR5GnionKpizF5IGqRdkw0aXA= +github.com/aws/aws-sdk-go-v2/service/polly v1.49.1/go.mod h1:meOGU/2EvK6KAjTy4wey28iXOXOkMwYCw+jIQ3+7Mxs= +github.com/aws/aws-sdk-go-v2/service/pricing v1.36.1 h1:LDR5vJNnAVqg9bZBI9sqSEpjhPGVelVFkxUwdvD6L2s= +github.com/aws/aws-sdk-go-v2/service/pricing v1.36.1/go.mod h1:n6r5jWgZaSRvoEp+hVB18QPHBdlAnqu+nI/vaZXcZ4A= +github.com/aws/aws-sdk-go-v2/service/qbusiness v1.29.1 h1:UEg5RyOrwwTgO3pEPVkBOZBhlZjGiVTJlLzUJcXLKQs= +github.com/aws/aws-sdk-go-v2/service/qbusiness v1.29.1/go.mod h1:RbC8dW2YmTMAE9jWWuOw1imZjbGQXbzZs3i/XzmhZkc= +github.com/aws/aws-sdk-go-v2/service/qldb v1.27.1 h1:M0bDQzEES16it3M8iwvYw0JYWSHtAELprn66MS8jjBo= +github.com/aws/aws-sdk-go-v2/service/qldb v1.27.1/go.mod h1:UCoQ1I3GDheCu90XJjXyvO/v2AUFTwLER6h4QmvSego= +github.com/aws/aws-sdk-go-v2/service/quicksight v1.89.1 h1:HieaRkHHAJWegQxuuWm3duxdEuiLQBHnApCkfMGVLH0= +github.com/aws/aws-sdk-go-v2/service/quicksight v1.89.1/go.mod h1:YQlQUXV3sa9nZR2W2DyrOVHoLoEDUjcoqe3vGgYTPPg= +github.com/aws/aws-sdk-go-v2/service/ram v1.31.1 h1:DZ1qMqkin2aoXDI9X4G48hufZ5Unag/11WmDgIEN31w= +github.com/aws/aws-sdk-go-v2/service/ram v1.31.1/go.mod h1:EtWvsAzhCnrUB03jgf70O8Sqi5gmRUQsFExhChPMI3U= +github.com/aws/aws-sdk-go-v2/service/rbin v1.23.1 h1:MuUdwoKOOY+H54Fb596ADns1ug2qM9QxGUIsgZshhVQ= +github.com/aws/aws-sdk-go-v2/service/rbin v1.23.1/go.mod h1:Gs3msPhLk/QQjEfCDK3iZXEOJltg2JyQJMuQ0hhvFLk= +github.com/aws/aws-sdk-go-v2/service/rds v1.100.1 h1:1QZUBDI1zr0RrVorJMgtgs2heL/23IxiKM0eRdW48Cc= +github.com/aws/aws-sdk-go-v2/service/rds v1.100.1/go.mod h1:7xLgcsUoy294mtsJFC+1/lZBwkZRuhb6Tnr2X/AOrl8= +github.com/aws/aws-sdk-go-v2/service/redshift v1.55.1 h1:g2AXKrTkVjnWpYXBXJ00lU6NaU849/jIIRxLVo10HGM= +github.com/aws/aws-sdk-go-v2/service/redshift v1.55.1/go.mod h1:GGQqtUubSmvzcr23P48Qkkv2auTeatL67pL9SO6/b14= +github.com/aws/aws-sdk-go-v2/service/redshiftdata v1.34.1 h1:4+OFVGzIg6JcwbR8FKtYdC6AuSg1jV11Hk3RIv6y2oY= +github.com/aws/aws-sdk-go-v2/service/redshiftdata v1.34.1/go.mod h1:heOxElSAAGnh+jfAH0hK9ilW856kSFYBlYRJS5QKbm0= +github.com/aws/aws-sdk-go-v2/service/redshiftserverless v1.28.1 h1:Tybcb+WE3hbjkF3kfkppyS6qRigIZwlPbtnFdMN9Hvg= +github.com/aws/aws-sdk-go-v2/service/redshiftserverless v1.28.1/go.mod h1:PD4779i8tDuTz0p6k1XSZTF2RrepnIGeZOTCmuFhFOA= +github.com/aws/aws-sdk-go-v2/service/rekognition v1.48.1 h1:MKivszAL8Z3w1hzxV6peGzSQsSekbrYcUaYS0IxjxbI= +github.com/aws/aws-sdk-go-v2/service/rekognition v1.48.1/go.mod h1:cKS/VXrV5GDM0JLURHffLzC17fm3luMz/6XPH2A92fw= +github.com/aws/aws-sdk-go-v2/service/resiliencehub v1.31.1 h1:Y6aoFAl88KNul8+otRs+DRKmp9FUEhWtCpyox/VkZzM= +github.com/aws/aws-sdk-go-v2/service/resiliencehub v1.31.1/go.mod h1:Z0BCXb/w38nvM+lPuYMGXuOHFgKl1y+MY11yzW4WprY= +github.com/aws/aws-sdk-go-v2/service/resourceexplorer2 v1.18.1 h1:Ocp3eIEr9gyd7YunIdPRRDOAw+bm622Ys2rrw/Iylps= +github.com/aws/aws-sdk-go-v2/service/resourceexplorer2 v1.18.1/go.mod h1:RGYowXd4xqI/xxZdNyvk1b4lO43heRlHt5hvFQgqT8Q= +github.com/aws/aws-sdk-go-v2/service/resourcegroups v1.30.1 h1:KhIp2JHWuSUDXyJK7PDfAr30cko1YKDhbE6O1byejkE= +github.com/aws/aws-sdk-go-v2/service/resourcegroups v1.30.1/go.mod h1:2zyaohdBXZBnLMMXhx0e3cd63JycCSl+X9YFNHP7gtY= +github.com/aws/aws-sdk-go-v2/service/resourcegroupstaggingapi v1.27.1 h1:dGw/U6NbhnWoW2gw+75/AZvnYjFuxYRtzUpxALoRhLc= +github.com/aws/aws-sdk-go-v2/service/resourcegroupstaggingapi v1.27.1/go.mod h1:ZNIISn1QONFDUbTmkIK53IBTrGn1TbsrBH5pG/BCwew= +github.com/aws/aws-sdk-go-v2/service/rolesanywhere v1.18.1 h1:CS6N35VnEJGpPbXUoQEm0LBA/uDpTC/jfrAkkNsbjEo= +github.com/aws/aws-sdk-go-v2/service/rolesanywhere v1.18.1/go.mod h1:tlqfSYOwnjSkzCp1Oc5dT44TX1bvy1SchvixKOXPvTI= +github.com/aws/aws-sdk-go-v2/service/route53 v1.54.1 h1:DvwcqU6ec5NNCACSSEYKuTg9J3PDFFlngkwV0k7wvaI= +github.com/aws/aws-sdk-go-v2/service/route53 v1.54.1/go.mod h1:POH50FEbIpazXJUVj2hbpJT819o2UF547G+BJBM7HQM= +github.com/aws/aws-sdk-go-v2/service/route53domains v1.30.1 h1:+0csOL9MiuIxe57+7TsHl/yzxIT1Jf0ai6qnp1bXGoA= +github.com/aws/aws-sdk-go-v2/service/route53domains v1.30.1/go.mod h1:EbsE1mwREHAclraVgQhu89uyy2oE/C1ETLghnTE7ghs= +github.com/aws/aws-sdk-go-v2/service/route53profiles v1.6.1 h1:OjU8qqebap7OqDkLU0/70sQ3LBxrR+kxzj8b+3aLJ5o= +github.com/aws/aws-sdk-go-v2/service/route53profiles v1.6.1/go.mod h1:iTrcT7Arr04ilWo5huHKWP2Z+j9S5aRyZvuomlckusw= +github.com/aws/aws-sdk-go-v2/service/route53recoverycontrolconfig v1.28.1 h1:P5ZnN/WfxPJ0lD6iZY0TvXKViw2U3m5LIs9pMCOvUH4= +github.com/aws/aws-sdk-go-v2/service/route53recoverycontrolconfig v1.28.1/go.mod h1:Ng+ThDA2vsPOfe5nYvmWHMuCy8d4c1Jty3vLJ29fKF0= +github.com/aws/aws-sdk-go-v2/service/route53recoveryreadiness v1.23.1 h1:AX9S7S7hvb4UJKIgZQ9SJ84LjTF3/fF5SBYjyu9/c6A= +github.com/aws/aws-sdk-go-v2/service/route53recoveryreadiness v1.23.1/go.mod h1:pbDtCWqLwS6CyyTiOpZVRtv+O/Es7VkhhLWbT9zMEas= +github.com/aws/aws-sdk-go-v2/service/route53resolver v1.37.1 h1:mp3ADBMz3nLgY4k9bNUrID8kB8H3WoyNGKTV/TnGs/g= +github.com/aws/aws-sdk-go-v2/service/route53resolver v1.37.1/go.mod h1:nQNdcvkdveeChWT7i/0yD/vFsttMOqK/VbCOcsyx+E4= +github.com/aws/aws-sdk-go-v2/service/rum v1.25.1 h1:IPGVJBSdfbowzlpJ2WamBS6X5bbIG22VjWp961JEkoI= +github.com/aws/aws-sdk-go-v2/service/rum v1.25.1/go.mod h1:bP77oXsN8c23i7o1A46SQmqlmuslx4OmYtX2Ns4p0R8= +github.com/aws/aws-sdk-go-v2/service/s3 v1.85.1 h1:Hsqo8+dFxSdDvv9B2PgIx1AJAnDpqgS0znVI+R+MoGY= +github.com/aws/aws-sdk-go-v2/service/s3 v1.85.1/go.mod h1:8Q0TAPXD68Z8YqlcIGHs/UNIDHsxErV9H4dl4vJEpgw= +github.com/aws/aws-sdk-go-v2/service/s3control v1.61.1 h1:Fu6ZEW0t68B6Tjp/ubiOBa2OCRx2sHnRl1/1ehRU1Hc= +github.com/aws/aws-sdk-go-v2/service/s3control v1.61.1/go.mod h1:E6DME7R1bQBJaH/dIS2070dgcgba97shJWUTWMrTbgM= +github.com/aws/aws-sdk-go-v2/service/s3outposts v1.30.1 h1:iOFQNXtgNsVQjQLJQTvGC5NsIv43fW07igtoDHEIvKs= +github.com/aws/aws-sdk-go-v2/service/s3outposts v1.30.1/go.mod h1:ANvlkElAoLD7KBmZAXJv+BmB42Ifw8DhKb4eEhmveMA= +github.com/aws/aws-sdk-go-v2/service/s3tables v1.7.1 h1:Shyve/4zbd4pdKluYyXtcrBoZ1Olwodu/lbL9Dc6xOo= +github.com/aws/aws-sdk-go-v2/service/s3tables v1.7.1/go.mod h1:7M+LyYRRMZQOXS/7SbLOFKuFPp4+SsqDMmyoxzX8YGU= +github.com/aws/aws-sdk-go-v2/service/sagemaker v1.203.1 h1:jjitDItJQ3kdF5Jtkr1JMQ2Miu+X1axdpv+uJmU5eu4= +github.com/aws/aws-sdk-go-v2/service/sagemaker v1.203.1/go.mod h1:VTFTvNY3kYVqdwZBTRSfnqQBBuBGtRjUSOFGIHDy4AI= +github.com/aws/aws-sdk-go-v2/service/scheduler v1.14.1 h1:Q2mO7GN5wcU4HVWXLT3Wwu317fiAwkiUoq0QeiqsZBY= +github.com/aws/aws-sdk-go-v2/service/scheduler v1.14.1/go.mod h1:3Fdk8jqhTM6Eivjt0v6HBIMarExmWKnXEaUFhogCVSc= +github.com/aws/aws-sdk-go-v2/service/schemas v1.30.1 h1:AeR1HvScTM6v8FIL5ONZhOKxdiI+QJH2L/RGmg3vTEE= +github.com/aws/aws-sdk-go-v2/service/schemas v1.30.1/go.mod h1:RNx0SkALkXNDSJKm/I1cAMmUfdTKB/KHIq/ddWG6tvg= +github.com/aws/aws-sdk-go-v2/service/secretsmanager v1.36.1 h1:fnOIjzwTVrtVnkRef3Qs+uTr3qYKwXuFom5pqdZERNQ= +github.com/aws/aws-sdk-go-v2/service/secretsmanager v1.36.1/go.mod h1:/19D53IxSX9W8uu5bo0t89oCLncvNP68V1KiRthhLd4= +github.com/aws/aws-sdk-go-v2/service/securityhub v1.59.1 h1:q/3LLpo4PcoM2GUTyE1GMiEtDekkuKjtqD9mw6K+g2s= +github.com/aws/aws-sdk-go-v2/service/securityhub v1.59.1/go.mod h1:vZ92NituujfniQ/4SuNBn87qTvD2mNreUhaR3Kscm8U= +github.com/aws/aws-sdk-go-v2/service/securitylake v1.21.1 h1:/RKW3AGx4P4zBoiBevP9omqR4nawRTFcIaSX27l4fDE= +github.com/aws/aws-sdk-go-v2/service/securitylake v1.21.1/go.mod h1:NamZRs6fW0/J8Di0CqJXRwbB58f4xVPNTfohMxi5lB0= +github.com/aws/aws-sdk-go-v2/service/serverlessapplicationrepository v1.26.1 h1:G00kAq1ULynJ5Sl4yBoa+7CKd35YVJj4nLMl8s0OXsM= +github.com/aws/aws-sdk-go-v2/service/serverlessapplicationrepository v1.26.1/go.mod h1:l21Hlsg40fSBVz2QqhI1+w0iSmJ8j35V6pxsp+4rne4= +github.com/aws/aws-sdk-go-v2/service/servicecatalog v1.35.1 h1:YnjdZk67nAaojegCz1QfvCjW6KxXRDbs3nONIaKd7R0= +github.com/aws/aws-sdk-go-v2/service/servicecatalog v1.35.1/go.mod h1:ErWa3lU2aQKBwkdbwpccUW2nodv+S1Fn/R4bU7Rc18g= +github.com/aws/aws-sdk-go-v2/service/servicecatalogappregistry v1.32.1 h1:bqfWM2gefpr4FOCZrEuKxV9LQdxKkmFBSxyAbeDoBj8= +github.com/aws/aws-sdk-go-v2/service/servicecatalogappregistry v1.32.1/go.mod h1:TQJFC/xYbI6XAHE3Wz8GV63G0hEjlZzqtSCD/+DcjFg= +github.com/aws/aws-sdk-go-v2/service/servicediscovery v1.36.1 h1:EqupyVMtt84ZljchBzq+X+pPwuYhUT7dzfBoDqC0DB4= +github.com/aws/aws-sdk-go-v2/service/servicediscovery v1.36.1/go.mod h1:HrkmhW8FU7GObElHC6Lm3sosolbig21w00VOm77Vsss= +github.com/aws/aws-sdk-go-v2/service/servicequotas v1.29.1 h1:woOK9lW27mtpdERfmnV9DFdNmYBKZv0W+DbSMB7c8DI= +github.com/aws/aws-sdk-go-v2/service/servicequotas v1.29.1/go.mod h1:Bfj6o/QIVdpFkd95vGIY3fTEaTJZpu0vks/D8VKwLnU= +github.com/aws/aws-sdk-go-v2/service/ses v1.31.1 h1:hi11Ld0VefrexMU5GL7/hNKzm6eplrSF4A3xe0S0M0U= +github.com/aws/aws-sdk-go-v2/service/ses v1.31.1/go.mod h1:YEsycIZqO487LztPmM2Q1U/g0ynw7Zj7zSD4Jt79SDY= +github.com/aws/aws-sdk-go-v2/service/sesv2 v1.48.1 h1:IxgjwuZ/AGKFFYU6yYT8rZAysL/4oSPEwtfUgQChv+w= +github.com/aws/aws-sdk-go-v2/service/sesv2 v1.48.1/go.mod h1:GvobvR4QPd7vuWZIyvKyRUddjjSKkUHqYa8aBfpIKh4= +github.com/aws/aws-sdk-go-v2/service/sfn v1.36.1 h1:VEOUJkplqcaFW+Z3ZOFSWSVsmXVs10SFxb3Y6IGX+bc= +github.com/aws/aws-sdk-go-v2/service/sfn v1.36.1/go.mod h1:bwaYtZOogLKo3c/rpHpBQe7vnoieV5rQn+nQ52HFaz8= +github.com/aws/aws-sdk-go-v2/service/shield v1.31.1 h1:xVThf6EHHHIacded51XqxPMEnmruw/VXtrtbMim26Zc= +github.com/aws/aws-sdk-go-v2/service/shield v1.31.1/go.mod h1:Gr5mZJ4DgXyZBskh7KgfNUb+zqhywkI4tOizNK0ado0= +github.com/aws/aws-sdk-go-v2/service/signer v1.28.1 h1:9LIObcOOXWwrT3fdo//lXO5evcqhkzzFLpqkdwcg3/Y= +github.com/aws/aws-sdk-go-v2/service/signer v1.28.1/go.mod h1:L2cwuhZJxxw/dvQJLkkUW3iTBWAoHC+8EyI/14imqhs= +github.com/aws/aws-sdk-go-v2/service/sns v1.35.1 h1:rXYKNcWkL86HT+vbkf/3YSCFCoNFcUlyFJp78dF36Rk= +github.com/aws/aws-sdk-go-v2/service/sns v1.35.1/go.mod h1:el2B16jJPkZCHv7NcBt3uf/JLLt0TBxcHcsjsyG+L40= +github.com/aws/aws-sdk-go-v2/service/sqs v1.39.1 h1:fkHJs2m1rKVBsE0n6tKi988JhpOMIu2MO2ZIHQQfeho= +github.com/aws/aws-sdk-go-v2/service/sqs v1.39.1/go.mod h1:uo+sko7ERytamU7kYji04fBiMbPAgTHxzr0MX7KznO4= +github.com/aws/aws-sdk-go-v2/service/ssm v1.61.1 h1:Pu5hveFc6RslFZP61W5SEMOoPd6RR2yrOu11ZxCkr+Y= +github.com/aws/aws-sdk-go-v2/service/ssm v1.61.1/go.mod h1:8OOmGP4EK2O8eJIKIgTUXTfznuhC1BBarYzb+B5ep44= +github.com/aws/aws-sdk-go-v2/service/ssmcontacts v1.28.1 h1:1H1jDOo0680oHHo25w2z5zhQ18anlw3iyGBHEQ4KnHM= +github.com/aws/aws-sdk-go-v2/service/ssmcontacts v1.28.1/go.mod h1:20JJUbKRkWn+Ln9Xt8J3U4IfpM8Sbb0ks9KoQmgIGPA= +github.com/aws/aws-sdk-go-v2/service/ssmincidents v1.36.1 h1:1/T3AGKsL3mUURd6Dk0qJa2Pgmeqx6ZjpY+cM4iHcX0= +github.com/aws/aws-sdk-go-v2/service/ssmincidents v1.36.1/go.mod h1:a9gXJaVGkxv3DRJd9ZafQSCBaoBDSYOQnNzshN869gM= +github.com/aws/aws-sdk-go-v2/service/ssmquicksetup v1.5.1 h1:kpAZB/7E8vcJabxjuBgOS14H4vew0vpE4/OXyzZh4/U= +github.com/aws/aws-sdk-go-v2/service/ssmquicksetup v1.5.1/go.mod h1:5Paze51it1WMLnEuoMWZhJeXxAUThOdl0LNHqbFkVmY= +github.com/aws/aws-sdk-go-v2/service/ssmsap v1.21.1 h1:qHmgtw+6t+U3HoGEfBGRlnWyWH90u7g4yNT5r4YSBHQ= +github.com/aws/aws-sdk-go-v2/service/ssmsap v1.21.1/go.mod h1:dls7w/cdUdzL0r0oCbz/zNMtnuBNIayq2wDDYr57Mmo= +github.com/aws/aws-sdk-go-v2/service/sso v1.26.1 h1:uWaz3DoNK9MNhm7i6UGxqufwu3BEuJZm72WlpGwyVtY= +github.com/aws/aws-sdk-go-v2/service/sso v1.26.1/go.mod h1:ILpVNjL0BO+Z3Mm0SbEeUoYS9e0eJWV1BxNppp0fcb8= +github.com/aws/aws-sdk-go-v2/service/ssoadmin v1.32.1 h1:Wqti4CxhMVIQU0ucF/RSIhgqy8i7jO/kX+s1uw73YH0= +github.com/aws/aws-sdk-go-v2/service/ssoadmin v1.32.1/go.mod h1:TbMaMLH88FDGdgBJ/7lbx0fiUP/Zz0QloIaATlW8e2w= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.31.1 h1:XdG6/o1/ZDmn3wJU5SRAejHaWgKS4zHv0jBamuKuS2k= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.31.1/go.mod h1:oiotGTKadCOCl3vg/tYh4k45JlDF81Ka8rdumNhEnIQ= +github.com/aws/aws-sdk-go-v2/service/storagegateway v1.39.1 h1:O5zyb5Nag2fUvcIXMK1v+ZXWaPFCoPmqX6WAR0Jmsno= +github.com/aws/aws-sdk-go-v2/service/storagegateway v1.39.1/go.mod h1:AQSOz7HtJBbLMExu5ftB5sN8B9ZaHE00Rc/8P3MPpjo= +github.com/aws/aws-sdk-go-v2/service/sts v1.35.1 h1:iF4Xxkc0H9c/K2dS0zZw3SCkj0Z7n6AMnUiiyoJND+I= +github.com/aws/aws-sdk-go-v2/service/sts v1.35.1/go.mod h1:0bxIatfN0aLq4mjoLDeBpOjOke68OsFlXPDFJ7V0MYw= +github.com/aws/aws-sdk-go-v2/service/swf v1.29.1 h1:3MokmeLAz3SAzZW/PT3+QebJYVUtzNDpHrSpO0SQtPs= +github.com/aws/aws-sdk-go-v2/service/swf v1.29.1/go.mod h1:KBITTXjOcUqvzGilyMCW/lLL2aLTN6PxS+OxMJsoitw= +github.com/aws/aws-sdk-go-v2/service/synthetics v1.37.1 h1:bWH6tBabdGAWbpbV3FFukqUlY54I6jjzHHQWE/1YJbY= +github.com/aws/aws-sdk-go-v2/service/synthetics v1.37.1/go.mod h1:BedpiqRrnMFzbm/g8ZuUnA1/TjAzT475hVNpUiNWpaM= +github.com/aws/aws-sdk-go-v2/service/taxsettings v1.13.1 h1:1LsFNUBiAu20C/+DCTw3uhTmfgrenBJPGzNo5TkKPro= +github.com/aws/aws-sdk-go-v2/service/taxsettings v1.13.1/go.mod h1:5WaC771ktHDgK0787PVcUQ98ptYdxmYTCK4ymuQC4OE= +github.com/aws/aws-sdk-go-v2/service/timestreaminfluxdb v1.12.1 h1:izKMjMihlIJdADsWKFDu2Q3epWiT1ee5w2fHnvMQ80E= +github.com/aws/aws-sdk-go-v2/service/timestreaminfluxdb v1.12.1/go.mod h1:Sbgai5mZj8POGBYyMxpwajp6PNHF2lf/i5oLv3lI9qo= +github.com/aws/aws-sdk-go-v2/service/timestreamquery v1.32.1 h1:TZ2ntXpVhqDub8hqOZnMJBFNETeYoFvy1gfTaIWB9vE= +github.com/aws/aws-sdk-go-v2/service/timestreamquery v1.32.1/go.mod h1:FSe0ILWhP9eujXt5nq9j3MkDDeLs3/Mv7xxG2MR4sN0= +github.com/aws/aws-sdk-go-v2/service/timestreamwrite v1.32.1 h1:zh3Jm1emj0IZeZAdimPPHwo2kscIYxxW4fCa+eL1SUE= +github.com/aws/aws-sdk-go-v2/service/timestreamwrite v1.32.1/go.mod h1:a74kIao0vSolFoqFuqoU/ZLbQdE7ean791+w7ke3UmI= +github.com/aws/aws-sdk-go-v2/service/transcribe v1.48.1 h1:ydeDmQyYbaVk4Kk4rT7rasqar7WKizpIZc/MtTwx3XU= +github.com/aws/aws-sdk-go-v2/service/transcribe v1.48.1/go.mod h1:yebrHNdyMhIz0hKhQzHaKtr7GnfjCWfQXR8fI+biDOY= +github.com/aws/aws-sdk-go-v2/service/transfer v1.62.1 h1:h7ztYoDpj4P9TF6Tl22F2bK4ceiaxt6UR05KYvSXZ6Q= +github.com/aws/aws-sdk-go-v2/service/transfer v1.62.1/go.mod h1:pcob4Kb6kNQartCIk7k5DvcMgUWfFHgpvUmT6NJ+tfA= +github.com/aws/aws-sdk-go-v2/service/verifiedpermissions v1.25.1 h1:YfjBV97VKP7BzolXmhkpoIIhfW2bMcxHbMOiK+bXVjA= +github.com/aws/aws-sdk-go-v2/service/verifiedpermissions v1.25.1/go.mod h1:5Eyf+GB1CKpvbvZFT7MIO5Mk3gPHBcyx+WC7Jb1WeIs= +github.com/aws/aws-sdk-go-v2/service/vpclattice v1.15.1 h1:yNH2+yM+Fjdm7qyAkZ8jSvvGNJLY1B6Ojf0y1bxtnNU= +github.com/aws/aws-sdk-go-v2/service/vpclattice v1.15.1/go.mod h1:PIVQ2MlMezvs5/JN23nZQtdiCcXw1pck5Dc14UYXFys= +github.com/aws/aws-sdk-go-v2/service/waf v1.27.1 h1:KXfH2cD/09HuOfEMy4+dOSgswvjsLlIq4MfZq54XVTE= +github.com/aws/aws-sdk-go-v2/service/waf v1.27.1/go.mod h1:3Ox1y+Ece8qh6sh5SwhIApyChTMjB9M+ZPkfFrso9E8= +github.com/aws/aws-sdk-go-v2/service/wafregional v1.27.1 h1:cT33VIS4q26eNlgc0BmJ3PztzPYz9fc2dZLwITYqLbA= +github.com/aws/aws-sdk-go-v2/service/wafregional v1.27.1/go.mod h1:WTjSh2yRo99f7MXyTkQJ2+jrWyyiSKpUpVdeoPFBdqI= +github.com/aws/aws-sdk-go-v2/service/wafv2 v1.64.1 h1:oP8eLLYrvxRaOKd8P2Cx0v6BnlBHp9I7ke0hVIVM7Ow= +github.com/aws/aws-sdk-go-v2/service/wafv2 v1.64.1/go.mod h1:hOrt3LfmAbeUsafBWZpHYkKLzX4Lhd1O9Fgy5Jahr/g= +github.com/aws/aws-sdk-go-v2/service/wellarchitected v1.36.1 h1:u5PVGnXaDhUzAi496HM0AqSHLMxsH8AXDGI+hvGGceg= +github.com/aws/aws-sdk-go-v2/service/wellarchitected v1.36.1/go.mod h1:9T+lndTY7HGyy99UmFciMfeG8DvHJxQLgKcZkVpfxtA= +github.com/aws/aws-sdk-go-v2/service/workspaces v1.59.1 h1:pHLxmX312+1Y4TPvAKS1cVS8ky4Lcqlv0tfmjvSQO7Y= +github.com/aws/aws-sdk-go-v2/service/workspaces v1.59.1/go.mod h1:GKRVmQy+p6FxWidtWnsx/qbxIKyu96pEYCdMrcuTgeM= +github.com/aws/aws-sdk-go-v2/service/workspacesweb v1.28.1 h1:EUGE9p+/Yfs3gsuazAvn9yDY5k+yjaPZD117hum4BUo= +github.com/aws/aws-sdk-go-v2/service/workspacesweb v1.28.1/go.mod h1:gUs8tCNAp6COwgYIef9axji/vDiM5KXzjxXpSHrIz9U= +github.com/aws/aws-sdk-go-v2/service/xray v1.32.1 h1:cEgIUA7e2jJX6dtw7QZHZC4Npgzc3qAhI6VgBAJhLys= +github.com/aws/aws-sdk-go-v2/service/xray v1.32.1/go.mod h1:yNBhxYF0/a7HxlvvPZ9pljsw3wSh6ooyxg5llocFwBQ= github.com/aws/smithy-go v1.22.5 h1:P9ATCXPMb2mPjYBgueqJNCA5S9UfktsW0tTxi+a7eqw= github.com/aws/smithy-go v1.22.5/go.mod h1:t1ufH5HMublsJYulve2RKmHDC15xu1f26kHCp/HgceI= github.com/beevik/etree v1.5.1 h1:TC3zyxYp+81wAmbsi8SWUpZCurbxa6S8RITYRSkNRwo= From e7e307fb74eaa0d1ae6622718f9c4cda7d587eff Mon Sep 17 00:00:00 2001 From: Jared Baker Date: Thu, 31 Jul 2025 10:48:33 -0400 Subject: [PATCH 333/365] chore: tweak changelog --- .changelog/43614.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.changelog/43614.txt b/.changelog/43614.txt index a9f20d1ef490..f978066041cd 100644 --- a/.changelog/43614.txt +++ b/.changelog/43614.txt @@ -1,3 +1,3 @@ ```release-note:enhancement -resource/aws_cleanrooms_collaboration: Added `analytics_engine` argument (values: CLEAN_ROOMS_SQL, SPARK) -``` \ No newline at end of file +resource/aws_cleanrooms_collaboration: Add `analytics_engine` argument +``` From 347a1aa2bd3b50e5918f6448df9e3876e93a626d Mon Sep 17 00:00:00 2001 From: Jared Baker Date: Thu, 31 Jul 2025 10:49:22 -0400 Subject: [PATCH 334/365] r/aws_cleanrooms_collaboration: add `analytics_engine` validation, update support --- internal/service/cleanrooms/collaboration.go | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/internal/service/cleanrooms/collaboration.go b/internal/service/cleanrooms/collaboration.go index 6e88f589e14d..c949ae2d10a1 100644 --- a/internal/service/cleanrooms/collaboration.go +++ b/internal/service/cleanrooms/collaboration.go @@ -18,6 +18,7 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/hashicorp/terraform-provider-aws/internal/conns" "github.com/hashicorp/terraform-provider-aws/internal/create" + "github.com/hashicorp/terraform-provider-aws/internal/enum" "github.com/hashicorp/terraform-provider-aws/internal/errs" "github.com/hashicorp/terraform-provider-aws/internal/errs/sdkdiag" tftags "github.com/hashicorp/terraform-provider-aws/internal/tags" @@ -46,6 +47,11 @@ func ResourceCollaboration() *schema.Resource { }, Schema: map[string]*schema.Schema{ + "analytics_engine": { + Type: schema.TypeString, + Optional: true, + ValidateDiagFunc: enum.Validate[types.AnalyticsEngine](), + }, names.AttrARN: { Type: schema.TypeString, Computed: true, @@ -54,11 +60,6 @@ func ResourceCollaboration() *schema.Resource { Type: schema.TypeString, Computed: true, }, - "analytics_engine": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - }, "creator_display_name": { Type: schema.TypeString, ForceNew: true, @@ -268,6 +269,10 @@ func resourceCollaborationUpdate(ctx context.Context, d *schema.ResourceData, me input.Name = aws.String(d.Get(names.AttrName).(string)) } + if d.HasChanges("analytics_engine") { + input.AnalyticsEngine = types.AnalyticsEngine(d.Get("analytics_engine").(string)) + } + _, err := conn.UpdateCollaboration(ctx, input) if err != nil { return create.AppendDiagError(diags, names.CleanRooms, create.ErrActionUpdating, ResNameCollaboration, d.Id(), err) From e37cdbcf3bd8e00e7bec5d5f2f327114bb3a5526 Mon Sep 17 00:00:00 2001 From: Jared Baker Date: Thu, 31 Jul 2025 10:49:42 -0400 Subject: [PATCH 335/365] r/aws_cleanrooms_collaboration(test): tidy analytics engine test ```console % make testacc PKG=cleanrooms TESTS=TestAccCleanRoomsCollaboration_analyticsEngine make: Verifying source code with gofmt... ==> Checking that code complies with gofmt requirements... TF_ACC=1 go1.24.5 test ./internal/service/cleanrooms/... -v -count 1 -parallel 20 -run='TestAccCleanRoomsCollaboration_analyticsEngine' -timeout 360m -vet=off 2025/07/31 10:43:56 Creating Terraform AWS Provider (SDKv2-style)... 2025/07/31 10:43:56 Initializing Terraform AWS Provider (SDKv2-style)... === RUN TestAccCleanRoomsCollaboration_analyticsEngine === PAUSE TestAccCleanRoomsCollaboration_analyticsEngine === CONT TestAccCleanRoomsCollaboration_analyticsEngine --- PASS: TestAccCleanRoomsCollaboration_analyticsEngine (15.22s) PASS ok github.com/hashicorp/terraform-provider-aws/internal/service/cleanrooms 21.450s ``` --- .../service/cleanrooms/collaboration_test.go | 61 +++++++++++-------- 1 file changed, 36 insertions(+), 25 deletions(-) diff --git a/internal/service/cleanrooms/collaboration_test.go b/internal/service/cleanrooms/collaboration_test.go index 03385354493f..fd580dbacd04 100644 --- a/internal/service/cleanrooms/collaboration_test.go +++ b/internal/service/cleanrooms/collaboration_test.go @@ -285,6 +285,36 @@ func TestAccCleanRoomsCollaboration_updateMemberAbilities(t *testing.T) { }) } +func TestAccCleanRoomsCollaboration_analyticsEngine(t *testing.T) { + ctx := acctest.Context(t) + + var collaboration cleanrooms.GetCollaborationOutput + rName := acctest.RandomWithPrefix(t, acctest.ResourcePrefix) + engine := string(types.AnalyticsEngineSpark) + resourceName := "aws_cleanrooms_collaboration.test" + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t); testAccPreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.CleanRoomsServiceID), + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + CheckDestroy: testAccCheckCollaborationDestroy(ctx), + Steps: []resource.TestStep{ + { + Config: testAccCollaborationConfig_analyticsEngine(rName, engine), + Check: resource.ComposeTestCheckFunc( + testAccCheckCollaborationExists(ctx, resourceName, &collaboration), + resource.TestCheckResourceAttr(resourceName, "analytics_engine", engine), + ), + }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} + func testAccCheckCollaborationDestroy(ctx context.Context) resource.TestCheckFunc { return func(s *terraform.State) error { conn := acctest.Provider.Meta().(*conns.AWSClient).CleanRoomsClient(ctx) @@ -542,40 +572,21 @@ resource "aws_cleanrooms_collaboration" "test" { dataEncryptionMetadata, additionalMember) } -func TestAccCleanRoomsCollaboration_analyticsEngine(t *testing.T) { - resourceName := "aws_cleanrooms_collaboration.test" - - resource.ParallelTest(t, resource.TestCase{ - PreCheck: func() { - acctest.PreCheck(context.Background(), t) - }, - ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, - Steps: []resource.TestStep{ - { - Config: testAccCollaborationConfigAnalyticsEngine("SPARK"), - Check: resource.ComposeTestCheckFunc( - resource.TestCheckResourceAttr(resourceName, "analytics_engine", "SPARK"), - ), - }, - }, - }) -} - -func testAccCollaborationConfigAnalyticsEngine(engine string) string { +func testAccCollaborationConfig_analyticsEngine(rName, engine string) string { return fmt.Sprintf(` resource "aws_cleanrooms_collaboration" "test" { - name = "tf-test-collab" - creator_display_name = "tf-test" + name = %[1]q + creator_display_name = %[1]q creator_member_abilities = ["CAN_RECEIVE_RESULTS"] description = "test collaboration" query_log_status = "ENABLED" - analytics_engine = "%s" + analytics_engine = %[2]q member { - account_id = "%s" + account_id = 123456789012 display_name = "test-member" member_abilities = ["CAN_QUERY"] } } -`, engine, acctest.AccountID(context.Background())) +`, rName, engine) } From 3e3ab14273d6ee048279e07e62629f2ff5487ddd Mon Sep 17 00:00:00 2001 From: Jared Baker Date: Thu, 31 Jul 2025 10:57:07 -0400 Subject: [PATCH 336/365] r/aws_cleanrooms_collaboration(doc): tidy up --- .../r/cleanrooms_collaboration.html.markdown | 25 +++++++++---------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/website/docs/r/cleanrooms_collaboration.html.markdown b/website/docs/r/cleanrooms_collaboration.html.markdown index 5b4ea3826767..03b07b4a6233 100644 --- a/website/docs/r/cleanrooms_collaboration.html.markdown +++ b/website/docs/r/cleanrooms_collaboration.html.markdown @@ -8,13 +8,11 @@ description: |- # Resource: aws_cleanrooms_collaboration -Provides a AWS Clean Rooms collaboration. All members included in the definition will be invited to -join the collaboration and can create memberships. +Provides a AWS Clean Rooms collaboration. +All members included in the definition will be invited to join the collaboration and can create memberships. ## Example Usage -### Collaboration with tags - ```terraform resource "aws_cleanrooms_collaboration" "test_collaboration" { name = "terraform-example-collaboration" @@ -40,23 +38,23 @@ resource "aws_cleanrooms_collaboration" "test_collaboration" { tags = { Project = "Terraform" } - } ``` ## Argument Reference -This resource supports the following arguments: +The following arguments are required: -* `region` - (Optional) Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the [provider configuration](https://registry.terraform.io/providers/hashicorp/aws/latest/docs#aws-configuration-reference). * `name` - (Required) - The name of the collaboration. Collaboration names do not need to be unique. * `description` - (Required) - A description for a collaboration. * `creator_member_abilities` - (Required - Forces new resource) - The list of member abilities for the creator of the collaboration. Valid values [may be found here](https://docs.aws.amazon.com/clean-rooms/latest/apireference/API_CreateCollaboration.html#API-CreateCollaboration-request-creatorMemberAbilities). * `creator_display_name` - (Required - Forces new resource) - The name for the member record for the collaboration creator. * `query_log_status` - (Required - Forces new resource) - Determines if members of the collaboration can enable query logs within their own. emberships. Valid values [may be found here](https://docs.aws.amazon.com/clean-rooms/latest/apireference/API_CreateCollaboration.html#API-CreateCollaboration-request-queryLogStatus). -* `analytics_engine` - (Optional, ForceNew) Specifies the analytics engine used by the collaboration. - Valid values: `CLEAN_ROOMS_SQL` (deprecated), `SPARK`. Defaults to `SPARK`. + +The following arguments are optional: + +* `analytics_engine` - (Optional) Analytics engine used by the collaboration. Valid values are `CLEAN_ROOMS_SQL` (deprecated) and `SPARK`. * `data_encryption_metadata` - (Required - Forces new resource) - a collection of settings which determine how the [c3r client](https://docs.aws.amazon.com/clean-rooms/latest/userguide/crypto-computing.html) will encrypt data for use within this collaboration. * `data_encryption_metadata.allow_clear_text` - (Required - Forces new resource) - Indicates whether encrypted tables can contain cleartext data. This is a boolea field. @@ -70,17 +68,18 @@ or cryptographically processed (false). * `member.account_id` - (Required - Forces new resource) - The account id for the invited member. * `member.display_name` - (Required - Forces new resource) - The display name for the invited member. * `member.member_abilities` - (Required - Forces new resource) - The list of abilities for the invited member. Valid values [may be found here](https://docs.aws.amazon.com/clean-rooms/latest/apireference/API_CreateCollaboration.html#API-CreateCollaboration-request-creatorMemberAbilities). +* `region` - (Optional) Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the [provider configuration](https://registry.terraform.io/providers/hashicorp/aws/latest/docs#aws-configuration-reference). * `tags` - (Optional) - Key value pairs which tag the collaboration. ## Attribute Reference This resource exports the following attributes in addition to the arguments above: -* `arn` - The arn of the collaboration. -* `id` - The id of the collaboration. -* `create_time` - The date and time the collaboration was created. +* `arn` - ARN of the collaboration. +* `id` - ID of the collaboration. +* `create_time` - Date and time the collaboration was created. * `member status` - For each member included in the collaboration an additional computed attribute of status is added. These values [may be found here](https://docs.aws.amazon.com/clean-rooms/latest/apireference/API_MemberSummary.html#API-Type-MemberSummary-status). -* `updated_time` - The date and time the collaboration was last updated. +* `updated_time` - Date and time the collaboration was last updated. ## Timeouts From 1274304f567c60d5ff81e8e67ec2457e1a0240c8 Mon Sep 17 00:00:00 2001 From: Jared Baker Date: Thu, 31 Jul 2025 10:57:28 -0400 Subject: [PATCH 337/365] r/aws_cleanrooms_collaboration(test): fix failing tests As the `CLEAN_ROOMS_SQL` analytics engine was deprecated on July 16, 2025, all configurations must now explicitly specify the `SPARK` analytics engine. ```console % make testacc PKG=cleanrooms TESTS=TestAccCleanRoomsCollaboration_ make: Verifying source code with gofmt... ==> Checking that code complies with gofmt requirements... TF_ACC=1 go1.24.5 test ./internal/service/cleanrooms/... -v -count 1 -parallel 20 -run='TestAccCleanRoomsCollaboration_' -timeout 360m -vet=off 2025/07/31 10:54:43 Creating Terraform AWS Provider (SDKv2-style)... 2025/07/31 10:54:44 Initializing Terraform AWS Provider (SDKv2-style)... --- PASS: TestAccCleanRoomsCollaboration_disappears (18.00s) --- PASS: TestAccCleanRoomsCollaboration_analyticsEngine (21.40s) --- PASS: TestAccCleanRoomsCollaboration_basic (24.34s) --- PASS: TestAccCleanRoomsCollaboration_updateCreatorDisplayName (30.23s) --- PASS: TestAccCleanRoomsCollaboration_updateMemberAbilities (35.65s) --- PASS: TestAccCleanRoomsCollaboration_updateQueryLogStatus (38.01s) --- PASS: TestAccCleanRoomsCollaboration_mutableProperties (38.57s) --- PASS: TestAccCleanRoomsCollaboration_dataEncryptionSettings (45.46s) PASS ok github.com/hashicorp/terraform-provider-aws/internal/service/cleanrooms 51.830s ``` --- .../service/cleanrooms/collaboration_test.go | 47 ++++++++----------- 1 file changed, 20 insertions(+), 27 deletions(-) diff --git a/internal/service/cleanrooms/collaboration_test.go b/internal/service/cleanrooms/collaboration_test.go index fd580dbacd04..c329fa6919dd 100644 --- a/internal/service/cleanrooms/collaboration_test.go +++ b/internal/service/cleanrooms/collaboration_test.go @@ -57,10 +57,9 @@ func TestAccCleanRoomsCollaboration_basic(t *testing.T) { ), }, { - ResourceName: resourceName, - ImportState: true, - ImportStateVerify: true, - ImportStateVerifyIgnore: []string{names.AttrApplyImmediately, "user"}, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, }, }, }) @@ -121,10 +120,9 @@ func TestAccCleanRoomsCollaboration_mutableProperties(t *testing.T) { ), }, { - ResourceName: resourceName, - ImportState: true, - ImportStateVerify: true, - ImportStateVerifyIgnore: []string{names.AttrApplyImmediately, "user"}, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, }, }, }) @@ -156,10 +154,9 @@ func TestAccCleanRoomsCollaboration_updateCreatorDisplayName(t *testing.T) { ), }, { - ResourceName: resourceName, - ImportState: true, - ImportStateVerify: true, - ImportStateVerifyIgnore: []string{names.AttrApplyImmediately, "user"}, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, }, }, }) @@ -190,10 +187,9 @@ func TestAccCleanRoomsCollaboration_updateQueryLogStatus(t *testing.T) { ), }, { - ResourceName: resourceName, - ImportState: true, - ImportStateVerify: true, - ImportStateVerifyIgnore: []string{names.AttrApplyImmediately, "user"}, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, }, }, }) @@ -236,10 +232,9 @@ func TestAccCleanRoomsCollaboration_dataEncryptionSettings(t *testing.T) { ), }, { - ResourceName: resourceName, - ImportState: true, - ImportStateVerify: true, - ImportStateVerifyIgnore: []string{names.AttrApplyImmediately, "user"}, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, }, }, }) @@ -276,10 +271,9 @@ func TestAccCleanRoomsCollaboration_updateMemberAbilities(t *testing.T) { ), }, { - ResourceName: resourceName, - ImportState: true, - ImportStateVerify: true, - ImportStateVerifyIgnore: []string{names.AttrApplyImmediately, "user"}, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, }, }, }) @@ -557,6 +551,7 @@ resource "aws_cleanrooms_collaboration" "test" { creator_display_name = %[5]q description = %[2]q query_log_status = %[6]q + analytics_engine = "SPARK" %[7]s @@ -566,9 +561,7 @@ resource "aws_cleanrooms_collaboration" "test" { Project = %[3]q } } - - - `, name, description, tagValue, creatorMemberAbilities, creatorDisplayName, queryLogStatus, +`, name, description, tagValue, creatorMemberAbilities, creatorDisplayName, queryLogStatus, dataEncryptionMetadata, additionalMember) } From 3bf50e7c11378f12a04658c53b654e607e5f6452 Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 11:06:42 -0400 Subject: [PATCH 338/365] generate/tags: Add '-TagResTypeIsAccountID' flag. --- internal/generate/tags/main.go | 7 +++++++ .../generate/tags/templates/list_tags_body.gtpl | 15 +++++++++++++-- .../tags/templates/update_tags_body.gtpl | 17 +++++++++++++++-- 3 files changed, 35 insertions(+), 4 deletions(-) diff --git a/internal/generate/tags/main.go b/internal/generate/tags/main.go index b4d15928a11d..5d5683354c94 100644 --- a/internal/generate/tags/main.go +++ b/internal/generate/tags/main.go @@ -87,6 +87,7 @@ var ( tagOpBatchSize = flag.Int("TagOpBatchSize", 0, "tagOpBatchSize") tagResTypeElem = flag.String("TagResTypeElem", "", "tagResTypeElem") tagResTypeElemType = flag.String("TagResTypeElemType", "", "tagResTypeElemType") + tagResTypeIsAccountID = flag.Bool("TagResTypeIsAccountID", false, "tagResTypeIsAccountID") tagType = flag.String("TagType", "Tag", "tagType") tagType2 = flag.String("TagType2", "", "tagType") tagTypeAddBoolElem = flag.String("TagTypeAddBoolElem", "", "TagTypeAddBoolElem") @@ -182,6 +183,7 @@ type TemplateData struct { TagOpBatchSize int TagResTypeElem string TagResTypeElemType string + TagResTypeIsAccountID bool TagType string TagType2 string TagTypeAddBoolElem string @@ -242,6 +244,10 @@ func main() { createTagsFunc = "" } + if *tagResTypeIsAccountID && *tagResTypeElem == "" { + g.Errorf("TagResTypeIsAccountID requires TagResTypeElem") + } + clientType := fmt.Sprintf("*%s.Client", awsPkg) providerNameUpper := service.ProviderNameUpper() templateData := TemplateData{ @@ -281,6 +287,7 @@ func main() { TagOpBatchSize: *tagOpBatchSize, TagResTypeElem: *tagResTypeElem, TagResTypeElemType: *tagResTypeElemType, + TagResTypeIsAccountID: *tagResTypeIsAccountID, TagType: *tagType, TagType2: *tagType2, TagTypeAddBoolElem: *tagTypeAddBoolElem, diff --git a/internal/generate/tags/templates/list_tags_body.gtpl b/internal/generate/tags/templates/list_tags_body.gtpl index 2fb4d82e05f6..c8fa247f69fc 100644 --- a/internal/generate/tags/templates/list_tags_body.gtpl +++ b/internal/generate/tags/templates/list_tags_body.gtpl @@ -176,8 +176,19 @@ func {{ .ListTagsFunc }}(ctx context.Context, conn {{ .ClientType }}, identifier {{- if .IsDefaultListTags }} // {{ .ListTagsFunc | Title }} lists {{ .ServicePackage }} service tags and set them in Context. // It is called from outside this package. -func (p *servicePackage) {{ .ListTagsFunc | Title }}(ctx context.Context, meta any, identifier{{ if .TagResTypeElem }}, resourceType{{ end }} string) error { - tags, err := {{ .ListTagsFunc }}(ctx, meta.(*conns.AWSClient).{{ .ProviderNameUpper }}Client(ctx), identifier{{ if .TagResTypeElem }}, resourceType{{ end }}) +{{- if .TagResTypeElem }} +{{- if .TagResTypeIsAccountID }} +func (p *servicePackage) {{ .ListTagsFunc | Title }}(ctx context.Context, meta any, identifier string) error { + c := meta.(*conns.AWSClient) + tags, err := {{ .ListTagsFunc }}(ctx, c.{{ .ProviderNameUpper }}Client(ctx), identifier, c.AccountID(ctx)) +{{- else }} +func (p *servicePackage) {{ .ListTagsFunc | Title }}(ctx context.Context, meta any, identifier, resourceType string) error { + tags, err := {{ .ListTagsFunc }}(ctx, meta.(*conns.AWSClient).{{ .ProviderNameUpper }}Client(ctx), identifier, resourceType) +{{- end }} +{{- else }} +func (p *servicePackage) {{ .ListTagsFunc | Title }}(ctx context.Context, meta any, identifier string) error { + tags, err := {{ .ListTagsFunc }}(ctx, meta.(*conns.AWSClient).{{ .ProviderNameUpper }}Client(ctx), identifier) +{{- end }} if err != nil { return smarterr.NewError(err) diff --git a/internal/generate/tags/templates/update_tags_body.gtpl b/internal/generate/tags/templates/update_tags_body.gtpl index 880d9bc90d8d..09800f8ce06f 100644 --- a/internal/generate/tags/templates/update_tags_body.gtpl +++ b/internal/generate/tags/templates/update_tags_body.gtpl @@ -195,7 +195,20 @@ func {{ .UpdateTagsFunc }}(ctx context.Context, conn {{ .ClientType }}, identifi {{- if .IsDefaultUpdateTags }} // {{ .UpdateTagsFunc | Title }} updates {{ .ServicePackage }} service tags. // It is called from outside this package. -func (p *servicePackage) {{ .UpdateTagsFunc | Title }}(ctx context.Context, meta any, identifier{{ if .TagResTypeElem }}, resourceType{{ end }} string, oldTags, newTags any) error { - return {{ .UpdateTagsFunc }}(ctx, meta.(*conns.AWSClient).{{ .ProviderNameUpper }}Client(ctx), identifier{{ if .TagResTypeElem }}, resourceType{{ end }}, oldTags, newTags) +{{- if .TagResTypeElem }} +{{- if .TagResTypeIsAccountID }} +func (p *servicePackage) {{ .UpdateTagsFunc | Title }}(ctx context.Context, meta any, identifier string, oldTags, newTags any) error { + c := meta.(*conns.AWSClient) + return {{ .UpdateTagsFunc }}(ctx, c.{{ .ProviderNameUpper }}Client(ctx), identifier, c.AccountID(ctx), oldTags, newTags) } +{{- else }} +func (p *servicePackage) {{ .UpdateTagsFunc | Title }}(ctx context.Context, meta any, identifier, resourceType string, oldTags, newTags any) error { + return {{ .UpdateTagsFunc }}(ctx, meta.(*conns.AWSClient).{{ .ProviderNameUpper }}Client(ctx), identifier, resourceType, oldTags, newTags) +} +{{- end }} +{{- else }} +func (p *servicePackage) {{ .UpdateTagsFunc | Title }}(ctx context.Context, meta any, identifier string, oldTags, newTags any) error { + return {{ .UpdateTagsFunc }}(ctx, meta.(*conns.AWSClient).{{ .ProviderNameUpper }}Client(ctx), identifier, oldTags, newTags) +} +{{- end }} {{- end }} From 1b976e4b1fc2f3bf7268298ca1a2e0cc926539c0 Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 11:13:49 -0400 Subject: [PATCH 339/365] s3control: Use '-TagResTypeIsAccountID' flag for 'awstypes.Tag' functionality. --- internal/service/s3control/generate.go | 2 +- internal/service/s3control/tags_gen.go | 10 ++++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/internal/service/s3control/generate.go b/internal/service/s3control/generate.go index 9a446be97f0d..1124e7d7c418 100644 --- a/internal/service/s3control/generate.go +++ b/internal/service/s3control/generate.go @@ -1,7 +1,7 @@ // Copyright (c) HashiCorp, Inc. // SPDX-License-Identifier: MPL-2.0 -//go:generate go run ../../generate/tags/main.go -ListTags -ServiceTagsSlice -TagResTypeElem=AccountId -UpdateTags +//go:generate go run ../../generate/tags/main.go -ListTags -ServiceTagsSlice -TagResTypeIsAccountID -TagResTypeElem=AccountId -UpdateTags //go:generate go run ../../generate/tags/main.go -ServiceTagsSlice -TagsFunc=svcS3Tags -KeyValueTagsFunc=keyValueTagsFromS3Tags -GetTagsInFunc=getS3TagsIn -SetTagsOutFunc=setS3TagsOut -TagType=S3Tag -- s3_tags_gen.go //go:generate go run ../../generate/servicepackage/main.go //go:generate go run ../../generate/identitytests/main.go diff --git a/internal/service/s3control/tags_gen.go b/internal/service/s3control/tags_gen.go index f0fc74d39b89..0fa3e0b2d292 100644 --- a/internal/service/s3control/tags_gen.go +++ b/internal/service/s3control/tags_gen.go @@ -36,8 +36,9 @@ func listTags(ctx context.Context, conn *s3control.Client, identifier, resourceT // ListTags lists s3control service tags and set them in Context. // It is called from outside this package. -func (p *servicePackage) ListTags(ctx context.Context, meta any, identifier, resourceType string) error { - tags, err := listTags(ctx, meta.(*conns.AWSClient).S3ControlClient(ctx), identifier, resourceType) +func (p *servicePackage) ListTags(ctx context.Context, meta any, identifier string) error { + c := meta.(*conns.AWSClient) + tags, err := listTags(ctx, c.S3ControlClient(ctx), identifier, c.AccountID(ctx)) if err != nil { return smarterr.NewError(err) @@ -144,6 +145,7 @@ func updateTags(ctx context.Context, conn *s3control.Client, identifier, resourc // UpdateTags updates s3control service tags. // It is called from outside this package. -func (p *servicePackage) UpdateTags(ctx context.Context, meta any, identifier, resourceType string, oldTags, newTags any) error { - return updateTags(ctx, meta.(*conns.AWSClient).S3ControlClient(ctx), identifier, resourceType, oldTags, newTags) +func (p *servicePackage) UpdateTags(ctx context.Context, meta any, identifier string, oldTags, newTags any) error { + c := meta.(*conns.AWSClient) + return updateTags(ctx, c.S3ControlClient(ctx), identifier, c.AccountID(ctx), oldTags, newTags) } From 54d7683e3ef34a6646212dc89f0f242908462da5 Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 11:43:31 -0400 Subject: [PATCH 340/365] r/aws_s3control_access_grants_instance: We can now do full transparent tagging. --- .../s3control/access_grants_instance.go | 128 +++++++----------- .../s3control/access_grants_instance_test.go | 4 +- internal/service/s3control/exports_test.go | 2 +- .../service/s3control/service_package_gen.go | 6 +- 4 files changed, 56 insertions(+), 84 deletions(-) diff --git a/internal/service/s3control/access_grants_instance.go b/internal/service/s3control/access_grants_instance.go index 887f2046f79e..a71ea1d91f0d 100644 --- a/internal/service/s3control/access_grants_instance.go +++ b/internal/service/s3control/access_grants_instance.go @@ -20,7 +20,7 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" "github.com/hashicorp/terraform-provider-aws/internal/errs/fwdiag" "github.com/hashicorp/terraform-provider-aws/internal/framework" - "github.com/hashicorp/terraform-provider-aws/internal/framework/flex" + fwflex "github.com/hashicorp/terraform-provider-aws/internal/framework/flex" fwtypes "github.com/hashicorp/terraform-provider-aws/internal/framework/types" fwvalidators "github.com/hashicorp/terraform-provider-aws/internal/framework/validators" tftags "github.com/hashicorp/terraform-provider-aws/internal/tags" @@ -29,7 +29,7 @@ import ( ) // @FrameworkResource("aws_s3control_access_grants_instance", name="Access Grants Instance") -// @Tags +// @Tags(identifierAttribute="access_grants_instance_arn") func newAccessGrantsInstanceResource(context.Context) (resource.ResourceWithConfigure, error) { r := &accessGrantsInstanceResource{} @@ -85,59 +85,56 @@ func (r *accessGrantsInstanceResource) Schema(ctx context.Context, request resou func (r *accessGrantsInstanceResource) Create(ctx context.Context, request resource.CreateRequest, response *resource.CreateResponse) { var data accessGrantsInstanceResourceModel - response.Diagnostics.Append(request.Plan.Get(ctx, &data)...) - if response.Diagnostics.HasError() { return } + if data.AccountID.IsUnknown() { + data.AccountID = fwflex.StringValueToFramework(ctx, r.Meta().AccountID(ctx)) + } conn := r.Meta().S3ControlClient(ctx) - if data.AccountID.ValueString() == "" { - data.AccountID = types.StringValue(r.Meta().AccountID(ctx)) - } - input := &s3control.CreateAccessGrantsInstanceInput{ - AccountId: flex.StringFromFramework(ctx, data.AccountID), - IdentityCenterArn: flex.StringFromFramework(ctx, data.IdentityCenterARN), - Tags: getTagsIn(ctx), + accountID := fwflex.StringValueFromFramework(ctx, data.AccountID) + var input s3control.CreateAccessGrantsInstanceInput + response.Diagnostics.Append(fwflex.Expand(ctx, data, &input)...) + if response.Diagnostics.HasError() { + return } - output, err := conn.CreateAccessGrantsInstance(ctx, input) + // Additional fields. + input.Tags = getTagsIn(ctx) + + output, err := conn.CreateAccessGrantsInstance(ctx, &input) if err != nil { - response.Diagnostics.AddError(fmt.Sprintf("creating S3 Access Grants Instance (%s)", data.AccountID.ValueString()), err.Error()) + response.Diagnostics.AddError(fmt.Sprintf("creating S3 Access Grants Instance (%s)", accountID), err.Error()) return } // Set values for unknowns. - data.AccessGrantsInstanceARN = flex.StringToFramework(ctx, output.AccessGrantsInstanceArn) - data.AccessGrantsInstanceID = flex.StringToFramework(ctx, output.AccessGrantsInstanceId) - data.IdentityCenterApplicationARN = flex.StringToFramework(ctx, output.IdentityCenterArn) - data.setID() + response.Diagnostics.Append(fwflex.Flatten(ctx, output, &data)...) + if response.Diagnostics.HasError() { + return + } + data.ID = fwflex.StringValueToFramework(ctx, accountID) response.Diagnostics.Append(response.State.Set(ctx, &data)...) } func (r *accessGrantsInstanceResource) Read(ctx context.Context, request resource.ReadRequest, response *resource.ReadResponse) { var data accessGrantsInstanceResourceModel - response.Diagnostics.Append(request.State.Get(ctx, &data)...) - if response.Diagnostics.HasError() { return } - - if err := data.InitFromID(); err != nil { - response.Diagnostics.AddError("parsing resource ID", err.Error()) - - return - } + data.AccountID = data.ID // From import. conn := r.Meta().S3ControlClient(ctx) - output, err := findAccessGrantsInstance(ctx, conn, data.AccountID.ValueString()) + accountID := fwflex.StringValueFromFramework(ctx, data.AccountID) + output, err := findAccessGrantsInstanceByID(ctx, conn, accountID) if tfresource.NotFound(err) { response.Diagnostics.Append(fwdiag.NewResourceNotFoundWarningDiagnostic(err)) @@ -147,135 +144,118 @@ func (r *accessGrantsInstanceResource) Read(ctx context.Context, request resourc } if err != nil { - response.Diagnostics.AddError(fmt.Sprintf("reading S3 Access Grants Instance (%s)", data.ID.ValueString()), err.Error()) + response.Diagnostics.AddError(fmt.Sprintf("reading S3 Access Grants Instance (%s)", accountID), err.Error()) return } // Set attributes for import. - data.AccessGrantsInstanceARN = flex.StringToFramework(ctx, output.AccessGrantsInstanceArn) - data.AccessGrantsInstanceID = flex.StringToFramework(ctx, output.AccessGrantsInstanceId) - data.IdentityCenterApplicationARN = flex.StringToFramework(ctx, output.IdentityCenterArn) - - tags, err := listTags(ctx, conn, data.AccessGrantsInstanceARN.ValueString(), data.AccountID.ValueString()) - - if err != nil { - response.Diagnostics.AddError(fmt.Sprintf("listing tags for S3 Access Grants Instance (%s)", data.ID.ValueString()), err.Error()) - + response.Diagnostics.Append(fwflex.Flatten(ctx, output, &data)...) + if response.Diagnostics.HasError() { return } - setTagsOut(ctx, svcTags(tags)) - response.Diagnostics.Append(response.State.Set(ctx, &data)...) } func (r *accessGrantsInstanceResource) Update(ctx context.Context, request resource.UpdateRequest, response *resource.UpdateResponse) { var old, new accessGrantsInstanceResourceModel - response.Diagnostics.Append(request.State.Get(ctx, &old)...) - if response.Diagnostics.HasError() { return } - response.Diagnostics.Append(request.Plan.Get(ctx, &new)...) - if response.Diagnostics.HasError() { return } conn := r.Meta().S3ControlClient(ctx) - if oldARN, newARN := old.IdentityCenterARN, new.IdentityCenterARN; !newARN.Equal(oldARN) { + if accountID, oldARN, newARN := fwflex.StringValueFromFramework(ctx, new.AccountID), old.IdentityCenterARN, new.IdentityCenterARN; !newARN.Equal(oldARN) { if !oldARN.IsNull() { - if err := disassociateAccessGrantsInstanceIdentityCenterInstance(ctx, conn, old.ID.ValueString()); err != nil { - response.Diagnostics.AddError(fmt.Sprintf("dissociating S3 Access Grants Instance (%s) IAM Identity Center instance", old.ID.ValueString()), err.Error()) + if err := disassociateAccessGrantsInstanceIdentityCenterInstance(ctx, conn, accountID); err != nil { + response.Diagnostics.AddError(fmt.Sprintf("dissociating S3 Access Grants Instance (%s) IAM Identity Center instance", accountID), err.Error()) return } } if !newARN.IsNull() { - if err := associateAccessGrantsInstanceIdentityCenterInstance(ctx, conn, new.ID.ValueString(), newARN.ValueString()); err != nil { - response.Diagnostics.AddError(fmt.Sprintf("associating S3 Access Grants Instance (%s) IAM Identity Center instance (%s)", new.ID.ValueString(), newARN.ValueString()), err.Error()) + if err := associateAccessGrantsInstanceIdentityCenterInstance(ctx, conn, accountID, newARN.ValueString()); err != nil { + response.Diagnostics.AddError(fmt.Sprintf("associating S3 Access Grants Instance (%s) IAM Identity Center instance (%s)", accountID, newARN.ValueString()), err.Error()) return } } } - if oldTagsAll, newTagsAll := old.TagsAll, new.TagsAll; !newTagsAll.Equal(oldTagsAll) { - if err := updateTags(ctx, conn, new.AccessGrantsInstanceARN.ValueString(), new.AccountID.ValueString(), oldTagsAll, newTagsAll); err != nil { - response.Diagnostics.AddError(fmt.Sprintf("updating tags for S3 Access Grants Instance (%s)", new.ID.ValueString()), err.Error()) - - return - } - } - response.Diagnostics.Append(response.State.Set(ctx, &new)...) } func (r *accessGrantsInstanceResource) Delete(ctx context.Context, request resource.DeleteRequest, response *resource.DeleteResponse) { var data accessGrantsInstanceResourceModel - response.Diagnostics.Append(request.State.Get(ctx, &data)...) - if response.Diagnostics.HasError() { return } conn := r.Meta().S3ControlClient(ctx) + accountID := fwflex.StringValueFromFramework(ctx, data.AccountID) if !data.IdentityCenterARN.IsNull() { - if err := disassociateAccessGrantsInstanceIdentityCenterInstance(ctx, conn, data.ID.ValueString()); err != nil { - response.Diagnostics.AddError(fmt.Sprintf("dissociating S3 Access Grants Instance (%s) IAM Identity Center instance", data.ID.ValueString()), err.Error()) + if err := disassociateAccessGrantsInstanceIdentityCenterInstance(ctx, conn, accountID); err != nil { + response.Diagnostics.AddError(fmt.Sprintf("dissociating S3 Access Grants Instance (%s) IAM Identity Center instance", accountID), err.Error()) return } } - _, err := conn.DeleteAccessGrantsInstance(ctx, &s3control.DeleteAccessGrantsInstanceInput{ - AccountId: flex.StringFromFramework(ctx, data.AccountID), - }) + input := s3control.DeleteAccessGrantsInstanceInput{ + AccountId: aws.String(accountID), + } + _, err := conn.DeleteAccessGrantsInstance(ctx, &input) if tfawserr.ErrHTTPStatusCodeEquals(err, http.StatusNotFound) { return } if err != nil { - response.Diagnostics.AddError(fmt.Sprintf("deleting S3 Access Grants Instance (%s)", data.ID.ValueString()), err.Error()) + response.Diagnostics.AddError(fmt.Sprintf("deleting S3 Access Grants Instance (%s)", accountID), err.Error()) return } } func associateAccessGrantsInstanceIdentityCenterInstance(ctx context.Context, conn *s3control.Client, accountID, identityCenterARN string) error { - input := &s3control.AssociateAccessGrantsIdentityCenterInput{ + input := s3control.AssociateAccessGrantsIdentityCenterInput{ AccountId: aws.String(accountID), IdentityCenterArn: aws.String(identityCenterARN), } - _, err := conn.AssociateAccessGrantsIdentityCenter(ctx, input) + _, err := conn.AssociateAccessGrantsIdentityCenter(ctx, &input) return err } func disassociateAccessGrantsInstanceIdentityCenterInstance(ctx context.Context, conn *s3control.Client, accountID string) error { - input := &s3control.DissociateAccessGrantsIdentityCenterInput{ + input := s3control.DissociateAccessGrantsIdentityCenterInput{ AccountId: aws.String(accountID), } - _, err := conn.DissociateAccessGrantsIdentityCenter(ctx, input) + _, err := conn.DissociateAccessGrantsIdentityCenter(ctx, &input) return err } -func findAccessGrantsInstance(ctx context.Context, conn *s3control.Client, accountID string) (*s3control.GetAccessGrantsInstanceOutput, error) { - input := &s3control.GetAccessGrantsInstanceInput{ +func findAccessGrantsInstanceByID(ctx context.Context, conn *s3control.Client, accountID string) (*s3control.GetAccessGrantsInstanceOutput, error) { + input := s3control.GetAccessGrantsInstanceInput{ AccountId: aws.String(accountID), } + return findAccessGrantsInstance(ctx, conn, &input) +} + +func findAccessGrantsInstance(ctx context.Context, conn *s3control.Client, input *s3control.GetAccessGrantsInstanceInput) (*s3control.GetAccessGrantsInstanceOutput, error) { output, err := conn.GetAccessGrantsInstance(ctx, input) if tfawserr.ErrHTTPStatusCodeEquals(err, http.StatusNotFound) { @@ -307,13 +287,3 @@ type accessGrantsInstanceResourceModel struct { Tags tftags.Map `tfsdk:"tags"` TagsAll tftags.Map `tfsdk:"tags_all"` } - -func (data *accessGrantsInstanceResourceModel) InitFromID() error { - data.AccountID = data.ID - - return nil -} - -func (data *accessGrantsInstanceResourceModel) setID() { - data.ID = data.AccountID -} diff --git a/internal/service/s3control/access_grants_instance_test.go b/internal/service/s3control/access_grants_instance_test.go index 4c9b5e01d70b..c6aeec7441ad 100644 --- a/internal/service/s3control/access_grants_instance_test.go +++ b/internal/service/s3control/access_grants_instance_test.go @@ -167,7 +167,7 @@ func testAccCheckAccessGrantsInstanceDestroy(ctx context.Context) resource.TestC continue } - _, err := tfs3control.FindAccessGrantsInstance(ctx, conn, rs.Primary.ID) + _, err := tfs3control.FindAccessGrantsInstanceByID(ctx, conn, rs.Primary.ID) if tfresource.NotFound(err) { continue @@ -193,7 +193,7 @@ func testAccCheckAccessGrantsInstanceExists(ctx context.Context, n string) resou conn := acctest.Provider.Meta().(*conns.AWSClient).S3ControlClient(ctx) - _, err := tfs3control.FindAccessGrantsInstance(ctx, conn, rs.Primary.ID) + _, err := tfs3control.FindAccessGrantsInstanceByID(ctx, conn, rs.Primary.ID) return err } diff --git a/internal/service/s3control/exports_test.go b/internal/service/s3control/exports_test.go index 7782f7389234..2e6d46bda9d5 100644 --- a/internal/service/s3control/exports_test.go +++ b/internal/service/s3control/exports_test.go @@ -23,7 +23,7 @@ var ( ResourceStorageLensConfiguration = resourceStorageLensConfiguration FindAccessGrantByTwoPartKey = findAccessGrantByTwoPartKey - FindAccessGrantsInstance = findAccessGrantsInstance + FindAccessGrantsInstanceByID = findAccessGrantsInstanceByID FindAccessGrantsInstanceResourcePolicy = findAccessGrantsInstanceResourcePolicy FindAccessGrantsLocationByTwoPartKey = findAccessGrantsLocationByTwoPartKey FindAccessPointByTwoPartKey = findAccessPointByTwoPartKey diff --git a/internal/service/s3control/service_package_gen.go b/internal/service/s3control/service_package_gen.go index e16349456cd1..782d4177826a 100644 --- a/internal/service/s3control/service_package_gen.go +++ b/internal/service/s3control/service_package_gen.go @@ -42,8 +42,10 @@ func (p *servicePackage) FrameworkResources(ctx context.Context) []*inttypes.Ser Factory: newAccessGrantsInstanceResource, TypeName: "aws_s3control_access_grants_instance", Name: "Access Grants Instance", - Tags: unique.Make(inttypes.ServicePackageResourceTags{}), - Region: unique.Make(inttypes.ResourceRegionDefault()), + Tags: unique.Make(inttypes.ServicePackageResourceTags{ + IdentifierAttribute: "access_grants_instance_arn", + }), + Region: unique.Make(inttypes.ResourceRegionDefault()), }, { Factory: newAccessGrantsInstanceResourcePolicyResource, From d71ed1a55e892ce04559b21931fc335cc0cea183 Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 11:55:40 -0400 Subject: [PATCH 341/365] r/aws_s3control_access_grants_location: We can now do full transparent tagging. --- internal/errs/fwdiag/diags.go | 7 ++ .../s3control/access_grants_location.go | 74 +++++++------------ .../service/s3control/service_package_gen.go | 6 +- 3 files changed, 37 insertions(+), 50 deletions(-) diff --git a/internal/errs/fwdiag/diags.go b/internal/errs/fwdiag/diags.go index a98c9c32b954..7a09be2c7d73 100644 --- a/internal/errs/fwdiag/diags.go +++ b/internal/errs/fwdiag/diags.go @@ -38,6 +38,13 @@ func DiagnosticString(d diag.Diagnostic) string { return buf.String() } +func NewCreatingResourceIDErrorDiagnostic(err error) diag.Diagnostic { + return diag.NewErrorDiagnostic( + "Creating Resource ID", + err.Error(), + ) +} + func NewParsingResourceIDErrorDiagnostic(err error) diag.Diagnostic { return diag.NewErrorDiagnostic( "Parsing Resource ID", diff --git a/internal/service/s3control/access_grants_location.go b/internal/service/s3control/access_grants_location.go index 2fb2745d8d51..f363e2771381 100644 --- a/internal/service/s3control/access_grants_location.go +++ b/internal/service/s3control/access_grants_location.go @@ -30,7 +30,7 @@ import ( ) // @FrameworkResource("aws_s3control_access_grants_location", name="Access Grants Location") -// @Tags +// @Tags(identifierAttribute="access_grants_location_arn") func newAccessGrantsLocationResource(context.Context) (resource.ResourceWithConfigure, error) { r := &accessGrantsLocationResource{} @@ -71,13 +71,13 @@ func (r *accessGrantsLocationResource) Schema(ctx context.Context, request resou CustomType: fwtypes.ARNType, Required: true, }, + names.AttrID: framework.IDAttribute(), "location_scope": schema.StringAttribute{ Required: true, PlanModifiers: []planmodifier.String{ stringplanmodifier.RequiresReplace(), }, }, - names.AttrID: framework.IDAttribute(), names.AttrTags: tftags.TagsAttribute(), names.AttrTagsAll: tftags.TagsAttributeComputedOnly(), }, @@ -86,28 +86,27 @@ func (r *accessGrantsLocationResource) Schema(ctx context.Context, request resou func (r *accessGrantsLocationResource) Create(ctx context.Context, request resource.CreateRequest, response *resource.CreateResponse) { var data accessGrantsLocationResourceModel - response.Diagnostics.Append(request.Plan.Get(ctx, &data)...) - if response.Diagnostics.HasError() { return } + if data.AccountID.IsUnknown() { + data.AccountID = fwflex.StringValueToFramework(ctx, r.Meta().AccountID(ctx)) + } conn := r.Meta().S3ControlClient(ctx) - if data.AccountID.ValueString() == "" { - data.AccountID = types.StringValue(r.Meta().AccountID(ctx)) - } - input := &s3control.CreateAccessGrantsLocationInput{} - response.Diagnostics.Append(fwflex.Expand(ctx, data, input)...) + var input s3control.CreateAccessGrantsLocationInput + response.Diagnostics.Append(fwflex.Expand(ctx, data, &input)...) if response.Diagnostics.HasError() { return } + // Additional fields. input.Tags = getTagsIn(ctx) outputRaw, err := tfresource.RetryWhenAWSErrCodeEquals(ctx, s3PropagationTimeout, func() (any, error) { - return conn.CreateAccessGrantsLocation(ctx, input) + return conn.CreateAccessGrantsLocation(ctx, &input) }, errCodeInvalidIAMRole) if err != nil { @@ -118,29 +117,29 @@ func (r *accessGrantsLocationResource) Create(ctx context.Context, request resou // Set values for unknowns. output := outputRaw.(*s3control.CreateAccessGrantsLocationOutput) - data.AccessGrantsLocationARN = fwflex.StringToFramework(ctx, output.AccessGrantsLocationArn) - data.AccessGrantsLocationID = fwflex.StringToFramework(ctx, output.AccessGrantsLocationId) + response.Diagnostics.Append(fwflex.Flatten(ctx, output, &data)...) + if response.Diagnostics.HasError() { + return + } id, err := data.setID() if err != nil { - response.Diagnostics.AddError(fmt.Sprintf("creating S3 Access Grants Location (%s)", data.LocationScope.ValueString()), err.Error()) + response.Diagnostics.Append(fwdiag.NewCreatingResourceIDErrorDiagnostic(err)) return } - data.ID = types.StringValue(id) + data.ID = fwflex.StringValueToFramework(ctx, id) response.Diagnostics.Append(response.State.Set(ctx, &data)...) } func (r *accessGrantsLocationResource) Read(ctx context.Context, request resource.ReadRequest, response *resource.ReadResponse) { var data accessGrantsLocationResourceModel - response.Diagnostics.Append(request.State.Get(ctx, &data)...) - if response.Diagnostics.HasError() { return } if err := data.InitFromID(); err != nil { - response.Diagnostics.AddError("parsing resource ID", err.Error()) + response.Diagnostics.Append(fwdiag.NewParsingResourceIDErrorDiagnostic(err)) return } @@ -168,30 +167,16 @@ func (r *accessGrantsLocationResource) Read(ctx context.Context, request resourc return } - tags, err := listTags(ctx, conn, data.AccessGrantsLocationARN.ValueString(), data.AccountID.ValueString()) - - if err != nil { - response.Diagnostics.AddError(fmt.Sprintf("listing tags for S3 Access Grants Location (%s)", data.ID.ValueString()), err.Error()) - - return - } - - setTagsOut(ctx, svcTags(tags)) - response.Diagnostics.Append(response.State.Set(ctx, &data)...) } func (r *accessGrantsLocationResource) Update(ctx context.Context, request resource.UpdateRequest, response *resource.UpdateResponse) { var old, new accessGrantsLocationResourceModel - response.Diagnostics.Append(request.State.Get(ctx, &old)...) - if response.Diagnostics.HasError() { return } - response.Diagnostics.Append(request.Plan.Get(ctx, &new)...) - if response.Diagnostics.HasError() { return } @@ -199,14 +184,14 @@ func (r *accessGrantsLocationResource) Update(ctx context.Context, request resou conn := r.Meta().S3ControlClient(ctx) if !new.IAMRoleARN.Equal(old.IAMRoleARN) { - input := &s3control.UpdateAccessGrantsLocationInput{} - response.Diagnostics.Append(fwflex.Expand(ctx, new, input)...) + var input s3control.UpdateAccessGrantsLocationInput + response.Diagnostics.Append(fwflex.Expand(ctx, new, &input)...) if response.Diagnostics.HasError() { return } _, err := tfresource.RetryWhenAWSErrCodeEquals(ctx, s3PropagationTimeout, func() (any, error) { - return conn.UpdateAccessGrantsLocation(ctx, input) + return conn.UpdateAccessGrantsLocation(ctx, &input) }, errCodeInvalidIAMRole) if err != nil { @@ -216,36 +201,25 @@ func (r *accessGrantsLocationResource) Update(ctx context.Context, request resou } } - if oldTagsAll, newTagsAll := old.TagsAll, new.TagsAll; !newTagsAll.Equal(oldTagsAll) { - if err := updateTags(ctx, conn, new.AccessGrantsLocationARN.ValueString(), new.AccountID.ValueString(), oldTagsAll, newTagsAll); err != nil { - response.Diagnostics.AddError(fmt.Sprintf("updating tags for S3 Access Grants Location (%s)", new.ID.ValueString()), err.Error()) - - return - } - } - response.Diagnostics.Append(response.State.Set(ctx, &new)...) } func (r *accessGrantsLocationResource) Delete(ctx context.Context, request resource.DeleteRequest, response *resource.DeleteResponse) { var data accessGrantsLocationResourceModel - response.Diagnostics.Append(request.State.Get(ctx, &data)...) - if response.Diagnostics.HasError() { return } conn := r.Meta().S3ControlClient(ctx) - input := &s3control.DeleteAccessGrantsLocationInput{ + input := s3control.DeleteAccessGrantsLocationInput{ AccessGrantsLocationId: fwflex.StringFromFramework(ctx, data.AccessGrantsLocationID), AccountId: fwflex.StringFromFramework(ctx, data.AccountID), } - // "AccessGrantsLocationNotEmptyError: Please delete access grants before deleting access grants location". _, err := tfresource.RetryWhenAWSErrCodeEquals(ctx, s3PropagationTimeout, func() (any, error) { - return conn.DeleteAccessGrantsLocation(ctx, input) + return conn.DeleteAccessGrantsLocation(ctx, &input) }, errCodeAccessGrantsLocationNotEmptyError) if tfawserr.ErrHTTPStatusCodeEquals(err, http.StatusNotFound) { @@ -260,11 +234,15 @@ func (r *accessGrantsLocationResource) Delete(ctx context.Context, request resou } func findAccessGrantsLocationByTwoPartKey(ctx context.Context, conn *s3control.Client, accountID, locationID string) (*s3control.GetAccessGrantsLocationOutput, error) { - input := &s3control.GetAccessGrantsLocationInput{ + input := s3control.GetAccessGrantsLocationInput{ AccessGrantsLocationId: aws.String(locationID), AccountId: aws.String(accountID), } + return findAccessGrantsLocation(ctx, conn, &input) +} + +func findAccessGrantsLocation(ctx context.Context, conn *s3control.Client, input *s3control.GetAccessGrantsLocationInput) (*s3control.GetAccessGrantsLocationOutput, error) { output, err := conn.GetAccessGrantsLocation(ctx, input) if tfawserr.ErrHTTPStatusCodeEquals(err, http.StatusNotFound) { diff --git a/internal/service/s3control/service_package_gen.go b/internal/service/s3control/service_package_gen.go index 782d4177826a..9f2e7075504f 100644 --- a/internal/service/s3control/service_package_gen.go +++ b/internal/service/s3control/service_package_gen.go @@ -57,8 +57,10 @@ func (p *servicePackage) FrameworkResources(ctx context.Context) []*inttypes.Ser Factory: newAccessGrantsLocationResource, TypeName: "aws_s3control_access_grants_location", Name: "Access Grants Location", - Tags: unique.Make(inttypes.ServicePackageResourceTags{}), - Region: unique.Make(inttypes.ResourceRegionDefault()), + Tags: unique.Make(inttypes.ServicePackageResourceTags{ + IdentifierAttribute: "access_grants_location_arn", + }), + Region: unique.Make(inttypes.ResourceRegionDefault()), }, { Factory: newDirectoryBucketAccessPointScopeResource, From a650aa04abda4bbeb276cb543674330a2f9dea6a Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 12:08:18 -0400 Subject: [PATCH 342/365] r/aws_s3control_access_grant: We can now do full transparent tagging. --- internal/service/s3control/access_grant.go | 85 ++++++------------- .../service/s3control/service_package_gen.go | 6 +- 2 files changed, 28 insertions(+), 63 deletions(-) diff --git a/internal/service/s3control/access_grant.go b/internal/service/s3control/access_grant.go index 29a955167dbc..2465dc2defdc 100644 --- a/internal/service/s3control/access_grant.go +++ b/internal/service/s3control/access_grant.go @@ -33,7 +33,7 @@ import ( ) // @FrameworkResource("aws_s3control_access_grant", name="Access Grant") -// @Tags +// @Tags(identifierAttribute="access_grant_arn") func newAccessGrantResource(context.Context) (resource.ResourceWithConfigure, error) { r := &accessGrantResource{} @@ -82,6 +82,7 @@ func (r *accessGrantResource) Schema(ctx context.Context, request resource.Schem stringplanmodifier.UseStateForUnknown(), }, }, + names.AttrID: framework.IDAttribute(), "permission": schema.StringAttribute{ CustomType: fwtypes.StringEnumType[awstypes.Permission](), Required: true, @@ -89,7 +90,6 @@ func (r *accessGrantResource) Schema(ctx context.Context, request resource.Schem stringplanmodifier.RequiresReplace(), }, }, - names.AttrID: framework.IDAttribute(), "s3_prefix_type": schema.StringAttribute{ CustomType: fwtypes.StringEnumType[awstypes.S3PrefixType](), Optional: true, @@ -153,29 +153,28 @@ func (r *accessGrantResource) Schema(ctx context.Context, request resource.Schem func (r *accessGrantResource) Create(ctx context.Context, request resource.CreateRequest, response *resource.CreateResponse) { var data accessGrantResourceModel - response.Diagnostics.Append(request.Plan.Get(ctx, &data)...) - if response.Diagnostics.HasError() { return } + if data.AccountID.IsUnknown() { + data.AccountID = fwflex.StringValueToFramework(ctx, r.Meta().AccountID(ctx)) + } conn := r.Meta().S3ControlClient(ctx) - if data.AccountID.ValueString() == "" { - data.AccountID = types.StringValue(r.Meta().AccountID(ctx)) - } - input := &s3control.CreateAccessGrantInput{} - response.Diagnostics.Append(fwflex.Expand(ctx, data, input)...) + var input s3control.CreateAccessGrantInput + response.Diagnostics.Append(fwflex.Expand(ctx, data, &input)...) if response.Diagnostics.HasError() { return } + // Additional fields. input.Tags = getTagsIn(ctx) // "InvalidRequest: Invalid Grantee in the request". outputRaw, err := tfresource.RetryWhenAWSErrMessageContains(ctx, s3PropagationTimeout, func() (any, error) { - return conn.CreateAccessGrant(ctx, input) + return conn.CreateAccessGrant(ctx, &input) }, errCodeInvalidRequest, "Invalid Grantee in the request") if err != nil { @@ -186,30 +185,29 @@ func (r *accessGrantResource) Create(ctx context.Context, request resource.Creat // Set values for unknowns. output := outputRaw.(*s3control.CreateAccessGrantOutput) - data.AccessGrantARN = fwflex.StringToFramework(ctx, output.AccessGrantArn) - data.AccessGrantID = fwflex.StringToFramework(ctx, output.AccessGrantId) - data.GrantScope = fwflex.StringToFramework(ctx, output.GrantScope) + response.Diagnostics.Append(fwflex.Flatten(ctx, output, &data)...) + if response.Diagnostics.HasError() { + return + } id, err := data.setID() if err != nil { - response.Diagnostics.AddError("creating S3 Access Grant", err.Error()) + response.Diagnostics.Append(fwdiag.NewCreatingResourceIDErrorDiagnostic(err)) return } - data.ID = types.StringValue(id) + data.ID = fwflex.StringValueToFramework(ctx, id) response.Diagnostics.Append(response.State.Set(ctx, &data)...) } func (r *accessGrantResource) Read(ctx context.Context, request resource.ReadRequest, response *resource.ReadResponse) { var data accessGrantResourceModel - response.Diagnostics.Append(request.State.Get(ctx, &data)...) - if response.Diagnostics.HasError() { return } if err := data.InitFromID(); err != nil { - response.Diagnostics.AddError("parsing resource ID", err.Error()) + response.Diagnostics.Append(fwdiag.NewParsingResourceIDErrorDiagnostic(err)) return } @@ -241,62 +239,23 @@ func (r *accessGrantResource) Read(ctx context.Context, request resource.ReadReq return } - tags, err := listTags(ctx, conn, data.AccessGrantARN.ValueString(), data.AccountID.ValueString()) - - if err != nil { - response.Diagnostics.AddError(fmt.Sprintf("listing tags for S3 Access Grant (%s)", data.ID.ValueString()), err.Error()) - - return - } - - setTagsOut(ctx, svcTags(tags)) - response.Diagnostics.Append(response.State.Set(ctx, &data)...) } -func (r *accessGrantResource) Update(ctx context.Context, request resource.UpdateRequest, response *resource.UpdateResponse) { - var old, new accessGrantResourceModel - - response.Diagnostics.Append(request.State.Get(ctx, &old)...) - - if response.Diagnostics.HasError() { - return - } - - response.Diagnostics.Append(request.Plan.Get(ctx, &new)...) - - if response.Diagnostics.HasError() { - return - } - - conn := r.Meta().S3ControlClient(ctx) - - if oldTagsAll, newTagsAll := old.TagsAll, new.TagsAll; !newTagsAll.Equal(oldTagsAll) { - if err := updateTags(ctx, conn, new.AccessGrantARN.ValueString(), new.AccountID.ValueString(), oldTagsAll, newTagsAll); err != nil { - response.Diagnostics.AddError(fmt.Sprintf("updating tags for S3 Access Grant (%s)", new.ID.ValueString()), err.Error()) - - return - } - } - - response.Diagnostics.Append(response.State.Set(ctx, &new)...) -} - func (r *accessGrantResource) Delete(ctx context.Context, request resource.DeleteRequest, response *resource.DeleteResponse) { var data accessGrantResourceModel - response.Diagnostics.Append(request.State.Get(ctx, &data)...) - if response.Diagnostics.HasError() { return } conn := r.Meta().S3ControlClient(ctx) - _, err := conn.DeleteAccessGrant(ctx, &s3control.DeleteAccessGrantInput{ + input := s3control.DeleteAccessGrantInput{ AccessGrantId: fwflex.StringFromFramework(ctx, data.AccessGrantID), AccountId: fwflex.StringFromFramework(ctx, data.AccountID), - }) + } + _, err := conn.DeleteAccessGrant(ctx, &input) if tfawserr.ErrHTTPStatusCodeEquals(err, http.StatusNotFound) { return @@ -310,11 +269,15 @@ func (r *accessGrantResource) Delete(ctx context.Context, request resource.Delet } func findAccessGrantByTwoPartKey(ctx context.Context, conn *s3control.Client, accountID, grantID string) (*s3control.GetAccessGrantOutput, error) { - input := &s3control.GetAccessGrantInput{ + input := s3control.GetAccessGrantInput{ AccessGrantId: aws.String(grantID), AccountId: aws.String(accountID), } + return findAccessGrant(ctx, conn, &input) +} + +func findAccessGrant(ctx context.Context, conn *s3control.Client, input *s3control.GetAccessGrantInput) (*s3control.GetAccessGrantOutput, error) { output, err := conn.GetAccessGrant(ctx, input) if tfawserr.ErrHTTPStatusCodeEquals(err, http.StatusNotFound) { diff --git a/internal/service/s3control/service_package_gen.go b/internal/service/s3control/service_package_gen.go index 9f2e7075504f..463e508b3ce4 100644 --- a/internal/service/s3control/service_package_gen.go +++ b/internal/service/s3control/service_package_gen.go @@ -35,8 +35,10 @@ func (p *servicePackage) FrameworkResources(ctx context.Context) []*inttypes.Ser Factory: newAccessGrantResource, TypeName: "aws_s3control_access_grant", Name: "Access Grant", - Tags: unique.Make(inttypes.ServicePackageResourceTags{}), - Region: unique.Make(inttypes.ResourceRegionDefault()), + Tags: unique.Make(inttypes.ServicePackageResourceTags{ + IdentifierAttribute: "access_grant_arn", + }), + Region: unique.Make(inttypes.ResourceRegionDefault()), }, { Factory: newAccessGrantsInstanceResource, From 7322faa47dbb4f63710ad254da5cb6d1cb855acb Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 12:27:18 -0400 Subject: [PATCH 343/365] s3: Tidy up 'tags.go'. --- internal/service/s3/tags.go | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/internal/service/s3/tags.go b/internal/service/s3/tags.go index 990c560aa6fc..94da8d8de8d8 100644 --- a/internal/service/s3/tags.go +++ b/internal/service/s3/tags.go @@ -36,11 +36,11 @@ func bucketCreateTags(ctx context.Context, conn *s3.Client, identifier string, t // bucketListTags lists S3 bucket tags. // The identifier is the bucket name. func bucketListTags(ctx context.Context, conn *s3.Client, identifier string, optFns ...func(*s3.Options)) (tftags.KeyValueTags, error) { - input := &s3.GetBucketTaggingInput{ + input := s3.GetBucketTaggingInput{ Bucket: aws.String(identifier), } - output, err := conn.GetBucketTagging(ctx, input, optFns...) + output, err := conn.GetBucketTagging(ctx, &input, optFns...) if tfawserr.ErrCodeEquals(err, errCodeNoSuchTagSet, errCodeNoSuchTagSetError, errCodeMethodNotAllowed, errCodeNotImplemented, errCodeXNotImplemented, errCodeUnsupportedOperation) { return tftags.New(ctx, nil), nil @@ -68,24 +68,24 @@ func bucketUpdateTags(ctx context.Context, conn *s3.Client, identifier string, o ignoredTags := allTags.Ignore(oldTags).Ignore(newTags) if len(newTags)+len(ignoredTags) > 0 { - input := &s3.PutBucketTaggingInput{ + input := s3.PutBucketTaggingInput{ Bucket: aws.String(identifier), Tagging: &awstypes.Tagging{ TagSet: svcTags(newTags.Merge(ignoredTags)), }, } - _, err := conn.PutBucketTagging(ctx, input, optFns...) + _, err := conn.PutBucketTagging(ctx, &input, optFns...) if err != nil { return fmt.Errorf("setting resource tags (%s): %w", identifier, err) } } else if len(oldTags) > 0 && len(ignoredTags) == 0 { - input := &s3.DeleteBucketTaggingInput{ + input := s3.DeleteBucketTaggingInput{ Bucket: aws.String(identifier), } - _, err := conn.DeleteBucketTagging(ctx, input, optFns...) + _, err := conn.DeleteBucketTagging(ctx, &input, optFns...) if err != nil { return fmt.Errorf("deleting resource tags (%s): %w", identifier, err) @@ -97,12 +97,12 @@ func bucketUpdateTags(ctx context.Context, conn *s3.Client, identifier string, o // objectListTags lists S3 object tags. func objectListTags(ctx context.Context, conn *s3.Client, bucket, key string, optFns ...func(*s3.Options)) (tftags.KeyValueTags, error) { - input := &s3.GetObjectTaggingInput{ + input := s3.GetObjectTaggingInput{ Bucket: aws.String(bucket), Key: aws.String(key), } - output, err := conn.GetObjectTagging(ctx, input, optFns...) + output, err := conn.GetObjectTagging(ctx, &input, optFns...) if tfawserr.ErrCodeEquals(err, errCodeNoSuchTagSet, errCodeNoSuchTagSetError) { return tftags.New(ctx, nil), nil @@ -134,7 +134,7 @@ func objectUpdateTags(ctx context.Context, conn *s3.Client, bucket, key string, ignoredTags := allTags.Ignore(oldTags).Ignore(newTags) if len(newTags)+len(ignoredTags) > 0 { - input := &s3.PutObjectTaggingInput{ + input := s3.PutObjectTaggingInput{ Bucket: aws.String(bucket), Key: aws.String(key), Tagging: &awstypes.Tagging{ @@ -142,18 +142,18 @@ func objectUpdateTags(ctx context.Context, conn *s3.Client, bucket, key string, }, } - _, err := conn.PutObjectTagging(ctx, input, optFns...) + _, err := conn.PutObjectTagging(ctx, &input, optFns...) if err != nil { return fmt.Errorf("setting resource tags (%s/%s): %w", bucket, key, err) } } else if len(oldTags) > 0 && len(ignoredTags) == 0 { - input := &s3.DeleteObjectTaggingInput{ + input := s3.DeleteObjectTaggingInput{ Bucket: aws.String(bucket), Key: aws.String(key), } - _, err := conn.DeleteObjectTagging(ctx, input, optFns...) + _, err := conn.DeleteObjectTagging(ctx, &input, optFns...) if err != nil { return fmt.Errorf("deleting resource tags (%s/%s): %w", bucket, key, err) From 0e2c69dd0a898765e7eae845e75a6eec749d61ae Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 12:28:19 -0400 Subject: [PATCH 344/365] r/aws_s3control_bucket: Move tagging functions into 's3_tags.go'. --- internal/service/s3control/bucket.go | 88 +--------------------- internal/service/s3control/s3_tags.go | 104 ++++++++++++++++++++++++++ 2 files changed, 106 insertions(+), 86 deletions(-) create mode 100644 internal/service/s3control/s3_tags.go diff --git a/internal/service/s3control/bucket.go b/internal/service/s3control/bucket.go index ef66af58e1d6..e3df9434bb6e 100644 --- a/internal/service/s3control/bucket.go +++ b/internal/service/s3control/bucket.go @@ -5,7 +5,6 @@ package s3control import ( "context" - "fmt" "log" "strings" "time" @@ -14,7 +13,6 @@ import ( "github.com/aws/aws-sdk-go-v2/aws" "github.com/aws/aws-sdk-go-v2/aws/arn" "github.com/aws/aws-sdk-go-v2/service/s3control" - "github.com/aws/aws-sdk-go-v2/service/s3control/types" "github.com/hashicorp/aws-sdk-go-base/v2/tfawserr" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" @@ -99,10 +97,8 @@ func resourceBucketCreate(ctx context.Context, d *schema.ResourceData, meta any) d.SetId(aws.ToString(output.BucketArn)) - if tags := keyValueTagsFromS3Tags(ctx, getS3TagsIn(ctx)); len(tags) > 0 { - if err := bucketUpdateTags(ctx, conn, d.Id(), nil, tags); err != nil { - return sdkdiag.AppendErrorf(diags, "adding S3 Control Bucket (%s) tags: %s", d.Id(), err) - } + if err := bucketCreateTags(ctx, conn, d.Id(), getS3TagsIn(ctx)); err != nil { + return sdkdiag.AppendErrorf(diags, "setting S3 Control Bucket (%s) tags: %s", d.Id(), err) } return append(diags, resourceBucketRead(ctx, d, meta)...) @@ -230,83 +226,3 @@ func findBucketByTwoPartKey(ctx context.Context, conn *s3control.Client, account return output, nil } - -// Custom S3control tagging functions using similar formatting as other service generated code. - -// bucketListTags lists S3control bucket tags. -// The identifier is the bucket ARN. -func bucketListTags(ctx context.Context, conn *s3control.Client, identifier string) (tftags.KeyValueTags, error) { - parsedArn, err := arn.Parse(identifier) - - if err != nil { - return tftags.New(ctx, nil), err - } - - input := &s3control.GetBucketTaggingInput{ - AccountId: aws.String(parsedArn.AccountID), - Bucket: aws.String(identifier), - } - - output, err := conn.GetBucketTagging(ctx, input) - - if tfawserr.ErrCodeEquals(err, errCodeNoSuchTagSet) { - return tftags.New(ctx, nil), nil - } - - if err != nil { - return tftags.New(ctx, nil), err - } - - return keyValueTagsFromS3Tags(ctx, output.TagSet), nil -} - -// bucketUpdateTags updates S3control bucket tags. -// The identifier is the bucket ARN. -func bucketUpdateTags(ctx context.Context, conn *s3control.Client, identifier string, oldTagsMap, newTagsMap any) error { - parsedArn, err := arn.Parse(identifier) - - if err != nil { - return err - } - - oldTags := tftags.New(ctx, oldTagsMap) - newTags := tftags.New(ctx, newTagsMap) - - // We need to also consider any existing ignored tags. - allTags, err := bucketListTags(ctx, conn, identifier) - - if err != nil { - return fmt.Errorf("listing resource tags (%s): %w", identifier, err) - } - - ignoredTags := allTags.Ignore(oldTags).Ignore(newTags) - - if len(newTags)+len(ignoredTags) > 0 { - input := &s3control.PutBucketTaggingInput{ - AccountId: aws.String(parsedArn.AccountID), - Bucket: aws.String(identifier), - Tagging: &types.Tagging{ - TagSet: svcS3Tags(newTags.Merge(ignoredTags)), - }, - } - - _, err := conn.PutBucketTagging(ctx, input) - - if err != nil { - return fmt.Errorf("setting resource tags (%s): %s", identifier, err) - } - } else if len(oldTags) > 0 && len(ignoredTags) == 0 { - input := &s3control.DeleteBucketTaggingInput{ - AccountId: aws.String(parsedArn.AccountID), - Bucket: aws.String(identifier), - } - - _, err := conn.DeleteBucketTagging(ctx, input) - - if err != nil { - return fmt.Errorf("deleting resource tags (%s): %s", identifier, err) - } - } - - return nil -} diff --git a/internal/service/s3control/s3_tags.go b/internal/service/s3control/s3_tags.go new file mode 100644 index 000000000000..367d59d88eff --- /dev/null +++ b/internal/service/s3control/s3_tags.go @@ -0,0 +1,104 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +package s3control + +import ( + "context" + "fmt" + + "github.com/aws/aws-sdk-go-v2/aws" + "github.com/aws/aws-sdk-go-v2/aws/arn" + "github.com/aws/aws-sdk-go-v2/service/s3control" + awstypes "github.com/aws/aws-sdk-go-v2/service/s3control/types" + "github.com/hashicorp/aws-sdk-go-base/v2/tfawserr" + tftags "github.com/hashicorp/terraform-provider-aws/internal/tags" +) + +// Custom S3 tag functions using the same format as generated code. + +func bucketCreateTags(ctx context.Context, conn *s3control.Client, identifier string, tags []awstypes.S3Tag) error { + if len(tags) == 0 { + return nil + } + + return bucketUpdateTags(ctx, conn, identifier, nil, keyValueTagsFromS3Tags(ctx, tags)) +} + +// bucketListTags lists S3control bucket tags. +// The identifier is the bucket ARN. +func bucketListTags(ctx context.Context, conn *s3control.Client, identifier string, optFns ...func(*s3control.Options)) (tftags.KeyValueTags, error) { + parsedArn, err := arn.Parse(identifier) + + if err != nil { + return tftags.New(ctx, nil), err + } + + input := s3control.GetBucketTaggingInput{ + AccountId: aws.String(parsedArn.AccountID), + Bucket: aws.String(identifier), + } + + output, err := conn.GetBucketTagging(ctx, &input, optFns...) + + if tfawserr.ErrCodeEquals(err, errCodeNoSuchTagSet) { + return tftags.New(ctx, nil), nil + } + + if err != nil { + return tftags.New(ctx, nil), err + } + + return keyValueTagsFromS3Tags(ctx, output.TagSet), nil +} + +// bucketUpdateTags updates S3control bucket tags. +// The identifier is the bucket ARN. +func bucketUpdateTags(ctx context.Context, conn *s3control.Client, identifier string, oldTagsMap, newTagsMap any, optFns ...func(*s3control.Options)) error { + parsedArn, err := arn.Parse(identifier) + + if err != nil { + return err + } + + oldTags := tftags.New(ctx, oldTagsMap) + newTags := tftags.New(ctx, newTagsMap) + + // We need to also consider any existing ignored tags. + allTags, err := bucketListTags(ctx, conn, identifier) + + if err != nil { + return fmt.Errorf("listing resource tags (%s): %w", identifier, err) + } + + ignoredTags := allTags.Ignore(oldTags).Ignore(newTags) + + if len(newTags)+len(ignoredTags) > 0 { + input := s3control.PutBucketTaggingInput{ + AccountId: aws.String(parsedArn.AccountID), + Bucket: aws.String(identifier), + Tagging: &awstypes.Tagging{ + TagSet: svcS3Tags(newTags.Merge(ignoredTags)), + }, + } + + _, err := conn.PutBucketTagging(ctx, &input, optFns...) + + if err != nil { + return fmt.Errorf("setting resource tags (%s): %s", identifier, err) + } + } else if len(oldTags) > 0 && len(ignoredTags) == 0 { + input := s3control.DeleteBucketTaggingInput{ + AccountId: aws.String(parsedArn.AccountID), + Bucket: aws.String(identifier), + } + + _, err := conn.DeleteBucketTagging(ctx, &input, optFns...) + + if err != nil { + return fmt.Errorf("deleting resource tags (%s): %s", identifier, err) + } + } + + return nil +} From 0ee54967ba250bacc28e62669b20936436b5520e Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 31 Jul 2025 12:52:38 -0400 Subject: [PATCH 345/365] r/aws_s3_access_grants_instance: For backwards compatibility, don't use AutoFlEx on Read. --- .../service/s3control/access_grants_instance.go | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/internal/service/s3control/access_grants_instance.go b/internal/service/s3control/access_grants_instance.go index a71ea1d91f0d..0142a4480a42 100644 --- a/internal/service/s3control/access_grants_instance.go +++ b/internal/service/s3control/access_grants_instance.go @@ -114,11 +114,11 @@ func (r *accessGrantsInstanceResource) Create(ctx context.Context, request resou } // Set values for unknowns. - response.Diagnostics.Append(fwflex.Flatten(ctx, output, &data)...) - if response.Diagnostics.HasError() { - return - } data.ID = fwflex.StringValueToFramework(ctx, accountID) + // Backwards compatibility, don't use AutoFlEx. + data.AccessGrantsInstanceARN = fwflex.StringToFramework(ctx, output.AccessGrantsInstanceArn) + data.AccessGrantsInstanceID = fwflex.StringToFramework(ctx, output.AccessGrantsInstanceId) + data.IdentityCenterApplicationARN = fwflex.StringToFramework(ctx, output.IdentityCenterArn) response.Diagnostics.Append(response.State.Set(ctx, &data)...) } @@ -150,10 +150,10 @@ func (r *accessGrantsInstanceResource) Read(ctx context.Context, request resourc } // Set attributes for import. - response.Diagnostics.Append(fwflex.Flatten(ctx, output, &data)...) - if response.Diagnostics.HasError() { - return - } + // Backwards compatibility, don't use AutoFlEx. + data.AccessGrantsInstanceARN = fwflex.StringToFramework(ctx, output.AccessGrantsInstanceArn) + data.AccessGrantsInstanceID = fwflex.StringToFramework(ctx, output.AccessGrantsInstanceId) + data.IdentityCenterApplicationARN = fwflex.StringToFramework(ctx, output.IdentityCenterArn) response.Diagnostics.Append(response.State.Set(ctx, &data)...) } From 7e9cc3c90afcc2e4c62677d71798ce1d09fceea4 Mon Sep 17 00:00:00 2001 From: changelogbot Date: Thu, 31 Jul 2025 17:36:00 +0000 Subject: [PATCH 346/365] Update CHANGELOG.md for #43622 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4e3536a5018a..7da2c4085d0b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,7 @@ ENHANCEMENTS: * data-source/aws_ecs_service: Support `load_balancer` attribute ([#43582](https://github.com/hashicorp/terraform-provider-aws/issues/43582)) * data-source/aws_verifiedpermissions_policy_store: Add `deletion_protection` attribute ([#43452](https://github.com/hashicorp/terraform-provider-aws/issues/43452)) * resource/aws_athena_workgroup: Add `configuration.identity_center_configuration` argument ([#38717](https://github.com/hashicorp/terraform-provider-aws/issues/38717)) +* resource/aws_cleanrooms_collaboration: Add `analytics_engine` argument ([#43614](https://github.com/hashicorp/terraform-provider-aws/issues/43614)) * resource/aws_codebuild_fleet: Add `instance_type` argument in `compute_configuration` block to support custom instance types ([#43449](https://github.com/hashicorp/terraform-provider-aws/issues/43449)) * resource/aws_ebs_volume: Add `volume_initialization_rate` argument ([#43565](https://github.com/hashicorp/terraform-provider-aws/issues/43565)) * resource/aws_verifiedpermissions_policy_store: Add `deletion_protection` argument ([#43452](https://github.com/hashicorp/terraform-provider-aws/issues/43452)) From 237bf404e71354760a0d75159c81137e2f5f8f3b Mon Sep 17 00:00:00 2001 From: Asim Date: Mon, 14 Jul 2025 10:52:39 +0100 Subject: [PATCH 347/365] exa-infra added --- .ci/.semgrep-service-name0.yml | 15 + .ci/.semgrep-service-name1.yml | 33 +- .ci/.semgrep-service-name2.yml | 93 +- .ci/.semgrep-service-name3.yml | 14 + .github/labeler-issue-triage.yml | 2 + .github/labeler-pr-triage.yml | 6 + .../components/generated/services_all.kt | 1 + infrastructure/repository/labels-service.tf | 1 + internal/conns/awsclient_gen.go | 5 + internal/provider/framework/provider_gen.go | 7 + internal/provider/sdkv2/provider_gen.go | 8 + .../provider/sdkv2/service_packages_gen.go | 2 + .../odb/cloud_exadata_infrastructure.go | 893 ++++++++++++++++++ .../odb/cloud_exadata_infrastructure_test.go | 273 ++++++ internal/service/odb/generate.go | 7 + .../odb/service_endpoint_resolver_gen.go | 82 ++ .../service/odb/service_endpoints_gen_test.go | 602 ++++++++++++ internal/service/odb/service_package.go | 30 + internal/service/odb/service_package_gen.go | 48 + internal/service/odb/tags_gen.go | 128 +++ internal/sweep/service_packages_gen_test.go | 2 + names/consts_gen.go | 2 + names/data/names_data.hcl | 29 + website/allowed-subcategories.txt | 1 + .../custom-service-endpoints.html.markdown | 1 + ...cloud_exadata_infrastructure.html.markdown | 72 ++ website/docs/r/odb_exa_infra.html.markdown | 72 ++ 27 files changed, 2382 insertions(+), 47 deletions(-) create mode 100644 internal/service/odb/cloud_exadata_infrastructure.go create mode 100644 internal/service/odb/cloud_exadata_infrastructure_test.go create mode 100644 internal/service/odb/generate.go create mode 100644 internal/service/odb/service_endpoint_resolver_gen.go create mode 100644 internal/service/odb/service_endpoints_gen_test.go create mode 100644 internal/service/odb/service_package.go create mode 100644 internal/service/odb/service_package_gen.go create mode 100644 internal/service/odb/tags_gen.go create mode 100644 website/docs/r/odb_cloud_exadata_infrastructure.html.markdown create mode 100644 website/docs/r/odb_exa_infra.html.markdown diff --git a/.ci/.semgrep-service-name0.yml b/.ci/.semgrep-service-name0.yml index 505867179cd5..87d0ffadc241 100644 --- a/.ci/.semgrep-service-name0.yml +++ b/.ci/.semgrep-service-name0.yml @@ -4376,3 +4376,18 @@ rules: - focus-metavariable: $NAME - pattern-not: func $NAME($T *testing.T) severity: WARNING + - id: connect-in-test-name + languages: + - go + message: Include "Connect" in test name + paths: + include: + - internal/service/connect/*_test.go + patterns: + - pattern: func $NAME( ... ) + - metavariable-pattern: + metavariable: $NAME + patterns: + - pattern-not-regex: "^TestAccConnect" + - pattern-regex: ^TestAcc.* + severity: WARNING diff --git a/.ci/.semgrep-service-name1.yml b/.ci/.semgrep-service-name1.yml index 9667e2aac131..26778435636f 100644 --- a/.ci/.semgrep-service-name1.yml +++ b/.ci/.semgrep-service-name1.yml @@ -1,20 +1,5 @@ # Generated by internal/generate/servicesemgrep/main.go; DO NOT EDIT. rules: - - id: connect-in-test-name - languages: - - go - message: Include "Connect" in test name - paths: - include: - - internal/service/connect/*_test.go - patterns: - - pattern: func $NAME( ... ) - - metavariable-pattern: - metavariable: $NAME - patterns: - - pattern-not-regex: "^TestAccConnect" - - pattern-regex: ^TestAcc.* - severity: WARNING - id: connect-in-const-name languages: - go @@ -4380,3 +4365,21 @@ rules: patterns: - pattern-regex: "(?i)Invoicing" severity: WARNING + - id: iot-in-func-name + languages: + - go + message: Do not use "IoT" in func name inside iot package + paths: + include: + - internal/service/iot + exclude: + - internal/service/iot/list_pages_gen.go + patterns: + - pattern: func $NAME( ... ) + - metavariable-pattern: + metavariable: $NAME + patterns: + - pattern-regex: "(?i)IoT" + - focus-metavariable: $NAME + - pattern-not: func $NAME($T *testing.T) + severity: WARNING diff --git a/.ci/.semgrep-service-name2.yml b/.ci/.semgrep-service-name2.yml index 7b145a586f94..177631291711 100644 --- a/.ci/.semgrep-service-name2.yml +++ b/.ci/.semgrep-service-name2.yml @@ -1,23 +1,5 @@ # Generated by internal/generate/servicesemgrep/main.go; DO NOT EDIT. rules: - - id: iot-in-func-name - languages: - - go - message: Do not use "IoT" in func name inside iot package - paths: - include: - - internal/service/iot - exclude: - - internal/service/iot/list_pages_gen.go - patterns: - - pattern: func $NAME( ... ) - - metavariable-pattern: - metavariable: $NAME - patterns: - - pattern-regex: "(?i)IoT" - - focus-metavariable: $NAME - - pattern-not: func $NAME($T *testing.T) - severity: WARNING - id: iot-in-test-name languages: - go @@ -3021,6 +3003,67 @@ rules: patterns: - pattern-regex: "(?i)ObservabilityAccessManager" severity: WARNING + - id: odb-in-func-name + languages: + - go + message: Do not use "ODB" in func name inside odb package + paths: + include: + - internal/service/odb + exclude: + - internal/service/odb/list_pages_gen.go + patterns: + - pattern: func $NAME( ... ) + - metavariable-pattern: + metavariable: $NAME + patterns: + - pattern-regex: "(?i)ODB" + - focus-metavariable: $NAME + - pattern-not: func $NAME($T *testing.T) + severity: WARNING + - id: odb-in-test-name + languages: + - go + message: Include "ODB" in test name + paths: + include: + - internal/service/odb/*_test.go + patterns: + - pattern: func $NAME( ... ) + - metavariable-pattern: + metavariable: $NAME + patterns: + - pattern-not-regex: "^TestAccODB" + - pattern-regex: ^TestAcc.* + severity: WARNING + - id: odb-in-const-name + languages: + - go + message: Do not use "ODB" in const name inside odb package + paths: + include: + - internal/service/odb + patterns: + - pattern: const $NAME = ... + - metavariable-pattern: + metavariable: $NAME + patterns: + - pattern-regex: "(?i)ODB" + severity: WARNING + - id: odb-in-var-name + languages: + - go + message: Do not use "ODB" in var name inside odb package + paths: + include: + - internal/service/odb + patterns: + - pattern: var $NAME = ... + - metavariable-pattern: + metavariable: $NAME + patterns: + - pattern-regex: "(?i)ODB" + severity: WARNING - id: opensearch-in-func-name languages: - go @@ -4356,17 +4399,3 @@ rules: patterns: - pattern-regex: "(?i)RDS" severity: WARNING - - id: rds-in-var-name - languages: - - go - message: Do not use "RDS" in var name inside rds package - paths: - include: - - internal/service/rds - patterns: - - pattern: var $NAME = ... - - metavariable-pattern: - metavariable: $NAME - patterns: - - pattern-regex: "(?i)RDS" - severity: WARNING diff --git a/.ci/.semgrep-service-name3.yml b/.ci/.semgrep-service-name3.yml index bdca7386db66..5818938d1f26 100644 --- a/.ci/.semgrep-service-name3.yml +++ b/.ci/.semgrep-service-name3.yml @@ -1,5 +1,19 @@ # Generated by internal/generate/servicesemgrep/main.go; DO NOT EDIT. rules: + - id: rds-in-var-name + languages: + - go + message: Do not use "RDS" in var name inside rds package + paths: + include: + - internal/service/rds + patterns: + - pattern: var $NAME = ... + - metavariable-pattern: + metavariable: $NAME + patterns: + - pattern-regex: "(?i)RDS" + severity: WARNING - id: recyclebin-in-func-name languages: - go diff --git a/.github/labeler-issue-triage.yml b/.github/labeler-issue-triage.yml index 5e07c149b293..a1bbf64f59b7 100644 --- a/.github/labeler-issue-triage.yml +++ b/.github/labeler-issue-triage.yml @@ -505,6 +505,8 @@ service/notificationscontacts: - '((\*|-)\s*`?|(data|resource)\s+"?)aws_notificationscontacts_' service/oam: - '((\*|-)\s*`?|(data|resource)\s+"?)aws_oam_' +service/odb: + - '((\*|-)\s*`?|(data|resource)\s+"?)aws_odb_' service/opensearch: - '((\*|-)\s*`?|(data|resource)\s+"?)aws_opensearch_' service/opensearchserverless: diff --git a/.github/labeler-pr-triage.yml b/.github/labeler-pr-triage.yml index 7d87c0503313..2d07161612a7 100644 --- a/.github/labeler-pr-triage.yml +++ b/.github/labeler-pr-triage.yml @@ -1602,6 +1602,12 @@ service/oam: - any-glob-to-any-file: - 'internal/service/oam/**/*' - 'website/**/oam_*' +service/odb: + - any: + - changed-files: + - any-glob-to-any-file: + - 'internal/service/odb/**/*' + - 'website/**/odb_*' service/opensearch: - any: - changed-files: diff --git a/.teamcity/components/generated/services_all.kt b/.teamcity/components/generated/services_all.kt index af54a68fba64..d8b76d8b3ed2 100644 --- a/.teamcity/components/generated/services_all.kt +++ b/.teamcity/components/generated/services_all.kt @@ -168,6 +168,7 @@ val services = mapOf( "notifications" to ServiceSpec("User Notifications"), "notificationscontacts" to ServiceSpec("User Notifications Contacts"), "oam" to ServiceSpec("CloudWatch Observability Access Manager"), + "odb" to ServiceSpec("Oracle Database@AWS"), "opensearch" to ServiceSpec("OpenSearch", vpcLock = true), "opensearchserverless" to ServiceSpec("OpenSearch Serverless"), "organizations" to ServiceSpec("Organizations"), diff --git a/infrastructure/repository/labels-service.tf b/infrastructure/repository/labels-service.tf index cd13188084d7..862c8410b218 100644 --- a/infrastructure/repository/labels-service.tf +++ b/infrastructure/repository/labels-service.tf @@ -240,6 +240,7 @@ variable "service_labels" { "notifications", "notificationscontacts", "oam", + "odb", "opensearch", "opensearchserverless", "opsworks", diff --git a/internal/conns/awsclient_gen.go b/internal/conns/awsclient_gen.go index 4c14e3c15a83..ca7e5101e520 100644 --- a/internal/conns/awsclient_gen.go +++ b/internal/conns/awsclient_gen.go @@ -171,6 +171,7 @@ import ( "github.com/aws/aws-sdk-go-v2/service/notifications" "github.com/aws/aws-sdk-go-v2/service/notificationscontacts" "github.com/aws/aws-sdk-go-v2/service/oam" + "github.com/aws/aws-sdk-go-v2/service/odb" "github.com/aws/aws-sdk-go-v2/service/opensearch" "github.com/aws/aws-sdk-go-v2/service/opensearchserverless" "github.com/aws/aws-sdk-go-v2/service/organizations" @@ -922,6 +923,10 @@ func (c *AWSClient) NotificationsContactsClient(ctx context.Context) *notificati return errs.Must(client[*notificationscontacts.Client](ctx, c, names.NotificationsContacts, make(map[string]any))) } +func (c *AWSClient) ODBClient(ctx context.Context) *odb.Client { + return errs.Must(client[*odb.Client](ctx, c, names.ODB, make(map[string]any))) +} + func (c *AWSClient) ObservabilityAccessManagerClient(ctx context.Context) *oam.Client { return errs.Must(client[*oam.Client](ctx, c, names.ObservabilityAccessManager, make(map[string]any))) } diff --git a/internal/provider/framework/provider_gen.go b/internal/provider/framework/provider_gen.go index b0c5d9c5af7d..60149e451f1c 100644 --- a/internal/provider/framework/provider_gen.go +++ b/internal/provider/framework/provider_gen.go @@ -1354,6 +1354,13 @@ func endpointsBlock() schema.SetNestedBlock { Description: "Use this to override the default service endpoint URL", }, + // odb + + "odb": schema.StringAttribute{ + Optional: true, + Description: "Use this to override the default service endpoint URL", + }, + // opensearch "opensearch": schema.StringAttribute{ diff --git a/internal/provider/sdkv2/provider_gen.go b/internal/provider/sdkv2/provider_gen.go index b4e5810e444c..0c12b2c3382b 100644 --- a/internal/provider/sdkv2/provider_gen.go +++ b/internal/provider/sdkv2/provider_gen.go @@ -1565,6 +1565,14 @@ func endpointsSchema() *schema.Schema { Description: "Use this to override the default service endpoint URL", }, + // odb + + "odb": { + Type: schema.TypeString, + Optional: true, + Description: "Use this to override the default service endpoint URL", + }, + // opensearch "opensearch": { diff --git a/internal/provider/sdkv2/service_packages_gen.go b/internal/provider/sdkv2/service_packages_gen.go index fa6119d49328..08818e211ccf 100644 --- a/internal/provider/sdkv2/service_packages_gen.go +++ b/internal/provider/sdkv2/service_packages_gen.go @@ -175,6 +175,7 @@ import ( "github.com/hashicorp/terraform-provider-aws/internal/service/notifications" "github.com/hashicorp/terraform-provider-aws/internal/service/notificationscontacts" "github.com/hashicorp/terraform-provider-aws/internal/service/oam" + "github.com/hashicorp/terraform-provider-aws/internal/service/odb" "github.com/hashicorp/terraform-provider-aws/internal/service/opensearch" "github.com/hashicorp/terraform-provider-aws/internal/service/opensearchserverless" "github.com/hashicorp/terraform-provider-aws/internal/service/organizations" @@ -430,6 +431,7 @@ func servicePackages(ctx context.Context) []conns.ServicePackage { notifications.ServicePackage(ctx), notificationscontacts.ServicePackage(ctx), oam.ServicePackage(ctx), + odb.ServicePackage(ctx), opensearch.ServicePackage(ctx), opensearchserverless.ServicePackage(ctx), organizations.ServicePackage(ctx), diff --git a/internal/service/odb/cloud_exadata_infrastructure.go b/internal/service/odb/cloud_exadata_infrastructure.go new file mode 100644 index 000000000000..d1df360f6a1d --- /dev/null +++ b/internal/service/odb/cloud_exadata_infrastructure.go @@ -0,0 +1,893 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +package odb + +import ( + "context" + "errors" + "github.com/hashicorp/terraform-plugin-framework/attr" + "github.com/hashicorp/terraform-plugin-framework/resource/schema/int32planmodifier" + "github.com/hashicorp/terraform-plugin-framework/resource/schema/setplanmodifier" + "github.com/hashicorp/terraform-plugin-framework/types/basetypes" + "github.com/hashicorp/terraform-provider-aws/internal/enum" + "github.com/hashicorp/terraform-provider-aws/internal/framework/flex" + tftags "github.com/hashicorp/terraform-provider-aws/internal/tags" + "time" + + "github.com/aws/aws-sdk-go-v2/aws" + "github.com/aws/aws-sdk-go-v2/service/odb" + odbtypes "github.com/aws/aws-sdk-go-v2/service/odb/types" + "github.com/hashicorp/terraform-plugin-framework-timeouts/resource/timeouts" + + "github.com/hashicorp/terraform-plugin-framework/path" + "github.com/hashicorp/terraform-plugin-framework/resource" + "github.com/hashicorp/terraform-plugin-framework/resource/schema" + "github.com/hashicorp/terraform-plugin-framework/resource/schema/planmodifier" + "github.com/hashicorp/terraform-plugin-framework/resource/schema/stringplanmodifier" + + "github.com/hashicorp/terraform-plugin-framework/types" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" + "github.com/hashicorp/terraform-provider-aws/internal/conns" + "github.com/hashicorp/terraform-provider-aws/internal/create" + "github.com/hashicorp/terraform-provider-aws/internal/errs" + "github.com/hashicorp/terraform-provider-aws/internal/errs/fwdiag" + "github.com/hashicorp/terraform-provider-aws/internal/framework" + fwtypes "github.com/hashicorp/terraform-provider-aws/internal/framework/types" + "github.com/hashicorp/terraform-provider-aws/internal/sweep" + sweepfw "github.com/hashicorp/terraform-provider-aws/internal/sweep/framework" + "github.com/hashicorp/terraform-provider-aws/internal/tfresource" + "github.com/hashicorp/terraform-provider-aws/names" +) + +// Function annotations are used for resource registration to the Provider. DO NOT EDIT. +// @FrameworkResource("aws_odb_cloud_exadata_infrastructure", name="Cloud Exadata Infrastructure") +// @Tags(identifierAttribute="arn") +func newResourceCloudExadataInfrastructure(_ context.Context) (resource.ResourceWithConfigure, error) { + r := &resourceCloudExadataInfrastructure{} + + r.SetDefaultCreateTimeout(24 * time.Hour) + r.SetDefaultUpdateTimeout(24 * time.Hour) + r.SetDefaultDeleteTimeout(24 * time.Hour) + + return r, nil +} + +const ( + ResNameCloudExadataInfrastructure = "Cloud Exadata Infrastructure" + ExaInfraStorageServerTypeNotAvailable = "Storage_Server_Type_NA" + ExaInfraDBServerTypeNotAvailable = "DB_Server_Type_NA" +) + +type resourceCloudExadataInfrastructure struct { + framework.ResourceWithModel[cloudExadataInfrastructureResourceModel] + framework.WithTimeouts +} + +// For more about schema options, visit +// https://developer.hashicorp.com/terraform/plugin/framework/handling-data/schemas?page=schemas +func (r *resourceCloudExadataInfrastructure) Schema(ctx context.Context, req resource.SchemaRequest, resp *resource.SchemaResponse) { + statusType := fwtypes.StringEnumType[odbtypes.ResourceStatus]() + computeModelType := fwtypes.StringEnumType[odbtypes.ComputeModel]() + + resp.Schema = schema.Schema{ + Attributes: map[string]schema.Attribute{ + "activated_storage_count": schema.Int32Attribute{ + Computed: true, + }, + "additional_storage_count": schema.Int32Attribute{ + Computed: true, + }, + "database_server_type": schema.StringAttribute{ + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.String{ + stringplanmodifier.RequiresReplace(), + stringplanmodifier.UseStateForUnknown(), + }, + }, + "storage_server_type": schema.StringAttribute{ + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.String{ + stringplanmodifier.RequiresReplace(), + stringplanmodifier.UseStateForUnknown(), + }, + }, + names.AttrARN: framework.ARNAttributeComputedOnly(), + names.AttrID: framework.IDAttribute(), + "available_storage_size_in_gbs": schema.Int32Attribute{ + Computed: true, + }, + "availability_zone": schema.StringAttribute{ + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.String{ + stringplanmodifier.RequiresReplace(), + stringplanmodifier.UseStateForUnknown(), + }, + }, + "availability_zone_id": schema.StringAttribute{ + Required: true, + PlanModifiers: []planmodifier.String{ + stringplanmodifier.RequiresReplace(), + stringplanmodifier.UseStateForUnknown(), + }, + }, + "compute_count": schema.Int32Attribute{ + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.Int32{ + int32planmodifier.RequiresReplace(), + int32planmodifier.UseStateForUnknown(), + }, + }, + "cpu_count": schema.Int32Attribute{ + Computed: true, + }, + "customer_contacts_to_send_to_oci": schema.SetAttribute{ + ElementType: types.StringType, + CustomType: fwtypes.SetOfStringType, + Optional: true, + PlanModifiers: []planmodifier.Set{ + setplanmodifier.RequiresReplace(), + setplanmodifier.UseStateForUnknown(), + }, + }, + "data_storage_size_in_tbs": schema.Float64Attribute{ + Computed: true, + }, + "db_node_storage_size_in_gbs": schema.Int32Attribute{ + Computed: true, + }, + "db_server_version": schema.StringAttribute{ + Computed: true, + }, + "display_name": schema.StringAttribute{ + Required: true, + PlanModifiers: []planmodifier.String{ + stringplanmodifier.RequiresReplace(), + }, + }, + "last_maintenance_run_id": schema.StringAttribute{ + Computed: true, + }, + "max_cpu_count": schema.Int32Attribute{ + Computed: true, + }, + "max_data_storage_in_tbs": schema.Float64Attribute{ + Computed: true, + }, + "max_db_node_storage_size_in_gbs": schema.Int32Attribute{ + Computed: true, + }, + "max_memory_in_gbs": schema.Int32Attribute{ + Computed: true, + }, + "memory_size_in_gbs": schema.Int32Attribute{ + Computed: true, + }, + "monthly_db_server_version": schema.StringAttribute{ + Computed: true, + }, + "monthly_storage_server_version": schema.StringAttribute{ + Computed: true, + }, + "next_maintenance_run_id": schema.StringAttribute{ + Computed: true, + }, + "ocid": schema.StringAttribute{ + Computed: true, + }, + "oci_resource_anchor_name": schema.StringAttribute{ + Computed: true, + }, + "oci_url": schema.StringAttribute{ + Computed: true, + }, + "percent_progress": schema.Float64Attribute{ + Computed: true, + }, + "shape": schema.StringAttribute{ + Required: true, + PlanModifiers: []planmodifier.String{ + stringplanmodifier.RequiresReplace(), + }, + }, + "status": schema.StringAttribute{ + CustomType: statusType, + Computed: true, + }, + "status_reason": schema.StringAttribute{ + Computed: true, + }, + "storage_count": schema.Int32Attribute{ + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.Int32{ + int32planmodifier.RequiresReplace(), + int32planmodifier.UseStateForUnknown(), + }, + }, + "storage_server_version": schema.StringAttribute{ + Computed: true, + }, + names.AttrTags: tftags.TagsAttribute(), + names.AttrTagsAll: tftags.TagsAttributeComputedOnly(), + "total_storage_size_in_gbs": schema.Int32Attribute{ + Computed: true, + }, + "created_at": schema.StringAttribute{ + Computed: true, + }, + "compute_model": schema.StringAttribute{ + CustomType: computeModelType, + Computed: true, + }, + "maintenance_window": schema.ObjectAttribute{ + Required: true, + CustomType: fwtypes.NewObjectTypeOf[cloudExadataInfraMaintenanceWindowResourceModel](ctx), + + AttributeTypes: map[string]attr.Type{ + "custom_action_timeout_in_mins": types.Int32Type, + "days_of_week": types.SetType{ + ElemType: fwtypes.StringEnumType[odbtypes.DayOfWeekName](), + }, + "hours_of_day": types.SetType{ + ElemType: types.Int32Type, + }, + "is_custom_action_timeout_enabled": types.BoolType, + "lead_time_in_weeks": types.Int32Type, + "months": types.SetType{ + ElemType: fwtypes.StringEnumType[odbtypes.MonthName](), + }, + "patching_mode": fwtypes.StringEnumType[odbtypes.PatchingModeType](), + "preference": fwtypes.StringEnumType[odbtypes.PreferenceType](), + "weeks_of_month": types.SetType{ + ElemType: types.Int32Type, + }, + }, + }, + }, + Blocks: map[string]schema.Block{ + names.AttrTimeouts: timeouts.Block(ctx, timeouts.Opts{ + Create: true, + Update: true, + Delete: true, + }), + }, + } +} + +func (r *resourceCloudExadataInfrastructure) Create(ctx context.Context, req resource.CreateRequest, resp *resource.CreateResponse) { + conn := r.Meta().ODBClient(ctx) + + var plan cloudExadataInfrastructureResourceModel + + resp.Diagnostics.Append(req.Plan.Get(ctx, &plan)...) + if resp.Diagnostics.HasError() { + return + } + + input := odb.CreateCloudExadataInfrastructureInput{ + Tags: getTagsIn(ctx), + } + maintenanceWindowInput, err := r.expandMaintenanceWindow(ctx, plan.MaintenanceWindow) + if err != nil { + resp.Diagnostics.AddError( + create.ProblemStandardMessage(names.ODB, create.ErrActionCreating, ResNameCloudExadataInfrastructure, plan.DisplayName.ValueString(), err), + err.Error(), + ) + } + input.MaintenanceWindow = maintenanceWindowInput + + if !plan.CustomerContactsToSendToOCI.IsNull() && !plan.CustomerContactsToSendToOCI.IsUnknown() { + input.CustomerContactsToSendToOCI = r.expandCustomerContacts(ctx, plan.CustomerContactsToSendToOCI) + } + + resp.Diagnostics.Append(flex.Expand(ctx, plan, &input)...) + if resp.Diagnostics.HasError() { + return + } + + out, err := conn.CreateCloudExadataInfrastructure(ctx, &input) + if err != nil { + resp.Diagnostics.AddError( + create.ProblemStandardMessage(names.ODB, create.ErrActionCreating, ResNameCloudExadataInfrastructure, plan.DisplayName.ValueString(), err), + err.Error(), + ) + return + } + if out == nil || out.CloudExadataInfrastructureId == nil { + resp.Diagnostics.AddError( + create.ProblemStandardMessage(names.ODB, create.ErrActionCreating, ResNameCloudExadataInfrastructure, plan.DisplayName.ValueString(), nil), + errors.New("empty output").Error(), + ) + return + } + + createTimeout := r.CreateTimeout(ctx, plan.Timeouts) + createdExaInfra, err := waitCloudExadataInfrastructureCreated(ctx, conn, *out.CloudExadataInfrastructureId, createTimeout) + if err != nil { + resp.Diagnostics.AddError( + create.ProblemStandardMessage(names.ODB, create.ErrActionWaitingForCreation, ResNameCloudExadataInfrastructure, plan.DisplayName.ValueString(), err), + err.Error(), + ) + return + } + + plan.CustomerContactsToSendToOCI = r.flattenCustomerContacts(createdExaInfra.CustomerContactsToSendToOCI) + plan.MaintenanceWindow = r.flattenMaintenanceWindow(ctx, createdExaInfra.MaintenanceWindow) + + plan.CreatedAt = types.StringValue(createdExaInfra.CreatedAt.Format(time.RFC3339)) + + if createdExaInfra.DatabaseServerType == nil { + plan.DatabaseServerType = types.StringValue(ExaInfraDBServerTypeNotAvailable) + } else { + plan.DatabaseServerType = types.StringValue(*createdExaInfra.DatabaseServerType) + } + if createdExaInfra.StorageServerType == nil { + plan.StorageServerType = types.StringValue(ExaInfraStorageServerTypeNotAvailable) + } else { + plan.StorageServerType = types.StringValue(*createdExaInfra.StorageServerType) + } + resp.Diagnostics.Append(flex.Flatten(ctx, createdExaInfra, &plan)...) + + if resp.Diagnostics.HasError() { + return + } + resp.Diagnostics.Append(resp.State.Set(ctx, plan)...) +} + +func (r *resourceCloudExadataInfrastructure) Read(ctx context.Context, req resource.ReadRequest, resp *resource.ReadResponse) { + conn := r.Meta().ODBClient(ctx) + var state cloudExadataInfrastructureResourceModel + resp.Diagnostics.Append(req.State.Get(ctx, &state)...) + if resp.Diagnostics.HasError() { + return + } + + out, err := FindOdbExadataInfraResourceByID(ctx, conn, state.CloudExadataInfrastructureId.ValueString()) + if tfresource.NotFound(err) { + resp.Diagnostics.Append(fwdiag.NewResourceNotFoundWarningDiagnostic(err)) + resp.State.RemoveResource(ctx) + return + } + if err != nil { + resp.Diagnostics.AddError( + create.ProblemStandardMessage(names.ODB, create.ErrActionReading, ResNameCloudExadataInfrastructure, state.CloudExadataInfrastructureId.String(), err), + err.Error(), + ) + return + } + + state.CustomerContactsToSendToOCI = r.flattenCustomerContacts(out.CustomerContactsToSendToOCI) + state.CreatedAt = types.StringValue(out.CreatedAt.Format(time.RFC3339)) + + state.MaintenanceWindow = r.flattenMaintenanceWindow(ctx, out.MaintenanceWindow) + + if out.DatabaseServerType == nil { + state.DatabaseServerType = types.StringValue("ExaInfraDBServerTypeNotAvailable") + } else { + state.DatabaseServerType = types.StringValue(*out.DatabaseServerType) + } + if out.StorageServerType == nil { + state.StorageServerType = types.StringValue("ExaInfraStorageServerTypeNotAvailable") + } else { + state.StorageServerType = types.StringValue(*out.StorageServerType) + } + resp.Diagnostics.Append(flex.Flatten(ctx, out, &state)...) + + if resp.Diagnostics.HasError() { + return + } + resp.Diagnostics.Append(resp.State.Set(ctx, &state)...) +} + +func (r *resourceCloudExadataInfrastructure) Update(ctx context.Context, req resource.UpdateRequest, resp *resource.UpdateResponse) { + var plan, state cloudExadataInfrastructureResourceModel + resp.Diagnostics.Append(req.Plan.Get(ctx, &plan)...) + resp.Diagnostics.Append(req.State.Get(ctx, &state)...) + if resp.Diagnostics.HasError() { + return + } + conn := r.Meta().ODBClient(ctx) + + if !state.MaintenanceWindow.Equal(plan.MaintenanceWindow) { + + //we need to call update maintenance window + + updatedMW := odb.UpdateCloudExadataInfrastructureInput{ + CloudExadataInfrastructureId: plan.CloudExadataInfrastructureId.ValueStringPointer(), + } + mwInput, err := r.expandMaintenanceWindow(ctx, plan.MaintenanceWindow) + if err != nil { + resp.Diagnostics.AddError( + create.ProblemStandardMessage(names.ODB, create.ErrActionUpdating, ResNameCloudExadataInfrastructure, state.CloudExadataInfrastructureId.ValueString(), err), + err.Error(), + ) + return + } + updatedMW.MaintenanceWindow = mwInput + + /*if updatedMW.MaintenanceWindow != nil { + fmt.Println("MW preference : ", updatedMW.MaintenanceWindow.Preference) + fmt.Println("MW hours : ", updatedMW.MaintenanceWindow.HoursOfDay) + fmt.Println("MW weeks : ", updatedMW.MaintenanceWindow.WeeksOfMonth) + } else { + fmt.Println("Nil MW") + }*/ + out, err := conn.UpdateCloudExadataInfrastructure(ctx, &updatedMW) + if err != nil { + resp.Diagnostics.AddError( + create.ProblemStandardMessage(names.ODB, create.ErrActionUpdating, ResNameCloudExadataInfrastructure, state.CloudExadataInfrastructureId.ValueString(), err), + err.Error(), + ) + return + } + if out == nil { + resp.Diagnostics.AddError( + create.ProblemStandardMessage(names.ODB, create.ErrActionUpdating, ResNameCloudExadataInfrastructure, state.CloudExadataInfrastructureId.ValueString(), err), + err.Error(), + ) + return + } + + } + + updateTimeout := r.UpdateTimeout(ctx, plan.Timeouts) + updatedExaInfra, err := waitCloudExadataInfrastructureUpdated(ctx, conn, state.CloudExadataInfrastructureId.ValueString(), updateTimeout) + if err != nil { + resp.Diagnostics.AddError( + create.ProblemStandardMessage(names.ODB, create.ErrActionWaitingForUpdate, ResNameCloudExadataInfrastructure, state.CloudExadataInfrastructureId.ValueString(), err), + err.Error(), + ) + return + } + plan.CustomerContactsToSendToOCI = r.flattenCustomerContacts(updatedExaInfra.CustomerContactsToSendToOCI) + plan.CreatedAt = types.StringValue(updatedExaInfra.CreatedAt.Format(time.RFC3339)) + plan.MaintenanceWindow = r.flattenMaintenanceWindow(ctx, updatedExaInfra.MaintenanceWindow) + if updatedExaInfra.DatabaseServerType == nil { + plan.DatabaseServerType = types.StringValue(ExaInfraDBServerTypeNotAvailable) + } else { + plan.DatabaseServerType = types.StringValue(*updatedExaInfra.DatabaseServerType) + } + if updatedExaInfra.StorageServerType == nil { + plan.StorageServerType = types.StringValue(ExaInfraStorageServerTypeNotAvailable) + } else { + plan.StorageServerType = types.StringValue(*updatedExaInfra.StorageServerType) + } + + resp.Diagnostics.Append(flex.Flatten(ctx, updatedExaInfra, &plan)...) + + resp.Diagnostics.Append(resp.State.Set(ctx, &plan)...) + +} + +func (r *resourceCloudExadataInfrastructure) Delete(ctx context.Context, req resource.DeleteRequest, resp *resource.DeleteResponse) { + conn := r.Meta().ODBClient(ctx) + + var state cloudExadataInfrastructureResourceModel + resp.Diagnostics.Append(req.State.Get(ctx, &state)...) + if resp.Diagnostics.HasError() { + return + } + + input := odb.DeleteCloudExadataInfrastructureInput{ + CloudExadataInfrastructureId: state.CloudExadataInfrastructureId.ValueStringPointer(), + } + + _, err := conn.DeleteCloudExadataInfrastructure(ctx, &input) + if err != nil { + if errs.IsA[*odbtypes.ResourceNotFoundException](err) { + return + } + + resp.Diagnostics.AddError( + create.ProblemStandardMessage(names.ODB, create.ErrActionDeleting, ResNameCloudExadataInfrastructure, state.CloudExadataInfrastructureId.String(), err), + err.Error(), + ) + return + } + + deleteTimeout := r.DeleteTimeout(ctx, state.Timeouts) + _, err = waitCloudExadataInfrastructureDeleted(ctx, conn, state.CloudExadataInfrastructureId.ValueString(), deleteTimeout) + if err != nil { + resp.Diagnostics.AddError( + create.ProblemStandardMessage(names.ODB, create.ErrActionWaitingForDeletion, ResNameCloudExadataInfrastructure, state.CloudExadataInfrastructureId.String(), err), + err.Error(), + ) + return + } +} + +func (r *resourceCloudExadataInfrastructure) ImportState(ctx context.Context, req resource.ImportStateRequest, resp *resource.ImportStateResponse) { + resource.ImportStatePassthroughID(ctx, path.Root("id"), req, resp) +} + +func waitCloudExadataInfrastructureCreated(ctx context.Context, conn *odb.Client, id string, timeout time.Duration) (*odbtypes.CloudExadataInfrastructure, error) { + stateConf := &retry.StateChangeConf{ + Pending: enum.Slice(odbtypes.ResourceStatusProvisioning), + Target: enum.Slice(odbtypes.ResourceStatusAvailable, odbtypes.ResourceStatusFailed), + Refresh: statusCloudExadataInfrastructure(ctx, conn, id), + PollInterval: 1 * time.Minute, + Timeout: timeout, + } + + outputRaw, err := stateConf.WaitForStateContext(ctx) + if out, ok := outputRaw.(*odbtypes.CloudExadataInfrastructure); ok { + return out, err + } + return nil, err +} + +func waitCloudExadataInfrastructureUpdated(ctx context.Context, conn *odb.Client, id string, timeout time.Duration) (*odbtypes.CloudExadataInfrastructure, error) { + stateConf := &retry.StateChangeConf{ + Pending: enum.Slice(odbtypes.ResourceStatusUpdating), + Target: enum.Slice(odbtypes.ResourceStatusAvailable, odbtypes.ResourceStatusFailed), + Refresh: statusCloudExadataInfrastructure(ctx, conn, id), + PollInterval: 1 * time.Minute, + Timeout: timeout, + } + + outputRaw, err := stateConf.WaitForStateContext(ctx) + if out, ok := outputRaw.(*odbtypes.CloudExadataInfrastructure); ok { + return out, err + } + + return nil, err +} + +func waitCloudExadataInfrastructureDeleted(ctx context.Context, conn *odb.Client, id string, timeout time.Duration) (*odbtypes.CloudExadataInfrastructure, error) { + stateConf := &retry.StateChangeConf{ + Pending: enum.Slice(odbtypes.ResourceStatusTerminating), + Target: []string{}, + Refresh: statusCloudExadataInfrastructure(ctx, conn, id), + Timeout: timeout, + } + + outputRaw, err := stateConf.WaitForStateContext(ctx) + if out, ok := outputRaw.(*odbtypes.CloudExadataInfrastructure); ok { + return out, err + } + + return nil, err +} + +func statusCloudExadataInfrastructure(ctx context.Context, conn *odb.Client, id string) retry.StateRefreshFunc { + return func() (any, string, error) { + out, err := FindOdbExadataInfraResourceByID(ctx, conn, id) + if tfresource.NotFound(err) { + return nil, "", nil + } + + if err != nil { + return nil, "", err + } + + return out, string(out.Status), nil + } +} +func (r *resourceCloudExadataInfrastructure) expandCustomerContacts(ctx context.Context, contactsList fwtypes.SetValueOf[types.String]) []odbtypes.CustomerContact { + if contactsList.IsNull() || contactsList.IsUnknown() { + return nil + } + + var contacts []types.String + + contactsList.ElementsAs(ctx, &contacts, false) + + result := make([]odbtypes.CustomerContact, 0, len(contacts)) + for _, element := range contacts { + result = append(result, odbtypes.CustomerContact{ + Email: element.ValueStringPointer(), + }) + } + + return result +} + +func (r *resourceCloudExadataInfrastructure) flattenCustomerContacts(contacts []odbtypes.CustomerContact) fwtypes.SetValueOf[types.String] { + if len(contacts) == 0 { + return fwtypes.SetValueOf[types.String]{ + SetValue: basetypes.NewSetNull(types.StringType), + } + } + + elements := make([]attr.Value, 0, len(contacts)) + for _, contact := range contacts { + if contact.Email != nil { + stringValue := types.StringValue(*contact.Email) + elements = append(elements, stringValue) + } + } + + list, _ := basetypes.NewSetValue(types.StringType, elements) + + return fwtypes.SetValueOf[types.String]{ + SetValue: list, + } +} + +func FindOdbExadataInfraResourceByID(ctx context.Context, conn *odb.Client, id string) (*odbtypes.CloudExadataInfrastructure, error) { + input := odb.GetCloudExadataInfrastructureInput{ + CloudExadataInfrastructureId: aws.String(id), + } + + out, err := conn.GetCloudExadataInfrastructure(ctx, &input) + if err != nil { + if errs.IsA[*odbtypes.ResourceNotFoundException](err) { + return nil, &retry.NotFoundError{ + LastError: err, + LastRequest: &input, + } + } + + return nil, err + } + + if out == nil || out.CloudExadataInfrastructure == nil { + return nil, tfresource.NewEmptyResultError(&input) + } + + return out.CloudExadataInfrastructure, nil +} +func (r *resourceCloudExadataInfrastructure) expandMaintenanceWindow(ctx context.Context, exaInfraMWResourceObj fwtypes.ObjectValueOf[cloudExadataInfraMaintenanceWindowResourceModel]) (*odbtypes.MaintenanceWindow, error) { + + hasError := false + var err error + var exaInfraMWResource cloudExadataInfraMaintenanceWindowResourceModel + + exaInfraMWResourceObj.As(ctx, &exaInfraMWResource, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) + + if exaInfraMWResource.DaysOfWeek.IsNull() || exaInfraMWResource.DaysOfWeek.IsUnknown() { + hasError = true + err = errors.Join(err, errors.New("daysOfWeeks can not be null or unknown")) + } + if exaInfraMWResource.HoursOfDay.IsNull() || exaInfraMWResource.HoursOfDay.IsUnknown() { + hasError = true + err = errors.Join(err, errors.New("hoursOfDay can not be null or unknown")) + } + if exaInfraMWResource.WeeksOfMonth.IsNull() || exaInfraMWResource.WeeksOfMonth.IsUnknown() { + hasError = true + err = errors.Join(err, errors.New("weeksOfMonth can not be null or unknown")) + } + if exaInfraMWResource.Months.IsNull() || exaInfraMWResource.Months.IsUnknown() { + hasError = true + err = errors.Join(err, errors.New("months can not be null or unknown")) + } + if exaInfraMWResource.IsCustomActionTimeoutEnabled.IsNull() || exaInfraMWResource.IsCustomActionTimeoutEnabled.IsUnknown() { + hasError = true + err = errors.Join(err, errors.New("isCustomActionTimeoutEnabled can not be null or unknown")) + } + if exaInfraMWResource.CustomActionTimeoutInMins.IsNull() || exaInfraMWResource.CustomActionTimeoutInMins.IsUnknown() { + hasError = true + err = errors.Join(err, errors.New("customActionTimeoutInMins can not be null or unknown")) + } + if exaInfraMWResource.WeeksOfMonth.IsNull() || exaInfraMWResource.WeeksOfMonth.IsUnknown() { + hasError = true + err = errors.Join(err, errors.New("weeksOfMonth can not be null or unknown")) + } + if exaInfraMWResource.LeadTimeInWeeks.IsNull() || exaInfraMWResource.LeadTimeInWeeks.IsUnknown() { + hasError = true + err = errors.Join(err, errors.New("leadTimeInWeeks can not be null or unknown")) + } + + var daysOfWeekNames []odbtypes.DayOfWeekName + exaInfraMWResource.DaysOfWeek.ElementsAs(ctx, &daysOfWeekNames, false) + daysOfWeek := make([]odbtypes.DayOfWeek, 0, len(daysOfWeekNames)) + + for _, dayOfWeek := range daysOfWeekNames { + daysOfWeek = append(daysOfWeek, odbtypes.DayOfWeek{ + Name: dayOfWeek, + }) + } + + var hoursOfTheDay []int32 + exaInfraMWResource.HoursOfDay.ElementsAs(ctx, &hoursOfTheDay, false) + + var monthNames []odbtypes.MonthName + exaInfraMWResource.Months.ElementsAs(ctx, &monthNames, false) + months := make([]odbtypes.Month, 0, len(monthNames)) + for _, month := range monthNames { + months = append(months, odbtypes.Month{ + Name: month, + }) + } + + var weeksOfMonth []int32 + exaInfraMWResource.WeeksOfMonth.ElementsAs(ctx, &weeksOfMonth, false) + odbTypeMW := odbtypes.MaintenanceWindow{ + CustomActionTimeoutInMins: exaInfraMWResource.CustomActionTimeoutInMins.ValueInt32Pointer(), + DaysOfWeek: daysOfWeek, + HoursOfDay: hoursOfTheDay, + IsCustomActionTimeoutEnabled: exaInfraMWResource.IsCustomActionTimeoutEnabled.ValueBoolPointer(), + LeadTimeInWeeks: exaInfraMWResource.LeadTimeInWeeks.ValueInt32Pointer(), + Months: months, + PatchingMode: exaInfraMWResource.PatchingMode.ValueEnum(), + Preference: exaInfraMWResource.Preference.ValueEnum(), + WeeksOfMonth: weeksOfMonth, + } + if odbTypeMW.Preference == odbtypes.PreferenceTypeNoPreference { + if len(odbTypeMW.DaysOfWeek) != 0 { + hasError = true + err = errors.Join(err, errors.New("default maintenance window can't have daysOfWeek with values")) + } + if len(odbTypeMW.HoursOfDay) != 0 { + hasError = true + err = errors.Join(err, errors.New("default maintenance window can't have hoursOfDay with values")) + } + if len(odbTypeMW.WeeksOfMonth) != 0 { + hasError = true + err = errors.Join(err, errors.New("default maintenance window can't have weeksOfMonth with values")) + } + if len(odbTypeMW.Months) != 0 { + hasError = true + err = errors.Join(err, errors.New("default maintenance window can't have months with values")) + } + } + + if hasError { + return nil, err + } + + return &odbTypeMW, nil +} + +func (r *resourceCloudExadataInfrastructure) flattenMaintenanceWindow(ctx context.Context, obdExaInfraMW *odbtypes.MaintenanceWindow) fwtypes.ObjectValueOf[cloudExadataInfraMaintenanceWindowResourceModel] { + //days of week + daysOfWeek := make([]attr.Value, 0, len(obdExaInfraMW.DaysOfWeek)) + for _, dayOfWeek := range obdExaInfraMW.DaysOfWeek { + dayOfWeekStringValue := fwtypes.StringEnumValue(dayOfWeek.Name).StringValue + daysOfWeek = append(daysOfWeek, dayOfWeekStringValue) + } + setValueOfDaysOfWeek, _ := basetypes.NewSetValue(types.StringType, daysOfWeek) + daysOfWeekRead := fwtypes.SetValueOf[fwtypes.StringEnum[odbtypes.DayOfWeekName]]{ + SetValue: setValueOfDaysOfWeek, + } + //hours of the day + hoursOfTheDay := make([]attr.Value, 0, len(obdExaInfraMW.HoursOfDay)) + for _, hourOfTheDay := range obdExaInfraMW.HoursOfDay { + daysOfWeekInt32Value := types.Int32Value(hourOfTheDay) + hoursOfTheDay = append(hoursOfTheDay, daysOfWeekInt32Value) + } + setValuesOfHoursOfTheDay, _ := basetypes.NewSetValue(types.Int32Type, hoursOfTheDay) + hoursOfTheDayRead := fwtypes.SetValueOf[types.Int64]{ + SetValue: setValuesOfHoursOfTheDay, + } + //months + months := make([]attr.Value, 0, len(obdExaInfraMW.Months)) + for _, month := range obdExaInfraMW.Months { + monthStringValue := fwtypes.StringEnumValue(month.Name).StringValue + months = append(months, monthStringValue) + } + setValuesOfMonth, _ := basetypes.NewSetValue(types.StringType, months) + monthsRead := fwtypes.SetValueOf[fwtypes.StringEnum[odbtypes.MonthName]]{ + SetValue: setValuesOfMonth, + } + //weeks of month + weeksOfMonth := make([]attr.Value, 0, len(obdExaInfraMW.WeeksOfMonth)) + for _, weekOfMonth := range obdExaInfraMW.WeeksOfMonth { + weeksOfMonthInt32Value := types.Int32Value(weekOfMonth) + weeksOfMonth = append(weeksOfMonth, weeksOfMonthInt32Value) + } + setValuesOfWeekOfMonth, _ := basetypes.NewSetValue(types.Int32Type, weeksOfMonth) + weeksOfMonthRead := fwtypes.SetValueOf[types.Int64]{ + SetValue: setValuesOfWeekOfMonth, + } + + flattenMW := cloudExadataInfraMaintenanceWindowResourceModel{ + CustomActionTimeoutInMins: types.Int32PointerValue(obdExaInfraMW.CustomActionTimeoutInMins), + DaysOfWeek: daysOfWeekRead, + HoursOfDay: hoursOfTheDayRead, + IsCustomActionTimeoutEnabled: types.BoolPointerValue(obdExaInfraMW.IsCustomActionTimeoutEnabled), + LeadTimeInWeeks: types.Int32PointerValue(obdExaInfraMW.LeadTimeInWeeks), + Months: monthsRead, + PatchingMode: fwtypes.StringEnumValue(obdExaInfraMW.PatchingMode), + Preference: fwtypes.StringEnumValue(obdExaInfraMW.Preference), + WeeksOfMonth: weeksOfMonthRead, + } + result, _ := fwtypes.NewObjectValueOf[cloudExadataInfraMaintenanceWindowResourceModel](ctx, &flattenMW) + return result +} + +// See more: +// https://developer.hashicorp.com/terraform/plugin/framework/handling-data/accessing-values +type cloudExadataInfrastructureResourceModel struct { + framework.WithRegionModel + ActivatedStorageCount types.Int32 `tfsdk:"activated_storage_count"` + AdditionalStorageCount types.Int32 `tfsdk:"additional_storage_count"` + DatabaseServerType types.String `tfsdk:"database_server_type"` + StorageServerType types.String `tfsdk:"storage_server_type"` + AvailabilityZone types.String `tfsdk:"availability_zone"` + AvailabilityZoneId types.String `tfsdk:"availability_zone_id"` + AvailableStorageSizeInGBs types.Int32 `tfsdk:"available_storage_size_in_gbs"` + CloudExadataInfrastructureArn types.String `tfsdk:"arn"` + CloudExadataInfrastructureId types.String `tfsdk:"id"` + ComputeCount types.Int32 `tfsdk:"compute_count"` + CpuCount types.Int32 `tfsdk:"cpu_count"` + CustomerContactsToSendToOCI fwtypes.SetValueOf[types.String] `tfsdk:"customer_contacts_to_send_to_oci" autoflex:"-"` + DataStorageSizeInTBs types.Float64 `tfsdk:"data_storage_size_in_tbs"` + DbNodeStorageSizeInGBs types.Int32 `tfsdk:"db_node_storage_size_in_gbs"` + DbServerVersion types.String `tfsdk:"db_server_version"` + DisplayName types.String `tfsdk:"display_name"` + LastMaintenanceRunId types.String `tfsdk:"last_maintenance_run_id"` + MaxCpuCount types.Int32 `tfsdk:"max_cpu_count"` + MaxDataStorageInTBs types.Float64 `tfsdk:"max_data_storage_in_tbs"` + MaxDbNodeStorageSizeInGBs types.Int32 `tfsdk:"max_db_node_storage_size_in_gbs"` + MaxMemoryInGBs types.Int32 `tfsdk:"max_memory_in_gbs"` + MemorySizeInGBs types.Int32 `tfsdk:"memory_size_in_gbs"` + MonthlyDbServerVersion types.String `tfsdk:"monthly_db_server_version"` + MonthlyStorageServerVersion types.String `tfsdk:"monthly_storage_server_version"` + NextMaintenanceRunId types.String `tfsdk:"next_maintenance_run_id"` + Ocid types.String `tfsdk:"ocid"` + OciResourceAnchorName types.String `tfsdk:"oci_resource_anchor_name"` + OciUrl types.String `tfsdk:"oci_url"` + PercentProgress types.Float64 `tfsdk:"percent_progress"` + Shape types.String `tfsdk:"shape"` + Status fwtypes.StringEnum[odbtypes.ResourceStatus] `tfsdk:"status"` + StatusReason types.String `tfsdk:"status_reason"` + StorageCount types.Int32 `tfsdk:"storage_count"` + StorageServerVersion types.String `tfsdk:"storage_server_version"` + TotalStorageSizeInGBs types.Int32 `tfsdk:"total_storage_size_in_gbs"` + Timeouts timeouts.Value `tfsdk:"timeouts"` + CreatedAt types.String `tfsdk:"created_at" autoflex:",noflatten"` + ComputeModel fwtypes.StringEnum[odbtypes.ComputeModel] `tfsdk:"compute_model"` + MaintenanceWindow fwtypes.ObjectValueOf[cloudExadataInfraMaintenanceWindowResourceModel] `tfsdk:"maintenance_window" autoflex:"-"` + Tags tftags.Map `tfsdk:"tags"` + TagsAll tftags.Map `tfsdk:"tags_all"` +} + +type cloudExadataInfraMaintenanceWindowResourceModel struct { + CustomActionTimeoutInMins types.Int32 `tfsdk:"custom_action_timeout_in_mins"` + DaysOfWeek fwtypes.SetValueOf[fwtypes.StringEnum[odbtypes.DayOfWeekName]] `tfsdk:"days_of_week"` + HoursOfDay fwtypes.SetValueOf[types.Int64] `tfsdk:"hours_of_day"` + IsCustomActionTimeoutEnabled types.Bool `tfsdk:"is_custom_action_timeout_enabled"` + LeadTimeInWeeks types.Int32 `tfsdk:"lead_time_in_weeks"` + Months fwtypes.SetValueOf[fwtypes.StringEnum[odbtypes.MonthName]] `tfsdk:"months"` + PatchingMode fwtypes.StringEnum[odbtypes.PatchingModeType] `tfsdk:"patching_mode"` + Preference fwtypes.StringEnum[odbtypes.PreferenceType] `tfsdk:"preference"` + WeeksOfMonth fwtypes.SetValueOf[types.Int64] `tfsdk:"weeks_of_month"` +} + +// TIP: ==== SWEEPERS ==== +// When acceptance testing resources, interrupted or failed tests may +// leave behind orphaned resources in an account. To facilitate cleaning +// up lingering resources, each resource implementation should include +// a corresponding "sweeper" function. +// +// The sweeper function lists all resources of a given type and sets the +// appropriate identifers required to delete the resource via the Delete +// method implemented above. +// +// Once the sweeper function is implemented, register it in sweep.go +// as follows: +// +// awsv2.Register("aws_odb_cloud_exadata_infrastructure", sweepCloudExadataInfrastructures) +// +// See more: +// https://hashicorp.github.io/terraform-provider-aws/running-and-writing-acceptance-tests/#acceptance-test-sweepers +func sweepCloudExadataInfrastructures(ctx context.Context, client *conns.AWSClient) ([]sweep.Sweepable, error) { + input := odb.ListCloudExadataInfrastructuresInput{} + conn := client.ODBClient(ctx) + var sweepResources []sweep.Sweepable + + pages := odb.NewListCloudExadataInfrastructuresPaginator(conn, &input) + for pages.HasMorePages() { + page, err := pages.NextPage(ctx) + if err != nil { + return nil, err + } + + for _, v := range page.CloudExadataInfrastructures { + sweepResources = append(sweepResources, sweepfw.NewSweepResource(newResourceCloudExadataInfrastructure, client, + sweepfw.NewAttribute(names.AttrID, aws.ToString(v.CloudExadataInfrastructureId))), + ) + } + } + + return sweepResources, nil +} diff --git a/internal/service/odb/cloud_exadata_infrastructure_test.go b/internal/service/odb/cloud_exadata_infrastructure_test.go new file mode 100644 index 000000000000..e6cb20e64670 --- /dev/null +++ b/internal/service/odb/cloud_exadata_infrastructure_test.go @@ -0,0 +1,273 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +package odb_test + +// **PLEASE DELETE THIS AND ALL TIP COMMENTS BEFORE SUBMITTING A PR FOR REVIEW!** +// +// TIP: ==== INTRODUCTION ==== +// Thank you for trying the skaff tool! +// +// You have opted to include these helpful comments. They all include "TIP:" +// to help you find and remove them when you're done with them. +// +// While some aspects of this file are customized to your input, the +// scaffold tool does *not* look at the AWS API and ensure it has correct +// function, structure, and variable names. It makes guesses based on +// commonalities. You will need to make significant adjustments. +// +// In other words, as generated, this is a rough outline of the work you will +// need to do. If something doesn't make sense for your situation, get rid of +// it. + +import ( + // TIP: ==== IMPORTS ==== + // This is a common set of imports but not customized to your code since + // your code hasn't been written yet. Make sure you, your IDE, or + // goimports -w fixes these imports. + // + // The provider linter wants your imports to be in two groups: first, + // standard library (i.e., "fmt" or "strings"), second, everything else. + // + // Also, AWS Go SDK v2 may handle nested structures differently than v1, + // using the services/odb/types package. If so, you'll + // need to import types and reference the nested types, e.g., as + // types.. + "context" + "errors" + "fmt" + odbtypes "github.com/aws/aws-sdk-go-v2/service/odb/types" + "github.com/hashicorp/terraform-plugin-testing/terraform" + "github.com/hashicorp/terraform-provider-aws/internal/create" + tfodb "github.com/hashicorp/terraform-provider-aws/internal/service/odb" + "github.com/hashicorp/terraform-provider-aws/internal/tfresource" + "testing" + + "github.com/aws/aws-sdk-go-v2/service/odb" + sdkacctest "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-provider-aws/internal/acctest" + "github.com/hashicorp/terraform-provider-aws/internal/conns" + "github.com/hashicorp/terraform-provider-aws/names" +) + +// TIP: File Structure. The basic outline for all test files should be as +// follows. Improve this resource's maintainability by following this +// outline. +// +// 1. Package declaration (add "_test" since this is a test file) +// 2. Imports +// 3. Unit tests +// 4. Basic test +// 5. Disappears test +// 6. All the other tests +// 7. Helper functions (exists, destroy, check, etc.) +// 8. Functions that return Terraform configurations + +// TIP: ==== UNIT TESTS ==== +// This is an example of a unit test. Its name is not prefixed with +// "TestAcc" like an acceptance test. +// +// Unlike acceptance tests, unit tests do not access AWS and are focused on a +// function (or method). Because of this, they are quick and cheap to run. +// +// In designing a resource's implementation, isolate complex bits from AWS bits +// so that they can be tested through a unit test. We encourage more unit tests +// in the provider. +// +// Cut and dry functions using well-used patterns, like typical flatteners and +// expanders, don't need unit testing. However, if they are complex or +// intricate, they should be unit tested. + +// TIP: ==== ACCEPTANCE TESTS ==== +// This is an example of a basic acceptance test. This should test as much of +// standard functionality of the resource as possible, and test importing, if +// applicable. We prefix its name with "TestAcc", the service, and the +// resource name. +// +// Acceptance test access AWS and cost money to run. + +type cloudExaDataInfraResourceTest struct { + displayNamePrefix string +} + +var exaInfraTestResource = cloudExaDataInfraResourceTest{ + displayNamePrefix: "Ofake-exa", +} + +func TestAccODBCloudExadataInfrastructureCreateWithAllParameters(t *testing.T) { + ctx := acctest.Context(t) + + if testing.Short() { + t.Skip("skipping long-running test in short mode") + } + + var cloudExaDataInfrastructure odbtypes.CloudExadataInfrastructure + resourceName := "aws_odb_cloud_exadata_infrastructure.test" + rName := sdkacctest.RandomWithPrefix(exaInfraTestResource.displayNamePrefix) + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { + acctest.PreCheck(ctx, t) + exaInfraTestResource.testAccPreCheck(ctx, t) + }, + ErrorCheck: acctest.ErrorCheck(t, names.ODBServiceID), + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + CheckDestroy: exaInfraTestResource.testAccCheckCloudExaDataInfraDestroyed(ctx), + Steps: []resource.TestStep{ + { + Config: exaInfraTestResource.exaDataInfraResourceWithAllConfig(rName), + Check: resource.ComposeAggregateTestCheckFunc( + exaInfraTestResource.testAccCheckCloudExadataInfrastructureExists(ctx, resourceName, &cloudExaDataInfrastructure), + ), + }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} + +func (cloudExaDataInfraResourceTest) testAccCheckCloudExaDataInfraDestroyed(ctx context.Context) resource.TestCheckFunc { + return func(s *terraform.State) error { + conn := acctest.Provider.Meta().(*conns.AWSClient).ODBClient(ctx) + + for _, rs := range s.RootModule().Resources { + if rs.Type != "aws_odb_cloud_exadata_infrastructure" { + continue + } + _, err := tfodb.FindOdbExadataInfraResourceByID(ctx, conn, rs.Primary.ID) + if tfresource.NotFound(err) { + return nil + } + if err != nil { + return create.Error(names.ODB, create.ErrActionCheckingDestroyed, tfodb.ResNameCloudExadataInfrastructure, rs.Primary.ID, err) + } + + return create.Error(names.ODB, create.ErrActionCheckingDestroyed, tfodb.ResNameCloudExadataInfrastructure, rs.Primary.ID, errors.New("not destroyed")) + } + + return nil + } +} + +func (cloudExaDataInfraResourceTest) testAccCheckCloudExadataInfrastructureExists(ctx context.Context, name string, cloudExadataInfrastructure *odbtypes.CloudExadataInfrastructure) resource.TestCheckFunc { + return func(s *terraform.State) error { + rs, ok := s.RootModule().Resources[name] + if !ok { + return create.Error(names.ODB, create.ErrActionCheckingExistence, tfodb.ResNameCloudExadataInfrastructure, name, errors.New("not found")) + } + + if rs.Primary.ID == "" { + return create.Error(names.ODB, create.ErrActionCheckingExistence, tfodb.ResNameCloudExadataInfrastructure, name, errors.New("not set")) + } + + conn := acctest.Provider.Meta().(*conns.AWSClient).ODBClient(ctx) + + resp, err := tfodb.FindOdbExadataInfraResourceByID(ctx, conn, rs.Primary.ID) + if err != nil { + return create.Error(names.ODB, create.ErrActionCheckingExistence, tfodb.ResNameCloudExadataInfrastructure, rs.Primary.ID, err) + } + + *cloudExadataInfrastructure = *resp + + return nil + } +} + +func (cloudExaDataInfraResourceTest) testAccPreCheck(ctx context.Context, t *testing.T) { + conn := acctest.Provider.Meta().(*conns.AWSClient).ODBClient(ctx) + + input := &odb.ListCloudExadataInfrastructuresInput{} + + _, err := conn.ListCloudExadataInfrastructures(ctx, input) + + if acctest.PreCheckSkipError(err) { + t.Skipf("skipping acceptance testing: %s", err) + } + if err != nil { + t.Fatalf("unexpected PreCheck error: %s", err) + } +} +func testAccPreCheck(ctx context.Context, t *testing.T) { + conn := acctest.Provider.Meta().(*conns.AWSClient).ODBClient(ctx) + + input := &odb.ListCloudExadataInfrastructuresInput{} + + _, err := conn.ListCloudExadataInfrastructures(ctx, input) + + if acctest.PreCheckSkipError(err) { + t.Skipf("skipping acceptance testing: %s", err) + } + if err != nil { + t.Fatalf("unexpected PreCheck error: %s", err) + } +} + +/* + func testAccCheckCloudExadataInfrastructureNotRecreated(before, after *odb.DescribeCloudExadataInfrastructureResponse) resource.TestCheckFunc { + return func(s *terraform.State) error { + if before, after := aws.ToString(before.CloudExadataInfrastructureId), aws.ToString(after.CloudExadataInfrastructureId); before != after { + return create.Error(names.ODB, create.ErrActionCheckingNotRecreated, tfodb.ResNameCloudExadataInfrastructure, aws.ToString(before.CloudExadataInfrastructureId), errors.New("recreated")) + } + + return nil + } + } +*/ +func (cloudExaDataInfraResourceTest) exaDataInfraResourceWithAllConfig(randomId string) string { + exaDataInfra := fmt.Sprintf(` + +resource "aws_odb_cloud_exadata_infrastructure" "test" { + display_name = %[1]q + shape = "Exadata.X11M" + storage_count = 3 + compute_count = 2 + availability_zone_id = "use1-az6" + customer_contacts_to_send_to_oci = ["abc@example.com"] + database_server_type = "X11M" + storage_server_type = "X11M-HC" + maintenance_window = { + custom_action_timeout_in_mins = 16 + days_of_week = ["MONDAY", "TUESDAY"] + hours_of_day = [11,16] + is_custom_action_timeout_enabled = true + lead_time_in_weeks = 3 + months = ["FEBRUARY","MAY","AUGUST","NOVEMBER"] + patching_mode = "ROLLING" + preference = "CUSTOM_PREFERENCE" + weeks_of_month =[2,4] + } + tags = { + "env"= "dev" + } + +} +`, randomId) + //fmt.Println(exaDataInfra) + return exaDataInfra +} +func (cloudExaDataInfraResourceTest) exaDataInfraResourceBasicConfig(displayName string) string { + exaInfra := fmt.Sprintf(` +resource "aws_odb_cloud_exadata_infrastructure" "test" { + display_name = %[1]q + shape = "Exadata.X9M" + storage_count = 3 + compute_count = 2 + availability_zone_id = "use1-az6" + maintenance_window = { + custom_action_timeout_in_mins = 16 + days_of_week = [] + hours_of_day = [] + is_custom_action_timeout_enabled = true + lead_time_in_weeks = 3 + months = ["FEBRUARY","MAY","AUGUST","NOVEMBER"] + patching_mode = "ROLLING" + preference = "CUSTOM_PREFERENCE" + weeks_of_month =[2,4] + } +} +`, displayName) + return exaInfra +} diff --git a/internal/service/odb/generate.go b/internal/service/odb/generate.go new file mode 100644 index 000000000000..34340f9f6331 --- /dev/null +++ b/internal/service/odb/generate.go @@ -0,0 +1,7 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 +//go:generate go run ../../generate/tags/main.go -ServiceTagsMap -ListTags -KVTValues -UpdateTags +//go:generate go run ../../generate/servicepackage/main.go +// ONLY generate directives and package declaration! Do not add anything else to this file. + +package odb diff --git a/internal/service/odb/service_endpoint_resolver_gen.go b/internal/service/odb/service_endpoint_resolver_gen.go new file mode 100644 index 000000000000..103f29abab6b --- /dev/null +++ b/internal/service/odb/service_endpoint_resolver_gen.go @@ -0,0 +1,82 @@ +// Code generated by internal/generate/servicepackage/main.go; DO NOT EDIT. + +package odb + +import ( + "context" + "fmt" + "net" + + "github.com/aws/aws-sdk-go-v2/aws" + "github.com/aws/aws-sdk-go-v2/service/odb" + smithyendpoints "github.com/aws/smithy-go/endpoints" + "github.com/hashicorp/terraform-plugin-log/tflog" + "github.com/hashicorp/terraform-provider-aws/internal/errs" +) + +var _ odb.EndpointResolverV2 = resolverV2{} + +type resolverV2 struct { + defaultResolver odb.EndpointResolverV2 +} + +func newEndpointResolverV2() resolverV2 { + return resolverV2{ + defaultResolver: odb.NewDefaultEndpointResolverV2(), + } +} + +func (r resolverV2) ResolveEndpoint(ctx context.Context, params odb.EndpointParameters) (endpoint smithyendpoints.Endpoint, err error) { + params = params.WithDefaults() + useFIPS := aws.ToBool(params.UseFIPS) + + if eps := params.Endpoint; aws.ToString(eps) != "" { + tflog.Debug(ctx, "setting endpoint", map[string]any{ + "tf_aws.endpoint": endpoint, + }) + + if useFIPS { + tflog.Debug(ctx, "endpoint set, ignoring UseFIPSEndpoint setting") + params.UseFIPS = aws.Bool(false) + } + + return r.defaultResolver.ResolveEndpoint(ctx, params) + } else if useFIPS { + ctx = tflog.SetField(ctx, "tf_aws.use_fips", useFIPS) + + endpoint, err = r.defaultResolver.ResolveEndpoint(ctx, params) + if err != nil { + return endpoint, err + } + + tflog.Debug(ctx, "endpoint resolved", map[string]any{ + "tf_aws.endpoint": endpoint.URI.String(), + }) + + hostname := endpoint.URI.Hostname() + _, err = net.LookupHost(hostname) + if err != nil { + if dnsErr, ok := errs.As[*net.DNSError](err); ok && dnsErr.IsNotFound { + tflog.Debug(ctx, "default endpoint host not found, disabling FIPS", map[string]any{ + "tf_aws.hostname": hostname, + }) + params.UseFIPS = aws.Bool(false) + } else { + err = fmt.Errorf("looking up odb endpoint %q: %s", hostname, err) + return + } + } else { + return endpoint, err + } + } + + return r.defaultResolver.ResolveEndpoint(ctx, params) +} + +func withBaseEndpoint(endpoint string) func(*odb.Options) { + return func(o *odb.Options) { + if endpoint != "" { + o.BaseEndpoint = aws.String(endpoint) + } + } +} diff --git a/internal/service/odb/service_endpoints_gen_test.go b/internal/service/odb/service_endpoints_gen_test.go new file mode 100644 index 000000000000..bc88b1023c35 --- /dev/null +++ b/internal/service/odb/service_endpoints_gen_test.go @@ -0,0 +1,602 @@ +// Code generated by internal/generate/serviceendpointtests/main.go; DO NOT EDIT. + +package odb_test + +import ( + "context" + "errors" + "fmt" + "maps" + "net" + "net/url" + "os" + "path/filepath" + "reflect" + "strings" + "testing" + + "github.com/aws/aws-sdk-go-v2/aws" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/odb" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" + "github.com/google/go-cmp/cmp" + "github.com/hashicorp/aws-sdk-go-base/v2/servicemocks" + "github.com/hashicorp/terraform-plugin-sdk/v2/diag" + terraformsdk "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-provider-aws/internal/conns" + "github.com/hashicorp/terraform-provider-aws/internal/errs" + "github.com/hashicorp/terraform-provider-aws/internal/errs/sdkdiag" + "github.com/hashicorp/terraform-provider-aws/internal/provider/sdkv2" + "github.com/hashicorp/terraform-provider-aws/names" +) + +type endpointTestCase struct { + with []setupFunc + expected caseExpectations +} + +type caseSetup struct { + config map[string]any + configFile configFile + environmentVariables map[string]string +} + +type configFile struct { + baseUrl string + serviceUrl string +} + +type caseExpectations struct { + diags diag.Diagnostics + endpoint string + region string +} + +type apiCallParams struct { + endpoint string + region string +} + +type setupFunc func(setup *caseSetup) + +type callFunc func(ctx context.Context, t *testing.T, meta *conns.AWSClient) apiCallParams + +const ( + packageNameConfigEndpoint = "https://packagename-config.endpoint.test/" + awsServiceEnvvarEndpoint = "https://service-envvar.endpoint.test/" + baseEnvvarEndpoint = "https://base-envvar.endpoint.test/" + serviceConfigFileEndpoint = "https://service-configfile.endpoint.test/" + baseConfigFileEndpoint = "https://base-configfile.endpoint.test/" +) + +const ( + packageName = "odb" + awsEnvVar = "AWS_ENDPOINT_URL_ODB" + baseEnvVar = "AWS_ENDPOINT_URL" + configParam = "odb" +) + +const ( + expectedCallRegion = "us-east-1" //lintignore:AWSAT003 +) + +func TestEndpointConfiguration(t *testing.T) { //nolint:paralleltest // uses t.Setenv + ctx := t.Context() + const providerRegion = "us-west-2" //lintignore:AWSAT003 + const expectedEndpointRegion = providerRegion + + testcases := map[string]endpointTestCase{ + "no config": { + with: []setupFunc{withNoConfig}, + expected: expectDefaultEndpoint(ctx, t, expectedEndpointRegion), + }, + + // Package name endpoint on Config + + "package name endpoint config": { + with: []setupFunc{ + withPackageNameEndpointInConfig, + }, + expected: expectPackageNameConfigEndpoint(), + }, + + "package name endpoint config overrides aws service envvar": { + with: []setupFunc{ + withPackageNameEndpointInConfig, + withAwsEnvVar, + }, + expected: expectPackageNameConfigEndpoint(), + }, + + "package name endpoint config overrides base envvar": { + with: []setupFunc{ + withPackageNameEndpointInConfig, + withBaseEnvVar, + }, + expected: expectPackageNameConfigEndpoint(), + }, + + "package name endpoint config overrides service config file": { + with: []setupFunc{ + withPackageNameEndpointInConfig, + withServiceEndpointInConfigFile, + }, + expected: expectPackageNameConfigEndpoint(), + }, + + "package name endpoint config overrides base config file": { + with: []setupFunc{ + withPackageNameEndpointInConfig, + withBaseEndpointInConfigFile, + }, + expected: expectPackageNameConfigEndpoint(), + }, + + // Service endpoint in AWS envvar + + "service aws envvar": { + with: []setupFunc{ + withAwsEnvVar, + }, + expected: expectAwsEnvVarEndpoint(), + }, + + "service aws envvar overrides base envvar": { + with: []setupFunc{ + withAwsEnvVar, + withBaseEnvVar, + }, + expected: expectAwsEnvVarEndpoint(), + }, + + "service aws envvar overrides service config file": { + with: []setupFunc{ + withAwsEnvVar, + withServiceEndpointInConfigFile, + }, + expected: expectAwsEnvVarEndpoint(), + }, + + "service aws envvar overrides base config file": { + with: []setupFunc{ + withAwsEnvVar, + withBaseEndpointInConfigFile, + }, + expected: expectAwsEnvVarEndpoint(), + }, + + // Base endpoint in envvar + + "base endpoint envvar": { + with: []setupFunc{ + withBaseEnvVar, + }, + expected: expectBaseEnvVarEndpoint(), + }, + + "base endpoint envvar overrides service config file": { + with: []setupFunc{ + withBaseEnvVar, + withServiceEndpointInConfigFile, + }, + expected: expectBaseEnvVarEndpoint(), + }, + + "base endpoint envvar overrides base config file": { + with: []setupFunc{ + withBaseEnvVar, + withBaseEndpointInConfigFile, + }, + expected: expectBaseEnvVarEndpoint(), + }, + + // Service endpoint in config file + + "service config file": { + with: []setupFunc{ + withServiceEndpointInConfigFile, + }, + expected: expectServiceConfigFileEndpoint(), + }, + + "service config file overrides base config file": { + with: []setupFunc{ + withServiceEndpointInConfigFile, + withBaseEndpointInConfigFile, + }, + expected: expectServiceConfigFileEndpoint(), + }, + + // Base endpoint in config file + + "base endpoint config file": { + with: []setupFunc{ + withBaseEndpointInConfigFile, + }, + expected: expectBaseConfigFileEndpoint(), + }, + + // Use FIPS endpoint on Config + + "use fips config": { + with: []setupFunc{ + withUseFIPSInConfig, + }, + expected: expectDefaultFIPSEndpoint(ctx, t, expectedEndpointRegion), + }, + + "use fips config with package name endpoint config": { + with: []setupFunc{ + withUseFIPSInConfig, + withPackageNameEndpointInConfig, + }, + expected: expectPackageNameConfigEndpoint(), + }, + } + + for name, testcase := range testcases { //nolint:paralleltest // uses t.Setenv + t.Run(name, func(t *testing.T) { + testEndpointCase(ctx, t, providerRegion, testcase, callService) + }) + } +} + +func defaultEndpoint(ctx context.Context, region string) (url.URL, error) { + r := odb.NewDefaultEndpointResolverV2() + + ep, err := r.ResolveEndpoint(ctx, odb.EndpointParameters{ + Region: aws.String(region), + }) + if err != nil { + return url.URL{}, err + } + + if ep.URI.Path == "" { + ep.URI.Path = "/" + } + + return ep.URI, nil +} + +func defaultFIPSEndpoint(ctx context.Context, region string) (url.URL, error) { + r := odb.NewDefaultEndpointResolverV2() + + ep, err := r.ResolveEndpoint(ctx, odb.EndpointParameters{ + Region: aws.String(region), + UseFIPS: aws.Bool(true), + }) + if err != nil { + return url.URL{}, err + } + + if ep.URI.Path == "" { + ep.URI.Path = "/" + } + + return ep.URI, nil +} + +func callService(ctx context.Context, t *testing.T, meta *conns.AWSClient) apiCallParams { + t.Helper() + + client := meta.ODBClient(ctx) + + var result apiCallParams + + input := odb.ListCloudExadataInfrastructuresInput{} + _, err := client.ListCloudExadataInfrastructures(ctx, &input, + func(opts *odb.Options) { + opts.APIOptions = append(opts.APIOptions, + addRetrieveEndpointURLMiddleware(t, &result.endpoint), + addRetrieveRegionMiddleware(&result.region), + addCancelRequestMiddleware(), + ) + }, + ) + if err == nil { + t.Fatal("Expected an error, got none") + } else if !errors.Is(err, errCancelOperation) { + t.Fatalf("Unexpected error: %s", err) + } + + return result +} + +func withNoConfig(_ *caseSetup) { + // no-op +} + +func withPackageNameEndpointInConfig(setup *caseSetup) { + if _, ok := setup.config[names.AttrEndpoints]; !ok { + setup.config[names.AttrEndpoints] = []any{ + map[string]any{}, + } + } + endpoints := setup.config[names.AttrEndpoints].([]any)[0].(map[string]any) + endpoints[packageName] = packageNameConfigEndpoint +} + +func withAwsEnvVar(setup *caseSetup) { + setup.environmentVariables[awsEnvVar] = awsServiceEnvvarEndpoint +} + +func withBaseEnvVar(setup *caseSetup) { + setup.environmentVariables[baseEnvVar] = baseEnvvarEndpoint +} + +func withServiceEndpointInConfigFile(setup *caseSetup) { + setup.configFile.serviceUrl = serviceConfigFileEndpoint +} + +func withBaseEndpointInConfigFile(setup *caseSetup) { + setup.configFile.baseUrl = baseConfigFileEndpoint +} + +func withUseFIPSInConfig(setup *caseSetup) { + setup.config["use_fips_endpoint"] = true +} + +func expectDefaultEndpoint(ctx context.Context, t *testing.T, region string) caseExpectations { + t.Helper() + + endpoint, err := defaultEndpoint(ctx, region) + if err != nil { + t.Fatalf("resolving accessanalyzer default endpoint: %s", err) + } + + return caseExpectations{ + endpoint: endpoint.String(), + region: expectedCallRegion, + } +} + +func expectDefaultFIPSEndpoint(ctx context.Context, t *testing.T, region string) caseExpectations { + t.Helper() + + endpoint, err := defaultFIPSEndpoint(ctx, region) + if err != nil { + t.Fatalf("resolving accessanalyzer FIPS endpoint: %s", err) + } + + hostname := endpoint.Hostname() + _, err = net.LookupHost(hostname) + if dnsErr, ok := errs.As[*net.DNSError](err); ok && dnsErr.IsNotFound { + return expectDefaultEndpoint(ctx, t, region) + } else if err != nil { + t.Fatalf("looking up accessanalyzer endpoint %q: %s", hostname, err) + } + + return caseExpectations{ + endpoint: endpoint.String(), + region: expectedCallRegion, + } +} + +func expectPackageNameConfigEndpoint() caseExpectations { + return caseExpectations{ + endpoint: packageNameConfigEndpoint, + region: expectedCallRegion, + } +} + +func expectAwsEnvVarEndpoint() caseExpectations { + return caseExpectations{ + endpoint: awsServiceEnvvarEndpoint, + region: expectedCallRegion, + } +} + +func expectBaseEnvVarEndpoint() caseExpectations { + return caseExpectations{ + endpoint: baseEnvvarEndpoint, + region: expectedCallRegion, + } +} + +func expectServiceConfigFileEndpoint() caseExpectations { + return caseExpectations{ + endpoint: serviceConfigFileEndpoint, + region: expectedCallRegion, + } +} + +func expectBaseConfigFileEndpoint() caseExpectations { + return caseExpectations{ + endpoint: baseConfigFileEndpoint, + region: expectedCallRegion, + } +} + +func testEndpointCase(ctx context.Context, t *testing.T, region string, testcase endpointTestCase, callF callFunc) { + t.Helper() + + setup := caseSetup{ + config: map[string]any{}, + environmentVariables: map[string]string{}, + } + + for _, f := range testcase.with { + f(&setup) + } + + config := map[string]any{ + names.AttrAccessKey: servicemocks.MockStaticAccessKey, + names.AttrSecretKey: servicemocks.MockStaticSecretKey, + names.AttrRegion: region, + names.AttrSkipCredentialsValidation: true, + names.AttrSkipRequestingAccountID: true, + } + + maps.Copy(config, setup.config) + + if setup.configFile.baseUrl != "" || setup.configFile.serviceUrl != "" { + config[names.AttrProfile] = "default" + tempDir := t.TempDir() + writeSharedConfigFile(t, &config, tempDir, generateSharedConfigFile(setup.configFile)) + } + + for k, v := range setup.environmentVariables { + t.Setenv(k, v) + } + + p, err := sdkv2.NewProvider(ctx) + if err != nil { + t.Fatal(err) + } + + p.TerraformVersion = "1.0.0" + + expectedDiags := testcase.expected.diags + diags := p.Configure(ctx, terraformsdk.NewResourceConfigRaw(config)) + + if diff := cmp.Diff(diags, expectedDiags, cmp.Comparer(sdkdiag.Comparer)); diff != "" { + t.Errorf("unexpected diagnostics difference: %s", diff) + } + + if diags.HasError() { + return + } + + meta := p.Meta().(*conns.AWSClient) + + callParams := callF(ctx, t, meta) + + if e, a := testcase.expected.endpoint, callParams.endpoint; e != a { + t.Errorf("expected endpoint %q, got %q", e, a) + } + + if e, a := testcase.expected.region, callParams.region; e != a { + t.Errorf("expected region %q, got %q", e, a) + } +} + +func addRetrieveEndpointURLMiddleware(t *testing.T, endpoint *string) func(*middleware.Stack) error { + return func(stack *middleware.Stack) error { + return stack.Finalize.Add( + retrieveEndpointURLMiddleware(t, endpoint), + middleware.After, + ) + } +} + +func retrieveEndpointURLMiddleware(t *testing.T, endpoint *string) middleware.FinalizeMiddleware { + return middleware.FinalizeMiddlewareFunc( + "Test: Retrieve Endpoint", + func(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) (middleware.FinalizeOutput, middleware.Metadata, error) { + t.Helper() + + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + t.Fatalf("Expected *github.com/aws/smithy-go/transport/http.Request, got %s", fullTypeName(in.Request)) + } + + url := request.URL + url.RawQuery = "" + url.Path = "/" + + *endpoint = url.String() + + return next.HandleFinalize(ctx, in) + }) +} + +func addRetrieveRegionMiddleware(region *string) func(*middleware.Stack) error { + return func(stack *middleware.Stack) error { + return stack.Serialize.Add( + retrieveRegionMiddleware(region), + middleware.After, + ) + } +} + +func retrieveRegionMiddleware(region *string) middleware.SerializeMiddleware { + return middleware.SerializeMiddlewareFunc( + "Test: Retrieve Region", + func(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (middleware.SerializeOutput, middleware.Metadata, error) { + *region = awsmiddleware.GetRegion(ctx) + + return next.HandleSerialize(ctx, in) + }, + ) +} + +var errCancelOperation = fmt.Errorf("Test: Canceling request") + +func addCancelRequestMiddleware() func(*middleware.Stack) error { + return func(stack *middleware.Stack) error { + return stack.Finalize.Add( + cancelRequestMiddleware(), + middleware.After, + ) + } +} + +// cancelRequestMiddleware creates a Smithy middleware that intercepts the request before sending and cancels it +func cancelRequestMiddleware() middleware.FinalizeMiddleware { + return middleware.FinalizeMiddlewareFunc( + "Test: Cancel Requests", + func(_ context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) (middleware.FinalizeOutput, middleware.Metadata, error) { + return middleware.FinalizeOutput{}, middleware.Metadata{}, errCancelOperation + }) +} + +func fullTypeName(i any) string { + return fullValueTypeName(reflect.ValueOf(i)) +} + +func fullValueTypeName(v reflect.Value) string { + if v.Kind() == reflect.Ptr { + return "*" + fullValueTypeName(reflect.Indirect(v)) + } + + requestType := v.Type() + return fmt.Sprintf("%s.%s", requestType.PkgPath(), requestType.Name()) +} + +func generateSharedConfigFile(config configFile) string { + var buf strings.Builder + + buf.WriteString(` +[default] +aws_access_key_id = DefaultSharedCredentialsAccessKey +aws_secret_access_key = DefaultSharedCredentialsSecretKey +`) + if config.baseUrl != "" { + fmt.Fprintf(&buf, "endpoint_url = %s\n", config.baseUrl) + } + + if config.serviceUrl != "" { + fmt.Fprintf(&buf, ` +services = endpoint-test + +[services endpoint-test] +%[1]s = + endpoint_url = %[2]s +`, configParam, serviceConfigFileEndpoint) + } + + return buf.String() +} + +func writeSharedConfigFile(t *testing.T, config *map[string]any, tempDir, content string) string { + t.Helper() + + file, err := os.Create(filepath.Join(tempDir, "aws-sdk-go-base-shared-configuration-file")) + if err != nil { + t.Fatalf("creating shared configuration file: %s", err) + } + + _, err = file.WriteString(content) + if err != nil { + t.Fatalf(" writing shared configuration file: %s", err) + } + + if v, ok := (*config)[names.AttrSharedConfigFiles]; !ok { + (*config)[names.AttrSharedConfigFiles] = []any{file.Name()} + } else { + (*config)[names.AttrSharedConfigFiles] = append(v.([]any), file.Name()) + } + + return file.Name() +} diff --git a/internal/service/odb/service_package.go b/internal/service/odb/service_package.go new file mode 100644 index 000000000000..32023faba3bc --- /dev/null +++ b/internal/service/odb/service_package.go @@ -0,0 +1,30 @@ +package odb + +import ( + "context" + "github.com/aws/aws-sdk-go-v2/aws" + "github.com/aws/aws-sdk-go-v2/service/odb" + "github.com/hashicorp/terraform-plugin-log/tflog" + "github.com/hashicorp/terraform-provider-aws/names" +) + +func (p *servicePackage) NewClient(ctx context.Context, config map[string]any) (*odb.Client, error) { + cfg := *(config["aws_sdkv2_config"].(*aws.Config)) + + return odb.NewFromConfig(cfg, + odb.WithEndpointResolverV2(newEndpointResolverV2()), + withBaseEndpoint(config[names.AttrEndpoint].(string)), + func(o *odb.Options) { + //if config["partition"].(string) == names.StandardPartitionID { + if cfg.Region != "\"us-east-1\"" { + tflog.Info(ctx, "overriding region", map[string]any{ + "original_region": cfg.Region, + "override_region": "us-east-1", + }) + o.Region = "us-east-1" + } + //} + o.BaseEndpoint = aws.String("https://gammaiad.capi.us-east-1.oracolo.alameda.aws.dev") + }, + ), nil +} diff --git a/internal/service/odb/service_package_gen.go b/internal/service/odb/service_package_gen.go new file mode 100644 index 000000000000..788c3bec952b --- /dev/null +++ b/internal/service/odb/service_package_gen.go @@ -0,0 +1,48 @@ +// Code generated by internal/generate/servicepackage/main.go; DO NOT EDIT. + +package odb + +import ( + "context" + "unique" + + "github.com/hashicorp/terraform-provider-aws/internal/conns" + inttypes "github.com/hashicorp/terraform-provider-aws/internal/types" + "github.com/hashicorp/terraform-provider-aws/names" +) + +type servicePackage struct{} + +func (p *servicePackage) FrameworkDataSources(ctx context.Context) []*inttypes.ServicePackageFrameworkDataSource { + return []*inttypes.ServicePackageFrameworkDataSource{} +} + +func (p *servicePackage) FrameworkResources(ctx context.Context) []*inttypes.ServicePackageFrameworkResource { + return []*inttypes.ServicePackageFrameworkResource{ + { + Factory: newResourceCloudExadataInfrastructure, + TypeName: "aws_odb_cloud_exadata_infrastructure", + Name: "Cloud Exadata Infrastructure", + Tags: unique.Make(inttypes.ServicePackageResourceTags{ + IdentifierAttribute: names.AttrARN, + }), + Region: unique.Make(inttypes.ResourceRegionDefault()), + }, + } +} + +func (p *servicePackage) SDKDataSources(ctx context.Context) []*inttypes.ServicePackageSDKDataSource { + return []*inttypes.ServicePackageSDKDataSource{} +} + +func (p *servicePackage) SDKResources(ctx context.Context) []*inttypes.ServicePackageSDKResource { + return []*inttypes.ServicePackageSDKResource{} +} + +func (p *servicePackage) ServicePackageName() string { + return names.ODB +} + +func ServicePackage(ctx context.Context) conns.ServicePackage { + return &servicePackage{} +} diff --git a/internal/service/odb/tags_gen.go b/internal/service/odb/tags_gen.go new file mode 100644 index 000000000000..bc4b9c504732 --- /dev/null +++ b/internal/service/odb/tags_gen.go @@ -0,0 +1,128 @@ +// Code generated by internal/generate/tags/main.go; DO NOT EDIT. +package odb + +import ( + "context" + "fmt" + + "github.com/aws/aws-sdk-go-v2/aws" + "github.com/aws/aws-sdk-go-v2/service/odb" + "github.com/hashicorp/terraform-plugin-log/tflog" + "github.com/hashicorp/terraform-provider-aws/internal/conns" + "github.com/hashicorp/terraform-provider-aws/internal/logging" + tftags "github.com/hashicorp/terraform-provider-aws/internal/tags" + "github.com/hashicorp/terraform-provider-aws/internal/types/option" + "github.com/hashicorp/terraform-provider-aws/names" +) + +// listTags lists odb service tags. +// The identifier is typically the Amazon Resource Name (ARN), although +// it may also be a different identifier depending on the service. +func listTags(ctx context.Context, conn *odb.Client, identifier string, optFns ...func(*odb.Options)) (tftags.KeyValueTags, error) { + input := odb.ListTagsForResourceInput{ + ResourceArn: aws.String(identifier), + } + + output, err := conn.ListTagsForResource(ctx, &input, optFns...) + + if err != nil { + return tftags.New(ctx, nil), err + } + + return keyValueTags(ctx, output.Tags), nil +} + +// ListTags lists odb service tags and set them in Context. +// It is called from outside this package. +func (p *servicePackage) ListTags(ctx context.Context, meta any, identifier string) error { + tags, err := listTags(ctx, meta.(*conns.AWSClient).ODBClient(ctx), identifier) + + if err != nil { + return err + } + + if inContext, ok := tftags.FromContext(ctx); ok { + inContext.TagsOut = option.Some(tags) + } + + return nil +} + +// map[string]string handling + +// svcTags returns odb service tags. +func svcTags(tags tftags.KeyValueTags) map[string]string { + return tags.Map() +} + +// keyValueTags creates tftags.KeyValueTags from odb service tags. +func keyValueTags(ctx context.Context, tags map[string]string) tftags.KeyValueTags { + return tftags.New(ctx, tags) +} + +// getTagsIn returns odb service tags from Context. +// nil is returned if there are no input tags. +func getTagsIn(ctx context.Context) map[string]string { + if inContext, ok := tftags.FromContext(ctx); ok { + if tags := svcTags(inContext.TagsIn.UnwrapOrDefault()); len(tags) > 0 { + return tags + } + } + + return nil +} + +// setTagsOut sets odb service tags in Context. +func setTagsOut(ctx context.Context, tags map[string]string) { + if inContext, ok := tftags.FromContext(ctx); ok { + inContext.TagsOut = option.Some(keyValueTags(ctx, tags)) + } +} + +// updateTags updates odb service tags. +// The identifier is typically the Amazon Resource Name (ARN), although +// it may also be a different identifier depending on the service. +func updateTags(ctx context.Context, conn *odb.Client, identifier string, oldTagsMap, newTagsMap any, optFns ...func(*odb.Options)) error { + oldTags := tftags.New(ctx, oldTagsMap) + newTags := tftags.New(ctx, newTagsMap) + + ctx = tflog.SetField(ctx, logging.KeyResourceId, identifier) + + removedTags := oldTags.Removed(newTags) + removedTags = removedTags.IgnoreSystem(names.ODB) + if len(removedTags) > 0 { + input := odb.UntagResourceInput{ + ResourceArn: aws.String(identifier), + TagKeys: removedTags.Keys(), + } + + _, err := conn.UntagResource(ctx, &input, optFns...) + + if err != nil { + return fmt.Errorf("untagging resource (%s): %w", identifier, err) + } + } + + updatedTags := oldTags.Updated(newTags) + updatedTags = updatedTags.IgnoreSystem(names.ODB) + if len(updatedTags) > 0 { + input := odb.TagResourceInput{ + ResourceArn: aws.String(identifier), + Tags: svcTags(updatedTags), + } + + _, err := conn.TagResource(ctx, &input, optFns...) + + if err != nil { + return fmt.Errorf("tagging resource (%s): %w", identifier, err) + } + } + + return nil +} + +// UpdateTags updates odb service tags. +// It is called from outside this package. +func (p *servicePackage) UpdateTags(ctx context.Context, meta any, identifier string, oldTags, newTags any) error { + return updateTags(ctx, meta.(*conns.AWSClient).ODBClient(ctx), identifier, oldTags, newTags) +} diff --git a/internal/sweep/service_packages_gen_test.go b/internal/sweep/service_packages_gen_test.go index a063d088e82d..b4930936066d 100644 --- a/internal/sweep/service_packages_gen_test.go +++ b/internal/sweep/service_packages_gen_test.go @@ -175,6 +175,7 @@ import ( "github.com/hashicorp/terraform-provider-aws/internal/service/notifications" "github.com/hashicorp/terraform-provider-aws/internal/service/notificationscontacts" "github.com/hashicorp/terraform-provider-aws/internal/service/oam" + "github.com/hashicorp/terraform-provider-aws/internal/service/odb" "github.com/hashicorp/terraform-provider-aws/internal/service/opensearch" "github.com/hashicorp/terraform-provider-aws/internal/service/opensearchserverless" "github.com/hashicorp/terraform-provider-aws/internal/service/organizations" @@ -430,6 +431,7 @@ func servicePackages(ctx context.Context) []conns.ServicePackage { notifications.ServicePackage(ctx), notificationscontacts.ServicePackage(ctx), oam.ServicePackage(ctx), + odb.ServicePackage(ctx), opensearch.ServicePackage(ctx), opensearchserverless.ServicePackage(ctx), organizations.ServicePackage(ctx), diff --git a/names/consts_gen.go b/names/consts_gen.go index aa6170eb2602..891ae53defe0 100644 --- a/names/consts_gen.go +++ b/names/consts_gen.go @@ -168,6 +168,7 @@ const ( NetworkMonitor = "networkmonitor" Notifications = "notifications" NotificationsContacts = "notificationscontacts" + ODB = "odb" ObservabilityAccessManager = "oam" OpenSearch = "opensearch" OpenSearchIngestion = "osis" @@ -423,6 +424,7 @@ const ( NetworkMonitorServiceID = "NetworkMonitor" NotificationsServiceID = "notifications" NotificationsContactsServiceID = "notificationscontacts" + ODBServiceID = "ODB" ObservabilityAccessManagerServiceID = "OAM" OpenSearchServiceID = "OpenSearch" OpenSearchIngestionServiceID = "OSIS" diff --git a/names/data/names_data.hcl b/names/data/names_data.hcl index 6a83a3386cfa..43181a66f6a7 100644 --- a/names/data/names_data.hcl +++ b/names/data/names_data.hcl @@ -9441,4 +9441,33 @@ service "evs" { provider_package_correct = "evs" doc_prefix = ["evs_"] brand = "Amazon" +} +service "odb" { + sdk { + id = "ODB" + arn_namespace = "odb" + } + names { + provider_name_upper = "ODB" + human_friendly = "Oracle Database@AWS" + } + endpoint_info { + endpoint_api_call = "ListCloudExadataInfrastructures" + endpoint_region_overrides = { + "aws" = "us-east-1" + } + } + go_packages { + v1_package = "" + v2_package = "odb" + } + client{ + skip_client_generate = true + } + resource_prefix{ + correct = "aws_odb_" + } + provider_package_correct = "odb" + doc_prefix = ["odb_"] + brand = "AWS" } \ No newline at end of file diff --git a/website/allowed-subcategories.txt b/website/allowed-subcategories.txt index 45c4b8b75701..cd54f7ea7596 100644 --- a/website/allowed-subcategories.txt +++ b/website/allowed-subcategories.txt @@ -174,6 +174,7 @@ Network Manager OpenSearch OpenSearch Ingestion OpenSearch Serverless +Oracle Database@AWS Organizations Outposts Outposts (EC2) diff --git a/website/docs/guides/custom-service-endpoints.html.markdown b/website/docs/guides/custom-service-endpoints.html.markdown index 1bc7580337e4..ee8b28828e8b 100644 --- a/website/docs/guides/custom-service-endpoints.html.markdown +++ b/website/docs/guides/custom-service-endpoints.html.markdown @@ -250,6 +250,7 @@ provider "aws" { |User Notifications|`notifications`|`AWS_ENDPOINT_URL_NOTIFICATIONS`|`notifications`| |User Notifications Contacts|`notificationscontacts`|`AWS_ENDPOINT_URL_NOTIFICATIONSCONTACTS`|`notificationscontacts`| |CloudWatch Observability Access Manager|`oam`(or `cloudwatchobservabilityaccessmanager`)|`AWS_ENDPOINT_URL_OAM`|`oam`| +|Oracle Database@AWS|`odb`|`AWS_ENDPOINT_URL_ODB`|`odb`| |OpenSearch|`opensearch`(or `opensearchservice`)|`AWS_ENDPOINT_URL_OPENSEARCH`|`opensearch`| |OpenSearch Serverless|`opensearchserverless`|`AWS_ENDPOINT_URL_OPENSEARCHSERVERLESS`|`opensearchserverless`| |Organizations|`organizations`|`AWS_ENDPOINT_URL_ORGANIZATIONS`|`organizations`| diff --git a/website/docs/r/odb_cloud_exadata_infrastructure.html.markdown b/website/docs/r/odb_cloud_exadata_infrastructure.html.markdown new file mode 100644 index 000000000000..bc72d5c9a32b --- /dev/null +++ b/website/docs/r/odb_cloud_exadata_infrastructure.html.markdown @@ -0,0 +1,72 @@ +--- +subcategory: "Oracle Database@AWS" +layout: "aws" +page_title: "AWS: aws_odb_cloud_exadata_infrastructure" +description: |- + Manages an AWS Oracle Database@AWS Cloud Exadata Infrastructure. +--- + + +# Resource: aws_odb_cloud_exadata_infrastructure + +Manages an AWS Oracle Database@AWS Cloud Exadata Infrastructure. + +## Example Usage + +### Basic Usage + +```terraform +resource "aws_odb_cloud_exadata_infrastructure" "example" { +} +``` + +## Argument Reference + +The following arguments are required: + +* `example_arg` - (Required) Brief description of the required argument. + +The following arguments are optional: + +* `optional_arg` - (Optional) Brief description of the optional argument. + +## Attribute Reference + +This resource exports the following attributes in addition to the arguments above: + +* `arn` - ARN of the Cloud Exadata Infrastructure. +* `example_attribute` - Brief description of the attribute. + +## Timeouts + +[Configuration options](https://developer.hashicorp.com/terraform/language/resources/syntax#operation-timeouts): + +* `create` - (Default `60m`) +* `update` - (Default `180m`) +* `delete` - (Default `90m`) + +## Import + +In Terraform v1.5.0 and later, use an [`import` block](https://developer.hashicorp.com/terraform/language/import) to import Oracle Database@AWS Cloud Exadata Infrastructure using the `example_id_arg`. For example: + +```terraform +import { + to = aws_odb_cloud_exadata_infrastructure.example + id = "cloud_exadata_infrastructure-id-12345678" +} +``` + +Using `terraform import`, import Oracle Database@AWS Cloud Exadata Infrastructure using the `example_id_arg`. For example: + +```console +% terraform import aws_odb_cloud_exadata_infrastructure.example cloud_exadata_infrastructure-id-12345678 +``` diff --git a/website/docs/r/odb_exa_infra.html.markdown b/website/docs/r/odb_exa_infra.html.markdown new file mode 100644 index 000000000000..f52a8ff927b8 --- /dev/null +++ b/website/docs/r/odb_exa_infra.html.markdown @@ -0,0 +1,72 @@ +--- +subcategory: "Oracle Database@AWS" +layout: "aws" +page_title: "AWS: aws_odb_exa_infra" +description: |- + Manages an AWS Oracle Database@AWS Exa Infra. +--- + + +# Resource: aws_odb_exa_infra + +Manages an AWS Oracle Database@AWS Exa Infra. + +## Example Usage + +### Basic Usage + +```terraform +resource "aws_odb_exa_infra" "example" { +} +``` + +## Argument Reference + +The following arguments are required: + +* `example_arg` - (Required) Brief description of the required argument. + +The following arguments are optional: + +* `optional_arg` - (Optional) Brief description of the optional argument. + +## Attribute Reference + +This resource exports the following attributes in addition to the arguments above: + +* `arn` - ARN of the Exa Infra. +* `example_attribute` - Brief description of the attribute. + +## Timeouts + +[Configuration options](https://developer.hashicorp.com/terraform/language/resources/syntax#operation-timeouts): + +* `create` - (Default `60m`) +* `update` - (Default `180m`) +* `delete` - (Default `90m`) + +## Import + +In Terraform v1.5.0 and later, use an [`import` block](https://developer.hashicorp.com/terraform/language/import) to import Oracle Database@AWS Exa Infra using the `example_id_arg`. For example: + +```terraform +import { + to = aws_odb_exa_infra.example + id = "exa_infra-id-12345678" +} +``` + +Using `terraform import`, import Oracle Database@AWS Exa Infra using the `example_id_arg`. For example: + +```console +% terraform import aws_odb_exa_infra.example exa_infra-id-12345678 +``` From 5c9fc7e2bb9bb486872a568d755cd8fcd4b7097d Mon Sep 17 00:00:00 2001 From: Asim Date: Mon, 14 Jul 2025 12:27:33 +0100 Subject: [PATCH 348/365] updated few more test cases --- .../odb/cloud_exadata_infrastructure.go | 17 ++ .../odb/cloud_exadata_infrastructure_test.go | 197 +++++++++++++++++- 2 files changed, 210 insertions(+), 4 deletions(-) diff --git a/internal/service/odb/cloud_exadata_infrastructure.go b/internal/service/odb/cloud_exadata_infrastructure.go index d1df360f6a1d..4119bdc4e782 100644 --- a/internal/service/odb/cloud_exadata_infrastructure.go +++ b/internal/service/odb/cloud_exadata_infrastructure.go @@ -59,6 +59,8 @@ const ( ExaInfraDBServerTypeNotAvailable = "DB_Server_Type_NA" ) +var ResourceCloudExadataInfrastructure = newResourceCloudExadataInfrastructure + type resourceCloudExadataInfrastructure struct { framework.ResourceWithModel[cloudExadataInfrastructureResourceModel] framework.WithTimeouts @@ -728,6 +730,11 @@ func (r *resourceCloudExadataInfrastructure) expandMaintenanceWindow(ctx context hasError = true err = errors.Join(err, errors.New("default maintenance window can't have months with values")) } + odbTypeMW.DaysOfWeek = nil + odbTypeMW.HoursOfDay = nil + odbTypeMW.WeeksOfMonth = nil + odbTypeMW.Months = nil + odbTypeMW.LeadTimeInWeeks = nil } if hasError { @@ -790,6 +797,16 @@ func (r *resourceCloudExadataInfrastructure) flattenMaintenanceWindow(ctx contex Preference: fwtypes.StringEnumValue(obdExaInfraMW.Preference), WeeksOfMonth: weeksOfMonthRead, } + if obdExaInfraMW.LeadTimeInWeeks == nil { + flattenMW.LeadTimeInWeeks = types.Int32Value(0) + } + if obdExaInfraMW.CustomActionTimeoutInMins == nil { + flattenMW.CustomActionTimeoutInMins = types.Int32Value(0) + } + if obdExaInfraMW.IsCustomActionTimeoutEnabled == nil { + flattenMW.IsCustomActionTimeoutEnabled = types.BoolValue(false) + } + result, _ := fwtypes.NewObjectValueOf[cloudExadataInfraMaintenanceWindowResourceModel](ctx, &flattenMW) return result } diff --git a/internal/service/odb/cloud_exadata_infrastructure_test.go b/internal/service/odb/cloud_exadata_infrastructure_test.go index e6cb20e64670..09627b089939 100644 --- a/internal/service/odb/cloud_exadata_infrastructure_test.go +++ b/internal/service/odb/cloud_exadata_infrastructure_test.go @@ -41,6 +41,7 @@ import ( "github.com/hashicorp/terraform-provider-aws/internal/create" tfodb "github.com/hashicorp/terraform-provider-aws/internal/service/odb" "github.com/hashicorp/terraform-provider-aws/internal/tfresource" + "strings" "testing" "github.com/aws/aws-sdk-go-v2/service/odb" @@ -95,6 +96,39 @@ var exaInfraTestResource = cloudExaDataInfraResourceTest{ displayNamePrefix: "Ofake-exa", } +func TestAccODBCloudExadataInfrastructureCreate_basic(t *testing.T) { + ctx := acctest.Context(t) + + if testing.Short() { + t.Skip("skipping long-running test in short mode") + } + + var cloudExaDataInfrastructure odbtypes.CloudExadataInfrastructure + resourceName := "aws_odb_cloud_exadata_infrastructure.test" + rName := sdkacctest.RandomWithPrefix(exaInfraTestResource.displayNamePrefix) + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { + acctest.PreCheck(ctx, t) + exaInfraTestResource.testAccPreCheck(ctx, t) + }, + ErrorCheck: acctest.ErrorCheck(t, names.ODBServiceID), + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + CheckDestroy: exaInfraTestResource.testAccCheckCloudExaDataInfraDestroyed(ctx), + Steps: []resource.TestStep{ + { + Config: exaInfraTestResource.exaDataInfraResourceBasicConfig(rName), + Check: resource.ComposeAggregateTestCheckFunc( + exaInfraTestResource.testAccCheckCloudExadataInfrastructureExists(ctx, resourceName, &cloudExaDataInfrastructure), + ), + }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} func TestAccODBCloudExadataInfrastructureCreateWithAllParameters(t *testing.T) { ctx := acctest.Context(t) @@ -129,6 +163,111 @@ func TestAccODBCloudExadataInfrastructureCreateWithAllParameters(t *testing.T) { }) } +func TestAccODBCloudExadataInfrastructureTagging(t *testing.T) { + ctx := acctest.Context(t) + if testing.Short() { + t.Skip("skipping long-running test in short mode") + } + + var cloudExaDataInfrastructure1 odbtypes.CloudExadataInfrastructure + var cloudExaDataInfrastructure2 odbtypes.CloudExadataInfrastructure + var cloudExaDataInfrastructure3 odbtypes.CloudExadataInfrastructure + resourceName := "aws_odb_cloud_exadata_infrastructure.test" + rName := sdkacctest.RandomWithPrefix(exaInfraTestResource.displayNamePrefix) + resource.Test(t, resource.TestCase{ + PreCheck: func() { + acctest.PreCheck(ctx, t) + //testAccPreCheck(ctx, t) + }, + ErrorCheck: acctest.ErrorCheck(t, names.ODBServiceID), + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + CheckDestroy: exaInfraTestResource.testAccCheckCloudExaDataInfraDestroyed(ctx), + Steps: []resource.TestStep{ + { + Config: exaInfraTestResource.exaDataInfraResourceBasicConfig(rName), + Check: resource.ComposeAggregateTestCheckFunc( + exaInfraTestResource.testAccCheckCloudExadataInfrastructureExists(ctx, resourceName, &cloudExaDataInfrastructure1), + resource.TestCheckResourceAttr(resourceName, "tags.%", "0"), + ), + }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + { + Config: exaInfraTestResource.exaDataInfraResourceBasicConfigAddTags(rName), + Check: resource.ComposeAggregateTestCheckFunc( + exaInfraTestResource.testAccCheckCloudExadataInfrastructureExists(ctx, resourceName, &cloudExaDataInfrastructure2), + resource.ComposeTestCheckFunc(func(state *terraform.State) error { + if strings.Compare(*(cloudExaDataInfrastructure1.CloudExadataInfrastructureId), *(cloudExaDataInfrastructure2.CloudExadataInfrastructureId)) != 0 { + return errors.New("Should not create a new cloud exa basicExaInfraDataSource after update") + } + return nil + }), + resource.TestCheckResourceAttr(resourceName, "tags.%", "1"), + resource.TestCheckResourceAttr(resourceName, "tags.env", "dev"), + ), + }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + { + Config: exaInfraTestResource.exaDataInfraResourceBasicConfigRemoveTags(rName), + Check: resource.ComposeAggregateTestCheckFunc( + exaInfraTestResource.testAccCheckCloudExadataInfrastructureExists(ctx, resourceName, &cloudExaDataInfrastructure3), + resource.ComposeTestCheckFunc(func(state *terraform.State) error { + if strings.Compare(*(cloudExaDataInfrastructure1.CloudExadataInfrastructureId), *(cloudExaDataInfrastructure3.CloudExadataInfrastructureId)) != 0 { + return errors.New("Should not create a new cloud exa basicExaInfraDataSource after update") + } + return nil + }), + resource.TestCheckResourceAttr(resourceName, "tags.%", "0"), + ), + }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} + +func TestAccODBCloudExadataInfrastructure_disappears(t *testing.T) { + ctx := acctest.Context(t) + if testing.Short() { + t.Skip("skipping long-running test in short mode") + } + + var cloudExaDataInfrastructure odbtypes.CloudExadataInfrastructure + + rName := sdkacctest.RandomWithPrefix("") + resourceName := "aws_odb_cloud_exadata_infrastructure.test" + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { + acctest.PreCheck(ctx, t) + //testAccPreCheck(ctx, t) + }, + ErrorCheck: acctest.ErrorCheck(t, names.ODBServiceID), + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + CheckDestroy: exaInfraTestResource.testAccCheckCloudExaDataInfraDestroyed(ctx), + Steps: []resource.TestStep{ + { + Config: exaInfraTestResource.exaDataInfraResourceBasicConfig(rName), + Check: resource.ComposeTestCheckFunc( + exaInfraTestResource.testAccCheckCloudExadataInfrastructureExists(ctx, resourceName, &cloudExaDataInfrastructure), + acctest.CheckFrameworkResourceDisappears(ctx, acctest.Provider, tfodb.ResourceCloudExadataInfrastructure, resourceName), + ), + ExpectNonEmptyPlan: true, + }, + }, + }) +} + func (cloudExaDataInfraResourceTest) testAccCheckCloudExaDataInfraDestroyed(ctx context.Context) resource.TestCheckFunc { return func(s *terraform.State) error { conn := acctest.Provider.Meta().(*conns.AWSClient).ODBClient(ctx) @@ -261,11 +400,61 @@ resource "aws_odb_cloud_exadata_infrastructure" "test" { days_of_week = [] hours_of_day = [] is_custom_action_timeout_enabled = true - lead_time_in_weeks = 3 - months = ["FEBRUARY","MAY","AUGUST","NOVEMBER"] + lead_time_in_weeks = 0 + months = [] patching_mode = "ROLLING" - preference = "CUSTOM_PREFERENCE" - weeks_of_month =[2,4] + preference = "NO_PREFERENCE" + weeks_of_month =[] + } +} +`, displayName) + return exaInfra +} +func (cloudExaDataInfraResourceTest) exaDataInfraResourceBasicConfigAddTags(displayName string) string { + exaInfra := fmt.Sprintf(` +resource "aws_odb_cloud_exadata_infrastructure" "test" { + display_name = %[1]q + shape = "Exadata.X9M" + storage_count = 3 + compute_count = 2 + availability_zone_id = "use1-az6" +maintenance_window = { + custom_action_timeout_in_mins = 16 + days_of_week = [] + hours_of_day = [] + is_custom_action_timeout_enabled = true + lead_time_in_weeks = 0 + months = [] + patching_mode = "ROLLING" + preference = "NO_PREFERENCE" + weeks_of_month =[] + } + tags = { + "env"= "dev" + } +} +`, displayName) + return exaInfra +} + +func (cloudExaDataInfraResourceTest) exaDataInfraResourceBasicConfigRemoveTags(displayName string) string { + exaInfra := fmt.Sprintf(` +resource "aws_odb_cloud_exadata_infrastructure" "test" { + display_name = %[1]q + shape = "Exadata.X9M" + storage_count = 3 + compute_count = 2 + availability_zone_id = "use1-az6" +maintenance_window = { + custom_action_timeout_in_mins = 16 + days_of_week = [] + hours_of_day = [] + is_custom_action_timeout_enabled = true + lead_time_in_weeks = 0 + months = [] + patching_mode = "ROLLING" + preference = "NO_PREFERENCE" + weeks_of_month =[] } } `, displayName) From a130ee7c552125b8d966c12c39e54872f65bd186 Mon Sep 17 00:00:00 2001 From: Asim Date: Mon, 14 Jul 2025 14:18:29 +0100 Subject: [PATCH 349/365] odb network and network peering --- ...loud_exadata_infrastructure_data_source.go | 391 ++++++++ ...exadata_infrastructure_data_source_test.go | 108 +++ internal/service/odb/network.go | 862 ++++++++++++++++++ internal/service/odb/network_data_source.go | 242 +++++ .../service/odb/network_data_source_test.go | 156 ++++ .../service/odb/network_peering_connection.go | 481 ++++++++++ .../network_peering_connection_data_source.go | 141 +++ ...ork_peering_connection_data_source_test.go | 213 +++++ .../odb/network_peering_connection_test.go | 336 +++++++ internal/service/odb/network_test.go | 494 ++++++++++ internal/service/odb/service_package_gen.go | 39 +- 11 files changed, 3462 insertions(+), 1 deletion(-) create mode 100644 internal/service/odb/cloud_exadata_infrastructure_data_source.go create mode 100644 internal/service/odb/cloud_exadata_infrastructure_data_source_test.go create mode 100644 internal/service/odb/network.go create mode 100644 internal/service/odb/network_data_source.go create mode 100644 internal/service/odb/network_data_source_test.go create mode 100644 internal/service/odb/network_peering_connection.go create mode 100644 internal/service/odb/network_peering_connection_data_source.go create mode 100644 internal/service/odb/network_peering_connection_data_source_test.go create mode 100644 internal/service/odb/network_peering_connection_test.go create mode 100644 internal/service/odb/network_test.go diff --git a/internal/service/odb/cloud_exadata_infrastructure_data_source.go b/internal/service/odb/cloud_exadata_infrastructure_data_source.go new file mode 100644 index 000000000000..d8b2780b4f7d --- /dev/null +++ b/internal/service/odb/cloud_exadata_infrastructure_data_source.go @@ -0,0 +1,391 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +package odb + +import ( + "context" + "github.com/hashicorp/terraform-plugin-framework/attr" + "github.com/hashicorp/terraform-plugin-framework/types/basetypes" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" + "github.com/hashicorp/terraform-provider-aws/internal/errs" + tftags "github.com/hashicorp/terraform-provider-aws/internal/tags" + "github.com/hashicorp/terraform-provider-aws/internal/tfresource" + "time" + + "github.com/aws/aws-sdk-go-v2/aws" + "github.com/aws/aws-sdk-go-v2/service/odb" + odbtypes "github.com/aws/aws-sdk-go-v2/service/odb/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/create" + "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/names" +) + +// Function annotations are used for datasource registration to the Provider. DO NOT EDIT. +// @FrameworkDataSource("aws_odb_cloud_exadata_infrastructure", name="Cloud Exadata Infrastructure") +func newDataSourceCloudExadataInfrastructure(context.Context) (datasource.DataSourceWithConfigure, error) { + return &dataSourceCloudExadataInfrastructure{}, nil +} + +const ( + DSNameCloudExadataInfrastructure = "Cloud Exadata Infrastructure Data Source" +) + +type dataSourceCloudExadataInfrastructure struct { + framework.DataSourceWithModel[cloudExadataInfrastructureDataSourceModel] +} + +func (d *dataSourceCloudExadataInfrastructure) Schema(ctx context.Context, req datasource.SchemaRequest, resp *datasource.SchemaResponse) { + statusType := fwtypes.StringEnumType[odbtypes.ResourceStatus]() + computeModelType := fwtypes.StringEnumType[odbtypes.ComputeModel]() + resp.Schema = schema.Schema{ + Attributes: map[string]schema.Attribute{ + "activated_storage_count": schema.Int32Attribute{ + Computed: true, + Description: "The number of storage servers requested for the Exadata infrastructure.", + }, + "additional_storage_count": schema.Int32Attribute{ + Computed: true, + Description: "The number of storage servers requested for the Exadata infrastructure.", + }, + "available_storage_size_in_gbs": schema.Int32Attribute{ + Computed: true, + Description: "The amount of available storage, in gigabytes (GB), for the Exadata infrastructure.", + }, + "availability_zone": schema.StringAttribute{ + Computed: true, + Description: "he name of the Availability Zone (AZ) where the Exadata infrastructure is located.", + }, + "availability_zone_id": schema.StringAttribute{ + Computed: true, + Description: "The AZ ID of the AZ where the Exadata infrastructure is located.", + }, + names.AttrARN: schema.StringAttribute{ + Computed: true, + Description: "The Amazon Resource Name (ARN) for the Exadata infrastructure.", + }, + names.AttrID: schema.StringAttribute{ + Required: true, + Description: "The unique identifier of the Exadata infrastructure.", + }, + "compute_count": schema.Int32Attribute{ + Computed: true, + }, + "cpu_count": schema.Int32Attribute{ + Computed: true, + }, + "data_storage_size_in_tbs": schema.Float64Attribute{ + Computed: true, + }, + "db_node_storage_size_in_gbs": schema.Int32Attribute{ + Computed: true, + }, + "db_server_version": schema.StringAttribute{ + Computed: true, + }, + "display_name": schema.StringAttribute{ + Computed: true, + }, + "last_maintenance_run_id": schema.StringAttribute{ + Computed: true, + }, + "max_cpu_count": schema.Int32Attribute{ + Computed: true, + }, + "max_data_storage_in_tbs": schema.Float64Attribute{ + Computed: true, + }, + "max_db_node_storage_size_in_gbs": schema.Int32Attribute{ + Computed: true, + }, + "max_memory_in_gbs": schema.Int32Attribute{ + Computed: true, + }, + "memory_size_in_gbs": schema.Int32Attribute{ + Computed: true, + }, + "monthly_db_server_version": schema.StringAttribute{ + Computed: true, + }, + "monthly_storage_server_version": schema.StringAttribute{ + Computed: true, + }, + "next_maintenance_run_id": schema.StringAttribute{ + Computed: true, + }, + "oci_resource_anchor_name": schema.StringAttribute{ + Computed: true, + }, + "oci_url": schema.StringAttribute{ + Computed: true, + }, + "ocid": schema.StringAttribute{ + Computed: true, + }, + "percent_progress": schema.Float64Attribute{ + Computed: true, + }, + "shape": schema.StringAttribute{ + Computed: true, + }, + "status": schema.StringAttribute{ + CustomType: statusType, + Computed: true, + }, + "status_reason": schema.StringAttribute{ + Computed: true, + }, + "storage_count": schema.Int32Attribute{ + Computed: true, + }, + "storage_server_version": schema.StringAttribute{ + Computed: true, + }, + "total_storage_size_in_gbs": schema.Int32Attribute{ + Computed: true, + }, + "compute_model": schema.StringAttribute{ + CustomType: computeModelType, + Computed: true, + }, + "created_at": schema.StringAttribute{ + Computed: true, + }, + "database_server_type": schema.StringAttribute{ + Computed: true, + }, + "storage_server_type": schema.StringAttribute{ + Computed: true, + }, + names.AttrTags: tftags.TagsAttributeComputedOnly(), + "maintenance_window": schema.ObjectAttribute{ + Computed: true, + CustomType: fwtypes.NewObjectTypeOf[cloudExadataInfraMaintenanceWindowDataSourceModel](ctx), + + AttributeTypes: map[string]attr.Type{ + "custom_action_timeout_in_mins": types.Int32Type, + "days_of_week": types.SetType{ + ElemType: fwtypes.StringEnumType[odbtypes.DayOfWeekName](), + }, + "hours_of_day": types.SetType{ + ElemType: types.Int32Type, + }, + "is_custom_action_timeout_enabled": types.BoolType, + "lead_time_in_weeks": types.Int32Type, + "months": types.SetType{ + ElemType: fwtypes.StringEnumType[odbtypes.MonthName](), + }, + "patching_mode": fwtypes.StringEnumType[odbtypes.PatchingModeType](), + "preference": fwtypes.StringEnumType[odbtypes.PreferenceType](), + "weeks_of_month": types.SetType{ + ElemType: types.Int32Type, + }, + }, + }, + }, + Blocks: map[string]schema.Block{ + "customer_contacts_to_send_to_oci": schema.SetNestedBlock{ + CustomType: fwtypes.NewSetNestedObjectTypeOf[customerContactDataSourceModel](ctx), + NestedObject: schema.NestedBlockObject{ + Attributes: map[string]schema.Attribute{ + "email": schema.StringAttribute{ + Computed: true, + }, + }, + }, + }, + }, + } +} + +func (d *dataSourceCloudExadataInfrastructure) Read(ctx context.Context, req datasource.ReadRequest, resp *datasource.ReadResponse) { + conn := d.Meta().ODBClient(ctx) + + var data cloudExadataInfrastructureDataSourceModel + resp.Diagnostics.Append(req.Config.Get(ctx, &data)...) + if resp.Diagnostics.HasError() { + return + } + + out, err := FindOdbExaDataInfraForDataSourceByID(ctx, conn, data.CloudExadataInfrastructureId.ValueString()) + if err != nil { + resp.Diagnostics.AddError( + create.ProblemStandardMessage(names.ODB, create.ErrActionReading, DSNameCloudExadataInfrastructure, data.CloudExadataInfrastructureId.String(), err), + err.Error(), + ) + return + } + tagsRead, err := listTags(ctx, conn, *out.CloudExadataInfrastructureArn) + if err != nil { + resp.Diagnostics.AddError( + create.ProblemStandardMessage(names.ODB, create.ErrActionReading, DSNameCloudExadataInfrastructure, data.CloudExadataInfrastructureId.String(), err), + err.Error(), + ) + return + } + if tagsRead != nil { + data.Tags = tftags.FlattenStringValueMap(ctx, tagsRead.Map()) + } + data.CreatedAt = types.StringValue(out.CreatedAt.Format(time.RFC3339)) + data.MaintenanceWindow = d.flattenMaintenanceWindow(ctx, out.MaintenanceWindow) + resp.Diagnostics.Append(flex.Flatten(ctx, out, &data)...) + if resp.Diagnostics.HasError() { + return + } + + resp.Diagnostics.Append(resp.State.Set(ctx, &data)...) +} + +func FindOdbExaDataInfraForDataSourceByID(ctx context.Context, conn *odb.Client, id string) (*odbtypes.CloudExadataInfrastructure, error) { + input := odb.GetCloudExadataInfrastructureInput{ + CloudExadataInfrastructureId: aws.String(id), + } + + out, err := conn.GetCloudExadataInfrastructure(ctx, &input) + if err != nil { + if errs.IsA[*odbtypes.ResourceNotFoundException](err) { + return nil, &retry.NotFoundError{ + LastError: err, + LastRequest: &input, + } + } + + return nil, err + } + + if out == nil || out.CloudExadataInfrastructure == nil { + return nil, tfresource.NewEmptyResultError(&input) + } + + return out.CloudExadataInfrastructure, nil +} + +func (d *dataSourceCloudExadataInfrastructure) flattenMaintenanceWindow(ctx context.Context, obdExaInfraMW *odbtypes.MaintenanceWindow) fwtypes.ObjectValueOf[cloudExadataInfraMaintenanceWindowDataSourceModel] { + //days of week + daysOfWeek := make([]attr.Value, 0, len(obdExaInfraMW.DaysOfWeek)) + for _, dayOfWeek := range obdExaInfraMW.DaysOfWeek { + dayOfWeekStringValue := fwtypes.StringEnumValue(dayOfWeek.Name).StringValue + daysOfWeek = append(daysOfWeek, dayOfWeekStringValue) + } + setValueOfDaysOfWeek, _ := basetypes.NewSetValue(types.StringType, daysOfWeek) + daysOfWeekRead := fwtypes.SetValueOf[fwtypes.StringEnum[odbtypes.DayOfWeekName]]{ + SetValue: setValueOfDaysOfWeek, + } + //hours of the day + hoursOfTheDay := make([]attr.Value, 0, len(obdExaInfraMW.HoursOfDay)) + for _, hourOfTheDay := range obdExaInfraMW.HoursOfDay { + daysOfWeekInt32Value := types.Int32Value(hourOfTheDay) + hoursOfTheDay = append(hoursOfTheDay, daysOfWeekInt32Value) + } + setValuesOfHoursOfTheDay, _ := basetypes.NewSetValue(types.Int32Type, hoursOfTheDay) + hoursOfTheDayRead := fwtypes.SetValueOf[types.Int64]{ + SetValue: setValuesOfHoursOfTheDay, + } + //months + months := make([]attr.Value, 0, len(obdExaInfraMW.Months)) + for _, month := range obdExaInfraMW.Months { + monthStringValue := fwtypes.StringEnumValue(month.Name).StringValue + months = append(months, monthStringValue) + } + setValuesOfMonth, _ := basetypes.NewSetValue(types.StringType, months) + monthsRead := fwtypes.SetValueOf[fwtypes.StringEnum[odbtypes.MonthName]]{ + SetValue: setValuesOfMonth, + } + //weeks of month + weeksOfMonth := make([]attr.Value, 0, len(obdExaInfraMW.WeeksOfMonth)) + for _, weekOfMonth := range obdExaInfraMW.WeeksOfMonth { + weeksOfMonthInt32Value := types.Int32Value(weekOfMonth) + weeksOfMonth = append(weeksOfMonth, weeksOfMonthInt32Value) + } + setValuesOfWeekOfMonth, _ := basetypes.NewSetValue(types.Int32Type, weeksOfMonth) + weeksOfMonthRead := fwtypes.SetValueOf[types.Int64]{ + SetValue: setValuesOfWeekOfMonth, + } + + flattenMW := cloudExadataInfraMaintenanceWindowDataSourceModel{ + CustomActionTimeoutInMins: types.Int32PointerValue(obdExaInfraMW.CustomActionTimeoutInMins), + DaysOfWeek: daysOfWeekRead, + HoursOfDay: hoursOfTheDayRead, + IsCustomActionTimeoutEnabled: types.BoolPointerValue(obdExaInfraMW.IsCustomActionTimeoutEnabled), + LeadTimeInWeeks: types.Int32PointerValue(obdExaInfraMW.LeadTimeInWeeks), + Months: monthsRead, + PatchingMode: fwtypes.StringEnumValue(obdExaInfraMW.PatchingMode), + Preference: fwtypes.StringEnumValue(obdExaInfraMW.Preference), + WeeksOfMonth: weeksOfMonthRead, + } + if obdExaInfraMW.LeadTimeInWeeks == nil { + flattenMW.LeadTimeInWeeks = types.Int32Value(0) + } + if obdExaInfraMW.CustomActionTimeoutInMins == nil { + flattenMW.CustomActionTimeoutInMins = types.Int32Value(0) + } + if obdExaInfraMW.IsCustomActionTimeoutEnabled == nil { + flattenMW.IsCustomActionTimeoutEnabled = types.BoolValue(false) + } + + result, _ := fwtypes.NewObjectValueOf[cloudExadataInfraMaintenanceWindowDataSourceModel](ctx, &flattenMW) + return result +} + +type cloudExadataInfrastructureDataSourceModel struct { + framework.WithRegionModel + ActivatedStorageCount types.Int32 `tfsdk:"activated_storage_count"` + AdditionalStorageCount types.Int32 `tfsdk:"additional_storage_count"` + AvailabilityZone types.String `tfsdk:"availability_zone"` + AvailabilityZoneId types.String `tfsdk:"availability_zone_id"` + AvailableStorageSizeInGBs types.Int32 `tfsdk:"available_storage_size_in_gbs"` + CloudExadataInfrastructureArn types.String `tfsdk:"arn"` + CloudExadataInfrastructureId types.String `tfsdk:"id"` + ComputeCount types.Int32 `tfsdk:"compute_count"` + CpuCount types.Int32 `tfsdk:"cpu_count"` + DataStorageSizeInTBs types.Float64 `tfsdk:"data_storage_size_in_tbs"` + DbNodeStorageSizeInGBs types.Int32 `tfsdk:"db_node_storage_size_in_gbs"` + DbServerVersion types.String `tfsdk:"db_server_version"` + DisplayName types.String `tfsdk:"display_name"` + LastMaintenanceRunId types.String `tfsdk:"last_maintenance_run_id"` + MaxCpuCount types.Int32 `tfsdk:"max_cpu_count"` + MaxDataStorageInTBs types.Float64 `tfsdk:"max_data_storage_in_tbs"` + MaxDbNodeStorageSizeInGBs types.Int32 `tfsdk:"max_db_node_storage_size_in_gbs"` + MaxMemoryInGBs types.Int32 `tfsdk:"max_memory_in_gbs"` + MemorySizeInGBs types.Int32 `tfsdk:"memory_size_in_gbs"` + MonthlyDbServerVersion types.String `tfsdk:"monthly_db_server_version"` + MonthlyStorageServerVersion types.String `tfsdk:"monthly_storage_server_version"` + NextMaintenanceRunId types.String `tfsdk:"next_maintenance_run_id"` + OciResourceAnchorName types.String `tfsdk:"oci_resource_anchor_name"` + OciUrl types.String `tfsdk:"oci_url"` + Ocid types.String `tfsdk:"ocid"` + PercentProgress types.Float64 `tfsdk:"percent_progress"` + Shape types.String `tfsdk:"shape"` + Status fwtypes.StringEnum[odbtypes.ResourceStatus] `tfsdk:"status"` + StatusReason types.String `tfsdk:"status_reason"` + StorageCount types.Int32 `tfsdk:"storage_count"` + StorageServerVersion types.String `tfsdk:"storage_server_version"` + TotalStorageSizeInGBs types.Int32 `tfsdk:"total_storage_size_in_gbs"` + CustomerContactsToSendToOCI fwtypes.SetNestedObjectValueOf[customerContactDataSourceModel] `tfsdk:"customer_contacts_to_send_to_oci"` + ComputeModel fwtypes.StringEnum[odbtypes.ComputeModel] `tfsdk:"compute_model"` + CreatedAt types.String `tfsdk:"created_at" autoflex:",noflatten"` + DatabaseServerType types.String `tfsdk:"database_server_type"` + StorageServerType types.String `tfsdk:"storage_server_type"` + MaintenanceWindow fwtypes.ObjectValueOf[cloudExadataInfraMaintenanceWindowDataSourceModel] `tfsdk:"maintenance_window" autoflex:",noflatten"` + Tags tftags.Map `tfsdk:"tags"` +} + +type cloudExadataInfraMaintenanceWindowDataSourceModel struct { + CustomActionTimeoutInMins types.Int32 `tfsdk:"custom_action_timeout_in_mins"` + DaysOfWeek fwtypes.SetValueOf[fwtypes.StringEnum[odbtypes.DayOfWeekName]] `tfsdk:"days_of_week"` + HoursOfDay fwtypes.SetValueOf[types.Int64] `tfsdk:"hours_of_day"` + IsCustomActionTimeoutEnabled types.Bool `tfsdk:"is_custom_action_timeout_enabled"` + LeadTimeInWeeks types.Int32 `tfsdk:"lead_time_in_weeks"` + Months fwtypes.SetValueOf[fwtypes.StringEnum[odbtypes.MonthName]] `tfsdk:"months"` + PatchingMode fwtypes.StringEnum[odbtypes.PatchingModeType] `tfsdk:"patching_mode"` + Preference fwtypes.StringEnum[odbtypes.PreferenceType] `tfsdk:"preference"` + WeeksOfMonth fwtypes.SetValueOf[types.Int64] `tfsdk:"weeks_of_month"` +} +type customerContactDataSourceModel struct { + Email types.String `tfsdk:"email"` +} diff --git a/internal/service/odb/cloud_exadata_infrastructure_data_source_test.go b/internal/service/odb/cloud_exadata_infrastructure_data_source_test.go new file mode 100644 index 000000000000..7b6fdaaa13d4 --- /dev/null +++ b/internal/service/odb/cloud_exadata_infrastructure_data_source_test.go @@ -0,0 +1,108 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +package odb_test + +import ( + "context" + "errors" + "fmt" + sdkacctest "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" + "github.com/hashicorp/terraform-provider-aws/internal/acctest" + "github.com/hashicorp/terraform-provider-aws/internal/conns" + "github.com/hashicorp/terraform-provider-aws/internal/create" + tfodb "github.com/hashicorp/terraform-provider-aws/internal/service/odb" + "github.com/hashicorp/terraform-provider-aws/internal/tfresource" + "github.com/hashicorp/terraform-provider-aws/names" + "testing" +) + +// Acceptance test access AWS and cost money to run. +func TestAccODBCloudExadataInfrastructureDataSource_basic(t *testing.T) { + ctx := acctest.Context(t) + if testing.Short() { + t.Skip("skipping long-running test in short mode") + } + exaInfraResource := "aws_odb_cloud_exadata_infrastructure.test" + exaInfraDataSource := "data.aws_odb_cloud_exadata_infrastructure.test" + displayNameSuffix := sdkacctest.RandomWithPrefix("tf_") + + resource.Test(t, resource.TestCase{ + PreCheck: func() { + acctest.PreCheck(ctx, t) + }, + ErrorCheck: acctest.ErrorCheck(t, names.ODBServiceID), + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + CheckDestroy: testAccCheckCloudExadataInfrastructureDestroy(ctx), + Steps: []resource.TestStep{ + { + Config: basicExaInfraDataSource(displayNameSuffix), + Check: resource.ComposeAggregateTestCheckFunc( + resource.TestCheckResourceAttrPair(exaInfraResource, "id", exaInfraDataSource, "id"), + resource.TestCheckResourceAttr(exaInfraDataSource, "shape", "Exadata.X9M"), + resource.TestCheckResourceAttr(exaInfraDataSource, "status", "AVAILABLE"), + resource.TestCheckResourceAttr(exaInfraDataSource, "storage_count", "3"), + resource.TestCheckResourceAttr(exaInfraDataSource, "compute_count", "2"), + ), + }, + }, + }) +} + +func testAccCheckCloudExadataInfrastructureDestroy(ctx context.Context) resource.TestCheckFunc { + return func(s *terraform.State) error { + conn := acctest.Provider.Meta().(*conns.AWSClient).ODBClient(ctx) + + for _, rs := range s.RootModule().Resources { + if rs.Type != "aws_odb_cloud_exadata_infrastructure" { + continue + } + _, err := tfodb.FindOdbExaDataInfraForDataSourceByID(ctx, conn, rs.Primary.ID) + if tfresource.NotFound(err) { + return nil + } + if err != nil { + return create.Error(names.ODB, create.ErrActionCheckingDestroyed, tfodb.ResNameCloudExadataInfrastructure, rs.Primary.ID, err) + } + + return create.Error(names.ODB, create.ErrActionCheckingDestroyed, tfodb.ResNameCloudExadataInfrastructure, rs.Primary.ID, errors.New("not destroyed")) + } + + return nil + } +} + +func basicExaInfraDataSource(displayNameSuffix string) string { + + testData := fmt.Sprintf(` + + +resource "aws_odb_cloud_exadata_infrastructure" "test" { + display_name = "Ofake_exa_%[1]s" + shape = "Exadata.X9M" + storage_count = 3 + compute_count = 2 + availability_zone_id = "use1-az6" + customer_contacts_to_send_to_oci = ["abc@example.com"] +maintenance_window = { + custom_action_timeout_in_mins = 16 + days_of_week = [] + hours_of_day = [] + is_custom_action_timeout_enabled = true + lead_time_in_weeks = 0 + months = [] + patching_mode = "ROLLING" + preference = "NO_PREFERENCE" + weeks_of_month =[] + } +} + +data "aws_odb_cloud_exadata_infrastructure" "test" { + id = aws_odb_cloud_exadata_infrastructure.test.id +} +`, displayNameSuffix) + //fmt.Println(testData) + return testData +} diff --git a/internal/service/odb/network.go b/internal/service/odb/network.go new file mode 100644 index 000000000000..35f954778b7d --- /dev/null +++ b/internal/service/odb/network.go @@ -0,0 +1,862 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +package odb + +import ( + "context" + "errors" + "github.com/hashicorp/terraform-plugin-framework-validators/stringvalidator" + "github.com/hashicorp/terraform-plugin-framework/attr" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/id" + "github.com/hashicorp/terraform-provider-aws/internal/enum" + tftags "github.com/hashicorp/terraform-provider-aws/internal/tags" + "time" + + "github.com/aws/aws-sdk-go-v2/aws" + "github.com/aws/aws-sdk-go-v2/service/odb" + odbtypes "github.com/aws/aws-sdk-go-v2/service/odb/types" + "github.com/hashicorp/terraform-plugin-framework-timeouts/resource/timeouts" + "github.com/hashicorp/terraform-plugin-framework/path" + "github.com/hashicorp/terraform-plugin-framework/resource" + "github.com/hashicorp/terraform-plugin-framework/resource/schema" + "github.com/hashicorp/terraform-plugin-framework/resource/schema/planmodifier" + "github.com/hashicorp/terraform-plugin-framework/resource/schema/stringplanmodifier" + "github.com/hashicorp/terraform-plugin-framework/schema/validator" + "github.com/hashicorp/terraform-plugin-framework/types" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" + "github.com/hashicorp/terraform-provider-aws/internal/conns" + "github.com/hashicorp/terraform-provider-aws/internal/create" + "github.com/hashicorp/terraform-provider-aws/internal/errs" + "github.com/hashicorp/terraform-provider-aws/internal/errs/fwdiag" + "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/sweep" + sweepfw "github.com/hashicorp/terraform-provider-aws/internal/sweep/framework" + "github.com/hashicorp/terraform-provider-aws/internal/tfresource" + "github.com/hashicorp/terraform-provider-aws/names" +) + +// Function annotations are used for resource registration to the Provider. DO NOT EDIT. +// @FrameworkResource("aws_odb_network", name="Network") +// @Tags(identifierAttribute="arn") +func newResourceNetwork(_ context.Context) (resource.ResourceWithConfigure, error) { + r := &resourceNetwork{} + r.SetDefaultCreateTimeout(24 * time.Hour) + r.SetDefaultUpdateTimeout(24 * time.Hour) + r.SetDefaultDeleteTimeout(24 * time.Hour) + + return r, nil +} + +const ( + ResNameNetwork = "Odb Network" +) + +type resourceNetwork struct { + framework.ResourceWithModel[odbNetworkResourceModel] + framework.WithTimeouts +} + +var OdbNetwork = newResourceNetwork + +func (r *resourceNetwork) Schema(ctx context.Context, req resource.SchemaRequest, resp *resource.SchemaResponse) { + statusType := fwtypes.StringEnumType[odbtypes.ResourceStatus]() + stringLengthBetween1And255Validator := []validator.String{ + stringvalidator.LengthBetween(1, 255), + } + resp.Schema = schema.Schema{ + Attributes: map[string]schema.Attribute{ + names.AttrARN: framework.ARNAttributeComputedOnly(), + names.AttrID: framework.IDAttribute(), + "display_name": schema.StringAttribute{ + Required: true, + Validators: stringLengthBetween1And255Validator, + }, + "availability_zone": schema.StringAttribute{ + Optional: true, + Computed: true, + Validators: stringLengthBetween1And255Validator, + PlanModifiers: []planmodifier.String{ + stringplanmodifier.RequiresReplace(), + stringplanmodifier.UseStateForUnknown(), + }, + }, + "availability_zone_id": schema.StringAttribute{ + Optional: true, + Computed: true, + Validators: stringLengthBetween1And255Validator, + PlanModifiers: []planmodifier.String{ + stringplanmodifier.RequiresReplace(), + stringplanmodifier.UseStateForUnknown(), + }, + }, + "client_subnet_cidr": schema.StringAttribute{ + Required: true, + Validators: stringLengthBetween1And255Validator, + PlanModifiers: []planmodifier.String{ + stringplanmodifier.RequiresReplace(), + }, + }, + "backup_subnet_cidr": schema.StringAttribute{ + Required: true, + Validators: stringLengthBetween1And255Validator, + PlanModifiers: []planmodifier.String{ + stringplanmodifier.RequiresReplace(), + }, + }, + + "custom_domain_name": schema.StringAttribute{ + Optional: true, + Validators: stringLengthBetween1And255Validator, + PlanModifiers: []planmodifier.String{ + stringplanmodifier.RequiresReplace(), + }, + }, + "default_dns_prefix": schema.StringAttribute{ + Optional: true, + Validators: []validator.String{ + stringvalidator.LengthBetween(1, 15), + }, + PlanModifiers: []planmodifier.String{ + stringplanmodifier.RequiresReplace(), + }, + }, + "s3_access": schema.StringAttribute{ + Required: true, + CustomType: fwtypes.StringEnumType[odbtypes.Access](), + }, + "zero_etl_access": schema.StringAttribute{ + Required: true, + CustomType: fwtypes.StringEnumType[odbtypes.Access](), + }, + "s3_policy_document": schema.StringAttribute{ + Optional: true, + PlanModifiers: []planmodifier.String{ + stringplanmodifier.UseStateForUnknown(), + }, + }, + "oci_dns_forwarding_configs": schema.ListAttribute{ + CustomType: fwtypes.NewListNestedObjectTypeOf[odbNwkOciDnsForwardingConfigResourceModel](ctx), + Computed: true, + ElementType: types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "domain_name": types.StringType, + "oci_dns_listener_ip": types.StringType, + }, + }, + }, + "oci_network_anchor_id": schema.StringAttribute{ + Computed: true, + }, + "oci_network_anchor_url": schema.StringAttribute{ + Computed: true, + }, + "oci_resource_anchor_name": schema.StringAttribute{ + Computed: true, + }, + "oci_vcn_id": schema.StringAttribute{ + Computed: true, + }, + "oci_vcn_url": schema.StringAttribute{ + Computed: true, + }, + /*"peered_cidrs": schema.SetAttribute{ + CustomType: fwtypes.SetOfStringType, + ElementType: types.StringType, + Optional: true, + },*/ + "percent_progress": schema.Float32Attribute{ + Computed: true, + }, + "status": schema.StringAttribute{ + CustomType: statusType, + Computed: true, + }, + "status_reason": schema.StringAttribute{ + Computed: true, + }, + "created_at": schema.StringAttribute{ + Computed: true, + }, + "managed_services": schema.ObjectAttribute{ + Computed: true, + CustomType: fwtypes.NewObjectTypeOf[odbNetworkManagedServicesResourceModel](ctx), + AttributeTypes: map[string]attr.Type{ + "service_network_arn": types.StringType, + "resource_gateway_arn": types.StringType, + "managed_service_ipv4_cidrs": types.SetType{ + ElemType: types.StringType, + }, + "service_network_endpoint": types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "vpc_endpoint_id": types.StringType, + "vpc_endpoint_type": fwtypes.StringEnumType[odbtypes.VpcEndpointType](), + }, + }, + "managed_s3_backup_access": types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "status": fwtypes.StringEnumType[odbtypes.ManagedResourceStatus](), + "ipv4_addresses": types.SetType{ + ElemType: types.StringType, + }, + }, + }, + "zero_tl_access": types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "status": fwtypes.StringEnumType[odbtypes.ManagedResourceStatus](), + "cidr": types.StringType, + }, + }, + "s3_access": types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "status": fwtypes.StringEnumType[odbtypes.ManagedResourceStatus](), + "ipv4_addresses": types.SetType{ + ElemType: types.StringType, + }, + "domain_name": types.StringType, + "s3_policy_document": types.StringType, + }, + }, + }, + }, + names.AttrTags: tftags.TagsAttribute(), + names.AttrTagsAll: tftags.TagsAttributeComputedOnly(), + }, + Blocks: map[string]schema.Block{ + names.AttrTimeouts: timeouts.Block(ctx, timeouts.Opts{ + Create: true, + Update: true, + Delete: true, + }), + }, + } +} + +func (r *resourceNetwork) Create(ctx context.Context, req resource.CreateRequest, resp *resource.CreateResponse) { + + conn := r.Meta().ODBClient(ctx) + var plan odbNetworkResourceModel + resp.Diagnostics.Append(req.Plan.Get(ctx, &plan)...) + if resp.Diagnostics.HasError() { + return + } + + input := odb.CreateOdbNetworkInput{ + ClientToken: aws.String(id.UniqueId()), + Tags: getTagsIn(ctx), + } + + resp.Diagnostics.Append(flex.Expand(ctx, plan, &input, flex.WithIgnoredFieldNamesAppend("PeeredCidrs"))...) + if resp.Diagnostics.HasError() { + return + } + out, err := conn.CreateOdbNetwork(ctx, &input) + if err != nil { + resp.Diagnostics.AddError( + create.ProblemStandardMessage(names.ODB, create.ErrActionCreating, ResNameNetwork, plan.DisplayName.String(), err), + err.Error(), + ) + return + } + if out == nil || out.OdbNetworkId == nil { + resp.Diagnostics.AddError( + create.ProblemStandardMessage(names.ODB, create.ErrActionCreating, ResNameNetwork, plan.DisplayName.String(), nil), + errors.New("empty output").Error(), + ) + return + } + + createTimeout := r.CreateTimeout(ctx, plan.Timeouts) + createdOdbNetwork, err := waitNetworkCreated(ctx, conn, *out.OdbNetworkId, createTimeout) + if err != nil { + resp.Diagnostics.AddError( + create.ProblemStandardMessage(names.ODB, create.ErrActionWaitingForCreation, ResNameNetwork, plan.DisplayName.String(), err), + err.Error(), + ) + return + } + + createdOdbNetwork, err = waitOdbNetworkManagedServiceResponse(ctx, conn, *out.OdbNetworkId, createTimeout, func(managedService *odbtypes.ManagedServices) odbtypes.ManagedResourceStatus { + return managedService.ZeroEtlAccess.Status + }) + if err != nil { + resp.Diagnostics.AddError( + create.ProblemStandardMessage(names.ODB, create.ErrActionWaitingForCreation, ResNameNetwork, plan.DisplayName.String(), err), + err.Error(), + ) + return + } + returnedZeroEtlAccess, err := managedServiceStatusToAccessStatus(createdOdbNetwork.ManagedServices.ZeroEtlAccess.Status) + if err != nil { + resp.Diagnostics.AddError( + create.ProblemStandardMessage(names.ODB, create.ErrActionWaitingForCreation, ResNameNetwork, plan.DisplayName.String(), err), + err.Error(), + ) + return + } + + if returnedZeroEtlAccess != input.ZeroEtlAccess { + resp.Diagnostics.AddError( + create.ProblemStandardMessage(names.ODB, create.ErrActionWaitingForCreation, ResNameNetwork, plan.DisplayName.String(), errors.New("unexpected status of zero_tl_access")), + "Inconsistent zero_tl_access state", + ) + return + } + plan.ZeroEtlAccess = fwtypes.StringEnumValue(returnedZeroEtlAccess) + + createdOdbNetwork, err = waitOdbNetworkManagedServiceResponse(ctx, conn, *out.OdbNetworkId, createTimeout, func(managedService *odbtypes.ManagedServices) odbtypes.ManagedResourceStatus { + return managedService.S3Access.Status + }) + if err != nil { + resp.Diagnostics.AddError( + create.ProblemStandardMessage(names.ODB, create.ErrActionWaitingForCreation, ResNameNetwork, plan.DisplayName.String(), err), + err.Error(), + ) + return + } + returnedS3Access, err := managedServiceStatusToAccessStatus(createdOdbNetwork.ManagedServices.S3Access.Status) + if err != nil { + resp.Diagnostics.AddError( + create.ProblemStandardMessage(names.ODB, create.ErrActionWaitingForCreation, ResNameNetwork, plan.DisplayName.String(), err), + err.Error(), + ) + return + } + if returnedS3Access != input.S3Access { + resp.Diagnostics.AddError( + create.ProblemStandardMessage(names.ODB, create.ErrActionWaitingForCreation, ResNameNetwork, plan.DisplayName.String(), errors.New("unexpected status of s3_access")), + "Inconsistent s3_access state", + ) + return + } + plan.S3Access = fwtypes.StringEnumValue(returnedS3Access) + plan.S3PolicyDocument = types.StringPointerValue(createdOdbNetwork.ManagedServices.S3Access.S3PolicyDocument) + + plan.CreatedAt = types.StringValue(createdOdbNetwork.CreatedAt.Format(time.RFC3339)) + + resp.Diagnostics.Append(flex.Flatten(ctx, createdOdbNetwork, &plan, flex.WithIgnoredFieldNamesAppend("CreatedAt"), + flex.WithIgnoredFieldNamesAppend("PeeredCidrs"), flex.WithIgnoredFieldNamesAppend("S3Access"), + flex.WithIgnoredFieldNamesAppend("ZeroEtlAccess"), + flex.WithIgnoredFieldNamesAppend("S3PolicyDocument"))...) + + if resp.Diagnostics.HasError() { + return + } + + resp.Diagnostics.Append(resp.State.Set(ctx, plan)...) + +} + +func (r *resourceNetwork) Read(ctx context.Context, req resource.ReadRequest, resp *resource.ReadResponse) { + conn := r.Meta().ODBClient(ctx) + + var state odbNetworkResourceModel + resp.Diagnostics.Append(req.State.Get(ctx, &state)...) + if resp.Diagnostics.HasError() { + return + } + + out, err := FindOdbNetworkByID(ctx, conn, state.OdbNetworkId.ValueString()) + if tfresource.NotFound(err) { + resp.Diagnostics.Append(fwdiag.NewResourceNotFoundWarningDiagnostic(err)) + resp.State.RemoveResource(ctx) + return + } + if err != nil { + resp.Diagnostics.AddError( + create.ProblemStandardMessage(names.ODB, create.ErrActionReading, ResNameNetwork, state.OdbNetworkId.String(), err), + err.Error(), + ) + return + } + if out.ManagedServices != nil { + + readS3AccessStatus, err := managedServiceStatusToAccessStatus(out.ManagedServices.S3Access.Status) + if err != nil { + resp.Diagnostics.AddError( + create.ProblemStandardMessage(names.ODB, create.ErrActionReading, ResNameNetwork, state.OdbNetworkId.String(), err), + err.Error(), + ) + return + } + state.S3Access = fwtypes.StringEnumValue(readS3AccessStatus) + state.S3PolicyDocument = types.StringPointerValue(out.ManagedServices.S3Access.S3PolicyDocument) + + readZeroEtlAccessStatus, err := managedServiceStatusToAccessStatus(out.ManagedServices.ZeroEtlAccess.Status) + if err != nil { + resp.Diagnostics.AddError( + create.ProblemStandardMessage(names.ODB, create.ErrActionReading, ResNameNetwork, state.OdbNetworkId.String(), err), + err.Error(), + ) + return + } + state.ZeroEtlAccess = fwtypes.StringEnumValue(readZeroEtlAccessStatus) + } else { + resp.Diagnostics.AddError( + create.ProblemStandardMessage(names.ODB, create.ErrActionReading, ResNameNetwork, state.OdbNetworkId.String(), errors.New("odbNetwork managed service not found")), + "Odb Network managed service cannot be nil", + ) + return + } + state.CreatedAt = types.StringValue(out.CreatedAt.Format(time.RFC3339)) + resp.Diagnostics.Append(flex.Flatten(ctx, out, &state, flex.WithIgnoredFieldNamesAppend("CreatedAt"), + //flex.WithIgnoredFieldNamesAppend("PeeredCidrs"), + flex.WithIgnoredFieldNamesAppend("S3Access"), flex.WithIgnoredFieldNamesAppend("ZeroEtlAccess"), + flex.WithIgnoredFieldNamesAppend("S3PolicyDocument"))...) + if resp.Diagnostics.HasError() { + return + } + resp.Diagnostics.Append(resp.State.Set(ctx, &state)...) +} + +func (r *resourceNetwork) Update(ctx context.Context, req resource.UpdateRequest, resp *resource.UpdateResponse) { + + conn := r.Meta().ODBClient(ctx) + + var plan, state odbNetworkResourceModel + resp.Diagnostics.Append(req.Plan.Get(ctx, &plan)...) + resp.Diagnostics.Append(req.State.Get(ctx, &state)...) + if resp.Diagnostics.HasError() { + return + } + + isUpdateRequired := false + var input odb.UpdateOdbNetworkInput + + if !plan.DisplayName.Equal(state.DisplayName) { + isUpdateRequired = true + input.DisplayName = plan.DisplayName.ValueStringPointer() + } + isS3AccessUpdated := false + if !plan.S3Access.Equal(state.S3Access) { + isUpdateRequired = true + isS3AccessUpdated = true + if !plan.S3Access.IsNull() || !state.S3Access.IsUnknown() { + input.S3Access = plan.S3Access.ValueEnum() + } + + } + isZeroEtlAccessUpdated := false + if !plan.ZeroEtlAccess.Equal(state.ZeroEtlAccess) { + isUpdateRequired = true + if !plan.ZeroEtlAccess.IsNull() || !plan.ZeroEtlAccess.IsUnknown() { + input.ZeroEtlAccess = plan.ZeroEtlAccess.ValueEnum() + } + isZeroEtlAccessUpdated = true + } + isS3EndpointPolicyUpdated := false + if !plan.S3PolicyDocument.Equal(state.S3PolicyDocument) { + isUpdateRequired = true + isS3EndpointPolicyUpdated = true + if !plan.S3PolicyDocument.IsNull() || !plan.S3PolicyDocument.IsUnknown() { + input.S3PolicyDocument = plan.S3PolicyDocument.ValueStringPointer() + } + } + if isUpdateRequired { + input.OdbNetworkId = state.OdbNetworkId.ValueStringPointer() + + out, err := conn.UpdateOdbNetwork(ctx, &input) + if err != nil { + resp.Diagnostics.AddError( + create.ProblemStandardMessage(names.ODB, create.ErrActionUpdating, ResNameNetwork, plan.OdbNetworkId.String(), err), + err.Error(), + ) + return + } + if out == nil || out.OdbNetworkId == nil { + resp.Diagnostics.AddError( + create.ProblemStandardMessage(names.ODB, create.ErrActionUpdating, ResNameNetwork, plan.OdbNetworkId.String(), nil), + errors.New("empty output").Error(), + ) + return + } + } + + updateTimeout := r.UpdateTimeout(ctx, plan.Timeouts) + updatedOdbNwk, err := waitNetworkUpdated(ctx, conn, plan.OdbNetworkId.ValueString(), updateTimeout) + if err != nil { + resp.Diagnostics.AddError( + create.ProblemStandardMessage(names.ODB, create.ErrActionWaitingForUpdate, ResNameNetwork, plan.OdbNetworkId.String(), err), + err.Error(), + ) + return + } + + if isS3AccessUpdated || isS3EndpointPolicyUpdated { + + if plan.S3Access.ValueEnum() == odbtypes.AccessEnabled { + _, err = waitManagedServiceEnabled(ctx, conn, *input.OdbNetworkId, updateTimeout, func(managedService *odbtypes.ManagedServices) odbtypes.ManagedResourceStatus { + return managedService.S3Access.Status + }) + if err != nil { + resp.Diagnostics.AddError( + create.ProblemStandardMessage(names.ODB, create.ErrActionWaitingForUpdate, ResNameNetwork, plan.OdbNetworkId.String(), err), + err.Error(), + ) + return + } + plan.S3Access = fwtypes.StringEnumValue(odbtypes.AccessEnabled) + } else if plan.S3Access.ValueEnum() == odbtypes.AccessDisabled { + _, err = waitManagedServiceDisabled(ctx, conn, *input.OdbNetworkId, updateTimeout, func(managedService *odbtypes.ManagedServices) odbtypes.ManagedResourceStatus { + return managedService.S3Access.Status + }) + if err != nil { + resp.Diagnostics.AddError( + create.ProblemStandardMessage(names.ODB, create.ErrActionWaitingForUpdate, ResNameNetwork, plan.OdbNetworkId.String(), err), + err.Error(), + ) + return + } + plan.S3Access = fwtypes.StringEnumValue(odbtypes.AccessDisabled) + } + } + + if isZeroEtlAccessUpdated { + if plan.ZeroEtlAccess.ValueEnum() == odbtypes.AccessEnabled { + _, err = waitManagedServiceEnabled(ctx, conn, *input.OdbNetworkId, updateTimeout, func(managedService *odbtypes.ManagedServices) odbtypes.ManagedResourceStatus { + return managedService.ZeroEtlAccess.Status + }) + if err != nil { + resp.Diagnostics.AddError( + create.ProblemStandardMessage(names.ODB, create.ErrActionWaitingForUpdate, ResNameNetwork, plan.OdbNetworkId.String(), err), + err.Error(), + ) + return + } + plan.ZeroEtlAccess = fwtypes.StringEnumValue(odbtypes.AccessEnabled) + } else if plan.ZeroEtlAccess.ValueEnum() == odbtypes.AccessDisabled { + _, err = waitManagedServiceEnabled(ctx, conn, *input.OdbNetworkId, updateTimeout, func(managedService *odbtypes.ManagedServices) odbtypes.ManagedResourceStatus { + return managedService.ZeroEtlAccess.Status + }) + if err != nil { + resp.Diagnostics.AddError( + create.ProblemStandardMessage(names.ODB, create.ErrActionWaitingForUpdate, ResNameNetwork, plan.OdbNetworkId.String(), err), + err.Error(), + ) + return + } + plan.ZeroEtlAccess = fwtypes.StringEnumValue(odbtypes.AccessDisabled) + } + } + + plan.CreatedAt = types.StringValue(updatedOdbNwk.CreatedAt.Format(time.RFC3339)) + resp.Diagnostics.Append(flex.Flatten(ctx, updatedOdbNwk, &plan, flex.WithIgnoredFieldNamesAppend("CreatedAt"))..., //flex.WithIgnoredFieldNamesAppend("PeeredCidrs") + ) + resp.Diagnostics.Append(resp.State.Set(ctx, &plan)...) +} + +func (r *resourceNetwork) Delete(ctx context.Context, req resource.DeleteRequest, resp *resource.DeleteResponse) { + conn := r.Meta().ODBClient(ctx) + + var state odbNetworkResourceModel + resp.Diagnostics.Append(req.State.Get(ctx, &state)...) + if resp.Diagnostics.HasError() { + return + } + + deleteAssociatedResources := false + input := odb.DeleteOdbNetworkInput{ + OdbNetworkId: state.OdbNetworkId.ValueStringPointer(), + DeleteAssociatedResources: &deleteAssociatedResources, + } + + _, err := conn.DeleteOdbNetwork(ctx, &input) + + if err != nil { + if errs.IsA[*odbtypes.ResourceNotFoundException](err) { + return + } + + resp.Diagnostics.AddError( + create.ProblemStandardMessage(names.ODB, create.ErrActionDeleting, ResNameNetwork, state.OdbNetworkId.String(), err), + err.Error(), + ) + return + } + + deleteTimeout := r.DeleteTimeout(ctx, state.Timeouts) + _, err = waitNetworkDeleted(ctx, conn, state.OdbNetworkId.ValueString(), deleteTimeout) + if err != nil { + resp.Diagnostics.AddError( + create.ProblemStandardMessage(names.ODB, create.ErrActionWaitingForDeletion, ResNameNetwork, state.OdbNetworkArn.String(), err), + err.Error(), + ) + return + } +} + +func (r *resourceNetwork) ImportState(ctx context.Context, req resource.ImportStateRequest, resp *resource.ImportStateResponse) { + resource.ImportStatePassthroughID(ctx, path.Root(names.AttrID), req, resp) +} + +func waitNetworkCreated(ctx context.Context, conn *odb.Client, id string, timeout time.Duration) (*odbtypes.OdbNetwork, error) { + stateConf := &retry.StateChangeConf{ + Pending: enum.Slice(odbtypes.ResourceStatusProvisioning), + Target: enum.Slice(odbtypes.ResourceStatusAvailable, odbtypes.ResourceStatusFailed), + Refresh: statusNetwork(ctx, conn, id), + Timeout: timeout, + } + + outputRaw, err := stateConf.WaitForStateContext(ctx) + if out, ok := outputRaw.(*odbtypes.OdbNetwork); ok { + return out, err + } + + return nil, err +} + +func managedServiceStatusToAccessStatus(mangedStatus odbtypes.ManagedResourceStatus) (odbtypes.Access, error) { + if mangedStatus == odbtypes.ManagedResourceStatusDisabled { + return odbtypes.AccessDisabled, nil + } + if mangedStatus == odbtypes.ManagedResourceStatusEnabled { + return odbtypes.AccessEnabled, nil + } + return "", errors.New("can not convert managed status to access status") +} + +func waitOdbNetworkManagedServiceResponse(ctx context.Context, conn *odb.Client, id string, timeout time.Duration, managedResourceStatus func(managedService *odbtypes.ManagedServices) odbtypes.ManagedResourceStatus) (*odbtypes.OdbNetwork, error) { + stateConf := &retry.StateChangeConf{ + Pending: enum.Slice(odbtypes.ManagedResourceStatusEnabling, odbtypes.ManagedResourceStatusDisabling), + Target: enum.Slice(odbtypes.ManagedResourceStatusEnabled, odbtypes.ManagedResourceStatusDisabled), + Refresh: statusManagedService(ctx, conn, id, managedResourceStatus), + Timeout: timeout, + } + + outputRaw, err := stateConf.WaitForStateContext(ctx) + if out, ok := outputRaw.(*odbtypes.OdbNetwork); ok { + return out, err + } + + return nil, err +} + +func waitManagedServiceEnabled(ctx context.Context, conn *odb.Client, id string, timeout time.Duration, managedResourceStatus func(managedService *odbtypes.ManagedServices) odbtypes.ManagedResourceStatus) (*odbtypes.OdbNetwork, error) { + stateConf := &retry.StateChangeConf{ + Pending: enum.Slice(odbtypes.ManagedResourceStatusEnabling), + Target: enum.Slice(odbtypes.ManagedResourceStatusEnabled), + Refresh: statusManagedService(ctx, conn, id, managedResourceStatus), + Timeout: timeout, + } + + outputRaw, err := stateConf.WaitForStateContext(ctx) + if out, ok := outputRaw.(*odbtypes.OdbNetwork); ok { + return out, err + } + + return nil, err +} + +func waitManagedServiceDisabled(ctx context.Context, conn *odb.Client, id string, timeout time.Duration, managedResourceStatus func(managedService *odbtypes.ManagedServices) odbtypes.ManagedResourceStatus) (*odbtypes.OdbNetwork, error) { + stateConf := &retry.StateChangeConf{ + Pending: enum.Slice(odbtypes.ManagedResourceStatusDisabling), + Target: enum.Slice(odbtypes.ManagedResourceStatusDisabled), + Refresh: statusManagedService(ctx, conn, id, managedResourceStatus), + Timeout: timeout, + } + + outputRaw, err := stateConf.WaitForStateContext(ctx) + if out, ok := outputRaw.(*odbtypes.OdbNetwork); ok { + return out, err + } + + return nil, err +} + +func statusManagedService(ctx context.Context, conn *odb.Client, id string, managedResourceStatus func(managedService *odbtypes.ManagedServices) odbtypes.ManagedResourceStatus) retry.StateRefreshFunc { + return func() (any, string, error) { + out, err := FindOdbNetworkByID(ctx, conn, id) + + if err != nil { + return nil, "", err + } + + if out.ManagedServices == nil { + return nil, "", nil + } + + return out, string(managedResourceStatus(out.ManagedServices)), nil + } +} + +func waitNetworkUpdated(ctx context.Context, conn *odb.Client, id string, timeout time.Duration) (*odbtypes.OdbNetwork, error) { + stateConf := &retry.StateChangeConf{ + Pending: enum.Slice(odbtypes.ResourceStatusUpdating), + Target: enum.Slice(odbtypes.ResourceStatusAvailable, odbtypes.ResourceStatusFailed), + Refresh: statusNetwork(ctx, conn, id), + Timeout: timeout, + } + + outputRaw, err := stateConf.WaitForStateContext(ctx) + if out, ok := outputRaw.(*odbtypes.OdbNetwork); ok { + return out, err + } + + return nil, err +} + +func waitNetworkDeleted(ctx context.Context, conn *odb.Client, id string, timeout time.Duration) (*odbtypes.OdbNetwork, error) { + stateConf := &retry.StateChangeConf{ + Pending: enum.Slice(odbtypes.ResourceStatusTerminating), + Target: []string{}, + Refresh: statusNetwork(ctx, conn, id), + Timeout: timeout, + } + + outputRaw, err := stateConf.WaitForStateContext(ctx) + if out, ok := outputRaw.(*odbtypes.OdbNetwork); ok { + return out, err + } + + return nil, err +} + +func statusNetwork(ctx context.Context, conn *odb.Client, id string) retry.StateRefreshFunc { + return func() (any, string, error) { + out, err := FindOdbNetworkByID(ctx, conn, id) + if tfresource.NotFound(err) { + return nil, "", nil + } + + if err != nil { + return nil, "", err + } + + return out, string(out.Status), nil + } +} + +func FindOdbNetworkByID(ctx context.Context, conn *odb.Client, id string) (*odbtypes.OdbNetwork, error) { + input := odb.GetOdbNetworkInput{ + OdbNetworkId: aws.String(id), + } + + out, err := conn.GetOdbNetwork(ctx, &input) + if err != nil { + if errs.IsA[*odbtypes.ResourceNotFoundException](err) { + return nil, &retry.NotFoundError{ + LastError: err, + LastRequest: &input, + } + } + + return nil, err + } + + if out == nil || out.OdbNetwork == nil { + return nil, tfresource.NewEmptyResultError(&input) + } + + return out.OdbNetwork, nil +} + +func sweepNetworks(ctx context.Context, client *conns.AWSClient) ([]sweep.Sweepable, error) { + input := odb.ListOdbNetworksInput{} + conn := client.ODBClient(ctx) + var sweepResources []sweep.Sweepable + + pages := odb.NewListOdbNetworksPaginator(conn, &input) + for pages.HasMorePages() { + page, err := pages.NextPage(ctx) + if err != nil { + return nil, err + } + + for _, v := range page.OdbNetworks { + sweepResources = append(sweepResources, sweepfw.NewSweepResource(newResourceNetwork, client, + sweepfw.NewAttribute(names.AttrID, aws.ToString(v.OdbNetworkId))), + ) + } + } + + return sweepResources, nil +} + +func FindAddRemovedCidrsFromOdbNetWork(newCidrs, oldCiders []string) map[string]int { + + addedRemovedCidrs := make(map[string]int) + //1 indicates newly added cidrs. Here we are assuming that all cidrs are new. + for _, nCidr := range newCidrs { + addedRemovedCidrs[nCidr] = 1 + } + //Now lets remove those which are present + for _, oCidr := range oldCiders { + //if cidr is present in the map; that means no change is required for that cidr so remove it + _, ok := addedRemovedCidrs[oCidr] + if ok { + delete(addedRemovedCidrs, oCidr) + } else { + addedRemovedCidrs[oCidr] = -1 + } + } + return addedRemovedCidrs + +} + +type odbNetworkResourceModel struct { + framework.WithRegionModel + DisplayName types.String `tfsdk:"display_name"` + AvailabilityZone types.String `tfsdk:"availability_zone"` + AvailabilityZoneId types.String `tfsdk:"availability_zone_id"` + ClientSubnetCidr types.String `tfsdk:"client_subnet_cidr"` + BackupSubnetCidr types.String `tfsdk:"backup_subnet_cidr"` + CustomDomainName types.String `tfsdk:"custom_domain_name"` + DefaultDnsPrefix types.String `tfsdk:"default_dns_prefix"` + S3Access fwtypes.StringEnum[odbtypes.Access] `tfsdk:"s3_access"` + ZeroEtlAccess fwtypes.StringEnum[odbtypes.Access] `tfsdk:"zero_etl_access"` + S3PolicyDocument types.String `tfsdk:"s3_policy_document"` + OdbNetworkId types.String `tfsdk:"id"` + OciDnsForwardingConfigs fwtypes.ListNestedObjectValueOf[odbNwkOciDnsForwardingConfigResourceModel] `tfsdk:"oci_dns_forwarding_configs"` + OciNetworkAnchorId types.String `tfsdk:"oci_network_anchor_id"` + OciNetworkAnchorUrl types.String `tfsdk:"oci_network_anchor_url"` + OciResourceAnchorName types.String `tfsdk:"oci_resource_anchor_name"` + OciVcnId types.String `tfsdk:"oci_vcn_id"` + OciVcnUrl types.String `tfsdk:"oci_vcn_url"` + OdbNetworkArn types.String `tfsdk:"arn"` + PercentProgress types.Float32 `tfsdk:"percent_progress"` + Status fwtypes.StringEnum[odbtypes.ResourceStatus] `tfsdk:"status"` + StatusReason types.String `tfsdk:"status_reason"` + Timeouts timeouts.Value `tfsdk:"timeouts"` + ManagedServices fwtypes.ObjectValueOf[odbNetworkManagedServicesResourceModel] `tfsdk:"managed_services"` + CreatedAt types.String `tfsdk:"created_at"` + Tags tftags.Map `tfsdk:"tags"` + TagsAll tftags.Map `tfsdk:"tags_all"` +} + +type odbNwkOciDnsForwardingConfigResourceModel struct { + DomainName types.String `tfsdk:"domain_name"` + OciDnsListenerIp types.String `tfsdk:"oci_dns_listener_ip"` +} +type odbNetworkManagedServicesResourceModel struct { + ServiceNetworkArn types.String `tfsdk:"service_network_arn"` + ResourceGatewayArn types.String `tfsdk:"resource_gateway_arn"` + ManagedServicesIpv4Cidrs fwtypes.SetOfString `tfsdk:"managed_service_ipv4_cidrs"` + ServiceNetworkEndpoint fwtypes.ObjectValueOf[serviceNetworkEndpointOdbNetworkResourceModel] `tfsdk:"service_network_endpoint"` + ManagedS3BackupAccess fwtypes.ObjectValueOf[managedS3BackupAccessOdbNetworkResourceModel] `tfsdk:"managed_s3_backup_access"` + ZeroEtlAccess fwtypes.ObjectValueOf[zeroEtlAccessOdbNetworkResourceModel] `tfsdk:"zero_etl_access"` + S3Access fwtypes.ObjectValueOf[s3AccessOdbNetworkResourceModel] `tfsdk:"s3_access"` +} + +type serviceNetworkEndpointOdbNetworkResourceModel struct { + VpcEndpointId types.String `tfsdk:"vpc_endpoint_id"` + VpcEndpointType fwtypes.StringEnum[odbtypes.VpcEndpointType] `tfsdk:"vpc_endpoint_type"` +} + +type managedS3BackupAccessOdbNetworkResourceModel struct { + Status fwtypes.StringEnum[odbtypes.ManagedResourceStatus] `tfsdk:"status"` + Ipv4Addresses fwtypes.SetOfString `tfsdk:"ipv4_addresses"` +} + +type zeroEtlAccessOdbNetworkResourceModel struct { + Status fwtypes.StringEnum[odbtypes.ManagedResourceStatus] `tfsdk:"status"` + Cidr types.String `tfsdk:"cidr"` +} + +type s3AccessOdbNetworkResourceModel struct { + Status fwtypes.StringEnum[odbtypes.ManagedResourceStatus] `tfsdk:"status"` + Ipv4Addresses fwtypes.SetOfString `tfsdk:"ipv4_addresses"` + DomainName types.String `tfsdk:"domain_name"` + S3PolicyDocument types.String `tfsdk:"s3_policy_document"` +} diff --git a/internal/service/odb/network_data_source.go b/internal/service/odb/network_data_source.go new file mode 100644 index 000000000000..7c4de24477da --- /dev/null +++ b/internal/service/odb/network_data_source.go @@ -0,0 +1,242 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +package odb + +import ( + "context" + "github.com/aws/aws-sdk-go-v2/service/odb" + odbtypes "github.com/aws/aws-sdk-go-v2/service/odb/types" + "github.com/hashicorp/terraform-plugin-framework/attr" + "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/create" + "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" + tftags "github.com/hashicorp/terraform-provider-aws/internal/tags" + "github.com/hashicorp/terraform-provider-aws/names" + "time" +) + +// Function annotations are used for datasource registration to the Provider. DO NOT EDIT. +// @FrameworkDataSource("aws_odb_network", name="Network") +func newDataSourceNetwork(context.Context) (datasource.DataSourceWithConfigure, error) { + return &dataSourceNetwork{}, nil +} + +const ( + DSNameNetwork = "Odb Network Data Source" +) + +type dataSourceNetwork struct { + framework.DataSourceWithModel[odbNetworkDataSourceModel] +} + +var OdbNetworkDataSource dataSourceNetwork + +func (d *dataSourceNetwork) Schema(ctx context.Context, req datasource.SchemaRequest, resp *datasource.SchemaResponse) { + statusType := fwtypes.StringEnumType[odbtypes.ResourceStatus]() + resp.Schema = schema.Schema{ + Attributes: map[string]schema.Attribute{ + names.AttrARN: framework.ARNAttributeComputedOnly(), + names.AttrID: schema.StringAttribute{ + Required: true, + }, + "display_name": schema.StringAttribute{ + Computed: true, + }, + "availability_zone_id": schema.StringAttribute{ + Computed: true, + }, + "availability_zone": schema.StringAttribute{ + Computed: true, + }, + "backup_subnet_cidr": schema.StringAttribute{ + Computed: true, + }, + "client_subnet_cidr": schema.StringAttribute{ + Computed: true, + }, + "custom_domain_name": schema.StringAttribute{ + Computed: true, + }, + "default_dns_prefix": schema.StringAttribute{ + Computed: true, + }, + "oci_network_anchor_id": schema.StringAttribute{ + Computed: true, + }, + "oci_network_anchor_url": schema.StringAttribute{ + Computed: true, + }, + "oci_resource_anchor_name": schema.StringAttribute{ + Computed: true, + }, + "oci_vcn_id": schema.StringAttribute{ + Computed: true, + }, + "oci_vcn_url": schema.StringAttribute{ + Computed: true, + }, + "percent_progress": schema.Float64Attribute{ + Computed: true, + }, + "status": schema.StringAttribute{ + CustomType: statusType, + Computed: true, + }, + "status_reason": schema.StringAttribute{ + Computed: true, + }, + "created_at": schema.StringAttribute{ + Computed: true, + }, + "managed_services": schema.ObjectAttribute{ + Computed: true, + CustomType: fwtypes.NewObjectTypeOf[odbNetworkManagedServicesDataSourceModel](ctx), + AttributeTypes: map[string]attr.Type{ + "service_network_arn": types.StringType, + "resource_gateway_arn": types.StringType, + "managed_service_ipv4_cidrs": types.ListType{ + ElemType: types.StringType, + }, + "service_network_endpoint": types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "vpc_endpoint_id": types.StringType, + "vpc_endpoint_type": fwtypes.StringEnumType[odbtypes.VpcEndpointType](), + }, + }, + "managed_s3_backup_access": types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "status": fwtypes.StringEnumType[odbtypes.ResourceStatus](), + "ipv4_addresses": types.ListType{ + ElemType: types.StringType, + }, + }, + }, + "zero_tl_access": types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "status": fwtypes.StringEnumType[odbtypes.ManagedResourceStatus](), + "cidr": types.StringType, + }, + }, + "s3_access": types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "status": fwtypes.StringEnumType[odbtypes.ManagedResourceStatus](), + "ipv4_addresses": types.ListType{ + ElemType: types.StringType, + }, + "domain_name": types.StringType, + "s3_policy_document": types.StringType, + }, + }, + }, + }, + names.AttrTags: tftags.TagsAttributeComputedOnly(), + "oci_dns_forwarding_configs": schema.ListAttribute{ + Computed: true, + CustomType: fwtypes.NewListNestedObjectTypeOf[odbNwkOciDnsForwardingConfigDataSourceModel](ctx), + ElementType: types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "domain_name": types.StringType, + "oci_dns_listener_ip": types.StringType, + }, + }, + }, + }, + } +} + +func (d *dataSourceNetwork) Read(ctx context.Context, req datasource.ReadRequest, resp *datasource.ReadResponse) { + conn := d.Meta().ODBClient(ctx) + var data odbNetworkDataSourceModel + resp.Diagnostics.Append(req.Config.Get(ctx, &data)...) + if resp.Diagnostics.HasError() { + return + } + + input := odb.GetOdbNetworkInput{ + OdbNetworkId: data.OdbNetworkId.ValueStringPointer(), + } + + out, err := conn.GetOdbNetwork(ctx, &input) + if err != nil { + resp.Diagnostics.AddError( + create.ProblemStandardMessage(names.ODB, create.ErrActionReading, DSNameNetwork, data.OdbNetworkId.String(), err), + err.Error(), + ) + return + } + + data.CreatedAt = types.StringValue(out.OdbNetwork.CreatedAt.Format(time.RFC3339)) + resp.Diagnostics.Append(flex.Flatten(ctx, out.OdbNetwork, &data, flex.WithIgnoredFieldNamesAppend("CreatedAt"))...) + if resp.Diagnostics.HasError() { + return + } + + resp.Diagnostics.Append(resp.State.Set(ctx, &data)...) +} + +type odbNetworkDataSourceModel struct { + framework.WithRegionModel + AvailabilityZone types.String `tfsdk:"availability_zone"` + AvailabilityZoneId types.String `tfsdk:"availability_zone_id"` + BackupSubnetCidr types.String `tfsdk:"backup_subnet_cidr"` + ClientSubnetCidr types.String `tfsdk:"client_subnet_cidr"` + CustomDomainName types.String `tfsdk:"custom_domain_name"` + DefaultDnsPrefix types.String `tfsdk:"default_dns_prefix"` + DisplayName types.String `tfsdk:"display_name"` + OciDnsForwardingConfigs fwtypes.ListNestedObjectValueOf[odbNwkOciDnsForwardingConfigDataSourceModel] `tfsdk:"oci_dns_forwarding_configs"` + OciNetworkAnchorId types.String `tfsdk:"oci_network_anchor_id"` + OciNetworkAnchorUrl types.String `tfsdk:"oci_network_anchor_url"` + OciResourceAnchorName types.String `tfsdk:"oci_resource_anchor_name"` + OciVcnId types.String `tfsdk:"oci_vcn_id"` + OciVcnUrl types.String `tfsdk:"oci_vcn_url"` + OdbNetworkArn types.String `tfsdk:"arn"` + OdbNetworkId types.String `tfsdk:"id"` + PercentProgress types.Float64 `tfsdk:"percent_progress"` + Status fwtypes.StringEnum[odbtypes.ResourceStatus] `tfsdk:"status"` + StatusReason types.String `tfsdk:"status_reason"` + CreatedAt types.String `tfsdk:"created_at"` + ManagedServices fwtypes.ObjectValueOf[odbNetworkManagedServicesDataSourceModel] `tfsdk:"managed_services"` + Tags tftags.Map `tfsdk:"tags"` +} + +type odbNwkOciDnsForwardingConfigDataSourceModel struct { + DomainName types.String `tfsdk:"domain_name"` + OciDnsListenerIp types.String `tfsdk:"oci_dns_listener_ip"` +} + +type odbNetworkManagedServicesDataSourceModel struct { + ServiceNetworkArn types.String `tfsdk:"service_network_arn"` + ResourceGatewayArn types.String `tfsdk:"resource_gateway_arn"` + ManagedServicesIpv4Cidrs fwtypes.ListOfString `tfsdk:"managed_service_ipv4_cidrs"` + ServiceNetworkEndpoint fwtypes.ObjectValueOf[serviceNetworkEndpointOdbNetworkDataSourceModel] `tfsdk:"service_network_endpoint"` + ManagedS3BackupAccess fwtypes.ObjectValueOf[managedS3BackupAccessOdbNetworkDataSourceModel] `tfsdk:"managed_s3_backup_access"` + ZeroEtlAccess fwtypes.ObjectValueOf[zeroEtlAccessOdbNetworkDataSourceModel] `tfsdk:"zero_tl_access"` + S3Access fwtypes.ObjectValueOf[s3AccessOdbNetworkDataSourceModel] `tfsdk:"s3_access"` +} + +type serviceNetworkEndpointOdbNetworkDataSourceModel struct { + VpcEndpointId types.String `tfsdk:"vpc_endpoint_id"` + VpcEndpointType fwtypes.StringEnum[odbtypes.VpcEndpointType] `tfsdk:"vpc_endpoint_type"` +} + +type managedS3BackupAccessOdbNetworkDataSourceModel struct { + Status fwtypes.StringEnum[odbtypes.ManagedResourceStatus] `tfsdk:"status"` + Ipv4Addresses fwtypes.ListOfString `tfsdk:"ipv4_addresses"` +} + +type zeroEtlAccessOdbNetworkDataSourceModel struct { + Status fwtypes.StringEnum[odbtypes.ManagedResourceStatus] `tfsdk:"status"` + Cidr types.String `tfsdk:"cidr"` +} + +type s3AccessOdbNetworkDataSourceModel struct { + Status fwtypes.StringEnum[odbtypes.ManagedResourceStatus] `tfsdk:"status"` + Ipv4Addresses fwtypes.ListOfString `tfsdk:"ipv4_addresses"` + DomainName types.String `tfsdk:"domain_name"` + S3PolicyDocument types.String `tfsdk:"s3_policy_document"` +} diff --git a/internal/service/odb/network_data_source_test.go b/internal/service/odb/network_data_source_test.go new file mode 100644 index 000000000000..7c2b0e0e42a4 --- /dev/null +++ b/internal/service/odb/network_data_source_test.go @@ -0,0 +1,156 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +package odb_test + +import ( + "context" + "errors" + "fmt" + "github.com/aws/aws-sdk-go-v2/aws" + "github.com/aws/aws-sdk-go-v2/service/odb" + odbtypes "github.com/aws/aws-sdk-go-v2/service/odb/types" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" + sdkacctest "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/terraform" + "github.com/hashicorp/terraform-provider-aws/internal/conns" + "github.com/hashicorp/terraform-provider-aws/internal/create" + "github.com/hashicorp/terraform-provider-aws/internal/errs" + tfodb "github.com/hashicorp/terraform-provider-aws/internal/service/odb" + "github.com/hashicorp/terraform-provider-aws/internal/tfresource" + "testing" + + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-provider-aws/internal/acctest" + "github.com/hashicorp/terraform-provider-aws/names" +) + +type odbNetworkDataSourceTestCase struct { +} + +var odbNetDSTest = odbNetworkDataSourceTestCase{} + +func TestAccODBOdbNetworkDataSource_basic(t *testing.T) { + ctx := acctest.Context(t) + if testing.Short() { + t.Skip("skipping long-running test in short mode") + } + networkResource := "aws_odb_network.test_resource" + networkDataSource := "data.aws_odb_network.test" + rName := sdkacctest.RandomWithPrefix("tf-odb-net") + + resource.Test(t, resource.TestCase{ + PreCheck: func() { + acctest.PreCheck(ctx, t) + odbNetDSTest.testAccOdbNetworkDataSourcePreCheck(ctx, t) + }, + ErrorCheck: acctest.ErrorCheck(t, names.ODBServiceID), + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + CheckDestroy: odbNetDSTest.testAccCheckOdbNetworkDataSourceDestroyed(ctx), + Steps: []resource.TestStep{ + { + Config: odbNetDSTest.basicOdbNetworkDataSource(rName), + Check: resource.ComposeAggregateTestCheckFunc( + resource.TestCheckResourceAttrPair(networkResource, "id", networkDataSource, "id"), + ), + }, + }, + }) +} + +func (odbNetworkDataSourceTestCase) testAccCheckOdbNetworkDataSourceDestroyed(ctx context.Context) resource.TestCheckFunc { + return func(s *terraform.State) error { + conn := acctest.Provider.Meta().(*conns.AWSClient).ODBClient(ctx) + + for _, rs := range s.RootModule().Resources { + if rs.Type != "aws_odb_network" { + continue + } + _, err := odbNetDSTest.findOdbNetwork(ctx, conn, rs.Primary.ID) + if tfresource.NotFound(err) { + return nil + } + if err != nil { + return create.Error(names.ODB, create.ErrActionCheckingDestroyed, tfodb.ResNameNetwork, rs.Primary.ID, err) + } + + return create.Error(names.ODB, create.ErrActionCheckingDestroyed, tfodb.ResNameNetwork, rs.Primary.ID, errors.New("not destroyed")) + } + + return nil + } +} + +func (odbNetworkDataSourceTestCase) findOdbNetwork(ctx context.Context, conn *odb.Client, id string) (*odbtypes.OdbNetwork, error) { + input := odb.GetOdbNetworkInput{ + OdbNetworkId: aws.String(id), + } + + out, err := conn.GetOdbNetwork(ctx, &input) + if err != nil { + if errs.IsA[*odbtypes.ResourceNotFoundException](err) { + return nil, &retry.NotFoundError{ + LastError: err, + LastRequest: &input, + } + } + + return nil, err + } + + if out == nil || out.OdbNetwork == nil { + return nil, tfresource.NewEmptyResultError(&input) + } + + return out.OdbNetwork, nil +} + +func (odbNetworkDataSourceTestCase) basicOdbNetworkDataSource(rName string) string { + networkRes := fmt.Sprintf(` + + +resource "aws_odb_network" "test_resource" { + display_name = %[1]q + availability_zone_id = "use1-az6" + client_subnet_cidr = "10.2.0.0/24" + backup_subnet_cidr = "10.2.1.0/24" + s3_access = "DISABLED" + zero_etl_access = "DISABLED" + tags = { + "env"= "dev" + } +} + + +data "aws_odb_network" "test" { + id = aws_odb_network.test_resource.id +} + +`, rName) + return networkRes +} +func (odbNetworkDataSourceTestCase) testAccOdbNetworkDataSourcePreCheck(ctx context.Context, t *testing.T) { + conn := acctest.Provider.Meta().(*conns.AWSClient).ODBClient(ctx) + + input := &odb.ListOdbNetworksInput{} + + _, err := conn.ListOdbNetworks(ctx, input) + + if acctest.PreCheckSkipError(err) { + t.Skipf("skipping acceptance testing: %s", err) + } + if err != nil { + t.Fatalf("unexpected PreCheck error: %s", err) + } +} + +/*func (odbNetworkDataSourceTestCase) basicOdbNetworkDataSourceHardCoded(id string) string { + networkRes := fmt.Sprintf(` +data "aws_odb_network" "test" { + id = %[1]q +} + +`, id) + fmt.Println(networkRes) + return networkRes +}*/ diff --git a/internal/service/odb/network_peering_connection.go b/internal/service/odb/network_peering_connection.go new file mode 100644 index 000000000000..da85d72612c1 --- /dev/null +++ b/internal/service/odb/network_peering_connection.go @@ -0,0 +1,481 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +package odb + +import ( + "context" + "errors" + "github.com/hashicorp/terraform-provider-aws/internal/enum" + tftags "github.com/hashicorp/terraform-provider-aws/internal/tags" + "time" + + "github.com/aws/aws-sdk-go-v2/aws" + "github.com/aws/aws-sdk-go-v2/service/odb" + odbtypes "github.com/aws/aws-sdk-go-v2/service/odb/types" + "github.com/hashicorp/terraform-plugin-framework-timeouts/resource/timeouts" + + "github.com/hashicorp/terraform-plugin-framework/path" + "github.com/hashicorp/terraform-plugin-framework/resource" + "github.com/hashicorp/terraform-plugin-framework/resource/schema" + "github.com/hashicorp/terraform-plugin-framework/resource/schema/planmodifier" + "github.com/hashicorp/terraform-plugin-framework/resource/schema/stringplanmodifier" + + "github.com/hashicorp/terraform-plugin-framework/types" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" + "github.com/hashicorp/terraform-provider-aws/internal/conns" + "github.com/hashicorp/terraform-provider-aws/internal/create" + "github.com/hashicorp/terraform-provider-aws/internal/errs" + "github.com/hashicorp/terraform-provider-aws/internal/errs/fwdiag" + "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/sweep" + sweepfw "github.com/hashicorp/terraform-provider-aws/internal/sweep/framework" + "github.com/hashicorp/terraform-provider-aws/internal/tfresource" + "github.com/hashicorp/terraform-provider-aws/names" +) + +// Function annotations are used for resource registration to the Provider. DO NOT EDIT. +// @FrameworkResource("aws_odb_network_peering_connection", name="Network Peering Connection") +// @Tags(identifierAttribute="arn") +func newResourceNetworkPeeringConnection(_ context.Context) (resource.ResourceWithConfigure, error) { + r := &resourceNetworkPeeringConnection{} + + r.SetDefaultCreateTimeout(24 * time.Hour) + r.SetDefaultUpdateTimeout(24 * time.Hour) + r.SetDefaultDeleteTimeout(24 * time.Hour) + + return r, nil +} + +const ( + ResNameNetworkPeeringConnection = "Network Peering Connection" +) + +type resourceNetworkPeeringConnection struct { + framework.ResourceWithModel[odbNetworkPeeringConnectionResourceModel] + framework.WithTimeouts +} + +func (r *resourceNetworkPeeringConnection) Schema(ctx context.Context, req resource.SchemaRequest, resp *resource.SchemaResponse) { + resp.Schema = schema.Schema{ + Attributes: map[string]schema.Attribute{ + names.AttrARN: framework.ARNAttributeComputedOnly(), + names.AttrID: framework.IDAttribute(), + "odb_network_id": schema.StringAttribute{ + Required: true, + PlanModifiers: []planmodifier.String{ + stringplanmodifier.RequiresReplace(), + stringplanmodifier.UseStateForUnknown(), + }, + }, + "peer_network_id": schema.StringAttribute{ + Required: true, + PlanModifiers: []planmodifier.String{ + stringplanmodifier.RequiresReplace(), + stringplanmodifier.UseStateForUnknown(), + }, + }, + + "display_name": schema.StringAttribute{ + Description: "Display name of the odb network peering connection.", + Required: true, + PlanModifiers: []planmodifier.String{ + stringplanmodifier.RequiresReplace(), + stringplanmodifier.UseStateForUnknown(), + }, + }, + + "status": schema.StringAttribute{ + Description: "Status of the odb network peering connection.", + CustomType: fwtypes.StringEnumType[odbtypes.ResourceStatus](), + Computed: true, + }, + "status_reason": schema.StringAttribute{ + Description: "Status of the odb network peering connection.", + Computed: true, + }, + + "odb_network_arn": schema.StringAttribute{ + Description: "ARN of the odb network peering connection.", + Computed: true, + }, + + "peer_network_arn": schema.StringAttribute{ + Description: "ARN of the peer network peering connection.", + Computed: true, + }, + "odb_peering_connection_type": schema.StringAttribute{ + Description: "Type of the odb peering connection.", + Computed: true, + }, + "created_at": schema.StringAttribute{ + Description: "Created time of the odb network peering connection.", + Computed: true, + }, + "percent_progress": schema.Float32Attribute{ + Description: "Progress of the odb network peering connection.", + Computed: true, + }, + names.AttrTags: tftags.TagsAttribute(), + names.AttrTagsAll: tftags.TagsAttributeComputedOnly(), + }, + Blocks: map[string]schema.Block{ + names.AttrTimeouts: timeouts.Block(ctx, timeouts.Opts{ + Create: true, + Update: true, + Delete: true, + }), + }, + } +} + +func (r *resourceNetworkPeeringConnection) Create(ctx context.Context, req resource.CreateRequest, resp *resource.CreateResponse) { + conn := r.Meta().ODBClient(ctx) + + var plan odbNetworkPeeringConnectionResourceModel + resp.Diagnostics.Append(req.Plan.Get(ctx, &plan)...) + if resp.Diagnostics.HasError() { + return + } + + input := odb.CreateOdbPeeringConnectionInput{ + OdbNetworkId: plan.OdbNetworkId.ValueStringPointer(), + PeerNetworkId: plan.PeerNetworkId.ValueStringPointer(), + DisplayName: plan.DisplayName.ValueStringPointer(), + Tags: getTagsIn(ctx), + } + + out, err := conn.CreateOdbPeeringConnection(ctx, &input) + if err != nil { + + resp.Diagnostics.AddError( + create.ProblemStandardMessage(names.ODB, create.ErrActionCreating, ResNameNetworkPeeringConnection, plan.DisplayName.ValueString(), err), + err.Error(), + ) + return + } + if out == nil || out.OdbPeeringConnectionId == nil { + resp.Diagnostics.AddError( + create.ProblemStandardMessage(names.ODB, create.ErrActionCreating, ResNameNetworkPeeringConnection, plan.DisplayName.ValueString(), nil), + errors.New("empty output").Error(), + ) + return + } + + resp.Diagnostics.Append(flex.Flatten(ctx, out, &plan)...) + if resp.Diagnostics.HasError() { + return + } + + createTimeout := r.CreateTimeout(ctx, plan.Timeouts) + createdPeeredConnection, err := waitNetworkPeeringConnectionCreated(ctx, conn, plan.OdbPeeringConnectionId.ValueString(), createTimeout) + if err != nil { + resp.Diagnostics.AddError( + create.ProblemStandardMessage(names.ODB, create.ErrActionWaitingForCreation, ResNameNetworkPeeringConnection, plan.DisplayName.ValueString(), err), + err.Error(), + ) + return + } + plan.CreatedAt = types.StringValue(createdPeeredConnection.CreatedAt.Format(time.RFC3339)) + resp.Diagnostics.Append(flex.Flatten(ctx, createdPeeredConnection, &plan, flex.WithIgnoredFieldNamesAppend("CreatedAt"))...) + if resp.Diagnostics.HasError() { + return + } + + resp.Diagnostics.Append(resp.State.Set(ctx, plan)...) +} + +func (r *resourceNetworkPeeringConnection) Read(ctx context.Context, req resource.ReadRequest, resp *resource.ReadResponse) { + conn := r.Meta().ODBClient(ctx) + var state odbNetworkPeeringConnectionResourceModel + resp.Diagnostics.Append(req.State.Get(ctx, &state)...) + if resp.Diagnostics.HasError() { + return + } + + out, err := findNetworkPeeringConnectionByID(ctx, conn, state.OdbPeeringConnectionId.ValueString()) + if tfresource.NotFound(err) { + resp.Diagnostics.Append(fwdiag.NewResourceNotFoundWarningDiagnostic(err)) + resp.State.RemoveResource(ctx) + return + } + if err != nil { + resp.Diagnostics.AddError( + create.ProblemStandardMessage(names.ODB, create.ErrActionReading, ResNameNetworkPeeringConnection, state.OdbPeeringConnectionId.ValueString(), err), + err.Error(), + ) + return + } + state.CreatedAt = types.StringValue(out.CreatedAt.Format(time.RFC3339)) + + resp.Diagnostics.Append(flex.Flatten(ctx, out, &state, flex.WithIgnoredFieldNamesAppend("CreatedAt"))...) + if resp.Diagnostics.HasError() { + return + } + resp.Diagnostics.Append(resp.State.Set(ctx, &state)...) +} + +func (r *resourceNetworkPeeringConnection) Update(ctx context.Context, req resource.UpdateRequest, resp *resource.UpdateResponse) { + conn := r.Meta().ODBClient(ctx) + + var plan, state odbNetworkPeeringConnectionResourceModel + resp.Diagnostics.Append(req.Plan.Get(ctx, &plan)...) + resp.Diagnostics.Append(req.State.Get(ctx, &state)...) + if resp.Diagnostics.HasError() { + return + } + + updateTimeout := r.UpdateTimeout(ctx, plan.Timeouts) + updatedOdbNetPeeringConn, err := waitNetworkPeeringConnectionUpdated(ctx, conn, plan.OdbPeeringConnectionId.ValueString(), updateTimeout) + if err != nil { + resp.Diagnostics.AddError( + create.ProblemStandardMessage(names.ODB, create.ErrActionWaitingForUpdate, ResNameNetworkPeeringConnection, plan.OdbPeeringConnectionId.ValueString(), err), + err.Error(), + ) + return + } + plan.CreatedAt = types.StringValue(updatedOdbNetPeeringConn.CreatedAt.Format(time.RFC3339)) + resp.Diagnostics.Append(flex.Flatten(ctx, updatedOdbNetPeeringConn, &plan, flex.WithIgnoredFieldNamesAppend("CreatedAt"))...) + if resp.Diagnostics.HasError() { + return + } + resp.Diagnostics.Append(resp.State.Set(ctx, &plan)...) +} + +func (r *resourceNetworkPeeringConnection) Delete(ctx context.Context, req resource.DeleteRequest, resp *resource.DeleteResponse) { + conn := r.Meta().ODBClient(ctx) + var state odbNetworkPeeringConnectionResourceModel + resp.Diagnostics.Append(req.State.Get(ctx, &state)...) + if resp.Diagnostics.HasError() { + return + } + + input := odb.DeleteOdbPeeringConnectionInput{ + OdbPeeringConnectionId: state.OdbPeeringConnectionId.ValueStringPointer(), + } + + _, err := conn.DeleteOdbPeeringConnection(ctx, &input) + + if err != nil { + if errs.IsA[*odbtypes.ResourceNotFoundException](err) { + return + } + + resp.Diagnostics.AddError( + create.ProblemStandardMessage(names.ODB, create.ErrActionDeleting, ResNameNetworkPeeringConnection, state.OdbPeeringConnectionId.ValueString(), err), + err.Error(), + ) + return + } + + deleteTimeout := r.DeleteTimeout(ctx, state.Timeouts) + _, err = waitNetworkPeeringConnectionDeleted(ctx, conn, state.OdbPeeringConnectionId.ValueString(), deleteTimeout) + if err != nil { + resp.Diagnostics.AddError( + create.ProblemStandardMessage(names.ODB, create.ErrActionWaitingForDeletion, ResNameNetworkPeeringConnection, state.OdbPeeringConnectionId.String(), err), + err.Error(), + ) + return + } +} + +// TIP: ==== TERRAFORM IMPORTING ==== +// If Read can get all the information it needs from the Identifier +// (i.e., path.Root("id")), you can use the PassthroughID importer. Otherwise, +// you'll need a custom import function. +// +// See more: +// https://developer.hashicorp.com/terraform/plugin/framework/resources/import +func (r *resourceNetworkPeeringConnection) ImportState(ctx context.Context, req resource.ImportStateRequest, resp *resource.ImportStateResponse) { + resource.ImportStatePassthroughID(ctx, path.Root(names.AttrID), req, resp) +} + +// TIP: ==== WAITERS ==== +// Some resources of some services have waiters provided by the AWS API. +// Unless they do not work properly, use them rather than defining new ones +// here. +// +// Sometimes we define the wait, status, and find functions in separate +// files, wait.go, status.go, and find.go. Follow the pattern set out in the +// service and define these where it makes the most sense. +// +// If these functions are used in the _test.go file, they will need to be +// exported (i.e., capitalized). +// +// You will need to adjust the parameters and names to fit the service. +func waitNetworkPeeringConnectionCreated(ctx context.Context, conn *odb.Client, id string, timeout time.Duration) (*odbtypes.OdbPeeringConnection, error) { + stateConf := &retry.StateChangeConf{ + Pending: enum.Slice(odbtypes.ResourceStatusProvisioning), + Target: enum.Slice(odbtypes.ResourceStatusAvailable, odbtypes.ResourceStatusFailed), + Refresh: statusNetworkPeeringConnection(ctx, conn, id), + Timeout: timeout, + NotFoundChecks: 20, + ContinuousTargetOccurence: 2, + } + + outputRaw, err := stateConf.WaitForStateContext(ctx) + if out, ok := outputRaw.(*odbtypes.OdbPeeringConnection); ok { + return out, err + } + + return nil, err +} + +func waitNetworkPeeringConnectionUpdated(ctx context.Context, conn *odb.Client, id string, timeout time.Duration) (*odbtypes.OdbPeeringConnection, error) { + stateConf := &retry.StateChangeConf{ + Pending: enum.Slice(odbtypes.ResourceStatusUpdating), + Target: enum.Slice(odbtypes.ResourceStatusAvailable, odbtypes.ResourceStatusFailed), + Refresh: statusNetworkPeeringConnection(ctx, conn, id), + Timeout: timeout, + NotFoundChecks: 20, + ContinuousTargetOccurence: 2, + } + + outputRaw, err := stateConf.WaitForStateContext(ctx) + if out, ok := outputRaw.(*odbtypes.OdbPeeringConnection); ok { + return out, err + } + + return nil, err +} + +// TIP: A deleted waiter is almost like a backwards created waiter. There may +// be additional pending states, however. +func waitNetworkPeeringConnectionDeleted(ctx context.Context, conn *odb.Client, id string, timeout time.Duration) (*odbtypes.OdbPeeringConnection, error) { + stateConf := &retry.StateChangeConf{ + Pending: enum.Slice(odbtypes.ResourceStatusTerminating), + Target: []string{}, + Refresh: statusNetworkPeeringConnection(ctx, conn, id), + Timeout: timeout, + } + + outputRaw, err := stateConf.WaitForStateContext(ctx) + if out, ok := outputRaw.(*odbtypes.OdbPeeringConnection); ok { + return out, err + } + + return nil, err +} + +// TIP: ==== STATUS ==== +// The status function can return an actual status when that field is +// available from the API (e.g., out.Status). Otherwise, you can use custom +// statuses to communicate the states of the resource. +// +// Waiters consume the values returned by status functions. Design status so +// that it can be reused by a create, update, and delete waiter, if possible. +func statusNetworkPeeringConnection(ctx context.Context, conn *odb.Client, id string) retry.StateRefreshFunc { + return func() (any, string, error) { + out, err := findNetworkPeeringConnectionByID(ctx, conn, id) + if tfresource.NotFound(err) { + return nil, "", nil + } + + if err != nil { + return nil, "", err + } + + return out, string(out.Status), nil + } +} + +// TIP: ==== FINDERS ==== +// The find function is not strictly necessary. You could do the API +// request from the status function. However, we have found that find often +// comes in handy in other places besides the status function. As a result, it +// is good practice to define it separately. +func findNetworkPeeringConnectionByID(ctx context.Context, conn *odb.Client, id string) (*odbtypes.OdbPeeringConnection, error) { + input := odb.GetOdbPeeringConnectionInput{ + OdbPeeringConnectionId: &id, + } + + out, err := conn.GetOdbPeeringConnection(ctx, &input) + if err != nil { + if errs.IsA[*odbtypes.ResourceNotFoundException](err) { + return nil, &retry.NotFoundError{ + LastError: err, + LastRequest: &input, + } + } + + return nil, err + } + + if out == nil || out.OdbPeeringConnection == nil { + return nil, tfresource.NewEmptyResultError(&input) + } + + return out.OdbPeeringConnection, nil +} + +// TIP: ==== DATA STRUCTURES ==== +// With Terraform Plugin-Framework configurations are deserialized into +// Go types, providing type safety without the need for type assertions. +// These structs should match the schema definition exactly, and the `tfsdk` +// tag value should match the attribute name. +// +// Nested objects are represented in their own basicExaInfraDataSource struct. These will +// also have a corresponding attribute type mapping for use inside flex +// functions. +// +// See more: +// https://developer.hashicorp.com/terraform/plugin/framework/handling-data/accessing-values +type odbNetworkPeeringConnectionResourceModel struct { + framework.WithRegionModel + OdbNetworkId types.String `tfsdk:"odb_network_id"` + PeerNetworkId types.String `tfsdk:"peer_network_id"` + OdbPeeringConnectionId types.String `tfsdk:"id"` + DisplayName types.String `tfsdk:"display_name"` + Status fwtypes.StringEnum[odbtypes.ResourceStatus] `tfsdk:"status"` + StatusReason types.String `tfsdk:"status_reason"` + OdbPeeringConnectionArn types.String `tfsdk:"arn"` + OdbNetworkArn types.String `tfsdk:"odb_network_arn"` + PeerNetworkArn types.String `tfsdk:"peer_network_arn"` + OdbPeeringConnectionType types.String `tfsdk:"odb_peering_connection_type"` + CreatedAt types.String `tfsdk:"created_at"` + PercentProgress types.Float32 `tfsdk:"percent_progress"` + Timeouts timeouts.Value `tfsdk:"timeouts"` + Tags tftags.Map `tfsdk:"tags"` + TagsAll tftags.Map `tfsdk:"tags_all"` +} + +// TIP: ==== SWEEPERS ==== +// When acceptance testing resources, interrupted or failed tests may +// leave behind orphaned resources in an account. To facilitate cleaning +// up lingering resources, each resource implementation should include +// a corresponding "sweeper" function. +// +// The sweeper function lists all resources of a given type and sets the +// appropriate identifers required to delete the resource via the Delete +// method implemented above. +// +// Once the sweeper function is implemented, register it in sweeper.go +// as follows: +// +// awsv2.Register("aws_odb_network_peering_connection", sweepNetworkPeeringConnections) +// +// See more: +// https://hashicorp.github.io/terraform-provider-aws/running-and-writing-acceptance-tests/#acceptance-test-sweepers +func sweepNetworkPeeringConnections(ctx context.Context, client *conns.AWSClient) ([]sweep.Sweepable, error) { + input := odb.ListOdbPeeringConnectionsInput{} + conn := client.ODBClient(ctx) + var sweepResources []sweep.Sweepable + + pages := odb.NewListOdbPeeringConnectionsPaginator(conn, &input) + for pages.HasMorePages() { + page, err := pages.NextPage(ctx) + if err != nil { + return nil, err + } + + for _, v := range page.OdbPeeringConnections { + sweepResources = append(sweepResources, sweepfw.NewSweepResource(newResourceNetworkPeeringConnection, client, + sweepfw.NewAttribute(names.AttrID, aws.ToString(v.OdbPeeringConnectionId))), + ) + } + } + + return sweepResources, nil +} diff --git a/internal/service/odb/network_peering_connection_data_source.go b/internal/service/odb/network_peering_connection_data_source.go new file mode 100644 index 000000000000..b250176b2981 --- /dev/null +++ b/internal/service/odb/network_peering_connection_data_source.go @@ -0,0 +1,141 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +package odb + +import ( + "context" + tftags "github.com/hashicorp/terraform-provider-aws/internal/tags" + "time" + + "github.com/aws/aws-sdk-go-v2/service/odb" + odbtypes "github.com/aws/aws-sdk-go-v2/service/odb/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/create" + "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/names" +) + +// Function annotations are used for datasource registration to the Provider. DO NOT EDIT. +// @FrameworkDataSource("aws_odb_network_peering_connection", name="Network Peering Connection") +func newDataSourceNetworkPeeringConnection(context.Context) (datasource.DataSourceWithConfigure, error) { + return &dataSourceNetworkPeeringConnection{}, nil +} + +const ( + DSNameNetworkPeeringConnection = "Network Peering Connection Data Source" +) + +type dataSourceNetworkPeeringConnection struct { + framework.DataSourceWithModel[odbNetworkPeeringConnectionDataSourceModel] +} + +func (d *dataSourceNetworkPeeringConnection) Schema(ctx context.Context, req datasource.SchemaRequest, resp *datasource.SchemaResponse) { + resp.Schema = schema.Schema{ + Attributes: map[string]schema.Attribute{ + names.AttrID: schema.StringAttribute{ + Description: "Network Peering Connection identifier.", + Required: true, + }, + "display_name": schema.StringAttribute{ + Description: "Display name of the odb network peering connection.", + Computed: true, + }, + "status": schema.StringAttribute{ + Description: "Status of the odb network peering connection.", + CustomType: fwtypes.StringEnumType[odbtypes.ResourceStatus](), + Computed: true, + }, + "status_reason": schema.StringAttribute{ + Description: "Status of the odb network peering connection.", + Computed: true, + }, + + "odb_network_arn": schema.StringAttribute{ + Description: "ARN of the odb network peering connection.", + Computed: true, + }, + + names.AttrARN: framework.ARNAttributeComputedOnly(), + + "peer_network_arn": schema.StringAttribute{ + Description: "ARN of the peer network peering connection.", + Computed: true, + }, + "odb_peering_connection_type": schema.StringAttribute{ + Description: "Type of the odb peering connection.", + Computed: true, + }, + "created_at": schema.StringAttribute{ + Description: "Created time of the odb network peering connection.", + Computed: true, + }, + "percent_progress": schema.Float32Attribute{ + Description: "Progress of the odb network peering connection.", + Computed: true, + }, + names.AttrTags: tftags.TagsAttributeComputedOnly(), + }, + } +} + +func (d *dataSourceNetworkPeeringConnection) Read(ctx context.Context, req datasource.ReadRequest, resp *datasource.ReadResponse) { + + conn := d.Meta().ODBClient(ctx) + var data odbNetworkPeeringConnectionDataSourceModel + resp.Diagnostics.Append(req.Config.Get(ctx, &data)...) + if resp.Diagnostics.HasError() { + return + } + + input := odb.GetOdbPeeringConnectionInput{ + OdbPeeringConnectionId: data.OdbPeeringConnectionId.ValueStringPointer(), + } + out, err := conn.GetOdbPeeringConnection(ctx, &input) + if err != nil { + resp.Diagnostics.AddError( + create.ProblemStandardMessage(names.ODB, create.ErrActionReading, DSNameNetworkPeeringConnection, data.OdbPeeringConnectionId.ValueString(), err), + err.Error(), + ) + return + } + tagsRead, err := listTags(ctx, conn, *out.OdbPeeringConnection.OdbPeeringConnectionArn) + if err != nil { + resp.Diagnostics.AddError( + create.ProblemStandardMessage(names.ODB, create.ErrActionReading, DSNameNetworkPeeringConnection, data.OdbPeeringConnectionId.ValueString(), err), + err.Error(), + ) + return + } + if tagsRead != nil { + data.Tags = tftags.FlattenStringValueMap(ctx, tagsRead.Map()) + } + if out.OdbPeeringConnection.CreatedAt != nil { + data.CreatedAt = types.StringValue(out.OdbPeeringConnection.CreatedAt.Format(time.RFC3339)) + } + resp.Diagnostics.Append(flex.Flatten(ctx, out.OdbPeeringConnection, &data, flex.WithIgnoredFieldNamesAppend("CreatedAt"))...) + if resp.Diagnostics.HasError() { + return + } + resp.Diagnostics.Append(resp.State.Set(ctx, &data)...) +} + +type odbNetworkPeeringConnectionDataSourceModel struct { + framework.WithRegionModel + OdbPeeringConnectionId types.String `tfsdk:"id"` + DisplayName types.String `tfsdk:"display_name"` + Status fwtypes.StringEnum[odbtypes.ResourceStatus] `tfsdk:"status"` + StatusReason types.String `tfsdk:"status_reason"` + OdbPeeringConnectionArn types.String `tfsdk:"arn"` + OdbNetworkArn types.String `tfsdk:"odb_network_arn"` + PeerNetworkArn types.String `tfsdk:"peer_network_arn"` + OdbPeeringConnectionType types.String `tfsdk:"odb_peering_connection_type"` + CreatedAt types.String `tfsdk:"created_at"` + PercentProgress types.Float32 `tfsdk:"percent_progress"` + Tags tftags.Map `tfsdk:"tags"` +} diff --git a/internal/service/odb/network_peering_connection_data_source_test.go b/internal/service/odb/network_peering_connection_data_source_test.go new file mode 100644 index 000000000000..843d4d7227db --- /dev/null +++ b/internal/service/odb/network_peering_connection_data_source_test.go @@ -0,0 +1,213 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +package odb_test + +import ( + "context" + "errors" + "fmt" + "github.com/aws/aws-sdk-go-v2/service/odb" + odbtypes "github.com/aws/aws-sdk-go-v2/service/odb/types" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" + sdkacctest "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" + "github.com/hashicorp/terraform-provider-aws/internal/acctest" + "github.com/hashicorp/terraform-provider-aws/internal/conns" + "github.com/hashicorp/terraform-provider-aws/internal/create" + "github.com/hashicorp/terraform-provider-aws/internal/errs" + tfodb "github.com/hashicorp/terraform-provider-aws/internal/service/odb" + "github.com/hashicorp/terraform-provider-aws/internal/tfresource" + "github.com/hashicorp/terraform-provider-aws/names" + "testing" +) + +type odbPeeringDataSourceTest struct { + odbNetDisplayNamePrefix string + odbNetworkPeeringDisplayNamePrefix string + vpcNamePrefix string +} + +var odbPeeringDSTest = odbPeeringDataSourceTest{ + odbNetDisplayNamePrefix: "tf", + odbNetworkPeeringDisplayNamePrefix: "tf", + vpcNamePrefix: "tf", +} + +func TestPrintOdbPeeringResourceUnitTest(t *testing.T) { + odbNetDispName := sdkacctest.RandomWithPrefix(odbPeeringDSTest.odbNetDisplayNamePrefix) + odbNetPeeringDisplayName := sdkacctest.RandomWithPrefix(odbPeeringDSTest.odbNetworkPeeringDisplayNamePrefix) + //vpcNamePrefix := sdkacctest.RandomWithPrefix(odbPeeringDSTest.vpcNamePrefix) + + fmt.Println(odbPeeringDSTest.basicVpcHardCoded("vpc-084bc7dd335e156cc", odbNetDispName, odbNetPeeringDisplayName)) +} + +// Acceptance test access AWS and cost money to run. +func TestAccODBNetworkPeeringConnectionDataSource_basic(t *testing.T) { + + ctx := acctest.Context(t) + if testing.Short() { + t.Skip("skipping long-running test in short mode") + } + networkPeeringResource := "aws_odb_network_peering_connection.test" + networkPerringDataSource := "data.aws_odb_network_peering_connection.test" + odbNetPeeringDisplayName := sdkacctest.RandomWithPrefix(odbPeeringDSTest.odbNetworkPeeringDisplayNamePrefix) + //odbNetDispName := sdkacctest.RandomWithPrefix(odbPeeringDSTest.odbNetDisplayNamePrefix) + //vpcName := sdkacctest.RandomWithPrefix(odbPeeringDSTest.vpcNamePrefix) + + resource.Test(t, resource.TestCase{ + PreCheck: func() { + acctest.PreCheck(ctx, t) + }, + ErrorCheck: acctest.ErrorCheck(t, names.ODBServiceID), + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + CheckDestroy: odbPeeringDSTest.testAccCheckCloudOdbNetworkPeeringDestroy(ctx), + Steps: []resource.TestStep{ + { + Config: odbPeeringDSTest.basicHardCoded("vpc-084bc7dd335e156cc", "odbnet_c91byo6y6m", odbNetPeeringDisplayName), + + //odbPeeringDSTest.basicPeeringConfig(vpcName, odbNetDispName, odbNetPeeringDisplayName), + Check: resource.ComposeAggregateTestCheckFunc( + resource.TestCheckResourceAttrPair(networkPeeringResource, "id", networkPerringDataSource, "id"), + ), + }, + }, + }) +} + +func (odbPeeringDataSourceTest) testAccCheckCloudOdbNetworkPeeringDestroy(ctx context.Context) resource.TestCheckFunc { + return func(s *terraform.State) error { + conn := acctest.Provider.Meta().(*conns.AWSClient).ODBClient(ctx) + + for _, rs := range s.RootModule().Resources { + if rs.Type != "aws_odb_network_peering_connection" { + continue + } + _, err := odbPeeringDSTest.findOdbPeering(ctx, conn, rs.Primary.ID) + + if err != nil { + if tfresource.NotFound(err) { + return nil + } + return create.Error(names.ODB, create.ErrActionCheckingDestroyed, tfodb.DSNameNetworkPeeringConnection, rs.Primary.ID, err) + } + + return create.Error(names.ODB, create.ErrActionCheckingDestroyed, tfodb.ResNameCloudExadataInfrastructure, rs.Primary.ID, errors.New("not destroyed")) + } + + return nil + } +} + +func (odbPeeringDataSourceTest) findOdbPeering(ctx context.Context, conn *odb.Client, id string) (output *odb.GetOdbPeeringConnectionOutput, err error) { + input := odb.GetOdbPeeringConnectionInput{ + OdbPeeringConnectionId: &id, + } + out, err := conn.GetOdbPeeringConnection(ctx, &input) + if err != nil { + if errs.IsA[*odbtypes.ResourceNotFoundException](err) { + return nil, &retry.NotFoundError{ + LastError: err, + LastRequest: &input, + } + } + + return nil, err + } + if out == nil { + return nil, errors.New("odb Network Peering Connection resource can not be nil") + } + return out, nil +} +func (odbPeeringDataSourceTest) basicPeeringConfig(vpcName, odbNetDisplayName, odbPeeringDisplayName string) string { + + testData := fmt.Sprintf(` + +resource "aws_vpc" "test" { + cidr_block = "10.0.0.0/16" + instance_tenancy = "default" + + tags = { + Name = %[1]q + } +} + +resource "aws_odb_network" "test" { + display_name = %[2]q + availability_zone_id = "use1-az6" + client_subnet_cidr = "10.2.0.0/24" + backup_subnet_cidr = "10.2.1.0/24" + s3_access = "DISABLED" + zero_etl_access = "DISABLED" +} + +resource "aws_odb_network_peering_connection" "test" { + display_name = %[3]q + odb_network_id = aws_odb_network.test.id + peer_network_id = aws_vpc.test.id + +} + +data "aws_odb_network_peering_connection" "test" { + id=aws_odb_network_peering_connection.test.id +} + +`, vpcName, odbNetDisplayName, odbPeeringDisplayName) + //fmt.Println(testData) + return testData +} + +func (odbPeeringDataSourceTest) basicVpcHardCoded(vpcName, odbNetDisplayName, odbPeeringDisplayName string) string { + + testData := fmt.Sprintf(` + + +resource "aws_odb_network" "test" { + display_name = %[2]q + availability_zone_id = "use1-az6" + client_subnet_cidr = "10.2.0.0/24" + backup_subnet_cidr = "10.2.1.0/24" + s3_access = "DISABLED" + zero_etl_access = "DISABLED" +} + + +resource "aws_odb_network_peering_connection" "test" { + peer_network_id = %[1]q + odb_network_id = aws_odb_network.test.id + display_name = %[3]q + +} + +data "aws_odb_network_peering_connection" "test" { + id=aws_odb_network_peering_connection.test.id +} + +`, vpcName, odbNetDisplayName, odbPeeringDisplayName) + //fmt.Println(testData) + return testData +} + +func (odbPeeringDataSourceTest) basicHardCoded(vpcName, odbNetDisplayName, odbPeeringDisplayName string) string { + + testData := fmt.Sprintf(` + + + + +resource "aws_odb_network_peering_connection" "test" { + peer_network_id = %[1]q + odb_network_id = %[2]q + display_name = %[3]q + +} + +data "aws_odb_network_peering_connection" "test" { + id=aws_odb_network_peering_connection.test.id +} + +`, vpcName, odbNetDisplayName, odbPeeringDisplayName) + //fmt.Println(testData) + return testData +} diff --git a/internal/service/odb/network_peering_connection_test.go b/internal/service/odb/network_peering_connection_test.go new file mode 100644 index 000000000000..0323093c0ad0 --- /dev/null +++ b/internal/service/odb/network_peering_connection_test.go @@ -0,0 +1,336 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +package odb_test + +import ( + "context" + "errors" + "fmt" + odbtypes "github.com/aws/aws-sdk-go-v2/service/odb/types" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" + "github.com/hashicorp/terraform-provider-aws/internal/errs" + "github.com/hashicorp/terraform-provider-aws/internal/tfresource" + "testing" + + "github.com/aws/aws-sdk-go-v2/service/odb" + sdkacctest "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" + "github.com/hashicorp/terraform-provider-aws/internal/acctest" + "github.com/hashicorp/terraform-provider-aws/internal/conns" + "github.com/hashicorp/terraform-provider-aws/internal/create" + "github.com/hashicorp/terraform-provider-aws/names" + + tfodb "github.com/hashicorp/terraform-provider-aws/internal/service/odb" +) + +type odbNwkPeeringResourceTest struct { + vpcNamePrefix string + odbPeeringDisplayNamePrefix string + odbNwkDisplayNamePrefix string +} + +var odbPeeringTestResource = odbNwkPeeringResourceTest{ + vpcNamePrefix: "vpc", + odbPeeringDisplayNamePrefix: "odb-peering", + odbNwkDisplayNamePrefix: "odb-net", +} + +func TestAccODBNetworkPeeringConnection_basic(t *testing.T) { + ctx := acctest.Context(t) + + if testing.Short() { + t.Skip("skipping long-running test in short mode") + } + + var odbPeeringResource odb.GetOdbPeeringConnectionOutput + odbPeeringDisplayName := sdkacctest.RandomWithPrefix(odbPeeringTestResource.odbPeeringDisplayNamePrefix) + vpcName := sdkacctest.RandomWithPrefix(odbPeeringTestResource.vpcNamePrefix) + odbNetName := sdkacctest.RandomWithPrefix(odbPeeringTestResource.odbNwkDisplayNamePrefix) + resourceName := "aws_odb_network_peering_connection.test" + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { + acctest.PreCheck(ctx, t) + //acctest.PreCheckPartitionHasService(t, names.ODBEndpointID) + odbPeeringTestResource.testAccPreCheck(ctx, t) + }, + ErrorCheck: acctest.ErrorCheck(t, names.ODBServiceID), + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + CheckDestroy: odbPeeringTestResource.testAccCheckNetworkPeeringConnectionDestroy(ctx), + Steps: []resource.TestStep{ + { + Config: odbPeeringTestResource.basicConfig(vpcName, odbNetName, odbPeeringDisplayName), + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckNetworkPeeringConnectionExists(ctx, resourceName, &odbPeeringResource), + resource.TestCheckResourceAttr(resourceName, "tags.%", "1"), + resource.TestCheckResourceAttr(resourceName, "tags.env", "dev"), + ), + }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} + +func TestAccODBNetworkPeeringConnectionAddRemoveTag(t *testing.T) { + ctx := acctest.Context(t) + + if testing.Short() { + t.Skip("skipping long-running test in short mode") + } + + var odbPeeringResource odb.GetOdbPeeringConnectionOutput + odbPeeringDisplayName := sdkacctest.RandomWithPrefix(odbPeeringTestResource.odbPeeringDisplayNamePrefix) + //vpcName := sdkacctest.RandomWithPrefix(odbPeeringTestResource.vpcNamePrefix) + odbNetName := sdkacctest.RandomWithPrefix(odbPeeringTestResource.odbNwkDisplayNamePrefix) + resourceName := "aws_odb_network_peering_connection.test" + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { + acctest.PreCheck(ctx, t) + //acctest.PreCheckPartitionHasService(t, names.ODBEndpointID) + odbPeeringTestResource.testAccPreCheck(ctx, t) + }, + ErrorCheck: acctest.ErrorCheck(t, names.ODBServiceID), + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + CheckDestroy: odbPeeringTestResource.testAccCheckNetworkPeeringConnectionDestroy(ctx), + Steps: []resource.TestStep{ + { + Config: odbPeeringTestResource.basicConfigWithVPC("vpc-084bc7dd335e156cc", odbNetName, odbPeeringDisplayName), + //odbPeeringTestResource.basicConfig(vpcName, odbNetName, odbPeeringDisplayName), + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckNetworkPeeringConnectionExists(ctx, resourceName, &odbPeeringResource), + resource.TestCheckResourceAttr(resourceName, "tags.%", "1"), + resource.TestCheckResourceAttr(resourceName, "tags.env", "dev"), + ), + }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + { + Config: odbPeeringTestResource.basicConfigWithVPCWithNoTag("vpc-084bc7dd335e156cc", odbNetName, odbPeeringDisplayName), + //odbPeeringTestResource.basicConfig(vpcName, odbNetName, odbPeeringDisplayName), + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckNetworkPeeringConnectionExists(ctx, resourceName, &odbPeeringResource), + resource.TestCheckResourceAttr(resourceName, "tags.%", "0"), + ), + }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} + +func TestAccODBNetworkPeeringConnection_disappears(t *testing.T) { + ctx := acctest.Context(t) + if testing.Short() { + t.Skip("skipping long-running test in short mode") + } + + var odbPeering odb.GetOdbPeeringConnectionOutput + odbPeeringDisplayName := sdkacctest.RandomWithPrefix(odbPeeringTestResource.odbPeeringDisplayNamePrefix) + vpcName := sdkacctest.RandomWithPrefix(odbPeeringTestResource.vpcNamePrefix) + odbNetDisplayName := sdkacctest.RandomWithPrefix(odbPeeringTestResource.odbPeeringDisplayNamePrefix) + resourceName := "aws_odb_network_peering_connection.test" + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { + acctest.PreCheck(ctx, t) + //acctest.PreCheckPartitionHasService(t, names.ODBEndpointID) + odbPeeringTestResource.testAccPreCheck(ctx, t) + }, + ErrorCheck: acctest.ErrorCheck(t, names.ODBServiceID), + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + //CheckDestroy: odbPeeringTestResource.testAccCheckNetworkPeeringConnectionDestroy(ctx), + Steps: []resource.TestStep{ + { + Config: odbPeeringTestResource.basicConfig(vpcName, odbNetDisplayName, odbPeeringDisplayName), + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckNetworkPeeringConnectionExists(ctx, resourceName, &odbPeering), + + //acctest.CheckFrameworkResourceDisappears(ctx, acctest.Provider, tfodb.odbPeering, resourceName), + ), + ExpectNonEmptyPlan: true, + }, + }, + }) +} + +func (odbNwkPeeringResourceTest) testAccCheckNetworkPeeringConnectionDestroy(ctx context.Context) resource.TestCheckFunc { + return func(s *terraform.State) error { + conn := acctest.Provider.Meta().(*conns.AWSClient).ODBClient(ctx) + + for _, rs := range s.RootModule().Resources { + if rs.Type != "aws_odb_network_peering_connection" { + continue + } + + _, err := odbPeeringTestResource.findOdbPeering(ctx, conn, rs.Primary.ID) + if tfresource.NotFound(err) { + return nil + } + if err != nil { + return create.Error(names.ODB, create.ErrActionCheckingDestroyed, tfodb.ResNameNetworkPeeringConnection, rs.Primary.ID, err) + } + + return create.Error(names.ODB, create.ErrActionCheckingDestroyed, tfodb.ResNameNetworkPeeringConnection, rs.Primary.ID, errors.New("not destroyed")) + } + + return nil + } +} + +func testAccCheckNetworkPeeringConnectionExists(ctx context.Context, name string, odbPeeringConnection *odb.GetOdbPeeringConnectionOutput) resource.TestCheckFunc { + return func(s *terraform.State) error { + rs, ok := s.RootModule().Resources[name] + if !ok { + return create.Error(names.ODB, create.ErrActionCheckingExistence, tfodb.ResNameNetworkPeeringConnection, name, errors.New("not found")) + } + + if rs.Primary.ID == "" { + return create.Error(names.ODB, create.ErrActionCheckingExistence, tfodb.ResNameNetworkPeeringConnection, name, errors.New("not set")) + } + + conn := acctest.Provider.Meta().(*conns.AWSClient).ODBClient(ctx) + + resp, err := odbPeeringTestResource.findOdbPeering(ctx, conn, rs.Primary.ID) + if err != nil { + return create.Error(names.ODB, create.ErrActionCheckingExistence, tfodb.ResNameNetworkPeeringConnection, rs.Primary.ID, err) + } + + *odbPeeringConnection = *resp + + return nil + } +} + +func (odbNwkPeeringResourceTest) testAccPreCheck(ctx context.Context, t *testing.T) { + conn := acctest.Provider.Meta().(*conns.AWSClient).ODBClient(ctx) + + input := &odb.ListOdbPeeringConnectionsInput{} + + _, err := conn.ListOdbPeeringConnections(ctx, input) + + if acctest.PreCheckSkipError(err) { + t.Skipf("skipping acceptance testing: %s", err) + } + if err != nil { + t.Fatalf("unexpected PreCheck error: %s", err) + } +} + +/*func testAccCheckNetworkPeeringConnectionNotRecreated(before, after *odb.GetOdbPeeringConnectionOutput) resource.TestCheckFunc { + return func(s *terraform.State) error { + if before, after := aws.ToString(before.NetworkPeeringConnectionId), aws.ToString(after.NetworkPeeringConnectionId); before != after { + return create.Error(names.ODB, create.ErrActionCheckingNotRecreated, tfodb.ResNameNetworkPeeringConnection, aws.ToString(before.NetworkPeeringConnectionId), errors.New("recreated")) + } + + return nil + } +}*/ + +func (odbNwkPeeringResourceTest) findOdbPeering(ctx context.Context, conn *odb.Client, id string) (output *odb.GetOdbPeeringConnectionOutput, err error) { + input := odb.GetOdbPeeringConnectionInput{ + OdbPeeringConnectionId: &id, + } + out, err := conn.GetOdbPeeringConnection(ctx, &input) + if err != nil { + if errs.IsA[*odbtypes.ResourceNotFoundException](err) { + return nil, &retry.NotFoundError{ + LastError: err, + LastRequest: &input, + } + } + return nil, err + } + if out == nil { + return nil, errors.New("odb Network Peering Connection resource can not be nil") + } + return out, nil +} + +func (odbNwkPeeringResourceTest) basicConfig(vpcName, odbNetName, odbPeeringName string) string { + return fmt.Sprintf(` +resource "aws_vpc" "test" { + cidr_block = "10.0.0.0/16" + instance_tenancy = "default" + + tags = { + Name = %[1]q + } +} + +resource "aws_odb_network" "test" { + display_name = %[2]q + availability_zone_id = "use1-az6" + client_subnet_cidr = "10.2.0.0/24" + backup_subnet_cidr = "10.2.1.0/24" + s3_access = "DISABLED" + zero_etl_access = "DISABLED" +} + +resource "aws_odb_network_peering_connection" "test" { + display_name = %[3]q + odb_network_id = aws_odb_network.test.id + peer_network_id = aws_vpc.test.id + tags = { + "env"="dev" + } +} +`, vpcName, odbNetName, odbPeeringName) +} + +func (odbNwkPeeringResourceTest) basicConfigWithVPC(vpcName, odbNetName, odbPeeringName string) string { + return fmt.Sprintf(` + + +resource "aws_odb_network" "test" { + display_name = %[2]q + availability_zone_id = "use1-az6" + client_subnet_cidr = "10.2.0.0/24" + backup_subnet_cidr = "10.2.1.0/24" + s3_access = "DISABLED" + zero_etl_access = "DISABLED" +} + +resource "aws_odb_network_peering_connection" "test" { + display_name = %[3]q + odb_network_id = aws_odb_network.test.id + peer_network_id = %[1]q + tags = { + "env"="dev" + } +} +`, vpcName, odbNetName, odbPeeringName) +} + +func (odbNwkPeeringResourceTest) basicConfigWithVPCWithNoTag(vpcName, odbNetName, odbPeeringName string) string { + return fmt.Sprintf(` + + +resource "aws_odb_network" "test" { + display_name = %[2]q + availability_zone_id = "use1-az6" + client_subnet_cidr = "10.2.0.0/24" + backup_subnet_cidr = "10.2.1.0/24" + s3_access = "DISABLED" + zero_etl_access = "DISABLED" +} + +resource "aws_odb_network_peering_connection" "test" { + display_name = %[3]q + odb_network_id = aws_odb_network.test.id + peer_network_id = %[1]q +} +`, vpcName, odbNetName, odbPeeringName) +} diff --git a/internal/service/odb/network_test.go b/internal/service/odb/network_test.go new file mode 100644 index 000000000000..3cc45c8133aa --- /dev/null +++ b/internal/service/odb/network_test.go @@ -0,0 +1,494 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +package odb_test + +import ( + "context" + "errors" + "fmt" + "github.com/aws/aws-sdk-go-v2/service/odb" + odbtypes "github.com/aws/aws-sdk-go-v2/service/odb/types" + sdkacctest "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" + "github.com/hashicorp/terraform-provider-aws/internal/acctest" + "github.com/hashicorp/terraform-provider-aws/internal/conns" + "github.com/hashicorp/terraform-provider-aws/internal/create" + "github.com/hashicorp/terraform-provider-aws/internal/tfresource" + "github.com/hashicorp/terraform-provider-aws/names" + "reflect" + "testing" + + tfodb "github.com/hashicorp/terraform-provider-aws/internal/service/odb" +) + +type odbNetworkResourceTest struct { + displayNamePrefix string +} + +var odbNetResourceTest = odbNetworkResourceTest{ + displayNamePrefix: "tf-odb-net", +} + +func TestOdbNetworkAddRemovePerredCidrsUnitTest(t *testing.T) { + t.Parallel() + + testCases := []struct { + TestName string + OldCidrs []string + NewCidrs []string + AddRemoveCidrs map[string]int + }{ + { + TestName: "non empty new, empty old", + NewCidrs: []string{"10.0.0.0/24"}, + OldCidrs: []string{}, + AddRemoveCidrs: map[string]int{"10.0.0.0/24": 1}, + }, + { + TestName: "non empty new, non empty old", + NewCidrs: []string{"10.0.0.0/24"}, + OldCidrs: []string{"10.0.0.0/34"}, + AddRemoveCidrs: map[string]int{"10.0.0.0/24": 1, "10.0.0.0/34": -1}, + }, + { + TestName: "non empty new, non empty old all same", + NewCidrs: []string{"10.0.0.0/24"}, + OldCidrs: []string{"10.0.0.0/24"}, + AddRemoveCidrs: map[string]int{}, + }, + { + TestName: "empty new, non empty old all ", + NewCidrs: []string{}, + OldCidrs: []string{"10.0.0.0/24", "10.0.0.0/34"}, + AddRemoveCidrs: map[string]int{"10.0.0.0/24": -1, "10.0.0.0/34": -1}, + }, + } + + for _, testCase := range testCases { + t.Run(testCase.TestName, func(t *testing.T) { + t.Parallel() + addRemoveCidrs := tfodb.FindAddRemovedCidrsFromOdbNetWork(testCase.NewCidrs, testCase.OldCidrs) + + if addRemoveCidrs != nil { + if len(addRemoveCidrs) != len(testCase.AddRemoveCidrs) { + t.Fatalf("expected %d addRemoveCidrs, got %d", len(testCase.AddRemoveCidrs), len(addRemoveCidrs)) + } + if !reflect.DeepEqual(addRemoveCidrs, testCase.AddRemoveCidrs) { + t.Fatalf("expected %v, got %v", testCase.AddRemoveCidrs, addRemoveCidrs) + } + } else { + t.Error("addRemoveCidrs was nil") + } + + }) + } +} + +// Basic test with bare minimum input +func TestOdbNetworkBasic(t *testing.T) { + ctx := acctest.Context(t) + // TIP: This is a long-running test guard for tests that run longer than + // 300s (5 min) generally. + if testing.Short() { + t.Skip("skipping long-running test in short mode") + } + + var network odbtypes.OdbNetwork + rName := sdkacctest.RandomWithPrefix(odbNetResourceTest.displayNamePrefix) + resourceName := "aws_odb_network.test" + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { + acctest.PreCheck(ctx, t) + //testAccPreCheck(ctx, t) + }, + ErrorCheck: acctest.ErrorCheck(t, names.ODBServiceID), + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + CheckDestroy: odbNetResourceTest.testAccCheckNetworkDestroy(ctx), + Steps: []resource.TestStep{ + { + Config: odbNetResourceTest.basicOdbNetwork(rName), + Check: resource.ComposeAggregateTestCheckFunc( + odbNetResourceTest.testAccCheckNetworkExists(ctx, resourceName, &network), + ), + }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} + +// with peered_cidr +func TestAccODBNetwork_only_with_peered_cidr(t *testing.T) { + ctx := acctest.Context(t) + // TIP: This is a long-running test guard for tests that run longer than + // 300s (5 min) generally. + if testing.Short() { + t.Skip("skipping long-running test in short mode") + } + + var network odbtypes.OdbNetwork + rName := sdkacctest.RandomWithPrefix(odbNetResourceTest.displayNamePrefix) + resourceName := "aws_odb_network.test" + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { + acctest.PreCheck(ctx, t) + //testAccPreCheck(ctx, t) + }, + ErrorCheck: acctest.ErrorCheck(t, names.ODBServiceID), + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + CheckDestroy: odbNetResourceTest.testAccCheckNetworkDestroy(ctx), + Steps: []resource.TestStep{ + { + Config: odbNetResourceTest.basicOdbNetworkWithPeeredCidrs(rName), + Check: resource.ComposeAggregateTestCheckFunc( + func(state *terraform.State) error { + fmt.Println(state) + return nil + }, + odbNetResourceTest.testAccCheckNetworkExists(ctx, resourceName, &network), + ), + }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} + +// TestAccODBNetwork_basic_with_peered_cidr_vpc_arn +func TestAccODBNetwork_with_peered_cidr_vpc_arn(t *testing.T) { + ctx := acctest.Context(t) + // TIP: This is a long-running test guard for tests that run longer than + // 300s (5 min) generally. + if testing.Short() { + t.Skip("skipping long-running test in short mode") + } + + var network odbtypes.OdbNetwork + rName := sdkacctest.RandomWithPrefix(odbNetResourceTest.displayNamePrefix) + resourceName := "aws_odb_network.test" + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { + acctest.PreCheck(ctx, t) + //testAccPreCheck(ctx, t) + }, + ErrorCheck: acctest.ErrorCheck(t, names.ODBServiceID), + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + CheckDestroy: odbNetResourceTest.testAccCheckNetworkDestroy(ctx), + Steps: []resource.TestStep{ + { + Config: odbNetResourceTest.basicOdbNetworkWithVPCArn(rName), + Check: resource.ComposeAggregateTestCheckFunc( + func(state *terraform.State) error { + fmt.Println(state) + return nil + }, + odbNetResourceTest.testAccCheckNetworkExists(ctx, resourceName, &network), + ), + }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} + +// TestAccODBNetwork_Update +func TestAccODBNetwork_Delete_Create(t *testing.T) { + ctx := acctest.Context(t) + if testing.Short() { + t.Skip("skipping long-running test in short mode") + } + + var network odbtypes.OdbNetwork + rName := sdkacctest.RandomWithPrefix(odbNetResourceTest.displayNamePrefix) + resourceName := "aws_odb_network.test" + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { + acctest.PreCheck(ctx, t) + //acctest.PreCheckPartitionHasService(t, names.ODBEndpointID) + odbNetResourceTest.testAccPreCheck(ctx, t) + }, + ErrorCheck: acctest.ErrorCheck(t, names.ODBServiceID), + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + CheckDestroy: odbNetResourceTest.testAccCheckNetworkDestroy(ctx), + Steps: []resource.TestStep{ + { + Config: odbNetResourceTest.basicOdbNetwork(rName), + + Check: resource.ComposeAggregateTestCheckFunc( + odbNetResourceTest.testAccCheckNetworkExists(ctx, resourceName, &network), + resource.ComposeTestCheckFunc(func(state *terraform.State) error { + fmt.Println(state) + return nil + }), + ), + }, + { + Config: odbNetResourceTest.updateOdbNetworkDisplayName(rName + "_foo"), + Check: resource.ComposeAggregateTestCheckFunc( + odbNetResourceTest.testAccCheckNetworkExists(ctx, resourceName, &network), + ), + }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} + +func TestAccODBNetwork_Update_Tags(t *testing.T) { + ctx := acctest.Context(t) + if testing.Short() { + t.Skip("skipping long-running test in short mode") + } + + var network odbtypes.OdbNetwork + rName := sdkacctest.RandomWithPrefix(odbNetResourceTest.displayNamePrefix) + resourceName := "aws_odb_network.test" + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { + acctest.PreCheck(ctx, t) + //acctest.PreCheckPartitionHasService(t, names.ODBEndpointID) + odbNetResourceTest.testAccPreCheck(ctx, t) + }, + ErrorCheck: acctest.ErrorCheck(t, names.ODBServiceID), + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + CheckDestroy: odbNetResourceTest.testAccCheckNetworkDestroy(ctx), + Steps: []resource.TestStep{ + { + Config: odbNetResourceTest.basicOdbNetwork(rName), + + Check: resource.ComposeAggregateTestCheckFunc( + odbNetResourceTest.testAccCheckNetworkExists(ctx, resourceName, &network), + resource.ComposeTestCheckFunc(func(state *terraform.State) error { + fmt.Println(state) + return nil + }), + ), + }, + { + Config: odbNetResourceTest.updateOdbNetworkTags(rName), + Check: resource.ComposeAggregateTestCheckFunc( + odbNetResourceTest.testAccCheckNetworkExists(ctx, resourceName, &network), + ), + }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} + +func TestAccODBNetwork_disappears(t *testing.T) { + ctx := acctest.Context(t) + if testing.Short() { + t.Skip("skipping long-running test in short mode") + } + + var network odbtypes.OdbNetwork + rName := sdkacctest.RandomWithPrefix(odbNetResourceTest.displayNamePrefix) + resourceName := "aws_odb_network.test" + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { + acctest.PreCheck(ctx, t) + odbNetResourceTest.testAccPreCheck(ctx, t) + }, + ErrorCheck: acctest.ErrorCheck(t, names.ODBServiceID), + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + CheckDestroy: odbNetResourceTest.testAccCheckNetworkDestroy(ctx), + Steps: []resource.TestStep{ + { + Config: odbNetResourceTest.basicOdbNetwork(rName), + Check: resource.ComposeAggregateTestCheckFunc( + odbNetResourceTest.testAccCheckNetworkExists(ctx, resourceName, &network), + acctest.CheckFrameworkResourceDisappears(ctx, acctest.Provider, tfodb.OdbNetwork, resourceName), + ), + ExpectNonEmptyPlan: true, + }, + }, + }) +} + +func (odbNetworkResourceTest) testAccCheckNetworkDestroy(ctx context.Context) resource.TestCheckFunc { + return func(s *terraform.State) error { + conn := acctest.Provider.Meta().(*conns.AWSClient).ODBClient(ctx) + + for _, rs := range s.RootModule().Resources { + if rs.Type != "aws_odb_network" { + continue + } + + // TIP: ==== FINDERS ==== + // The find function should be exported. Since it won't be used outside of the package, it can be exported + // in the `exports_test.go` file. + _, err := tfodb.FindOdbNetworkByID(ctx, conn, rs.Primary.ID) + if tfresource.NotFound(err) { + return nil + } + if err != nil { + return create.Error(names.ODB, create.ErrActionCheckingDestroyed, tfodb.ResNameNetwork, rs.Primary.ID, err) + } + + return create.Error(names.ODB, create.ErrActionCheckingDestroyed, tfodb.ResNameNetwork, rs.Primary.ID, errors.New("not destroyed")) + } + + return nil + } +} + +func (odbNetworkResourceTest) testAccCheckNetworkExists(ctx context.Context, name string, network *odbtypes.OdbNetwork) resource.TestCheckFunc { + return func(s *terraform.State) error { + rs, ok := s.RootModule().Resources[name] + if !ok { + return create.Error(names.ODB, create.ErrActionCheckingExistence, tfodb.ResNameNetwork, name, errors.New("not found")) + } + + if rs.Primary.ID == "" { + return create.Error(names.ODB, create.ErrActionCheckingExistence, tfodb.ResNameNetwork, name, errors.New("not set")) + } + + conn := acctest.Provider.Meta().(*conns.AWSClient).ODBClient(ctx) + + resp, err := tfodb.FindOdbNetworkByID(ctx, conn, rs.Primary.ID) + if err != nil { + return create.Error(names.ODB, create.ErrActionCheckingExistence, tfodb.ResNameNetwork, rs.Primary.ID, err) + } + + *network = *resp + + return nil + } +} + +func (odbNetworkResourceTest) testAccPreCheck(ctx context.Context, t *testing.T) { + conn := acctest.Provider.Meta().(*conns.AWSClient).ODBClient(ctx) + + input := &odb.ListOdbNetworksInput{} + + _, err := conn.ListOdbNetworks(ctx, input) + + if acctest.PreCheckSkipError(err) { + t.Skipf("skipping acceptance testing: %s", err) + } + if err != nil { + t.Fatalf("unexpected PreCheck error: %s", err) + } +} + +/*func testAccCheckNetworkNotRecreated(before, after *odb.DescribeNetworkResponse) resource.TestCheckFunc { + return func(s *terraform.State) error { + if before, after := aws.ToString(before.NetworkId), aws.ToString(after.NetworkId); before != after { + return create.Error(names.ODB, create.ErrActionCheckingNotRecreated, tfodb.ResNameNetwork, aws.ToString(before.NetworkId), errors.New("recreated")) + } + + return nil + } +}*/ + +func (odbNetworkResourceTest) basicOdbNetworkWithPeeredCidrs(rName string) string { + networkRes := fmt.Sprintf(` + + +resource "aws_odb_network" "test" { + display_name = %[1]q + availability_zone_id = "use1-az6" + client_subnet_cidr = "10.2.0.0/24" + backup_subnet_cidr = "10.2.1.0/24" + peered_cidrs = ["10.32.0.0/24", "172.16.2.0/24", "172.16.0.0/16"] + tags = { + "env"= "dev" + } +} + +`, rName) + return networkRes +} + +func (odbNetworkResourceTest) basicOdbNetwork(rName string) string { + networkRes := fmt.Sprintf(` + + +resource "aws_odb_network" "test" { + display_name = %[1]q + availability_zone_id = "use1-az6" + client_subnet_cidr = "10.2.0.0/24" + backup_subnet_cidr = "10.2.1.0/24" + s3_access = "DISABLED" + zero_etl_access = "DISABLED" +} + +`, rName) + return networkRes +} + +func (odbNetworkResourceTest) updateOdbNetworkDisplayName(rName string) string { + networkRes := fmt.Sprintf(` + + +resource "aws_odb_network" "test" { + display_name = %[1]q + availability_zone_id = "use1-az6" + client_subnet_cidr = "10.2.0.0/24" + backup_subnet_cidr = "10.2.1.0/24" +} +`, rName) + return networkRes +} + +func (odbNetworkResourceTest) updateOdbNetworkTags(rName string) string { + networkRes := fmt.Sprintf(` + + +resource "aws_odb_network" "test" { + display_name = %[1]q + availability_zone_id = "use1-az6" + client_subnet_cidr = "10.2.0.0/24" + backup_subnet_cidr = "10.2.1.0/24" + tags = { + "env"= "dev" + "foo"= "bar" + } +} +`, rName) + return networkRes +} + +func (odbNetworkResourceTest) basicOdbNetworkWithVPCArn(rName string) string { + networkRes := fmt.Sprintf(` + + +resource "aws_odb_network" "test" { + display_name = %[1]q + availability_zone_id = "use1-az6" + client_subnet_cidr = "10.2.0.0/24" + backup_subnet_cidr = "10.2.1.0/24" + peer_vpc_arn = "arn:aws:ec2:us-east-1:711387093194:vpc/vpc-0c6e9101b49f80ea3" + peered_cidrs = ["10.13.0.0/24", "172.16.2.0/24", "172.16.0.0/16"] + tags = { + "env"= "dev" + } +} + +`, rName) + return networkRes +} diff --git a/internal/service/odb/service_package_gen.go b/internal/service/odb/service_package_gen.go index 788c3bec952b..c9906bccd1bb 100644 --- a/internal/service/odb/service_package_gen.go +++ b/internal/service/odb/service_package_gen.go @@ -14,7 +14,26 @@ import ( type servicePackage struct{} func (p *servicePackage) FrameworkDataSources(ctx context.Context) []*inttypes.ServicePackageFrameworkDataSource { - return []*inttypes.ServicePackageFrameworkDataSource{} + return []*inttypes.ServicePackageFrameworkDataSource{ + { + Factory: newDataSourceCloudExadataInfrastructure, + TypeName: "aws_odb_cloud_exadata_infrastructure", + Name: "Cloud Exadata Infrastructure", + Region: unique.Make(inttypes.ResourceRegionDefault()), + }, + { + Factory: newDataSourceNetwork, + TypeName: "aws_odb_network", + Name: "Network", + Region: unique.Make(inttypes.ResourceRegionDefault()), + }, + { + Factory: newDataSourceNetworkPeeringConnection, + TypeName: "aws_odb_network_peering_connection", + Name: "Network Peering Connection", + Region: unique.Make(inttypes.ResourceRegionDefault()), + }, + } } func (p *servicePackage) FrameworkResources(ctx context.Context) []*inttypes.ServicePackageFrameworkResource { @@ -28,6 +47,24 @@ func (p *servicePackage) FrameworkResources(ctx context.Context) []*inttypes.Ser }), Region: unique.Make(inttypes.ResourceRegionDefault()), }, + { + Factory: newResourceNetwork, + TypeName: "aws_odb_network", + Name: "Network", + Tags: unique.Make(inttypes.ServicePackageResourceTags{ + IdentifierAttribute: names.AttrARN, + }), + Region: unique.Make(inttypes.ResourceRegionDefault()), + }, + { + Factory: newResourceNetworkPeeringConnection, + TypeName: "aws_odb_network_peering_connection", + Name: "Network Peering Connection", + Tags: unique.Make(inttypes.ServicePackageResourceTags{ + IdentifierAttribute: names.AttrARN, + }), + Region: unique.Make(inttypes.ResourceRegionDefault()), + }, } } From b28e45988c6fc6b5b7b353c1f4254fb4c73a9638 Mon Sep 17 00:00:00 2001 From: Asim Date: Mon, 14 Jul 2025 16:24:04 +0100 Subject: [PATCH 350/365] vmc, avmc and list db servers --- .../odb/cloud_autonomous_vm_cluster.go | 888 ++++++++++++++++++ ...cloud_autonomous_vm_cluster_data_source.go | 399 ++++++++ ..._autonomous_vm_cluster_data_source_test.go | 60 ++ .../odb/cloud_autonomous_vm_cluster_test.go | 366 ++++++++ internal/service/odb/cloud_vm_cluster.go | 671 +++++++++++++ .../odb/cloud_vm_cluster_data_source.go | 322 +++++++ .../odb/cloud_vm_cluster_data_source_test.go | 166 ++++ internal/service/odb/cloud_vm_cluster_test.go | 555 +++++++++++ .../odb/db_servers_list_data_source.go | 150 +++ .../odb/db_servers_list_data_source_test.go | 184 ++++ internal/service/odb/service_package_gen.go | 36 + 11 files changed, 3797 insertions(+) create mode 100644 internal/service/odb/cloud_autonomous_vm_cluster.go create mode 100644 internal/service/odb/cloud_autonomous_vm_cluster_data_source.go create mode 100644 internal/service/odb/cloud_autonomous_vm_cluster_data_source_test.go create mode 100644 internal/service/odb/cloud_autonomous_vm_cluster_test.go create mode 100644 internal/service/odb/cloud_vm_cluster.go create mode 100644 internal/service/odb/cloud_vm_cluster_data_source.go create mode 100644 internal/service/odb/cloud_vm_cluster_data_source_test.go create mode 100644 internal/service/odb/cloud_vm_cluster_test.go create mode 100644 internal/service/odb/db_servers_list_data_source.go create mode 100644 internal/service/odb/db_servers_list_data_source_test.go diff --git a/internal/service/odb/cloud_autonomous_vm_cluster.go b/internal/service/odb/cloud_autonomous_vm_cluster.go new file mode 100644 index 000000000000..0d224b49c276 --- /dev/null +++ b/internal/service/odb/cloud_autonomous_vm_cluster.go @@ -0,0 +1,888 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +package odb + +import ( + "context" + "errors" + "fmt" + "github.com/hashicorp/terraform-plugin-framework-validators/stringvalidator" + "github.com/hashicorp/terraform-plugin-framework/attr" + "github.com/hashicorp/terraform-plugin-framework/resource/schema/boolplanmodifier" + "github.com/hashicorp/terraform-plugin-framework/resource/schema/float64planmodifier" + "github.com/hashicorp/terraform-plugin-framework/resource/schema/int32planmodifier" + "github.com/hashicorp/terraform-plugin-framework/resource/schema/objectplanmodifier" + "github.com/hashicorp/terraform-plugin-framework/resource/schema/setplanmodifier" + "github.com/hashicorp/terraform-plugin-framework/types/basetypes" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/id" + "github.com/hashicorp/terraform-provider-aws/internal/enum" + tftags "github.com/hashicorp/terraform-provider-aws/internal/tags" + "time" + + "github.com/aws/aws-sdk-go-v2/aws" + "github.com/aws/aws-sdk-go-v2/service/odb" + odbtypes "github.com/aws/aws-sdk-go-v2/service/odb/types" + "github.com/hashicorp/terraform-plugin-framework-timeouts/resource/timeouts" + "github.com/hashicorp/terraform-plugin-framework/path" + "github.com/hashicorp/terraform-plugin-framework/resource" + "github.com/hashicorp/terraform-plugin-framework/resource/schema" + "github.com/hashicorp/terraform-plugin-framework/resource/schema/planmodifier" + "github.com/hashicorp/terraform-plugin-framework/resource/schema/stringplanmodifier" + "github.com/hashicorp/terraform-plugin-framework/schema/validator" + "github.com/hashicorp/terraform-plugin-framework/types" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" + "github.com/hashicorp/terraform-provider-aws/internal/conns" + "github.com/hashicorp/terraform-provider-aws/internal/create" + "github.com/hashicorp/terraform-provider-aws/internal/errs" + "github.com/hashicorp/terraform-provider-aws/internal/errs/fwdiag" + "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/sweep" + sweepfw "github.com/hashicorp/terraform-provider-aws/internal/sweep/framework" + "github.com/hashicorp/terraform-provider-aws/internal/tfresource" + "github.com/hashicorp/terraform-provider-aws/names" +) + +// Function annotations are used for resource registration to the Provider. DO NOT EDIT. +// @FrameworkResource("aws_odb_cloud_autonomous_vm_cluster", name="Cloud Autonomous Vm Cluster") +// @Tags(identifierAttribute="arn") +func newResourceCloudAutonomousVmCluster(_ context.Context) (resource.ResourceWithConfigure, error) { + r := &resourceCloudAutonomousVmCluster{} + r.SetDefaultCreateTimeout(24 * time.Hour) + r.SetDefaultUpdateTimeout(24 * time.Hour) + r.SetDefaultDeleteTimeout(24 * time.Hour) + + return r, nil +} + +const ( + ResNameCloudAutonomousVmCluster = "Cloud Autonomous Vm Cluster" + NotAvailableValues = "NOT_AVAILABLE" +) + +var ResourceCloudAutonomousVMCluster = newResourceCloudAutonomousVmCluster + +type resourceCloudAutonomousVmCluster struct { + framework.ResourceWithModel[cloudAutonomousVmClusterResourceModel] + framework.WithTimeouts +} + +func (r *resourceCloudAutonomousVmCluster) Schema(ctx context.Context, req resource.SchemaRequest, resp *resource.SchemaResponse) { + status := fwtypes.StringEnumType[odbtypes.ResourceStatus]() + licenseModel := fwtypes.StringEnumType[odbtypes.LicenseModel]() + computeModel := fwtypes.StringEnumType[odbtypes.ComputeModel]() + stringLengthBetween1And255Validator := []validator.String{ + stringvalidator.LengthBetween(1, 255), + } + resp.Schema = schema.Schema{ + Attributes: map[string]schema.Attribute{ + names.AttrARN: framework.ARNAttributeComputedOnly(), + names.AttrID: framework.IDAttribute(), + "cloud_exadata_infrastructure_id": schema.StringAttribute{ + Required: true, + PlanModifiers: []planmodifier.String{ + stringplanmodifier.RequiresReplace(), + }, + }, + "autonomous_data_storage_percentage": schema.Float32Attribute{ + Computed: true, + }, + "autonomous_data_storage_size_in_tbs": schema.Float64Attribute{ + Required: true, + PlanModifiers: []planmodifier.Float64{ + float64planmodifier.RequiresReplace(), + }, + }, + "available_autonomous_data_storage_size_in_tbs": schema.Float64Attribute{ + Computed: true, + }, + "available_container_databases": schema.Int32Attribute{ + Computed: true, + }, + "available_cpus": schema.Float32Attribute{ + Computed: true, + }, + "compute_model": schema.StringAttribute{ + CustomType: computeModel, + Computed: true, + }, + "cpu_core_count": schema.Int32Attribute{ + Computed: true, + }, + "cpu_core_count_per_node": schema.Int32Attribute{ + Required: true, + PlanModifiers: []planmodifier.Int32{ + int32planmodifier.RequiresReplace(), + }, + }, + "cpu_percentage": schema.Float32Attribute{ + Computed: true, + }, + "created_at": schema.StringAttribute{ + Computed: true, + }, + "data_storage_size_in_gbs": schema.Float64Attribute{ + Computed: true, + }, + "data_storage_size_in_tbs": schema.Float64Attribute{ + Computed: true, + }, + "odb_node_storage_size_in_gbs": schema.Int32Attribute{ + Computed: true, + }, + "db_servers": schema.SetAttribute{ + Optional: true, + Computed: true, + CustomType: fwtypes.SetOfStringType, + ElementType: types.StringType, + PlanModifiers: []planmodifier.Set{ + setplanmodifier.RequiresReplace(), + setplanmodifier.UseStateForUnknown(), + }, + }, + "description": schema.StringAttribute{ + Optional: true, + PlanModifiers: []planmodifier.String{ + stringplanmodifier.RequiresReplace(), + stringplanmodifier.UseStateForUnknown(), + }, + }, + "display_name": schema.StringAttribute{ + Required: true, + Validators: stringLengthBetween1And255Validator, + PlanModifiers: []planmodifier.String{ + stringplanmodifier.RequiresReplace(), + }, + }, + "domain": schema.StringAttribute{ + Computed: true, + }, + "exadata_storage_in_tbs_lowest_scaled_value": schema.Float64Attribute{ + Computed: true, + }, + "hostname": schema.StringAttribute{ + Computed: true, + PlanModifiers: []planmodifier.String{ + stringplanmodifier.UseStateForUnknown(), + }, + }, + "is_mtls_enabled_vm_cluster": schema.BoolAttribute{ + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.Bool{ + boolplanmodifier.RequiresReplace(), + boolplanmodifier.UseStateForUnknown(), + }, + }, + "license_model": schema.StringAttribute{ + CustomType: licenseModel, + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.String{ + stringplanmodifier.RequiresReplace(), + stringplanmodifier.UseStateForUnknown(), + }, + }, + "max_acds_lowest_scaled_value": schema.Int32Attribute{ + Computed: true, + }, + "memory_per_oracle_compute_unit_in_gbs": schema.Int32Attribute{ + Required: true, + PlanModifiers: []planmodifier.Int32{ + int32planmodifier.RequiresReplace(), + }, + }, + "memory_size_in_gbs": schema.Int32Attribute{ + Computed: true, + }, + "node_count": schema.Int32Attribute{ + Computed: true, + }, + "non_provisionable_autonomous_container_databases": schema.Int32Attribute{ + Computed: true, + }, + "oci_resource_anchor_name": schema.StringAttribute{ + Computed: true, + }, + "oci_url": schema.StringAttribute{ + Computed: true, + }, + "ocid": schema.StringAttribute{ + Computed: true, + }, + "odb_network_id": schema.StringAttribute{ + Required: true, + PlanModifiers: []planmodifier.String{ + stringplanmodifier.RequiresReplace(), + }, + }, + "percent_progress": schema.Float32Attribute{ + Computed: true, + }, + "provisionable_autonomous_container_databases": schema.Int32Attribute{ + Computed: true, + }, + "provisioned_autonomous_container_databases": schema.Int32Attribute{ + Computed: true, + }, + "provisioned_cpus": schema.Float32Attribute{ + Computed: true, + }, + "reclaimable_cpus": schema.Float32Attribute{ + Computed: true, + }, + "reserved_cpus": schema.Float32Attribute{ + Computed: true, + }, + "scan_listener_port_non_tls": schema.Int32Attribute{ + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.Int32{ + int32planmodifier.RequiresReplace(), + int32planmodifier.UseStateForUnknown(), + }, + }, + "scan_listener_port_tls": schema.Int32Attribute{ + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.Int32{ + int32planmodifier.RequiresReplace(), + int32planmodifier.UseStateForUnknown(), + }, + }, + "shape": schema.StringAttribute{ + Computed: true, + }, + "status": schema.StringAttribute{ + CustomType: status, + Computed: true, + }, + "reason": schema.StringAttribute{ + Computed: true, + }, + "time_zone": schema.StringAttribute{ + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.String{ + stringplanmodifier.RequiresReplace(), + stringplanmodifier.UseStateForUnknown(), + }, + }, + "total_autonomous_data_storage_in_tbs": schema.Float32Attribute{ + Computed: true, + Optional: true, + }, + "total_container_databases": schema.Int32Attribute{ + Required: true, + PlanModifiers: []planmodifier.Int32{ + int32planmodifier.RequiresReplace(), + }, + }, + "total_cpus": schema.Float32Attribute{ + Computed: true, + }, + "time_ords_certificate_expires": schema.StringAttribute{ + Computed: true, + }, + "time_database_ssl_certificate_expires": schema.StringAttribute{ + Computed: true, + }, + "maintenance_window": schema.ObjectAttribute{ + Optional: true, + Computed: true, + CustomType: fwtypes.NewObjectTypeOf[cloudAutonomousVmClusterMaintenanceWindowResourceModel](ctx), + PlanModifiers: []planmodifier.Object{ + objectplanmodifier.RequiresReplace(), + objectplanmodifier.UseStateForUnknown(), + }, + AttributeTypes: map[string]attr.Type{ + "days_of_week": types.SetType{ + ElemType: fwtypes.StringEnumType[odbtypes.DayOfWeekName](), + }, + "hours_of_day": types.SetType{ + ElemType: types.Int32Type, + }, + "lead_time_in_weeks": types.Int32Type, + "months": types.SetType{ + ElemType: fwtypes.StringEnumType[odbtypes.MonthName](), + }, + "preference": fwtypes.StringEnumType[odbtypes.PreferenceType](), + "weeks_of_month": types.SetType{ + ElemType: types.Int32Type, + }, + }, + }, + names.AttrTags: tftags.TagsAttribute(), + names.AttrTagsAll: tftags.TagsAttributeComputedOnly(), + }, + Blocks: map[string]schema.Block{ + names.AttrTimeouts: timeouts.Block(ctx, timeouts.Opts{ + Create: true, + Update: true, + Delete: true, + }), + }, + } +} + +func (r *resourceCloudAutonomousVmCluster) Create(ctx context.Context, req resource.CreateRequest, resp *resource.CreateResponse) { + fmt.Println("Create called") + conn := r.Meta().ODBClient(ctx) + + var plan cloudAutonomousVmClusterResourceModel + resp.Diagnostics.Append(req.Plan.Get(ctx, &plan)...) + if resp.Diagnostics.HasError() { + return + } + + input := odb.CreateCloudAutonomousVmClusterInput{ + ClientToken: aws.String(id.UniqueId()), + Tags: getTagsIn(ctx), + MaintenanceWindow: mapAVMCMaintenanceWindowToOdbMaintenanceWindow(ctx, plan.MaintenanceWindow), + } + resp.Diagnostics.Append(flex.Expand(ctx, plan, &input, flex.WithIgnoredFieldNamesAppend("Tags"), + flex.WithIgnoredFieldNamesAppend("MaintenanceWindow"))...) + if resp.Diagnostics.HasError() { + return + } + + out, err := conn.CreateCloudAutonomousVmCluster(ctx, &input) + if err != nil { + fmt.Println("CreateCloudAutonomousVmCluster failed", err) + resp.Diagnostics.AddError( + create.ProblemStandardMessage(names.ODB, create.ErrActionCreating, ResNameCloudAutonomousVmCluster, plan.DisplayName.ValueString(), err), + err.Error(), + ) + return + } + if out == nil || out.CloudAutonomousVmClusterId == nil { + resp.Diagnostics.AddError( + create.ProblemStandardMessage(names.ODB, create.ErrActionCreating, ResNameCloudAutonomousVmCluster, plan.DisplayName.ValueString(), nil), + errors.New("empty output").Error(), + ) + return + } + + createTimeout := r.CreateTimeout(ctx, plan.Timeouts) + createdAVMC, err := waitCloudAutonomousVmClusterCreated(ctx, conn, *out.CloudAutonomousVmClusterId, createTimeout) + if err != nil { + resp.Diagnostics.AddError( + create.ProblemStandardMessage(names.ODB, create.ErrActionWaitingForCreation, ResNameCloudAutonomousVmCluster, plan.DisplayName.ValueString(), err), + err.Error(), + ) + return + } + plan.CreatedAt = types.StringValue(createdAVMC.CreatedAt.Format(time.RFC3339)) + + if createdAVMC.TimeDatabaseSslCertificateExpires != nil { + plan.TimeDatabaseSslCertificateExpires = types.StringValue(createdAVMC.TimeDatabaseSslCertificateExpires.Format(time.RFC3339)) + } else { + plan.TimeDatabaseSslCertificateExpires = types.StringValue(NotAvailableValues) + } + + if createdAVMC.TimeOrdsCertificateExpires != nil { + plan.TimeOrdsCertificateExpires = types.StringValue(createdAVMC.TimeOrdsCertificateExpires.Format(time.RFC3339)) + } else { + plan.TimeOrdsCertificateExpires = types.StringValue(NotAvailableValues) + } + + if createdAVMC.MaintenanceWindow != nil { + plan.MaintenanceWindow = mapToCloudAutonomousVmClusterMaintenanceWindowResourceModel(ctx, createdAVMC.MaintenanceWindow) + } + resp.Diagnostics.Append(flex.Flatten(ctx, createdAVMC, &plan, flex.WithIgnoredFieldNamesAppend("CreatedAt"), + flex.WithIgnoredFieldNamesAppend("TimeOrdsCertificateExpires"), + flex.WithIgnoredFieldNamesAppend("TimeDatabaseSslCertificateExpires"), + flex.WithIgnoredFieldNamesAppend("MaintenanceWindow"))...) + + resp.Diagnostics.Append(resp.State.Set(ctx, plan)...) +} + +func (r *resourceCloudAutonomousVmCluster) Read(ctx context.Context, req resource.ReadRequest, resp *resource.ReadResponse) { + + conn := r.Meta().ODBClient(ctx) + + var state cloudAutonomousVmClusterResourceModel + resp.Diagnostics.Append(req.State.Get(ctx, &state)...) + if resp.Diagnostics.HasError() { + return + } + + out, err := FindCloudAutonomousVmClusterByID(ctx, conn, state.CloudAutonomousVmClusterId.ValueString()) + + if tfresource.NotFound(err) { + resp.Diagnostics.Append(fwdiag.NewResourceNotFoundWarningDiagnostic(err)) + resp.State.RemoveResource(ctx) + return + } + if err != nil { + resp.Diagnostics.AddError( + create.ProblemStandardMessage(names.ODB, create.ErrActionReading, ResNameCloudAutonomousVmCluster, state.DisplayName.ValueString(), err), + err.Error(), + ) + return + } + + state.CreatedAt = types.StringValue(out.CreatedAt.Format(time.RFC3339)) + if out.TimeOrdsCertificateExpires != nil { + state.TimeOrdsCertificateExpires = types.StringValue(out.TimeOrdsCertificateExpires.Format(time.RFC3339)) + } else { + state.TimeOrdsCertificateExpires = types.StringValue(NotAvailableValues) + } + if out.TimeDatabaseSslCertificateExpires != nil { + state.TimeDatabaseSslCertificateExpires = types.StringValue(out.TimeDatabaseSslCertificateExpires.Format(time.RFC3339)) + } else { + state.TimeDatabaseSslCertificateExpires = types.StringValue(NotAvailableValues) + } + if out.MaintenanceWindow != nil { + state.MaintenanceWindow = mapToCloudAutonomousVmClusterMaintenanceWindowResourceModel(ctx, out.MaintenanceWindow) + } + resp.Diagnostics.Append(flex.Flatten(ctx, out, &state, flex.WithIgnoredFieldNamesAppend("CreatedAt"), + flex.WithIgnoredFieldNamesAppend("TimeOrdsCertificateExpires"), + flex.WithIgnoredFieldNamesAppend("TimeDatabaseSslCertificateExpires"), + flex.WithIgnoredFieldNamesAppend("MaintenanceWindow"))...) + + if resp.Diagnostics.HasError() { + return + } + + resp.Diagnostics.Append(resp.State.Set(ctx, &state)...) +} + +func (r *resourceCloudAutonomousVmCluster) Update(ctx context.Context, req resource.UpdateRequest, resp *resource.UpdateResponse) { + fmt.Println("Update called") + var plan, state cloudAutonomousVmClusterResourceModel + resp.Diagnostics.Append(req.Plan.Get(ctx, &plan)...) + resp.Diagnostics.Append(req.State.Get(ctx, &state)...) + if resp.Diagnostics.HasError() { + return + } + conn := r.Meta().ODBClient(ctx) + + updateTimeout := r.UpdateTimeout(ctx, plan.Timeouts) + updatedAVMC, err := waitCloudAutonomousVmClusterUpdated(ctx, conn, state.CloudAutonomousVmClusterId.ValueString(), updateTimeout) + + if err != nil { + resp.Diagnostics.AddError( + create.ProblemStandardMessage(names.ODB, create.ErrActionWaitingForUpdate, ResNameCloudAutonomousVmCluster, state.CloudAutonomousVmClusterId.String(), err), + err.Error(), + ) + return + } + plan.CreatedAt = types.StringValue(updatedAVMC.CreatedAt.Format(time.RFC3339)) + + if updatedAVMC.TimeDatabaseSslCertificateExpires != nil { + plan.TimeDatabaseSslCertificateExpires = types.StringValue(updatedAVMC.TimeDatabaseSslCertificateExpires.Format(time.RFC3339)) + } else { + plan.TimeDatabaseSslCertificateExpires = types.StringValue(NotAvailableValues) + } + + if updatedAVMC.TimeOrdsCertificateExpires != nil { + plan.TimeOrdsCertificateExpires = types.StringValue(updatedAVMC.TimeOrdsCertificateExpires.Format(time.RFC3339)) + } else { + plan.TimeOrdsCertificateExpires = types.StringValue(NotAvailableValues) + } + if updatedAVMC.MaintenanceWindow != nil { + plan.MaintenanceWindow = mapToCloudAutonomousVmClusterMaintenanceWindowResourceModel(ctx, updatedAVMC.MaintenanceWindow) + } + + resp.Diagnostics.Append(flex.Flatten(ctx, updatedAVMC, &plan, flex.WithIgnoredFieldNamesAppend("CreatedAt"), + flex.WithIgnoredFieldNamesAppend("TimeOrdsCertificateExpires"), + flex.WithIgnoredFieldNamesAppend("TimeDatabaseSslCertificateExpires"), flex.WithIgnoredFieldNamesAppend("MaintenanceWindow"))...) + + if resp.Diagnostics.HasError() { + return + } + resp.Diagnostics.Append(resp.State.Set(ctx, &plan)...) +} + +func printAutonomousVmCluster(input cloudAutonomousVmClusterResourceModel) { + fmt.Println("\n Autonomous VM Cluster") + fmt.Println(" arn:", input.CloudAutonomousVmClusterArn.ValueString()) + fmt.Println("id:", input.CloudAutonomousVmClusterId.ValueString()) + fmt.Println("exa_infra_id:", input.CloudExadataInfrastructureId.ValueString()) + fmt.Println(" AutonomousDataStorageSizeInTBs:", input.AutonomousDataStorageSizeInTBs.ValueFloat64()) + fmt.Println("AvailableAutonomousDataStorageSizeInTBs:", input.AvailableAutonomousDataStorageSizeInTBs.ValueFloat64()) + fmt.Println("AvailableContainerDatabases:", input.AvailableContainerDatabases.ValueInt32()) + fmt.Println("AvailableCpus:", input.AvailableCpus.ValueFloat32()) + fmt.Println("ComputeModel:", input.ComputeModel.ValueString()) + fmt.Println("CpuCoreCount", input.CpuCoreCount.ValueInt32()) + fmt.Println("CpuCoreCountPerNode:", input.CpuCoreCountPerNode.ValueInt32()) + fmt.Println("CpuPercentage:", input.CpuPercentage.ValueFloat32()) + fmt.Println("CreatedAt", input.CreatedAt.ValueString()) + fmt.Println("DataStorageSizeInGBs:", input.DataStorageSizeInGBs.ValueFloat64()) + fmt.Println("DataStorageSizeInTBs", input.DataStorageSizeInTBs.ValueFloat64()) + fmt.Println("DbNodeStorageSizeInGBs:", input.DbNodeStorageSizeInGBs.ValueInt32()) + fmt.Println("DbServers", input.DbServers.String()) + fmt.Println("Description", input.Description.ValueString()) + fmt.Println("DisplayName", input.DisplayName.ValueString()) + fmt.Println("Domain:", input.Domain.ValueString()) + fmt.Println("ExadataStorageInTBsLowestScaledValue:", input.ExadataStorageInTBsLowestScaledValue.ValueFloat64()) + fmt.Println("Hostname", input.Hostname.ValueString()) + fmt.Println("IsMtlsEnabledVmCluster:", input.IsMtlsEnabledVmCluster.ValueBool()) + fmt.Println("LicenseModel", input.LicenseModel.ValueString()) + fmt.Println("MaxAcdsLowestScaledValue", input.MaxAcdsLowestScaledValue.ValueInt32()) + fmt.Println("MemoryPerOracleComputeUnitInGBs", input.MemoryPerOracleComputeUnitInGBs.ValueInt32()) + fmt.Println("MemorySizeInGBs", input.MemorySizeInGBs.ValueInt32()) + fmt.Println("NodeCount", input.NodeCount.ValueInt32()) + fmt.Println("NonProvisionableAutonomousContainerDatabases", input.NonProvisionableAutonomousContainerDatabases.ValueInt32()) + fmt.Println("OciResourceAnchorName", input.OciResourceAnchorName.ValueString()) + fmt.Println("OciUrl", input.OciUrl.ValueString()) + fmt.Println("Ocid", input.Ocid.ValueString()) + fmt.Println("OdbNetworkId", input.OdbNetworkId.ValueString()) + fmt.Println("PercentProgress", input.PercentProgress.ValueFloat32()) + fmt.Println("ProvisionableAutonomousContainerDatabases", input.ProvisionableAutonomousContainerDatabases.ValueInt32()) + fmt.Println("ProvisionedAutonomousContainerDatabases", input.ProvisionedAutonomousContainerDatabases.ValueInt32()) + fmt.Println("ProvisionedCpus", input.ProvisionedCpus.ValueFloat32()) + fmt.Println("ReclaimableCpus", input.ReclaimableCpus.ValueFloat32()) + fmt.Println("ReservedCpus", input.ReservedCpus.ValueFloat32()) + fmt.Println("ScanListenerPortNonTls", input.ScanListenerPortNonTls.ValueInt32()) + fmt.Println("ScanListenerPortTls", input.ScanListenerPortTls.ValueInt32()) + fmt.Println("Shape", input.Shape.ValueString()) + fmt.Println("Status", input.Status.ValueString()) + fmt.Println("StatusReason", input.StatusReason.ValueString()) + fmt.Println("TimeZone", input.TimeZone.ValueString()) + fmt.Println("TotalAutonomousDataStorageInTBs", input.TotalAutonomousDataStorageInTBs.ValueFloat32()) + fmt.Println("TotalContainerDatabases", input.TotalContainerDatabases.ValueInt32()) + fmt.Println("TotalCpus", input.TotalCpus.ValueFloat32()) + fmt.Println("Timeouts", input.Timeouts) +} + +func (r *resourceCloudAutonomousVmCluster) Delete(ctx context.Context, req resource.DeleteRequest, resp *resource.DeleteResponse) { + fmt.Println("Delete called") + conn := r.Meta().ODBClient(ctx) + + var state cloudAutonomousVmClusterResourceModel + resp.Diagnostics.Append(req.State.Get(ctx, &state)...) + if resp.Diagnostics.HasError() { + return + } + + input := odb.DeleteCloudAutonomousVmClusterInput{ + CloudAutonomousVmClusterId: state.CloudAutonomousVmClusterId.ValueStringPointer(), + } + + _, err := conn.DeleteCloudAutonomousVmCluster(ctx, &input) + + if err != nil { + if errs.IsA[*odbtypes.ResourceNotFoundException](err) { + return + } + + resp.Diagnostics.AddError( + create.ProblemStandardMessage(names.ODB, create.ErrActionDeleting, ResNameCloudAutonomousVmCluster, state.CloudAutonomousVmClusterId.ValueString(), err), + err.Error(), + ) + return + } + deleteTimeout := r.DeleteTimeout(ctx, state.Timeouts) + _, err = waitCloudAutonomousVmClusterDeleted(ctx, conn, state.CloudAutonomousVmClusterId.ValueString(), deleteTimeout) + if err != nil { + resp.Diagnostics.AddError( + create.ProblemStandardMessage(names.ODB, create.ErrActionWaitingForDeletion, ResNameCloudAutonomousVmCluster, state.CloudAutonomousVmClusterId.ValueString(), err), + err.Error(), + ) + return + } +} + +func (r *resourceCloudAutonomousVmCluster) ImportState(ctx context.Context, req resource.ImportStateRequest, resp *resource.ImportStateResponse) { + resource.ImportStatePassthroughID(ctx, path.Root(names.AttrID), req, resp) +} + +func waitCloudAutonomousVmClusterCreated(ctx context.Context, conn *odb.Client, id string, timeout time.Duration) (*odbtypes.CloudAutonomousVmCluster, error) { + stateConf := &retry.StateChangeConf{ + Pending: enum.Slice(odbtypes.ResourceStatusProvisioning), + Target: enum.Slice(odbtypes.ResourceStatusAvailable, odbtypes.ResourceStatusFailed), + Refresh: statusCloudAutonomousVmCluster(ctx, conn, id), + Timeout: timeout, + } + + outputRaw, err := stateConf.WaitForStateContext(ctx) + if out, ok := outputRaw.(*odbtypes.CloudAutonomousVmCluster); ok { + return out, err + } + + return nil, err +} + +func waitCloudAutonomousVmClusterUpdated(ctx context.Context, conn *odb.Client, id string, timeout time.Duration) (*odbtypes.CloudAutonomousVmCluster, error) { + stateConf := &retry.StateChangeConf{ + Pending: enum.Slice(odbtypes.ResourceStatusUpdating), + Target: enum.Slice(odbtypes.ResourceStatusAvailable, odbtypes.ResourceStatusFailed), + Refresh: statusCloudAutonomousVmCluster(ctx, conn, id), + Timeout: timeout, + } + + outputRaw, err := stateConf.WaitForStateContext(ctx) + if out, ok := outputRaw.(*odbtypes.CloudAutonomousVmCluster); ok { + return out, err + } + + return nil, err +} + +func waitCloudAutonomousVmClusterDeleted(ctx context.Context, conn *odb.Client, id string, timeout time.Duration) (*odbtypes.CloudAutonomousVmCluster, error) { + stateConf := &retry.StateChangeConf{ + Pending: enum.Slice(odbtypes.ResourceStatusTerminating), + Target: []string{}, + Refresh: statusCloudAutonomousVmCluster(ctx, conn, id), + Timeout: timeout, + } + + outputRaw, err := stateConf.WaitForStateContext(ctx) + if out, ok := outputRaw.(*odbtypes.CloudAutonomousVmCluster); ok { + return out, err + } + + return nil, err +} + +func statusCloudAutonomousVmCluster(ctx context.Context, conn *odb.Client, id string) retry.StateRefreshFunc { + return func() (any, string, error) { + out, err := FindCloudAutonomousVmClusterByID(ctx, conn, id) + if tfresource.NotFound(err) { + return nil, "", nil + } + + if err != nil { + return nil, "", err + } + + return out, string(out.Status), nil + } +} + +func FindCloudAutonomousVmClusterByID(ctx context.Context, conn *odb.Client, id string) (*odbtypes.CloudAutonomousVmCluster, error) { + input := odb.GetCloudAutonomousVmClusterInput{ + CloudAutonomousVmClusterId: aws.String(id), + } + out, err := conn.GetCloudAutonomousVmCluster(ctx, &input) + if err != nil { + if errs.IsA[*odbtypes.ResourceNotFoundException](err) { + return nil, &retry.NotFoundError{ + LastError: err, + LastRequest: &input, + } + } + return nil, err + } + + if out == nil || out.CloudAutonomousVmCluster == nil { + return nil, tfresource.NewEmptyResultError(&input) + } + + return out.CloudAutonomousVmCluster, nil +} + +// TIP: ==== SWEEPERS ==== +// When acceptance testing resources, interrupted or failed tests may +// leave behind orphaned resources in an account. To facilitate cleaning +// up lingering resources, each resource implementation should include +// a corresponding "sweeper" function. +// +// The sweeper function lists all resources of a given type and sets the +// appropriate identifers required to delete the resource via the Delete +// method implemented above. +// +// Once the sweeper function is implemented, register it in sweeper.go +// as follows: +// +// awsv2.Register("aws_odb_cloud_autonomous_vm_cluster", sweepCloudAutonomousVmClusters) +// +// See more: +// https://hashicorp.github.io/terraform-provider-aws/running-and-writing-acceptance-tests/#acceptance-test-sweepers +func sweepCloudAutonomousVmClusters(ctx context.Context, client *conns.AWSClient) ([]sweep.Sweepable, error) { + input := odb.ListCloudAutonomousVmClustersInput{} + conn := client.ODBClient(ctx) + var sweepResources []sweep.Sweepable + + pages := odb.NewListCloudAutonomousVmClustersPaginator(conn, &input) + for pages.HasMorePages() { + page, err := pages.NextPage(ctx) + if err != nil { + return nil, err + } + + for _, v := range page.CloudAutonomousVmClusters { + sweepResources = append(sweepResources, sweepfw.NewSweepResource(newResourceCloudAutonomousVmCluster, client, + sweepfw.NewAttribute(names.AttrID, aws.ToString(v.CloudAutonomousVmClusterId))), + ) + } + } + + return sweepResources, nil +} + +func mapAVMCMaintenanceWindowToOdbMaintenanceWindow(ctx context.Context, avmcMaintenanceWindowFwTypesObj fwtypes.ObjectValueOf[cloudAutonomousVmClusterMaintenanceWindowResourceModel]) *odbtypes.MaintenanceWindow { + if avmcMaintenanceWindowFwTypesObj.IsNull() { + return nil + } + if avmcMaintenanceWindowFwTypesObj.IsUnknown() { + return nil + } + + var avmcMaintenanceWindowResource cloudAutonomousVmClusterMaintenanceWindowResourceModel + + avmcMaintenanceWindowFwTypesObj.As(ctx, &avmcMaintenanceWindowResource, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) + + var daysOfWeekNames []odbtypes.DayOfWeekName + avmcMaintenanceWindowResource.DaysOfWeek.ElementsAs(ctx, &daysOfWeekNames, false) + daysOfWeek := make([]odbtypes.DayOfWeek, 0, len(daysOfWeekNames)) + + for _, dayOfWeek := range daysOfWeekNames { + daysOfWeek = append(daysOfWeek, odbtypes.DayOfWeek{ + Name: dayOfWeek, + }) + } + + var hoursOfTheDay []int32 + avmcMaintenanceWindowResource.HoursOfDay.ElementsAs(ctx, &hoursOfTheDay, false) + + var monthNames []odbtypes.MonthName + avmcMaintenanceWindowResource.Months.ElementsAs(ctx, &monthNames, false) + months := make([]odbtypes.Month, 0, len(monthNames)) + for _, month := range monthNames { + months = append(months, odbtypes.Month{ + Name: month, + }) + } + + var weeksOfMonth []int32 + avmcMaintenanceWindowResource.WeeksOfMonth.ElementsAs(ctx, &weeksOfMonth, false) + + odbTypeMW := odbtypes.MaintenanceWindow{ + DaysOfWeek: daysOfWeek, + HoursOfDay: hoursOfTheDay, + LeadTimeInWeeks: avmcMaintenanceWindowResource.LeadTimeInWeeks.ValueInt32Pointer(), + Months: months, + Preference: avmcMaintenanceWindowResource.Preference.ValueEnum(), + WeeksOfMonth: weeksOfMonth, + } + return &odbTypeMW +} + +func mapToCloudAutonomousVmClusterMaintenanceWindowResourceModel(ctx context.Context, avmcMW *odbtypes.MaintenanceWindow) fwtypes.ObjectValueOf[cloudAutonomousVmClusterMaintenanceWindowResourceModel] { + //days of week + daysOfWeek := make([]attr.Value, 0, len(avmcMW.DaysOfWeek)) + for _, dayOfWeek := range avmcMW.DaysOfWeek { + dayOfWeekStringValue := fwtypes.StringEnumValue(dayOfWeek.Name).StringValue + daysOfWeek = append(daysOfWeek, dayOfWeekStringValue) + } + setValueOfDaysOfWeek, _ := basetypes.NewSetValue(types.StringType, daysOfWeek) + daysOfWeekRead := fwtypes.SetValueOf[fwtypes.StringEnum[odbtypes.DayOfWeekName]]{ + SetValue: setValueOfDaysOfWeek, + } + //hours of the day + hoursOfTheDay := make([]attr.Value, 0, len(avmcMW.HoursOfDay)) + for _, hourOfTheDay := range avmcMW.HoursOfDay { + daysOfWeekInt32Value := types.Int32Value(hourOfTheDay) + hoursOfTheDay = append(hoursOfTheDay, daysOfWeekInt32Value) + } + setValuesOfHoursOfTheDay, _ := basetypes.NewSetValue(types.Int32Type, hoursOfTheDay) + hoursOfTheDayRead := fwtypes.SetValueOf[types.Int32]{ + SetValue: setValuesOfHoursOfTheDay, + } + //monts + months := make([]attr.Value, 0, len(avmcMW.Months)) + for _, month := range avmcMW.Months { + monthStringValue := fwtypes.StringEnumValue(month.Name).StringValue + months = append(months, monthStringValue) + } + setValuesOfMonth, _ := basetypes.NewSetValue(types.StringType, months) + monthsRead := fwtypes.SetValueOf[fwtypes.StringEnum[odbtypes.MonthName]]{ + SetValue: setValuesOfMonth, + } + //weeks of month + weeksOfMonth := make([]attr.Value, 0, len(avmcMW.WeeksOfMonth)) + for _, weekOfMonth := range avmcMW.WeeksOfMonth { + weeksOfMonthInt32Value := types.Int32Value(weekOfMonth) + weeksOfMonth = append(weeksOfMonth, weeksOfMonthInt32Value) + } + setValuesOfWeekOfMonth, _ := basetypes.NewSetValue(types.Int32Type, weeksOfMonth) + weeksOfMonthRead := fwtypes.SetValueOf[types.Int32]{ + SetValue: setValuesOfWeekOfMonth, + } + + computedMW := cloudAutonomousVmClusterMaintenanceWindowResourceModel{ + DaysOfWeek: daysOfWeekRead, + HoursOfDay: hoursOfTheDayRead, + LeadTimeInWeeks: types.Int32PointerValue(avmcMW.LeadTimeInWeeks), + Months: monthsRead, + Preference: fwtypes.StringEnumValue(avmcMW.Preference), + WeeksOfMonth: weeksOfMonthRead, + } + result, _ := fwtypes.NewObjectValueOf[cloudAutonomousVmClusterMaintenanceWindowResourceModel](ctx, &computedMW) + return result +} + +type cloudAutonomousVmClusterResourceModel struct { + framework.WithRegionModel + CloudAutonomousVmClusterArn types.String `tfsdk:"arn"` + CloudAutonomousVmClusterId types.String `tfsdk:"id"` + CloudExadataInfrastructureId types.String `tfsdk:"cloud_exadata_infrastructure_id"` + AutonomousDataStoragePercentage types.Float32 `tfsdk:"autonomous_data_storage_percentage"` + AutonomousDataStorageSizeInTBs types.Float64 `tfsdk:"autonomous_data_storage_size_in_tbs"` + AvailableAutonomousDataStorageSizeInTBs types.Float64 `tfsdk:"available_autonomous_data_storage_size_in_tbs"` + AvailableContainerDatabases types.Int32 `tfsdk:"available_container_databases"` + AvailableCpus types.Float32 `tfsdk:"available_cpus"` + ComputeModel fwtypes.StringEnum[odbtypes.ComputeModel] `tfsdk:"compute_model"` + CpuCoreCount types.Int32 `tfsdk:"cpu_core_count"` + CpuCoreCountPerNode types.Int32 `tfsdk:"cpu_core_count_per_node"` + CpuPercentage types.Float32 `tfsdk:"cpu_percentage"` + CreatedAt types.String `tfsdk:"created_at"` + DataStorageSizeInGBs types.Float64 `tfsdk:"data_storage_size_in_gbs"` + DataStorageSizeInTBs types.Float64 `tfsdk:"data_storage_size_in_tbs"` + DbNodeStorageSizeInGBs types.Int32 `tfsdk:"odb_node_storage_size_in_gbs"` + DbServers fwtypes.SetValueOf[types.String] `tfsdk:"db_servers"` + Description types.String `tfsdk:"description"` + DisplayName types.String `tfsdk:"display_name"` + Domain types.String `tfsdk:"domain"` + ExadataStorageInTBsLowestScaledValue types.Float64 `tfsdk:"exadata_storage_in_tbs_lowest_scaled_value"` + Hostname types.String `tfsdk:"hostname"` + IsMtlsEnabledVmCluster types.Bool `tfsdk:"is_mtls_enabled_vm_cluster"` + LicenseModel fwtypes.StringEnum[odbtypes.LicenseModel] `tfsdk:"license_model"` + MaxAcdsLowestScaledValue types.Int32 `tfsdk:"max_acds_lowest_scaled_value"` + MemoryPerOracleComputeUnitInGBs types.Int32 `tfsdk:"memory_per_oracle_compute_unit_in_gbs"` + MemorySizeInGBs types.Int32 `tfsdk:"memory_size_in_gbs"` + NodeCount types.Int32 `tfsdk:"node_count"` + NonProvisionableAutonomousContainerDatabases types.Int32 `tfsdk:"non_provisionable_autonomous_container_databases"` + OciResourceAnchorName types.String `tfsdk:"oci_resource_anchor_name"` + OciUrl types.String `tfsdk:"oci_url"` + Ocid types.String `tfsdk:"ocid"` + OdbNetworkId types.String `tfsdk:"odb_network_id"` + PercentProgress types.Float32 `tfsdk:"percent_progress"` + ProvisionableAutonomousContainerDatabases types.Int32 `tfsdk:"provisionable_autonomous_container_databases"` + ProvisionedAutonomousContainerDatabases types.Int32 `tfsdk:"provisioned_autonomous_container_databases"` + ProvisionedCpus types.Float32 `tfsdk:"provisioned_cpus"` + ReclaimableCpus types.Float32 `tfsdk:"reclaimable_cpus"` + ReservedCpus types.Float32 `tfsdk:"reserved_cpus"` + ScanListenerPortNonTls types.Int32 `tfsdk:"scan_listener_port_non_tls"` + ScanListenerPortTls types.Int32 `tfsdk:"scan_listener_port_tls"` + Shape types.String `tfsdk:"shape"` + Status fwtypes.StringEnum[odbtypes.ResourceStatus] `tfsdk:"status"` + StatusReason types.String `tfsdk:"reason"` + TimeZone types.String `tfsdk:"time_zone"` + TotalAutonomousDataStorageInTBs types.Float32 `tfsdk:"total_autonomous_data_storage_in_tbs"` + TotalContainerDatabases types.Int32 `tfsdk:"total_container_databases"` + TotalCpus types.Float32 `tfsdk:"total_cpus"` + Timeouts timeouts.Value `tfsdk:"timeouts"` + Tags tftags.Map `tfsdk:"tags"` + TagsAll tftags.Map `tfsdk:"tags_all"` + TimeOrdsCertificateExpires types.String `tfsdk:"time_ords_certificate_expires"` + TimeDatabaseSslCertificateExpires types.String `tfsdk:"time_database_ssl_certificate_expires"` + MaintenanceWindow fwtypes.ObjectValueOf[cloudAutonomousVmClusterMaintenanceWindowResourceModel] `tfsdk:"maintenance_window"` +} + +type cloudAutonomousVmClusterMaintenanceWindowResourceModel struct { + DaysOfWeek fwtypes.SetValueOf[fwtypes.StringEnum[odbtypes.DayOfWeekName]] `tfsdk:"days_of_week"` + HoursOfDay fwtypes.SetValueOf[types.Int32] `tfsdk:"hours_of_day"` + LeadTimeInWeeks types.Int32 `tfsdk:"lead_time_in_weeks"` + Months fwtypes.SetValueOf[fwtypes.StringEnum[odbtypes.MonthName]] `tfsdk:"months"` + Preference fwtypes.StringEnum[odbtypes.PreferenceType] `tfsdk:"preference"` + WeeksOfMonth fwtypes.SetValueOf[types.Int32] `tfsdk:"weeks_of_month"` +} diff --git a/internal/service/odb/cloud_autonomous_vm_cluster_data_source.go b/internal/service/odb/cloud_autonomous_vm_cluster_data_source.go new file mode 100644 index 000000000000..e2e96bcc7cd6 --- /dev/null +++ b/internal/service/odb/cloud_autonomous_vm_cluster_data_source.go @@ -0,0 +1,399 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +package odb + +import ( + "context" + "github.com/hashicorp/terraform-plugin-framework/attr" + "github.com/hashicorp/terraform-plugin-framework/types/basetypes" + tftags "github.com/hashicorp/terraform-provider-aws/internal/tags" + "time" + + "github.com/aws/aws-sdk-go-v2/service/odb" + odbtypes "github.com/aws/aws-sdk-go-v2/service/odb/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/create" + "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/names" +) + +// Function annotations are used for datasource registration to the Provider. DO NOT EDIT. +// @FrameworkDataSource("aws_odb_cloud_autonomous_vm_cluster", name="Cloud Autonomous Vm Cluster") +func newDataSourceCloudAutonomousVmCluster(context.Context) (datasource.DataSourceWithConfigure, error) { + return &dataSourceCloudAutonomousVmCluster{}, nil +} + +const ( + DSNameCloudAutonomousVmCluster = "Cloud Autonomous Vm Cluster Data Source" +) + +type dataSourceCloudAutonomousVmCluster struct { + framework.DataSourceWithModel[cloudAutonomousVmClusterDataSourceModel] +} + +func (d *dataSourceCloudAutonomousVmCluster) Schema(ctx context.Context, req datasource.SchemaRequest, resp *datasource.SchemaResponse) { + status := fwtypes.StringEnumType[odbtypes.ResourceStatus]() + licenseModel := fwtypes.StringEnumType[odbtypes.LicenseModel]() + computeModel := fwtypes.StringEnumType[odbtypes.ComputeModel]() + resp.Schema = schema.Schema{ + Attributes: map[string]schema.Attribute{ + names.AttrARN: framework.ARNAttributeComputedOnly(), + + names.AttrID: schema.StringAttribute{ + Required: true, + }, + "cloud_exadata_infrastructure_id": schema.StringAttribute{ + Computed: true, + }, + "autonomous_data_storage_percentage": schema.Float32Attribute{ + Computed: true, + }, + "autonomous_data_storage_size_in_tbs": schema.Float64Attribute{ + Computed: true, + }, + "available_autonomous_data_storage_size_in_tbs": schema.Float64Attribute{ + Computed: true, + }, + "available_container_databases": schema.Int32Attribute{ + Computed: true, + }, + "available_cpus": schema.Float32Attribute{ + Computed: true, + }, + "compute_model": schema.StringAttribute{ + CustomType: computeModel, + Computed: true, + }, + "cpu_core_count": schema.Int32Attribute{ + Computed: true, + }, + "cpu_core_count_per_node": schema.Int32Attribute{ + Computed: true, + }, + "cpu_percentage": schema.Float32Attribute{ + Computed: true, + }, + "created_at": schema.StringAttribute{ + Computed: true, + }, + "data_storage_size_in_gbs": schema.Float64Attribute{ + Computed: true, + }, + "data_storage_size_in_tbs": schema.Float64Attribute{ + Computed: true, + }, + "odb_node_storage_size_in_gbs": schema.Int32Attribute{ + Computed: true, + }, + "db_servers": schema.SetAttribute{ + Computed: true, + CustomType: fwtypes.SetOfStringType, + ElementType: types.StringType, + }, + "description": schema.StringAttribute{ + Computed: true, + }, + "display_name": schema.StringAttribute{ + Computed: true, + }, + "domain": schema.StringAttribute{ + Computed: true, + }, + "exadata_storage_in_tbs_lowest_scaled_value": schema.Float64Attribute{ + Computed: true, + }, + "hostname": schema.StringAttribute{ + Computed: true, + }, + "is_mtls_enabled_vm_cluster": schema.BoolAttribute{ + Computed: true, + }, + "license_model": schema.StringAttribute{ + CustomType: licenseModel, + Computed: true, + }, + "max_acds_lowest_scaled_value": schema.Int32Attribute{ + Computed: true, + }, + "memory_per_oracle_compute_unit_in_gbs": schema.Int32Attribute{ + Computed: true, + }, + "memory_size_in_gbs": schema.Int32Attribute{ + Computed: true, + }, + "node_count": schema.Int32Attribute{ + Computed: true, + }, + "non_provisionable_autonomous_container_databases": schema.Int32Attribute{ + Computed: true, + }, + "oci_resource_anchor_name": schema.StringAttribute{ + Computed: true, + }, + "oci_url": schema.StringAttribute{ + Computed: true, + }, + "ocid": schema.StringAttribute{ + Computed: true, + }, + "odb_network_id": schema.StringAttribute{ + Computed: true, + }, + "percent_progress": schema.Float32Attribute{ + Computed: true, + }, + "provisionable_autonomous_container_databases": schema.Int32Attribute{ + Computed: true, + }, + "provisioned_autonomous_container_databases": schema.Int32Attribute{ + Computed: true, + }, + "provisioned_cpus": schema.Float32Attribute{ + Computed: true, + }, + "reclaimable_cpus": schema.Float32Attribute{ + Computed: true, + }, + "reserved_cpus": schema.Float32Attribute{ + Computed: true, + }, + "scan_listener_port_non_tls": schema.Int32Attribute{ + Computed: true, + }, + "scan_listener_port_tls": schema.Int32Attribute{ + Computed: true, + }, + "shape": schema.StringAttribute{ + Computed: true, + }, + "status": schema.StringAttribute{ + CustomType: status, + Computed: true, + }, + "reason": schema.StringAttribute{ + Computed: true, + }, + "time_database_ssl_certificate_expires": schema.StringAttribute{ + Computed: true, + }, + "time_ords_certificate_expires": schema.StringAttribute{ + Computed: true, + }, + "time_zone": schema.StringAttribute{ + Computed: true, + }, + "total_autonomous_data_storage_in_tbs": schema.Float32Attribute{ + Computed: true, + }, + "total_container_databases": schema.Int32Attribute{ + Computed: true, + }, + "total_cpus": schema.Float32Attribute{ + Computed: true, + }, + names.AttrTags: tftags.TagsAttributeComputedOnly(), + "maintenance_window": schema.ObjectAttribute{ + Computed: true, + CustomType: fwtypes.NewObjectTypeOf[cloudAutonomousVmClusterMaintenanceWindowDataSourceModel](ctx), + + AttributeTypes: map[string]attr.Type{ + "days_of_week": types.SetType{ + ElemType: fwtypes.StringEnumType[odbtypes.DayOfWeekName](), + }, + "hours_of_day": types.SetType{ + ElemType: types.Int32Type, + }, + "lead_time_in_weeks": types.Int32Type, + "months": types.SetType{ + ElemType: fwtypes.StringEnumType[odbtypes.MonthName](), + }, + "preference": fwtypes.StringEnumType[odbtypes.PreferenceType](), + "weeks_of_month": types.SetType{ + ElemType: types.Int32Type, + }, + }, + }, + }, + } +} + +func (d *dataSourceCloudAutonomousVmCluster) Read(ctx context.Context, req datasource.ReadRequest, resp *datasource.ReadResponse) { + + conn := d.Meta().ODBClient(ctx) + + var data cloudAutonomousVmClusterDataSourceModel + resp.Diagnostics.Append(req.Config.Get(ctx, &data)...) + if resp.Diagnostics.HasError() { + return + } + input := odb.GetCloudAutonomousVmClusterInput{ + CloudAutonomousVmClusterId: data.CloudAutonomousVmClusterId.ValueStringPointer(), + } + + out, err := conn.GetCloudAutonomousVmCluster(ctx, &input) + if err != nil { + resp.Diagnostics.AddError( + create.ProblemStandardMessage(names.ODB, create.ErrActionReading, DSNameCloudAutonomousVmCluster, data.CloudAutonomousVmClusterId.ValueString(), err), + err.Error(), + ) + return + } + data.CreatedAt = types.StringValue(out.CloudAutonomousVmCluster.CreatedAt.Format(time.RFC3339)) + if out.CloudAutonomousVmCluster.TimeOrdsCertificateExpires != nil { + data.TimeOrdsCertificateExpires = types.StringValue(out.CloudAutonomousVmCluster.TimeOrdsCertificateExpires.Format(time.RFC3339)) + } else { + data.TimeOrdsCertificateExpires = types.StringValue(NotAvailableValues) + } + if out.CloudAutonomousVmCluster.TimeDatabaseSslCertificateExpires != nil { + data.TimeDatabaseSslCertificateExpires = types.StringValue(out.CloudAutonomousVmCluster.TimeDatabaseSslCertificateExpires.Format(time.RFC3339)) + } else { + data.TimeDatabaseSslCertificateExpires = types.StringValue(NotAvailableValues) + } + tagsRead, err := listTags(ctx, conn, *out.CloudAutonomousVmCluster.CloudAutonomousVmClusterArn) + if err != nil { + resp.Diagnostics.AddError( + create.ProblemStandardMessage(names.ODB, create.ErrActionReading, DSNameCloudAutonomousVmCluster, data.CloudAutonomousVmClusterId.ValueString(), err), + err.Error(), + ) + return + } + if tagsRead != nil { + data.Tags = tftags.FlattenStringValueMap(ctx, tagsRead.Map()) + } + if out.CloudAutonomousVmCluster.MaintenanceWindow != nil { + data.MaintenanceWindow = mapToCloudAutonomousVmClusterMaintenanceWindowDataSourceModel(ctx, out.CloudAutonomousVmCluster.MaintenanceWindow) + } + + resp.Diagnostics.Append(flex.Flatten(ctx, out.CloudAutonomousVmCluster, &data, flex.WithIgnoredFieldNamesAppend("CreatedAt"), + flex.WithIgnoredFieldNamesAppend("TimeOrdsCertificateExpires"), flex.WithIgnoredFieldNamesAppend("Tags"), + flex.WithIgnoredFieldNamesAppend("TimeDatabaseSslCertificateExpires"), flex.WithIgnoredFieldNamesAppend("MaintenanceWindow"))...) + if resp.Diagnostics.HasError() { + return + } + + resp.Diagnostics.Append(resp.State.Set(ctx, &data)...) +} + +func mapToCloudAutonomousVmClusterMaintenanceWindowDataSourceModel(ctx context.Context, avmcOdbTypeMW *odbtypes.MaintenanceWindow) fwtypes.ObjectValueOf[cloudAutonomousVmClusterMaintenanceWindowDataSourceModel] { + //days of week + daysOfWeek := make([]attr.Value, 0, len(avmcOdbTypeMW.DaysOfWeek)) + for _, dayOfWeek := range avmcOdbTypeMW.DaysOfWeek { + dayOfWeekStringValue := fwtypes.StringEnumValue(dayOfWeek.Name).StringValue + daysOfWeek = append(daysOfWeek, dayOfWeekStringValue) + } + setValueOfDaysOfWeek, _ := basetypes.NewSetValue(types.StringType, daysOfWeek) + daysOfWeekRead := fwtypes.SetValueOf[fwtypes.StringEnum[odbtypes.DayOfWeekName]]{ + SetValue: setValueOfDaysOfWeek, + } + //hours of the day + hoursOfTheDay := make([]attr.Value, 0, len(avmcOdbTypeMW.HoursOfDay)) + for _, hourOfTheDay := range avmcOdbTypeMW.HoursOfDay { + daysOfWeekInt32Value := types.Int32Value(hourOfTheDay) + hoursOfTheDay = append(hoursOfTheDay, daysOfWeekInt32Value) + } + setValuesOfHoursOfTheDay, _ := basetypes.NewSetValue(types.Int32Type, hoursOfTheDay) + hoursOfTheDayRead := fwtypes.SetValueOf[types.Int32]{ + SetValue: setValuesOfHoursOfTheDay, + } + //monts + months := make([]attr.Value, 0, len(avmcOdbTypeMW.Months)) + for _, month := range avmcOdbTypeMW.Months { + monthStringValue := fwtypes.StringEnumValue(month.Name).StringValue + months = append(months, monthStringValue) + } + setValuesOfMonth, _ := basetypes.NewSetValue(types.StringType, months) + monthsRead := fwtypes.SetValueOf[fwtypes.StringEnum[odbtypes.MonthName]]{ + SetValue: setValuesOfMonth, + } + //weeks of month + weeksOfMonth := make([]attr.Value, 0, len(avmcOdbTypeMW.WeeksOfMonth)) + for _, weekOfMonth := range avmcOdbTypeMW.WeeksOfMonth { + weeksOfMonthInt32Value := types.Int32Value(weekOfMonth) + weeksOfMonth = append(weeksOfMonth, weeksOfMonthInt32Value) + } + setValuesOfWeekOfMonth, _ := basetypes.NewSetValue(types.Int32Type, weeksOfMonth) + weeksOfMonthRead := fwtypes.SetValueOf[types.Int32]{ + SetValue: setValuesOfWeekOfMonth, + } + + computedMW := cloudAutonomousVmClusterMaintenanceWindowDataSourceModel{ + DaysOfWeek: daysOfWeekRead, + HoursOfDay: hoursOfTheDayRead, + LeadTimeInWeeks: types.Int32PointerValue(avmcOdbTypeMW.LeadTimeInWeeks), + Months: monthsRead, + Preference: fwtypes.StringEnumValue(avmcOdbTypeMW.Preference), + WeeksOfMonth: weeksOfMonthRead, + } + result, _ := fwtypes.NewObjectValueOf[cloudAutonomousVmClusterMaintenanceWindowDataSourceModel](ctx, &computedMW) + return result +} + +type cloudAutonomousVmClusterDataSourceModel struct { + framework.WithRegionModel + CloudAutonomousVmClusterArn types.String `tfsdk:"arn"` + CloudAutonomousVmClusterId types.String `tfsdk:"id"` + CloudExadataInfrastructureId types.String `tfsdk:"cloud_exadata_infrastructure_id"` + AutonomousDataStoragePercentage types.Float32 `tfsdk:"autonomous_data_storage_percentage"` + AutonomousDataStorageSizeInTBs types.Float64 `tfsdk:"autonomous_data_storage_size_in_tbs"` + AvailableAutonomousDataStorageSizeInTBs types.Float64 `tfsdk:"available_autonomous_data_storage_size_in_tbs"` + AvailableContainerDatabases types.Int32 `tfsdk:"available_container_databases"` + AvailableCpus types.Float32 `tfsdk:"available_cpus"` + ComputeModel fwtypes.StringEnum[odbtypes.ComputeModel] `tfsdk:"compute_model"` + CpuCoreCount types.Int32 `tfsdk:"cpu_core_count"` + CpuCoreCountPerNode types.Int32 `tfsdk:"cpu_core_count_per_node"` + CpuPercentage types.Float32 `tfsdk:"cpu_percentage"` + CreatedAt types.String `tfsdk:"created_at"` + DataStorageSizeInGBs types.Float64 `tfsdk:"data_storage_size_in_gbs"` + DataStorageSizeInTBs types.Float64 `tfsdk:"data_storage_size_in_tbs"` + DbNodeStorageSizeInGBs types.Int32 `tfsdk:"odb_node_storage_size_in_gbs"` + DbServers fwtypes.SetValueOf[types.String] `tfsdk:"db_servers"` + Description types.String `tfsdk:"description"` + DisplayName types.String `tfsdk:"display_name"` + Domain types.String `tfsdk:"domain"` + ExadataStorageInTBsLowestScaledValue types.Float64 `tfsdk:"exadata_storage_in_tbs_lowest_scaled_value"` + Hostname types.String `tfsdk:"hostname"` + IsMtlsEnabledVmCluster types.Bool `tfsdk:"is_mtls_enabled_vm_cluster"` + LicenseModel fwtypes.StringEnum[odbtypes.LicenseModel] `tfsdk:"license_model"` + MaxAcdsLowestScaledValue types.Int32 `tfsdk:"max_acds_lowest_scaled_value"` + MemoryPerOracleComputeUnitInGBs types.Int32 `tfsdk:"memory_per_oracle_compute_unit_in_gbs"` + MemorySizeInGBs types.Int32 `tfsdk:"memory_size_in_gbs"` + NodeCount types.Int32 `tfsdk:"node_count"` + NonProvisionableAutonomousContainerDatabases types.Int32 `tfsdk:"non_provisionable_autonomous_container_databases"` + OciResourceAnchorName types.String `tfsdk:"oci_resource_anchor_name"` + OciUrl types.String `tfsdk:"oci_url"` + Ocid types.String `tfsdk:"ocid"` + OdbNetworkId types.String `tfsdk:"odb_network_id"` + PercentProgress types.Float32 `tfsdk:"percent_progress"` + ProvisionableAutonomousContainerDatabases types.Int32 `tfsdk:"provisionable_autonomous_container_databases"` + ProvisionedAutonomousContainerDatabases types.Int32 `tfsdk:"provisioned_autonomous_container_databases"` + ProvisionedCpus types.Float32 `tfsdk:"provisioned_cpus"` + ReclaimableCpus types.Float32 `tfsdk:"reclaimable_cpus"` + ReservedCpus types.Float32 `tfsdk:"reserved_cpus"` + ScanListenerPortNonTls types.Int32 `tfsdk:"scan_listener_port_non_tls"` + ScanListenerPortTls types.Int32 `tfsdk:"scan_listener_port_tls"` + Shape types.String `tfsdk:"shape"` + Status fwtypes.StringEnum[odbtypes.ResourceStatus] `tfsdk:"status"` + StatusReason types.String `tfsdk:"reason"` + TimeDatabaseSslCertificateExpires types.String `tfsdk:"time_database_ssl_certificate_expires"` + TimeOrdsCertificateExpires types.String `tfsdk:"time_ords_certificate_expires"` + TimeZone types.String `tfsdk:"time_zone"` + TotalAutonomousDataStorageInTBs types.Float32 `tfsdk:"total_autonomous_data_storage_in_tbs"` + TotalContainerDatabases types.Int32 `tfsdk:"total_container_databases"` + TotalCpus types.Float32 `tfsdk:"total_cpus"` + MaintenanceWindow fwtypes.ObjectValueOf[cloudAutonomousVmClusterMaintenanceWindowDataSourceModel] `tfsdk:"maintenance_window"` + Tags tftags.Map `tfsdk:"tags"` +} +type cloudAutonomousVmClusterMaintenanceWindowDataSourceModel struct { + DaysOfWeek fwtypes.SetValueOf[fwtypes.StringEnum[odbtypes.DayOfWeekName]] `tfsdk:"days_of_week"` + HoursOfDay fwtypes.SetValueOf[types.Int32] `tfsdk:"hours_of_day"` + LeadTimeInWeeks types.Int32 `tfsdk:"lead_time_in_weeks"` + Months fwtypes.SetValueOf[fwtypes.StringEnum[odbtypes.MonthName]] `tfsdk:"months"` + Preference fwtypes.StringEnum[odbtypes.PreferenceType] `tfsdk:"preference"` + WeeksOfMonth fwtypes.SetValueOf[types.Int32] `tfsdk:"weeks_of_month"` +} diff --git a/internal/service/odb/cloud_autonomous_vm_cluster_data_source_test.go b/internal/service/odb/cloud_autonomous_vm_cluster_data_source_test.go new file mode 100644 index 000000000000..362265dc2825 --- /dev/null +++ b/internal/service/odb/cloud_autonomous_vm_cluster_data_source_test.go @@ -0,0 +1,60 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +package odb_test + +import ( + "fmt" + "github.com/hashicorp/terraform-plugin-testing/terraform" + "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 TestAccODBCloudAutonomousVmClusterDataSource_basic(t *testing.T) { + ctx := acctest.Context(t) + + if testing.Short() { + t.Skip("skipping long-running test in short mode") + } + + dataSourceName := "basicExaInfraDataSource.aws_odb_cloud_autonomous_vm_cluster.test" + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { + acctest.PreCheck(ctx, t) + //acctest.PreCheckPartitionHasService(t, names.ODBEndpointID) + //testAccPreCheck(ctx, t) + }, + ErrorCheck: acctest.ErrorCheck(t, names.ODBServiceID), + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + //CheckDestroy: testAccCheckCloudAutonomousVmClusterDestroy(ctx), + Steps: []resource.TestStep{ + { + Config: basicHardcodedAVmCluster("avmc_yhqyltpw6m"), + Check: resource.ComposeAggregateTestCheckFunc( + resource.ComposeTestCheckFunc(func(state *terraform.State) error { + fmt.Println(state) + return nil + }), + resource.TestCheckResourceAttr(dataSourceName, "display_name", "Real-AVMC-CONN-001"), + //acctest.MatchResourceAttrRegionalARN(ctx, dataSourceName, names.AttrARN, "odb", regexache.MustCompile(`cloudautonomousvmcluster:.+$`)), + ), + }, + }, + }) +} + +func basicHardcodedAVmCluster(id string) string { + avmcDataSource := fmt.Sprintf(` + +basicExaInfraDataSource "aws_odb_cloud_autonomous_vm_cluster" "test" { + id = %[1]q + +} +`, id) + fmt.Println(avmcDataSource) + return avmcDataSource +} diff --git a/internal/service/odb/cloud_autonomous_vm_cluster_test.go b/internal/service/odb/cloud_autonomous_vm_cluster_test.go new file mode 100644 index 000000000000..9dd1f99efab9 --- /dev/null +++ b/internal/service/odb/cloud_autonomous_vm_cluster_test.go @@ -0,0 +1,366 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +package odb_test + +import ( + "context" + "errors" + "fmt" + "github.com/aws/aws-sdk-go-v2/aws" + "github.com/aws/aws-sdk-go-v2/service/odb" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" + "github.com/hashicorp/terraform-provider-aws/internal/errs" + "github.com/hashicorp/terraform-provider-aws/internal/tfresource" + "strings" + "testing" + + sdkacctest "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" + "github.com/hashicorp/terraform-provider-aws/internal/acctest" + "github.com/hashicorp/terraform-provider-aws/internal/conns" + "github.com/hashicorp/terraform-provider-aws/internal/create" + + "github.com/hashicorp/terraform-provider-aws/names" + + odbtypes "github.com/aws/aws-sdk-go-v2/service/odb/types" + + tfodb "github.com/hashicorp/terraform-provider-aws/internal/service/odb" +) + +type autonomousVMClusterResourceTest struct { + exaInfraDisplayNamePrefix string + odbNetDisplayNamePrefix string + autonomousVmClusterDisplayNamePrefix string +} + +var autonomousVMClusterTest = autonomousVMClusterResourceTest{ + exaInfraDisplayNamePrefix: "Ofake-exa", + odbNetDisplayNamePrefix: "odb-net", + autonomousVmClusterDisplayNamePrefix: "Ofake-avmc", +} + +func TestAccODBCloudAutonomousVmClusterCreationBasic(t *testing.T) { + ctx := acctest.Context(t) + if testing.Short() { + t.Skip("skipping long-running test in short mode") + } + + var cloudAVMC odbtypes.CloudAutonomousVmCluster + avmcDisplayName := sdkacctest.RandomWithPrefix(autonomousVMClusterTest.autonomousVmClusterDisplayNamePrefix) + odbDisplayNamePrefix := sdkacctest.RandomWithPrefix(autonomousVMClusterTest.odbNetDisplayNamePrefix) + exaDisplayName := sdkacctest.RandomWithPrefix(autonomousVMClusterTest.exaInfraDisplayNamePrefix) + resourceName := "aws_odb_cloud_autonomous_vm_cluster.test" + + resource.Test(t, resource.TestCase{ + PreCheck: func() { + acctest.PreCheck(ctx, t) + //acctest.PreCheckPartitionHasService(t, names.ODBServiceID) + //testAccPreCheck(ctx, t) + }, + ErrorCheck: acctest.ErrorCheck(t, names.ODBServiceID), + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + CheckDestroy: testAccCheckCloudAutonomousVmClusterDestroy(ctx), + Steps: []resource.TestStep{ + { + Config: autonomousVMClusterTest.avmcWithMandatoryParamsOnly(autonomousVMClusterTest.exaInfra(exaDisplayName), autonomousVMClusterTest.odbNetwork(odbDisplayNamePrefix), avmcDisplayName), + Check: resource.ComposeAggregateTestCheckFunc( + autonomousVMClusterTest.checkCloudAutonomousVmClusterExists(ctx, resourceName, &cloudAVMC), + ), + }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} + +func TestAccODBCloudAutonomousVmClusterTagging(t *testing.T) { + fmt.Println("Update tags test") + ctx := acctest.Context(t) + if testing.Short() { + t.Skip("skipping long-running test in short mode") + } + + var avmc1, avmc2 odbtypes.CloudAutonomousVmCluster + avmcDisplayName := sdkacctest.RandomWithPrefix(autonomousVMClusterTest.autonomousVmClusterDisplayNamePrefix) + odbDisplayNamePrefix := sdkacctest.RandomWithPrefix(autonomousVMClusterTest.odbNetDisplayNamePrefix) + exaDisplayName := sdkacctest.RandomWithPrefix(autonomousVMClusterTest.exaInfraDisplayNamePrefix) + resourceName := "aws_odb_cloud_autonomous_vm_cluster.test" + + resource.Test(t, resource.TestCase{ + PreCheck: func() { + acctest.PreCheck(ctx, t) + //acctest.PreCheckPartitionHasService(t, names.ODBServiceID) + //testAccPreCheck(ctx, t) + }, + ErrorCheck: acctest.ErrorCheck(t, names.ODBServiceID), + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + CheckDestroy: testAccCheckCloudAutonomousVmClusterDestroy(ctx), + Steps: []resource.TestStep{ + { + Config: autonomousVMClusterTest.avmcWithMandatoryParamsWithTag(autonomousVMClusterTest.exaInfra(exaDisplayName), autonomousVMClusterTest.odbNetwork(odbDisplayNamePrefix), avmcDisplayName), + Check: resource.ComposeAggregateTestCheckFunc( + autonomousVMClusterTest.checkCloudAutonomousVmClusterExists(ctx, resourceName, &avmc1), + resource.TestCheckResourceAttr(resourceName, "tags.%", "1"), + resource.TestCheckResourceAttr(resourceName, "tags.env", "dev"), + ), + }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + { + Config: autonomousVMClusterTest.avmcWithMandatoryParamsOnly(autonomousVMClusterTest.exaInfra(exaDisplayName), autonomousVMClusterTest.odbNetwork(odbDisplayNamePrefix), avmcDisplayName), + Check: resource.ComposeAggregateTestCheckFunc( + autonomousVMClusterTest.checkCloudAutonomousVmClusterExists(ctx, resourceName, &avmc2), + resource.TestCheckResourceAttr(resourceName, "tags.%", "2"), + resource.TestCheckResourceAttr(resourceName, "tags.env", "dev"), + resource.TestCheckResourceAttr(resourceName, "tags.foo", "bar"), + resource.ComposeTestCheckFunc(func(state *terraform.State) error { + if strings.Compare(*(avmc1.CloudAutonomousVmClusterId), *(avmc2.CloudAutonomousVmClusterId)) != 0 { + return errors.New("Shouldn't create a new autonomous vm cluster") + } + return nil + }), + ), + }, + }, + }) +} + +func TestAccODBCloudAutonomousVmCluster_disappears(t *testing.T) { + ctx := acctest.Context(t) + if testing.Short() { + t.Skip("skipping long-running test in short mode") + } + + var cloudautonomousvmcluster odbtypes.CloudAutonomousVmCluster + avmcDisplayName := sdkacctest.RandomWithPrefix(autonomousVMClusterTest.autonomousVmClusterDisplayNamePrefix) + odbDisplayNamePrefix := sdkacctest.RandomWithPrefix(autonomousVMClusterTest.odbNetDisplayNamePrefix) + exaDisplayName := sdkacctest.RandomWithPrefix(autonomousVMClusterTest.exaInfraDisplayNamePrefix) + resourceName := "aws_odb_cloud_autonomous_vm_cluster.test" + + resource.Test(t, resource.TestCase{ + PreCheck: func() { + acctest.PreCheck(ctx, t) + //acctest.PreCheckPartitionHasService(t, names.ODBServiceID) + //testAccPreCheck(ctx, t) + }, + ErrorCheck: acctest.ErrorCheck(t, names.ODBServiceID), + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + CheckDestroy: testAccCheckCloudAutonomousVmClusterDestroy(ctx), + Steps: []resource.TestStep{ + { + Config: autonomousVMClusterTest.avmcWithMandatoryParamsOnly(autonomousVMClusterTest.exaInfra(exaDisplayName), autonomousVMClusterTest.odbNetwork(odbDisplayNamePrefix), avmcDisplayName), + Check: resource.ComposeAggregateTestCheckFunc( + autonomousVMClusterTest.checkCloudAutonomousVmClusterExists(ctx, resourceName, &cloudautonomousvmcluster), + acctest.CheckFrameworkResourceDisappears(ctx, acctest.Provider, tfodb.ResourceCloudAutonomousVMCluster, resourceName), + ), + ExpectNonEmptyPlan: true, + }, + }, + }) +} + +func testAccCheckCloudAutonomousVmClusterDestroy(ctx context.Context) resource.TestCheckFunc { + return func(s *terraform.State) error { + conn := acctest.Provider.Meta().(*conns.AWSClient).ODBClient(ctx) + + for _, rs := range s.RootModule().Resources { + if rs.Type != "aws_odb_cloud_autonomous_vm_cluster" { + continue + } + + _, err := tfodb.FindCloudAutonomousVmClusterByID(ctx, conn, rs.Primary.ID) + if tfresource.NotFound(err) { + return nil + } + if err != nil { + return create.Error(names.ODB, create.ErrActionCheckingDestroyed, tfodb.ResNameCloudAutonomousVmCluster, rs.Primary.ID, err) + } + + return create.Error(names.ODB, create.ErrActionCheckingDestroyed, tfodb.ResNameCloudAutonomousVmCluster, rs.Primary.ID, errors.New("not destroyed")) + } + + return nil + } +} + +func (autonomousVMClusterResourceTest) checkCloudAutonomousVmClusterExists(ctx context.Context, name string, cloudAutonomousVMCluster *odbtypes.CloudAutonomousVmCluster) resource.TestCheckFunc { + return func(s *terraform.State) error { + rs, ok := s.RootModule().Resources[name] + if !ok { + return create.Error(names.ODB, create.ErrActionCheckingExistence, tfodb.ResNameCloudAutonomousVmCluster, name, errors.New("not found")) + } + + if rs.Primary.ID == "" { + return create.Error(names.ODB, create.ErrActionCheckingExistence, tfodb.ResNameCloudAutonomousVmCluster, name, errors.New("not set")) + } + + conn := acctest.Provider.Meta().(*conns.AWSClient).ODBClient(ctx) + fmt.Println("") + resp, err := autonomousVMClusterResourceTest{}.findVMC(ctx, conn, rs.Primary.ID) + if err != nil { + return create.Error(names.ODB, create.ErrActionCheckingExistence, tfodb.ResNameCloudAutonomousVmCluster, rs.Primary.ID, err) + } + + *cloudAutonomousVMCluster = *resp + + return nil + } +} + +func (autonomousVMClusterResourceTest) findVMC(ctx context.Context, conn *odb.Client, id string) (*odbtypes.CloudAutonomousVmCluster, error) { + input := odb.GetCloudAutonomousVmClusterInput{ + CloudAutonomousVmClusterId: aws.String(id), + } + out, err := conn.GetCloudAutonomousVmCluster(ctx, &input) + if err != nil { + if errs.IsA[*odbtypes.ResourceNotFoundException](err) { + return nil, &retry.NotFoundError{ + LastError: err, + LastRequest: &input, + } + } + return nil, err + } + + if out == nil || out.CloudAutonomousVmCluster == nil { + return nil, tfresource.NewEmptyResultError(&input) + } + + return out.CloudAutonomousVmCluster, nil +} + +/*func testAccPreCheck(ctx context.Context, t *testing.T) { + conn := acctest.Provider.Meta().(*conns.AWSClient).ODBClient(ctx) + + input := &odb.ListCloudAutonomousVmClustersInput{} + + _, err := conn.ListCloudAutonomousVmClusters(ctx, input) + + if acctest.PreCheckSkipError(err) { + t.Skipf("skipping acceptance testing: %s", err) + } + if err != nil { + t.Fatalf("unexpected PreCheck error: %s", err) + } +}*/ + +/*func testAccCheckCloudAutonomousVmClusterNotRecreated(before, after *odb.DescribeCloudAutonomousVmClusterResponse) resource.TestCheckFunc { + return func(s *terraform.State) error { + if before, after := aws.ToString(before.CloudAutonomousVmClusterId), aws.ToString(after.CloudAutonomousVmClusterId); before != after { + return create.Error(names.ODB, create.ErrActionCheckingNotRecreated, tfodb.ResNameCloudAutonomousVmCluster, aws.ToString(before.CloudAutonomousVmClusterId), errors.New("recreated")) + } + + return nil + } +}*/ + +// exa_rkmma5b09a +func testAccCloudAutonomousVmClusterConfig_basic_with_db_servers(rName string) string { + res := fmt.Sprintf(` + + +resource "aws_odb_cloud_autonomous_vm_cluster" "test" { + display_name = %[1]q + cloud_exadata_infrastructure_id = "exa_ky7jabi90t" + autonomous_data_storage_size_in_tbs = 5 + is_mtls_enabled_vm_cluster = false + license_model = "LICENSE_INCLUDED" + memory_per_oracle_compute_unit_in_gbs = 2 + odb_network_id = "odbnet_fjey4b8oth" + total_container_databases = 1 + cpu_core_count_per_node = 40 + db_servers = ["dbs_7zuqmh4045","dbs_o1p7nape7g"] + tags = { + "env"= "dev" + } + + + + +} +`, rName) + fmt.Println(res) + return res +} + +func (autonomousVMClusterResourceTest) avmcWithMandatoryParamsOnly(exaInfra, odbNetwork, avmcDisplayName string) string { + res := fmt.Sprintf(` +%s + +%s + +resource "aws_odb_cloud_autonomous_vm_cluster" "test" { + display_name = %[1]q + cloud_exadata_infrastructure_id = "exa_ky7jabi90t" + odb_network_id = "odbnet_fjey4b8oth" + autonomous_data_storage_size_in_tbs = 5 + memory_per_oracle_compute_unit_in_gbs = 2 + total_container_databases = 1 + cpu_core_count_per_node = 4 + +} +`, exaInfra, odbNetwork, avmcDisplayName) + + return res +} + +func (autonomousVMClusterResourceTest) avmcWithMandatoryParamsWithTag(exaInfra, odbNetwork, avmcDisplayName string) string { + res := fmt.Sprintf(` +%s + +%s + +resource "aws_odb_cloud_autonomous_vm_cluster" "test" { + display_name = %[1]q + cloud_exadata_infrastructure_id = "exa_ky7jabi90t" + odb_network_id = "odbnet_fjey4b8oth" + autonomous_data_storage_size_in_tbs = 5 + memory_per_oracle_compute_unit_in_gbs = 2 + total_container_databases = 1 + cpu_core_count_per_node = 4 + tags = { + "env"= "dev" + } + +} +`, exaInfra, odbNetwork, avmcDisplayName) + + return res +} + +func (autonomousVMClusterResourceTest) exaInfra(exaDisplayName string) string { + resource := fmt.Sprintf(` +resource "aws_odb_cloud_exadata_infrastructure" "test" { + display_name = "%[1]s" + shape = "Exadata.X9M" + storage_count = 3 + compute_count = 2 + availability_zone_id = "use1-az6" + customer_contacts_to_send_to_oci = ["abc@example.com"] + +} +`, exaDisplayName) + + return resource +} +func (autonomousVMClusterResourceTest) odbNetwork(odbNetDisplayName string) string { + return fmt.Sprintf(` + resource "aws_odb_network" "test" { + display_name = %[1]q + availability_zone_id = "use1-az6" + client_subnet_cidr = "10.2.0.0/24" + backup_subnet_cidr = "10.2.1.0/24" + s3_access = "DISABLED" + zero_etl_access = "DISABLED" + } +`, odbNetDisplayName) + +} diff --git a/internal/service/odb/cloud_vm_cluster.go b/internal/service/odb/cloud_vm_cluster.go new file mode 100644 index 000000000000..ed99a9a5f519 --- /dev/null +++ b/internal/service/odb/cloud_vm_cluster.go @@ -0,0 +1,671 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +package odb + +import ( + "context" + "errors" + awstypes "github.com/aws/aws-sdk-go-v2/service/computeoptimizer/types" + "github.com/hashicorp/terraform-plugin-framework/resource/schema/setplanmodifier" + "strings" + + "github.com/hashicorp/terraform-plugin-framework/attr" + "github.com/hashicorp/terraform-plugin-framework/resource/schema/float64planmodifier" + "github.com/hashicorp/terraform-plugin-framework/resource/schema/int32planmodifier" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/id" + "github.com/hashicorp/terraform-provider-aws/internal/enum" + tftags "github.com/hashicorp/terraform-provider-aws/internal/tags" + "time" + + "github.com/aws/aws-sdk-go-v2/aws" + "github.com/aws/aws-sdk-go-v2/service/odb" + odbtypes "github.com/aws/aws-sdk-go-v2/service/odb/types" + "github.com/hashicorp/terraform-plugin-framework-timeouts/resource/timeouts" + "github.com/hashicorp/terraform-plugin-framework/path" + "github.com/hashicorp/terraform-plugin-framework/resource" + "github.com/hashicorp/terraform-plugin-framework/resource/schema" + "github.com/hashicorp/terraform-plugin-framework/resource/schema/planmodifier" + "github.com/hashicorp/terraform-plugin-framework/resource/schema/stringplanmodifier" + "github.com/hashicorp/terraform-plugin-framework/types" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" + "github.com/hashicorp/terraform-provider-aws/internal/conns" + "github.com/hashicorp/terraform-provider-aws/internal/create" + "github.com/hashicorp/terraform-provider-aws/internal/errs" + "github.com/hashicorp/terraform-provider-aws/internal/errs/fwdiag" + "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/sweep" + sweepfw "github.com/hashicorp/terraform-provider-aws/internal/sweep/framework" + "github.com/hashicorp/terraform-provider-aws/internal/tfresource" + "github.com/hashicorp/terraform-provider-aws/names" +) + +// Function annotations are used for resource registration to the Provider. DO NOT EDIT. +// @FrameworkResource("aws_odb_cloud_vm_cluster", name="Cloud Vm Cluster") +// @Tags(identifierAttribute="arn") +func newResourceCloudVmCluster(_ context.Context) (resource.ResourceWithConfigure, error) { + r := &resourceCloudVmCluster{} + + r.SetDefaultCreateTimeout(24 * time.Hour) + r.SetDefaultUpdateTimeout(24 * time.Hour) + r.SetDefaultDeleteTimeout(24 * time.Hour) + + return r, nil +} + +const ( + ResNameCloudVmCluster = "Cloud Vm Cluster" +) + +var ResourceCloudVmCluster = newResourceCloudVmCluster + +type resourceCloudVmCluster struct { + framework.ResourceWithModel[cloudVmClusterResourceModel] + framework.WithTimeouts +} + +func (r *resourceCloudVmCluster) Schema(ctx context.Context, req resource.SchemaRequest, resp *resource.SchemaResponse) { + statusType := fwtypes.StringEnumType[odbtypes.ResourceStatus]() + licenseModelType := fwtypes.StringEnumType[odbtypes.LicenseModel]() + diskRedundancyType := fwtypes.StringEnumType[odbtypes.DiskRedundancy]() + computeModelType := fwtypes.StringEnumType[odbtypes.ComputeModel]() + resp.Schema = schema.Schema{ + Attributes: map[string]schema.Attribute{ + names.AttrARN: framework.ARNAttributeComputedOnly(), + "cloud_exadata_infrastructure_id": schema.StringAttribute{ + Required: true, + PlanModifiers: []planmodifier.String{ + stringplanmodifier.RequiresReplace(), + }, + }, + "cluster_name": schema.StringAttribute{ + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.String{ + stringplanmodifier.RequiresReplace(), + stringplanmodifier.UseStateForUnknown(), + }, + }, + "cpu_core_count": schema.Int32Attribute{ + Required: true, + PlanModifiers: []planmodifier.Int32{ + int32planmodifier.RequiresReplace(), + }, + }, + "data_collection_options": schema.ObjectAttribute{ + Computed: true, + Optional: true, + CustomType: fwtypes.NewObjectTypeOf[cloudVMCResourceModelDataCollectionOptions](ctx), + }, + "data_storage_size_in_tbs": schema.Float64Attribute{ + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.Float64{ + float64planmodifier.RequiresReplace(), + float64planmodifier.UseStateForUnknown(), + }, + }, + "db_node_storage_size_in_gbs": schema.Int32Attribute{ + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.Int32{ + int32planmodifier.RequiresReplace(), + int32planmodifier.UseStateForUnknown(), + }, + }, + "db_servers": schema.SetAttribute{ + CustomType: fwtypes.SetOfStringType, + ElementType: types.StringType, + Required: true, + PlanModifiers: []planmodifier.Set{ + setplanmodifier.RequiresReplace(), + }, + }, + "disk_redundancy": schema.StringAttribute{ + CustomType: diskRedundancyType, + Computed: true, + }, + "display_name": schema.StringAttribute{ + Required: true, + PlanModifiers: []planmodifier.String{ + stringplanmodifier.UseStateForUnknown(), + }, + }, + "domain": schema.StringAttribute{ + Computed: true, + }, + "gi_version": schema.StringAttribute{ + Required: true, + PlanModifiers: []planmodifier.String{ + stringplanmodifier.RequiresReplace(), + }, + }, + "hostname_prefix_computed": schema.StringAttribute{ + Computed: true, + PlanModifiers: []planmodifier.String{ + stringplanmodifier.UseStateForUnknown(), + }, + }, + "hostname_prefix": schema.StringAttribute{ + Required: true, + PlanModifiers: []planmodifier.String{ + stringplanmodifier.RequiresReplace(), + }, + }, + names.AttrID: framework.IDAttribute(), + "iorm_config_cache": schema.ListAttribute{ + Computed: true, + CustomType: fwtypes.NewListNestedObjectTypeOf[cloudVMCResourceModelExadataIormConfig](ctx), + ElementType: types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "lifecycle_details": types.StringType, + "lifecycle_state": fwtypes.StringEnumType[odbtypes.IormLifecycleState](), + "objective": fwtypes.StringEnumType[odbtypes.Objective](), + "db_plans": types.ListType{ + ElemType: types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "db_name": types.StringType, + "flash_cache_limit": types.StringType, + "share": types.Int32Type, + }, + }, + }, + }, + }, + }, + "is_local_backup_enabled": schema.BoolAttribute{ + Optional: true, + Computed: true, + }, + "is_sparse_diskgroup_enabled": schema.BoolAttribute{ + Optional: true, + Computed: true, + }, + "last_update_history_entry_id": schema.StringAttribute{ + Computed: true, + }, + "license_model": schema.StringAttribute{ + CustomType: licenseModelType, + Optional: true, + Computed: true, + }, + "listener_port": schema.Int32Attribute{ + Computed: true, + }, + "memory_size_in_gbs": schema.Int32Attribute{ + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.Int32{ + int32planmodifier.RequiresReplace(), + int32planmodifier.UseStateForUnknown(), + }, + }, + "node_count": schema.Int32Attribute{ + Computed: true, + }, + "ocid": schema.StringAttribute{ + Computed: true, + }, + "oci_resource_anchor_name": schema.StringAttribute{ + Computed: true, + }, + "oci_url": schema.StringAttribute{ + Computed: true, + }, + "odb_network_id": schema.StringAttribute{ + Required: true, + PlanModifiers: []planmodifier.String{ + stringplanmodifier.RequiresReplace(), + }, + }, + "percent_progress": schema.Float32Attribute{ + Computed: true, + }, + "scan_dns_name": schema.StringAttribute{ + Computed: true, + }, + "scan_dns_record_id": schema.StringAttribute{ + Computed: true, + }, + "scan_ip_ids": schema.ListAttribute{ + CustomType: fwtypes.ListOfStringType, + ElementType: types.StringType, + Computed: true, + }, + "shape": schema.StringAttribute{ + Computed: true, + }, + "ssh_public_keys": schema.SetAttribute{ + Required: true, + CustomType: fwtypes.SetOfStringType, + ElementType: types.StringType, + PlanModifiers: []planmodifier.Set{ + setplanmodifier.RequiresReplace(), + }, + }, + "status": schema.StringAttribute{ + Computed: true, + CustomType: statusType, + }, + "status_reason": schema.StringAttribute{ + Computed: true, + }, + "storage_size_in_gbs": schema.Int32Attribute{ + Computed: true, + }, + "system_version": schema.StringAttribute{ + Optional: true, + Computed: true, + }, + "timezone": schema.StringAttribute{ + Optional: true, + Computed: true, + }, + "vip_ids": schema.ListAttribute{ + Computed: true, + CustomType: fwtypes.ListOfStringType, + ElementType: types.StringType, + }, + "created_at": schema.StringAttribute{ + Computed: true, + }, + "compute_model": schema.StringAttribute{ + CustomType: computeModelType, + Computed: true, + }, + "scan_listener_port_tcp": schema.Int32Attribute{ + Computed: true, + Optional: true, + PlanModifiers: []planmodifier.Int32{ + int32planmodifier.RequiresReplace(), + int32planmodifier.UseStateForUnknown(), + }, + }, + names.AttrTags: tftags.TagsAttribute(), + names.AttrTagsAll: tftags.TagsAttributeComputedOnly(), + }, + Blocks: map[string]schema.Block{ + "timeouts": timeouts.Block(ctx, timeouts.Opts{ + Create: true, + Update: true, + Delete: true, + }), + }, + } +} + +func (r *resourceCloudVmCluster) Create(ctx context.Context, req resource.CreateRequest, resp *resource.CreateResponse) { + conn := r.Meta().ODBClient(ctx) + + var plan cloudVmClusterResourceModel + resp.Diagnostics.Append(req.Plan.Get(ctx, &plan)...) + if resp.Diagnostics.HasError() { + return + } + + input := odb.CreateCloudVmClusterInput{ + Tags: getTagsIn(ctx), + GiVersion: plan.GiVersion.ValueStringPointer(), + ClientToken: aws.String(id.UniqueId()), + Hostname: plan.HostnamePrefix.ValueStringPointer(), + } + resp.Diagnostics.Append(flex.Expand(ctx, plan, &input)...) + + if resp.Diagnostics.HasError() { + return + } + + out, err := conn.CreateCloudVmCluster(ctx, &input) + if err != nil { + resp.Diagnostics.AddError( + create.ProblemStandardMessage(names.ODB, create.ErrActionCreating, ResNameCloudVmCluster, plan.DisplayName.ValueString(), err), + err.Error(), + ) + return + } + if out == nil || out.CloudVmClusterId == nil { + resp.Diagnostics.AddError( + create.ProblemStandardMessage(names.ODB, create.ErrActionCreating, ResNameCloudVmCluster, plan.DisplayName.ValueString(), nil), + errors.New("empty output").Error(), + ) + return + } + + createTimeout := r.CreateTimeout(ctx, plan.Timeouts) + createdVmCluster, err := waitCloudVmClusterCreated(ctx, conn, *out.CloudVmClusterId, createTimeout) + if err != nil { + resp.Diagnostics.AddError( + create.ProblemStandardMessage(names.ODB, create.ErrActionWaitingForCreation, ResNameCloudVmCluster, plan.DisplayName.ValueString(), err), + err.Error(), + ) + return + } + hostnamePrefix := strings.Split(*input.Hostname, "-")[0] + plan.HostnamePrefix = types.StringValue(hostnamePrefix) + plan.HostnamePrefixComputed = types.StringValue(*createdVmCluster.Hostname) + plan.CreatedAt = types.StringValue(createdVmCluster.CreatedAt.Format(time.RFC3339)) + plan.ScanListenerPortTcp = types.Int32PointerValue(createdVmCluster.ListenerPort) + + resp.Diagnostics.Append(flex.Flatten(ctx, createdVmCluster, &plan, flex.WithIgnoredFieldNamesAppend("HostnamePrefix"), + flex.WithIgnoredFieldNamesAppend("HostnamePrefixComputed"), + flex.WithIgnoredFieldNamesAppend("CreatedAt"), + flex.WithIgnoredFieldNamesAppend("ScanListenerPortTcp"))...) + if resp.Diagnostics.HasError() { + return + } + + resp.Diagnostics.Append(resp.State.Set(ctx, plan)...) +} + +func (r *resourceCloudVmCluster) Read(ctx context.Context, req resource.ReadRequest, resp *resource.ReadResponse) { + + conn := r.Meta().ODBClient(ctx) + var state cloudVmClusterResourceModel + resp.Diagnostics.Append(req.State.Get(ctx, &state)...) + if resp.Diagnostics.HasError() { + return + } + + out, err := FindCloudVmClusterForResourceByID(ctx, conn, state.CloudVmClusterId.ValueString()) + if tfresource.NotFound(err) { + resp.Diagnostics.Append(fwdiag.NewResourceNotFoundWarningDiagnostic(err)) + resp.State.RemoveResource(ctx) + return + } + if err != nil { + resp.Diagnostics.AddError( + create.ProblemStandardMessage(names.ODB, create.ErrActionReading, ResNameCloudVmCluster, state.CloudVmClusterId.ValueString(), err), + err.Error(), + ) + return + } + hostnamePrefix := strings.Split(*out.Hostname, "-")[0] + state.HostnamePrefix = types.StringValue(hostnamePrefix) + state.HostnamePrefixComputed = types.StringValue(*out.Hostname) + state.CreatedAt = types.StringValue(out.CreatedAt.Format(time.RFC3339)) + state.ScanListenerPortTcp = types.Int32PointerValue(out.ListenerPort) + resp.Diagnostics.Append(flex.Flatten(ctx, out, &state, flex.WithIgnoredFieldNamesAppend("HostnamePrefix"), + flex.WithIgnoredFieldNamesAppend("HostnamePrefixComputed"), flex.WithIgnoredFieldNamesAppend("CreatedAt"), + flex.WithIgnoredFieldNamesAppend("ScanListenerPortTcp"))...) + + if resp.Diagnostics.HasError() { + return + } + resp.Diagnostics.Append(resp.State.Set(ctx, &state)...) +} + +func (r *resourceCloudVmCluster) Update(ctx context.Context, req resource.UpdateRequest, resp *resource.UpdateResponse) { + + var plan, state cloudVmClusterResourceModel + resp.Diagnostics.Append(req.Plan.Get(ctx, &plan)...) + resp.Diagnostics.Append(req.State.Get(ctx, &state)...) + if resp.Diagnostics.HasError() { + return + } + + conn := r.Meta().ODBClient(ctx) + updateTimeout := r.UpdateTimeout(ctx, plan.Timeouts) + updatedVMC, err := waitCloudVmClusterUpdated(ctx, conn, plan.CloudVmClusterId.ValueString(), updateTimeout) + if err != nil { + resp.Diagnostics.AddError( + create.ProblemStandardMessage(names.ODB, create.ErrActionWaitingForUpdate, ResNameCloudVmCluster, plan.CloudVmClusterId.String(), err), + err.Error(), + ) + return + } + hostnamePrefix := strings.Split(*updatedVMC.Hostname, "-")[0] + plan.HostnamePrefix = types.StringValue(hostnamePrefix) + plan.HostnamePrefixComputed = types.StringValue(*updatedVMC.Hostname) + plan.CreatedAt = types.StringValue(updatedVMC.CreatedAt.Format(time.RFC3339)) + plan.ScanListenerPortTcp = types.Int32PointerValue(updatedVMC.ListenerPort) + resp.Diagnostics.Append(flex.Flatten(ctx, updatedVMC, &plan, flex.WithIgnoredFieldNamesAppend("HostnamePrefix"), + flex.WithIgnoredFieldNamesAppend("HostnamePrefixComputed"), flex.WithIgnoredFieldNamesAppend("CreatedAt"), + flex.WithIgnoredFieldNamesAppend("ScanListenerPortTcp"))...) + + if resp.Diagnostics.HasError() { + return + } + resp.Diagnostics.Append(resp.State.Set(ctx, &plan)...) +} + +func (r *resourceCloudVmCluster) Delete(ctx context.Context, req resource.DeleteRequest, resp *resource.DeleteResponse) { + + conn := r.Meta().ODBClient(ctx) + + var state cloudVmClusterResourceModel + resp.Diagnostics.Append(req.State.Get(ctx, &state)...) + if resp.Diagnostics.HasError() { + return + } + + input := odb.DeleteCloudVmClusterInput{ + CloudVmClusterId: state.CloudVmClusterId.ValueStringPointer(), + } + + _, err := conn.DeleteCloudVmCluster(ctx, &input) + if err != nil { + if errs.IsA[*awstypes.ResourceNotFoundException](err) { + return + } + + resp.Diagnostics.AddError( + create.ProblemStandardMessage(names.ODB, create.ErrActionDeleting, ResNameCloudVmCluster, state.CloudVmClusterId.ValueString(), err), + err.Error(), + ) + return + } + + // TIP: -- 5. Use a waiter to wait for delete to complete + deleteTimeout := r.DeleteTimeout(ctx, state.Timeouts) + _, err = waitCloudVmClusterDeleted(ctx, conn, state.CloudVmClusterId.ValueString(), deleteTimeout) + if err != nil { + resp.Diagnostics.AddError( + create.ProblemStandardMessage(names.ODB, create.ErrActionWaitingForDeletion, ResNameCloudVmCluster, state.CloudVmClusterId.ValueString(), err), + err.Error(), + ) + return + } +} + +func (r *resourceCloudVmCluster) ImportState(ctx context.Context, req resource.ImportStateRequest, resp *resource.ImportStateResponse) { + resource.ImportStatePassthroughID(ctx, path.Root(names.AttrID), req, resp) +} + +func waitCloudVmClusterCreated(ctx context.Context, conn *odb.Client, id string, timeout time.Duration) (*odbtypes.CloudVmCluster, error) { + stateConf := &retry.StateChangeConf{ + Pending: enum.Slice(odbtypes.ResourceStatusProvisioning), + Target: enum.Slice(odbtypes.ResourceStatusAvailable, odbtypes.ResourceStatusFailed), + Refresh: statusCloudVmCluster(ctx, conn, id), + Timeout: timeout, + NotFoundChecks: 20, + ContinuousTargetOccurence: 2, + } + + outputRaw, err := stateConf.WaitForStateContext(ctx) + if out, ok := outputRaw.(*odbtypes.CloudVmCluster); ok { + return out, err + } + + return nil, err +} + +func waitCloudVmClusterUpdated(ctx context.Context, conn *odb.Client, id string, timeout time.Duration) (*odbtypes.CloudVmCluster, error) { + stateConf := &retry.StateChangeConf{ + Pending: enum.Slice(odbtypes.ResourceStatusUpdating), + Target: enum.Slice(odbtypes.ResourceStatusAvailable, odbtypes.ResourceStatusFailed), + Refresh: statusCloudVmCluster(ctx, conn, id), + Timeout: timeout, + NotFoundChecks: 20, + ContinuousTargetOccurence: 2, + } + + outputRaw, err := stateConf.WaitForStateContext(ctx) + if out, ok := outputRaw.(*odbtypes.CloudVmCluster); ok { + return out, err + } + + return nil, err +} + +func waitCloudVmClusterDeleted(ctx context.Context, conn *odb.Client, id string, timeout time.Duration) (*odbtypes.CloudVmCluster, error) { + stateConf := &retry.StateChangeConf{ + Pending: enum.Slice(odbtypes.ResourceStatusTerminating), + Target: []string{}, + Refresh: statusCloudVmCluster(ctx, conn, id), + Timeout: timeout, + } + + outputRaw, err := stateConf.WaitForStateContext(ctx) + if out, ok := outputRaw.(*odbtypes.CloudVmCluster); ok { + return out, err + } + + return nil, err +} + +func statusCloudVmCluster(ctx context.Context, conn *odb.Client, id string) retry.StateRefreshFunc { + return func() (any, string, error) { + out, err := FindCloudVmClusterForResourceByID(ctx, conn, id) + if tfresource.NotFound(err) { + return nil, "", nil + } + + if err != nil { + return nil, "", err + } + + return out, string(out.Status), nil + } +} + +func FindCloudVmClusterForResourceByID(ctx context.Context, conn *odb.Client, id string) (*odbtypes.CloudVmCluster, error) { + input := odb.GetCloudVmClusterInput{ + CloudVmClusterId: aws.String(id), + } + + out, err := conn.GetCloudVmCluster(ctx, &input) + if err != nil { + if errs.IsA[*odbtypes.ResourceNotFoundException](err) { + return nil, &retry.NotFoundError{ + LastError: err, + LastRequest: &input, + } + } + + return nil, err + } + + if out == nil || out.CloudVmCluster == nil { + return nil, tfresource.NewEmptyResultError(&input) + } + return out.CloudVmCluster, nil +} + +// TIP: ==== SWEEPERS ==== +// When acceptance testing resources, interrupted or failed tests may +// leave behind orphaned resources in an account. To facilitate cleaning +// up lingering resources, each resource implementation should include +// a corresponding "sweeper" function. +// +// The sweeper function lists all resources of a given type and sets the +// appropriate identifers required to delete the resource via the Delete +// method implemented above. +// +// Once the sweeper function is implemented, register it in sweeper.go +// as follows: +// +// awsv2.Register("aws_odb_cloud_vm_cluster", sweepCloudVmClusters) +// +// See more: +// https://hashicorp.github.io/terraform-provider-aws/running-and-writing-acceptance-tests/#acceptance-test-sweepers +func sweepCloudVmClusters(ctx context.Context, client *conns.AWSClient) ([]sweep.Sweepable, error) { + input := odb.ListCloudVmClustersInput{} + conn := client.ODBClient(ctx) + var sweepResources []sweep.Sweepable + + pages := odb.NewListCloudVmClustersPaginator(conn, &input) + for pages.HasMorePages() { + page, err := pages.NextPage(ctx) + if err != nil { + return nil, err + } + + for _, v := range page.CloudVmClusters { + sweepResources = append(sweepResources, sweepfw.NewSweepResource(newResourceCloudVmCluster, client, + sweepfw.NewAttribute(names.AttrID, aws.ToString(v.CloudVmClusterId))), + ) + } + } + + return sweepResources, nil +} + +type cloudVmClusterResourceModel struct { + framework.WithRegionModel + CloudVmClusterArn types.String `tfsdk:"arn"` + CloudExadataInfrastructureId types.String `tfsdk:"cloud_exadata_infrastructure_id"` + CloudVmClusterId types.String `tfsdk:"id"` + ClusterName types.String `tfsdk:"cluster_name"` + CpuCoreCount types.Int32 `tfsdk:"cpu_core_count"` + DataCollectionOptions fwtypes.ObjectValueOf[cloudVMCResourceModelDataCollectionOptions] `tfsdk:"data_collection_options"` + DataStorageSizeInTBs types.Float64 `tfsdk:"data_storage_size_in_tbs"` + DbNodeStorageSizeInGBs types.Int32 `tfsdk:"db_node_storage_size_in_gbs"` + DbServers fwtypes.SetValueOf[types.String] `tfsdk:"db_servers"` + DiskRedundancy fwtypes.StringEnum[odbtypes.DiskRedundancy] `tfsdk:"disk_redundancy"` + DisplayName types.String `tfsdk:"display_name"` + Domain types.String `tfsdk:"domain"` + GiVersion types.String `tfsdk:"gi_version"` + HostnamePrefixComputed types.String `tfsdk:"hostname_prefix_computed"` + HostnamePrefix types.String `tfsdk:"hostname_prefix"` + IormConfigCache fwtypes.ListNestedObjectValueOf[cloudVMCResourceModelExadataIormConfig] `tfsdk:"iorm_config_cache"` + IsLocalBackupEnabled types.Bool `tfsdk:"is_local_backup_enabled"` + IsSparseDiskGroupEnabled types.Bool `tfsdk:"is_sparse_diskgroup_enabled"` + LastUpdateHistoryEntryId types.String `tfsdk:"last_update_history_entry_id"` + LicenseModel fwtypes.StringEnum[odbtypes.LicenseModel] `tfsdk:"license_model"` + ListenerPort types.Int32 `tfsdk:"listener_port"` + MemorySizeInGbs types.Int32 `tfsdk:"memory_size_in_gbs"` + NodeCount types.Int32 `tfsdk:"node_count"` + Ocid types.String `tfsdk:"ocid"` + OciResourceAnchorName types.String `tfsdk:"oci_resource_anchor_name"` + OciUrl types.String `tfsdk:"oci_url"` + OdbNetworkId types.String `tfsdk:"odb_network_id"` + PercentProgress types.Float32 `tfsdk:"percent_progress"` + ScanDnsName types.String `tfsdk:"scan_dns_name"` + ScanDnsRecordId types.String `tfsdk:"scan_dns_record_id"` + ScanIpIds fwtypes.ListValueOf[types.String] `tfsdk:"scan_ip_ids"` + Shape types.String `tfsdk:"shape"` + SshPublicKeys fwtypes.SetValueOf[types.String] `tfsdk:"ssh_public_keys"` + Status fwtypes.StringEnum[odbtypes.ResourceStatus] `tfsdk:"status"` + StatusReason types.String `tfsdk:"status_reason"` + StorageSizeInGBs types.Int32 `tfsdk:"storage_size_in_gbs"` + SystemVersion types.String `tfsdk:"system_version"` + Timeouts timeouts.Value `tfsdk:"timeouts"` + Timezone types.String `tfsdk:"timezone"` + VipIds fwtypes.ListValueOf[types.String] `tfsdk:"vip_ids"` + CreatedAt types.String `tfsdk:"created_at"` + ComputeModel fwtypes.StringEnum[odbtypes.ComputeModel] `tfsdk:"compute_model"` + ScanListenerPortTcp types.Int32 `tfsdk:"scan_listener_port_tcp"` + Tags tftags.Map `tfsdk:"tags"` + TagsAll tftags.Map `tfsdk:"tags_all"` +} + +type cloudVMCResourceModelDataCollectionOptions struct { + IsDiagnosticsEventsEnabled types.Bool `tfsdk:"is_diagnostics_events_enabled"` + IsHealthMonitoringEnabled types.Bool `tfsdk:"is_health_monitoring_enabled"` + IsIncidentLogsEnabled types.Bool `tfsdk:"is_incident_logs_enabled"` +} + +type cloudVMCResourceModelExadataIormConfig struct { + DbPlans fwtypes.ListNestedObjectValueOf[cloudVMCResourceModelDbIormConfig] `tfsdk:"db_plans"` + LifecycleDetails types.String `tfsdk:"lifecycle_details"` + LifecycleState fwtypes.StringEnum[odbtypes.IormLifecycleState] `tfsdk:"lifecycle_state"` + Objective fwtypes.StringEnum[odbtypes.Objective] `tfsdk:"objective"` +} + +type cloudVMCResourceModelDbIormConfig struct { + DbName types.String `tfsdk:"db_name"` + FlashCacheLimit types.String `tfsdk:"flash_cache_limit"` + Share types.Int32 `tfsdk:"share"` +} diff --git a/internal/service/odb/cloud_vm_cluster_data_source.go b/internal/service/odb/cloud_vm_cluster_data_source.go new file mode 100644 index 000000000000..0b340b7f2ab8 --- /dev/null +++ b/internal/service/odb/cloud_vm_cluster_data_source.go @@ -0,0 +1,322 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +package odb + +import ( + "context" + "time" + + "github.com/aws/aws-sdk-go-v2/service/odb" + + odbtypes "github.com/aws/aws-sdk-go-v2/service/odb/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/create" + "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/names" +) + +// @FrameworkDataSource("aws_odb_cloud_vm_cluster", name="Cloud Vm Cluster") +func newDataSourceCloudVmCluster(context.Context) (datasource.DataSourceWithConfigure, error) { + return &dataSourceCloudVmCluster{}, nil +} + +const ( + DSNameCloudVmCluster = "Cloud Vm Cluster Data Source" +) + +type dataSourceCloudVmCluster struct { + framework.DataSourceWithModel[dataSourceCloudVmClusterModel] +} + +func (d *dataSourceCloudVmCluster) Schema(ctx context.Context, req datasource.SchemaRequest, resp *datasource.SchemaResponse) { + statusType := fwtypes.StringEnumType[odbtypes.ResourceStatus]() + diskRedundancyType := fwtypes.StringEnumType[odbtypes.DiskRedundancy]() + licenseModelType := fwtypes.StringEnumType[odbtypes.LicenseModel]() + computeModelType := fwtypes.StringEnumType[odbtypes.ComputeModel]() + resp.Schema = schema.Schema{ + Attributes: map[string]schema.Attribute{ + names.AttrARN: framework.ARNAttributeComputedOnly(), + names.AttrID: schema.StringAttribute{ + Required: true, + }, + "cloud_exadata_infrastructure_id": schema.StringAttribute{ + Computed: true, + }, + "cluster_name": schema.StringAttribute{ + Computed: true, + }, + "cpu_core_count": schema.Int32Attribute{ + Computed: true, + }, + "data_storage_size_in_tbs": schema.Float64Attribute{ + Computed: true, + }, + "db_node_storage_size_in_gbs": schema.Int32Attribute{ + Computed: true, + }, + "db_servers": schema.ListAttribute{ + Computed: true, + CustomType: fwtypes.ListOfStringType, + ElementType: types.StringType, + }, + "disk_redundancy": schema.StringAttribute{ + CustomType: diskRedundancyType, + Computed: true, + }, + "display_name": schema.StringAttribute{ + Computed: true, + }, + "domain": schema.StringAttribute{ + Computed: true, + }, + "gi_version": schema.StringAttribute{ + Computed: true, + }, + "hostname_prefix_computed": schema.StringAttribute{ + Computed: true, + }, + "is_local_backup_enabled": schema.BoolAttribute{ + Computed: true, + }, + "is_sparse_disk_group_enabled": schema.BoolAttribute{ + Computed: true, + }, + "last_update_history_entry_id": schema.StringAttribute{ + Computed: true, + }, + "license_model": schema.StringAttribute{ + CustomType: licenseModelType, + Computed: true, + }, + "listener_port": schema.Int32Attribute{ + Computed: true, + }, + "memory_size_in_gbs": schema.Int32Attribute{ + Computed: true, + }, + "node_count": schema.Int32Attribute{ + Computed: true, + }, + "ocid": schema.StringAttribute{ + Computed: true, + }, + "oci_resource_anchor_name": schema.StringAttribute{ + Computed: true, + }, + "oci_url": schema.StringAttribute{ + Computed: true, + }, + "odb_network_id": schema.StringAttribute{ + Computed: true, + }, + "percent_progress": schema.Float64Attribute{ + Computed: true, + }, + "scan_dns_name": schema.StringAttribute{ + Computed: true, + }, + "scan_dns_record_id": schema.StringAttribute{ + Computed: true, + }, + "scan_ip_ids": schema.ListAttribute{ + Computed: true, + CustomType: fwtypes.ListOfStringType, + ElementType: types.StringType, + }, + "shape": schema.StringAttribute{ + Computed: true, + }, + "ssh_public_keys": schema.ListAttribute{ + Computed: true, + CustomType: fwtypes.ListOfStringType, + ElementType: types.StringType, + }, + "status": schema.StringAttribute{ + CustomType: statusType, + Computed: true, + }, + "status_reason": schema.StringAttribute{ + Computed: true, + }, + "storage_size_in_gbs": schema.Int32Attribute{ + Computed: true, + }, + "system_version": schema.StringAttribute{ + Computed: true, + }, + "timezone": schema.StringAttribute{ + Computed: true, + }, + "vip_ids": schema.ListAttribute{ + Computed: true, + CustomType: fwtypes.ListOfStringType, + ElementType: types.StringType, + }, + "created_at": schema.StringAttribute{ + Computed: true, + }, + "compute_model": schema.StringAttribute{ + CustomType: computeModelType, + Computed: true, + }, + }, + Blocks: map[string]schema.Block{ + "data_collection_options": schema.ListNestedBlock{ + CustomType: fwtypes.NewListNestedObjectTypeOf[dataCollectionOptions](ctx), + NestedObject: schema.NestedBlockObject{ + Attributes: map[string]schema.Attribute{ + "is_diagnostics_events_enabled": schema.BoolAttribute{ + Computed: true, + }, + "is_health_monitoring_enabled": schema.BoolAttribute{ + Computed: true, + }, + "is_incident_logs_enabled": schema.BoolAttribute{ + Computed: true, + }, + }, + }, + }, + "iorm_config_cache": schema.ListNestedBlock{ + CustomType: fwtypes.NewListNestedObjectTypeOf[exadataIormConfig](ctx), + NestedObject: schema.NestedBlockObject{ + Attributes: map[string]schema.Attribute{ + "lifecycle_details": schema.StringAttribute{ + Computed: true, + }, + "lifecycle_state": schema.StringAttribute{ + CustomType: fwtypes.StringEnumType[odbtypes.IormLifecycleState](), + Computed: true, + }, + "objective": schema.StringAttribute{ + CustomType: fwtypes.StringEnumType[odbtypes.Objective](), + Computed: true, + }, + }, + Blocks: map[string]schema.Block{ + "db_plans": schema.ListNestedBlock{ + CustomType: fwtypes.NewListNestedObjectTypeOf[dbIormConfig](ctx), + NestedObject: schema.NestedBlockObject{ + Attributes: map[string]schema.Attribute{ + "db_name": schema.StringAttribute{ + Computed: true, + }, + "flash_cache_limit": schema.StringAttribute{ + Computed: true, + }, + "share": schema.Int32Attribute{ + Computed: true, + }, + }, + }, + }, + }, + }, + }, + }, + } +} + +// Data sources only have a read method. +func (d *dataSourceCloudVmCluster) Read(ctx context.Context, req datasource.ReadRequest, resp *datasource.ReadResponse) { + + conn := d.Meta().ODBClient(ctx) + + var data dataSourceCloudVmClusterModel + resp.Diagnostics.Append(req.Config.Get(ctx, &data)...) + if resp.Diagnostics.HasError() { + return + } + + input := odb.GetCloudVmClusterInput{ + CloudVmClusterId: data.CloudVmClusterId.ValueStringPointer(), + } + + out, err := conn.GetCloudVmCluster(ctx, &input) + if err != nil { + resp.Diagnostics.AddError( + create.ProblemStandardMessage(names.ODB, create.ErrActionReading, DSNameCloudVmCluster, data.CloudVmClusterId.ValueString(), err), + err.Error(), + ) + return + } + + data.HostnamePrefixComputed = types.StringValue(*out.CloudVmCluster.Hostname) + data.CreatedAt = types.StringValue(time.Time{}.Format(time.RFC3339)) + + resp.Diagnostics.Append(flex.Flatten(ctx, out.CloudVmCluster, &data, flex.WithIgnoredFieldNamesAppend("HostnamePrefixComputed"), + flex.WithIgnoredFieldNamesAppend("CreatedAt"))...) + if resp.Diagnostics.HasError() { + return + } + + resp.Diagnostics.Append(resp.State.Set(ctx, &data)...) +} + +type dataSourceCloudVmClusterModel struct { + framework.WithRegionModel + CloudExadataInfrastructureId types.String `tfsdk:"cloud_exadata_infrastructure_id"` + CloudVmClusterArn types.String `tfsdk:"arn"` + CloudVmClusterId types.String `tfsdk:"id"` + ClusterName types.String `tfsdk:"cluster_name"` + CpuCoreCount types.Int32 `tfsdk:"cpu_core_count"` + DataCollectionOptions fwtypes.ListNestedObjectValueOf[dataCollectionOptions] `tfsdk:"data_collection_options"` + DataStorageSizeInTBs types.Float64 `tfsdk:"data_storage_size_in_tbs"` + DbNodeStorageSizeInGBs types.Int32 `tfsdk:"db_node_storage_size_in_gbs"` + DbServers fwtypes.ListValueOf[types.String] `tfsdk:"db_servers"` + DiskRedundancy fwtypes.StringEnum[odbtypes.DiskRedundancy] `tfsdk:"disk_redundancy"` + DisplayName types.String `tfsdk:"display_name"` + Domain types.String `tfsdk:"domain"` + GiVersion types.String `tfsdk:"gi_version"` + HostnamePrefixComputed types.String `tfsdk:"hostname_prefix_computed"` + IormConfigCache fwtypes.ListNestedObjectValueOf[exadataIormConfig] `tfsdk:"iorm_config_cache"` + IsLocalBackupEnabled types.Bool `tfsdk:"is_local_backup_enabled"` + IsSparseDiskGroupEnabled types.Bool `tfsdk:"is_sparse_disk_group_enabled"` + LastUpdateHistoryEntryId types.String `tfsdk:"last_update_history_entry_id"` + LicenseModel fwtypes.StringEnum[odbtypes.LicenseModel] `tfsdk:"license_model"` + ListenerPort types.Int32 `tfsdk:"listener_port"` + MemorySizeInGbs types.Int32 `tfsdk:"memory_size_in_gbs"` + NodeCount types.Int32 `tfsdk:"node_count"` + Ocid types.String `tfsdk:"ocid"` + OciResourceAnchorName types.String `tfsdk:"oci_resource_anchor_name"` + OciUrl types.String `tfsdk:"oci_url"` + OdbNetworkId types.String `tfsdk:"odb_network_id"` + PercentProgress types.Float64 `tfsdk:"percent_progress"` + ScanDnsName types.String `tfsdk:"scan_dns_name"` + ScanDnsRecordId types.String `tfsdk:"scan_dns_record_id"` + ScanIpIds fwtypes.ListValueOf[types.String] `tfsdk:"scan_ip_ids"` + Shape types.String `tfsdk:"shape"` + SshPublicKeys fwtypes.ListValueOf[types.String] `tfsdk:"ssh_public_keys"` + Status fwtypes.StringEnum[odbtypes.ResourceStatus] `tfsdk:"status"` + StatusReason types.String `tfsdk:"status_reason"` + StorageSizeInGBs types.Int32 `tfsdk:"storage_size_in_gbs"` + SystemVersion types.String `tfsdk:"system_version"` + Timezone types.String `tfsdk:"timezone"` + VipIds fwtypes.ListValueOf[types.String] `tfsdk:"vip_ids"` + CreatedAt types.String `tfsdk:"created_at"` + ComputeModel fwtypes.StringEnum[odbtypes.ComputeModel] `tfsdk:"compute_model"` +} + +type dataCollectionOptions struct { + IsDiagnosticsEventsEnabled types.Bool `tfsdk:"is_diagnostics_events_enabled"` + IsHealthMonitoringEnabled types.Bool `tfsdk:"is_health_monitoring_enabled"` + IsIncidentLogsEnabled types.Bool `tfsdk:"is_incident_logs_enabled"` +} + +type exadataIormConfig struct { + DbPlans fwtypes.ListNestedObjectValueOf[dbIormConfig] `tfsdk:"db_plans"` + LifecycleDetails types.String `tfsdk:"lifecycle_details"` + LifecycleState fwtypes.StringEnum[odbtypes.IormLifecycleState] `tfsdk:"lifecycle_state"` + Objective fwtypes.StringEnum[odbtypes.Objective] `tfsdk:"objective"` +} + +type dbIormConfig struct { + DbName types.String `tfsdk:"db_name"` + FlashCacheLimit types.String `tfsdk:"flash_cache_limit"` + Share types.Int32 `tfsdk:"share"` +} diff --git a/internal/service/odb/cloud_vm_cluster_data_source_test.go b/internal/service/odb/cloud_vm_cluster_data_source_test.go new file mode 100644 index 000000000000..5623c2b568aa --- /dev/null +++ b/internal/service/odb/cloud_vm_cluster_data_source_test.go @@ -0,0 +1,166 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +package odb_test + +import ( + "context" + "errors" + "fmt" + "github.com/aws/aws-sdk-go-v2/service/odb" + odbtypes "github.com/aws/aws-sdk-go-v2/service/odb/types" + sdkacctest "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/terraform" + "github.com/hashicorp/terraform-provider-aws/internal/acctest" + "github.com/hashicorp/terraform-provider-aws/internal/conns" + "github.com/hashicorp/terraform-provider-aws/internal/create" + tfodb "github.com/hashicorp/terraform-provider-aws/internal/service/odb" + "github.com/hashicorp/terraform-provider-aws/internal/tfresource" + "github.com/hashicorp/terraform-provider-aws/names" + "testing" +) + +import ( + "github.com/hashicorp/terraform-plugin-testing/helper/resource" +) + +type cloudVmClusterDSTest struct { + vmClusterDisplayNamePrefix string + exaInfraDisplayNamePrefix string + odbNetDisplayNamePrefix string +} + +var vmClusterTestDS = cloudVmClusterDSTest{ + vmClusterDisplayNamePrefix: "Ofake-vmc", + exaInfraDisplayNamePrefix: "Ofake-exa-infra", + odbNetDisplayNamePrefix: "odb-net", +} + +func TestAccODBCloudVmClusterDataSource_basic(t *testing.T) { + ctx := acctest.Context(t) + + if testing.Short() { + t.Skip("skipping long-running test in short mode") + } + + var cloudvmcluster odbtypes.CloudVmCluster + vmcDisplayName := sdkacctest.RandomWithPrefix(vmClusterTestDS.vmClusterDisplayNamePrefix) + dataSourceName := "data.aws_odb_cloud_vm_cluster.test" + publicKey, _, err := sdkacctest.RandSSHKeyPair(acctest.DefaultEmailAddress) + if err != nil { + t.Fatal(err) + return + } + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { + acctest.PreCheck(ctx, t) + // testAccPreCheck(ctx, t) + }, + ErrorCheck: acctest.ErrorCheck(t, names.ODBServiceID), + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + CheckDestroy: vmClusterTestDS.testAccCheckCloudVmClusterDestroy(ctx), + Steps: []resource.TestStep{ + { + Config: vmClusterTestDS.cloudVmClusterWithHardcoded("odbnet_c91byo6y6m", "exa_ji5quxxzn9", vmcDisplayName, publicKey), + Check: resource.ComposeAggregateTestCheckFunc( + vmClusterTestDS.testAccCheckCloudVmClusterExists(ctx, dataSourceName, &cloudvmcluster), + resource.TestCheckResourceAttr(dataSourceName, "display_name", vmcDisplayName), + ), + }, + }, + }) +} + +func (cloudVmClusterDSTest) testAccCheckCloudVmClusterDestroy(ctx context.Context) resource.TestCheckFunc { + return func(s *terraform.State) error { + conn := acctest.Provider.Meta().(*conns.AWSClient).ODBClient(ctx) + + for _, rs := range s.RootModule().Resources { + if rs.Type != "aws_odb_cloud_vm_cluster" { + continue + } + + _, err := tfodb.FindCloudVmClusterForResourceByID(ctx, conn, rs.Primary.ID) + if tfresource.NotFound(err) { + return nil + } + if err != nil { + return create.Error(names.ODB, create.ErrActionCheckingDestroyed, tfodb.ResNameCloudVmCluster, rs.Primary.ID, err) + } + + return create.Error(names.ODB, create.ErrActionCheckingDestroyed, tfodb.ResNameCloudVmCluster, rs.Primary.ID, errors.New("not destroyed")) + } + + return nil + } +} + +func (cloudVmClusterDSTest) testAccCheckCloudVmClusterExists(ctx context.Context, name string, cloudvmcluster *odbtypes.CloudVmCluster) resource.TestCheckFunc { + return func(s *terraform.State) error { + rs, ok := s.RootModule().Resources[name] + if !ok { + return create.Error(names.ODB, create.ErrActionCheckingExistence, tfodb.ResNameCloudVmCluster, name, errors.New("not found")) + } + + if rs.Primary.ID == "" { + return create.Error(names.ODB, create.ErrActionCheckingExistence, tfodb.ResNameCloudVmCluster, name, errors.New("not set")) + } + + conn := acctest.Provider.Meta().(*conns.AWSClient).ODBClient(ctx) + + resp, err := tfodb.FindCloudVmClusterForResourceByID(ctx, conn, rs.Primary.ID) + if err != nil { + return create.Error(names.ODB, create.ErrActionCheckingExistence, tfodb.ResNameCloudVmCluster, rs.Primary.ID, err) + } + + *cloudvmcluster = *resp + + return nil + } +} + +func (cloudVmClusterDSTest) testAccPreCheck(ctx context.Context, t *testing.T) { + conn := acctest.Provider.Meta().(*conns.AWSClient).ODBClient(ctx) + + input := &odb.ListCloudVmClustersInput{} + + _, err := conn.ListCloudVmClusters(ctx, input) + + if acctest.PreCheckSkipError(err) { + t.Skipf("skipping acceptance testing: %s", err) + } + if err != nil { + t.Fatalf("unexpected PreCheck error: %s", err) + } +} + +func (cloudVmClusterDSTest) cloudVmClusterWithHardcoded(odbNet, exaInfra, displayName, sshKey string) string { + dsTfCodeVmCluster := fmt.Sprintf(` +resource "aws_odb_cloud_vm_cluster" "test" { + odb_network_id = %[1]q + cloud_exadata_infrastructure_id = %[2]q + display_name = %[3]q + ssh_public_keys = [%[4]q] + cpu_core_count = 6 + gi_version = "23.0.0.0" + hostname_prefix = "apollo12" + is_local_backup_enabled = true + is_sparse_diskgroup_enabled = true + license_model = "LICENSE_INCLUDED" + data_storage_size_in_tbs = 20.0 + db_servers = [ "dbs_7ecm4wbjxy","dbs_uy5wmaqk6s"] + db_node_storage_size_in_gbs = 120.0 + memory_size_in_gbs = 60 + tags = { + "env"= "dev" + } + +} + +data "aws_odb_cloud_vm_cluster" "test" { + id = aws_odb_cloud_vm_cluster.test.id +} +`, odbNet, exaInfra, displayName, sshKey) + //fmt.Println(dsTfCodeVmCluster) + return dsTfCodeVmCluster +} diff --git a/internal/service/odb/cloud_vm_cluster_test.go b/internal/service/odb/cloud_vm_cluster_test.go new file mode 100644 index 000000000000..603014f263a1 --- /dev/null +++ b/internal/service/odb/cloud_vm_cluster_test.go @@ -0,0 +1,555 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +package odb_test + +import ( + "context" + "errors" + "fmt" + "github.com/aws/aws-sdk-go-v2/service/odb" + "strings" + + odbtypes "github.com/aws/aws-sdk-go-v2/service/odb/types" + sdkacctest "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" + "github.com/hashicorp/terraform-provider-aws/internal/acctest" + "github.com/hashicorp/terraform-provider-aws/internal/conns" + "github.com/hashicorp/terraform-provider-aws/internal/create" + + tfodb "github.com/hashicorp/terraform-provider-aws/internal/service/odb" + "github.com/hashicorp/terraform-provider-aws/internal/tfresource" + "github.com/hashicorp/terraform-provider-aws/names" + "testing" +) + +type cloudVmClusterResourceTest struct { + vmClusterDisplayNamePrefix string + exaInfraDisplayNamePrefix string + odbNetDisplayNamePrefix string +} + +var vmClusterTestResource = cloudVmClusterResourceTest{ + vmClusterDisplayNamePrefix: "Ofake-vmc", + exaInfraDisplayNamePrefix: "Ofake-exa-infra", + odbNetDisplayNamePrefix: "odb-net", +} + +func TestPrintCloudVmClusterUnitTest(t *testing.T) { + vmcRName := sdkacctest.RandomWithPrefix(vmClusterTestResource.vmClusterDisplayNamePrefix) + exaInfraRName := sdkacctest.RandomWithPrefix(vmClusterTestResource.exaInfraDisplayNamePrefix) + odbNetRName := sdkacctest.RandomWithPrefix(vmClusterTestResource.odbNetDisplayNamePrefix) + + publicKey, _, err := sdkacctest.RandSSHKeyPair(acctest.DefaultEmailAddress) + if err != nil { + t.Fatal(err) + return + } + fmt.Println(vmClusterTestResource.testAccCloudVmClusterConfigBasic(vmClusterTestResource.exaInfra(exaInfraRName), vmClusterTestResource.odbNetwork(odbNetRName), vmcRName, publicKey)) +} + +func TestAccODBCloudVmCluster_basic(t *testing.T) { + ctx := acctest.Context(t) + if testing.Short() { + t.Skip("skipping long-running test in short mode") + } + + var cloudvmcluster odbtypes.CloudVmCluster + vmcRName := sdkacctest.RandomWithPrefix(vmClusterTestResource.vmClusterDisplayNamePrefix) + exaInfraRName := sdkacctest.RandomWithPrefix(vmClusterTestResource.exaInfraDisplayNamePrefix) + odbNetRName := sdkacctest.RandomWithPrefix(vmClusterTestResource.odbNetDisplayNamePrefix) + + publicKey, _, err := sdkacctest.RandSSHKeyPair(acctest.DefaultEmailAddress) + if err != nil { + t.Fatal(err) + return + } + resourceName := "aws_odb_cloud_vm_cluster.test" + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { + acctest.PreCheck(ctx, t) + //acctest.PreCheckPartitionHasService(t, names.ODBEndpointID) + vmClusterTestResource.testAccPreCheck(ctx, t) + }, + ErrorCheck: acctest.ErrorCheck(t, names.ODBServiceID), + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + CheckDestroy: vmClusterTestResource.testAccCheckCloudVmClusterDestroy(ctx), + Steps: []resource.TestStep{ + { + Config: vmClusterTestResource.testAccCloudVmClusterConfigBasic(vmClusterTestResource.exaInfra(exaInfraRName), vmClusterTestResource.odbNetwork(odbNetRName), vmcRName, publicKey), + Check: resource.ComposeAggregateTestCheckFunc( + vmClusterTestResource.testAccCheckCloudVmClusterExists(ctx, resourceName, &cloudvmcluster), + ), + }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} + +func TestAccODBCloudVmClusterCreationWithAllParams(t *testing.T) { + ctx := acctest.Context(t) + if testing.Short() { + t.Skip("skipping long-running test in short mode") + } + + var cloudvmcluster odbtypes.CloudVmCluster + vmcRName := sdkacctest.RandomWithPrefix(vmClusterTestResource.vmClusterDisplayNamePrefix) + exaInfraRName := sdkacctest.RandomWithPrefix(vmClusterTestResource.exaInfraDisplayNamePrefix) + odbNetRName := sdkacctest.RandomWithPrefix(vmClusterTestResource.odbNetDisplayNamePrefix) + + publicKey, _, err := sdkacctest.RandSSHKeyPair(acctest.DefaultEmailAddress) + if err != nil { + t.Fatal(err) + return + } + resourceName := "aws_odb_cloud_vm_cluster.test" + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { + acctest.PreCheck(ctx, t) + //acctest.PreCheckPartitionHasService(t, names.ODBEndpointID) + vmClusterTestResource.testAccPreCheck(ctx, t) + }, + ErrorCheck: acctest.ErrorCheck(t, names.ODBServiceID), + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + CheckDestroy: vmClusterTestResource.testAccCheckCloudVmClusterDestroy(ctx), + Steps: []resource.TestStep{ + { + Config: vmClusterTestResource.cloudVmClusterWithAllParameters(vmClusterTestResource.exaInfra(exaInfraRName), vmClusterTestResource.odbNetwork(odbNetRName), vmcRName, publicKey), + Check: resource.ComposeAggregateTestCheckFunc( + vmClusterTestResource.testAccCheckCloudVmClusterExists(ctx, resourceName, &cloudvmcluster), + ), + }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} + +func TestAccODBCloudVmClusterAddRemoveTags(t *testing.T) { + ctx := acctest.Context(t) + // TIP: This is a long-running test guard for tests that run longer than + // 300s (5 min) generally. + if testing.Short() { + t.Skip("skipping long-running test in short mode") + } + + var cloudvmcluster1 odbtypes.CloudVmCluster + var cloudvmcluster2 odbtypes.CloudVmCluster + var cloudvmcluster3 odbtypes.CloudVmCluster + rName := sdkacctest.RandomWithPrefix(vmClusterTestResource.vmClusterDisplayNamePrefix) + exaInfraRName := sdkacctest.RandomWithPrefix(vmClusterTestResource.exaInfraDisplayNamePrefix) + odbNetRName := sdkacctest.RandomWithPrefix(vmClusterTestResource.odbNetDisplayNamePrefix) + resourceName := "aws_odb_cloud_vm_cluster.test" + + publicKey, _, err := sdkacctest.RandSSHKeyPair(acctest.DefaultEmailAddress) + if err != nil { + t.Fatal(err) + return + } + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { + acctest.PreCheck(ctx, t) + //acctest.PreCheckPartitionHasService(t, names.ODBEndpointID) + vmClusterTestResource.testAccPreCheck(ctx, t) + }, + ErrorCheck: acctest.ErrorCheck(t, names.ODBServiceID), + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + CheckDestroy: vmClusterTestResource.testAccCheckCloudVmClusterDestroy(ctx), + Steps: []resource.TestStep{ + { + Config: vmClusterTestResource.testAccCloudVmClusterConfigBasic(vmClusterTestResource.exaInfra(exaInfraRName), vmClusterTestResource.odbNetwork(odbNetRName), rName, publicKey), + Check: resource.ComposeAggregateTestCheckFunc( + resource.ComposeTestCheckFunc(func(state *terraform.State) error { + return nil + }), + vmClusterTestResource.testAccCheckCloudVmClusterExists(ctx, resourceName, &cloudvmcluster1), + resource.TestCheckResourceAttr(resourceName, "tags.%", "1"), + resource.TestCheckResourceAttr(resourceName, "tags.env", "dev"), + ), + }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + { + Config: vmClusterTestResource.testAccCloudVmClusterConfigUpdatedTags(vmClusterTestResource.exaInfra(exaInfraRName), vmClusterTestResource.odbNetwork(odbNetRName), rName, publicKey), + Check: resource.ComposeAggregateTestCheckFunc( + resource.TestCheckResourceAttr(resourceName, "tags.%", "2"), + resource.TestCheckResourceAttr(resourceName, "tags.env", "dev"), + resource.TestCheckResourceAttr(resourceName, "tags.foo", "bar"), + vmClusterTestResource.testAccCheckCloudVmClusterExists(ctx, resourceName, &cloudvmcluster2), + resource.ComposeTestCheckFunc(func(state *terraform.State) error { + if strings.Compare(*(cloudvmcluster1.CloudVmClusterId), *(cloudvmcluster2.CloudVmClusterId)) != 0 { + return errors.New("Should not create a new cloud vm cluster for tag update") + } + return nil + }), + ), + }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + { + Config: vmClusterTestResource.testAccCloudVmClusterConfigBasic(vmClusterTestResource.exaInfra(exaInfraRName), vmClusterTestResource.odbNetwork(odbNetRName), rName, publicKey), + Check: resource.ComposeAggregateTestCheckFunc( + vmClusterTestResource.testAccCheckCloudVmClusterExists(ctx, resourceName, &cloudvmcluster3), + resource.ComposeTestCheckFunc(func(state *terraform.State) error { + if strings.Compare(*(cloudvmcluster1.CloudVmClusterId), *(cloudvmcluster3.CloudVmClusterId)) != 0 { + return errors.New("Should not create a new cloud vm cluster for tag update") + } + return nil + }), + + resource.TestCheckResourceAttr(resourceName, "tags.%", "1"), + resource.TestCheckResourceAttr(resourceName, "tags.env", "dev"), + ), + }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} + +func TestAccODBCloudVmCluster_recreates_new(t *testing.T) { + ctx := acctest.Context(t) + // TIP: This is a long-running test guard for tests that run longer than + // 300s (5 min) generally. + if testing.Short() { + t.Skip("skipping long-running test in short mode") + } + + var cloudvmcluster1 odbtypes.CloudVmCluster + var cloudvmcluster2 odbtypes.CloudVmCluster + rName := sdkacctest.RandomWithPrefix(vmClusterTestResource.vmClusterDisplayNamePrefix) + exaInfraRName := sdkacctest.RandomWithPrefix(vmClusterTestResource.exaInfraDisplayNamePrefix) + odbNetRName := sdkacctest.RandomWithPrefix(vmClusterTestResource.odbNetDisplayNamePrefix) + + resourceName := "aws_odb_cloud_vm_cluster.test" + publicKey, _, err := sdkacctest.RandSSHKeyPair(acctest.DefaultEmailAddress) + if err != nil { + t.Fatal(err) + return + } + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { + acctest.PreCheck(ctx, t) + //acctest.PreCheckPartitionHasService(t, names.ODBEndpointID) + vmClusterTestResource.testAccPreCheck(ctx, t) + }, + ErrorCheck: acctest.ErrorCheck(t, names.ODBServiceID), + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + CheckDestroy: vmClusterTestResource.testAccCheckCloudVmClusterDestroy(ctx), + Steps: []resource.TestStep{ + { + Config: vmClusterTestResource.testAccCloudVmClusterConfigBasic(vmClusterTestResource.exaInfra(exaInfraRName), vmClusterTestResource.odbNetwork(odbNetRName), rName, publicKey), + Check: resource.ComposeAggregateTestCheckFunc( + resource.ComposeTestCheckFunc(func(state *terraform.State) error { + //fmt.Println(state) + return nil + }), + vmClusterTestResource.testAccCheckCloudVmClusterExists(ctx, resourceName, &cloudvmcluster1), + resource.TestCheckResourceAttr(resourceName, "tags.%", "1"), + resource.TestCheckResourceAttr(resourceName, "tags.env", "dev"), + ), + }, + { + Config: vmClusterTestResource.testAccCloudVmClusterConfigUpdatedTags(vmClusterTestResource.exaInfra(exaInfraRName+"_u"), vmClusterTestResource.odbNetwork(odbNetRName), rName, publicKey), + Check: resource.ComposeAggregateTestCheckFunc( + resource.TestCheckResourceAttr(resourceName, "tags.%", "2"), + resource.TestCheckResourceAttr(resourceName, "tags.env", "dev"), + resource.TestCheckResourceAttr(resourceName, "tags.foo", "bar"), + vmClusterTestResource.testAccCheckCloudVmClusterExists(ctx, resourceName, &cloudvmcluster2), + resource.ComposeTestCheckFunc(func(state *terraform.State) error { + //fmt.Println(state) + if strings.Compare(*(cloudvmcluster1.CloudVmClusterId), *(cloudvmcluster2.CloudVmClusterId)) == 0 { + return errors.New("Should create a new cloud vm cluster for tag update") + } + return nil + }), + ), + }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} + +func TestAccODBCloudVmCluster_disappears(t *testing.T) { + ctx := acctest.Context(t) + if testing.Short() { + t.Skip("skipping long-running test in short mode") + } + + var cloudvmcluster odbtypes.CloudVmCluster + rName := sdkacctest.RandomWithPrefix(vmClusterTestResource.vmClusterDisplayNamePrefix) + exaInfraRName := sdkacctest.RandomWithPrefix(vmClusterTestResource.exaInfraDisplayNamePrefix) + odbNetRName := sdkacctest.RandomWithPrefix(vmClusterTestResource.odbNetDisplayNamePrefix) + + resourceName := "aws_odb_cloud_vm_cluster.test" + publicKey, _, err := sdkacctest.RandSSHKeyPair(acctest.DefaultEmailAddress) + if err != nil { + t.Fatal(err) + return + } + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { + acctest.PreCheck(ctx, t) + //acctest.PreCheckPartitionHasService(t, names.ODBEndpointID) + vmClusterTestResource.testAccPreCheck(ctx, t) + }, + ErrorCheck: acctest.ErrorCheck(t, names.ODBServiceID), + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + CheckDestroy: vmClusterTestResource.testAccCheckCloudVmClusterDestroy(ctx), + Steps: []resource.TestStep{ + { + Config: vmClusterTestResource.testAccCloudVmClusterConfigBasic(vmClusterTestResource.exaInfra(exaInfraRName), vmClusterTestResource.odbNetwork(odbNetRName), rName, publicKey), + Check: resource.ComposeAggregateTestCheckFunc( + vmClusterTestResource.testAccCheckCloudVmClusterExists(ctx, resourceName, &cloudvmcluster), + acctest.CheckFrameworkResourceDisappears(ctx, acctest.Provider, tfodb.ResourceCloudVmCluster, resourceName), + ), + ExpectNonEmptyPlan: true, + }, + }, + }) +} + +func (cloudVmClusterResourceTest) testAccCheckCloudVmClusterDestroy(ctx context.Context) resource.TestCheckFunc { + return func(s *terraform.State) error { + conn := acctest.Provider.Meta().(*conns.AWSClient).ODBClient(ctx) + + for _, rs := range s.RootModule().Resources { + if rs.Type != "aws_odb_cloud_vm_cluster" { + continue + } + + _, err := tfodb.FindCloudVmClusterForResourceByID(ctx, conn, rs.Primary.ID) + if tfresource.NotFound(err) { + return nil + } + if err != nil { + return create.Error(names.ODB, create.ErrActionCheckingDestroyed, tfodb.ResNameCloudVmCluster, rs.Primary.ID, err) + } + + return create.Error(names.ODB, create.ErrActionCheckingDestroyed, tfodb.ResNameCloudVmCluster, rs.Primary.ID, errors.New("not destroyed")) + } + + return nil + } +} + +func (cloudVmClusterResourceTest) testAccCheckCloudVmClusterExists(ctx context.Context, name string, cloudvmcluster *odbtypes.CloudVmCluster) resource.TestCheckFunc { + return func(s *terraform.State) error { + rs, ok := s.RootModule().Resources[name] + if !ok { + return create.Error(names.ODB, create.ErrActionCheckingExistence, tfodb.ResNameCloudVmCluster, name, errors.New("not found")) + } + + if rs.Primary.ID == "" { + return create.Error(names.ODB, create.ErrActionCheckingExistence, tfodb.ResNameCloudVmCluster, name, errors.New("not set")) + } + + conn := acctest.Provider.Meta().(*conns.AWSClient).ODBClient(ctx) + + resp, err := tfodb.FindCloudVmClusterForResourceByID(ctx, conn, rs.Primary.ID) + if err != nil { + return create.Error(names.ODB, create.ErrActionCheckingExistence, tfodb.ResNameCloudVmCluster, rs.Primary.ID, err) + } + + *cloudvmcluster = *resp + + return nil + } +} + +func (cloudVmClusterResourceTest) testAccPreCheck(ctx context.Context, t *testing.T) { + conn := acctest.Provider.Meta().(*conns.AWSClient).ODBClient(ctx) + + input := &odb.ListCloudVmClustersInput{} + + _, err := conn.ListCloudVmClusters(ctx, input) + + if acctest.PreCheckSkipError(err) { + t.Skipf("skipping acceptance testing: %s", err) + } + if err != nil { + t.Fatalf("unexpected PreCheck error: %s", err) + } +} + +/*func testAccCheckCloudVmClusterNotRecreated(before, after *odb.DescribeCloudVmClusterResponse) resource.TestCheckFunc { + return func(s *terraform.State) error { + if before, after := aws.ToString(before.CloudVmClusterId), aws.ToString(after.CloudVmClusterId); before != after { + return create.Error(names.ODB, create.ErrActionCheckingNotRecreated, tfodb.ResNameCloudVmCluster, aws.ToString(before.CloudVmClusterId), errors.New("recreated")) + } + + return nil + } +}*/ + +func (cloudVmClusterResourceTest) testAccCloudVmClusterConfigBasic(exaInfra, odbNet, rName, sshKey string) string { + + res := fmt.Sprintf(` +%s + +%s + +data "aws_odb_db_servers_list" "test" { + cloud_exadata_infrastructure_id = aws_odb_cloud_exadata_infrastructure.test.id +} + +resource "aws_odb_cloud_vm_cluster" "test" { + display_name = %[3]q + cloud_exadata_infrastructure_id = aws_odb_cloud_exadata_infrastructure.test.id + cpu_core_count = 6 + gi_version = "23.0.0.0" + hostname_prefix = "apollo12" + ssh_public_keys = [%[4]q] + odb_network_id = aws_odb_network.test.id + is_local_backup_enabled = true + is_sparse_diskgroup_enabled = true + license_model = "LICENSE_INCLUDED" + data_storage_size_in_tbs = 20.0 + db_servers = [ for db_server in data.aws_odb_db_servers_list.test.db_servers : db_server.id] + db_node_storage_size_in_gbs = 120.0 + memory_size_in_gbs = 60 + tags = { + "env"= "dev" + } + +} +`, exaInfra, odbNet, rName, sshKey) + return res +} + +func (cloudVmClusterResourceTest) testAccCloudVmClusterConfigUpdatedTags(exaInfra, odbNet, rName, sshKey string) string { + + res := fmt.Sprintf(` +%s + +%s + +data "aws_odb_db_servers_list" "test" { + cloud_exadata_infrastructure_id = aws_odb_cloud_exadata_infrastructure.test.id +} + +resource "aws_odb_cloud_vm_cluster" "test" { + display_name = %[3]q + cloud_exadata_infrastructure_id = aws_odb_cloud_exadata_infrastructure.test.id + cpu_core_count = 6 + gi_version = "23.0.0.0" + hostname_prefix = "apollo12" + ssh_public_keys = [%[4]q] + odb_network_id = aws_odb_network.test.id + is_local_backup_enabled = true + is_sparse_diskgroup_enabled = true + license_model = "LICENSE_INCLUDED" + data_storage_size_in_tbs = 20.0 + db_servers = [ for db_server in data.aws_odb_db_servers_list.test.db_servers : db_server.id] + db_node_storage_size_in_gbs = 120.0 + memory_size_in_gbs = 60 + tags = { + "env"= "dev" + "foo"= "bar" + } + +} +`, exaInfra, odbNet, rName, sshKey) + return res +} + +func (cloudVmClusterResourceTest) exaInfra(rName string) string { + resource := fmt.Sprintf(` +resource "aws_odb_cloud_exadata_infrastructure" "test" { + display_name = "%[1]s" + shape = "Exadata.X9M" + storage_count = 3 + compute_count = 2 + availability_zone_id = "use1-az6" + customer_contacts_to_send_to_oci = ["abc@example.com"] + +} +`, rName) + //fmt.Println(resource) + return resource +} + +func (cloudVmClusterResourceTest) odbNetwork(rName string) string { + resource := fmt.Sprintf(` +resource "aws_odb_network" "test" { + display_name = %[1]q + availability_zone_id = "use1-az6" + client_subnet_cidr = "10.2.0.0/24" + backup_subnet_cidr = "10.2.1.0/24" + s3_access = "DISABLED" + zero_etl_access = "DISABLED" +} +`, rName) + //fmt.Println(resource) + return resource +} + +func (cloudVmClusterResourceTest) cloudVmClusterWithAllParameters(exaInfra, odbNet, rName, sshKey string) string { + + res := fmt.Sprintf(` + +%s + +%s + + +data "aws_odb_db_servers_list" "test" { + cloud_exadata_infrastructure_id = aws_odb_cloud_exadata_infrastructure.test.id +} + +resource "aws_odb_cloud_vm_cluster" "test" { + display_name = %[3]q + cloud_exadata_infrastructure_id = aws_odb_cloud_exadata_infrastructure.test.id + cpu_core_count = 6 + gi_version = "23.0.0.0" + hostname_prefix = "apollo12" + ssh_public_keys = [%[4]q] + odb_network_id = aws_odb_network.test.id + is_local_backup_enabled = true + is_sparse_diskgroup_enabled = true + license_model = "LICENSE_INCLUDED" + data_storage_size_in_tbs = 20.0 + db_servers = [ for db_server in data.aws_odb_db_servers_list.test.db_servers : db_server.id] + db_node_storage_size_in_gbs = 120.0 + memory_size_in_gbs = 60 + cluster_name = "julia-13" + timezone = "UTC" + scan_listener_port_tcp = 1521 + system_version = "23.1.26.0.0.250516" + tags = { + "env"= "dev" + } + data_collection_options ={ + is_diagnostics_events_enabled = true + is_health_monitoring_enabled = true + is_incident_logs_enabled = true + } +} +`, exaInfra, odbNet, rName, sshKey) + return res +} diff --git a/internal/service/odb/db_servers_list_data_source.go b/internal/service/odb/db_servers_list_data_source.go new file mode 100644 index 000000000000..aa008279598d --- /dev/null +++ b/internal/service/odb/db_servers_list_data_source.go @@ -0,0 +1,150 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +package odb + +import ( + "context" + "github.com/hashicorp/terraform-plugin-framework/attr" + + "github.com/aws/aws-sdk-go-v2/service/odb" + odbtypes "github.com/aws/aws-sdk-go-v2/service/odb/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/create" + "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/names" +) + +// Function annotations are used for datasource registration to the Provider. DO NOT EDIT. +// @FrameworkDataSource("aws_odb_db_servers_list", name="Db Servers List") +func newDataSourceDbServersList(context.Context) (datasource.DataSourceWithConfigure, error) { + return &dataSourceDbServersList{}, nil +} + +const ( + DSNameDbServersList = "Db Servers List Data Source" +) + +type dataSourceDbServersList struct { + framework.DataSourceWithModel[dbServersListDataSourceModel] +} + +func (d *dataSourceDbServersList) Schema(ctx context.Context, req datasource.SchemaRequest, resp *datasource.SchemaResponse) { + resp.Schema = schema.Schema{ + Attributes: map[string]schema.Attribute{ + "cloud_exadata_infrastructure_id": schema.StringAttribute{ + Required: true, + }, + "db_servers": schema.ListAttribute{ + Computed: true, + CustomType: fwtypes.NewListNestedObjectTypeOf[dbServerForDbServersListDataSourceModel](ctx), + ElementType: types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "id": types.StringType, + "status": fwtypes.StringEnumType[odbtypes.ResourceStatus](), + "status_reason": types.StringType, + "cpu_core_count": types.Int32Type, + "cpu_core_count_per_node": types.Int32Type, + "db_server_patching_details": types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "estimated_patch_duration": types.Int32Type, + "patching_status": fwtypes.StringEnumType[odbtypes.DbServerPatchingStatus](), + "time_patching_ended": types.StringType, + "time_patching_started": types.StringType, + }, + }, + "display_name": types.StringType, + "exadata_infrastructure_id": types.StringType, + "ocid": types.StringType, + "oci_resource_anchor_name": types.StringType, + "max_cpu_count": types.Int32Type, + "max_db_node_storage_in_gbs": types.Int32Type, + "max_memory_in_gbs": types.Int32Type, + "memory_size_in_gbs": types.Int32Type, + "shape": types.StringType, + "vm_cluster_ids": types.ListType{ + ElemType: types.StringType, + }, + "compute_model": fwtypes.StringEnumType[odbtypes.ComputeModel](), + "autonomous_vm_cluster_ids": types.ListType{ + ElemType: types.StringType, + }, + "autonomous_virtual_machine_ids": types.ListType{ + ElemType: types.StringType, + }, + }, + }, + }, + }, + } +} + +// Data sources only have a read method. +func (d *dataSourceDbServersList) Read(ctx context.Context, req datasource.ReadRequest, resp *datasource.ReadResponse) { + + conn := d.Meta().ODBClient(ctx) + var data dbServersListDataSourceModel + resp.Diagnostics.Append(req.Config.Get(ctx, &data)...) + if resp.Diagnostics.HasError() { + return + } + input := odb.ListDbServersInput{} + if !data.CloudExadataInfrastructureId.IsNull() && !data.CloudExadataInfrastructureId.IsUnknown() { + input.CloudExadataInfrastructureId = data.CloudExadataInfrastructureId.ValueStringPointer() + } + out, err := conn.ListDbServers(ctx, &input) + if err != nil { + resp.Diagnostics.AddError( + create.ProblemStandardMessage(names.ODB, create.ErrActionReading, DSNameDbServersList, "", err), + err.Error(), + ) + return + } + + resp.Diagnostics.Append(flex.Flatten(ctx, out, &data)...) + if resp.Diagnostics.HasError() { + return + } + resp.Diagnostics.Append(resp.State.Set(ctx, &data)...) +} + +type dbServersListDataSourceModel struct { + framework.WithRegionModel + CloudExadataInfrastructureId types.String `tfsdk:"cloud_exadata_infrastructure_id"` + DbServers fwtypes.ListNestedObjectValueOf[dbServerForDbServersListDataSourceModel] `tfsdk:"db_servers"` +} + +type dbServerForDbServersListDataSourceModel struct { + DbServerId types.String `tfsdk:"id"` + Status fwtypes.StringEnum[odbtypes.ResourceStatus] `tfsdk:"status"` + StatusReason types.String `tfsdk:"status_reason"` + CpuCoreCount types.Int32 `tfsdk:"cpu_core_count"` + DbNodeStorageSizeInGBs types.Int32 `tfsdk:"db_node_storage_size_in_gbs"` + DbServerPatchingDetails fwtypes.ObjectValueOf[dbNodePatchingDetailsForDbServersListDataSourceModel] `tfsdk:"db_server_patching_details"` + DisplayName types.String `tfsdk:"display_name"` + ExadataInfrastructureId types.String `tfsdk:"exadata_infrastructure_id"` + OCID types.String `tfsdk:"ocid"` + OciResourceAnchorName types.String `tfsdk:"oci_resource_anchor_name"` + MaxCpuCount types.Int32 `tfsdk:"max_cpu_count"` + MaxDbNodeStorageInGBs types.Int32 `tfsdk:"max_db_node_storage_in_gbs"` + MaxMemoryInGBs types.Int32 `tfsdk:"max_memory_in_gbs"` + MemorySizeInGBs types.Int32 `tfsdk:"memory_size_in_gbs"` + Shape types.String `tfsdk:"shape"` + //CreatedAt types.String `tfsdk:"created_at"` + VmClusterIds fwtypes.ListOfString `tfsdk:"vm_cluster_ids"` + ComputeModel fwtypes.StringEnum[odbtypes.ComputeModel] `tfsdk:"compute_model"` + AutonomousVmClusterIds fwtypes.ListOfString `tfsdk:"autonomous_vm_cluster_ids"` + AutonomousVirtualMachineIds fwtypes.ListOfString `tfsdk:"autonomous_virtual_machine_ids"` +} + +type dbNodePatchingDetailsForDbServersListDataSourceModel struct { + EstimatedPatchDuration types.Int32 `tfsdk:"estimated_patch_duration"` + PatchingStatus fwtypes.StringEnum[odbtypes.DbServerPatchingStatus] `tfsdk:"patching_status"` + TimePatchingEnded types.String `tfsdk:"time_patching_ended"` + TimePatchingStarted types.String `tfsdk:"time_patching_started"` +} diff --git a/internal/service/odb/db_servers_list_data_source_test.go b/internal/service/odb/db_servers_list_data_source_test.go new file mode 100644 index 000000000000..6c225b48b920 --- /dev/null +++ b/internal/service/odb/db_servers_list_data_source_test.go @@ -0,0 +1,184 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +package odb_test + +import ( + "context" + "errors" + "fmt" + "github.com/aws/aws-sdk-go-v2/aws" + odbtypes "github.com/aws/aws-sdk-go-v2/service/odb/types" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" + "github.com/hashicorp/terraform-provider-aws/internal/errs" + "github.com/hashicorp/terraform-provider-aws/internal/tfresource" + "strconv" + "testing" + + "github.com/aws/aws-sdk-go-v2/service/odb" + sdkacctest "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" + "github.com/hashicorp/terraform-provider-aws/internal/acctest" + "github.com/hashicorp/terraform-provider-aws/internal/conns" + "github.com/hashicorp/terraform-provider-aws/internal/create" + + tfodb "github.com/hashicorp/terraform-provider-aws/internal/service/odb" + "github.com/hashicorp/terraform-provider-aws/names" +) + +type testDbServersListDataSource struct { + displayNamePrefix string +} + +var dbServersListDataSourceTests = testDbServersListDataSource{ + displayNamePrefix: "Ofake-exa", +} + +// Acceptance test access AWS and cost money to run. +func TestAccODBDbServersListDataSource_basic(t *testing.T) { + ctx := acctest.Context(t) + + if testing.Short() { + t.Skip("skipping long-running test in short mode") + } + + var dbserverslist odb.ListDbServersOutput + exaInfraDisplayName := sdkacctest.RandomWithPrefix(dbServersListDataSourceTests.displayNamePrefix) + + dataSourceName := "data.aws_odb_db_servers_list.test" + exaInfraResourceName := "aws_odb_cloud_exadata_infrastructure.test" + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { + acctest.PreCheck(ctx, t) + + }, + ErrorCheck: acctest.ErrorCheck(t, names.ODBServiceID), + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + CheckDestroy: dbServersListDataSourceTests.testAccCheckDbServersDestroyed(ctx), + Steps: []resource.TestStep{ + { + Config: dbServersListDataSourceTests.testAccDbServersListDataSourceConfigBasic(dbServersListDataSourceTests.exaInfra(exaInfraDisplayName)), + Check: resource.ComposeAggregateTestCheckFunc( + dbServersListDataSourceTests.testAccCheckDbServersListExists(ctx, exaInfraResourceName, &dbserverslist), + resource.TestCheckResourceAttr(dataSourceName, "aws_odb_db_servers_list.db_servers.#", strconv.Itoa(len(dbserverslist.DbServers))), + ), + }, + }, + }) +} + +func (testDbServersListDataSource) testAccCheckDbServersListExists(ctx context.Context, name string, output *odb.ListDbServersOutput) resource.TestCheckFunc { + return func(s *terraform.State) error { + rs, ok := s.RootModule().Resources[name] + if !ok { + return create.Error(names.ODB, create.ErrActionCheckingExistence, tfodb.DSNameDbServersList, name, errors.New("not found")) + } + conn := acctest.Provider.Meta().(*conns.AWSClient).ODBClient(ctx) + var exaInfraId = &rs.Primary.ID + + resp, err := dbServersListDataSourceTests.findDbServersList(ctx, conn, exaInfraId) + if err != nil { + return create.Error(names.ODB, create.ErrActionCheckingExistence, tfodb.DSNameDbServersList, rs.Primary.ID, err) + } + *output = *resp + return nil + } +} + +func (testDbServersListDataSource) testAccCheckDbServersDestroyed(ctx context.Context) resource.TestCheckFunc { + return func(s *terraform.State) error { + conn := acctest.Provider.Meta().(*conns.AWSClient).ODBClient(ctx) + + for _, rs := range s.RootModule().Resources { + if rs.Type != "aws_odb_cloud_exadata_infrastructure" { + continue + } + + _, err := dbServersListDataSourceTests.findExaInfra(ctx, conn, rs.Primary.ID) + + if tfresource.NotFound(err) { + return nil + } + if err != nil { + return create.Error(names.ODB, create.ErrActionCheckingDestroyed, tfodb.DSNameDbServersList, rs.Primary.ID, err) + } + + return create.Error(names.ODB, create.ErrActionCheckingDestroyed, tfodb.DSNameDbServersList, rs.Primary.ID, errors.New("not destroyed")) + } + + return nil + } +} + +func (testDbServersListDataSource) findExaInfra(ctx context.Context, conn *odb.Client, id string) (*odbtypes.CloudExadataInfrastructure, error) { + input := odb.GetCloudExadataInfrastructureInput{ + CloudExadataInfrastructureId: aws.String(id), + } + + out, err := conn.GetCloudExadataInfrastructure(ctx, &input) + if err != nil { + if errs.IsA[*odbtypes.ResourceNotFoundException](err) { + return nil, &retry.NotFoundError{ + LastError: err, + LastRequest: &input, + } + } + + return nil, err + } + + if out == nil || out.CloudExadataInfrastructure == nil { + return nil, tfresource.NewEmptyResultError(&input) + } + + return out.CloudExadataInfrastructure, nil +} + +func (testDbServersListDataSource) findDbServersList(ctx context.Context, conn *odb.Client, exaInfraId *string) (*odb.ListDbServersOutput, error) { + inputWithExaId := &odb.ListDbServersInput{ + CloudExadataInfrastructureId: exaInfraId, + } + output, err := conn.ListDbServers(ctx, inputWithExaId) + if err != nil { + return nil, err + } + return output, nil +} + +func (testDbServersListDataSource) testAccDbServersListDataSourceConfigBasic(exaInfra string) string { + return fmt.Sprintf(` +%s + +data "aws_odb_db_servers_list" "test" { + cloud_exadata_infrastructure_id = aws_odb_cloud_exadata_infrastructure.test.id +} +`, exaInfra) +} + +func (testDbServersListDataSource) exaInfra(rName string) string { + exaRes := fmt.Sprintf(` +resource "aws_odb_cloud_exadata_infrastructure" "test" { + display_name = "%[1]s" + shape = "Exadata.X9M" + storage_count = 3 + compute_count = 2 + availability_zone_id = "use1-az6" + customer_contacts_to_send_to_oci = ["abc@example.com"] + maintenance_window = { + custom_action_timeout_in_mins = 16 + days_of_week = [] + hours_of_day = [] + is_custom_action_timeout_enabled = true + lead_time_in_weeks = 0 + months = [] + patching_mode = "ROLLING" + preference = "NO_PREFERENCE" + weeks_of_month =[] + } +} +`, rName) + //fmt.Println(resource) + return exaRes +} diff --git a/internal/service/odb/service_package_gen.go b/internal/service/odb/service_package_gen.go index c9906bccd1bb..517e89cbe52d 100644 --- a/internal/service/odb/service_package_gen.go +++ b/internal/service/odb/service_package_gen.go @@ -15,12 +15,30 @@ type servicePackage struct{} func (p *servicePackage) FrameworkDataSources(ctx context.Context) []*inttypes.ServicePackageFrameworkDataSource { return []*inttypes.ServicePackageFrameworkDataSource{ + { + Factory: newDataSourceCloudAutonomousVmCluster, + TypeName: "aws_odb_cloud_autonomous_vm_cluster", + Name: "Cloud Autonomous Vm Cluster", + Region: unique.Make(inttypes.ResourceRegionDefault()), + }, { Factory: newDataSourceCloudExadataInfrastructure, TypeName: "aws_odb_cloud_exadata_infrastructure", Name: "Cloud Exadata Infrastructure", Region: unique.Make(inttypes.ResourceRegionDefault()), }, + { + Factory: newDataSourceCloudVmCluster, + TypeName: "aws_odb_cloud_vm_cluster", + Name: "Cloud Vm Cluster", + Region: unique.Make(inttypes.ResourceRegionDefault()), + }, + { + Factory: newDataSourceDbServersList, + TypeName: "aws_odb_db_servers_list", + Name: "Db Servers List", + Region: unique.Make(inttypes.ResourceRegionDefault()), + }, { Factory: newDataSourceNetwork, TypeName: "aws_odb_network", @@ -38,6 +56,15 @@ func (p *servicePackage) FrameworkDataSources(ctx context.Context) []*inttypes.S func (p *servicePackage) FrameworkResources(ctx context.Context) []*inttypes.ServicePackageFrameworkResource { return []*inttypes.ServicePackageFrameworkResource{ + { + Factory: newResourceCloudAutonomousVmCluster, + TypeName: "aws_odb_cloud_autonomous_vm_cluster", + Name: "Cloud Autonomous Vm Cluster", + Tags: unique.Make(inttypes.ServicePackageResourceTags{ + IdentifierAttribute: names.AttrARN, + }), + Region: unique.Make(inttypes.ResourceRegionDefault()), + }, { Factory: newResourceCloudExadataInfrastructure, TypeName: "aws_odb_cloud_exadata_infrastructure", @@ -47,6 +74,15 @@ func (p *servicePackage) FrameworkResources(ctx context.Context) []*inttypes.Ser }), Region: unique.Make(inttypes.ResourceRegionDefault()), }, + { + Factory: newResourceCloudVmCluster, + TypeName: "aws_odb_cloud_vm_cluster", + Name: "Cloud Vm Cluster", + Tags: unique.Make(inttypes.ServicePackageResourceTags{ + IdentifierAttribute: names.AttrARN, + }), + Region: unique.Make(inttypes.ResourceRegionDefault()), + }, { Factory: newResourceNetwork, TypeName: "aws_odb_network", From 21598b89388429c868b8b14c027458c19b0197ee Mon Sep 17 00:00:00 2001 From: Asim Date: Mon, 14 Jul 2025 16:30:06 +0100 Subject: [PATCH 351/365] removed customized url --- internal/service/odb/service_package.go | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/internal/service/odb/service_package.go b/internal/service/odb/service_package.go index 32023faba3bc..5165ae6c4b77 100644 --- a/internal/service/odb/service_package.go +++ b/internal/service/odb/service_package.go @@ -4,7 +4,6 @@ import ( "context" "github.com/aws/aws-sdk-go-v2/aws" "github.com/aws/aws-sdk-go-v2/service/odb" - "github.com/hashicorp/terraform-plugin-log/tflog" "github.com/hashicorp/terraform-provider-aws/names" ) @@ -14,17 +13,6 @@ func (p *servicePackage) NewClient(ctx context.Context, config map[string]any) ( return odb.NewFromConfig(cfg, odb.WithEndpointResolverV2(newEndpointResolverV2()), withBaseEndpoint(config[names.AttrEndpoint].(string)), - func(o *odb.Options) { - //if config["partition"].(string) == names.StandardPartitionID { - if cfg.Region != "\"us-east-1\"" { - tflog.Info(ctx, "overriding region", map[string]any{ - "original_region": cfg.Region, - "override_region": "us-east-1", - }) - o.Region = "us-east-1" - } - //} - o.BaseEndpoint = aws.String("https://gammaiad.capi.us-east-1.oracolo.alameda.aws.dev") - }, + func(o *odb.Options) {}, ), nil } From 7d75ded6b2b130d5291d1d95941bdfbc88e5fecc Mon Sep 17 00:00:00 2001 From: Asim Date: Mon, 14 Jul 2025 23:08:14 +0100 Subject: [PATCH 352/365] gi version and avmc --- .../odb/cloud_autonomous_vm_cluster.go | 239 ++++++++++-------- ...cloud_autonomous_vm_cluster_data_source.go | 113 +++++---- ..._autonomous_vm_cluster_data_source_test.go | 163 ++++++++++-- .../odb/cloud_autonomous_vm_cluster_test.go | 26 +- .../odb/cloud_exadata_infrastructure_test.go | 14 - internal/service/odb/cloud_vm_cluster_test.go | 11 + .../odb/gi_versions_list_data_source.go | 98 +++++++ .../odb/gi_versions_list_data_source_test.go | 72 ++++++ internal/service/odb/service_package.go | 13 +- internal/service/odb/service_package_gen.go | 6 + 10 files changed, 561 insertions(+), 194 deletions(-) create mode 100644 internal/service/odb/gi_versions_list_data_source.go create mode 100644 internal/service/odb/gi_versions_list_data_source_test.go diff --git a/internal/service/odb/cloud_autonomous_vm_cluster.go b/internal/service/odb/cloud_autonomous_vm_cluster.go index 0d224b49c276..6ef15ac21a29 100644 --- a/internal/service/odb/cloud_autonomous_vm_cluster.go +++ b/internal/service/odb/cloud_autonomous_vm_cluster.go @@ -133,13 +133,11 @@ func (r *resourceCloudAutonomousVmCluster) Schema(ctx context.Context, req resou Computed: true, }, "db_servers": schema.SetAttribute{ - Optional: true, - Computed: true, + Required: true, CustomType: fwtypes.SetOfStringType, ElementType: types.StringType, PlanModifiers: []planmodifier.Set{ setplanmodifier.RequiresReplace(), - setplanmodifier.UseStateForUnknown(), }, }, "description": schema.StringAttribute{ @@ -237,19 +235,15 @@ func (r *resourceCloudAutonomousVmCluster) Schema(ctx context.Context, req resou Computed: true, }, "scan_listener_port_non_tls": schema.Int32Attribute{ - Optional: true, - Computed: true, + Required: true, PlanModifiers: []planmodifier.Int32{ int32planmodifier.RequiresReplace(), - int32planmodifier.UseStateForUnknown(), }, }, "scan_listener_port_tls": schema.Int32Attribute{ - Optional: true, - Computed: true, + Required: true, PlanModifiers: []planmodifier.Int32{ int32planmodifier.RequiresReplace(), - int32planmodifier.UseStateForUnknown(), }, }, "shape": schema.StringAttribute{ @@ -295,7 +289,6 @@ func (r *resourceCloudAutonomousVmCluster) Schema(ctx context.Context, req resou CustomType: fwtypes.NewObjectTypeOf[cloudAutonomousVmClusterMaintenanceWindowResourceModel](ctx), PlanModifiers: []planmodifier.Object{ objectplanmodifier.RequiresReplace(), - objectplanmodifier.UseStateForUnknown(), }, AttributeTypes: map[string]attr.Type{ "days_of_week": types.SetType{ @@ -338,19 +331,26 @@ func (r *resourceCloudAutonomousVmCluster) Create(ctx context.Context, req resou } input := odb.CreateCloudAutonomousVmClusterInput{ - ClientToken: aws.String(id.UniqueId()), - Tags: getTagsIn(ctx), - MaintenanceWindow: mapAVMCMaintenanceWindowToOdbMaintenanceWindow(ctx, plan.MaintenanceWindow), + ClientToken: aws.String(id.UniqueId()), + Tags: getTagsIn(ctx), + } + inputMW, err := r.expandMaintenanceWindow(ctx, plan.MaintenanceWindow) + if err != nil { + resp.Diagnostics.AddError( + create.ProblemStandardMessage(names.ODB, create.ErrActionCreating, ResNameCloudAutonomousVmCluster, plan.DisplayName.ValueString(), err), + err.Error(), + ) + return } - resp.Diagnostics.Append(flex.Expand(ctx, plan, &input, flex.WithIgnoredFieldNamesAppend("Tags"), - flex.WithIgnoredFieldNamesAppend("MaintenanceWindow"))...) + input.MaintenanceWindow = inputMW + resp.Diagnostics.Append(flex.Expand(ctx, plan, &input)...) if resp.Diagnostics.HasError() { return } out, err := conn.CreateCloudAutonomousVmCluster(ctx, &input) if err != nil { - fmt.Println("CreateCloudAutonomousVmCluster failed", err) + resp.Diagnostics.AddError( create.ProblemStandardMessage(names.ODB, create.ErrActionCreating, ResNameCloudAutonomousVmCluster, plan.DisplayName.ValueString(), err), err.Error(), @@ -389,12 +389,11 @@ func (r *resourceCloudAutonomousVmCluster) Create(ctx context.Context, req resou } if createdAVMC.MaintenanceWindow != nil { - plan.MaintenanceWindow = mapToCloudAutonomousVmClusterMaintenanceWindowResourceModel(ctx, createdAVMC.MaintenanceWindow) + plan.MaintenanceWindow = r.flattenMaintenanceWindow(ctx, createdAVMC.MaintenanceWindow) } - resp.Diagnostics.Append(flex.Flatten(ctx, createdAVMC, &plan, flex.WithIgnoredFieldNamesAppend("CreatedAt"), + resp.Diagnostics.Append(flex.Flatten(ctx, createdAVMC, &plan, flex.WithIgnoredFieldNamesAppend("TimeOrdsCertificateExpires"), - flex.WithIgnoredFieldNamesAppend("TimeDatabaseSslCertificateExpires"), - flex.WithIgnoredFieldNamesAppend("MaintenanceWindow"))...) + flex.WithIgnoredFieldNamesAppend("TimeDatabaseSslCertificateExpires"))...) resp.Diagnostics.Append(resp.State.Set(ctx, plan)...) } @@ -435,13 +434,11 @@ func (r *resourceCloudAutonomousVmCluster) Read(ctx context.Context, req resourc } else { state.TimeDatabaseSslCertificateExpires = types.StringValue(NotAvailableValues) } - if out.MaintenanceWindow != nil { - state.MaintenanceWindow = mapToCloudAutonomousVmClusterMaintenanceWindowResourceModel(ctx, out.MaintenanceWindow) - } - resp.Diagnostics.Append(flex.Flatten(ctx, out, &state, flex.WithIgnoredFieldNamesAppend("CreatedAt"), + state.MaintenanceWindow = r.flattenMaintenanceWindow(ctx, out.MaintenanceWindow) + + resp.Diagnostics.Append(flex.Flatten(ctx, out, &state, flex.WithIgnoredFieldNamesAppend("TimeOrdsCertificateExpires"), - flex.WithIgnoredFieldNamesAppend("TimeDatabaseSslCertificateExpires"), - flex.WithIgnoredFieldNamesAppend("MaintenanceWindow"))...) + flex.WithIgnoredFieldNamesAppend("TimeDatabaseSslCertificateExpires"))...) if resp.Diagnostics.HasError() { return @@ -483,13 +480,10 @@ func (r *resourceCloudAutonomousVmCluster) Update(ctx context.Context, req resou } else { plan.TimeOrdsCertificateExpires = types.StringValue(NotAvailableValues) } - if updatedAVMC.MaintenanceWindow != nil { - plan.MaintenanceWindow = mapToCloudAutonomousVmClusterMaintenanceWindowResourceModel(ctx, updatedAVMC.MaintenanceWindow) - } - - resp.Diagnostics.Append(flex.Flatten(ctx, updatedAVMC, &plan, flex.WithIgnoredFieldNamesAppend("CreatedAt"), + plan.MaintenanceWindow = r.flattenMaintenanceWindow(ctx, updatedAVMC.MaintenanceWindow) + resp.Diagnostics.Append(flex.Flatten(ctx, updatedAVMC, &plan, flex.WithIgnoredFieldNamesAppend("TimeOrdsCertificateExpires"), - flex.WithIgnoredFieldNamesAppend("TimeDatabaseSslCertificateExpires"), flex.WithIgnoredFieldNamesAppend("MaintenanceWindow"))...) + flex.WithIgnoredFieldNamesAppend("TimeDatabaseSslCertificateExpires"))...) if resp.Diagnostics.HasError() { return @@ -715,14 +709,12 @@ func sweepCloudAutonomousVmClusters(ctx context.Context, client *conns.AWSClient return sweepResources, nil } -func mapAVMCMaintenanceWindowToOdbMaintenanceWindow(ctx context.Context, avmcMaintenanceWindowFwTypesObj fwtypes.ObjectValueOf[cloudAutonomousVmClusterMaintenanceWindowResourceModel]) *odbtypes.MaintenanceWindow { - if avmcMaintenanceWindowFwTypesObj.IsNull() { - return nil - } - if avmcMaintenanceWindowFwTypesObj.IsUnknown() { - return nil +func (r *resourceCloudAutonomousVmCluster) expandMaintenanceWindow(ctx context.Context, avmcMaintenanceWindowFwTypesObj fwtypes.ObjectValueOf[cloudAutonomousVmClusterMaintenanceWindowResourceModel]) (*odbtypes.MaintenanceWindow, error) { + if avmcMaintenanceWindowFwTypesObj.IsNull() || avmcMaintenanceWindowFwTypesObj.IsUnknown() { + return nil, errors.New("maintenance window cannot be null") } - + hasError := false + var err error var avmcMaintenanceWindowResource cloudAutonomousVmClusterMaintenanceWindowResourceModel avmcMaintenanceWindowFwTypesObj.As(ctx, &avmcMaintenanceWindowResource, basetypes.ObjectAsOptions{ @@ -730,31 +722,44 @@ func mapAVMCMaintenanceWindowToOdbMaintenanceWindow(ctx context.Context, avmcMai UnhandledUnknownAsEmpty: true, }) - var daysOfWeekNames []odbtypes.DayOfWeekName - avmcMaintenanceWindowResource.DaysOfWeek.ElementsAs(ctx, &daysOfWeekNames, false) - daysOfWeek := make([]odbtypes.DayOfWeek, 0, len(daysOfWeekNames)) + var daysOfWeek []odbtypes.DayOfWeek = nil - for _, dayOfWeek := range daysOfWeekNames { - daysOfWeek = append(daysOfWeek, odbtypes.DayOfWeek{ - Name: dayOfWeek, - }) + if !avmcMaintenanceWindowResource.DaysOfWeek.IsNull() { + var daysOfWeekNames []odbtypes.DayOfWeekName + avmcMaintenanceWindowResource.DaysOfWeek.ElementsAs(ctx, &daysOfWeekNames, false) + daysOfWeek = make([]odbtypes.DayOfWeek, 0, len(daysOfWeekNames)) + for _, dayOfWeek := range daysOfWeekNames { + daysOfWeek = append(daysOfWeek, odbtypes.DayOfWeek{ + Name: dayOfWeek, + }) + } } - var hoursOfTheDay []int32 - avmcMaintenanceWindowResource.HoursOfDay.ElementsAs(ctx, &hoursOfTheDay, false) - - var monthNames []odbtypes.MonthName - avmcMaintenanceWindowResource.Months.ElementsAs(ctx, &monthNames, false) - months := make([]odbtypes.Month, 0, len(monthNames)) - for _, month := range monthNames { - months = append(months, odbtypes.Month{ - Name: month, - }) + var hoursOfTheDay []int32 = nil + if !avmcMaintenanceWindowResource.HoursOfDay.IsNull() { + avmcMaintenanceWindowResource.HoursOfDay.ElementsAs(ctx, &hoursOfTheDay, false) } - var weeksOfMonth []int32 - avmcMaintenanceWindowResource.WeeksOfMonth.ElementsAs(ctx, &weeksOfMonth, false) + var months []odbtypes.Month = nil + if !avmcMaintenanceWindowResource.Months.IsNull() { + var monthNames []odbtypes.MonthName + avmcMaintenanceWindowResource.Months.ElementsAs(ctx, &monthNames, false) + months = make([]odbtypes.Month, 0, len(monthNames)) + for _, month := range monthNames { + months = append(months, odbtypes.Month{ + Name: month, + }) + } + } + var weeksOfMonth []int32 = nil + if !avmcMaintenanceWindowResource.WeeksOfMonth.IsNull() { + avmcMaintenanceWindowResource.WeeksOfMonth.ElementsAs(ctx, &weeksOfMonth, false) + } + if avmcMaintenanceWindowResource.Preference.IsNull() || avmcMaintenanceWindowResource.WeeksOfMonth.IsUnknown() { + hasError = true + err = errors.Join(err, errors.New("cloud autonomous vm cluster maintenance window must set preference ")) + } odbTypeMW := odbtypes.MaintenanceWindow{ DaysOfWeek: daysOfWeek, HoursOfDay: hoursOfTheDay, @@ -763,59 +768,87 @@ func mapAVMCMaintenanceWindowToOdbMaintenanceWindow(ctx context.Context, avmcMai Preference: avmcMaintenanceWindowResource.Preference.ValueEnum(), WeeksOfMonth: weeksOfMonth, } - return &odbTypeMW + if odbTypeMW.HoursOfDay != nil && len(odbTypeMW.HoursOfDay) == 0 { + hasError = true + err = errors.Join(err, errors.New("cloud autonomous vm cluster hours-of-day can't be empty. Give a valid vale or remove the property ")) + } + if odbTypeMW.DaysOfWeek != nil && len(odbTypeMW.DaysOfWeek) == 0 { + hasError = true + err = errors.Join(err, errors.New("cloud autonomous vm cluster days-of-week can't be empty. Give a valid vale or remove the property ")) + } + if odbTypeMW.Months != nil && len(odbTypeMW.Months) == 0 { + hasError = true + err = errors.Join(err, errors.New("cloud autonomous vm cluster months can't be empty. Give a valid vale or remove the property ")) + } + + if hasError { + return nil, err + } + return &odbTypeMW, err } -func mapToCloudAutonomousVmClusterMaintenanceWindowResourceModel(ctx context.Context, avmcMW *odbtypes.MaintenanceWindow) fwtypes.ObjectValueOf[cloudAutonomousVmClusterMaintenanceWindowResourceModel] { +func (r *resourceCloudAutonomousVmCluster) flattenMaintenanceWindow(ctx context.Context, avmcMW *odbtypes.MaintenanceWindow) fwtypes.ObjectValueOf[cloudAutonomousVmClusterMaintenanceWindowResourceModel] { //days of week - daysOfWeek := make([]attr.Value, 0, len(avmcMW.DaysOfWeek)) - for _, dayOfWeek := range avmcMW.DaysOfWeek { - dayOfWeekStringValue := fwtypes.StringEnumValue(dayOfWeek.Name).StringValue - daysOfWeek = append(daysOfWeek, dayOfWeekStringValue) - } - setValueOfDaysOfWeek, _ := basetypes.NewSetValue(types.StringType, daysOfWeek) - daysOfWeekRead := fwtypes.SetValueOf[fwtypes.StringEnum[odbtypes.DayOfWeekName]]{ - SetValue: setValueOfDaysOfWeek, + computedMW := cloudAutonomousVmClusterMaintenanceWindowResourceModel{} + if avmcMW.DaysOfWeek != nil { + daysOfWeek := make([]attr.Value, 0, len(avmcMW.DaysOfWeek)) + for _, dayOfWeek := range avmcMW.DaysOfWeek { + dayOfWeekStringValue := fwtypes.StringEnumValue(dayOfWeek.Name).StringValue + daysOfWeek = append(daysOfWeek, dayOfWeekStringValue) + } + + setValueOfDaysOfWeek, _ := basetypes.NewSetValue(types.StringType, daysOfWeek) + daysOfWeekRead := fwtypes.SetValueOf[fwtypes.StringEnum[odbtypes.DayOfWeekName]]{ + SetValue: setValueOfDaysOfWeek, + } + computedMW.DaysOfWeek = daysOfWeekRead } + //hours of the day - hoursOfTheDay := make([]attr.Value, 0, len(avmcMW.HoursOfDay)) - for _, hourOfTheDay := range avmcMW.HoursOfDay { - daysOfWeekInt32Value := types.Int32Value(hourOfTheDay) - hoursOfTheDay = append(hoursOfTheDay, daysOfWeekInt32Value) - } - setValuesOfHoursOfTheDay, _ := basetypes.NewSetValue(types.Int32Type, hoursOfTheDay) - hoursOfTheDayRead := fwtypes.SetValueOf[types.Int32]{ - SetValue: setValuesOfHoursOfTheDay, - } - //monts - months := make([]attr.Value, 0, len(avmcMW.Months)) - for _, month := range avmcMW.Months { - monthStringValue := fwtypes.StringEnumValue(month.Name).StringValue - months = append(months, monthStringValue) + if avmcMW.HoursOfDay != nil { + hoursOfTheDay := make([]attr.Value, 0, len(avmcMW.HoursOfDay)) + for _, hourOfTheDay := range avmcMW.HoursOfDay { + daysOfWeekInt32Value := types.Int32Value(hourOfTheDay) + hoursOfTheDay = append(hoursOfTheDay, daysOfWeekInt32Value) + } + setValuesOfHoursOfTheDay, _ := basetypes.NewSetValue(types.Int32Type, hoursOfTheDay) + hoursOfTheDayRead := fwtypes.SetValueOf[types.Int32]{ + SetValue: setValuesOfHoursOfTheDay, + } + computedMW.HoursOfDay = hoursOfTheDayRead } - setValuesOfMonth, _ := basetypes.NewSetValue(types.StringType, months) - monthsRead := fwtypes.SetValueOf[fwtypes.StringEnum[odbtypes.MonthName]]{ - SetValue: setValuesOfMonth, + + //months + if avmcMW.Months != nil { + months := make([]attr.Value, 0, len(avmcMW.Months)) + for _, month := range avmcMW.Months { + monthStringValue := fwtypes.StringEnumValue(month.Name).StringValue + months = append(months, monthStringValue) + } + setValuesOfMonth, _ := basetypes.NewSetValue(types.StringType, months) + monthsRead := fwtypes.SetValueOf[fwtypes.StringEnum[odbtypes.MonthName]]{ + SetValue: setValuesOfMonth, + } + computedMW.Months = monthsRead } + //weeks of month - weeksOfMonth := make([]attr.Value, 0, len(avmcMW.WeeksOfMonth)) - for _, weekOfMonth := range avmcMW.WeeksOfMonth { - weeksOfMonthInt32Value := types.Int32Value(weekOfMonth) - weeksOfMonth = append(weeksOfMonth, weeksOfMonthInt32Value) - } - setValuesOfWeekOfMonth, _ := basetypes.NewSetValue(types.Int32Type, weeksOfMonth) - weeksOfMonthRead := fwtypes.SetValueOf[types.Int32]{ - SetValue: setValuesOfWeekOfMonth, + if avmcMW.WeeksOfMonth != nil { + weeksOfMonth := make([]attr.Value, 0, len(avmcMW.WeeksOfMonth)) + for _, weekOfMonth := range avmcMW.WeeksOfMonth { + weeksOfMonthInt32Value := types.Int32Value(weekOfMonth) + weeksOfMonth = append(weeksOfMonth, weeksOfMonthInt32Value) + } + setValuesOfWeekOfMonth, _ := basetypes.NewSetValue(types.Int32Type, weeksOfMonth) + weeksOfMonthRead := fwtypes.SetValueOf[types.Int32]{ + SetValue: setValuesOfWeekOfMonth, + } + computedMW.WeeksOfMonth = weeksOfMonthRead } - computedMW := cloudAutonomousVmClusterMaintenanceWindowResourceModel{ - DaysOfWeek: daysOfWeekRead, - HoursOfDay: hoursOfTheDayRead, - LeadTimeInWeeks: types.Int32PointerValue(avmcMW.LeadTimeInWeeks), - Months: monthsRead, - Preference: fwtypes.StringEnumValue(avmcMW.Preference), - WeeksOfMonth: weeksOfMonthRead, - } + computedMW.LeadTimeInWeeks = types.Int32PointerValue(avmcMW.LeadTimeInWeeks) + computedMW.Preference = fwtypes.StringEnumValue(avmcMW.Preference) + result, _ := fwtypes.NewObjectValueOf[cloudAutonomousVmClusterMaintenanceWindowResourceModel](ctx, &computedMW) return result } @@ -834,7 +867,7 @@ type cloudAutonomousVmClusterResourceModel struct { CpuCoreCount types.Int32 `tfsdk:"cpu_core_count"` CpuCoreCountPerNode types.Int32 `tfsdk:"cpu_core_count_per_node"` CpuPercentage types.Float32 `tfsdk:"cpu_percentage"` - CreatedAt types.String `tfsdk:"created_at"` + CreatedAt types.String `tfsdk:"created_at" autoflex:",noflatten"` DataStorageSizeInGBs types.Float64 `tfsdk:"data_storage_size_in_gbs"` DataStorageSizeInTBs types.Float64 `tfsdk:"data_storage_size_in_tbs"` DbNodeStorageSizeInGBs types.Int32 `tfsdk:"odb_node_storage_size_in_gbs"` @@ -875,7 +908,7 @@ type cloudAutonomousVmClusterResourceModel struct { TagsAll tftags.Map `tfsdk:"tags_all"` TimeOrdsCertificateExpires types.String `tfsdk:"time_ords_certificate_expires"` TimeDatabaseSslCertificateExpires types.String `tfsdk:"time_database_ssl_certificate_expires"` - MaintenanceWindow fwtypes.ObjectValueOf[cloudAutonomousVmClusterMaintenanceWindowResourceModel] `tfsdk:"maintenance_window"` + MaintenanceWindow fwtypes.ObjectValueOf[cloudAutonomousVmClusterMaintenanceWindowResourceModel] `tfsdk:"maintenance_window" autoflex:"-"` } type cloudAutonomousVmClusterMaintenanceWindowResourceModel struct { diff --git a/internal/service/odb/cloud_autonomous_vm_cluster_data_source.go b/internal/service/odb/cloud_autonomous_vm_cluster_data_source.go index e2e96bcc7cd6..8dbcc11a4753 100644 --- a/internal/service/odb/cloud_autonomous_vm_cluster_data_source.go +++ b/internal/service/odb/cloud_autonomous_vm_cluster_data_source.go @@ -266,13 +266,10 @@ func (d *dataSourceCloudAutonomousVmCluster) Read(ctx context.Context, req datas if tagsRead != nil { data.Tags = tftags.FlattenStringValueMap(ctx, tagsRead.Map()) } - if out.CloudAutonomousVmCluster.MaintenanceWindow != nil { - data.MaintenanceWindow = mapToCloudAutonomousVmClusterMaintenanceWindowDataSourceModel(ctx, out.CloudAutonomousVmCluster.MaintenanceWindow) - } - resp.Diagnostics.Append(flex.Flatten(ctx, out.CloudAutonomousVmCluster, &data, flex.WithIgnoredFieldNamesAppend("CreatedAt"), - flex.WithIgnoredFieldNamesAppend("TimeOrdsCertificateExpires"), flex.WithIgnoredFieldNamesAppend("Tags"), - flex.WithIgnoredFieldNamesAppend("TimeDatabaseSslCertificateExpires"), flex.WithIgnoredFieldNamesAppend("MaintenanceWindow"))...) + data.MaintenanceWindow = d.flattenMaintenanceWindow(ctx, out.CloudAutonomousVmCluster.MaintenanceWindow) + + resp.Diagnostics.Append(flex.Flatten(ctx, out.CloudAutonomousVmCluster, &data)...) if resp.Diagnostics.HasError() { return } @@ -280,56 +277,68 @@ func (d *dataSourceCloudAutonomousVmCluster) Read(ctx context.Context, req datas resp.Diagnostics.Append(resp.State.Set(ctx, &data)...) } -func mapToCloudAutonomousVmClusterMaintenanceWindowDataSourceModel(ctx context.Context, avmcOdbTypeMW *odbtypes.MaintenanceWindow) fwtypes.ObjectValueOf[cloudAutonomousVmClusterMaintenanceWindowDataSourceModel] { +func (d *dataSourceCloudAutonomousVmCluster) flattenMaintenanceWindow(ctx context.Context, avmcMW *odbtypes.MaintenanceWindow) fwtypes.ObjectValueOf[cloudAutonomousVmClusterMaintenanceWindowDataSourceModel] { //days of week - daysOfWeek := make([]attr.Value, 0, len(avmcOdbTypeMW.DaysOfWeek)) - for _, dayOfWeek := range avmcOdbTypeMW.DaysOfWeek { - dayOfWeekStringValue := fwtypes.StringEnumValue(dayOfWeek.Name).StringValue - daysOfWeek = append(daysOfWeek, dayOfWeekStringValue) - } - setValueOfDaysOfWeek, _ := basetypes.NewSetValue(types.StringType, daysOfWeek) - daysOfWeekRead := fwtypes.SetValueOf[fwtypes.StringEnum[odbtypes.DayOfWeekName]]{ - SetValue: setValueOfDaysOfWeek, + computedMW := cloudAutonomousVmClusterMaintenanceWindowDataSourceModel{} + if avmcMW.DaysOfWeek != nil { + daysOfWeek := make([]attr.Value, 0, len(avmcMW.DaysOfWeek)) + for _, dayOfWeek := range avmcMW.DaysOfWeek { + dayOfWeekStringValue := fwtypes.StringEnumValue(dayOfWeek.Name).StringValue + daysOfWeek = append(daysOfWeek, dayOfWeekStringValue) + } + + setValueOfDaysOfWeek, _ := basetypes.NewSetValue(types.StringType, daysOfWeek) + daysOfWeekRead := fwtypes.SetValueOf[fwtypes.StringEnum[odbtypes.DayOfWeekName]]{ + SetValue: setValueOfDaysOfWeek, + } + computedMW.DaysOfWeek = daysOfWeekRead } + //hours of the day - hoursOfTheDay := make([]attr.Value, 0, len(avmcOdbTypeMW.HoursOfDay)) - for _, hourOfTheDay := range avmcOdbTypeMW.HoursOfDay { - daysOfWeekInt32Value := types.Int32Value(hourOfTheDay) - hoursOfTheDay = append(hoursOfTheDay, daysOfWeekInt32Value) - } - setValuesOfHoursOfTheDay, _ := basetypes.NewSetValue(types.Int32Type, hoursOfTheDay) - hoursOfTheDayRead := fwtypes.SetValueOf[types.Int32]{ - SetValue: setValuesOfHoursOfTheDay, + if avmcMW.HoursOfDay != nil { + hoursOfTheDay := make([]attr.Value, 0, len(avmcMW.HoursOfDay)) + for _, hourOfTheDay := range avmcMW.HoursOfDay { + daysOfWeekInt32Value := types.Int32Value(hourOfTheDay) + hoursOfTheDay = append(hoursOfTheDay, daysOfWeekInt32Value) + } + setValuesOfHoursOfTheDay, _ := basetypes.NewSetValue(types.Int32Type, hoursOfTheDay) + hoursOfTheDayRead := fwtypes.SetValueOf[types.Int32]{ + SetValue: setValuesOfHoursOfTheDay, + } + computedMW.HoursOfDay = hoursOfTheDayRead } - //monts - months := make([]attr.Value, 0, len(avmcOdbTypeMW.Months)) - for _, month := range avmcOdbTypeMW.Months { - monthStringValue := fwtypes.StringEnumValue(month.Name).StringValue - months = append(months, monthStringValue) - } - setValuesOfMonth, _ := basetypes.NewSetValue(types.StringType, months) - monthsRead := fwtypes.SetValueOf[fwtypes.StringEnum[odbtypes.MonthName]]{ - SetValue: setValuesOfMonth, + + //months + if avmcMW.Months != nil { + months := make([]attr.Value, 0, len(avmcMW.Months)) + for _, month := range avmcMW.Months { + monthStringValue := fwtypes.StringEnumValue(month.Name).StringValue + months = append(months, monthStringValue) + } + setValuesOfMonth, _ := basetypes.NewSetValue(types.StringType, months) + monthsRead := fwtypes.SetValueOf[fwtypes.StringEnum[odbtypes.MonthName]]{ + SetValue: setValuesOfMonth, + } + computedMW.Months = monthsRead } + //weeks of month - weeksOfMonth := make([]attr.Value, 0, len(avmcOdbTypeMW.WeeksOfMonth)) - for _, weekOfMonth := range avmcOdbTypeMW.WeeksOfMonth { - weeksOfMonthInt32Value := types.Int32Value(weekOfMonth) - weeksOfMonth = append(weeksOfMonth, weeksOfMonthInt32Value) - } - setValuesOfWeekOfMonth, _ := basetypes.NewSetValue(types.Int32Type, weeksOfMonth) - weeksOfMonthRead := fwtypes.SetValueOf[types.Int32]{ - SetValue: setValuesOfWeekOfMonth, + if avmcMW.WeeksOfMonth != nil { + weeksOfMonth := make([]attr.Value, 0, len(avmcMW.WeeksOfMonth)) + for _, weekOfMonth := range avmcMW.WeeksOfMonth { + weeksOfMonthInt32Value := types.Int32Value(weekOfMonth) + weeksOfMonth = append(weeksOfMonth, weeksOfMonthInt32Value) + } + setValuesOfWeekOfMonth, _ := basetypes.NewSetValue(types.Int32Type, weeksOfMonth) + weeksOfMonthRead := fwtypes.SetValueOf[types.Int32]{ + SetValue: setValuesOfWeekOfMonth, + } + computedMW.WeeksOfMonth = weeksOfMonthRead } - computedMW := cloudAutonomousVmClusterMaintenanceWindowDataSourceModel{ - DaysOfWeek: daysOfWeekRead, - HoursOfDay: hoursOfTheDayRead, - LeadTimeInWeeks: types.Int32PointerValue(avmcOdbTypeMW.LeadTimeInWeeks), - Months: monthsRead, - Preference: fwtypes.StringEnumValue(avmcOdbTypeMW.Preference), - WeeksOfMonth: weeksOfMonthRead, - } + computedMW.LeadTimeInWeeks = types.Int32PointerValue(avmcMW.LeadTimeInWeeks) + computedMW.Preference = fwtypes.StringEnumValue(avmcMW.Preference) + result, _ := fwtypes.NewObjectValueOf[cloudAutonomousVmClusterMaintenanceWindowDataSourceModel](ctx, &computedMW) return result } @@ -348,7 +357,7 @@ type cloudAutonomousVmClusterDataSourceModel struct { CpuCoreCount types.Int32 `tfsdk:"cpu_core_count"` CpuCoreCountPerNode types.Int32 `tfsdk:"cpu_core_count_per_node"` CpuPercentage types.Float32 `tfsdk:"cpu_percentage"` - CreatedAt types.String `tfsdk:"created_at"` + CreatedAt types.String `tfsdk:"created_at" autoflex:",noflatten"` DataStorageSizeInGBs types.Float64 `tfsdk:"data_storage_size_in_gbs"` DataStorageSizeInTBs types.Float64 `tfsdk:"data_storage_size_in_tbs"` DbNodeStorageSizeInGBs types.Int32 `tfsdk:"odb_node_storage_size_in_gbs"` @@ -380,13 +389,13 @@ type cloudAutonomousVmClusterDataSourceModel struct { Shape types.String `tfsdk:"shape"` Status fwtypes.StringEnum[odbtypes.ResourceStatus] `tfsdk:"status"` StatusReason types.String `tfsdk:"reason"` - TimeDatabaseSslCertificateExpires types.String `tfsdk:"time_database_ssl_certificate_expires"` - TimeOrdsCertificateExpires types.String `tfsdk:"time_ords_certificate_expires"` + TimeDatabaseSslCertificateExpires types.String `tfsdk:"time_database_ssl_certificate_expires" autoflex:",noflatten"` + TimeOrdsCertificateExpires types.String `tfsdk:"time_ords_certificate_expires" autoflex:",noflatten"` TimeZone types.String `tfsdk:"time_zone"` TotalAutonomousDataStorageInTBs types.Float32 `tfsdk:"total_autonomous_data_storage_in_tbs"` TotalContainerDatabases types.Int32 `tfsdk:"total_container_databases"` TotalCpus types.Float32 `tfsdk:"total_cpus"` - MaintenanceWindow fwtypes.ObjectValueOf[cloudAutonomousVmClusterMaintenanceWindowDataSourceModel] `tfsdk:"maintenance_window"` + MaintenanceWindow fwtypes.ObjectValueOf[cloudAutonomousVmClusterMaintenanceWindowDataSourceModel] `tfsdk:"maintenance_window" autoflex:",noflatten"` Tags tftags.Map `tfsdk:"tags"` } type cloudAutonomousVmClusterMaintenanceWindowDataSourceModel struct { diff --git a/internal/service/odb/cloud_autonomous_vm_cluster_data_source_test.go b/internal/service/odb/cloud_autonomous_vm_cluster_data_source_test.go index 362265dc2825..3729250062bb 100644 --- a/internal/service/odb/cloud_autonomous_vm_cluster_data_source_test.go +++ b/internal/service/odb/cloud_autonomous_vm_cluster_data_source_test.go @@ -4,8 +4,17 @@ package odb_test import ( + "context" + "errors" "fmt" + "github.com/aws/aws-sdk-go-v2/service/odb" + odbtypes "github.com/aws/aws-sdk-go-v2/service/odb/types" + sdkacctest "github.com/hashicorp/terraform-plugin-testing/helper/acctest" "github.com/hashicorp/terraform-plugin-testing/terraform" + "github.com/hashicorp/terraform-provider-aws/internal/conns" + "github.com/hashicorp/terraform-provider-aws/internal/create" + tfodb "github.com/hashicorp/terraform-provider-aws/internal/service/odb" + "github.com/hashicorp/terraform-provider-aws/internal/tfresource" "testing" "github.com/hashicorp/terraform-plugin-testing/helper/resource" @@ -13,48 +22,166 @@ import ( "github.com/hashicorp/terraform-provider-aws/names" ) +type autonomousVMClusterDSTest struct { + exaInfraDisplayNamePrefix string + odbNetDisplayNamePrefix string + autonomousVmClusterDisplayNamePrefix string +} + +var autonomousVMClusterDSTestEntity = autonomousVMClusterDSTest{ + exaInfraDisplayNamePrefix: "Ofake-exa", + odbNetDisplayNamePrefix: "odb-net", + autonomousVmClusterDisplayNamePrefix: "Ofake-avmc", +} + func TestAccODBCloudAutonomousVmClusterDataSource_basic(t *testing.T) { ctx := acctest.Context(t) if testing.Short() { t.Skip("skipping long-running test in short mode") } - - dataSourceName := "basicExaInfraDataSource.aws_odb_cloud_autonomous_vm_cluster.test" - + var avmc1 odbtypes.CloudAutonomousVmCluster + dataSourceName := "data.aws_odb_cloud_autonomous_vm_cluster.test" + avmcDisplayName := sdkacctest.RandomWithPrefix(autonomousVMClusterDSTestEntity.autonomousVmClusterDisplayNamePrefix) + //odbDisplayNamePrefix := sdkacctest.RandomWithPrefix(autonomousVMClusterDSTestEntity.odbNetDisplayNamePrefix) + //exaDisplayName := sdkacctest.RandomWithPrefix(autonomousVMClusterDSTestEntity.exaInfraDisplayNamePrefix) resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { acctest.PreCheck(ctx, t) - //acctest.PreCheckPartitionHasService(t, names.ODBEndpointID) - //testAccPreCheck(ctx, t) + autonomousVMClusterDSTestEntity.testAccPreCheck(ctx, t) }, ErrorCheck: acctest.ErrorCheck(t, names.ODBServiceID), ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, - //CheckDestroy: testAccCheckCloudAutonomousVmClusterDestroy(ctx), + CheckDestroy: autonomousVMClusterDSTestEntity.testAccCheckCloudAutonomousVmClusterDestroy(ctx), Steps: []resource.TestStep{ { - Config: basicHardcodedAVmCluster("avmc_yhqyltpw6m"), + Config: autonomousVMClusterDSTestEntity.basicHardcodedAVmCluster("exa_ji5quxxzn9", "odbnet_c91byo6y6m", avmcDisplayName), Check: resource.ComposeAggregateTestCheckFunc( - resource.ComposeTestCheckFunc(func(state *terraform.State) error { - fmt.Println(state) - return nil - }), - resource.TestCheckResourceAttr(dataSourceName, "display_name", "Real-AVMC-CONN-001"), - //acctest.MatchResourceAttrRegionalARN(ctx, dataSourceName, names.AttrARN, "odb", regexache.MustCompile(`cloudautonomousvmcluster:.+$`)), + autonomousVMClusterDSTestEntity.checkCloudAutonomousVmClusterExists(ctx, dataSourceName, &avmc1), + resource.TestCheckResourceAttr(dataSourceName, "display_name", avmcDisplayName), ), }, }, }) } +func (autonomousVMClusterDSTest) checkCloudAutonomousVmClusterExists(ctx context.Context, name string, cloudAutonomousVMCluster *odbtypes.CloudAutonomousVmCluster) resource.TestCheckFunc { + return func(s *terraform.State) error { + rs, ok := s.RootModule().Resources[name] + if !ok { + return create.Error(names.ODB, create.ErrActionCheckingExistence, tfodb.ResNameCloudAutonomousVmCluster, name, errors.New("not found")) + } + + if rs.Primary.ID == "" { + return create.Error(names.ODB, create.ErrActionCheckingExistence, tfodb.ResNameCloudAutonomousVmCluster, name, errors.New("not set")) + } + + conn := acctest.Provider.Meta().(*conns.AWSClient).ODBClient(ctx) + fmt.Println("") + resp, err := autonomousVMClusterResourceTest{}.findVMC(ctx, conn, rs.Primary.ID) + if err != nil { + return create.Error(names.ODB, create.ErrActionCheckingExistence, tfodb.ResNameCloudAutonomousVmCluster, rs.Primary.ID, err) + } + + *cloudAutonomousVMCluster = *resp -func basicHardcodedAVmCluster(id string) string { + return nil + } +} +func (autonomousVMClusterDSTest) testAccCheckCloudAutonomousVmClusterDestroy(ctx context.Context) resource.TestCheckFunc { + return func(s *terraform.State) error { + conn := acctest.Provider.Meta().(*conns.AWSClient).ODBClient(ctx) + + for _, rs := range s.RootModule().Resources { + if rs.Type != "aws_odb_cloud_autonomous_vm_cluster" { + continue + } + + _, err := tfodb.FindCloudAutonomousVmClusterByID(ctx, conn, rs.Primary.ID) + if tfresource.NotFound(err) { + return nil + } + if err != nil { + return create.Error(names.ODB, create.ErrActionCheckingDestroyed, tfodb.ResNameCloudAutonomousVmCluster, rs.Primary.ID, err) + } + + return create.Error(names.ODB, create.ErrActionCheckingDestroyed, tfodb.ResNameCloudAutonomousVmCluster, rs.Primary.ID, errors.New("not destroyed")) + } + + return nil + } +} +func (autonomousVMClusterDSTest) testAccPreCheck(ctx context.Context, t *testing.T) { + conn := acctest.Provider.Meta().(*conns.AWSClient).ODBClient(ctx) + + input := &odb.ListCloudAutonomousVmClustersInput{} + + _, err := conn.ListCloudAutonomousVmClusters(ctx, input) + + if acctest.PreCheckSkipError(err) { + t.Skipf("skipping acceptance testing: %s", err) + } + if err != nil { + t.Fatalf("unexpected PreCheck error: %s", err) + } +} + +func (autonomousVMClusterDSTest) basicHardcodedAVmCluster(exaInfra, odbNetwork, avmcDisplayName string) string { avmcDataSource := fmt.Sprintf(` +resource "aws_odb_cloud_autonomous_vm_cluster" "test" { + cloud_exadata_infrastructure_id = %[1]q + odb_network_id = %[2]q + display_name = %[3]q + autonomous_data_storage_size_in_tbs = 5 + memory_per_oracle_compute_unit_in_gbs = 2 + total_container_databases = 1 + cpu_core_count_per_node = 4 + db_servers = ["dbs_7ecm4wbjxy","dbs_uy5wmaqk6s"] + scan_listener_port_tls = 1521 + scan_listener_port_non_tls = 2484 + maintenance_window = { + preference = "NO_PREFERENCE" + } -basicExaInfraDataSource "aws_odb_cloud_autonomous_vm_cluster" "test" { - id = %[1]q +} +data "aws_odb_cloud_autonomous_vm_cluster" "test" { + id = aws_odb_cloud_autonomous_vm_cluster.test.id } -`, id) - fmt.Println(avmcDataSource) +`, exaInfra, odbNetwork, avmcDisplayName) return avmcDataSource } +func (autonomousVMClusterDSTest) avmcBasic(exaInfra, odbNetwork, avmcDisplayName string) string { + res := fmt.Sprintf(` +resource "aws_odb_cloud_exadata_infrastructure" "test" { + display_name = %[1]q + shape = "Exadata.X9M" + storage_count = 3 + compute_count = 2 + availability_zone_id = "use1-az6" + customer_contacts_to_send_to_oci = ["abc@example.com"] + +} + +resource "aws_odb_network" "test" { + display_name = %[2]q + availability_zone_id = "use1-az6" + client_subnet_cidr = "10.2.0.0/24" + backup_subnet_cidr = "10.2.1.0/24" + s3_access = "DISABLED" + zero_etl_access = "DISABLED" + } + +resource "aws_odb_cloud_autonomous_vm_cluster" "test" { + display_name = %[3]q + cloud_exadata_infrastructure_id = aws_odb_cloud_exadata_infrastructure.test.id + odb_network_id = aws_odb_network.test.id + autonomous_data_storage_size_in_tbs = 5 + memory_per_oracle_compute_unit_in_gbs = 2 + total_container_databases = 1 + cpu_core_count_per_node = 4 + +} +`, exaInfra, odbNetwork, avmcDisplayName) + + return res +} diff --git a/internal/service/odb/cloud_autonomous_vm_cluster_test.go b/internal/service/odb/cloud_autonomous_vm_cluster_test.go index 9dd1f99efab9..0ca3ff400d7e 100644 --- a/internal/service/odb/cloud_autonomous_vm_cluster_test.go +++ b/internal/service/odb/cloud_autonomous_vm_cluster_test.go @@ -57,11 +57,11 @@ func TestAccODBCloudAutonomousVmClusterCreationBasic(t *testing.T) { PreCheck: func() { acctest.PreCheck(ctx, t) //acctest.PreCheckPartitionHasService(t, names.ODBServiceID) - //testAccPreCheck(ctx, t) + autonomousVMClusterTest.testAccPreCheck(ctx, t) }, ErrorCheck: acctest.ErrorCheck(t, names.ODBServiceID), ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, - CheckDestroy: testAccCheckCloudAutonomousVmClusterDestroy(ctx), + CheckDestroy: autonomousVMClusterTest.testAccCheckCloudAutonomousVmClusterDestroy(ctx), Steps: []resource.TestStep{ { Config: autonomousVMClusterTest.avmcWithMandatoryParamsOnly(autonomousVMClusterTest.exaInfra(exaDisplayName), autonomousVMClusterTest.odbNetwork(odbDisplayNamePrefix), avmcDisplayName), @@ -99,7 +99,7 @@ func TestAccODBCloudAutonomousVmClusterTagging(t *testing.T) { }, ErrorCheck: acctest.ErrorCheck(t, names.ODBServiceID), ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, - CheckDestroy: testAccCheckCloudAutonomousVmClusterDestroy(ctx), + CheckDestroy: autonomousVMClusterTest.testAccCheckCloudAutonomousVmClusterDestroy(ctx), Steps: []resource.TestStep{ { Config: autonomousVMClusterTest.avmcWithMandatoryParamsWithTag(autonomousVMClusterTest.exaInfra(exaDisplayName), autonomousVMClusterTest.odbNetwork(odbDisplayNamePrefix), avmcDisplayName), @@ -149,11 +149,11 @@ func TestAccODBCloudAutonomousVmCluster_disappears(t *testing.T) { PreCheck: func() { acctest.PreCheck(ctx, t) //acctest.PreCheckPartitionHasService(t, names.ODBServiceID) - //testAccPreCheck(ctx, t) + autonomousVMClusterTest.testAccPreCheck(ctx, t) }, ErrorCheck: acctest.ErrorCheck(t, names.ODBServiceID), ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, - CheckDestroy: testAccCheckCloudAutonomousVmClusterDestroy(ctx), + CheckDestroy: autonomousVMClusterTest.testAccCheckCloudAutonomousVmClusterDestroy(ctx), Steps: []resource.TestStep{ { Config: autonomousVMClusterTest.avmcWithMandatoryParamsOnly(autonomousVMClusterTest.exaInfra(exaDisplayName), autonomousVMClusterTest.odbNetwork(odbDisplayNamePrefix), avmcDisplayName), @@ -167,7 +167,21 @@ func TestAccODBCloudAutonomousVmCluster_disappears(t *testing.T) { }) } -func testAccCheckCloudAutonomousVmClusterDestroy(ctx context.Context) resource.TestCheckFunc { +func (autonomousVMClusterResourceTest) testAccPreCheck(ctx context.Context, t *testing.T) { + conn := acctest.Provider.Meta().(*conns.AWSClient).ODBClient(ctx) + + input := &odb.ListCloudAutonomousVmClustersInput{} + + _, err := conn.ListCloudAutonomousVmClusters(ctx, input) + + if acctest.PreCheckSkipError(err) { + t.Skipf("skipping acceptance testing: %s", err) + } + if err != nil { + t.Fatalf("unexpected PreCheck error: %s", err) + } +} +func (autonomousVMClusterResourceTest) testAccCheckCloudAutonomousVmClusterDestroy(ctx context.Context) resource.TestCheckFunc { return func(s *terraform.State) error { conn := acctest.Provider.Meta().(*conns.AWSClient).ODBClient(ctx) diff --git a/internal/service/odb/cloud_exadata_infrastructure_test.go b/internal/service/odb/cloud_exadata_infrastructure_test.go index 09627b089939..db367fbf3dd9 100644 --- a/internal/service/odb/cloud_exadata_infrastructure_test.go +++ b/internal/service/odb/cloud_exadata_infrastructure_test.go @@ -329,20 +329,6 @@ func (cloudExaDataInfraResourceTest) testAccPreCheck(ctx context.Context, t *tes t.Fatalf("unexpected PreCheck error: %s", err) } } -func testAccPreCheck(ctx context.Context, t *testing.T) { - conn := acctest.Provider.Meta().(*conns.AWSClient).ODBClient(ctx) - - input := &odb.ListCloudExadataInfrastructuresInput{} - - _, err := conn.ListCloudExadataInfrastructures(ctx, input) - - if acctest.PreCheckSkipError(err) { - t.Skipf("skipping acceptance testing: %s", err) - } - if err != nil { - t.Fatalf("unexpected PreCheck error: %s", err) - } -} /* func testAccCheckCloudExadataInfrastructureNotRecreated(before, after *odb.DescribeCloudExadataInfrastructureResponse) resource.TestCheckFunc { diff --git a/internal/service/odb/cloud_vm_cluster_test.go b/internal/service/odb/cloud_vm_cluster_test.go index 603014f263a1..636acd6eb737 100644 --- a/internal/service/odb/cloud_vm_cluster_test.go +++ b/internal/service/odb/cloud_vm_cluster_test.go @@ -487,6 +487,17 @@ resource "aws_odb_cloud_exadata_infrastructure" "test" { compute_count = 2 availability_zone_id = "use1-az6" customer_contacts_to_send_to_oci = ["abc@example.com"] + maintenance_window = { + custom_action_timeout_in_mins = 16 + days_of_week = [] + hours_of_day = [] + is_custom_action_timeout_enabled = true + lead_time_in_weeks = 0 + months = [] + patching_mode = "ROLLING" + preference = "NO_PREFERENCE" + weeks_of_month =[] + } } `, rName) diff --git a/internal/service/odb/gi_versions_list_data_source.go b/internal/service/odb/gi_versions_list_data_source.go new file mode 100644 index 000000000000..e0f6189e1dd4 --- /dev/null +++ b/internal/service/odb/gi_versions_list_data_source.go @@ -0,0 +1,98 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +package odb + +import ( + "context" + + "github.com/aws/aws-sdk-go-v2/service/odb" + + "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/create" + "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/names" +) + +// Function annotations are used for datasource registration to the Provider. DO NOT EDIT. +// @FrameworkDataSource("aws_odb_gi_versions_list", name="Gi Versions List") +func newDataSourceGiVersionsList(context.Context) (datasource.DataSourceWithConfigure, error) { + return &dataSourceGiVersionsList{}, nil +} + +const ( + DSNameGiVersionsList = "Gi Versions List Data Source" +) + +type dataSourceGiVersionsList struct { + framework.DataSourceWithModel[giVersionDataSourceModel] +} + +func (d *dataSourceGiVersionsList) Schema(ctx context.Context, req datasource.SchemaRequest, resp *datasource.SchemaResponse) { + resp.Schema = schema.Schema{ + Attributes: map[string]schema.Attribute{ + "shape": schema.StringAttribute{ + Optional: true, + Description: "The system shape.", + }, + }, + Blocks: map[string]schema.Block{ + "gi_versions": schema.ListNestedBlock{ + Description: "List of GI Versions.", + CustomType: fwtypes.NewListNestedObjectTypeOf[giVersionSummaryModel](ctx), + NestedObject: schema.NestedBlockObject{ + Attributes: map[string]schema.Attribute{ + "version": schema.StringAttribute{ + Computed: true, + }, + }, + }, + }, + }, + } +} + +func (d *dataSourceGiVersionsList) Read(ctx context.Context, req datasource.ReadRequest, resp *datasource.ReadResponse) { + + conn := d.Meta().ODBClient(ctx) + + var data giVersionDataSourceModel + resp.Diagnostics.Append(req.Config.Get(ctx, &data)...) + if resp.Diagnostics.HasError() { + return + } + + var input odb.ListGiVersionsInput + if !data.Shape.IsNull() { + input.Shape = data.Shape.ValueStringPointer() + } + out, err := conn.ListGiVersions(ctx, &input) + if err != nil { + resp.Diagnostics.AddError( + create.ProblemStandardMessage(names.ODB, create.ErrActionReading, DSNameGiVersionsList, "", err), + err.Error(), + ) + return + } + + resp.Diagnostics.Append(flex.Flatten(ctx, out, &data)...) + if resp.Diagnostics.HasError() { + return + } + + resp.Diagnostics.Append(resp.State.Set(ctx, &data)...) +} + +type giVersionDataSourceModel struct { + framework.WithRegionModel + GiVersions fwtypes.ListNestedObjectValueOf[giVersionSummaryModel] `tfsdk:"gi_versions"` + Shape types.String `tfsdk:"shape"` +} + +type giVersionSummaryModel struct { + Version types.String `tfsdk:"version"` +} diff --git a/internal/service/odb/gi_versions_list_data_source_test.go b/internal/service/odb/gi_versions_list_data_source_test.go new file mode 100644 index 000000000000..b1b41aedf406 --- /dev/null +++ b/internal/service/odb/gi_versions_list_data_source_test.go @@ -0,0 +1,72 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +package odb_test + +import ( + "fmt" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-provider-aws/internal/acctest" + "github.com/hashicorp/terraform-provider-aws/names" + "testing" +) + +func TestAccGiVersionsListDataSource_basicX9M(t *testing.T) { + ctx := acctest.Context(t) + + if testing.Short() { + t.Skip("skipping long-running test in short mode") + } + dataSourceName := "data.aws_odb_gi_versions_list.test" + + resource.Test(t, resource.TestCase{ + PreCheck: func() { + acctest.PreCheck(ctx, t) + }, + ErrorCheck: acctest.ErrorCheck(t, names.ODBServiceID), + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + Steps: []resource.TestStep{ + { + Config: testAccGiVersionsListeConfig_basic("Exadata.X9M"), + Check: resource.ComposeAggregateTestCheckFunc( + resource.TestCheckResourceAttr(dataSourceName, "gi_versions.#", "2"), + ), + }, + }, + }) + +} + +func TestAccGiVersionsListDataSource_basicX11M(t *testing.T) { + ctx := acctest.Context(t) + + if testing.Short() { + t.Skip("skipping long-running test in short mode") + } + dataSourceName := "data.aws_odb_gi_versions_list.test" + + resource.Test(t, resource.TestCase{ + PreCheck: func() { + acctest.PreCheck(ctx, t) + }, + ErrorCheck: acctest.ErrorCheck(t, names.ODBServiceID), + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + Steps: []resource.TestStep{ + { + Config: testAccGiVersionsListeConfig_basic("Exadata.X11M"), + Check: resource.ComposeAggregateTestCheckFunc( + resource.TestCheckResourceAttr(dataSourceName, "gi_versions.#", "2"), + ), + }, + }, + }) +} + +func testAccGiVersionsListeConfig_basic(shape string) string { + return fmt.Sprintf(` + +data "aws_odb_gi_versions_list" "test" { + shape = %[1]q +} +`, shape) +} diff --git a/internal/service/odb/service_package.go b/internal/service/odb/service_package.go index 5165ae6c4b77..ddcef3564082 100644 --- a/internal/service/odb/service_package.go +++ b/internal/service/odb/service_package.go @@ -4,6 +4,7 @@ import ( "context" "github.com/aws/aws-sdk-go-v2/aws" "github.com/aws/aws-sdk-go-v2/service/odb" + "github.com/hashicorp/terraform-plugin-log/tflog" "github.com/hashicorp/terraform-provider-aws/names" ) @@ -13,6 +14,16 @@ func (p *servicePackage) NewClient(ctx context.Context, config map[string]any) ( return odb.NewFromConfig(cfg, odb.WithEndpointResolverV2(newEndpointResolverV2()), withBaseEndpoint(config[names.AttrEndpoint].(string)), - func(o *odb.Options) {}, + func(o *odb.Options) { //if config["partition"].(string) == names.StandardPartitionID { + if cfg.Region != "\"us-east-1\"" { + tflog.Info(ctx, "overriding region", map[string]any{ + "original_region": cfg.Region, + "override_region": "us-east-1", + }) + o.Region = "us-east-1" + } + //} + o.BaseEndpoint = aws.String("https://gammaiad.capi.us-east-1.oracolo.alameda.aws.dev") + }, ), nil } diff --git a/internal/service/odb/service_package_gen.go b/internal/service/odb/service_package_gen.go index 517e89cbe52d..1b10bd698992 100644 --- a/internal/service/odb/service_package_gen.go +++ b/internal/service/odb/service_package_gen.go @@ -39,6 +39,12 @@ func (p *servicePackage) FrameworkDataSources(ctx context.Context) []*inttypes.S Name: "Db Servers List", Region: unique.Make(inttypes.ResourceRegionDefault()), }, + { + Factory: newDataSourceGiVersionsList, + TypeName: "aws_odb_gi_versions_list", + Name: "Gi Versions List", + Region: unique.Make(inttypes.ResourceRegionDefault()), + }, { Factory: newDataSourceNetwork, TypeName: "aws_odb_network", From 4cd57529d7f42ae54c10ab6c2c3002a2819e07c2 Mon Sep 17 00:00:00 2001 From: Asim Date: Tue, 15 Jul 2025 09:32:45 +0100 Subject: [PATCH 353/365] AVMC schema change,gi version --- .../odb/cloud_autonomous_vm_cluster.go | 264 ++++++------------ ...cloud_autonomous_vm_cluster_data_source.go | 102 +++---- ..._autonomous_vm_cluster_data_source_test.go | 14 +- .../odb/cloud_exadata_infrastructure.go | 104 ++----- 4 files changed, 152 insertions(+), 332 deletions(-) diff --git a/internal/service/odb/cloud_autonomous_vm_cluster.go b/internal/service/odb/cloud_autonomous_vm_cluster.go index 6ef15ac21a29..25add3e3982a 100644 --- a/internal/service/odb/cloud_autonomous_vm_cluster.go +++ b/internal/service/odb/cloud_autonomous_vm_cluster.go @@ -6,7 +6,6 @@ package odb import ( "context" "errors" - "fmt" "github.com/hashicorp/terraform-plugin-framework-validators/stringvalidator" "github.com/hashicorp/terraform-plugin-framework/attr" "github.com/hashicorp/terraform-plugin-framework/resource/schema/boolplanmodifier" @@ -264,19 +263,12 @@ func (r *resourceCloudAutonomousVmCluster) Schema(ctx context.Context, req resou stringplanmodifier.UseStateForUnknown(), }, }, - "total_autonomous_data_storage_in_tbs": schema.Float32Attribute{ - Computed: true, - Optional: true, - }, "total_container_databases": schema.Int32Attribute{ Required: true, PlanModifiers: []planmodifier.Int32{ int32planmodifier.RequiresReplace(), }, }, - "total_cpus": schema.Float32Attribute{ - Computed: true, - }, "time_ords_certificate_expires": schema.StringAttribute{ Computed: true, }, @@ -284,8 +276,7 @@ func (r *resourceCloudAutonomousVmCluster) Schema(ctx context.Context, req resou Computed: true, }, "maintenance_window": schema.ObjectAttribute{ - Optional: true, - Computed: true, + Required: true, CustomType: fwtypes.NewObjectTypeOf[cloudAutonomousVmClusterMaintenanceWindowResourceModel](ctx), PlanModifiers: []planmodifier.Object{ objectplanmodifier.RequiresReplace(), @@ -321,7 +312,6 @@ func (r *resourceCloudAutonomousVmCluster) Schema(ctx context.Context, req resou } func (r *resourceCloudAutonomousVmCluster) Create(ctx context.Context, req resource.CreateRequest, resp *resource.CreateResponse) { - fmt.Println("Create called") conn := r.Meta().ODBClient(ctx) var plan cloudAutonomousVmClusterResourceModel @@ -331,18 +321,10 @@ func (r *resourceCloudAutonomousVmCluster) Create(ctx context.Context, req resou } input := odb.CreateCloudAutonomousVmClusterInput{ - ClientToken: aws.String(id.UniqueId()), - Tags: getTagsIn(ctx), - } - inputMW, err := r.expandMaintenanceWindow(ctx, plan.MaintenanceWindow) - if err != nil { - resp.Diagnostics.AddError( - create.ProblemStandardMessage(names.ODB, create.ErrActionCreating, ResNameCloudAutonomousVmCluster, plan.DisplayName.ValueString(), err), - err.Error(), - ) - return + ClientToken: aws.String(id.UniqueId()), + Tags: getTagsIn(ctx), + MaintenanceWindow: r.expandMaintenanceWindow(ctx, plan.MaintenanceWindow), } - input.MaintenanceWindow = inputMW resp.Diagnostics.Append(flex.Expand(ctx, plan, &input)...) if resp.Diagnostics.HasError() { return @@ -448,7 +430,7 @@ func (r *resourceCloudAutonomousVmCluster) Read(ctx context.Context, req resourc } func (r *resourceCloudAutonomousVmCluster) Update(ctx context.Context, req resource.UpdateRequest, resp *resource.UpdateResponse) { - fmt.Println("Update called") + var plan, state cloudAutonomousVmClusterResourceModel resp.Diagnostics.Append(req.Plan.Get(ctx, &plan)...) resp.Diagnostics.Append(req.State.Get(ctx, &state)...) @@ -491,60 +473,8 @@ func (r *resourceCloudAutonomousVmCluster) Update(ctx context.Context, req resou resp.Diagnostics.Append(resp.State.Set(ctx, &plan)...) } -func printAutonomousVmCluster(input cloudAutonomousVmClusterResourceModel) { - fmt.Println("\n Autonomous VM Cluster") - fmt.Println(" arn:", input.CloudAutonomousVmClusterArn.ValueString()) - fmt.Println("id:", input.CloudAutonomousVmClusterId.ValueString()) - fmt.Println("exa_infra_id:", input.CloudExadataInfrastructureId.ValueString()) - fmt.Println(" AutonomousDataStorageSizeInTBs:", input.AutonomousDataStorageSizeInTBs.ValueFloat64()) - fmt.Println("AvailableAutonomousDataStorageSizeInTBs:", input.AvailableAutonomousDataStorageSizeInTBs.ValueFloat64()) - fmt.Println("AvailableContainerDatabases:", input.AvailableContainerDatabases.ValueInt32()) - fmt.Println("AvailableCpus:", input.AvailableCpus.ValueFloat32()) - fmt.Println("ComputeModel:", input.ComputeModel.ValueString()) - fmt.Println("CpuCoreCount", input.CpuCoreCount.ValueInt32()) - fmt.Println("CpuCoreCountPerNode:", input.CpuCoreCountPerNode.ValueInt32()) - fmt.Println("CpuPercentage:", input.CpuPercentage.ValueFloat32()) - fmt.Println("CreatedAt", input.CreatedAt.ValueString()) - fmt.Println("DataStorageSizeInGBs:", input.DataStorageSizeInGBs.ValueFloat64()) - fmt.Println("DataStorageSizeInTBs", input.DataStorageSizeInTBs.ValueFloat64()) - fmt.Println("DbNodeStorageSizeInGBs:", input.DbNodeStorageSizeInGBs.ValueInt32()) - fmt.Println("DbServers", input.DbServers.String()) - fmt.Println("Description", input.Description.ValueString()) - fmt.Println("DisplayName", input.DisplayName.ValueString()) - fmt.Println("Domain:", input.Domain.ValueString()) - fmt.Println("ExadataStorageInTBsLowestScaledValue:", input.ExadataStorageInTBsLowestScaledValue.ValueFloat64()) - fmt.Println("Hostname", input.Hostname.ValueString()) - fmt.Println("IsMtlsEnabledVmCluster:", input.IsMtlsEnabledVmCluster.ValueBool()) - fmt.Println("LicenseModel", input.LicenseModel.ValueString()) - fmt.Println("MaxAcdsLowestScaledValue", input.MaxAcdsLowestScaledValue.ValueInt32()) - fmt.Println("MemoryPerOracleComputeUnitInGBs", input.MemoryPerOracleComputeUnitInGBs.ValueInt32()) - fmt.Println("MemorySizeInGBs", input.MemorySizeInGBs.ValueInt32()) - fmt.Println("NodeCount", input.NodeCount.ValueInt32()) - fmt.Println("NonProvisionableAutonomousContainerDatabases", input.NonProvisionableAutonomousContainerDatabases.ValueInt32()) - fmt.Println("OciResourceAnchorName", input.OciResourceAnchorName.ValueString()) - fmt.Println("OciUrl", input.OciUrl.ValueString()) - fmt.Println("Ocid", input.Ocid.ValueString()) - fmt.Println("OdbNetworkId", input.OdbNetworkId.ValueString()) - fmt.Println("PercentProgress", input.PercentProgress.ValueFloat32()) - fmt.Println("ProvisionableAutonomousContainerDatabases", input.ProvisionableAutonomousContainerDatabases.ValueInt32()) - fmt.Println("ProvisionedAutonomousContainerDatabases", input.ProvisionedAutonomousContainerDatabases.ValueInt32()) - fmt.Println("ProvisionedCpus", input.ProvisionedCpus.ValueFloat32()) - fmt.Println("ReclaimableCpus", input.ReclaimableCpus.ValueFloat32()) - fmt.Println("ReservedCpus", input.ReservedCpus.ValueFloat32()) - fmt.Println("ScanListenerPortNonTls", input.ScanListenerPortNonTls.ValueInt32()) - fmt.Println("ScanListenerPortTls", input.ScanListenerPortTls.ValueInt32()) - fmt.Println("Shape", input.Shape.ValueString()) - fmt.Println("Status", input.Status.ValueString()) - fmt.Println("StatusReason", input.StatusReason.ValueString()) - fmt.Println("TimeZone", input.TimeZone.ValueString()) - fmt.Println("TotalAutonomousDataStorageInTBs", input.TotalAutonomousDataStorageInTBs.ValueFloat32()) - fmt.Println("TotalContainerDatabases", input.TotalContainerDatabases.ValueInt32()) - fmt.Println("TotalCpus", input.TotalCpus.ValueFloat32()) - fmt.Println("Timeouts", input.Timeouts) -} - func (r *resourceCloudAutonomousVmCluster) Delete(ctx context.Context, req resource.DeleteRequest, resp *resource.DeleteResponse) { - fmt.Println("Delete called") + conn := r.Meta().ODBClient(ctx) var state cloudAutonomousVmClusterResourceModel @@ -709,12 +639,7 @@ func sweepCloudAutonomousVmClusters(ctx context.Context, client *conns.AWSClient return sweepResources, nil } -func (r *resourceCloudAutonomousVmCluster) expandMaintenanceWindow(ctx context.Context, avmcMaintenanceWindowFwTypesObj fwtypes.ObjectValueOf[cloudAutonomousVmClusterMaintenanceWindowResourceModel]) (*odbtypes.MaintenanceWindow, error) { - if avmcMaintenanceWindowFwTypesObj.IsNull() || avmcMaintenanceWindowFwTypesObj.IsUnknown() { - return nil, errors.New("maintenance window cannot be null") - } - hasError := false - var err error +func (r *resourceCloudAutonomousVmCluster) expandMaintenanceWindow(ctx context.Context, avmcMaintenanceWindowFwTypesObj fwtypes.ObjectValueOf[cloudAutonomousVmClusterMaintenanceWindowResourceModel]) *odbtypes.MaintenanceWindow { var avmcMaintenanceWindowResource cloudAutonomousVmClusterMaintenanceWindowResourceModel avmcMaintenanceWindowFwTypesObj.As(ctx, &avmcMaintenanceWindowResource, basetypes.ObjectAsOptions{ @@ -722,44 +647,31 @@ func (r *resourceCloudAutonomousVmCluster) expandMaintenanceWindow(ctx context.C UnhandledUnknownAsEmpty: true, }) - var daysOfWeek []odbtypes.DayOfWeek = nil + var daysOfWeekNames []odbtypes.DayOfWeekName + avmcMaintenanceWindowResource.DaysOfWeek.ElementsAs(ctx, &daysOfWeekNames, false) + daysOfWeek := make([]odbtypes.DayOfWeek, 0, len(daysOfWeekNames)) - if !avmcMaintenanceWindowResource.DaysOfWeek.IsNull() { - var daysOfWeekNames []odbtypes.DayOfWeekName - avmcMaintenanceWindowResource.DaysOfWeek.ElementsAs(ctx, &daysOfWeekNames, false) - daysOfWeek = make([]odbtypes.DayOfWeek, 0, len(daysOfWeekNames)) - for _, dayOfWeek := range daysOfWeekNames { - daysOfWeek = append(daysOfWeek, odbtypes.DayOfWeek{ - Name: dayOfWeek, - }) - } + for _, dayOfWeek := range daysOfWeekNames { + daysOfWeek = append(daysOfWeek, odbtypes.DayOfWeek{ + Name: dayOfWeek, + }) } - var hoursOfTheDay []int32 = nil - if !avmcMaintenanceWindowResource.HoursOfDay.IsNull() { - avmcMaintenanceWindowResource.HoursOfDay.ElementsAs(ctx, &hoursOfTheDay, false) - } + var hoursOfTheDay []int32 + avmcMaintenanceWindowResource.HoursOfDay.ElementsAs(ctx, &hoursOfTheDay, false) - var months []odbtypes.Month = nil - if !avmcMaintenanceWindowResource.Months.IsNull() { - var monthNames []odbtypes.MonthName - avmcMaintenanceWindowResource.Months.ElementsAs(ctx, &monthNames, false) - months = make([]odbtypes.Month, 0, len(monthNames)) - for _, month := range monthNames { - months = append(months, odbtypes.Month{ - Name: month, - }) - } + var monthNames []odbtypes.MonthName + avmcMaintenanceWindowResource.Months.ElementsAs(ctx, &monthNames, false) + months := make([]odbtypes.Month, 0, len(monthNames)) + for _, month := range monthNames { + months = append(months, odbtypes.Month{ + Name: month, + }) } - var weeksOfMonth []int32 = nil - if !avmcMaintenanceWindowResource.WeeksOfMonth.IsNull() { - avmcMaintenanceWindowResource.WeeksOfMonth.ElementsAs(ctx, &weeksOfMonth, false) - } - if avmcMaintenanceWindowResource.Preference.IsNull() || avmcMaintenanceWindowResource.WeeksOfMonth.IsUnknown() { - hasError = true - err = errors.Join(err, errors.New("cloud autonomous vm cluster maintenance window must set preference ")) - } + var weeksOfMonth []int32 + avmcMaintenanceWindowResource.WeeksOfMonth.ElementsAs(ctx, &weeksOfMonth, false) + odbTypeMW := odbtypes.MaintenanceWindow{ DaysOfWeek: daysOfWeek, HoursOfDay: hoursOfTheDay, @@ -768,87 +680,77 @@ func (r *resourceCloudAutonomousVmCluster) expandMaintenanceWindow(ctx context.C Preference: avmcMaintenanceWindowResource.Preference.ValueEnum(), WeeksOfMonth: weeksOfMonth, } - if odbTypeMW.HoursOfDay != nil && len(odbTypeMW.HoursOfDay) == 0 { - hasError = true - err = errors.Join(err, errors.New("cloud autonomous vm cluster hours-of-day can't be empty. Give a valid vale or remove the property ")) + if len(odbTypeMW.DaysOfWeek) == 0 { + odbTypeMW.DaysOfWeek = nil } - if odbTypeMW.DaysOfWeek != nil && len(odbTypeMW.DaysOfWeek) == 0 { - hasError = true - err = errors.Join(err, errors.New("cloud autonomous vm cluster days-of-week can't be empty. Give a valid vale or remove the property ")) + if len(odbTypeMW.HoursOfDay) == 0 { + odbTypeMW.HoursOfDay = nil } - if odbTypeMW.Months != nil && len(odbTypeMW.Months) == 0 { - hasError = true - err = errors.Join(err, errors.New("cloud autonomous vm cluster months can't be empty. Give a valid vale or remove the property ")) + if len(odbTypeMW.Months) == 0 { + odbTypeMW.Months = nil } - - if hasError { - return nil, err + if len(odbTypeMW.WeeksOfMonth) == 0 { + odbTypeMW.WeeksOfMonth = nil + } + if *odbTypeMW.LeadTimeInWeeks == 0 { + odbTypeMW.LeadTimeInWeeks = nil } - return &odbTypeMW, err + return &odbTypeMW } func (r *resourceCloudAutonomousVmCluster) flattenMaintenanceWindow(ctx context.Context, avmcMW *odbtypes.MaintenanceWindow) fwtypes.ObjectValueOf[cloudAutonomousVmClusterMaintenanceWindowResourceModel] { //days of week - computedMW := cloudAutonomousVmClusterMaintenanceWindowResourceModel{} - if avmcMW.DaysOfWeek != nil { - daysOfWeek := make([]attr.Value, 0, len(avmcMW.DaysOfWeek)) - for _, dayOfWeek := range avmcMW.DaysOfWeek { - dayOfWeekStringValue := fwtypes.StringEnumValue(dayOfWeek.Name).StringValue - daysOfWeek = append(daysOfWeek, dayOfWeekStringValue) - } - - setValueOfDaysOfWeek, _ := basetypes.NewSetValue(types.StringType, daysOfWeek) - daysOfWeekRead := fwtypes.SetValueOf[fwtypes.StringEnum[odbtypes.DayOfWeekName]]{ - SetValue: setValueOfDaysOfWeek, - } - computedMW.DaysOfWeek = daysOfWeekRead + daysOfWeek := make([]attr.Value, 0, len(avmcMW.DaysOfWeek)) + for _, dayOfWeek := range avmcMW.DaysOfWeek { + dayOfWeekStringValue := fwtypes.StringEnumValue(dayOfWeek.Name).StringValue + daysOfWeek = append(daysOfWeek, dayOfWeekStringValue) + } + setValueOfDaysOfWeek, _ := basetypes.NewSetValue(types.StringType, daysOfWeek) + daysOfWeekRead := fwtypes.SetValueOf[fwtypes.StringEnum[odbtypes.DayOfWeekName]]{ + SetValue: setValueOfDaysOfWeek, } - //hours of the day - if avmcMW.HoursOfDay != nil { - hoursOfTheDay := make([]attr.Value, 0, len(avmcMW.HoursOfDay)) - for _, hourOfTheDay := range avmcMW.HoursOfDay { - daysOfWeekInt32Value := types.Int32Value(hourOfTheDay) - hoursOfTheDay = append(hoursOfTheDay, daysOfWeekInt32Value) - } - setValuesOfHoursOfTheDay, _ := basetypes.NewSetValue(types.Int32Type, hoursOfTheDay) - hoursOfTheDayRead := fwtypes.SetValueOf[types.Int32]{ - SetValue: setValuesOfHoursOfTheDay, - } - computedMW.HoursOfDay = hoursOfTheDayRead + hoursOfTheDay := make([]attr.Value, 0, len(avmcMW.HoursOfDay)) + for _, hourOfTheDay := range avmcMW.HoursOfDay { + daysOfWeekInt32Value := types.Int32Value(hourOfTheDay) + hoursOfTheDay = append(hoursOfTheDay, daysOfWeekInt32Value) } - - //months - if avmcMW.Months != nil { - months := make([]attr.Value, 0, len(avmcMW.Months)) - for _, month := range avmcMW.Months { - monthStringValue := fwtypes.StringEnumValue(month.Name).StringValue - months = append(months, monthStringValue) - } - setValuesOfMonth, _ := basetypes.NewSetValue(types.StringType, months) - monthsRead := fwtypes.SetValueOf[fwtypes.StringEnum[odbtypes.MonthName]]{ - SetValue: setValuesOfMonth, - } - computedMW.Months = monthsRead + setValuesOfHoursOfTheDay, _ := basetypes.NewSetValue(types.Int32Type, hoursOfTheDay) + hoursOfTheDayRead := fwtypes.SetValueOf[types.Int32]{ + SetValue: setValuesOfHoursOfTheDay, + } + //monts + months := make([]attr.Value, 0, len(avmcMW.Months)) + for _, month := range avmcMW.Months { + monthStringValue := fwtypes.StringEnumValue(month.Name).StringValue + months = append(months, monthStringValue) + } + setValuesOfMonth, _ := basetypes.NewSetValue(types.StringType, months) + monthsRead := fwtypes.SetValueOf[fwtypes.StringEnum[odbtypes.MonthName]]{ + SetValue: setValuesOfMonth, } - //weeks of month - if avmcMW.WeeksOfMonth != nil { - weeksOfMonth := make([]attr.Value, 0, len(avmcMW.WeeksOfMonth)) - for _, weekOfMonth := range avmcMW.WeeksOfMonth { - weeksOfMonthInt32Value := types.Int32Value(weekOfMonth) - weeksOfMonth = append(weeksOfMonth, weeksOfMonthInt32Value) - } - setValuesOfWeekOfMonth, _ := basetypes.NewSetValue(types.Int32Type, weeksOfMonth) - weeksOfMonthRead := fwtypes.SetValueOf[types.Int32]{ - SetValue: setValuesOfWeekOfMonth, - } - computedMW.WeeksOfMonth = weeksOfMonthRead + weeksOfMonth := make([]attr.Value, 0, len(avmcMW.WeeksOfMonth)) + for _, weekOfMonth := range avmcMW.WeeksOfMonth { + weeksOfMonthInt32Value := types.Int32Value(weekOfMonth) + weeksOfMonth = append(weeksOfMonth, weeksOfMonthInt32Value) + } + setValuesOfWeekOfMonth, _ := basetypes.NewSetValue(types.Int32Type, weeksOfMonth) + weeksOfMonthRead := fwtypes.SetValueOf[types.Int32]{ + SetValue: setValuesOfWeekOfMonth, } - computedMW.LeadTimeInWeeks = types.Int32PointerValue(avmcMW.LeadTimeInWeeks) - computedMW.Preference = fwtypes.StringEnumValue(avmcMW.Preference) - + computedMW := cloudAutonomousVmClusterMaintenanceWindowResourceModel{ + DaysOfWeek: daysOfWeekRead, + HoursOfDay: hoursOfTheDayRead, + LeadTimeInWeeks: types.Int32PointerValue(avmcMW.LeadTimeInWeeks), + Months: monthsRead, + Preference: fwtypes.StringEnumValue(avmcMW.Preference), + WeeksOfMonth: weeksOfMonthRead, + } + if avmcMW.LeadTimeInWeeks == nil { + computedMW.LeadTimeInWeeks = types.Int32Value(0) + } result, _ := fwtypes.NewObjectValueOf[cloudAutonomousVmClusterMaintenanceWindowResourceModel](ctx, &computedMW) return result } @@ -900,9 +802,7 @@ type cloudAutonomousVmClusterResourceModel struct { Status fwtypes.StringEnum[odbtypes.ResourceStatus] `tfsdk:"status"` StatusReason types.String `tfsdk:"reason"` TimeZone types.String `tfsdk:"time_zone"` - TotalAutonomousDataStorageInTBs types.Float32 `tfsdk:"total_autonomous_data_storage_in_tbs"` TotalContainerDatabases types.Int32 `tfsdk:"total_container_databases"` - TotalCpus types.Float32 `tfsdk:"total_cpus"` Timeouts timeouts.Value `tfsdk:"timeouts"` Tags tftags.Map `tfsdk:"tags"` TagsAll tftags.Map `tfsdk:"tags_all"` diff --git a/internal/service/odb/cloud_autonomous_vm_cluster_data_source.go b/internal/service/odb/cloud_autonomous_vm_cluster_data_source.go index 8dbcc11a4753..6a2f13147170 100644 --- a/internal/service/odb/cloud_autonomous_vm_cluster_data_source.go +++ b/internal/service/odb/cloud_autonomous_vm_cluster_data_source.go @@ -188,15 +188,9 @@ func (d *dataSourceCloudAutonomousVmCluster) Schema(ctx context.Context, req dat "time_zone": schema.StringAttribute{ Computed: true, }, - "total_autonomous_data_storage_in_tbs": schema.Float32Attribute{ - Computed: true, - }, "total_container_databases": schema.Int32Attribute{ Computed: true, }, - "total_cpus": schema.Float32Attribute{ - Computed: true, - }, names.AttrTags: tftags.TagsAttributeComputedOnly(), "maintenance_window": schema.ObjectAttribute{ Computed: true, @@ -279,66 +273,54 @@ func (d *dataSourceCloudAutonomousVmCluster) Read(ctx context.Context, req datas func (d *dataSourceCloudAutonomousVmCluster) flattenMaintenanceWindow(ctx context.Context, avmcMW *odbtypes.MaintenanceWindow) fwtypes.ObjectValueOf[cloudAutonomousVmClusterMaintenanceWindowDataSourceModel] { //days of week - computedMW := cloudAutonomousVmClusterMaintenanceWindowDataSourceModel{} - if avmcMW.DaysOfWeek != nil { - daysOfWeek := make([]attr.Value, 0, len(avmcMW.DaysOfWeek)) - for _, dayOfWeek := range avmcMW.DaysOfWeek { - dayOfWeekStringValue := fwtypes.StringEnumValue(dayOfWeek.Name).StringValue - daysOfWeek = append(daysOfWeek, dayOfWeekStringValue) - } - - setValueOfDaysOfWeek, _ := basetypes.NewSetValue(types.StringType, daysOfWeek) - daysOfWeekRead := fwtypes.SetValueOf[fwtypes.StringEnum[odbtypes.DayOfWeekName]]{ - SetValue: setValueOfDaysOfWeek, - } - computedMW.DaysOfWeek = daysOfWeekRead + daysOfWeek := make([]attr.Value, 0, len(avmcMW.DaysOfWeek)) + for _, dayOfWeek := range avmcMW.DaysOfWeek { + dayOfWeekStringValue := fwtypes.StringEnumValue(dayOfWeek.Name).StringValue + daysOfWeek = append(daysOfWeek, dayOfWeekStringValue) + } + setValueOfDaysOfWeek, _ := basetypes.NewSetValue(types.StringType, daysOfWeek) + daysOfWeekRead := fwtypes.SetValueOf[fwtypes.StringEnum[odbtypes.DayOfWeekName]]{ + SetValue: setValueOfDaysOfWeek, } - //hours of the day - if avmcMW.HoursOfDay != nil { - hoursOfTheDay := make([]attr.Value, 0, len(avmcMW.HoursOfDay)) - for _, hourOfTheDay := range avmcMW.HoursOfDay { - daysOfWeekInt32Value := types.Int32Value(hourOfTheDay) - hoursOfTheDay = append(hoursOfTheDay, daysOfWeekInt32Value) - } - setValuesOfHoursOfTheDay, _ := basetypes.NewSetValue(types.Int32Type, hoursOfTheDay) - hoursOfTheDayRead := fwtypes.SetValueOf[types.Int32]{ - SetValue: setValuesOfHoursOfTheDay, - } - computedMW.HoursOfDay = hoursOfTheDayRead + hoursOfTheDay := make([]attr.Value, 0, len(avmcMW.HoursOfDay)) + for _, hourOfTheDay := range avmcMW.HoursOfDay { + daysOfWeekInt32Value := types.Int32Value(hourOfTheDay) + hoursOfTheDay = append(hoursOfTheDay, daysOfWeekInt32Value) } - - //months - if avmcMW.Months != nil { - months := make([]attr.Value, 0, len(avmcMW.Months)) - for _, month := range avmcMW.Months { - monthStringValue := fwtypes.StringEnumValue(month.Name).StringValue - months = append(months, monthStringValue) - } - setValuesOfMonth, _ := basetypes.NewSetValue(types.StringType, months) - monthsRead := fwtypes.SetValueOf[fwtypes.StringEnum[odbtypes.MonthName]]{ - SetValue: setValuesOfMonth, - } - computedMW.Months = monthsRead + setValuesOfHoursOfTheDay, _ := basetypes.NewSetValue(types.Int32Type, hoursOfTheDay) + hoursOfTheDayRead := fwtypes.SetValueOf[types.Int32]{ + SetValue: setValuesOfHoursOfTheDay, + } + //monts + months := make([]attr.Value, 0, len(avmcMW.Months)) + for _, month := range avmcMW.Months { + monthStringValue := fwtypes.StringEnumValue(month.Name).StringValue + months = append(months, monthStringValue) + } + setValuesOfMonth, _ := basetypes.NewSetValue(types.StringType, months) + monthsRead := fwtypes.SetValueOf[fwtypes.StringEnum[odbtypes.MonthName]]{ + SetValue: setValuesOfMonth, } - //weeks of month - if avmcMW.WeeksOfMonth != nil { - weeksOfMonth := make([]attr.Value, 0, len(avmcMW.WeeksOfMonth)) - for _, weekOfMonth := range avmcMW.WeeksOfMonth { - weeksOfMonthInt32Value := types.Int32Value(weekOfMonth) - weeksOfMonth = append(weeksOfMonth, weeksOfMonthInt32Value) - } - setValuesOfWeekOfMonth, _ := basetypes.NewSetValue(types.Int32Type, weeksOfMonth) - weeksOfMonthRead := fwtypes.SetValueOf[types.Int32]{ - SetValue: setValuesOfWeekOfMonth, - } - computedMW.WeeksOfMonth = weeksOfMonthRead + weeksOfMonth := make([]attr.Value, 0, len(avmcMW.WeeksOfMonth)) + for _, weekOfMonth := range avmcMW.WeeksOfMonth { + weeksOfMonthInt32Value := types.Int32Value(weekOfMonth) + weeksOfMonth = append(weeksOfMonth, weeksOfMonthInt32Value) + } + setValuesOfWeekOfMonth, _ := basetypes.NewSetValue(types.Int32Type, weeksOfMonth) + weeksOfMonthRead := fwtypes.SetValueOf[types.Int32]{ + SetValue: setValuesOfWeekOfMonth, } - computedMW.LeadTimeInWeeks = types.Int32PointerValue(avmcMW.LeadTimeInWeeks) - computedMW.Preference = fwtypes.StringEnumValue(avmcMW.Preference) - + computedMW := cloudAutonomousVmClusterMaintenanceWindowDataSourceModel{ + DaysOfWeek: daysOfWeekRead, + HoursOfDay: hoursOfTheDayRead, + LeadTimeInWeeks: types.Int32PointerValue(avmcMW.LeadTimeInWeeks), + Months: monthsRead, + Preference: fwtypes.StringEnumValue(avmcMW.Preference), + WeeksOfMonth: weeksOfMonthRead, + } result, _ := fwtypes.NewObjectValueOf[cloudAutonomousVmClusterMaintenanceWindowDataSourceModel](ctx, &computedMW) return result } @@ -392,9 +374,7 @@ type cloudAutonomousVmClusterDataSourceModel struct { TimeDatabaseSslCertificateExpires types.String `tfsdk:"time_database_ssl_certificate_expires" autoflex:",noflatten"` TimeOrdsCertificateExpires types.String `tfsdk:"time_ords_certificate_expires" autoflex:",noflatten"` TimeZone types.String `tfsdk:"time_zone"` - TotalAutonomousDataStorageInTBs types.Float32 `tfsdk:"total_autonomous_data_storage_in_tbs"` TotalContainerDatabases types.Int32 `tfsdk:"total_container_databases"` - TotalCpus types.Float32 `tfsdk:"total_cpus"` MaintenanceWindow fwtypes.ObjectValueOf[cloudAutonomousVmClusterMaintenanceWindowDataSourceModel] `tfsdk:"maintenance_window" autoflex:",noflatten"` Tags tftags.Map `tfsdk:"tags"` } diff --git a/internal/service/odb/cloud_autonomous_vm_cluster_data_source_test.go b/internal/service/odb/cloud_autonomous_vm_cluster_data_source_test.go index 3729250062bb..cbf46656e5b5 100644 --- a/internal/service/odb/cloud_autonomous_vm_cluster_data_source_test.go +++ b/internal/service/odb/cloud_autonomous_vm_cluster_data_source_test.go @@ -134,15 +134,23 @@ resource "aws_odb_cloud_autonomous_vm_cluster" "test" { autonomous_data_storage_size_in_tbs = 5 memory_per_oracle_compute_unit_in_gbs = 2 total_container_databases = 1 - cpu_core_count_per_node = 4 + cpu_core_count_per_node = 40 + license_model = "LICENSE_INCLUDED" db_servers = ["dbs_7ecm4wbjxy","dbs_uy5wmaqk6s"] - scan_listener_port_tls = 1521 - scan_listener_port_non_tls = 2484 + scan_listener_port_tls = 8561 + scan_listener_port_non_tls = 1024 maintenance_window = { preference = "NO_PREFERENCE" + days_of_week = [] + hours_of_day = [] + months = [] + weeks_of_month =[] + lead_time_in_weeks = 0 } } + + data "aws_odb_cloud_autonomous_vm_cluster" "test" { id = aws_odb_cloud_autonomous_vm_cluster.test.id diff --git a/internal/service/odb/cloud_exadata_infrastructure.go b/internal/service/odb/cloud_exadata_infrastructure.go index 4119bdc4e782..1933a2910428 100644 --- a/internal/service/odb/cloud_exadata_infrastructure.go +++ b/internal/service/odb/cloud_exadata_infrastructure.go @@ -272,16 +272,9 @@ func (r *resourceCloudExadataInfrastructure) Create(ctx context.Context, req res } input := odb.CreateCloudExadataInfrastructureInput{ - Tags: getTagsIn(ctx), + Tags: getTagsIn(ctx), + MaintenanceWindow: r.expandMaintenanceWindow(ctx, plan.MaintenanceWindow), } - maintenanceWindowInput, err := r.expandMaintenanceWindow(ctx, plan.MaintenanceWindow) - if err != nil { - resp.Diagnostics.AddError( - create.ProblemStandardMessage(names.ODB, create.ErrActionCreating, ResNameCloudExadataInfrastructure, plan.DisplayName.ValueString(), err), - err.Error(), - ) - } - input.MaintenanceWindow = maintenanceWindowInput if !plan.CustomerContactsToSendToOCI.IsNull() && !plan.CustomerContactsToSendToOCI.IsUnknown() { input.CustomerContactsToSendToOCI = r.expandCustomerContacts(ctx, plan.CustomerContactsToSendToOCI) @@ -369,12 +362,12 @@ func (r *resourceCloudExadataInfrastructure) Read(ctx context.Context, req resou state.MaintenanceWindow = r.flattenMaintenanceWindow(ctx, out.MaintenanceWindow) if out.DatabaseServerType == nil { - state.DatabaseServerType = types.StringValue("ExaInfraDBServerTypeNotAvailable") + state.DatabaseServerType = types.StringValue(ExaInfraDBServerTypeNotAvailable) } else { state.DatabaseServerType = types.StringValue(*out.DatabaseServerType) } if out.StorageServerType == nil { - state.StorageServerType = types.StringValue("ExaInfraStorageServerTypeNotAvailable") + state.StorageServerType = types.StringValue(ExaInfraStorageServerTypeNotAvailable) } else { state.StorageServerType = types.StringValue(*out.StorageServerType) } @@ -401,24 +394,9 @@ func (r *resourceCloudExadataInfrastructure) Update(ctx context.Context, req res updatedMW := odb.UpdateCloudExadataInfrastructureInput{ CloudExadataInfrastructureId: plan.CloudExadataInfrastructureId.ValueStringPointer(), + MaintenanceWindow: r.expandMaintenanceWindow(ctx, plan.MaintenanceWindow), } - mwInput, err := r.expandMaintenanceWindow(ctx, plan.MaintenanceWindow) - if err != nil { - resp.Diagnostics.AddError( - create.ProblemStandardMessage(names.ODB, create.ErrActionUpdating, ResNameCloudExadataInfrastructure, state.CloudExadataInfrastructureId.ValueString(), err), - err.Error(), - ) - return - } - updatedMW.MaintenanceWindow = mwInput - - /*if updatedMW.MaintenanceWindow != nil { - fmt.Println("MW preference : ", updatedMW.MaintenanceWindow.Preference) - fmt.Println("MW hours : ", updatedMW.MaintenanceWindow.HoursOfDay) - fmt.Println("MW weeks : ", updatedMW.MaintenanceWindow.WeeksOfMonth) - } else { - fmt.Println("Nil MW") - }*/ + out, err := conn.UpdateCloudExadataInfrastructure(ctx, &updatedMW) if err != nil { resp.Diagnostics.AddError( @@ -634,10 +612,8 @@ func FindOdbExadataInfraResourceByID(ctx context.Context, conn *odb.Client, id s return out.CloudExadataInfrastructure, nil } -func (r *resourceCloudExadataInfrastructure) expandMaintenanceWindow(ctx context.Context, exaInfraMWResourceObj fwtypes.ObjectValueOf[cloudExadataInfraMaintenanceWindowResourceModel]) (*odbtypes.MaintenanceWindow, error) { +func (r *resourceCloudExadataInfrastructure) expandMaintenanceWindow(ctx context.Context, exaInfraMWResourceObj fwtypes.ObjectValueOf[cloudExadataInfraMaintenanceWindowResourceModel]) *odbtypes.MaintenanceWindow { - hasError := false - var err error var exaInfraMWResource cloudExadataInfraMaintenanceWindowResourceModel exaInfraMWResourceObj.As(ctx, &exaInfraMWResource, basetypes.ObjectAsOptions{ @@ -645,39 +621,6 @@ func (r *resourceCloudExadataInfrastructure) expandMaintenanceWindow(ctx context UnhandledUnknownAsEmpty: true, }) - if exaInfraMWResource.DaysOfWeek.IsNull() || exaInfraMWResource.DaysOfWeek.IsUnknown() { - hasError = true - err = errors.Join(err, errors.New("daysOfWeeks can not be null or unknown")) - } - if exaInfraMWResource.HoursOfDay.IsNull() || exaInfraMWResource.HoursOfDay.IsUnknown() { - hasError = true - err = errors.Join(err, errors.New("hoursOfDay can not be null or unknown")) - } - if exaInfraMWResource.WeeksOfMonth.IsNull() || exaInfraMWResource.WeeksOfMonth.IsUnknown() { - hasError = true - err = errors.Join(err, errors.New("weeksOfMonth can not be null or unknown")) - } - if exaInfraMWResource.Months.IsNull() || exaInfraMWResource.Months.IsUnknown() { - hasError = true - err = errors.Join(err, errors.New("months can not be null or unknown")) - } - if exaInfraMWResource.IsCustomActionTimeoutEnabled.IsNull() || exaInfraMWResource.IsCustomActionTimeoutEnabled.IsUnknown() { - hasError = true - err = errors.Join(err, errors.New("isCustomActionTimeoutEnabled can not be null or unknown")) - } - if exaInfraMWResource.CustomActionTimeoutInMins.IsNull() || exaInfraMWResource.CustomActionTimeoutInMins.IsUnknown() { - hasError = true - err = errors.Join(err, errors.New("customActionTimeoutInMins can not be null or unknown")) - } - if exaInfraMWResource.WeeksOfMonth.IsNull() || exaInfraMWResource.WeeksOfMonth.IsUnknown() { - hasError = true - err = errors.Join(err, errors.New("weeksOfMonth can not be null or unknown")) - } - if exaInfraMWResource.LeadTimeInWeeks.IsNull() || exaInfraMWResource.LeadTimeInWeeks.IsUnknown() { - hasError = true - err = errors.Join(err, errors.New("leadTimeInWeeks can not be null or unknown")) - } - var daysOfWeekNames []odbtypes.DayOfWeekName exaInfraMWResource.DaysOfWeek.ElementsAs(ctx, &daysOfWeekNames, false) daysOfWeek := make([]odbtypes.DayOfWeek, 0, len(daysOfWeekNames)) @@ -713,35 +656,24 @@ func (r *resourceCloudExadataInfrastructure) expandMaintenanceWindow(ctx context Preference: exaInfraMWResource.Preference.ValueEnum(), WeeksOfMonth: weeksOfMonth, } - if odbTypeMW.Preference == odbtypes.PreferenceTypeNoPreference { - if len(odbTypeMW.DaysOfWeek) != 0 { - hasError = true - err = errors.Join(err, errors.New("default maintenance window can't have daysOfWeek with values")) - } - if len(odbTypeMW.HoursOfDay) != 0 { - hasError = true - err = errors.Join(err, errors.New("default maintenance window can't have hoursOfDay with values")) - } - if len(odbTypeMW.WeeksOfMonth) != 0 { - hasError = true - err = errors.Join(err, errors.New("default maintenance window can't have weeksOfMonth with values")) - } - if len(odbTypeMW.Months) != 0 { - hasError = true - err = errors.Join(err, errors.New("default maintenance window can't have months with values")) - } + + if len(odbTypeMW.DaysOfWeek) == 0 { odbTypeMW.DaysOfWeek = nil + } + if len(odbTypeMW.HoursOfDay) == 0 { odbTypeMW.HoursOfDay = nil + } + if len(odbTypeMW.WeeksOfMonth) == 0 { odbTypeMW.WeeksOfMonth = nil + } + if len(odbTypeMW.Months) == 0 { odbTypeMW.Months = nil - odbTypeMW.LeadTimeInWeeks = nil } - - if hasError { - return nil, err + if *odbTypeMW.LeadTimeInWeeks == 0 { + odbTypeMW.LeadTimeInWeeks = nil } - return &odbTypeMW, nil + return &odbTypeMW } func (r *resourceCloudExadataInfrastructure) flattenMaintenanceWindow(ctx context.Context, obdExaInfraMW *odbtypes.MaintenanceWindow) fwtypes.ObjectValueOf[cloudExadataInfraMaintenanceWindowResourceModel] { From 4d1e34f034aa21b6c0ac17756d6827096dbdad41 Mon Sep 17 00:00:00 2001 From: Asim Date: Tue, 15 Jul 2025 12:42:29 +0100 Subject: [PATCH 354/365] added update MW window test case and exadata infra doc --- .../odb/cloud_exadata_infrastructure.go | 104 +++++++++++++----- .../odb/cloud_exadata_infrastructure_test.go | 76 +++++++++++++ 2 files changed, 151 insertions(+), 29 deletions(-) diff --git a/internal/service/odb/cloud_exadata_infrastructure.go b/internal/service/odb/cloud_exadata_infrastructure.go index 1933a2910428..f49b6e6131ec 100644 --- a/internal/service/odb/cloud_exadata_infrastructure.go +++ b/internal/service/odb/cloud_exadata_infrastructure.go @@ -6,8 +6,10 @@ package odb import ( "context" "errors" + "fmt" "github.com/hashicorp/terraform-plugin-framework/attr" "github.com/hashicorp/terraform-plugin-framework/resource/schema/int32planmodifier" + "github.com/hashicorp/terraform-plugin-framework/resource/schema/objectplanmodifier" "github.com/hashicorp/terraform-plugin-framework/resource/schema/setplanmodifier" "github.com/hashicorp/terraform-plugin-framework/types/basetypes" "github.com/hashicorp/terraform-provider-aws/internal/enum" @@ -75,10 +77,12 @@ func (r *resourceCloudExadataInfrastructure) Schema(ctx context.Context, req res resp.Schema = schema.Schema{ Attributes: map[string]schema.Attribute{ "activated_storage_count": schema.Int32Attribute{ - Computed: true, + Computed: true, + Description: "The number of storage servers requested for the Exadata infrastructure", }, "additional_storage_count": schema.Int32Attribute{ - Computed: true, + Computed: true, + Description: " The number of storage servers requested for the Exadata infrastructure", }, "database_server_type": schema.StringAttribute{ Optional: true, @@ -87,6 +91,7 @@ func (r *resourceCloudExadataInfrastructure) Schema(ctx context.Context, req res stringplanmodifier.RequiresReplace(), stringplanmodifier.UseStateForUnknown(), }, + Description: "The database server model type of the Exadata infrastructure. For the list of valid model names, use the ListDbSystemShapes operation", }, "storage_server_type": schema.StringAttribute{ Optional: true, @@ -95,11 +100,13 @@ func (r *resourceCloudExadataInfrastructure) Schema(ctx context.Context, req res stringplanmodifier.RequiresReplace(), stringplanmodifier.UseStateForUnknown(), }, + Description: "The storage server model type of the Exadata infrastructure. For the list of valid model names, use the ListDbSystemShapes operation", }, names.AttrARN: framework.ARNAttributeComputedOnly(), names.AttrID: framework.IDAttribute(), "available_storage_size_in_gbs": schema.Int32Attribute{ - Computed: true, + Computed: true, + Description: "The amount of available storage, in gigabytes (GB), for the Exadata infrastructure", }, "availability_zone": schema.StringAttribute{ Optional: true, @@ -108,6 +115,7 @@ func (r *resourceCloudExadataInfrastructure) Schema(ctx context.Context, req res stringplanmodifier.RequiresReplace(), stringplanmodifier.UseStateForUnknown(), }, + Description: "The name of the Availability Zone (AZ) where the Exadata infrastructure is located. Changing this will force terraform to create new resource", }, "availability_zone_id": schema.StringAttribute{ Required: true, @@ -115,6 +123,7 @@ func (r *resourceCloudExadataInfrastructure) Schema(ctx context.Context, req res stringplanmodifier.RequiresReplace(), stringplanmodifier.UseStateForUnknown(), }, + Description: " The AZ ID of the AZ where the Exadata infrastructure is located. Changing this will force terraform to create new resource", }, "compute_count": schema.Int32Attribute{ Optional: true, @@ -123,9 +132,11 @@ func (r *resourceCloudExadataInfrastructure) Schema(ctx context.Context, req res int32planmodifier.RequiresReplace(), int32planmodifier.UseStateForUnknown(), }, + Description: " The number of compute instances that the Exadata infrastructure is located", }, "cpu_count": schema.Int32Attribute{ - Computed: true, + Computed: true, + Description: "The total number of CPU cores that are allocated to the Exadata infrastructure", }, "customer_contacts_to_send_to_oci": schema.SetAttribute{ ElementType: types.StringType, @@ -135,73 +146,94 @@ func (r *resourceCloudExadataInfrastructure) Schema(ctx context.Context, req res setplanmodifier.RequiresReplace(), setplanmodifier.UseStateForUnknown(), }, + Description: "The email addresses of contacts to receive notification from Oracle about maintenance updates for the Exadata infrastructure. Changing this will force terraform to create new resource", }, "data_storage_size_in_tbs": schema.Float64Attribute{ - Computed: true, + Computed: true, + Description: "The size of the Exadata infrastructure's data disk group, in terabytes (TB)", }, "db_node_storage_size_in_gbs": schema.Int32Attribute{ - Computed: true, + Computed: true, + Description: "The size of the Exadata infrastructure's local node storage, in gigabytes (GB)", }, "db_server_version": schema.StringAttribute{ - Computed: true, + Computed: true, + Description: "The software version of the database servers (dom0) in the Exadata infrastructure", }, "display_name": schema.StringAttribute{ Required: true, PlanModifiers: []planmodifier.String{ stringplanmodifier.RequiresReplace(), }, + Description: "The user-friendly name for the Exadata infrastructure. Changing this will force terraform to create a new resource", }, "last_maintenance_run_id": schema.StringAttribute{ - Computed: true, + Computed: true, + Description: "The Oracle Cloud Identifier (OCID) of the last maintenance run for the Exadata infrastructure", }, "max_cpu_count": schema.Int32Attribute{ - Computed: true, + Computed: true, + Description: "The total number of CPU cores available on the Exadata infrastructure", }, "max_data_storage_in_tbs": schema.Float64Attribute{ - Computed: true, + Computed: true, + Description: "The total amount of data disk group storage, in terabytes (TB), that's available on the Exadata infrastructure", }, "max_db_node_storage_size_in_gbs": schema.Int32Attribute{ - Computed: true, + Computed: true, + Description: "The total amount of local node storage, in gigabytes (GB), that's available on the Exadata infrastructure", }, "max_memory_in_gbs": schema.Int32Attribute{ - Computed: true, + Computed: true, + Description: "The total amount of memory in gigabytes (GB) available on the Exadata infrastructure", }, "memory_size_in_gbs": schema.Int32Attribute{ - Computed: true, + Computed: true, + Description: "The amount of memory, in gigabytes (GB), that's allocated on the Exadata infrastructure", }, "monthly_db_server_version": schema.StringAttribute{ - Computed: true, + Computed: true, + Description: "The monthly software version of the database servers in the Exadata infrastructure", }, "monthly_storage_server_version": schema.StringAttribute{ - Computed: true, + Computed: true, + Description: "The monthly software version of the storage servers installed on the Exadata infrastructure", }, "next_maintenance_run_id": schema.StringAttribute{ - Computed: true, + Computed: true, + Description: "The OCID of the next maintenance run for the Exadata infrastructure", }, "ocid": schema.StringAttribute{ - Computed: true, + Computed: true, + Description: "The OCID of the Exadata infrastructure", }, "oci_resource_anchor_name": schema.StringAttribute{ - Computed: true, + Computed: true, + Description: "The name of the OCI resource anchor for the Exadata infrastructure", }, "oci_url": schema.StringAttribute{ - Computed: true, + Computed: true, + Description: "The HTTPS link to the Exadata infrastructure in OCI", }, "percent_progress": schema.Float64Attribute{ - Computed: true, + Computed: true, + Description: "The amount of progress made on the current operation on the Exadata infrastructure, expressed as a percentage", }, "shape": schema.StringAttribute{ Required: true, PlanModifiers: []planmodifier.String{ stringplanmodifier.RequiresReplace(), }, + Description: "The model name of the Exadata infrastructure. Changing this will force terraform to create new resource", }, "status": schema.StringAttribute{ - CustomType: statusType, - Computed: true, + CustomType: statusType, + Computed: true, + Description: "The current status of the Exadata infrastructure", }, "status_reason": schema.StringAttribute{ - Computed: true, + Computed: true, + Description: "Additional information about the status of the Exadata infrastructure", }, "storage_count": schema.Int32Attribute{ Optional: true, @@ -210,9 +242,11 @@ func (r *resourceCloudExadataInfrastructure) Schema(ctx context.Context, req res int32planmodifier.RequiresReplace(), int32planmodifier.UseStateForUnknown(), }, + Description: "TThe number of storage servers that are activated for the Exadata infrastructure", }, "storage_server_version": schema.StringAttribute{ - Computed: true, + Computed: true, + Description: "The software version of the storage servers on the Exadata infrastructure.", }, names.AttrTags: tftags.TagsAttribute(), names.AttrTagsAll: tftags.TagsAttributeComputedOnly(), @@ -220,16 +254,27 @@ func (r *resourceCloudExadataInfrastructure) Schema(ctx context.Context, req res Computed: true, }, "created_at": schema.StringAttribute{ - Computed: true, + Computed: true, + Description: "The time when the Exadata infrastructure was created", }, "compute_model": schema.StringAttribute{ CustomType: computeModelType, Computed: true, + Description: fmt.Sprint("The OCI model compute model used when you create or clone an\n " + + " instance: ECPU or OCPU. An ECPU is an abstracted measure of\n " + + "compute resources. ECPUs are based on the number of cores\n " + + "elastically allocated from a pool of compute and storage servers.\n " + + " An OCPU is a legacy physical measure of compute resources. OCPUs\n " + + "are based on the physical core of a processor with\n " + + " hyper-threading enabled."), }, "maintenance_window": schema.ObjectAttribute{ - Required: true, - CustomType: fwtypes.NewObjectTypeOf[cloudExadataInfraMaintenanceWindowResourceModel](ctx), - + Required: true, + CustomType: fwtypes.NewObjectTypeOf[cloudExadataInfraMaintenanceWindowResourceModel](ctx), + Description: " The scheduling details for the maintenance window. Patching and system updates take place during the maintenance window ", + PlanModifiers: []planmodifier.Object{ + objectplanmodifier.UseStateForUnknown(), + }, AttributeTypes: map[string]attr.Type{ "custom_action_timeout_in_mins": types.Int32Type, "days_of_week": types.SetType{ @@ -380,6 +425,7 @@ func (r *resourceCloudExadataInfrastructure) Read(ctx context.Context, req resou } func (r *resourceCloudExadataInfrastructure) Update(ctx context.Context, req resource.UpdateRequest, resp *resource.UpdateResponse) { + fmt.Println("update called") var plan, state cloudExadataInfrastructureResourceModel resp.Diagnostics.Append(req.Plan.Get(ctx, &plan)...) resp.Diagnostics.Append(req.State.Get(ctx, &state)...) @@ -389,7 +435,7 @@ func (r *resourceCloudExadataInfrastructure) Update(ctx context.Context, req res conn := r.Meta().ODBClient(ctx) if !state.MaintenanceWindow.Equal(plan.MaintenanceWindow) { - + fmt.Println("update called") //we need to call update maintenance window updatedMW := odb.UpdateCloudExadataInfrastructureInput{ diff --git a/internal/service/odb/cloud_exadata_infrastructure_test.go b/internal/service/odb/cloud_exadata_infrastructure_test.go index db367fbf3dd9..9808925c47aa 100644 --- a/internal/service/odb/cloud_exadata_infrastructure_test.go +++ b/internal/service/odb/cloud_exadata_infrastructure_test.go @@ -236,6 +236,59 @@ func TestAccODBCloudExadataInfrastructureTagging(t *testing.T) { }) } +func TestAccODBCloudExadataUpdateMaintenanceWindow(t *testing.T) { + ctx := acctest.Context(t) + if testing.Short() { + t.Skip("skipping long-running test in short mode") + } + + var cloudExaDataInfrastructure1 odbtypes.CloudExadataInfrastructure + var cloudExaDataInfrastructure2 odbtypes.CloudExadataInfrastructure + resourceName := "aws_odb_cloud_exadata_infrastructure.test" + rName := sdkacctest.RandomWithPrefix(exaInfraTestResource.displayNamePrefix) + resource.Test(t, resource.TestCase{ + PreCheck: func() { + acctest.PreCheck(ctx, t) + //testAccPreCheck(ctx, t) + }, + ErrorCheck: acctest.ErrorCheck(t, names.ODBServiceID), + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + CheckDestroy: exaInfraTestResource.testAccCheckCloudExaDataInfraDestroyed(ctx), + Steps: []resource.TestStep{ + { + Config: exaInfraTestResource.exaDataInfraResourceBasicConfig(rName), + Check: resource.ComposeAggregateTestCheckFunc( + exaInfraTestResource.testAccCheckCloudExadataInfrastructureExists(ctx, resourceName, &cloudExaDataInfrastructure1), + resource.TestCheckResourceAttr(resourceName, "maintenance_window.preference", "NO_PREFERENCE"), + ), + }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + { + Config: exaInfraTestResource.basicWithCustomMaintenanceWindow(rName), + Check: resource.ComposeAggregateTestCheckFunc( + exaInfraTestResource.testAccCheckCloudExadataInfrastructureExists(ctx, resourceName, &cloudExaDataInfrastructure2), + resource.ComposeTestCheckFunc(func(state *terraform.State) error { + if strings.Compare(*(cloudExaDataInfrastructure1.CloudExadataInfrastructureId), *(cloudExaDataInfrastructure2.CloudExadataInfrastructureId)) != 0 { + return errors.New("Should not create a new cloud exa basicExaInfraDataSource after update") + } + return nil + }), + resource.TestCheckResourceAttr(resourceName, "maintenance_window.preference", "CUSTOM_PREFERENCE"), + ), + }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} + func TestAccODBCloudExadataInfrastructure_disappears(t *testing.T) { ctx := acctest.Context(t) if testing.Short() { @@ -446,3 +499,26 @@ maintenance_window = { `, displayName) return exaInfra } +func (cloudExaDataInfraResourceTest) basicWithCustomMaintenanceWindow(displayName string) string { + exaInfra := fmt.Sprintf(` +resource "aws_odb_cloud_exadata_infrastructure" "test" { + display_name = %[1]q + shape = "Exadata.X9M" + storage_count = 3 + compute_count = 2 + availability_zone_id = "use1-az6" + maintenance_window = { + custom_action_timeout_in_mins = 16 + days_of_week = ["MONDAY", "TUESDAY"] + hours_of_day = [11,16] + is_custom_action_timeout_enabled = true + lead_time_in_weeks = 3 + months = ["FEBRUARY","MAY","AUGUST","NOVEMBER"] + patching_mode = "ROLLING" + preference = "CUSTOM_PREFERENCE" + weeks_of_month =[2,4] + } +} +`, displayName) + return exaInfra +} From a070443ab4c7e4f5c69a1e29e793444947e6b878 Mon Sep 17 00:00:00 2001 From: Asim Date: Tue, 15 Jul 2025 15:17:15 +0100 Subject: [PATCH 355/365] added update MW window test case and exadata infra doc and system shape, gi versions --- .../odb/cloud_exadata_infrastructure.go | 44 ++--- .../odb/db_system_shapes_list_data_source.go | 151 ++++++++++++++++++ .../db_system_shapes_list_data_source_test.go | 49 ++++++ .../odb/gi_versions_list_data_source.go | 10 +- internal/service/odb/service_package_gen.go | 6 + 5 files changed, 240 insertions(+), 20 deletions(-) create mode 100644 internal/service/odb/db_system_shapes_list_data_source.go create mode 100644 internal/service/odb/db_system_shapes_list_data_source_test.go diff --git a/internal/service/odb/cloud_exadata_infrastructure.go b/internal/service/odb/cloud_exadata_infrastructure.go index f49b6e6131ec..b0c269684666 100644 --- a/internal/service/odb/cloud_exadata_infrastructure.go +++ b/internal/service/odb/cloud_exadata_infrastructure.go @@ -9,7 +9,6 @@ import ( "fmt" "github.com/hashicorp/terraform-plugin-framework/attr" "github.com/hashicorp/terraform-plugin-framework/resource/schema/int32planmodifier" - "github.com/hashicorp/terraform-plugin-framework/resource/schema/objectplanmodifier" "github.com/hashicorp/terraform-plugin-framework/resource/schema/setplanmodifier" "github.com/hashicorp/terraform-plugin-framework/types/basetypes" "github.com/hashicorp/terraform-provider-aws/internal/enum" @@ -86,22 +85,26 @@ func (r *resourceCloudExadataInfrastructure) Schema(ctx context.Context, req res }, "database_server_type": schema.StringAttribute{ Optional: true, - Computed: true, PlanModifiers: []planmodifier.String{ stringplanmodifier.RequiresReplace(), - stringplanmodifier.UseStateForUnknown(), }, Description: "The database server model type of the Exadata infrastructure. For the list of valid model names, use the ListDbSystemShapes operation", }, + "database_server_type_computed": schema.StringAttribute{ + Computed: true, + Description: "The database server model type of the Exadata infrastructure. For the list of valid model names, use the ListDbSystemShapes operation", + }, "storage_server_type": schema.StringAttribute{ Optional: true, - Computed: true, PlanModifiers: []planmodifier.String{ stringplanmodifier.RequiresReplace(), - stringplanmodifier.UseStateForUnknown(), }, Description: "The storage server model type of the Exadata infrastructure. For the list of valid model names, use the ListDbSystemShapes operation", }, + "storage_server_type_computed": schema.StringAttribute{ + Computed: true, + Description: "The storage server model type of the Exadata infrastructure. For the list of valid model names, use the ListDbSystemShapes operation", + }, names.AttrARN: framework.ARNAttributeComputedOnly(), names.AttrID: framework.IDAttribute(), "available_storage_size_in_gbs": schema.Int32Attribute{ @@ -272,9 +275,6 @@ func (r *resourceCloudExadataInfrastructure) Schema(ctx context.Context, req res Required: true, CustomType: fwtypes.NewObjectTypeOf[cloudExadataInfraMaintenanceWindowResourceModel](ctx), Description: " The scheduling details for the maintenance window. Patching and system updates take place during the maintenance window ", - PlanModifiers: []planmodifier.Object{ - objectplanmodifier.UseStateForUnknown(), - }, AttributeTypes: map[string]attr.Type{ "custom_action_timeout_in_mins": types.Int32Type, "days_of_week": types.SetType{ @@ -362,14 +362,16 @@ func (r *resourceCloudExadataInfrastructure) Create(ctx context.Context, req res plan.CreatedAt = types.StringValue(createdExaInfra.CreatedAt.Format(time.RFC3339)) if createdExaInfra.DatabaseServerType == nil { - plan.DatabaseServerType = types.StringValue(ExaInfraDBServerTypeNotAvailable) + plan.DatabaseServerTypeComputed = types.StringValue(ExaInfraDBServerTypeNotAvailable) } else { plan.DatabaseServerType = types.StringValue(*createdExaInfra.DatabaseServerType) + plan.DatabaseServerTypeComputed = types.StringValue(*createdExaInfra.DatabaseServerType) } if createdExaInfra.StorageServerType == nil { - plan.StorageServerType = types.StringValue(ExaInfraStorageServerTypeNotAvailable) + plan.StorageServerTypeComputed = types.StringValue(ExaInfraStorageServerTypeNotAvailable) } else { plan.StorageServerType = types.StringValue(*createdExaInfra.StorageServerType) + plan.StorageServerTypeComputed = types.StringValue(*createdExaInfra.StorageServerType) } resp.Diagnostics.Append(flex.Flatten(ctx, createdExaInfra, &plan)...) @@ -407,14 +409,16 @@ func (r *resourceCloudExadataInfrastructure) Read(ctx context.Context, req resou state.MaintenanceWindow = r.flattenMaintenanceWindow(ctx, out.MaintenanceWindow) if out.DatabaseServerType == nil { - state.DatabaseServerType = types.StringValue(ExaInfraDBServerTypeNotAvailable) + state.DatabaseServerTypeComputed = types.StringValue(ExaInfraDBServerTypeNotAvailable) } else { state.DatabaseServerType = types.StringValue(*out.DatabaseServerType) + state.DatabaseServerTypeComputed = types.StringValue(*out.DatabaseServerType) } if out.StorageServerType == nil { - state.StorageServerType = types.StringValue(ExaInfraStorageServerTypeNotAvailable) + state.StorageServerTypeComputed = types.StringValue(ExaInfraStorageServerTypeNotAvailable) } else { state.StorageServerType = types.StringValue(*out.StorageServerType) + state.StorageServerTypeComputed = types.StringValue(*out.StorageServerType) } resp.Diagnostics.Append(flex.Flatten(ctx, out, &state)...) @@ -425,7 +429,7 @@ func (r *resourceCloudExadataInfrastructure) Read(ctx context.Context, req resou } func (r *resourceCloudExadataInfrastructure) Update(ctx context.Context, req resource.UpdateRequest, resp *resource.UpdateResponse) { - fmt.Println("update called") + var plan, state cloudExadataInfrastructureResourceModel resp.Diagnostics.Append(req.Plan.Get(ctx, &plan)...) resp.Diagnostics.Append(req.State.Get(ctx, &state)...) @@ -435,7 +439,7 @@ func (r *resourceCloudExadataInfrastructure) Update(ctx context.Context, req res conn := r.Meta().ODBClient(ctx) if !state.MaintenanceWindow.Equal(plan.MaintenanceWindow) { - fmt.Println("update called") + //we need to call update maintenance window updatedMW := odb.UpdateCloudExadataInfrastructureInput{ @@ -474,14 +478,16 @@ func (r *resourceCloudExadataInfrastructure) Update(ctx context.Context, req res plan.CreatedAt = types.StringValue(updatedExaInfra.CreatedAt.Format(time.RFC3339)) plan.MaintenanceWindow = r.flattenMaintenanceWindow(ctx, updatedExaInfra.MaintenanceWindow) if updatedExaInfra.DatabaseServerType == nil { - plan.DatabaseServerType = types.StringValue(ExaInfraDBServerTypeNotAvailable) + plan.DatabaseServerTypeComputed = types.StringValue(ExaInfraDBServerTypeNotAvailable) } else { plan.DatabaseServerType = types.StringValue(*updatedExaInfra.DatabaseServerType) + plan.DatabaseServerTypeComputed = types.StringValue(*updatedExaInfra.DatabaseServerType) } if updatedExaInfra.StorageServerType == nil { - plan.StorageServerType = types.StringValue(ExaInfraStorageServerTypeNotAvailable) + plan.StorageServerTypeComputed = types.StringValue(ExaInfraStorageServerTypeNotAvailable) } else { plan.StorageServerType = types.StringValue(*updatedExaInfra.StorageServerType) + plan.StorageServerTypeComputed = types.StringValue(*updatedExaInfra.StorageServerType) } resp.Diagnostics.Append(flex.Flatten(ctx, updatedExaInfra, &plan)...) @@ -795,8 +801,10 @@ type cloudExadataInfrastructureResourceModel struct { framework.WithRegionModel ActivatedStorageCount types.Int32 `tfsdk:"activated_storage_count"` AdditionalStorageCount types.Int32 `tfsdk:"additional_storage_count"` - DatabaseServerType types.String `tfsdk:"database_server_type"` - StorageServerType types.String `tfsdk:"storage_server_type"` + DatabaseServerType types.String `tfsdk:"database_server_type" autoflex:"-"` + DatabaseServerTypeComputed types.String `tfsdk:"database_server_type_computed" autoflex:"-"` + StorageServerType types.String `tfsdk:"storage_server_type" autoflex:"-"` + StorageServerTypeComputed types.String `tfsdk:"storage_server_type_computed" autoflex:"-"` AvailabilityZone types.String `tfsdk:"availability_zone"` AvailabilityZoneId types.String `tfsdk:"availability_zone_id"` AvailableStorageSizeInGBs types.Int32 `tfsdk:"available_storage_size_in_gbs"` diff --git a/internal/service/odb/db_system_shapes_list_data_source.go b/internal/service/odb/db_system_shapes_list_data_source.go new file mode 100644 index 000000000000..755ea83c544c --- /dev/null +++ b/internal/service/odb/db_system_shapes_list_data_source.go @@ -0,0 +1,151 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +package odb + +import ( + "context" + "fmt" + "github.com/hashicorp/terraform-plugin-framework/attr" + + "github.com/aws/aws-sdk-go-v2/service/odb" + + "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/create" + "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/names" +) + +// Function annotations are used for datasource registration to the Provider. DO NOT EDIT. +// @FrameworkDataSource("aws_odb_db_system_shapes_list", name="Db System Shapes List") +func newDataSourceDbSystemShapesList(context.Context) (datasource.DataSourceWithConfigure, error) { + return &dataSourceDbSystemShapesList{}, nil +} + +const ( + DSNameDbSystemShapesList = "Db System Shapes List Data Source" +) + +type dataSourceDbSystemShapesList struct { + framework.DataSourceWithModel[dbSystemShapesListDataSourceModel] +} + +func (d *dataSourceDbSystemShapesList) Schema(ctx context.Context, req datasource.SchemaRequest, resp *datasource.SchemaResponse) { + resp.Schema = schema.Schema{ + Attributes: map[string]schema.Attribute{ + "availability_zone_id": schema.StringAttribute{ + Optional: true, + Description: "The physical ID of the AZ, for example, use1-az4. This ID persists across accounts", + }, + "db_system_shapes": schema.ListAttribute{ + Computed: true, + CustomType: fwtypes.NewListNestedObjectTypeOf[dbSystemShapeDataSourceModel](ctx), + Description: fmt.Sprint("The list of shapes and their properties.\n\n" + + "(structure)\n" + + "Information about a hardware system model (shape) that's\n " + + "available for an Exadata infrastructure. The shape determines\n" + + "resources, such as CPU cores, memory, and storage, to allocate to\n " + + "the Exadata infrastructure.\n"), + ElementType: types.ObjectType{ + + AttrTypes: map[string]attr.Type{ + "available_core_count": types.Int32Type, + "available_core_count_per_node": types.Int32Type, + "available_data_storage_in_tbs": types.Int32Type, + "available_data_storage_per_server_in_tbs": types.Int32Type, + "available_db_node_per_node_in_gbs": types.Int32Type, + "available_db_node_storage_in_gbs": types.Int32Type, + "available_memory_in_gbs": types.Int32Type, + "available_memory_per_node_in_gbs": types.Int32Type, + "core_count_increment": types.Int32Type, + "max_storage_count": types.Int32Type, + "maximum_node_count": types.Int32Type, + "min_core_count_per_node": types.Int32Type, + "min_data_storage_in_tbs": types.Int32Type, + "min_db_node_storage_per_node_in_gbs": types.Int32Type, + "min_memory_per_node_in_gbs": types.Int32Type, + "min_storage_count": types.Int32Type, + "minimum_core_count": types.Int32Type, + "minimum_node_count": types.Int32Type, + "name": types.StringType, + "runtime_minimum_core_count": types.Int32Type, + "shape_family": types.StringType, + "shape_type": types.StringType, + }, + }, + }, + }, + } +} + +func (d *dataSourceDbSystemShapesList) Read(ctx context.Context, req datasource.ReadRequest, resp *datasource.ReadResponse) { + + conn := d.Meta().ODBClient(ctx) + + var data dbSystemShapesListDataSourceModel + resp.Diagnostics.Append(req.Config.Get(ctx, &data)...) + if resp.Diagnostics.HasError() { + return + } + input := odb.ListDbSystemShapesInput{} + if !data.AvailabilityZoneId.IsNull() && !data.AvailabilityZoneId.IsUnknown() { + input.AvailabilityZoneId = data.AvailabilityZoneId.ValueStringPointer() + } + paginator := odb.NewListDbSystemShapesPaginator(conn, &input) + var out odb.ListDbSystemShapesOutput + for paginator.HasMorePages() { + page, err := paginator.NextPage(ctx) + if err != nil { + resp.Diagnostics.AddError( + create.ProblemStandardMessage(names.ODB, create.ErrActionReading, DSNameDbSystemShapesList, "", err), + err.Error(), + ) + return + } + + if page != nil && len(page.DbSystemShapes) > 0 { + out.DbSystemShapes = append(out.DbSystemShapes, page.DbSystemShapes...) + } + } + resp.Diagnostics.Append(flex.Flatten(ctx, out, &data)...) + if resp.Diagnostics.HasError() { + return + } + + resp.Diagnostics.Append(resp.State.Set(ctx, &data)...) +} + +type dbSystemShapesListDataSourceModel struct { + framework.WithRegionModel + AvailabilityZoneId types.String `tfsdk:"availability_zone_id"` + DbSystemShapes fwtypes.ListNestedObjectValueOf[dbSystemShapeDataSourceModel] `tfsdk:"db_system_shapes"` +} + +type dbSystemShapeDataSourceModel struct { + AvailableCoreCount types.Int32 `tfsdk:"available_core_count"` + AvailableCoreCountPerNode types.Int32 `tfsdk:"available_core_count_per_node"` + AvailableDataStorageInTBs types.Int32 `tfsdk:"available_data_storage_in_tbs"` + AvailableDataStoragePerServerInTBs types.Int32 `tfsdk:"available_data_storage_per_server_in_tbs"` + AvailableDbNodePerNodeInGBs types.Int32 `tfsdk:"available_db_node_per_node_in_gbs"` + AvailableDbNodeStorageInGBs types.Int32 `tfsdk:"available_db_node_storage_in_gbs"` + AvailableMemoryInGBs types.Int32 `tfsdk:"available_memory_in_gbs"` + AvailableMemoryPerNodeInGBs types.Int32 `tfsdk:"available_memory_per_node_in_gbs"` + CoreCountIncrement types.Int32 `tfsdk:"core_count_increment"` + MaxStorageCount types.Int32 `tfsdk:"max_storage_count"` + MaximumNodeCount types.Int32 `tfsdk:"maximum_node_count"` + MinCoreCountPerNode types.Int32 `tfsdk:"min_core_count_per_node"` + MinDataStorageInTBs types.Int32 `tfsdk:"min_data_storage_in_tbs"` + MinDbNodeStoragePerNodeInGBs types.Int32 `tfsdk:"min_db_node_storage_per_node_in_gbs"` + MinMemoryPerNodeInGBs types.Int32 `tfsdk:"min_memory_per_node_in_gbs"` + MinStorageCount types.Int32 `tfsdk:"min_storage_count"` + MinimumCoreCount types.Int32 `tfsdk:"minimum_core_count"` + MinimumNodeCount types.Int32 `tfsdk:"minimum_node_count"` + Name types.String `tfsdk:"name"` + RuntimeMinimumCoreCount types.Int32 `tfsdk:"runtime_minimum_core_count"` + ShapeFamily types.String `tfsdk:"shape_family"` + ShapeType types.String `tfsdk:"shape_type"` +} diff --git a/internal/service/odb/db_system_shapes_list_data_source_test.go b/internal/service/odb/db_system_shapes_list_data_source_test.go new file mode 100644 index 000000000000..05192159f267 --- /dev/null +++ b/internal/service/odb/db_system_shapes_list_data_source_test.go @@ -0,0 +1,49 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +package odb_test + +import ( + "fmt" + + "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 TestAccODBDbSystemShapesListDataSource_basic(t *testing.T) { + ctx := acctest.Context(t) + // TIP: This is a long-running test guard for tests that run longer than + // 300s (5 min) generally. + if testing.Short() { + t.Skip("skipping long-running test in short mode") + } + + dataSourceName := "data.aws_odb_db_system_shapes_list.test" + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { + acctest.PreCheck(ctx, t) + }, + ErrorCheck: acctest.ErrorCheck(t, names.ODBServiceID), + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + Steps: []resource.TestStep{ + { + Config: testAccDbSystemShapesListDataSourceConfig_basic("use1-az6"), + Check: resource.ComposeAggregateTestCheckFunc( + resource.TestCheckResourceAttr(dataSourceName, "db_system_shapes.#", "2"), + ), + }, + }, + }) +} + +func testAccDbSystemShapesListDataSourceConfig_basic(availabilityZoneId string) string { + return fmt.Sprintf(` +data "aws_odb_db_system_shapes_list" "test"{ + availability_zone_id = %[1]q +} +`, availabilityZoneId) +} diff --git a/internal/service/odb/gi_versions_list_data_source.go b/internal/service/odb/gi_versions_list_data_source.go index e0f6189e1dd4..bf45e21cf5d5 100644 --- a/internal/service/odb/gi_versions_list_data_source.go +++ b/internal/service/odb/gi_versions_list_data_source.go @@ -5,6 +5,7 @@ package odb import ( "context" + "fmt" "github.com/aws/aws-sdk-go-v2/service/odb" @@ -42,8 +43,13 @@ func (d *dataSourceGiVersionsList) Schema(ctx context.Context, req datasource.Sc }, Blocks: map[string]schema.Block{ "gi_versions": schema.ListNestedBlock{ - Description: "List of GI Versions.", - CustomType: fwtypes.NewListNestedObjectTypeOf[giVersionSummaryModel](ctx), + Description: fmt.Sprint(" (structure)\n " + + "Information about a specific version of Oracle Grid\n" + + "Infrastructure (GI) software that can be installed on a VM\n " + + "cluster.\n\n " + + "version -> (string)\n " + + "The GI software version."), + CustomType: fwtypes.NewListNestedObjectTypeOf[giVersionSummaryModel](ctx), NestedObject: schema.NestedBlockObject{ Attributes: map[string]schema.Attribute{ "version": schema.StringAttribute{ diff --git a/internal/service/odb/service_package_gen.go b/internal/service/odb/service_package_gen.go index 1b10bd698992..3d85272f49de 100644 --- a/internal/service/odb/service_package_gen.go +++ b/internal/service/odb/service_package_gen.go @@ -39,6 +39,12 @@ func (p *servicePackage) FrameworkDataSources(ctx context.Context) []*inttypes.S Name: "Db Servers List", Region: unique.Make(inttypes.ResourceRegionDefault()), }, + { + Factory: newDataSourceDbSystemShapesList, + TypeName: "aws_odb_db_system_shapes_list", + Name: "Db System Shapes List", + Region: unique.Make(inttypes.ResourceRegionDefault()), + }, { Factory: newDataSourceGiVersionsList, TypeName: "aws_odb_gi_versions_list", From 1549ddbf14fe102962535450fa1e90205e910c23 Mon Sep 17 00:00:00 2001 From: Asim Date: Tue, 15 Jul 2025 20:04:39 +0100 Subject: [PATCH 356/365] list exa added with documentation --- ...xadata_infrastructures_list_data_source.go | 91 +++++++++++++ ...a_infrastructures_list_data_source_test.go | 120 ++++++++++++++++++ internal/service/odb/service_package_gen.go | 6 + 3 files changed, 217 insertions(+) create mode 100644 internal/service/odb/cloud_exadata_infrastructures_list_data_source.go create mode 100644 internal/service/odb/cloud_exadata_infrastructures_list_data_source_test.go diff --git a/internal/service/odb/cloud_exadata_infrastructures_list_data_source.go b/internal/service/odb/cloud_exadata_infrastructures_list_data_source.go new file mode 100644 index 000000000000..c7acfa3dc212 --- /dev/null +++ b/internal/service/odb/cloud_exadata_infrastructures_list_data_source.go @@ -0,0 +1,91 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +package odb + +import ( + "context" + "github.com/aws/aws-sdk-go-v2/service/odb" + "github.com/hashicorp/terraform-plugin-framework/attr" + "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/create" + "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/names" +) + +// @FrameworkDataSource("aws_odb_cloud_exadata_infrastructures_list", name="Cloud Exadata Infrastructures List") +func newDataSourceCloudExadataInfrastructuresList(context.Context) (datasource.DataSourceWithConfigure, error) { + return &dataSourceCloudExadataInfrastructuresList{}, nil +} + +const ( + DSNameCloudExadataInfrastructuresList = "Cloud Exadata Infrastructures List Data Source" +) + +type dataSourceCloudExadataInfrastructuresList struct { + framework.DataSourceWithModel[cloudExadataInfrastructuresListDataSourceModel] +} + +func (d *dataSourceCloudExadataInfrastructuresList) Schema(ctx context.Context, req datasource.SchemaRequest, resp *datasource.SchemaResponse) { + resp.Schema = schema.Schema{ + Attributes: map[string]schema.Attribute{ + "cloud_exadata_infrastructures": schema.ListAttribute{ + Computed: true, + Description: "List of Cloud Exadata Infrastructures (OCID, ID, ARN and OCI URL)", + CustomType: fwtypes.NewListNestedObjectTypeOf[cloudExadataInfrastructureDataSourceListSummary](ctx), + ElementType: types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "arn": types.StringType, + "id": types.StringType, + "oci_url": types.StringType, + "ocid": types.StringType, + }, + }, + }, + }, + } + +} + +func (d *dataSourceCloudExadataInfrastructuresList) Read(ctx context.Context, req datasource.ReadRequest, resp *datasource.ReadResponse) { + + conn := d.Meta().ODBClient(ctx) + + var data cloudExadataInfrastructuresListDataSourceModel + resp.Diagnostics.Append(req.Config.Get(ctx, &data)...) + if resp.Diagnostics.HasError() { + return + } + + out, err := conn.ListCloudExadataInfrastructures(ctx, &odb.ListCloudExadataInfrastructuresInput{}) + if err != nil { + resp.Diagnostics.AddError( + create.ProblemStandardMessage(names.ODB, create.ErrActionReading, DSNameCloudExadataInfrastructuresList, "", err), + err.Error(), + ) + return + } + + resp.Diagnostics.Append(flex.Flatten(ctx, out, &data)...) + if resp.Diagnostics.HasError() { + return + } + + resp.Diagnostics.Append(resp.State.Set(ctx, &data)...) +} + +type cloudExadataInfrastructuresListDataSourceModel struct { + framework.WithRegionModel + CloudExadataInfrastructures fwtypes.ListNestedObjectValueOf[cloudExadataInfrastructureDataSourceListSummary] `tfsdk:"cloud_exadata_infrastructures"` +} + +type cloudExadataInfrastructureDataSourceListSummary struct { + CloudExadataInfrastructureArn types.String `tfsdk:"arn"` + CloudExadataInfrastructureId types.String `tfsdk:"id"` + OciUrl types.String `tfsdk:"oci_url"` + Ocid types.String `tfsdk:"ocid"` +} diff --git a/internal/service/odb/cloud_exadata_infrastructures_list_data_source_test.go b/internal/service/odb/cloud_exadata_infrastructures_list_data_source_test.go new file mode 100644 index 000000000000..c8a43c742e80 --- /dev/null +++ b/internal/service/odb/cloud_exadata_infrastructures_list_data_source_test.go @@ -0,0 +1,120 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +package odb_test + +import ( + "context" + "errors" + "fmt" + "github.com/hashicorp/terraform-plugin-testing/terraform" + "github.com/hashicorp/terraform-provider-aws/internal/create" + tfodb "github.com/hashicorp/terraform-provider-aws/internal/service/odb" + "strconv" + "testing" + + "github.com/aws/aws-sdk-go-v2/service/odb" + + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + + "github.com/hashicorp/terraform-provider-aws/internal/acctest" + "github.com/hashicorp/terraform-provider-aws/internal/conns" + + "github.com/hashicorp/terraform-provider-aws/names" +) + +type listExaInfraTest struct { +} + +func TestAccODBCloudExadataInfrastructuresListDataSource_basic(t *testing.T) { + ctx := acctest.Context(t) + var listExaInfraDSTest = listExaInfraTest{} + var infraList odb.ListCloudExadataInfrastructuresOutput + + dataSourceName := "data.aws_odb_cloud_exadata_infrastructures_list.test" + resource.Test(t, resource.TestCase{ + PreCheck: func() { + acctest.PreCheck(ctx, t) + listExaInfraDSTest.testAccPreCheck(ctx, t) + }, + ErrorCheck: acctest.ErrorCheck(t, names.ODBServiceID), + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + Steps: []resource.TestStep{ + { + Config: listExaInfraDSTest.basic(), + Check: resource.ComposeAggregateTestCheckFunc( + + resource.ComposeTestCheckFunc(func(s *terraform.State) error { + listExaInfraDSTest.countExaInfrastructures(ctx, dataSourceName, &infraList) + resource.TestCheckResourceAttr(dataSourceName, "cloud_exadata_infrastructures.#", strconv.Itoa(len(infraList.CloudExadataInfrastructures))) + return nil + }, + ), + ), + }, + }, + }) +} + +func (listExaInfraTest) basic() string { + config := fmt.Sprintf(` + + +data "aws_odb_cloud_exadata_infrastructures_list" "test" { + +} +`) + return config +} + +/*func (listExaInfraTest) countExaInfrastructures(ctx context.Context, t *testing.T, exaInfraDatalistTest *listExaInfraTest) int { + conn := acctest.Provider.Meta().(*conns.AWSClient).ODBClient(ctx) + + input := &odb.ListCloudExadataInfrastructuresInput{} + + out, err := conn.ListCloudExadataInfrastructures(ctx, input) + + if acctest.PreCheckSkipError(err) { + t.Skipf("skipping acceptance testing: %s", err) + } + if err != nil { + t.Fatalf("unexpected PreCheck error: %s", err) + } + exaInfraDatalistTest.count = len(out.CloudExadataInfrastructures) + fmt.Println("----------", exaInfraDatalistTest.count) + return len(out.CloudExadataInfrastructures) +}*/ + +func (listExaInfraTest) countExaInfrastructures(ctx context.Context, name string, listOfInfra *odb.ListCloudExadataInfrastructuresOutput) resource.TestCheckFunc { + return func(s *terraform.State) error { + rs, ok := s.RootModule().Resources[name] + if !ok { + return create.Error(names.ODB, create.ErrActionCheckingExistence, tfodb.ResNameCloudVmCluster, name, errors.New("not found")) + } + + conn := acctest.Provider.Meta().(*conns.AWSClient).ODBClient(ctx) + + resp, err := conn.ListCloudExadataInfrastructures(ctx, &odb.ListCloudExadataInfrastructuresInput{}) + if err != nil { + return create.Error(names.ODB, create.ErrActionCheckingExistence, tfodb.ResNameCloudVmCluster, rs.Primary.ID, err) + } + + listOfInfra.CloudExadataInfrastructures = resp.CloudExadataInfrastructures + + return nil + } +} +func (listExaInfraTest) testAccPreCheck(ctx context.Context, t *testing.T) { + conn := acctest.Provider.Meta().(*conns.AWSClient).ODBClient(ctx) + + input := &odb.ListCloudAutonomousVmClustersInput{} + + _, err := conn.ListCloudAutonomousVmClusters(ctx, input) + + if acctest.PreCheckSkipError(err) { + t.Skipf("skipping acceptance testing: %s", err) + } + if err != nil { + t.Fatalf("unexpected PreCheck error: %s", err) + } +} diff --git a/internal/service/odb/service_package_gen.go b/internal/service/odb/service_package_gen.go index 3d85272f49de..830d72a83d7e 100644 --- a/internal/service/odb/service_package_gen.go +++ b/internal/service/odb/service_package_gen.go @@ -27,6 +27,12 @@ func (p *servicePackage) FrameworkDataSources(ctx context.Context) []*inttypes.S Name: "Cloud Exadata Infrastructure", Region: unique.Make(inttypes.ResourceRegionDefault()), }, + { + Factory: newDataSourceCloudExadataInfrastructuresList, + TypeName: "aws_odb_cloud_exadata_infrastructures_list", + Name: "Cloud Exadata Infrastructures List", + Region: unique.Make(inttypes.ResourceRegionDefault()), + }, { Factory: newDataSourceCloudVmCluster, TypeName: "aws_odb_cloud_vm_cluster", From 9eb565a61859d0f23afd7a688f440b0d2588ba1f Mon Sep 17 00:00:00 2001 From: Asim Date: Tue, 15 Jul 2025 20:32:54 +0100 Subject: [PATCH 357/365] odb peering list added --- ...rk_peering_connections_list_data_source.go | 145 ++++++++++++++++++ ...ering_connections_list_data_source_test.go | 102 ++++++++++++ internal/service/odb/service_package_gen.go | 6 + 3 files changed, 253 insertions(+) create mode 100644 internal/service/odb/network_peering_connections_list_data_source.go create mode 100644 internal/service/odb/network_peering_connections_list_data_source_test.go diff --git a/internal/service/odb/network_peering_connections_list_data_source.go b/internal/service/odb/network_peering_connections_list_data_source.go new file mode 100644 index 000000000000..d0b2299edc3d --- /dev/null +++ b/internal/service/odb/network_peering_connections_list_data_source.go @@ -0,0 +1,145 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +package odb + +import ( + "context" + "github.com/aws/aws-sdk-go-v2/service/odb" + odbtypes "github.com/aws/aws-sdk-go-v2/service/odb/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/names" +) + +// Function annotations are used for datasource registration to the Provider. DO NOT EDIT. +// @FrameworkDataSource("aws_odb_network_peering_connections_list", name="Network Peering Connections List") +func newDataSourceNetworkPeeringConnectionsList(context.Context) (datasource.DataSourceWithConfigure, error) { + return &dataSourceNetworkPeeringConnectionsList{}, nil +} + +const ( + DSNameNetworkPeeringConnectionsList = "Network Peering Connections List Data Source" +) + +type dataSourceNetworkPeeringConnectionsList struct { + framework.DataSourceWithModel[odbNetworkPeeringConnectionsListDataSourceModel] +} + +func (d *dataSourceNetworkPeeringConnectionsList) Schema(ctx context.Context, req datasource.SchemaRequest, resp *datasource.SchemaResponse) { + resp.Schema = schema.Schema{ + Attributes: map[string]schema.Attribute{}, + Blocks: map[string]schema.Block{ + "odb_peering_connections": schema.ListNestedBlock{ + Description: " The list of ODB peering connections. A summary of an ODB peering connection.", + CustomType: fwtypes.NewListNestedObjectTypeOf[odbNetworkPeeringConnectionSummaryDataSourceModel](ctx), + NestedObject: schema.NestedBlockObject{ + Attributes: map[string]schema.Attribute{ + names.AttrID: schema.StringAttribute{ + Computed: true, + Description: "ID of the network peering connection.", + }, + + "display_name": schema.StringAttribute{ + Computed: true, + Description: "Display name for the network peering connection.", + }, + "status": schema.StringAttribute{ + Computed: true, + CustomType: fwtypes.StringEnumType[odbtypes.ResourceStatus](), + Description: "Status of this network peering connection.", + }, + "status_reason": schema.StringAttribute{ + Computed: true, + Description: "Status reason of this network peering connection.", + }, + names.AttrARN: framework.ARNAttributeComputedOnly(), + "odb_network_arn": schema.StringAttribute{ + Computed: true, + Description: "The ARN of the ODB network peering connection.", + }, + "odb_peering_connection_type": schema.StringAttribute{ + Computed: true, + Description: "The type of the ODB peering connection.", + }, + "percent_progress": schema.Float32Attribute{ + Computed: true, + Description: "The percentage of progress made in network peering .", + }, + }, + }, + }, + }, + } +} + +func (d *dataSourceNetworkPeeringConnectionsList) Read(ctx context.Context, req datasource.ReadRequest, resp *datasource.ReadResponse) { + + conn := d.Meta().ODBClient(ctx) + + var data odbNetworkPeeringConnectionsListDataSourceModel + resp.Diagnostics.Append(req.Config.Get(ctx, &data)...) + if resp.Diagnostics.HasError() { + return + } + + out, err := conn.ListOdbPeeringConnections(ctx, &odb.ListOdbPeeringConnectionsInput{}) + listOfPeerConnections := make([]peeringConnectionSummaryRead, 0) + if err == nil && out.OdbPeeringConnections != nil { + for _, peerConn := range out.OdbPeeringConnections { + peerConnSummary := peeringConnectionSummaryRead{ + OdbPeeringConnectionId: peerConn.OdbPeeringConnectionId, + DisplayName: peerConn.DisplayName, + OdbNetworkArn: peerConn.OdbNetworkArn, + OdbPeeringConnectionArn: peerConn.OdbPeeringConnectionArn, + OdbPeeringConnectionType: peerConn.OdbPeeringConnectionType, + PeerNetworkArn: peerConn.PeerNetworkArn, + PercentProgress: peerConn.PercentProgress, + Status: peerConn.Status, + StatusReason: peerConn.StatusReason, + } + listOfPeerConnections = append(listOfPeerConnections, peerConnSummary) + } + resp.Diagnostics.Append(flex.Flatten(ctx, listOdbPeeringConnectionsOutputRead{ + OdbPeeringConnections: listOfPeerConnections, + }, &data)...) + if resp.Diagnostics.HasError() { + return + + } + } + resp.Diagnostics.Append(resp.State.Set(ctx, &data)...) +} + +type odbNetworkPeeringConnectionsListDataSourceModel struct { + framework.WithRegionModel + OdbPeeringConnections fwtypes.ListNestedObjectValueOf[odbNetworkPeeringConnectionSummaryDataSourceModel] `tfsdk:"odb_peering_connections"` +} +type odbNetworkPeeringConnectionSummaryDataSourceModel struct { + OdbPeeringConnectionId types.String `tfsdk:"id"` + DisplayName types.String `tfsdk:"display_name"` + Status fwtypes.StringEnum[odbtypes.ResourceStatus] `tfsdk:"status"` + StatusReason types.String `tfsdk:"status_reason"` + OdbPeeringConnectionArn types.String `tfsdk:"arn"` + OdbNetworkArn types.String `tfsdk:"odb_network_arn"` + OdbPeeringConnectionType types.String `tfsdk:"odb_peering_connection_type"` + PercentProgress types.Float32 `tfsdk:"percent_progress"` +} +type peeringConnectionSummaryRead struct { + OdbPeeringConnectionId *string + DisplayName *string + OdbNetworkArn *string + OdbPeeringConnectionArn *string + OdbPeeringConnectionType *string + PeerNetworkArn *string + PercentProgress *float32 + Status odbtypes.ResourceStatus + StatusReason *string +} +type listOdbPeeringConnectionsOutputRead struct { + OdbPeeringConnections []peeringConnectionSummaryRead +} diff --git a/internal/service/odb/network_peering_connections_list_data_source_test.go b/internal/service/odb/network_peering_connections_list_data_source_test.go new file mode 100644 index 000000000000..c81701a77671 --- /dev/null +++ b/internal/service/odb/network_peering_connections_list_data_source_test.go @@ -0,0 +1,102 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +package odb_test + +import ( + "context" + "errors" + "fmt" + "github.com/hashicorp/terraform-plugin-testing/terraform" + "github.com/hashicorp/terraform-provider-aws/internal/create" + tfodb "github.com/hashicorp/terraform-provider-aws/internal/service/odb" + "strconv" + "testing" + + "github.com/aws/aws-sdk-go-v2/service/odb" + + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + + "github.com/hashicorp/terraform-provider-aws/internal/acctest" + "github.com/hashicorp/terraform-provider-aws/internal/conns" + + "github.com/hashicorp/terraform-provider-aws/names" +) + +type listOdbNetworkPeering struct { +} + +func TestAccODBNetworkPeeringBasic(t *testing.T) { + ctx := acctest.Context(t) + var listOfPeeredNwks = listOdbNetworkPeering{} + var output odb.ListOdbPeeringConnectionsOutput + + dataSourceName := "data.aws_odb_network_peering_connections_list.test" + resource.Test(t, resource.TestCase{ + PreCheck: func() { + acctest.PreCheck(ctx, t) + listOfPeeredNwks.testAccPreCheck(ctx, t) + }, + ErrorCheck: acctest.ErrorCheck(t, names.ODBServiceID), + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + Steps: []resource.TestStep{ + { + Config: listOfPeeredNwks.basic(), + Check: resource.ComposeAggregateTestCheckFunc( + + resource.ComposeTestCheckFunc(func(s *terraform.State) error { + listOfPeeredNwks.count(ctx, dataSourceName, &output) + resource.TestCheckResourceAttr(dataSourceName, "odb_peering_connections.#", strconv.Itoa(len(output.OdbPeeringConnections))) + return nil + }, + ), + ), + }, + }, + }) +} + +func (listOdbNetworkPeering) basic() string { + config := fmt.Sprintf(` + + +data "aws_odb_network_peering_connections_list" "test" { + +} +`) + return config +} + +func (listOdbNetworkPeering) count(ctx context.Context, name string, list *odb.ListOdbPeeringConnectionsOutput) resource.TestCheckFunc { + return func(s *terraform.State) error { + rs, ok := s.RootModule().Resources[name] + if !ok { + return create.Error(names.ODB, create.ErrActionCheckingExistence, tfodb.ResNameCloudVmCluster, name, errors.New("not found")) + } + + conn := acctest.Provider.Meta().(*conns.AWSClient).ODBClient(ctx) + + resp, err := conn.ListOdbPeeringConnections(ctx, &odb.ListOdbPeeringConnectionsInput{}) + if err != nil { + return create.Error(names.ODB, create.ErrActionCheckingExistence, tfodb.ResNameCloudVmCluster, rs.Primary.ID, err) + } + + list.OdbPeeringConnections = resp.OdbPeeringConnections + + return nil + } +} +func (listOdbNetworkPeering) testAccPreCheck(ctx context.Context, t *testing.T) { + conn := acctest.Provider.Meta().(*conns.AWSClient).ODBClient(ctx) + + input := &odb.ListOdbPeeringConnectionsInput{} + + _, err := conn.ListOdbPeeringConnections(ctx, input) + + if acctest.PreCheckSkipError(err) { + t.Skipf("skipping acceptance testing: %s", err) + } + if err != nil { + t.Fatalf("unexpected PreCheck error: %s", err) + } +} diff --git a/internal/service/odb/service_package_gen.go b/internal/service/odb/service_package_gen.go index 830d72a83d7e..8667ab191dd0 100644 --- a/internal/service/odb/service_package_gen.go +++ b/internal/service/odb/service_package_gen.go @@ -69,6 +69,12 @@ func (p *servicePackage) FrameworkDataSources(ctx context.Context) []*inttypes.S Name: "Network Peering Connection", Region: unique.Make(inttypes.ResourceRegionDefault()), }, + { + Factory: newDataSourceNetworkPeeringConnectionsList, + TypeName: "aws_odb_network_peering_connections_list", + Name: "Network Peering Connections List", + Region: unique.Make(inttypes.ResourceRegionDefault()), + }, } } From 5b814c743d0557ec226c333ca3dfcd6c9f0ed01b Mon Sep 17 00:00:00 2001 From: Asim Date: Wed, 16 Jul 2025 01:20:30 +0100 Subject: [PATCH 358/365] network list , vm cluster list, avmc list, test cases and documentation added --- .../odb/cloud_autonomous_vm_cluster.go | 114 ++++++++++---- ...cloud_autonomous_vm_cluster_data_source.go | 10 +- ...autonomous_vm_clusters_list_data_source.go | 93 +++++++++++ ...omous_vm_clusters_list_data_source_test.go | 102 ++++++++++++ ...a_infrastructures_list_data_source_test.go | 18 --- .../odb/cloud_vm_clusters_list_data_source.go | 96 ++++++++++++ ...cloud_vm_clusters_list_data_source_test.go | 102 ++++++++++++ internal/service/odb/network.go | 124 +++++++-------- .../service/odb/network_data_source_test.go | 11 -- .../service/odb/network_peering_connection.go | 10 +- internal/service/odb/network_test.go | 146 ++---------------- .../service/odb/networks_list_data_source.go | 95 ++++++++++++ .../odb/networks_list_data_source_test.go | 102 ++++++++++++ internal/service/odb/service_package_gen.go | 18 +++ ..._autonomous_vm_clusters_list.html.markdown | 47 ++++++ .../odb_cloud_vm_clusters_list.html.markdown | 47 ++++++ .../docs/d/odb_networks_list.html.markdown | 47 ++++++ 17 files changed, 912 insertions(+), 270 deletions(-) create mode 100644 internal/service/odb/cloud_autonomous_vm_clusters_list_data_source.go create mode 100644 internal/service/odb/cloud_autonomous_vm_clusters_list_data_source_test.go create mode 100644 internal/service/odb/cloud_vm_clusters_list_data_source.go create mode 100644 internal/service/odb/cloud_vm_clusters_list_data_source_test.go create mode 100644 internal/service/odb/networks_list_data_source.go create mode 100644 internal/service/odb/networks_list_data_source_test.go create mode 100644 website/docs/d/odb_cloud_autonomous_vm_clusters_list.html.markdown create mode 100644 website/docs/d/odb_cloud_vm_clusters_list.html.markdown create mode 100644 website/docs/d/odb_networks_list.html.markdown diff --git a/internal/service/odb/cloud_autonomous_vm_cluster.go b/internal/service/odb/cloud_autonomous_vm_cluster.go index 25add3e3982a..3b43185a7b30 100644 --- a/internal/service/odb/cloud_autonomous_vm_cluster.go +++ b/internal/service/odb/cloud_autonomous_vm_cluster.go @@ -84,52 +84,66 @@ func (r *resourceCloudAutonomousVmCluster) Schema(ctx context.Context, req resou PlanModifiers: []planmodifier.String{ stringplanmodifier.RequiresReplace(), }, + Description: "Exadata infrastructure id. Changing this will force terraform to create new resource.", }, "autonomous_data_storage_percentage": schema.Float32Attribute{ - Computed: true, + Computed: true, + Description: "The progress of the current operation on the Autonomous VM cluster, as a percentage.", }, "autonomous_data_storage_size_in_tbs": schema.Float64Attribute{ Required: true, PlanModifiers: []planmodifier.Float64{ float64planmodifier.RequiresReplace(), }, + Description: "The data storage size allocated for Autonomous Databases in the Autonomous VM cluster, in TB. Changing this will force terraform to create new resource.", }, "available_autonomous_data_storage_size_in_tbs": schema.Float64Attribute{ - Computed: true, + Computed: true, + Description: "The available data storage space for Autonomous Databases in the Autonomous VM cluster, in TB.", }, "available_container_databases": schema.Int32Attribute{ - Computed: true, + Computed: true, + Description: "The number of Autonomous CDBs that you can create with the currently available storage.", }, "available_cpus": schema.Float32Attribute{ - Computed: true, + Computed: true, + Description: "The number of CPU cores available for allocation to Autonomous Databases", }, "compute_model": schema.StringAttribute{ - CustomType: computeModel, - Computed: true, + CustomType: computeModel, + Computed: true, + Description: "The compute model of the Autonomous VM cluster: ECPU or OCPU.", }, "cpu_core_count": schema.Int32Attribute{ - Computed: true, + Computed: true, + Description: "The total number of CPU cores in the Autonomous VM cluster.", }, "cpu_core_count_per_node": schema.Int32Attribute{ Required: true, PlanModifiers: []planmodifier.Int32{ int32planmodifier.RequiresReplace(), }, + Description: "The number of CPU cores enabled per node in the Autonomous VM cluster.", }, "cpu_percentage": schema.Float32Attribute{ - Computed: true, + Computed: true, + Description: "The percentage of total CPU cores currently in use in the Autonomous VM cluster.", }, "created_at": schema.StringAttribute{ - Computed: true, + Computed: true, + Description: "The date and time when the Autonomous VM cluster was created.", }, "data_storage_size_in_gbs": schema.Float64Attribute{ - Computed: true, + Computed: true, + Description: "The total data storage allocated to the Autonomous VM cluster, in GB.", }, "data_storage_size_in_tbs": schema.Float64Attribute{ - Computed: true, + Computed: true, + Description: "The total data storage allocated to the Autonomous VM cluster, in TB.", }, "odb_node_storage_size_in_gbs": schema.Int32Attribute{ - Computed: true, + Computed: true, + Description: " The local node storage allocated to the Autonomous VM cluster, in gigabytes (GB)", }, "db_servers": schema.SetAttribute{ Required: true, @@ -138,6 +152,7 @@ func (r *resourceCloudAutonomousVmCluster) Schema(ctx context.Context, req resou PlanModifiers: []planmodifier.Set{ setplanmodifier.RequiresReplace(), }, + Description: "The database servers in the Autonomous VM cluster. Changing this will force terraform to create new resource.", }, "description": schema.StringAttribute{ Optional: true, @@ -145,6 +160,7 @@ func (r *resourceCloudAutonomousVmCluster) Schema(ctx context.Context, req resou stringplanmodifier.RequiresReplace(), stringplanmodifier.UseStateForUnknown(), }, + Description: "The description of the Autonomous VM cluster.", }, "display_name": schema.StringAttribute{ Required: true, @@ -152,18 +168,22 @@ func (r *resourceCloudAutonomousVmCluster) Schema(ctx context.Context, req resou PlanModifiers: []planmodifier.String{ stringplanmodifier.RequiresReplace(), }, + Description: "The display name of the Autonomous VM cluster. Changing this will force terraform to create new resource.", }, "domain": schema.StringAttribute{ - Computed: true, + Computed: true, + Description: "The domain name of the Autonomous VM cluster.", }, "exadata_storage_in_tbs_lowest_scaled_value": schema.Float64Attribute{ - Computed: true, + Computed: true, + Description: "The minimum value to which you can scale down the Exadata storage, in TB.", }, "hostname": schema.StringAttribute{ Computed: true, PlanModifiers: []planmodifier.String{ stringplanmodifier.UseStateForUnknown(), }, + Description: "The hostname of the Autonomous VM cluster.", }, "is_mtls_enabled_vm_cluster": schema.BoolAttribute{ Optional: true, @@ -172,6 +192,7 @@ func (r *resourceCloudAutonomousVmCluster) Schema(ctx context.Context, req resou boolplanmodifier.RequiresReplace(), boolplanmodifier.UseStateForUnknown(), }, + Description: "Indicates whether mutual TLS (mTLS) authentication is enabled for the Autonomous VM cluster. Changing this will force terraform to create new resource. ", }, "license_model": schema.StringAttribute{ CustomType: licenseModel, @@ -181,79 +202,100 @@ func (r *resourceCloudAutonomousVmCluster) Schema(ctx context.Context, req resou stringplanmodifier.RequiresReplace(), stringplanmodifier.UseStateForUnknown(), }, + Description: "The license model for the Autonomous VM cluster. Valid values are LICENSE_INCLUDED or BRING_YOUR_OWN_LICENSE . Changing this will force terraform to create new resource.", }, "max_acds_lowest_scaled_value": schema.Int32Attribute{ - Computed: true, + Computed: true, + Description: "The minimum value to which you can scale down the maximum number of Autonomous CDBs.", }, "memory_per_oracle_compute_unit_in_gbs": schema.Int32Attribute{ Required: true, PlanModifiers: []planmodifier.Int32{ int32planmodifier.RequiresReplace(), }, + Description: "The amount of memory allocated per Oracle Compute Unit, in GB. Changing this will force terraform to create new resource.", }, "memory_size_in_gbs": schema.Int32Attribute{ - Computed: true, + Computed: true, + Description: "The total amount of memory allocated to the Autonomous VM cluster, in gigabytes(GB).", }, "node_count": schema.Int32Attribute{ - Computed: true, + Computed: true, + Description: "The number of database server nodes in the Autonomous VM cluster.", }, "non_provisionable_autonomous_container_databases": schema.Int32Attribute{ - Computed: true, + Computed: true, + Description: "The number of Autonomous CDBs that can't be provisioned because of resource constraints.", }, "oci_resource_anchor_name": schema.StringAttribute{ - Computed: true, + Computed: true, + Description: "The name of the OCI resource anchor associated with this Autonomous VM cluster.", }, "oci_url": schema.StringAttribute{ - Computed: true, + Computed: true, + Description: "The URL for accessing the OCI console page for this Autonomous VM cluster.", }, "ocid": schema.StringAttribute{ - Computed: true, + Computed: true, + Description: "The Oracle Cloud Identifier (OCID) of the Autonomous VM cluster.", }, "odb_network_id": schema.StringAttribute{ Required: true, PlanModifiers: []planmodifier.String{ stringplanmodifier.RequiresReplace(), }, + Description: "The unique identifier of the ODB network associated with this Autonomous VM Cluster. Changing this will force terraform to create new resource.", }, "percent_progress": schema.Float32Attribute{ - Computed: true, + Computed: true, + Description: `The progress of the current operation on the Autonomous VM cluster, as a percentage.`, }, "provisionable_autonomous_container_databases": schema.Int32Attribute{ - Computed: true, + Computed: true, + Description: "The number of Autonomous CDBs that can be provisioned in the Autonomous VM cluster.", }, "provisioned_autonomous_container_databases": schema.Int32Attribute{ - Computed: true, + Computed: true, + Description: "The number of Autonomous CDBs currently provisioned in the Autonomous VM cluster.", }, "provisioned_cpus": schema.Float32Attribute{ - Computed: true, + Computed: true, + Description: "The number of CPUs provisioned in the Autonomous VM cluster.", }, "reclaimable_cpus": schema.Float32Attribute{ - Computed: true, + Computed: true, + Description: "The number of CPU cores that can be reclaimed from terminated or scaled-down Autonomous Databases.", }, "reserved_cpus": schema.Float32Attribute{ - Computed: true, + Computed: true, + Description: "The number of CPU cores reserved for system operations and redundancy.", }, "scan_listener_port_non_tls": schema.Int32Attribute{ Required: true, PlanModifiers: []planmodifier.Int32{ int32planmodifier.RequiresReplace(), }, + Description: "The SCAN listener port for non-TLS (TCP) protocol. The default is 1521. Changing this will force terraform to create new resource.", }, "scan_listener_port_tls": schema.Int32Attribute{ Required: true, PlanModifiers: []planmodifier.Int32{ int32planmodifier.RequiresReplace(), }, + Description: "The SCAN listener port for TLS (TCP) protocol. The default is 2484. Changing this will force terraform to create new resource.", }, "shape": schema.StringAttribute{ - Computed: true, + Computed: true, + Description: "The shape of the Exadata infrastructure for the Autonomous VM cluster.", }, "status": schema.StringAttribute{ - CustomType: status, - Computed: true, + CustomType: status, + Computed: true, + Description: "The status of the Autonomous VM cluster. Possible values include CREATING, AVAILABLE , UPDATING , DELETING , DELETED , FAILED ", }, - "reason": schema.StringAttribute{ - Computed: true, + "status_reason": schema.StringAttribute{ + Computed: true, + Description: "Additional information about the current status of the Autonomous VM cluster.", }, "time_zone": schema.StringAttribute{ Optional: true, @@ -262,18 +304,21 @@ func (r *resourceCloudAutonomousVmCluster) Schema(ctx context.Context, req resou stringplanmodifier.RequiresReplace(), stringplanmodifier.UseStateForUnknown(), }, + Description: "The time zone of the Autonomous VM cluster. Changing this will force terraform to create new resource.", }, "total_container_databases": schema.Int32Attribute{ Required: true, PlanModifiers: []planmodifier.Int32{ int32planmodifier.RequiresReplace(), }, + Description: "The total number of Autonomous Container Databases that can be created with the allocated local storage. Changing this will force terraform to create new resource.", }, "time_ords_certificate_expires": schema.StringAttribute{ Computed: true, }, "time_database_ssl_certificate_expires": schema.StringAttribute{ - Computed: true, + Computed: true, + Description: "The expiration date and time of the database SSL certificate.", }, "maintenance_window": schema.ObjectAttribute{ Required: true, @@ -281,6 +326,7 @@ func (r *resourceCloudAutonomousVmCluster) Schema(ctx context.Context, req resou PlanModifiers: []planmodifier.Object{ objectplanmodifier.RequiresReplace(), }, + Description: "The maintenance window of the Autonomous VM cluster.", AttributeTypes: map[string]attr.Type{ "days_of_week": types.SetType{ ElemType: fwtypes.StringEnumType[odbtypes.DayOfWeekName](), @@ -800,7 +846,7 @@ type cloudAutonomousVmClusterResourceModel struct { ScanListenerPortTls types.Int32 `tfsdk:"scan_listener_port_tls"` Shape types.String `tfsdk:"shape"` Status fwtypes.StringEnum[odbtypes.ResourceStatus] `tfsdk:"status"` - StatusReason types.String `tfsdk:"reason"` + StatusReason types.String `tfsdk:"status_reason"` TimeZone types.String `tfsdk:"time_zone"` TotalContainerDatabases types.Int32 `tfsdk:"total_container_databases"` Timeouts timeouts.Value `tfsdk:"timeouts"` diff --git a/internal/service/odb/cloud_autonomous_vm_cluster_data_source.go b/internal/service/odb/cloud_autonomous_vm_cluster_data_source.go index 6a2f13147170..c76e60c9ca74 100644 --- a/internal/service/odb/cloud_autonomous_vm_cluster_data_source.go +++ b/internal/service/odb/cloud_autonomous_vm_cluster_data_source.go @@ -46,10 +46,12 @@ func (d *dataSourceCloudAutonomousVmCluster) Schema(ctx context.Context, req dat names.AttrARN: framework.ARNAttributeComputedOnly(), names.AttrID: schema.StringAttribute{ - Required: true, + Required: true, + Description: "Unique ID of the Autonomous VM cluster.", }, "cloud_exadata_infrastructure_id": schema.StringAttribute{ - Computed: true, + Computed: true, + Description: "Exadata infrastructure id. Changing this will force terraform to create new resource.", }, "autonomous_data_storage_percentage": schema.Float32Attribute{ Computed: true, @@ -176,7 +178,7 @@ func (d *dataSourceCloudAutonomousVmCluster) Schema(ctx context.Context, req dat CustomType: status, Computed: true, }, - "reason": schema.StringAttribute{ + "status_reason": schema.StringAttribute{ Computed: true, }, "time_database_ssl_certificate_expires": schema.StringAttribute{ @@ -370,7 +372,7 @@ type cloudAutonomousVmClusterDataSourceModel struct { ScanListenerPortTls types.Int32 `tfsdk:"scan_listener_port_tls"` Shape types.String `tfsdk:"shape"` Status fwtypes.StringEnum[odbtypes.ResourceStatus] `tfsdk:"status"` - StatusReason types.String `tfsdk:"reason"` + StatusReason types.String `tfsdk:"status_reason"` TimeDatabaseSslCertificateExpires types.String `tfsdk:"time_database_ssl_certificate_expires" autoflex:",noflatten"` TimeOrdsCertificateExpires types.String `tfsdk:"time_ords_certificate_expires" autoflex:",noflatten"` TimeZone types.String `tfsdk:"time_zone"` diff --git a/internal/service/odb/cloud_autonomous_vm_clusters_list_data_source.go b/internal/service/odb/cloud_autonomous_vm_clusters_list_data_source.go new file mode 100644 index 000000000000..a9172c9943cd --- /dev/null +++ b/internal/service/odb/cloud_autonomous_vm_clusters_list_data_source.go @@ -0,0 +1,93 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +package odb + +import ( + "context" + "github.com/hashicorp/terraform-plugin-framework/attr" + + "github.com/aws/aws-sdk-go-v2/service/odb" + "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/create" + "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/names" +) + +// Function annotations are used for datasource registration to the Provider. DO NOT EDIT. +// @FrameworkDataSource("aws_odb_cloud_autonomous_vm_clusters_list", name="Cloud Autonomous Vm Clusters List") +func newDataSourceCloudAutonomousVmClustersList(context.Context) (datasource.DataSourceWithConfigure, error) { + return &dataSourceCloudAutonomousVmClustersList{}, nil +} + +const ( + DSNameCloudAutonomousVmClustersList = "Cloud Autonomous Vm Clusters List Data Source" +) + +type dataSourceCloudAutonomousVmClustersList struct { + framework.DataSourceWithModel[cloudAutonomousVmClusterListModel] +} + +func (d *dataSourceCloudAutonomousVmClustersList) Schema(ctx context.Context, req datasource.SchemaRequest, resp *datasource.SchemaResponse) { + resp.Schema = schema.Schema{ + Attributes: map[string]schema.Attribute{ + "cloud_autonomous_vm_clusters": schema.ListAttribute{ + Computed: true, + Description: "List of Cloud Autonomous VM Clusters (OCID, ID, ARN, OCI URL, Display Name)", + CustomType: fwtypes.NewListNestedObjectTypeOf[cloudAutonomousVmClusterSummary](ctx), + ElementType: types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "arn": types.StringType, + "id": types.StringType, + "oci_url": types.StringType, + "ocid": types.StringType, + "display_name": types.StringType, + }, + }, + }, + }, + } +} + +// Data sources only have a read method. +func (d *dataSourceCloudAutonomousVmClustersList) Read(ctx context.Context, req datasource.ReadRequest, resp *datasource.ReadResponse) { + + conn := d.Meta().ODBClient(ctx) + + var data cloudExadataInfrastructuresListDataSourceModel + resp.Diagnostics.Append(req.Config.Get(ctx, &data)...) + if resp.Diagnostics.HasError() { + return + } + + out, err := conn.ListCloudAutonomousVmClusters(ctx, &odb.ListCloudAutonomousVmClustersInput{}) + if err != nil { + resp.Diagnostics.AddError( + create.ProblemStandardMessage(names.ODB, create.ErrActionReading, DSNameCloudAutonomousVmClustersList, "", err), + err.Error(), + ) + return + } + resp.Diagnostics.Append(flex.Flatten(ctx, out, &data)...) + if resp.Diagnostics.HasError() { + return + } + resp.Diagnostics.Append(resp.State.Set(ctx, &data)...) +} + +type cloudAutonomousVmClusterListModel struct { + framework.WithRegionModel + CloudAutonomousVmClusters fwtypes.ListNestedObjectValueOf[cloudAutonomousVmClusterSummary] `tfsdk:"cloud_autonomous_vm_clusters"` +} + +type cloudAutonomousVmClusterSummary struct { + CloudExadataInfrastructureArn types.String `tfsdk:"arn"` + CloudAutonomousVmClusterId types.String `tfsdk:"id"` + OciUrl types.String `tfsdk:"oci_url"` + Ocid types.String `tfsdk:"ocid"` + DisplayName types.String `tfsdk:"display_name"` +} diff --git a/internal/service/odb/cloud_autonomous_vm_clusters_list_data_source_test.go b/internal/service/odb/cloud_autonomous_vm_clusters_list_data_source_test.go new file mode 100644 index 000000000000..aa2079d38bdd --- /dev/null +++ b/internal/service/odb/cloud_autonomous_vm_clusters_list_data_source_test.go @@ -0,0 +1,102 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +package odb_test + +import ( + "context" + "errors" + "fmt" + "strconv" + + "testing" + + "github.com/aws/aws-sdk-go-v2/service/odb" + + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" + "github.com/hashicorp/terraform-provider-aws/internal/acctest" + "github.com/hashicorp/terraform-provider-aws/internal/conns" + "github.com/hashicorp/terraform-provider-aws/internal/create" + + tfodb "github.com/hashicorp/terraform-provider-aws/internal/service/odb" + "github.com/hashicorp/terraform-provider-aws/names" +) + +type listAVMCListDSTest struct { +} + +func TestAccListAutonomousVmClusterDataSource(t *testing.T) { + ctx := acctest.Context(t) + var avmcListTest = listAVMCListDSTest{} + var output odb.ListCloudAutonomousVmClustersOutput + + dataSourceName := "data.aws_odb_cloud_autonomous_vm_clusters_list.test" + resource.Test(t, resource.TestCase{ + PreCheck: func() { + acctest.PreCheck(ctx, t) + avmcListTest.testAccPreCheck(ctx, t) + }, + ErrorCheck: acctest.ErrorCheck(t, names.ODBServiceID), + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + Steps: []resource.TestStep{ + { + Config: avmcListTest.basic(), + Check: resource.ComposeAggregateTestCheckFunc( + + resource.ComposeTestCheckFunc(func(s *terraform.State) error { + avmcListTest.count(ctx, dataSourceName, &output) + resource.TestCheckResourceAttr(dataSourceName, "cloud_autonomous_vm_clusters.#", strconv.Itoa(len(output.CloudAutonomousVmClusters))) + return nil + }, + ), + ), + }, + }, + }) +} + +func (listAVMCListDSTest) basic() string { + config := fmt.Sprintf(` + + +data "aws_odb_cloud_autonomous_vm_clusters_list" "test" { + +} +`) + return config +} + +func (listAVMCListDSTest) count(ctx context.Context, name string, list *odb.ListCloudAutonomousVmClustersOutput) resource.TestCheckFunc { + return func(s *terraform.State) error { + rs, ok := s.RootModule().Resources[name] + if !ok { + return create.Error(names.ODB, create.ErrActionCheckingExistence, tfodb.ResNameCloudVmCluster, name, errors.New("not found")) + } + + conn := acctest.Provider.Meta().(*conns.AWSClient).ODBClient(ctx) + + resp, err := conn.ListCloudAutonomousVmClusters(ctx, &odb.ListCloudAutonomousVmClustersInput{}) + if err != nil { + return create.Error(names.ODB, create.ErrActionCheckingExistence, tfodb.ResNameCloudVmCluster, rs.Primary.ID, err) + } + + list.CloudAutonomousVmClusters = resp.CloudAutonomousVmClusters + + return nil + } +} +func (listAVMCListDSTest) testAccPreCheck(ctx context.Context, t *testing.T) { + conn := acctest.Provider.Meta().(*conns.AWSClient).ODBClient(ctx) + + input := &odb.ListCloudAutonomousVmClustersInput{} + + _, err := conn.ListCloudAutonomousVmClusters(ctx, input) + + if acctest.PreCheckSkipError(err) { + t.Skipf("skipping acceptance testing: %s", err) + } + if err != nil { + t.Fatalf("unexpected PreCheck error: %s", err) + } +} diff --git a/internal/service/odb/cloud_exadata_infrastructures_list_data_source_test.go b/internal/service/odb/cloud_exadata_infrastructures_list_data_source_test.go index c8a43c742e80..7754562b6281 100644 --- a/internal/service/odb/cloud_exadata_infrastructures_list_data_source_test.go +++ b/internal/service/odb/cloud_exadata_infrastructures_list_data_source_test.go @@ -67,24 +67,6 @@ data "aws_odb_cloud_exadata_infrastructures_list" "test" { return config } -/*func (listExaInfraTest) countExaInfrastructures(ctx context.Context, t *testing.T, exaInfraDatalistTest *listExaInfraTest) int { - conn := acctest.Provider.Meta().(*conns.AWSClient).ODBClient(ctx) - - input := &odb.ListCloudExadataInfrastructuresInput{} - - out, err := conn.ListCloudExadataInfrastructures(ctx, input) - - if acctest.PreCheckSkipError(err) { - t.Skipf("skipping acceptance testing: %s", err) - } - if err != nil { - t.Fatalf("unexpected PreCheck error: %s", err) - } - exaInfraDatalistTest.count = len(out.CloudExadataInfrastructures) - fmt.Println("----------", exaInfraDatalistTest.count) - return len(out.CloudExadataInfrastructures) -}*/ - func (listExaInfraTest) countExaInfrastructures(ctx context.Context, name string, listOfInfra *odb.ListCloudExadataInfrastructuresOutput) resource.TestCheckFunc { return func(s *terraform.State) error { rs, ok := s.RootModule().Resources[name] diff --git a/internal/service/odb/cloud_vm_clusters_list_data_source.go b/internal/service/odb/cloud_vm_clusters_list_data_source.go new file mode 100644 index 000000000000..1e53d66bdd65 --- /dev/null +++ b/internal/service/odb/cloud_vm_clusters_list_data_source.go @@ -0,0 +1,96 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +package odb + +import ( + "context" + "github.com/hashicorp/terraform-plugin-framework/attr" + + "github.com/aws/aws-sdk-go-v2/service/odb" + + "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/create" + "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/names" +) + +// Function annotations are used for datasource registration to the Provider. DO NOT EDIT. +// @FrameworkDataSource("aws_odb_cloud_vm_clusters_list", name="Cloud Vm Clusters List") +func newDataSourceCloudVmClustersList(context.Context) (datasource.DataSourceWithConfigure, error) { + return &dataSourceCloudVmClustersList{}, nil +} + +const ( + DSNameCloudVmClustersList = "Cloud Vm Clusters List Data Source" +) + +type dataSourceCloudVmClustersList struct { + framework.DataSourceWithModel[dataSourceCloudVmClustersListModel] +} + +func (d *dataSourceCloudVmClustersList) Schema(ctx context.Context, req datasource.SchemaRequest, resp *datasource.SchemaResponse) { + resp.Schema = schema.Schema{ + Attributes: map[string]schema.Attribute{ + "cloud_vm_clusters": schema.ListAttribute{ + Computed: true, + Description: "List of Cloud VM Clusters (OCID, ID, ARN, OCI URL, Display Name)", + CustomType: fwtypes.NewListNestedObjectTypeOf[cloudAutonomousVmClusterSummary](ctx), + ElementType: types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "arn": types.StringType, + "id": types.StringType, + "oci_url": types.StringType, + "ocid": types.StringType, + "display_name": types.StringType, + }, + }, + }, + }, + } +} + +// Data sources only have a read method. +func (d *dataSourceCloudVmClustersList) Read(ctx context.Context, req datasource.ReadRequest, resp *datasource.ReadResponse) { + + conn := d.Meta().ODBClient(ctx) + + var data dataSourceCloudVmClustersListModel + resp.Diagnostics.Append(req.Config.Get(ctx, &data)...) + if resp.Diagnostics.HasError() { + return + } + + out, err := conn.ListCloudVmClusters(ctx, &odb.ListCloudVmClustersInput{}) + if err != nil { + resp.Diagnostics.AddError( + create.ProblemStandardMessage(names.ODB, create.ErrActionReading, DSNameCloudVmClustersList, "", err), + err.Error(), + ) + return + } + + resp.Diagnostics.Append(flex.Flatten(ctx, out, &data)...) + if resp.Diagnostics.HasError() { + return + } + + resp.Diagnostics.Append(resp.State.Set(ctx, &data)...) +} + +type dataSourceCloudVmClustersListModel struct { + framework.WithRegionModel + CloudVmClusters fwtypes.ListNestedObjectValueOf[cloudVmClusterSummary] `tfsdk:"cloud_vm_clusters"` +} + +type cloudVmClusterSummary struct { + CloudExadataInfrastructureArn types.String `tfsdk:"arn"` + CloudAutonomousVmClusterId types.String `tfsdk:"id"` + OciUrl types.String `tfsdk:"oci_url"` + Ocid types.String `tfsdk:"ocid"` + DisplayName types.String `tfsdk:"display_name"` +} diff --git a/internal/service/odb/cloud_vm_clusters_list_data_source_test.go b/internal/service/odb/cloud_vm_clusters_list_data_source_test.go new file mode 100644 index 000000000000..08973f1ed452 --- /dev/null +++ b/internal/service/odb/cloud_vm_clusters_list_data_source_test.go @@ -0,0 +1,102 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +package odb_test + +import ( + "context" + "errors" + "fmt" + "strconv" + + "testing" + + "github.com/aws/aws-sdk-go-v2/service/odb" + + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" + "github.com/hashicorp/terraform-provider-aws/internal/acctest" + "github.com/hashicorp/terraform-provider-aws/internal/conns" + "github.com/hashicorp/terraform-provider-aws/internal/create" + + tfodb "github.com/hashicorp/terraform-provider-aws/internal/service/odb" + "github.com/hashicorp/terraform-provider-aws/names" +) + +type listVMCListDSTest struct { +} + +func TestAccListVmClusterDataSource(t *testing.T) { + ctx := acctest.Context(t) + var vmcListTest = listVMCListDSTest{} + var output odb.ListCloudVmClustersOutput + + dataSourceName := "data.aws_odb_cloud_vm_clusters_list.test" + resource.Test(t, resource.TestCase{ + PreCheck: func() { + acctest.PreCheck(ctx, t) + vmcListTest.testAccPreCheck(ctx, t) + }, + ErrorCheck: acctest.ErrorCheck(t, names.ODBServiceID), + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + Steps: []resource.TestStep{ + { + Config: vmcListTest.basic(), + Check: resource.ComposeAggregateTestCheckFunc( + + resource.ComposeTestCheckFunc(func(s *terraform.State) error { + vmcListTest.count(ctx, dataSourceName, &output) + resource.TestCheckResourceAttr(dataSourceName, "cloud_autonomous_vm_clusters.#", strconv.Itoa(len(output.CloudVmClusters))) + return nil + }, + ), + ), + }, + }, + }) +} + +func (listVMCListDSTest) basic() string { + config := fmt.Sprintf(` + + +data "aws_odb_cloud_vm_clusters_list" "test" { + +} +`) + return config +} + +func (listVMCListDSTest) count(ctx context.Context, name string, list *odb.ListCloudVmClustersOutput) resource.TestCheckFunc { + return func(s *terraform.State) error { + rs, ok := s.RootModule().Resources[name] + if !ok { + return create.Error(names.ODB, create.ErrActionCheckingExistence, tfodb.ResNameCloudVmCluster, name, errors.New("not found")) + } + + conn := acctest.Provider.Meta().(*conns.AWSClient).ODBClient(ctx) + + resp, err := conn.ListCloudVmClusters(ctx, &odb.ListCloudVmClustersInput{}) + if err != nil { + return create.Error(names.ODB, create.ErrActionCheckingExistence, tfodb.ResNameCloudVmCluster, rs.Primary.ID, err) + } + + list.CloudVmClusters = resp.CloudVmClusters + + return nil + } +} +func (listVMCListDSTest) testAccPreCheck(ctx context.Context, t *testing.T) { + conn := acctest.Provider.Meta().(*conns.AWSClient).ODBClient(ctx) + + input := &odb.ListCloudVmClustersInput{} + + _, err := conn.ListCloudVmClusters(ctx, input) + + if acctest.PreCheckSkipError(err) { + t.Skipf("skipping acceptance testing: %s", err) + } + if err != nil { + t.Fatalf("unexpected PreCheck error: %s", err) + } +} diff --git a/internal/service/odb/network.go b/internal/service/odb/network.go index 35f954778b7d..57d4756ef85c 100644 --- a/internal/service/odb/network.go +++ b/internal/service/odb/network.go @@ -71,26 +71,15 @@ func (r *resourceNetwork) Schema(ctx context.Context, req resource.SchemaRequest names.AttrARN: framework.ARNAttributeComputedOnly(), names.AttrID: framework.IDAttribute(), "display_name": schema.StringAttribute{ - Required: true, - Validators: stringLengthBetween1And255Validator, - }, - "availability_zone": schema.StringAttribute{ - Optional: true, - Computed: true, - Validators: stringLengthBetween1And255Validator, - PlanModifiers: []planmodifier.String{ - stringplanmodifier.RequiresReplace(), - stringplanmodifier.UseStateForUnknown(), - }, + Required: true, + Description: "Display name for the network resource.", }, "availability_zone_id": schema.StringAttribute{ - Optional: true, - Computed: true, - Validators: stringLengthBetween1And255Validator, + Required: true, PlanModifiers: []planmodifier.String{ stringplanmodifier.RequiresReplace(), - stringplanmodifier.UseStateForUnknown(), }, + Description: "The AZ ID of the AZ where the ODB network is located. Changing this will force terraform to create new resource.", }, "client_subnet_cidr": schema.StringAttribute{ Required: true, @@ -98,6 +87,16 @@ func (r *resourceNetwork) Schema(ctx context.Context, req resource.SchemaRequest PlanModifiers: []planmodifier.String{ stringplanmodifier.RequiresReplace(), }, + Description: "The CIDR notation for the network resource. Changing this will force terraform to create new resource.\n" + + " Constraints:\n " + + "\t - Must not overlap with the CIDR range of the backup subnet.\n " + + "\t- Must not overlap with the CIDR ranges of the VPCs that are connected to the\n " + + " ODB network.\n " + + "\t- Must not use the following CIDR ranges that are reserved by OCI:\n " + + "\t - 100.106.0.0/16 and 100.107.0.0/16\n " + + "\t - 169.254.0.0/16\n " + + "\t- 224.0.0.0 - 239.255.255.255\n " + + "\t- 240.0.0.0 - 255.255.255.255", }, "backup_subnet_cidr": schema.StringAttribute{ Required: true, @@ -105,6 +104,16 @@ func (r *resourceNetwork) Schema(ctx context.Context, req resource.SchemaRequest PlanModifiers: []planmodifier.String{ stringplanmodifier.RequiresReplace(), }, + Description: " The CIDR range of the backup subnet for the ODB network. Changing this will force terraform to create new resource.\n" + + "\tConstraints:\n" + + "\t - Must not overlap with the CIDR range of the client subnet.\n" + + "\t - Must not overlap with the CIDR ranges of the VPCs that are connected to the\n" + + "\t ODB network.\n" + + "\t - Must not use the following CIDR ranges that are reserved by OCI:\n" + + "\t - 100.106.0.0/16 and 100.107.0.0/16\n" + + "\t - 169.254.0.0/16\n" + + "\t - 224.0.0.0 - 239.255.255.255\n" + + "\t - 240.0.0.0 - 255.255.255.255", }, "custom_domain_name": schema.StringAttribute{ @@ -113,33 +122,36 @@ func (r *resourceNetwork) Schema(ctx context.Context, req resource.SchemaRequest PlanModifiers: []planmodifier.String{ stringplanmodifier.RequiresReplace(), }, + Description: "The name of the custom domain that the network is located. custom_domain_name and default_dns_prefix both can't be given.", }, "default_dns_prefix": schema.StringAttribute{ Optional: true, - Validators: []validator.String{ - stringvalidator.LengthBetween(1, 15), - }, PlanModifiers: []planmodifier.String{ stringplanmodifier.RequiresReplace(), }, + Description: "The default DNS prefix for the network resource. Changing this will force terraform to create new resource.", }, "s3_access": schema.StringAttribute{ - Required: true, - CustomType: fwtypes.StringEnumType[odbtypes.Access](), + Required: true, + CustomType: fwtypes.StringEnumType[odbtypes.Access](), + Description: "Specifies the configuration for Amazon S3 access from the ODB network.", }, "zero_etl_access": schema.StringAttribute{ - Required: true, - CustomType: fwtypes.StringEnumType[odbtypes.Access](), + Required: true, + CustomType: fwtypes.StringEnumType[odbtypes.Access](), + Description: "pecifies the configuration for Zero-ETL access from the ODB network.", }, "s3_policy_document": schema.StringAttribute{ Optional: true, PlanModifiers: []planmodifier.String{ stringplanmodifier.UseStateForUnknown(), }, + Description: "Specifies the endpoint policy for Amazon S3 access from the ODB network.", }, "oci_dns_forwarding_configs": schema.ListAttribute{ - CustomType: fwtypes.NewListNestedObjectTypeOf[odbNwkOciDnsForwardingConfigResourceModel](ctx), - Computed: true, + CustomType: fwtypes.NewListNestedObjectTypeOf[odbNwkOciDnsForwardingConfigResourceModel](ctx), + Computed: true, + Description: "The DNS resolver endpoint in OCI for forwarding DNS queries for the ociPrivateZone domain.", ElementType: types.ObjectType{ AttrTypes: map[string]attr.Type{ "domain_name": types.StringType, @@ -148,41 +160,46 @@ func (r *resourceNetwork) Schema(ctx context.Context, req resource.SchemaRequest }, }, "oci_network_anchor_id": schema.StringAttribute{ - Computed: true, + Computed: true, + Description: "The unique identifier of the OCI network anchor for the ODB network.", }, "oci_network_anchor_url": schema.StringAttribute{ - Computed: true, + Computed: true, + Description: "The URL of the OCI network anchor for the ODB network.", }, "oci_resource_anchor_name": schema.StringAttribute{ - Computed: true, + Computed: true, + Description: "The name of the OCI resource anchor for the ODB network.", }, "oci_vcn_id": schema.StringAttribute{ - Computed: true, + Computed: true, + Description: "The unique identifier Oracle Cloud ID (OCID) of the OCI VCN for the ODB network.", }, "oci_vcn_url": schema.StringAttribute{ - Computed: true, + Computed: true, + Description: "The URL of the OCI VCN for the ODB network.", }, - /*"peered_cidrs": schema.SetAttribute{ - CustomType: fwtypes.SetOfStringType, - ElementType: types.StringType, - Optional: true, - },*/ "percent_progress": schema.Float32Attribute{ - Computed: true, + Computed: true, + Description: "The amount of progress made on the current operation on the ODB network, expressed as a percentage.", }, "status": schema.StringAttribute{ - CustomType: statusType, - Computed: true, + CustomType: statusType, + Computed: true, + Description: "The status of the network resource.", }, "status_reason": schema.StringAttribute{ - Computed: true, + Computed: true, + Description: "Additional information about the current status of the ODB network.", }, "created_at": schema.StringAttribute{ - Computed: true, + Computed: true, + Description: "The date and time when the ODB network was created.", }, "managed_services": schema.ObjectAttribute{ - Computed: true, - CustomType: fwtypes.NewObjectTypeOf[odbNetworkManagedServicesResourceModel](ctx), + Computed: true, + CustomType: fwtypes.NewObjectTypeOf[odbNetworkManagedServicesResourceModel](ctx), + Description: "The managed services configuration for the ODB network.", AttributeTypes: map[string]attr.Type{ "service_network_arn": types.StringType, "resource_gateway_arn": types.StringType, @@ -337,7 +354,7 @@ func (r *resourceNetwork) Create(ctx context.Context, req resource.CreateRequest plan.CreatedAt = types.StringValue(createdOdbNetwork.CreatedAt.Format(time.RFC3339)) resp.Diagnostics.Append(flex.Flatten(ctx, createdOdbNetwork, &plan, flex.WithIgnoredFieldNamesAppend("CreatedAt"), - flex.WithIgnoredFieldNamesAppend("PeeredCidrs"), flex.WithIgnoredFieldNamesAppend("S3Access"), + flex.WithIgnoredFieldNamesAppend("S3Access"), flex.WithIgnoredFieldNamesAppend("ZeroEtlAccess"), flex.WithIgnoredFieldNamesAppend("S3PolicyDocument"))...) @@ -402,7 +419,6 @@ func (r *resourceNetwork) Read(ctx context.Context, req resource.ReadRequest, re } state.CreatedAt = types.StringValue(out.CreatedAt.Format(time.RFC3339)) resp.Diagnostics.Append(flex.Flatten(ctx, out, &state, flex.WithIgnoredFieldNamesAppend("CreatedAt"), - //flex.WithIgnoredFieldNamesAppend("PeeredCidrs"), flex.WithIgnoredFieldNamesAppend("S3Access"), flex.WithIgnoredFieldNamesAppend("ZeroEtlAccess"), flex.WithIgnoredFieldNamesAppend("S3PolicyDocument"))...) if resp.Diagnostics.HasError() { @@ -774,31 +790,9 @@ func sweepNetworks(ctx context.Context, client *conns.AWSClient) ([]sweep.Sweepa return sweepResources, nil } -func FindAddRemovedCidrsFromOdbNetWork(newCidrs, oldCiders []string) map[string]int { - - addedRemovedCidrs := make(map[string]int) - //1 indicates newly added cidrs. Here we are assuming that all cidrs are new. - for _, nCidr := range newCidrs { - addedRemovedCidrs[nCidr] = 1 - } - //Now lets remove those which are present - for _, oCidr := range oldCiders { - //if cidr is present in the map; that means no change is required for that cidr so remove it - _, ok := addedRemovedCidrs[oCidr] - if ok { - delete(addedRemovedCidrs, oCidr) - } else { - addedRemovedCidrs[oCidr] = -1 - } - } - return addedRemovedCidrs - -} - type odbNetworkResourceModel struct { framework.WithRegionModel DisplayName types.String `tfsdk:"display_name"` - AvailabilityZone types.String `tfsdk:"availability_zone"` AvailabilityZoneId types.String `tfsdk:"availability_zone_id"` ClientSubnetCidr types.String `tfsdk:"client_subnet_cidr"` BackupSubnetCidr types.String `tfsdk:"backup_subnet_cidr"` diff --git a/internal/service/odb/network_data_source_test.go b/internal/service/odb/network_data_source_test.go index 7c2b0e0e42a4..6288968b8d9b 100644 --- a/internal/service/odb/network_data_source_test.go +++ b/internal/service/odb/network_data_source_test.go @@ -143,14 +143,3 @@ func (odbNetworkDataSourceTestCase) testAccOdbNetworkDataSourcePreCheck(ctx cont t.Fatalf("unexpected PreCheck error: %s", err) } } - -/*func (odbNetworkDataSourceTestCase) basicOdbNetworkDataSourceHardCoded(id string) string { - networkRes := fmt.Sprintf(` -data "aws_odb_network" "test" { - id = %[1]q -} - -`, id) - fmt.Println(networkRes) - return networkRes -}*/ diff --git a/internal/service/odb/network_peering_connection.go b/internal/service/odb/network_peering_connection.go index da85d72612c1..1ffb36e99b20 100644 --- a/internal/service/odb/network_peering_connection.go +++ b/internal/service/odb/network_peering_connection.go @@ -67,23 +67,23 @@ func (r *resourceNetworkPeeringConnection) Schema(ctx context.Context, req resou Required: true, PlanModifiers: []planmodifier.String{ stringplanmodifier.RequiresReplace(), - stringplanmodifier.UseStateForUnknown(), }, + Description: "Required field. The unique identifier of the ODB network that initiates the peering connection. " + + "A sample ID is odbpcx-abcdefgh12345678. Changing this will force terraform to create new resource.", }, "peer_network_id": schema.StringAttribute{ Required: true, PlanModifiers: []planmodifier.String{ stringplanmodifier.RequiresReplace(), - stringplanmodifier.UseStateForUnknown(), }, + Description: "Required field. The unique identifier of the ODB peering connection. Changing this will force terraform to create new resource", }, "display_name": schema.StringAttribute{ - Description: "Display name of the odb network peering connection.", + Description: "Display name of the odb network peering connection. Changing this will force terraform to create new resource", Required: true, PlanModifiers: []planmodifier.String{ stringplanmodifier.RequiresReplace(), - stringplanmodifier.UseStateForUnknown(), }, }, @@ -93,7 +93,7 @@ func (r *resourceNetworkPeeringConnection) Schema(ctx context.Context, req resou Computed: true, }, "status_reason": schema.StringAttribute{ - Description: "Status of the odb network peering connection.", + Description: "The reason for the current status of the ODB peering connection..", Computed: true, }, diff --git a/internal/service/odb/network_test.go b/internal/service/odb/network_test.go index 3cc45c8133aa..013b3ae710ec 100644 --- a/internal/service/odb/network_test.go +++ b/internal/service/odb/network_test.go @@ -17,7 +17,6 @@ import ( "github.com/hashicorp/terraform-provider-aws/internal/create" "github.com/hashicorp/terraform-provider-aws/internal/tfresource" "github.com/hashicorp/terraform-provider-aws/names" - "reflect" "testing" tfodb "github.com/hashicorp/terraform-provider-aws/internal/service/odb" @@ -31,61 +30,6 @@ var odbNetResourceTest = odbNetworkResourceTest{ displayNamePrefix: "tf-odb-net", } -func TestOdbNetworkAddRemovePerredCidrsUnitTest(t *testing.T) { - t.Parallel() - - testCases := []struct { - TestName string - OldCidrs []string - NewCidrs []string - AddRemoveCidrs map[string]int - }{ - { - TestName: "non empty new, empty old", - NewCidrs: []string{"10.0.0.0/24"}, - OldCidrs: []string{}, - AddRemoveCidrs: map[string]int{"10.0.0.0/24": 1}, - }, - { - TestName: "non empty new, non empty old", - NewCidrs: []string{"10.0.0.0/24"}, - OldCidrs: []string{"10.0.0.0/34"}, - AddRemoveCidrs: map[string]int{"10.0.0.0/24": 1, "10.0.0.0/34": -1}, - }, - { - TestName: "non empty new, non empty old all same", - NewCidrs: []string{"10.0.0.0/24"}, - OldCidrs: []string{"10.0.0.0/24"}, - AddRemoveCidrs: map[string]int{}, - }, - { - TestName: "empty new, non empty old all ", - NewCidrs: []string{}, - OldCidrs: []string{"10.0.0.0/24", "10.0.0.0/34"}, - AddRemoveCidrs: map[string]int{"10.0.0.0/24": -1, "10.0.0.0/34": -1}, - }, - } - - for _, testCase := range testCases { - t.Run(testCase.TestName, func(t *testing.T) { - t.Parallel() - addRemoveCidrs := tfodb.FindAddRemovedCidrsFromOdbNetWork(testCase.NewCidrs, testCase.OldCidrs) - - if addRemoveCidrs != nil { - if len(addRemoveCidrs) != len(testCase.AddRemoveCidrs) { - t.Fatalf("expected %d addRemoveCidrs, got %d", len(testCase.AddRemoveCidrs), len(addRemoveCidrs)) - } - if !reflect.DeepEqual(addRemoveCidrs, testCase.AddRemoveCidrs) { - t.Fatalf("expected %v, got %v", testCase.AddRemoveCidrs, addRemoveCidrs) - } - } else { - t.Error("addRemoveCidrs was nil") - } - - }) - } -} - // Basic test with bare minimum input func TestOdbNetworkBasic(t *testing.T) { ctx := acctest.Context(t) @@ -123,52 +67,9 @@ func TestOdbNetworkBasic(t *testing.T) { }) } -// with peered_cidr -func TestAccODBNetwork_only_with_peered_cidr(t *testing.T) { +func TestOdbNetworkWithAllParams(t *testing.T) { ctx := acctest.Context(t) - // TIP: This is a long-running test guard for tests that run longer than - // 300s (5 min) generally. - if testing.Short() { - t.Skip("skipping long-running test in short mode") - } - - var network odbtypes.OdbNetwork - rName := sdkacctest.RandomWithPrefix(odbNetResourceTest.displayNamePrefix) - resourceName := "aws_odb_network.test" - - resource.ParallelTest(t, resource.TestCase{ - PreCheck: func() { - acctest.PreCheck(ctx, t) - //testAccPreCheck(ctx, t) - }, - ErrorCheck: acctest.ErrorCheck(t, names.ODBServiceID), - ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, - CheckDestroy: odbNetResourceTest.testAccCheckNetworkDestroy(ctx), - Steps: []resource.TestStep{ - { - Config: odbNetResourceTest.basicOdbNetworkWithPeeredCidrs(rName), - Check: resource.ComposeAggregateTestCheckFunc( - func(state *terraform.State) error { - fmt.Println(state) - return nil - }, - odbNetResourceTest.testAccCheckNetworkExists(ctx, resourceName, &network), - ), - }, - { - ResourceName: resourceName, - ImportState: true, - ImportStateVerify: true, - }, - }, - }) -} -// TestAccODBNetwork_basic_with_peered_cidr_vpc_arn -func TestAccODBNetwork_with_peered_cidr_vpc_arn(t *testing.T) { - ctx := acctest.Context(t) - // TIP: This is a long-running test guard for tests that run longer than - // 300s (5 min) generally. if testing.Short() { t.Skip("skipping long-running test in short mode") } @@ -180,19 +81,15 @@ func TestAccODBNetwork_with_peered_cidr_vpc_arn(t *testing.T) { resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { acctest.PreCheck(ctx, t) - //testAccPreCheck(ctx, t) + odbNetResourceTest.testAccPreCheck(ctx, t) }, ErrorCheck: acctest.ErrorCheck(t, names.ODBServiceID), ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, CheckDestroy: odbNetResourceTest.testAccCheckNetworkDestroy(ctx), Steps: []resource.TestStep{ { - Config: odbNetResourceTest.basicOdbNetworkWithVPCArn(rName), + Config: odbNetResourceTest.odbNetworkWithAllParams(rName, "julia.com"), Check: resource.ComposeAggregateTestCheckFunc( - func(state *terraform.State) error { - fmt.Println(state) - return nil - }, odbNetResourceTest.testAccCheckNetworkExists(ctx, resourceName, &network), ), }, @@ -405,7 +302,7 @@ func (odbNetworkResourceTest) testAccPreCheck(ctx context.Context, t *testing.T) } }*/ -func (odbNetworkResourceTest) basicOdbNetworkWithPeeredCidrs(rName string) string { +func (odbNetworkResourceTest) basicOdbNetwork(rName string) string { networkRes := fmt.Sprintf(` @@ -414,17 +311,15 @@ resource "aws_odb_network" "test" { availability_zone_id = "use1-az6" client_subnet_cidr = "10.2.0.0/24" backup_subnet_cidr = "10.2.1.0/24" - peered_cidrs = ["10.32.0.0/24", "172.16.2.0/24", "172.16.0.0/16"] - tags = { - "env"= "dev" - } + s3_access = "DISABLED" + zero_etl_access = "DISABLED" } `, rName) return networkRes } -func (odbNetworkResourceTest) basicOdbNetwork(rName string) string { +func (odbNetworkResourceTest) odbNetworkWithAllParams(rName, customDomainName string) string { networkRes := fmt.Sprintf(` @@ -435,9 +330,10 @@ resource "aws_odb_network" "test" { backup_subnet_cidr = "10.2.1.0/24" s3_access = "DISABLED" zero_etl_access = "DISABLED" + custom_domain_name = %[2]q } -`, rName) +`, rName, customDomainName) return networkRes } @@ -450,6 +346,8 @@ resource "aws_odb_network" "test" { availability_zone_id = "use1-az6" client_subnet_cidr = "10.2.0.0/24" backup_subnet_cidr = "10.2.1.0/24" + s3_access = "DISABLED" + zero_etl_access = "DISABLED" } `, rName) return networkRes @@ -464,6 +362,8 @@ resource "aws_odb_network" "test" { availability_zone_id = "use1-az6" client_subnet_cidr = "10.2.0.0/24" backup_subnet_cidr = "10.2.1.0/24" + s3_access = "DISABLED" + zero_etl_access = "DISABLED" tags = { "env"= "dev" "foo"= "bar" @@ -472,23 +372,3 @@ resource "aws_odb_network" "test" { `, rName) return networkRes } - -func (odbNetworkResourceTest) basicOdbNetworkWithVPCArn(rName string) string { - networkRes := fmt.Sprintf(` - - -resource "aws_odb_network" "test" { - display_name = %[1]q - availability_zone_id = "use1-az6" - client_subnet_cidr = "10.2.0.0/24" - backup_subnet_cidr = "10.2.1.0/24" - peer_vpc_arn = "arn:aws:ec2:us-east-1:711387093194:vpc/vpc-0c6e9101b49f80ea3" - peered_cidrs = ["10.13.0.0/24", "172.16.2.0/24", "172.16.0.0/16"] - tags = { - "env"= "dev" - } -} - -`, rName) - return networkRes -} diff --git a/internal/service/odb/networks_list_data_source.go b/internal/service/odb/networks_list_data_source.go new file mode 100644 index 000000000000..55e87f71e4dd --- /dev/null +++ b/internal/service/odb/networks_list_data_source.go @@ -0,0 +1,95 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +package odb + +import ( + "context" + "github.com/hashicorp/terraform-plugin-framework/attr" + + "github.com/aws/aws-sdk-go-v2/service/odb" + "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/create" + "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/names" +) + +// Function annotations are used for datasource registration to the Provider. DO NOT EDIT. +// @FrameworkDataSource("aws_odb_networks_list", name="Networks List") +func newDataSourceNetworksList(context.Context) (datasource.DataSourceWithConfigure, error) { + return &dataSourceNetworksList{}, nil +} + +const ( + DSNameNetworksList = "Networks List Data Source" +) + +type dataSourceNetworksList struct { + framework.DataSourceWithModel[odbNetworksListModel] +} + +func (d *dataSourceNetworksList) Schema(ctx context.Context, req datasource.SchemaRequest, resp *datasource.SchemaResponse) { + resp.Schema = schema.Schema{ + Attributes: map[string]schema.Attribute{ + "odb_networks": schema.ListAttribute{ + Computed: true, + Description: "List of odb networks (OCID, ID, ARN, OCI URL, Display Name)", + CustomType: fwtypes.NewListNestedObjectTypeOf[cloudAutonomousVmClusterSummary](ctx), + ElementType: types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "arn": types.StringType, + "id": types.StringType, + "oci_url": types.StringType, + "ocid": types.StringType, + "display_name": types.StringType, + }, + }, + }, + }, + } +} + +// Data sources only have a read method. +func (d *dataSourceNetworksList) Read(ctx context.Context, req datasource.ReadRequest, resp *datasource.ReadResponse) { + + conn := d.Meta().ODBClient(ctx) + + var data odbNetworksListModel + resp.Diagnostics.Append(req.Config.Get(ctx, &data)...) + if resp.Diagnostics.HasError() { + return + } + + out, err := conn.ListOdbNetworks(ctx, &odb.ListOdbNetworksInput{}) + if err != nil { + resp.Diagnostics.AddError( + create.ProblemStandardMessage(names.ODB, create.ErrActionReading, DSNameNetworksList, "", err), + err.Error(), + ) + return + } + + resp.Diagnostics.Append(flex.Flatten(ctx, out, &data)...) + if resp.Diagnostics.HasError() { + return + } + + resp.Diagnostics.Append(resp.State.Set(ctx, &data)...) +} + +type odbNetworksListModel struct { + framework.WithRegionModel + OdbNetworks fwtypes.ListNestedObjectValueOf[odbNetworkSummary] `tfsdk:"odb_networks"` +} + +type odbNetworkSummary struct { + CloudExadataInfrastructureArn types.String `tfsdk:"arn"` + CloudAutonomousVmClusterId types.String `tfsdk:"id"` + OciUrl types.String `tfsdk:"oci_url"` + Ocid types.String `tfsdk:"ocid"` + DisplayName types.String `tfsdk:"display_name"` +} diff --git a/internal/service/odb/networks_list_data_source_test.go b/internal/service/odb/networks_list_data_source_test.go new file mode 100644 index 000000000000..65364abeb8be --- /dev/null +++ b/internal/service/odb/networks_list_data_source_test.go @@ -0,0 +1,102 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +package odb_test + +import ( + "context" + "errors" + "fmt" + "strconv" + + "testing" + + "github.com/aws/aws-sdk-go-v2/service/odb" + + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" + "github.com/hashicorp/terraform-provider-aws/internal/acctest" + "github.com/hashicorp/terraform-provider-aws/internal/conns" + "github.com/hashicorp/terraform-provider-aws/internal/create" + + tfodb "github.com/hashicorp/terraform-provider-aws/internal/service/odb" + "github.com/hashicorp/terraform-provider-aws/names" +) + +type odbNetworksListTestDS struct { +} + +func TestAccListOdbNetworksDataSource(t *testing.T) { + ctx := acctest.Context(t) + var networkListTest = odbNetworksListTestDS{} + var output odb.ListOdbNetworksOutput + + dataSourceName := "data.aws_odb_networks_list.test" + resource.Test(t, resource.TestCase{ + PreCheck: func() { + acctest.PreCheck(ctx, t) + networkListTest.testAccPreCheck(ctx, t) + }, + ErrorCheck: acctest.ErrorCheck(t, names.ODBServiceID), + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + Steps: []resource.TestStep{ + { + Config: networkListTest.basic(), + Check: resource.ComposeAggregateTestCheckFunc( + + resource.ComposeTestCheckFunc(func(s *terraform.State) error { + networkListTest.count(ctx, dataSourceName, &output) + resource.TestCheckResourceAttr(dataSourceName, "cloud_autonomous_vm_clusters.#", strconv.Itoa(len(output.OdbNetworks))) + return nil + }, + ), + ), + }, + }, + }) +} + +func (odbNetworksListTestDS) basic() string { + config := fmt.Sprintf(` + + +data "aws_odb_cloud_autonomous_vm_clusters_list" "test" { + +} +`) + return config +} + +func (odbNetworksListTestDS) count(ctx context.Context, name string, list *odb.ListOdbNetworksOutput) resource.TestCheckFunc { + return func(s *terraform.State) error { + rs, ok := s.RootModule().Resources[name] + if !ok { + return create.Error(names.ODB, create.ErrActionCheckingExistence, tfodb.ResNameCloudVmCluster, name, errors.New("not found")) + } + + conn := acctest.Provider.Meta().(*conns.AWSClient).ODBClient(ctx) + + resp, err := conn.ListOdbNetworks(ctx, &odb.ListOdbNetworksInput{}) + if err != nil { + return create.Error(names.ODB, create.ErrActionCheckingExistence, tfodb.ResNameCloudVmCluster, rs.Primary.ID, err) + } + + list.OdbNetworks = resp.OdbNetworks + + return nil + } +} +func (odbNetworksListTestDS) testAccPreCheck(ctx context.Context, t *testing.T) { + conn := acctest.Provider.Meta().(*conns.AWSClient).ODBClient(ctx) + + input := &odb.ListOdbNetworksInput{} + + _, err := conn.ListOdbNetworks(ctx, input) + + if acctest.PreCheckSkipError(err) { + t.Skipf("skipping acceptance testing: %s", err) + } + if err != nil { + t.Fatalf("unexpected PreCheck error: %s", err) + } +} diff --git a/internal/service/odb/service_package_gen.go b/internal/service/odb/service_package_gen.go index 8667ab191dd0..be8267f9c2d1 100644 --- a/internal/service/odb/service_package_gen.go +++ b/internal/service/odb/service_package_gen.go @@ -21,6 +21,12 @@ func (p *servicePackage) FrameworkDataSources(ctx context.Context) []*inttypes.S Name: "Cloud Autonomous Vm Cluster", Region: unique.Make(inttypes.ResourceRegionDefault()), }, + { + Factory: newDataSourceCloudAutonomousVmClustersList, + TypeName: "aws_odb_cloud_autonomous_vm_clusters_list", + Name: "Cloud Autonomous Vm Clusters List", + Region: unique.Make(inttypes.ResourceRegionDefault()), + }, { Factory: newDataSourceCloudExadataInfrastructure, TypeName: "aws_odb_cloud_exadata_infrastructure", @@ -39,6 +45,12 @@ func (p *servicePackage) FrameworkDataSources(ctx context.Context) []*inttypes.S Name: "Cloud Vm Cluster", Region: unique.Make(inttypes.ResourceRegionDefault()), }, + { + Factory: newDataSourceCloudVmClustersList, + TypeName: "aws_odb_cloud_vm_clusters_list", + Name: "Cloud Vm Clusters List", + Region: unique.Make(inttypes.ResourceRegionDefault()), + }, { Factory: newDataSourceDbServersList, TypeName: "aws_odb_db_servers_list", @@ -75,6 +87,12 @@ func (p *servicePackage) FrameworkDataSources(ctx context.Context) []*inttypes.S Name: "Network Peering Connections List", Region: unique.Make(inttypes.ResourceRegionDefault()), }, + { + Factory: newDataSourceNetworksList, + TypeName: "aws_odb_networks_list", + Name: "Networks List", + Region: unique.Make(inttypes.ResourceRegionDefault()), + }, } } diff --git a/website/docs/d/odb_cloud_autonomous_vm_clusters_list.html.markdown b/website/docs/d/odb_cloud_autonomous_vm_clusters_list.html.markdown new file mode 100644 index 000000000000..aaef5fcf4343 --- /dev/null +++ b/website/docs/d/odb_cloud_autonomous_vm_clusters_list.html.markdown @@ -0,0 +1,47 @@ +--- +subcategory: "Oracle Database@AWS" +layout: "aws" +page_title: "AWS: aws_odb_cloud_autonomous_vm_clusters_list" +description: |- + Provides details about an AWS Oracle Database@AWS Cloud Autonomous Vm Clusters List. +--- + + +# Data Source: aws_odb_cloud_autonomous_vm_clusters_list + +Provides details about an AWS Oracle Database@AWS Cloud Autonomous Vm Clusters List. + +## Example Usage + +### Basic Usage + +```terraform +data "aws_odb_cloud_autonomous_vm_clusters_list" "example" { +} +``` + +## Argument Reference + +The following arguments are required: + +* `example_arg` - (Required) Brief description of the required argument. + +The following arguments are optional: + +* `optional_arg` - (Optional) Brief description of the optional argument. + +## Attribute Reference + +This data source exports the following attributes in addition to the arguments above: + +* `arn` - ARN of the Cloud Autonomous Vm Clusters List. +* `example_attribute` - Brief description of the attribute. diff --git a/website/docs/d/odb_cloud_vm_clusters_list.html.markdown b/website/docs/d/odb_cloud_vm_clusters_list.html.markdown new file mode 100644 index 000000000000..1b9094fa50fb --- /dev/null +++ b/website/docs/d/odb_cloud_vm_clusters_list.html.markdown @@ -0,0 +1,47 @@ +--- +subcategory: "Oracle Database@AWS" +layout: "aws" +page_title: "AWS: aws_odb_cloud_vm_clusters_list" +description: |- + Provides details about an AWS Oracle Database@AWS Cloud Vm Clusters List. +--- + + +# Data Source: aws_odb_cloud_vm_clusters_list + +Provides details about an AWS Oracle Database@AWS Cloud Vm Clusters List. + +## Example Usage + +### Basic Usage + +```terraform +data "aws_odb_cloud_vm_clusters_list" "example" { +} +``` + +## Argument Reference + +The following arguments are required: + +* `example_arg` - (Required) Brief description of the required argument. + +The following arguments are optional: + +* `optional_arg` - (Optional) Brief description of the optional argument. + +## Attribute Reference + +This data source exports the following attributes in addition to the arguments above: + +* `arn` - ARN of the Cloud Vm Clusters List. +* `example_attribute` - Brief description of the attribute. diff --git a/website/docs/d/odb_networks_list.html.markdown b/website/docs/d/odb_networks_list.html.markdown new file mode 100644 index 000000000000..759c339f9db3 --- /dev/null +++ b/website/docs/d/odb_networks_list.html.markdown @@ -0,0 +1,47 @@ +--- +subcategory: "Oracle Database@AWS" +layout: "aws" +page_title: "AWS: aws_odb_networks_list" +description: |- + Provides details about an AWS Oracle Database@AWS Networks List. +--- + + +# Data Source: aws_odb_networks_list + +Provides details about an AWS Oracle Database@AWS Networks List. + +## Example Usage + +### Basic Usage + +```terraform +data "aws_odb_networks_list" "example" { +} +``` + +## Argument Reference + +The following arguments are required: + +* `example_arg` - (Required) Brief description of the required argument. + +The following arguments are optional: + +* `optional_arg` - (Optional) Brief description of the optional argument. + +## Attribute Reference + +This data source exports the following attributes in addition to the arguments above: + +* `arn` - ARN of the Networks List. +* `example_attribute` - Brief description of the attribute. From 1ad7dcb277a46fd5a21e7a04def9ff0044b0d9ad Mon Sep 17 00:00:00 2001 From: Asim Date: Wed, 16 Jul 2025 12:07:09 +0100 Subject: [PATCH 359/365] added copy write notice --- examples/odb/main.tf | 74 +++++++ examples/odb/variables.tf | 1 + .../odb/cloud_autonomous_vm_cluster.go | 3 +- ...cloud_autonomous_vm_cluster_data_source.go | 3 +- ..._autonomous_vm_cluster_data_source_test.go | 131 +++++++++---- .../odb/cloud_autonomous_vm_cluster_test.go | 185 ++++++++++-------- ...autonomous_vm_clusters_list_data_source.go | 3 +- ...omous_vm_clusters_list_data_source_test.go | 3 +- .../odb/cloud_exadata_infrastructure.go | 3 +- ...loud_exadata_infrastructure_data_source.go | 3 +- ...exadata_infrastructure_data_source_test.go | 1 - .../odb/cloud_exadata_infrastructure_test.go | 66 +------ ...xadata_infrastructures_list_data_source.go | 3 +- ...a_infrastructures_list_data_source_test.go | 3 +- internal/service/odb/cloud_vm_cluster.go | 3 +- .../odb/cloud_vm_cluster_data_source.go | 3 +- .../odb/cloud_vm_cluster_data_source_test.go | 3 +- internal/service/odb/cloud_vm_cluster_test.go | 3 +- .../odb/cloud_vm_clusters_list_data_source.go | 3 +- ...cloud_vm_clusters_list_data_source_test.go | 3 +- .../odb/db_servers_list_data_source.go | 3 +- .../odb/db_servers_list_data_source_test.go | 3 +- .../odb/db_system_shapes_list_data_source.go | 3 +- .../db_system_shapes_list_data_source_test.go | 3 +- internal/service/odb/generate.go | 3 +- .../odb/gi_versions_list_data_source.go | 3 +- .../odb/gi_versions_list_data_source_test.go | 3 +- internal/service/odb/network.go | 3 +- internal/service/odb/network_data_source.go | 3 +- .../service/odb/network_data_source_test.go | 3 +- .../service/odb/network_peering_connection.go | 3 +- .../network_peering_connection_data_source.go | 3 +- ...ork_peering_connection_data_source_test.go | 3 +- .../odb/network_peering_connection_test.go | 3 +- ...rk_peering_connections_list_data_source.go | 3 +- ...ering_connections_list_data_source_test.go | 3 +- internal/service/odb/network_test.go | 3 +- .../service/odb/networks_list_data_source.go | 3 +- .../odb/networks_list_data_source_test.go | 3 +- internal/service/odb/service_package.go | 15 +- 40 files changed, 309 insertions(+), 263 deletions(-) create mode 100644 examples/odb/main.tf create mode 100644 examples/odb/variables.tf diff --git a/examples/odb/main.tf b/examples/odb/main.tf new file mode 100644 index 000000000000..8a402fb2dd5e --- /dev/null +++ b/examples/odb/main.tf @@ -0,0 +1,74 @@ +//Copyright © 2025, Oracle and/or its affiliates. All rights reserved. + +provider "aws" { + region = "us-east-1" +} + +resource "aws_odb_cloud_exadata_infrastructure" "test" { + display_name = "Ofake-exa-4157426154220451194" + shape = "Exadata.X9M" + storage_count = 3 + compute_count = 2 + availability_zone_id = "use1-az6" + customer_contacts_to_send_to_oci = ["abc@example.com"] + maintenance_window = { + custom_action_timeout_in_mins = 16 + days_of_week = [] + hours_of_day = [] + is_custom_action_timeout_enabled = true + lead_time_in_weeks = 0 + months = [] + patching_mode = "ROLLING" + preference = "NO_PREFERENCE" + weeks_of_month =[] + } +} + + + + + + +resource "aws_odb_network" "test" { + display_name = "odb-net-6310376148776971562" + availability_zone_id = "use1-az6" + client_subnet_cidr = "10.2.0.0/24" + backup_subnet_cidr = "10.2.1.0/24" + s3_access = "DISABLED" + zero_etl_access = "DISABLED" +} + + + +data "aws_odb_db_servers_list" "test" { + cloud_exadata_infrastructure_id = aws_odb_cloud_exadata_infrastructure.test.id +} + +resource "aws_odb_cloud_autonomous_vm_cluster" "test" { + cloud_exadata_infrastructure_id = aws_odb_cloud_exadata_infrastructure.test.id + odb_network_id =aws_odb_network.test.id + display_name = "Ofake-avmc-1515523754357569237" + 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 = [ for db_server in data.aws_odb_db_servers_list.test.db_servers : db_server.id] + scan_listener_port_tls = 8561 + scan_listener_port_non_tls = 1024 + maintenance_window = { + preference = "NO_PREFERENCE" + days_of_week = [] + hours_of_day = [] + months = [] + weeks_of_month =[] + lead_time_in_weeks = 0 + } + +} + + +data "aws_odb_cloud_autonomous_vm_cluster" "test" { + id = aws_odb_cloud_autonomous_vm_cluster.test.id + +} \ No newline at end of file diff --git a/examples/odb/variables.tf b/examples/odb/variables.tf new file mode 100644 index 000000000000..4e5b298e3298 --- /dev/null +++ b/examples/odb/variables.tf @@ -0,0 +1 @@ +//Copyright © 2025, Oracle and/or its affiliates. All rights reserved. diff --git a/internal/service/odb/cloud_autonomous_vm_cluster.go b/internal/service/odb/cloud_autonomous_vm_cluster.go index 3b43185a7b30..97fee679bdc9 100644 --- a/internal/service/odb/cloud_autonomous_vm_cluster.go +++ b/internal/service/odb/cloud_autonomous_vm_cluster.go @@ -1,5 +1,4 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +// Copyright © 2025, Oracle and/or its affiliates. All rights reserved. package odb diff --git a/internal/service/odb/cloud_autonomous_vm_cluster_data_source.go b/internal/service/odb/cloud_autonomous_vm_cluster_data_source.go index c76e60c9ca74..a4857bff9581 100644 --- a/internal/service/odb/cloud_autonomous_vm_cluster_data_source.go +++ b/internal/service/odb/cloud_autonomous_vm_cluster_data_source.go @@ -1,5 +1,4 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +//Copyright © 2025, Oracle and/or its affiliates. All rights reserved. package odb diff --git a/internal/service/odb/cloud_autonomous_vm_cluster_data_source_test.go b/internal/service/odb/cloud_autonomous_vm_cluster_data_source_test.go index cbf46656e5b5..8061ab284f3f 100644 --- a/internal/service/odb/cloud_autonomous_vm_cluster_data_source_test.go +++ b/internal/service/odb/cloud_autonomous_vm_cluster_data_source_test.go @@ -1,5 +1,4 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +//Copyright © 2025, Oracle and/or its affiliates. All rights reserved. package odb_test @@ -7,12 +6,15 @@ import ( "context" "errors" "fmt" + "github.com/aws/aws-sdk-go-v2/aws" "github.com/aws/aws-sdk-go-v2/service/odb" odbtypes "github.com/aws/aws-sdk-go-v2/service/odb/types" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" sdkacctest "github.com/hashicorp/terraform-plugin-testing/helper/acctest" "github.com/hashicorp/terraform-plugin-testing/terraform" "github.com/hashicorp/terraform-provider-aws/internal/conns" "github.com/hashicorp/terraform-provider-aws/internal/create" + "github.com/hashicorp/terraform-provider-aws/internal/errs" tfodb "github.com/hashicorp/terraform-provider-aws/internal/service/odb" "github.com/hashicorp/terraform-provider-aws/internal/tfresource" "testing" @@ -42,9 +44,7 @@ func TestAccODBCloudAutonomousVmClusterDataSource_basic(t *testing.T) { } var avmc1 odbtypes.CloudAutonomousVmCluster dataSourceName := "data.aws_odb_cloud_autonomous_vm_cluster.test" - avmcDisplayName := sdkacctest.RandomWithPrefix(autonomousVMClusterDSTestEntity.autonomousVmClusterDisplayNamePrefix) - //odbDisplayNamePrefix := sdkacctest.RandomWithPrefix(autonomousVMClusterDSTestEntity.odbNetDisplayNamePrefix) - //exaDisplayName := sdkacctest.RandomWithPrefix(autonomousVMClusterDSTestEntity.exaInfraDisplayNamePrefix) + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { acctest.PreCheck(ctx, t) @@ -55,10 +55,9 @@ func TestAccODBCloudAutonomousVmClusterDataSource_basic(t *testing.T) { CheckDestroy: autonomousVMClusterDSTestEntity.testAccCheckCloudAutonomousVmClusterDestroy(ctx), Steps: []resource.TestStep{ { - Config: autonomousVMClusterDSTestEntity.basicHardcodedAVmCluster("exa_ji5quxxzn9", "odbnet_c91byo6y6m", avmcDisplayName), + Config: autonomousVMClusterDSTestEntity.avmcBasic(), Check: resource.ComposeAggregateTestCheckFunc( - autonomousVMClusterDSTestEntity.checkCloudAutonomousVmClusterExists(ctx, dataSourceName, &avmc1), - resource.TestCheckResourceAttr(dataSourceName, "display_name", avmcDisplayName), + resource.TestCheckResourceAttr(dataSourceName, "display_name", *avmc1.DisplayName), ), }, }, @@ -76,8 +75,7 @@ func (autonomousVMClusterDSTest) checkCloudAutonomousVmClusterExists(ctx context } conn := acctest.Provider.Meta().(*conns.AWSClient).ODBClient(ctx) - fmt.Println("") - resp, err := autonomousVMClusterResourceTest{}.findVMC(ctx, conn, rs.Primary.ID) + resp, err := autonomousVMClusterDSTestEntity.findAVMC(ctx, conn, rs.Primary.ID) if err != nil { return create.Error(names.ODB, create.ErrActionCheckingExistence, tfodb.ResNameCloudAutonomousVmCluster, rs.Primary.ID, err) } @@ -87,6 +85,29 @@ func (autonomousVMClusterDSTest) checkCloudAutonomousVmClusterExists(ctx context return nil } } + +func (autonomousVMClusterDSTest) findAVMC(ctx context.Context, conn *odb.Client, id string) (*odbtypes.CloudAutonomousVmCluster, error) { + input := odb.GetCloudAutonomousVmClusterInput{ + CloudAutonomousVmClusterId: aws.String(id), + } + out, err := conn.GetCloudAutonomousVmCluster(ctx, &input) + if err != nil { + if errs.IsA[*odbtypes.ResourceNotFoundException](err) { + return nil, &retry.NotFoundError{ + LastError: err, + LastRequest: &input, + } + } + return nil, err + } + + if out == nil || out.CloudAutonomousVmCluster == nil { + return nil, tfresource.NewEmptyResultError(&input) + } + + return out.CloudAutonomousVmCluster, nil +} + func (autonomousVMClusterDSTest) testAccCheckCloudAutonomousVmClusterDestroy(ctx context.Context) resource.TestCheckFunc { return func(s *terraform.State) error { conn := acctest.Provider.Meta().(*conns.AWSClient).ODBClient(ctx) @@ -125,18 +146,33 @@ func (autonomousVMClusterDSTest) testAccPreCheck(ctx context.Context, t *testing } } -func (autonomousVMClusterDSTest) basicHardcodedAVmCluster(exaInfra, odbNetwork, avmcDisplayName string) string { - avmcDataSource := fmt.Sprintf(` +func (autonomousVMClusterDSTest) avmcBasic() string { + + exaInfraDisplayName := sdkacctest.RandomWithPrefix(autonomousVMClusterDSTestEntity.exaInfraDisplayNamePrefix) + odbNetworkDisplayName := sdkacctest.RandomWithPrefix(autonomousVMClusterDSTestEntity.odbNetDisplayNamePrefix) + avmcDisplayName := sdkacctest.RandomWithPrefix(autonomousVMClusterDSTestEntity.autonomousVmClusterDisplayNamePrefix) + + exaInfraRes := autonomousVMClusterDSTestEntity.exaInfra(exaInfraDisplayName) + odbNetRes := autonomousVMClusterDSTestEntity.odbNet(odbNetworkDisplayName) + res := fmt.Sprintf(` +%s + +%s + +data "aws_odb_db_servers_list" "test" { + cloud_exadata_infrastructure_id = aws_odb_cloud_exadata_infrastructure.test.id +} + resource "aws_odb_cloud_autonomous_vm_cluster" "test" { - cloud_exadata_infrastructure_id = %[1]q - odb_network_id = %[2]q + cloud_exadata_infrastructure_id = aws_odb_cloud_exadata_infrastructure.test.id + odb_network_id =aws_odb_network.test.id display_name = %[3]q 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 = ["dbs_7ecm4wbjxy","dbs_uy5wmaqk6s"] + db_servers = [ for db_server in data.aws_odb_db_servers_list.test.db_servers : db_server.id] scan_listener_port_tls = 8561 scan_listener_port_non_tls = 1024 maintenance_window = { @@ -155,11 +191,32 @@ data "aws_odb_cloud_autonomous_vm_cluster" "test" { id = aws_odb_cloud_autonomous_vm_cluster.test.id } -`, exaInfra, odbNetwork, avmcDisplayName) - return avmcDataSource +`, exaInfraRes, odbNetRes, avmcDisplayName) + + return res +} + +func (autonomousVMClusterDSTest) odbNet(odbNetName string) string { + networkRes := fmt.Sprintf(` + + +resource "aws_odb_network" "test" { + display_name = %[1]q + availability_zone_id = "use1-az6" + client_subnet_cidr = "10.2.0.0/24" + backup_subnet_cidr = "10.2.1.0/24" + s3_access = "DISABLED" + zero_etl_access = "DISABLED" +} + +`, odbNetName) + return networkRes } -func (autonomousVMClusterDSTest) avmcBasic(exaInfra, odbNetwork, avmcDisplayName string) string { - res := fmt.Sprintf(` + +func (autonomousVMClusterDSTest) exaInfra(exaInfraName string) string { + exaInfraRes := fmt.Sprintf(` + + resource "aws_odb_cloud_exadata_infrastructure" "test" { display_name = %[1]q shape = "Exadata.X9M" @@ -167,29 +224,19 @@ resource "aws_odb_cloud_exadata_infrastructure" "test" { compute_count = 2 availability_zone_id = "use1-az6" customer_contacts_to_send_to_oci = ["abc@example.com"] - +maintenance_window = { + custom_action_timeout_in_mins = 16 + days_of_week = [] + hours_of_day = [] + is_custom_action_timeout_enabled = true + lead_time_in_weeks = 0 + months = [] + patching_mode = "ROLLING" + preference = "NO_PREFERENCE" + weeks_of_month =[] + } } -resource "aws_odb_network" "test" { - display_name = %[2]q - availability_zone_id = "use1-az6" - client_subnet_cidr = "10.2.0.0/24" - backup_subnet_cidr = "10.2.1.0/24" - s3_access = "DISABLED" - zero_etl_access = "DISABLED" - } - -resource "aws_odb_cloud_autonomous_vm_cluster" "test" { - display_name = %[3]q - cloud_exadata_infrastructure_id = aws_odb_cloud_exadata_infrastructure.test.id - odb_network_id = aws_odb_network.test.id - autonomous_data_storage_size_in_tbs = 5 - memory_per_oracle_compute_unit_in_gbs = 2 - total_container_databases = 1 - cpu_core_count_per_node = 4 - -} -`, exaInfra, odbNetwork, avmcDisplayName) - - return res +`, exaInfraName) + return exaInfraRes } diff --git a/internal/service/odb/cloud_autonomous_vm_cluster_test.go b/internal/service/odb/cloud_autonomous_vm_cluster_test.go index 0ca3ff400d7e..f3591806a98c 100644 --- a/internal/service/odb/cloud_autonomous_vm_cluster_test.go +++ b/internal/service/odb/cloud_autonomous_vm_cluster_test.go @@ -1,5 +1,4 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +//Copyright © 2025, Oracle and/or its affiliates. All rights reserved. package odb_test @@ -35,7 +34,7 @@ type autonomousVMClusterResourceTest struct { autonomousVmClusterDisplayNamePrefix string } -var autonomousVMClusterTest = autonomousVMClusterResourceTest{ +var autonomousVMClusterResourceTestEntity = autonomousVMClusterResourceTest{ exaInfraDisplayNamePrefix: "Ofake-exa", odbNetDisplayNamePrefix: "odb-net", autonomousVmClusterDisplayNamePrefix: "Ofake-avmc", @@ -48,25 +47,23 @@ func TestAccODBCloudAutonomousVmClusterCreationBasic(t *testing.T) { } var cloudAVMC odbtypes.CloudAutonomousVmCluster - avmcDisplayName := sdkacctest.RandomWithPrefix(autonomousVMClusterTest.autonomousVmClusterDisplayNamePrefix) - odbDisplayNamePrefix := sdkacctest.RandomWithPrefix(autonomousVMClusterTest.odbNetDisplayNamePrefix) - exaDisplayName := sdkacctest.RandomWithPrefix(autonomousVMClusterTest.exaInfraDisplayNamePrefix) + resourceName := "aws_odb_cloud_autonomous_vm_cluster.test" resource.Test(t, resource.TestCase{ PreCheck: func() { acctest.PreCheck(ctx, t) //acctest.PreCheckPartitionHasService(t, names.ODBServiceID) - autonomousVMClusterTest.testAccPreCheck(ctx, t) + autonomousVMClusterResourceTestEntity.testAccPreCheck(ctx, t) }, ErrorCheck: acctest.ErrorCheck(t, names.ODBServiceID), ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, - CheckDestroy: autonomousVMClusterTest.testAccCheckCloudAutonomousVmClusterDestroy(ctx), + CheckDestroy: autonomousVMClusterResourceTestEntity.testAccCheckCloudAutonomousVmClusterDestroy(ctx), Steps: []resource.TestStep{ { - Config: autonomousVMClusterTest.avmcWithMandatoryParamsOnly(autonomousVMClusterTest.exaInfra(exaDisplayName), autonomousVMClusterTest.odbNetwork(odbDisplayNamePrefix), avmcDisplayName), + Config: autonomousVMClusterResourceTestEntity.avmcBasic(), Check: resource.ComposeAggregateTestCheckFunc( - autonomousVMClusterTest.checkCloudAutonomousVmClusterExists(ctx, resourceName, &cloudAVMC), + autonomousVMClusterResourceTestEntity.checkCloudAutonomousVmClusterExists(ctx, resourceName, &cloudAVMC), ), }, { @@ -86,27 +83,22 @@ func TestAccODBCloudAutonomousVmClusterTagging(t *testing.T) { } var avmc1, avmc2 odbtypes.CloudAutonomousVmCluster - avmcDisplayName := sdkacctest.RandomWithPrefix(autonomousVMClusterTest.autonomousVmClusterDisplayNamePrefix) - odbDisplayNamePrefix := sdkacctest.RandomWithPrefix(autonomousVMClusterTest.odbNetDisplayNamePrefix) - exaDisplayName := sdkacctest.RandomWithPrefix(autonomousVMClusterTest.exaInfraDisplayNamePrefix) resourceName := "aws_odb_cloud_autonomous_vm_cluster.test" resource.Test(t, resource.TestCase{ PreCheck: func() { acctest.PreCheck(ctx, t) - //acctest.PreCheckPartitionHasService(t, names.ODBServiceID) - //testAccPreCheck(ctx, t) + autonomousVMClusterResourceTestEntity.testAccPreCheck(ctx, t) }, ErrorCheck: acctest.ErrorCheck(t, names.ODBServiceID), ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, - CheckDestroy: autonomousVMClusterTest.testAccCheckCloudAutonomousVmClusterDestroy(ctx), + CheckDestroy: autonomousVMClusterResourceTestEntity.testAccCheckCloudAutonomousVmClusterDestroy(ctx), Steps: []resource.TestStep{ { - Config: autonomousVMClusterTest.avmcWithMandatoryParamsWithTag(autonomousVMClusterTest.exaInfra(exaDisplayName), autonomousVMClusterTest.odbNetwork(odbDisplayNamePrefix), avmcDisplayName), + Config: autonomousVMClusterResourceTestEntity.avmcBasic(), Check: resource.ComposeAggregateTestCheckFunc( - autonomousVMClusterTest.checkCloudAutonomousVmClusterExists(ctx, resourceName, &avmc1), - resource.TestCheckResourceAttr(resourceName, "tags.%", "1"), - resource.TestCheckResourceAttr(resourceName, "tags.env", "dev"), + autonomousVMClusterResourceTestEntity.checkCloudAutonomousVmClusterExists(ctx, resourceName, &avmc1), + resource.TestCheckResourceAttr(resourceName, "tags.%", "0"), ), }, { @@ -115,15 +107,14 @@ func TestAccODBCloudAutonomousVmClusterTagging(t *testing.T) { ImportStateVerify: true, }, { - Config: autonomousVMClusterTest.avmcWithMandatoryParamsOnly(autonomousVMClusterTest.exaInfra(exaDisplayName), autonomousVMClusterTest.odbNetwork(odbDisplayNamePrefix), avmcDisplayName), + Config: autonomousVMClusterResourceTestEntity.avmcBasicWithTags(), Check: resource.ComposeAggregateTestCheckFunc( - autonomousVMClusterTest.checkCloudAutonomousVmClusterExists(ctx, resourceName, &avmc2), - resource.TestCheckResourceAttr(resourceName, "tags.%", "2"), + autonomousVMClusterResourceTestEntity.checkCloudAutonomousVmClusterExists(ctx, resourceName, &avmc2), + resource.TestCheckResourceAttr(resourceName, "tags.%", "1"), resource.TestCheckResourceAttr(resourceName, "tags.env", "dev"), - resource.TestCheckResourceAttr(resourceName, "tags.foo", "bar"), resource.ComposeTestCheckFunc(func(state *terraform.State) error { if strings.Compare(*(avmc1.CloudAutonomousVmClusterId), *(avmc2.CloudAutonomousVmClusterId)) != 0 { - return errors.New("Shouldn't create a new autonomous vm cluster") + return errors.New("shouldn't create a new autonomous vm cluster") } return nil }), @@ -138,27 +129,22 @@ func TestAccODBCloudAutonomousVmCluster_disappears(t *testing.T) { if testing.Short() { t.Skip("skipping long-running test in short mode") } - var cloudautonomousvmcluster odbtypes.CloudAutonomousVmCluster - avmcDisplayName := sdkacctest.RandomWithPrefix(autonomousVMClusterTest.autonomousVmClusterDisplayNamePrefix) - odbDisplayNamePrefix := sdkacctest.RandomWithPrefix(autonomousVMClusterTest.odbNetDisplayNamePrefix) - exaDisplayName := sdkacctest.RandomWithPrefix(autonomousVMClusterTest.exaInfraDisplayNamePrefix) resourceName := "aws_odb_cloud_autonomous_vm_cluster.test" resource.Test(t, resource.TestCase{ PreCheck: func() { acctest.PreCheck(ctx, t) - //acctest.PreCheckPartitionHasService(t, names.ODBServiceID) - autonomousVMClusterTest.testAccPreCheck(ctx, t) + autonomousVMClusterResourceTestEntity.testAccPreCheck(ctx, t) }, ErrorCheck: acctest.ErrorCheck(t, names.ODBServiceID), ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, - CheckDestroy: autonomousVMClusterTest.testAccCheckCloudAutonomousVmClusterDestroy(ctx), + CheckDestroy: autonomousVMClusterResourceTestEntity.testAccCheckCloudAutonomousVmClusterDestroy(ctx), Steps: []resource.TestStep{ { - Config: autonomousVMClusterTest.avmcWithMandatoryParamsOnly(autonomousVMClusterTest.exaInfra(exaDisplayName), autonomousVMClusterTest.odbNetwork(odbDisplayNamePrefix), avmcDisplayName), + Config: autonomousVMClusterResourceTestEntity.avmcBasic(), Check: resource.ComposeAggregateTestCheckFunc( - autonomousVMClusterTest.checkCloudAutonomousVmClusterExists(ctx, resourceName, &cloudautonomousvmcluster), + autonomousVMClusterResourceTestEntity.checkCloudAutonomousVmClusterExists(ctx, resourceName, &cloudautonomousvmcluster), acctest.CheckFrameworkResourceDisappears(ctx, acctest.Provider, tfodb.ResourceCloudAutonomousVMCluster, resourceName), ), ExpectNonEmptyPlan: true, @@ -190,7 +176,7 @@ func (autonomousVMClusterResourceTest) testAccCheckCloudAutonomousVmClusterDestr continue } - _, err := tfodb.FindCloudAutonomousVmClusterByID(ctx, conn, rs.Primary.ID) + _, err := autonomousVMClusterResourceTestEntity.findAVMC(ctx, conn, rs.Primary.ID) if tfresource.NotFound(err) { return nil } @@ -218,7 +204,7 @@ func (autonomousVMClusterResourceTest) checkCloudAutonomousVmClusterExists(ctx c conn := acctest.Provider.Meta().(*conns.AWSClient).ODBClient(ctx) fmt.Println("") - resp, err := autonomousVMClusterResourceTest{}.findVMC(ctx, conn, rs.Primary.ID) + resp, err := autonomousVMClusterResourceTestEntity.findAVMC(ctx, conn, rs.Primary.ID) if err != nil { return create.Error(names.ODB, create.ErrActionCheckingExistence, tfodb.ResNameCloudAutonomousVmCluster, rs.Primary.ID, err) } @@ -229,7 +215,7 @@ func (autonomousVMClusterResourceTest) checkCloudAutonomousVmClusterExists(ctx c } } -func (autonomousVMClusterResourceTest) findVMC(ctx context.Context, conn *odb.Client, id string) (*odbtypes.CloudAutonomousVmCluster, error) { +func (autonomousVMClusterResourceTest) findAVMC(ctx context.Context, conn *odb.Client, id string) (*odbtypes.CloudAutonomousVmCluster, error) { input := odb.GetCloudAutonomousVmClusterInput{ CloudAutonomousVmClusterId: aws.String(id), } @@ -251,21 +237,6 @@ func (autonomousVMClusterResourceTest) findVMC(ctx context.Context, conn *odb.Cl return out.CloudAutonomousVmCluster, nil } -/*func testAccPreCheck(ctx context.Context, t *testing.T) { - conn := acctest.Provider.Meta().(*conns.AWSClient).ODBClient(ctx) - - input := &odb.ListCloudAutonomousVmClustersInput{} - - _, err := conn.ListCloudAutonomousVmClusters(ctx, input) - - if acctest.PreCheckSkipError(err) { - t.Skipf("skipping acceptance testing: %s", err) - } - if err != nil { - t.Fatalf("unexpected PreCheck error: %s", err) - } -}*/ - /*func testAccCheckCloudAutonomousVmClusterNotRecreated(before, after *odb.DescribeCloudAutonomousVmClusterResponse) resource.TestCheckFunc { return func(s *terraform.State) error { if before, after := aws.ToString(before.CloudAutonomousVmClusterId), aws.ToString(after.CloudAutonomousVmClusterId); before != after { @@ -276,56 +247,116 @@ func (autonomousVMClusterResourceTest) findVMC(ctx context.Context, conn *odb.Cl } }*/ -// exa_rkmma5b09a -func testAccCloudAutonomousVmClusterConfig_basic_with_db_servers(rName string) string { - res := fmt.Sprintf(` +func (autonomousVMClusterResourceTest) avmcBasic() string { + exaInfraDisplayName := sdkacctest.RandomWithPrefix(autonomousVMClusterDSTestEntity.exaInfraDisplayNamePrefix) + odbNetworkDisplayName := sdkacctest.RandomWithPrefix(autonomousVMClusterDSTestEntity.odbNetDisplayNamePrefix) + avmcDisplayName := sdkacctest.RandomWithPrefix(autonomousVMClusterDSTestEntity.autonomousVmClusterDisplayNamePrefix) -resource "aws_odb_cloud_autonomous_vm_cluster" "test" { - display_name = %[1]q - cloud_exadata_infrastructure_id = "exa_ky7jabi90t" - autonomous_data_storage_size_in_tbs = 5 - is_mtls_enabled_vm_cluster = false - license_model = "LICENSE_INCLUDED" - memory_per_oracle_compute_unit_in_gbs = 2 - odb_network_id = "odbnet_fjey4b8oth" - total_container_databases = 1 - cpu_core_count_per_node = 40 - db_servers = ["dbs_7zuqmh4045","dbs_o1p7nape7g"] - tags = { - "env"= "dev" - } + exaInfraRes := autonomousVMClusterDSTestEntity.exaInfra(exaInfraDisplayName) + odbNetRes := autonomousVMClusterDSTestEntity.odbNet(odbNetworkDisplayName) + res := fmt.Sprintf(` +%s +%s +data "aws_odb_db_servers_list" "test" { + cloud_exadata_infrastructure_id = aws_odb_cloud_exadata_infrastructure.test.id +} +resource "aws_odb_cloud_autonomous_vm_cluster" "test" { + cloud_exadata_infrastructure_id = aws_odb_cloud_exadata_infrastructure.test.id + odb_network_id =aws_odb_network.test.id + display_name = %[3]q + 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 = [ for db_server in data.aws_odb_db_servers_list.test.db_servers : db_server.id] + scan_listener_port_tls = 8561 + scan_listener_port_non_tls = 1024 + maintenance_window = { + preference = "NO_PREFERENCE" + days_of_week = [] + hours_of_day = [] + months = [] + weeks_of_month =[] + lead_time_in_weeks = 0 + } } -`, rName) - fmt.Println(res) + +`, exaInfraRes, odbNetRes, avmcDisplayName) + return res } -func (autonomousVMClusterResourceTest) avmcWithMandatoryParamsOnly(exaInfra, odbNetwork, avmcDisplayName string) string { +func (autonomousVMClusterResourceTest) avmcBasicWithTags() string { + + exaInfraDisplayName := sdkacctest.RandomWithPrefix(autonomousVMClusterDSTestEntity.exaInfraDisplayNamePrefix) + odbNetworkDisplayName := sdkacctest.RandomWithPrefix(autonomousVMClusterDSTestEntity.odbNetDisplayNamePrefix) + avmcDisplayName := sdkacctest.RandomWithPrefix(autonomousVMClusterDSTestEntity.autonomousVmClusterDisplayNamePrefix) + + exaInfraRes := autonomousVMClusterDSTestEntity.exaInfra(exaInfraDisplayName) + odbNetRes := autonomousVMClusterDSTestEntity.odbNet(odbNetworkDisplayName) res := fmt.Sprintf(` %s %s +data "aws_odb_db_servers_list" "test" { + cloud_exadata_infrastructure_id = aws_odb_cloud_exadata_infrastructure.test.id +} + resource "aws_odb_cloud_autonomous_vm_cluster" "test" { - display_name = %[1]q - cloud_exadata_infrastructure_id = "exa_ky7jabi90t" - odb_network_id = "odbnet_fjey4b8oth" + cloud_exadata_infrastructure_id = aws_odb_cloud_exadata_infrastructure.test.id + odb_network_id =aws_odb_network.test.id + display_name = %[3]q autonomous_data_storage_size_in_tbs = 5 memory_per_oracle_compute_unit_in_gbs = 2 total_container_databases = 1 - cpu_core_count_per_node = 4 + cpu_core_count_per_node = 40 + license_model = "LICENSE_INCLUDED" + db_servers = [ for db_server in data.aws_odb_db_servers_list.test.db_servers : db_server.id] + scan_listener_port_tls = 8561 + scan_listener_port_non_tls = 1024 + maintenance_window = { + preference = "NO_PREFERENCE" + days_of_week = [] + hours_of_day = [] + months = [] + weeks_of_month =[] + lead_time_in_weeks = 0 + } + tags = { + "env"= "dev" + } } -`, exaInfra, odbNetwork, avmcDisplayName) + +`, exaInfraRes, odbNetRes, avmcDisplayName) return res } +func (autonomousVMClusterResourceTest) odbNet(odbNetName string) string { + networkRes := fmt.Sprintf(` + + +resource "aws_odb_network" "test" { + display_name = %[1]q + availability_zone_id = "use1-az6" + client_subnet_cidr = "10.2.0.0/24" + backup_subnet_cidr = "10.2.1.0/24" + s3_access = "DISABLED" + zero_etl_access = "DISABLED" +} + +`, odbNetName) + return networkRes +} + func (autonomousVMClusterResourceTest) avmcWithMandatoryParamsWithTag(exaInfra, odbNetwork, avmcDisplayName string) string { res := fmt.Sprintf(` %s diff --git a/internal/service/odb/cloud_autonomous_vm_clusters_list_data_source.go b/internal/service/odb/cloud_autonomous_vm_clusters_list_data_source.go index a9172c9943cd..0e30a6b667a7 100644 --- a/internal/service/odb/cloud_autonomous_vm_clusters_list_data_source.go +++ b/internal/service/odb/cloud_autonomous_vm_clusters_list_data_source.go @@ -1,5 +1,4 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +//Copyright © 2025, Oracle and/or its affiliates. All rights reserved. package odb diff --git a/internal/service/odb/cloud_autonomous_vm_clusters_list_data_source_test.go b/internal/service/odb/cloud_autonomous_vm_clusters_list_data_source_test.go index aa2079d38bdd..8ee9395f9557 100644 --- a/internal/service/odb/cloud_autonomous_vm_clusters_list_data_source_test.go +++ b/internal/service/odb/cloud_autonomous_vm_clusters_list_data_source_test.go @@ -1,5 +1,4 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +//Copyright © 2025, Oracle and/or its affiliates. All rights reserved. package odb_test diff --git a/internal/service/odb/cloud_exadata_infrastructure.go b/internal/service/odb/cloud_exadata_infrastructure.go index b0c269684666..805aab905033 100644 --- a/internal/service/odb/cloud_exadata_infrastructure.go +++ b/internal/service/odb/cloud_exadata_infrastructure.go @@ -1,5 +1,4 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +//Copyright © 2025, Oracle and/or its affiliates. All rights reserved. package odb diff --git a/internal/service/odb/cloud_exadata_infrastructure_data_source.go b/internal/service/odb/cloud_exadata_infrastructure_data_source.go index d8b2780b4f7d..39f8ac99ea94 100644 --- a/internal/service/odb/cloud_exadata_infrastructure_data_source.go +++ b/internal/service/odb/cloud_exadata_infrastructure_data_source.go @@ -1,5 +1,4 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +//Copyright © 2025, Oracle and/or its affiliates. All rights reserved. package odb diff --git a/internal/service/odb/cloud_exadata_infrastructure_data_source_test.go b/internal/service/odb/cloud_exadata_infrastructure_data_source_test.go index 7b6fdaaa13d4..28f0cb416572 100644 --- a/internal/service/odb/cloud_exadata_infrastructure_data_source_test.go +++ b/internal/service/odb/cloud_exadata_infrastructure_data_source_test.go @@ -103,6 +103,5 @@ data "aws_odb_cloud_exadata_infrastructure" "test" { id = aws_odb_cloud_exadata_infrastructure.test.id } `, displayNameSuffix) - //fmt.Println(testData) return testData } diff --git a/internal/service/odb/cloud_exadata_infrastructure_test.go b/internal/service/odb/cloud_exadata_infrastructure_test.go index 9808925c47aa..4726d9f88372 100644 --- a/internal/service/odb/cloud_exadata_infrastructure_test.go +++ b/internal/service/odb/cloud_exadata_infrastructure_test.go @@ -1,38 +1,8 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +//Copyright © 2025, Oracle and/or its affiliates. All rights reserved. package odb_test -// **PLEASE DELETE THIS AND ALL TIP COMMENTS BEFORE SUBMITTING A PR FOR REVIEW!** -// -// TIP: ==== INTRODUCTION ==== -// Thank you for trying the skaff tool! -// -// You have opted to include these helpful comments. They all include "TIP:" -// to help you find and remove them when you're done with them. -// -// While some aspects of this file are customized to your input, the -// scaffold tool does *not* look at the AWS API and ensure it has correct -// function, structure, and variable names. It makes guesses based on -// commonalities. You will need to make significant adjustments. -// -// In other words, as generated, this is a rough outline of the work you will -// need to do. If something doesn't make sense for your situation, get rid of -// it. - import ( - // TIP: ==== IMPORTS ==== - // This is a common set of imports but not customized to your code since - // your code hasn't been written yet. Make sure you, your IDE, or - // goimports -w fixes these imports. - // - // The provider linter wants your imports to be in two groups: first, - // standard library (i.e., "fmt" or "strings"), second, everything else. - // - // Also, AWS Go SDK v2 may handle nested structures differently than v1, - // using the services/odb/types package. If so, you'll - // need to import types and reference the nested types, e.g., as - // types.. "context" "errors" "fmt" @@ -52,40 +22,6 @@ import ( "github.com/hashicorp/terraform-provider-aws/names" ) -// TIP: File Structure. The basic outline for all test files should be as -// follows. Improve this resource's maintainability by following this -// outline. -// -// 1. Package declaration (add "_test" since this is a test file) -// 2. Imports -// 3. Unit tests -// 4. Basic test -// 5. Disappears test -// 6. All the other tests -// 7. Helper functions (exists, destroy, check, etc.) -// 8. Functions that return Terraform configurations - -// TIP: ==== UNIT TESTS ==== -// This is an example of a unit test. Its name is not prefixed with -// "TestAcc" like an acceptance test. -// -// Unlike acceptance tests, unit tests do not access AWS and are focused on a -// function (or method). Because of this, they are quick and cheap to run. -// -// In designing a resource's implementation, isolate complex bits from AWS bits -// so that they can be tested through a unit test. We encourage more unit tests -// in the provider. -// -// Cut and dry functions using well-used patterns, like typical flatteners and -// expanders, don't need unit testing. However, if they are complex or -// intricate, they should be unit tested. - -// TIP: ==== ACCEPTANCE TESTS ==== -// This is an example of a basic acceptance test. This should test as much of -// standard functionality of the resource as possible, and test importing, if -// applicable. We prefix its name with "TestAcc", the service, and the -// resource name. -// // Acceptance test access AWS and cost money to run. type cloudExaDataInfraResourceTest struct { diff --git a/internal/service/odb/cloud_exadata_infrastructures_list_data_source.go b/internal/service/odb/cloud_exadata_infrastructures_list_data_source.go index c7acfa3dc212..9194f93d62ff 100644 --- a/internal/service/odb/cloud_exadata_infrastructures_list_data_source.go +++ b/internal/service/odb/cloud_exadata_infrastructures_list_data_source.go @@ -1,5 +1,4 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +//Copyright © 2025, Oracle and/or its affiliates. All rights reserved. package odb diff --git a/internal/service/odb/cloud_exadata_infrastructures_list_data_source_test.go b/internal/service/odb/cloud_exadata_infrastructures_list_data_source_test.go index 7754562b6281..370d4a07b88c 100644 --- a/internal/service/odb/cloud_exadata_infrastructures_list_data_source_test.go +++ b/internal/service/odb/cloud_exadata_infrastructures_list_data_source_test.go @@ -1,5 +1,4 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +//Copyright © 2025, Oracle and/or its affiliates. All rights reserved. package odb_test diff --git a/internal/service/odb/cloud_vm_cluster.go b/internal/service/odb/cloud_vm_cluster.go index ed99a9a5f519..f4447a87be25 100644 --- a/internal/service/odb/cloud_vm_cluster.go +++ b/internal/service/odb/cloud_vm_cluster.go @@ -1,5 +1,4 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +//Copyright © 2025, Oracle and/or its affiliates. All rights reserved. package odb diff --git a/internal/service/odb/cloud_vm_cluster_data_source.go b/internal/service/odb/cloud_vm_cluster_data_source.go index 0b340b7f2ab8..3e83b23b9709 100644 --- a/internal/service/odb/cloud_vm_cluster_data_source.go +++ b/internal/service/odb/cloud_vm_cluster_data_source.go @@ -1,5 +1,4 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +//Copyright © 2025, Oracle and/or its affiliates. All rights reserved. package odb diff --git a/internal/service/odb/cloud_vm_cluster_data_source_test.go b/internal/service/odb/cloud_vm_cluster_data_source_test.go index 5623c2b568aa..c7e688523d98 100644 --- a/internal/service/odb/cloud_vm_cluster_data_source_test.go +++ b/internal/service/odb/cloud_vm_cluster_data_source_test.go @@ -1,5 +1,4 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +//Copyright © 2025, Oracle and/or its affiliates. All rights reserved. package odb_test diff --git a/internal/service/odb/cloud_vm_cluster_test.go b/internal/service/odb/cloud_vm_cluster_test.go index 636acd6eb737..98de316a7e2d 100644 --- a/internal/service/odb/cloud_vm_cluster_test.go +++ b/internal/service/odb/cloud_vm_cluster_test.go @@ -1,5 +1,4 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +//Copyright © 2025, Oracle and/or its affiliates. All rights reserved. package odb_test diff --git a/internal/service/odb/cloud_vm_clusters_list_data_source.go b/internal/service/odb/cloud_vm_clusters_list_data_source.go index 1e53d66bdd65..1bf76740aec1 100644 --- a/internal/service/odb/cloud_vm_clusters_list_data_source.go +++ b/internal/service/odb/cloud_vm_clusters_list_data_source.go @@ -1,5 +1,4 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +//Copyright © 2025, Oracle and/or its affiliates. All rights reserved. package odb diff --git a/internal/service/odb/cloud_vm_clusters_list_data_source_test.go b/internal/service/odb/cloud_vm_clusters_list_data_source_test.go index 08973f1ed452..c06772c2db74 100644 --- a/internal/service/odb/cloud_vm_clusters_list_data_source_test.go +++ b/internal/service/odb/cloud_vm_clusters_list_data_source_test.go @@ -1,5 +1,4 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +//Copyright © 2025, Oracle and/or its affiliates. All rights reserved. package odb_test diff --git a/internal/service/odb/db_servers_list_data_source.go b/internal/service/odb/db_servers_list_data_source.go index aa008279598d..82a77ce9bdde 100644 --- a/internal/service/odb/db_servers_list_data_source.go +++ b/internal/service/odb/db_servers_list_data_source.go @@ -1,5 +1,4 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +//Copyright © 2025, Oracle and/or its affiliates. All rights reserved. package odb diff --git a/internal/service/odb/db_servers_list_data_source_test.go b/internal/service/odb/db_servers_list_data_source_test.go index 6c225b48b920..f70a6b38d184 100644 --- a/internal/service/odb/db_servers_list_data_source_test.go +++ b/internal/service/odb/db_servers_list_data_source_test.go @@ -1,5 +1,4 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +//Copyright © 2025, Oracle and/or its affiliates. All rights reserved. package odb_test diff --git a/internal/service/odb/db_system_shapes_list_data_source.go b/internal/service/odb/db_system_shapes_list_data_source.go index 755ea83c544c..5272b2d0ed8b 100644 --- a/internal/service/odb/db_system_shapes_list_data_source.go +++ b/internal/service/odb/db_system_shapes_list_data_source.go @@ -1,5 +1,4 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +//Copyright © 2025, Oracle and/or its affiliates. All rights reserved. package odb diff --git a/internal/service/odb/db_system_shapes_list_data_source_test.go b/internal/service/odb/db_system_shapes_list_data_source_test.go index 05192159f267..3e5802761975 100644 --- a/internal/service/odb/db_system_shapes_list_data_source_test.go +++ b/internal/service/odb/db_system_shapes_list_data_source_test.go @@ -1,5 +1,4 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +//Copyright © 2025, Oracle and/or its affiliates. All rights reserved. package odb_test diff --git a/internal/service/odb/generate.go b/internal/service/odb/generate.go index 34340f9f6331..2fef8ab1a1c7 100644 --- a/internal/service/odb/generate.go +++ b/internal/service/odb/generate.go @@ -1,5 +1,4 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +//Copyright © 2025, Oracle and/or its affiliates. All rights reserved. //go:generate go run ../../generate/tags/main.go -ServiceTagsMap -ListTags -KVTValues -UpdateTags //go:generate go run ../../generate/servicepackage/main.go // ONLY generate directives and package declaration! Do not add anything else to this file. diff --git a/internal/service/odb/gi_versions_list_data_source.go b/internal/service/odb/gi_versions_list_data_source.go index bf45e21cf5d5..9708dd98f9e9 100644 --- a/internal/service/odb/gi_versions_list_data_source.go +++ b/internal/service/odb/gi_versions_list_data_source.go @@ -1,5 +1,4 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +//Copyright © 2025, Oracle and/or its affiliates. All rights reserved. package odb diff --git a/internal/service/odb/gi_versions_list_data_source_test.go b/internal/service/odb/gi_versions_list_data_source_test.go index b1b41aedf406..0e0e19a2272a 100644 --- a/internal/service/odb/gi_versions_list_data_source_test.go +++ b/internal/service/odb/gi_versions_list_data_source_test.go @@ -1,5 +1,4 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +//Copyright © 2025, Oracle and/or its affiliates. All rights reserved. package odb_test diff --git a/internal/service/odb/network.go b/internal/service/odb/network.go index 57d4756ef85c..4119d3f536c7 100644 --- a/internal/service/odb/network.go +++ b/internal/service/odb/network.go @@ -1,5 +1,4 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +//Copyright © 2025, Oracle and/or its affiliates. All rights reserved. package odb diff --git a/internal/service/odb/network_data_source.go b/internal/service/odb/network_data_source.go index 7c4de24477da..570bfc38d12b 100644 --- a/internal/service/odb/network_data_source.go +++ b/internal/service/odb/network_data_source.go @@ -1,5 +1,4 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +//Copyright © 2025, Oracle and/or its affiliates. All rights reserved. package odb diff --git a/internal/service/odb/network_data_source_test.go b/internal/service/odb/network_data_source_test.go index 6288968b8d9b..a6a4161a7461 100644 --- a/internal/service/odb/network_data_source_test.go +++ b/internal/service/odb/network_data_source_test.go @@ -1,5 +1,4 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +//Copyright © 2025, Oracle and/or its affiliates. All rights reserved. package odb_test diff --git a/internal/service/odb/network_peering_connection.go b/internal/service/odb/network_peering_connection.go index 1ffb36e99b20..ea9613cf63cf 100644 --- a/internal/service/odb/network_peering_connection.go +++ b/internal/service/odb/network_peering_connection.go @@ -1,5 +1,4 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +//Copyright © 2025, Oracle and/or its affiliates. All rights reserved. package odb diff --git a/internal/service/odb/network_peering_connection_data_source.go b/internal/service/odb/network_peering_connection_data_source.go index b250176b2981..4afce23fad10 100644 --- a/internal/service/odb/network_peering_connection_data_source.go +++ b/internal/service/odb/network_peering_connection_data_source.go @@ -1,5 +1,4 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +//Copyright © 2025, Oracle and/or its affiliates. All rights reserved. package odb diff --git a/internal/service/odb/network_peering_connection_data_source_test.go b/internal/service/odb/network_peering_connection_data_source_test.go index 843d4d7227db..ec8c0b0268ee 100644 --- a/internal/service/odb/network_peering_connection_data_source_test.go +++ b/internal/service/odb/network_peering_connection_data_source_test.go @@ -1,5 +1,4 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +//Copyright © 2025, Oracle and/or its affiliates. All rights reserved. package odb_test diff --git a/internal/service/odb/network_peering_connection_test.go b/internal/service/odb/network_peering_connection_test.go index 0323093c0ad0..7d4714930f90 100644 --- a/internal/service/odb/network_peering_connection_test.go +++ b/internal/service/odb/network_peering_connection_test.go @@ -1,5 +1,4 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +//Copyright © 2025, Oracle and/or its affiliates. All rights reserved. package odb_test diff --git a/internal/service/odb/network_peering_connections_list_data_source.go b/internal/service/odb/network_peering_connections_list_data_source.go index d0b2299edc3d..b2a884b90ec2 100644 --- a/internal/service/odb/network_peering_connections_list_data_source.go +++ b/internal/service/odb/network_peering_connections_list_data_source.go @@ -1,5 +1,4 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +//Copyright © 2025, Oracle and/or its affiliates. All rights reserved. package odb diff --git a/internal/service/odb/network_peering_connections_list_data_source_test.go b/internal/service/odb/network_peering_connections_list_data_source_test.go index c81701a77671..aa1a6bfced24 100644 --- a/internal/service/odb/network_peering_connections_list_data_source_test.go +++ b/internal/service/odb/network_peering_connections_list_data_source_test.go @@ -1,5 +1,4 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +//Copyright © 2025, Oracle and/or its affiliates. All rights reserved. package odb_test diff --git a/internal/service/odb/network_test.go b/internal/service/odb/network_test.go index 013b3ae710ec..cdd2278f63d5 100644 --- a/internal/service/odb/network_test.go +++ b/internal/service/odb/network_test.go @@ -1,5 +1,4 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +//Copyright © 2025, Oracle and/or its affiliates. All rights reserved. package odb_test diff --git a/internal/service/odb/networks_list_data_source.go b/internal/service/odb/networks_list_data_source.go index 55e87f71e4dd..5ebd6840caa9 100644 --- a/internal/service/odb/networks_list_data_source.go +++ b/internal/service/odb/networks_list_data_source.go @@ -1,5 +1,4 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +//Copyright © 2025, Oracle and/or its affiliates. All rights reserved. package odb diff --git a/internal/service/odb/networks_list_data_source_test.go b/internal/service/odb/networks_list_data_source_test.go index 65364abeb8be..77ce4b1b7836 100644 --- a/internal/service/odb/networks_list_data_source_test.go +++ b/internal/service/odb/networks_list_data_source_test.go @@ -1,5 +1,4 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 +//Copyright © 2025, Oracle and/or its affiliates. All rights reserved. package odb_test diff --git a/internal/service/odb/service_package.go b/internal/service/odb/service_package.go index ddcef3564082..232a650ad021 100644 --- a/internal/service/odb/service_package.go +++ b/internal/service/odb/service_package.go @@ -1,10 +1,11 @@ +//Copyright © 2025, Oracle and/or its affiliates. All rights reserved. + package odb import ( "context" "github.com/aws/aws-sdk-go-v2/aws" "github.com/aws/aws-sdk-go-v2/service/odb" - "github.com/hashicorp/terraform-plugin-log/tflog" "github.com/hashicorp/terraform-provider-aws/names" ) @@ -14,16 +15,6 @@ func (p *servicePackage) NewClient(ctx context.Context, config map[string]any) ( return odb.NewFromConfig(cfg, odb.WithEndpointResolverV2(newEndpointResolverV2()), withBaseEndpoint(config[names.AttrEndpoint].(string)), - func(o *odb.Options) { //if config["partition"].(string) == names.StandardPartitionID { - if cfg.Region != "\"us-east-1\"" { - tflog.Info(ctx, "overriding region", map[string]any{ - "original_region": cfg.Region, - "override_region": "us-east-1", - }) - o.Region = "us-east-1" - } - //} - o.BaseEndpoint = aws.String("https://gammaiad.capi.us-east-1.oracolo.alameda.aws.dev") - }, + func(o *odb.Options) {}, ), nil } From 2fc80c78f334ff3f233cb4e321de8247c4dd66d0 Mon Sep 17 00:00:00 2001 From: Asim Date: Thu, 17 Jul 2025 11:34:33 +0100 Subject: [PATCH 360/365] Added examples and few more test cases --- examples/odb/autonomous_vm_cluster.tf | 25 ++ examples/odb/exadata_infra.tf | 30 ++ examples/odb/main.tf | 78 +---- examples/odb/odb_network.tf | 27 ++ examples/odb/odb_network_peering.tf | 7 + examples/odb/variables.tf | 1 - examples/odb/vm_cluster.tf | 21 ++ .../odb/cloud_autonomous_vm_cluster_test.go | 142 ++++++++-- internal/service/odb/db_server_data_source.go | 197 +++++++++++++ .../service/odb/db_server_data_source_test.go | 196 +++++++++++++ internal/service/odb/network.go | 266 ++++++++---------- internal/service/odb/network_data_source.go | 7 + .../service/odb/network_peering_connection.go | 1 + internal/service/odb/network_test.go | 110 ++++++-- internal/service/odb/service_package.go | 14 +- internal/service/odb/service_package_gen.go | 6 + 16 files changed, 875 insertions(+), 253 deletions(-) create mode 100644 examples/odb/autonomous_vm_cluster.tf create mode 100644 examples/odb/exadata_infra.tf create mode 100644 examples/odb/odb_network.tf create mode 100644 examples/odb/odb_network_peering.tf delete mode 100644 examples/odb/variables.tf create mode 100644 examples/odb/vm_cluster.tf create mode 100644 internal/service/odb/db_server_data_source.go create mode 100644 internal/service/odb/db_server_data_source_test.go diff --git a/examples/odb/autonomous_vm_cluster.tf b/examples/odb/autonomous_vm_cluster.tf new file mode 100644 index 000000000000..a46bdd011c6b --- /dev/null +++ b/examples/odb/autonomous_vm_cluster.tf @@ -0,0 +1,25 @@ +//Copyright © 2025, Oracle and/or its affiliates. All rights reserved. + +//Autonomous VM Cluster with default maintenance window +resource "aws_odb_cloud_autonomous_vm_cluster" "test" { + cloud_exadata_infrastructure_id = "" //refer your exadata infra id + odb_network_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" + db_servers = [] //ids of db server. refer your exa infra + scan_listener_port_tls = 8561 + scan_listener_port_non_tls = 1024 + maintenance_window = { + preference = "NO_PREFERENCE" + days_of_week = [] + hours_of_day = [] + months = [] + weeks_of_month =[] + lead_time_in_weeks = 0 + } + +} diff --git a/examples/odb/exadata_infra.tf b/examples/odb/exadata_infra.tf new file mode 100644 index 000000000000..1710f4ddd4ba --- /dev/null +++ b/examples/odb/exadata_infra.tf @@ -0,0 +1,30 @@ +//Copyright © 2025, Oracle and/or its affiliates. All rights reserved. + +//Exadata Infrastructure with customer managed maintenance window +resource "aws_odb_cloud_exadata_infrastructure" "test" { + display_name = "Ofake_odb_exadata_infra" //Required Field + shape = "Exadata.X11M" //Required Field + storage_count = 3 + compute_count = 2 + availability_zone_id = "use1-az6" //Required Field + customer_contacts_to_send_to_oci = ["abc@example.com"] + database_server_type = "X11M" + storage_server_type = "X11M-HC" + maintenance_window = { //Required + custom_action_timeout_in_mins = 16 + days_of_week = ["MONDAY", "TUESDAY"] + hours_of_day = [11, 16] + is_custom_action_timeout_enabled = true + lead_time_in_weeks = 3 + months = ["FEBRUARY", "MAY", "AUGUST", "NOVEMBER"] + patching_mode = "ROLLING" + preference = "CUSTOM_PREFERENCE" + weeks_of_month = [2, 4] + } + tags = { + "env" = "dev" + } + +} + +//Exadata Infrastructure with default maintenance window \ No newline at end of file diff --git a/examples/odb/main.tf b/examples/odb/main.tf index 8a402fb2dd5e..58cccaccb19c 100644 --- a/examples/odb/main.tf +++ b/examples/odb/main.tf @@ -1,74 +1,10 @@ //Copyright © 2025, Oracle and/or its affiliates. All rights reserved. - -provider "aws" { - region = "us-east-1" -} - -resource "aws_odb_cloud_exadata_infrastructure" "test" { - display_name = "Ofake-exa-4157426154220451194" - shape = "Exadata.X9M" - storage_count = 3 - compute_count = 2 - availability_zone_id = "use1-az6" - customer_contacts_to_send_to_oci = ["abc@example.com"] - maintenance_window = { - custom_action_timeout_in_mins = 16 - days_of_week = [] - hours_of_day = [] - is_custom_action_timeout_enabled = true - lead_time_in_weeks = 0 - months = [] - patching_mode = "ROLLING" - preference = "NO_PREFERENCE" - weeks_of_month =[] +terraform { + required_version = ">= 0.15.3" + required_providers { + aws = { + source = "hashicorp/aws" + version = "3.50.0" + } } -} - - - - - - -resource "aws_odb_network" "test" { - display_name = "odb-net-6310376148776971562" - availability_zone_id = "use1-az6" - client_subnet_cidr = "10.2.0.0/24" - backup_subnet_cidr = "10.2.1.0/24" - s3_access = "DISABLED" - zero_etl_access = "DISABLED" -} - - - -data "aws_odb_db_servers_list" "test" { - cloud_exadata_infrastructure_id = aws_odb_cloud_exadata_infrastructure.test.id -} - -resource "aws_odb_cloud_autonomous_vm_cluster" "test" { - cloud_exadata_infrastructure_id = aws_odb_cloud_exadata_infrastructure.test.id - odb_network_id =aws_odb_network.test.id - display_name = "Ofake-avmc-1515523754357569237" - 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 = [ for db_server in data.aws_odb_db_servers_list.test.db_servers : db_server.id] - scan_listener_port_tls = 8561 - scan_listener_port_non_tls = 1024 - maintenance_window = { - preference = "NO_PREFERENCE" - days_of_week = [] - hours_of_day = [] - months = [] - weeks_of_month =[] - lead_time_in_weeks = 0 - } - -} - - -data "aws_odb_cloud_autonomous_vm_cluster" "test" { - id = aws_odb_cloud_autonomous_vm_cluster.test.id - } \ No newline at end of file diff --git a/examples/odb/odb_network.tf b/examples/odb/odb_network.tf new file mode 100644 index 000000000000..495db44c3eb7 --- /dev/null +++ b/examples/odb/odb_network.tf @@ -0,0 +1,27 @@ +//Copyright © 2025, Oracle and/or its affiliates. All rights reserved. + +//odb network without managed service +resource "aws_odb_network" "test" { + display_name = "odb-my-net" + availability_zone_id = "use1-az6" + client_subnet_cidr = "10.2.0.0/24" + backup_subnet_cidr = "10.2.1.0/24" + s3_access = "DISABLED" + zero_etl_access = "DISABLED" + tags = { + "env" = "dev" + } +} + +//odb network with managed service +resource "aws_odb_network" "test" { + display_name = "odb-my-net" + availability_zone_id = "use1-az6" + client_subnet_cidr = "10.2.0.0/24" + backup_subnet_cidr = "10.2.1.0/24" + s3_access = "ENABLED" + zero_etl_access = "ENABLED" + tags = { + "env" = "dev" + } +} \ No newline at end of file diff --git a/examples/odb/odb_network_peering.tf b/examples/odb/odb_network_peering.tf new file mode 100644 index 000000000000..66397b3328ee --- /dev/null +++ b/examples/odb/odb_network_peering.tf @@ -0,0 +1,7 @@ +//Copyright © 2025, Oracle and/or its affiliates. All rights reserved. + +resource "aws_odb_network_peering_connection" "test" { + display_name = "my_odb_net_peering" + odb_network_id = aws_odb_network.test.id + peer_network_id = "vpc_id" +} \ No newline at end of file diff --git a/examples/odb/variables.tf b/examples/odb/variables.tf deleted file mode 100644 index 4e5b298e3298..000000000000 --- a/examples/odb/variables.tf +++ /dev/null @@ -1 +0,0 @@ -//Copyright © 2025, Oracle and/or its affiliates. All rights reserved. diff --git a/examples/odb/vm_cluster.tf b/examples/odb/vm_cluster.tf new file mode 100644 index 000000000000..ce068ab82c6f --- /dev/null +++ b/examples/odb/vm_cluster.tf @@ -0,0 +1,21 @@ +//Copyright © 2025, Oracle and/or its affiliates. All rights reserved. + +resource "aws_odb_cloud_vm_cluster" "vmcluster" { + display_name = "Ofake_my_vmc" + cloud_exadata_infrastructure_id = aws_odb_cloud_exadata_infrastructure.test.id + cpu_core_count = 6 + gi_version = "23.0.0.0" + hostname_prefix = "apollo12" + ssh_public_keys = [""] //public ssh keys + odb_network_id = aws_odb_network.test.id + is_local_backup_enabled = true + is_sparse_diskgroup_enabled = true + license_model = "LICENSE_INCLUDED" + data_storage_size_in_tbs = 20.0 + db_servers = [""] //db-servers + db_node_storage_size_in_gbs = 120.0 + memory_size_in_gbs = 60 + tags = { + "env" = "dev" + } +} \ No newline at end of file diff --git a/internal/service/odb/cloud_autonomous_vm_cluster_test.go b/internal/service/odb/cloud_autonomous_vm_cluster_test.go index f3591806a98c..b46517573f90 100644 --- a/internal/service/odb/cloud_autonomous_vm_cluster_test.go +++ b/internal/service/odb/cloud_autonomous_vm_cluster_test.go @@ -53,7 +53,6 @@ func TestAccODBCloudAutonomousVmClusterCreationBasic(t *testing.T) { resource.Test(t, resource.TestCase{ PreCheck: func() { acctest.PreCheck(ctx, t) - //acctest.PreCheckPartitionHasService(t, names.ODBServiceID) autonomousVMClusterResourceTestEntity.testAccPreCheck(ctx, t) }, ErrorCheck: acctest.ErrorCheck(t, names.ODBServiceID), @@ -75,6 +74,41 @@ func TestAccODBCloudAutonomousVmClusterCreationBasic(t *testing.T) { }) } +func TestAccODBCloudAutonomousVmClusterCreationWithAllParams(t *testing.T) { + ctx := acctest.Context(t) + if testing.Short() { + t.Skip("skipping long-running test in short mode") + } + + var cloudAVMC odbtypes.CloudAutonomousVmCluster + + resourceName := "aws_odb_cloud_autonomous_vm_cluster.test" + + resource.Test(t, resource.TestCase{ + PreCheck: func() { + acctest.PreCheck(ctx, t) + //acctest.PreCheckPartitionHasService(t, names.ODBServiceID) + autonomousVMClusterResourceTestEntity.testAccPreCheck(ctx, t) + }, + ErrorCheck: acctest.ErrorCheck(t, names.ODBServiceID), + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + CheckDestroy: autonomousVMClusterResourceTestEntity.testAccCheckCloudAutonomousVmClusterDestroy(ctx), + Steps: []resource.TestStep{ + { + Config: autonomousVMClusterResourceTestEntity.avmcAllParamsConfig(), + Check: resource.ComposeAggregateTestCheckFunc( + autonomousVMClusterResourceTestEntity.checkCloudAutonomousVmClusterExists(ctx, resourceName, &cloudAVMC), + ), + }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} + func TestAccODBCloudAutonomousVmClusterTagging(t *testing.T) { fmt.Println("Update tags test") ctx := acctest.Context(t) @@ -84,7 +118,7 @@ func TestAccODBCloudAutonomousVmClusterTagging(t *testing.T) { var avmc1, avmc2 odbtypes.CloudAutonomousVmCluster resourceName := "aws_odb_cloud_autonomous_vm_cluster.test" - + withoutTag, withTag := autonomousVMClusterResourceTestEntity.avmcNoTagWithTag() resource.Test(t, resource.TestCase{ PreCheck: func() { acctest.PreCheck(ctx, t) @@ -93,9 +127,11 @@ func TestAccODBCloudAutonomousVmClusterTagging(t *testing.T) { ErrorCheck: acctest.ErrorCheck(t, names.ODBServiceID), ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, CheckDestroy: autonomousVMClusterResourceTestEntity.testAccCheckCloudAutonomousVmClusterDestroy(ctx), + Steps: []resource.TestStep{ { - Config: autonomousVMClusterResourceTestEntity.avmcBasic(), + Config: withoutTag, + Check: resource.ComposeAggregateTestCheckFunc( autonomousVMClusterResourceTestEntity.checkCloudAutonomousVmClusterExists(ctx, resourceName, &avmc1), resource.TestCheckResourceAttr(resourceName, "tags.%", "0"), @@ -107,7 +143,7 @@ func TestAccODBCloudAutonomousVmClusterTagging(t *testing.T) { ImportStateVerify: true, }, { - Config: autonomousVMClusterResourceTestEntity.avmcBasicWithTags(), + Config: withTag, Check: resource.ComposeAggregateTestCheckFunc( autonomousVMClusterResourceTestEntity.checkCloudAutonomousVmClusterExists(ctx, resourceName, &avmc2), resource.TestCheckResourceAttr(resourceName, "tags.%", "1"), @@ -237,16 +273,6 @@ func (autonomousVMClusterResourceTest) findAVMC(ctx context.Context, conn *odb.C return out.CloudAutonomousVmCluster, nil } -/*func testAccCheckCloudAutonomousVmClusterNotRecreated(before, after *odb.DescribeCloudAutonomousVmClusterResponse) resource.TestCheckFunc { - return func(s *terraform.State) error { - if before, after := aws.ToString(before.CloudAutonomousVmClusterId), aws.ToString(after.CloudAutonomousVmClusterId); before != after { - return create.Error(names.ODB, create.ErrActionCheckingNotRecreated, tfodb.ResNameCloudAutonomousVmCluster, aws.ToString(before.CloudAutonomousVmClusterId), errors.New("recreated")) - } - - return nil - } -}*/ - func (autonomousVMClusterResourceTest) avmcBasic() string { exaInfraDisplayName := sdkacctest.RandomWithPrefix(autonomousVMClusterDSTestEntity.exaInfraDisplayNamePrefix) @@ -292,15 +318,14 @@ resource "aws_odb_cloud_autonomous_vm_cluster" "test" { return res } -func (autonomousVMClusterResourceTest) avmcBasicWithTags() string { - +func (autonomousVMClusterResourceTest) avmcNoTagWithTag() (string, string) { exaInfraDisplayName := sdkacctest.RandomWithPrefix(autonomousVMClusterDSTestEntity.exaInfraDisplayNamePrefix) odbNetworkDisplayName := sdkacctest.RandomWithPrefix(autonomousVMClusterDSTestEntity.odbNetDisplayNamePrefix) avmcDisplayName := sdkacctest.RandomWithPrefix(autonomousVMClusterDSTestEntity.autonomousVmClusterDisplayNamePrefix) exaInfraRes := autonomousVMClusterDSTestEntity.exaInfra(exaInfraDisplayName) odbNetRes := autonomousVMClusterDSTestEntity.odbNet(odbNetworkDisplayName) - res := fmt.Sprintf(` + noTag := fmt.Sprintf(` %s %s @@ -329,6 +354,89 @@ resource "aws_odb_cloud_autonomous_vm_cluster" "test" { weeks_of_month =[] lead_time_in_weeks = 0 } + +} + +`, exaInfraRes, odbNetRes, avmcDisplayName) + withTag := fmt.Sprintf(` +%s + +%s + +data "aws_odb_db_servers_list" "test" { + cloud_exadata_infrastructure_id = aws_odb_cloud_exadata_infrastructure.test.id +} + +resource "aws_odb_cloud_autonomous_vm_cluster" "test" { + cloud_exadata_infrastructure_id = aws_odb_cloud_exadata_infrastructure.test.id + odb_network_id =aws_odb_network.test.id + display_name = %[3]q + 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 = [ for db_server in data.aws_odb_db_servers_list.test.db_servers : db_server.id] + scan_listener_port_tls = 8561 + scan_listener_port_non_tls = 1024 + maintenance_window = { + preference = "NO_PREFERENCE" + days_of_week = [] + hours_of_day = [] + months = [] + weeks_of_month =[] + lead_time_in_weeks = 0 + } + tags = { + "env"= "dev" + } + +} + +`, exaInfraRes, odbNetRes, avmcDisplayName) + + return noTag, withTag +} + +func (autonomousVMClusterResourceTest) avmcAllParamsConfig() string { + + exaInfraDisplayName := sdkacctest.RandomWithPrefix(autonomousVMClusterDSTestEntity.exaInfraDisplayNamePrefix) + odbNetworkDisplayName := sdkacctest.RandomWithPrefix(autonomousVMClusterDSTestEntity.odbNetDisplayNamePrefix) + avmcDisplayName := sdkacctest.RandomWithPrefix(autonomousVMClusterDSTestEntity.autonomousVmClusterDisplayNamePrefix) + + exaInfraRes := autonomousVMClusterDSTestEntity.exaInfra(exaInfraDisplayName) + odbNetRes := autonomousVMClusterDSTestEntity.odbNet(odbNetworkDisplayName) + res := fmt.Sprintf(` +%s + +%s + +data "aws_odb_db_servers_list" "test" { + cloud_exadata_infrastructure_id = aws_odb_cloud_exadata_infrastructure.test.id +} + +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 = %[3]q + 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 = [ for db_server in data.aws_odb_db_servers_list.test.db_servers : db_server.id] + scan_listener_port_tls = 8561 + scan_listener_port_non_tls = 1024 + maintenance_window = { + preference = "CUSTOM_PREFERENCE" + days_of_week = ["MONDAY", "TUESDAY"] + hours_of_day = [4,16] + months = ["FEBRUARY","MAY","AUGUST","NOVEMBER"] + weeks_of_month =[2,4] + lead_time_in_weeks = 3 + } tags = { "env"= "dev" } diff --git a/internal/service/odb/db_server_data_source.go b/internal/service/odb/db_server_data_source.go new file mode 100644 index 000000000000..e0d24697b412 --- /dev/null +++ b/internal/service/odb/db_server_data_source.go @@ -0,0 +1,197 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +package odb + +import ( + "context" + "github.com/hashicorp/terraform-plugin-framework/attr" + "time" + + "github.com/aws/aws-sdk-go-v2/service/odb" + odbtypes "github.com/aws/aws-sdk-go-v2/service/odb/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/create" + "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/names" +) + +// Function annotations are used for datasource registration to the Provider. DO NOT EDIT. +// @FrameworkDataSource("aws_odb_db_server", name="Db Server") +func newDataSourceDbServer(context.Context) (datasource.DataSourceWithConfigure, error) { + return &dataSourceDbServer{}, nil +} + +const ( + DSNameDbServer = "Db Server Data Source" +) + +type dataSourceDbServer struct { + framework.DataSourceWithModel[dbServerDataSourceModel] +} + +func (d *dataSourceDbServer) Schema(ctx context.Context, req datasource.SchemaRequest, resp *datasource.SchemaResponse) { + resp.Schema = schema.Schema{ + Attributes: map[string]schema.Attribute{ + names.AttrID: schema.StringAttribute{ + Description: "The identifier of the the database server.", + Required: true, + }, + "cloud_exadata_infrastructure_id": schema.StringAttribute{ + Description: "The identifier of the database server to retrieve information about.", + Required: true, + }, + "status": schema.StringAttribute{ + CustomType: fwtypes.StringEnumType[odbtypes.ResourceStatus](), + Computed: true, + }, + "status_reason": schema.StringAttribute{ + Computed: true, + }, + "cpu_core_count": schema.Int32Attribute{ + Computed: true, + }, + "db_node_ids": schema.ListAttribute{ + Computed: true, + CustomType: fwtypes.ListOfStringType, + ElementType: types.StringType, + }, + "db_node_storage_size_in_gbs": schema.Int32Attribute{ + Computed: true, + }, + "db_server_patching_details": schema.ObjectAttribute{ + Computed: true, + CustomType: fwtypes.NewObjectTypeOf[dbNodePatchingDetailsDbServerDataSourceModel](ctx), + AttributeTypes: map[string]attr.Type{ + "estimated_patch_duration": types.Int32Type, + "patching_status": types.StringType, + "time_patching_ended": types.StringType, + "time_patching_started": types.StringType, + }, + }, + "display_name": schema.StringAttribute{ + Computed: true, + }, + "exadata_infrastructure_id": schema.StringAttribute{ + Computed: true, + }, + "ocid": schema.StringAttribute{ + Computed: true, + }, + "oci_resource_anchor_name": schema.StringAttribute{ + Computed: true, + }, + "max_cpu_count": schema.Int32Attribute{ + Computed: true, + }, + "max_db_node_storage_in_gbs": schema.Int32Attribute{ + Computed: true, + }, + "max_memory_in_gbs": schema.Int32Attribute{ + Computed: true, + }, + "memory_size_in_gbs": schema.Int32Attribute{ + Computed: true, + }, + "shape": schema.StringAttribute{ + Computed: true, + }, + "created_at": schema.StringAttribute{ + Computed: true, + }, + "vm_cluster_ids": schema.ListAttribute{ + Computed: true, + CustomType: fwtypes.ListOfStringType, + ElementType: types.StringType, + }, + "compute_model": schema.StringAttribute{ + Computed: true, + CustomType: fwtypes.StringEnumType[odbtypes.ComputeModel](), + }, + "autonomous_vm_cluster_ids": schema.ListAttribute{ + Computed: true, + CustomType: fwtypes.ListOfStringType, + ElementType: types.StringType, + }, + "autonomous_virtual_machine_ids": schema.ListAttribute{ + Computed: true, + CustomType: fwtypes.ListOfStringType, + ElementType: types.StringType, + }, + }, + } +} + +func (d *dataSourceDbServer) Read(ctx context.Context, req datasource.ReadRequest, resp *datasource.ReadResponse) { + + conn := d.Meta().ODBClient(ctx) + + var data dbServerDataSourceModel + resp.Diagnostics.Append(req.Config.Get(ctx, &data)...) + if resp.Diagnostics.HasError() { + return + } + + input := odb.GetDbServerInput{ + DbServerId: data.DbServerID.ValueStringPointer(), + CloudExadataInfrastructureId: data.CloudExadataInfrastructureID.ValueStringPointer(), + } + + out, err := conn.GetDbServer(ctx, &input) + if err != nil { + resp.Diagnostics.AddError( + create.ProblemStandardMessage(names.ODB, create.ErrActionReading, DSNameDbServer, data.DbServerID.ValueString(), err), + err.Error(), + ) + return + } + + if out.DbServer.CreatedAt != nil { + data.CreatedAt = types.StringValue(out.DbServer.CreatedAt.Format(time.RFC3339)) + } + + resp.Diagnostics.Append(flex.Flatten(ctx, out.DbServer, &data)...) + if resp.Diagnostics.HasError() { + return + } + + resp.Diagnostics.Append(resp.State.Set(ctx, &data)...) +} + +type dbServerDataSourceModel struct { + framework.WithRegionModel + DbServerID types.String `tfsdk:"id"` + CloudExadataInfrastructureID types.String `tfsdk:"cloud_exadata_infrastructure_id"` + Status fwtypes.StringEnum[odbtypes.ResourceStatus] `tfsdk:"status"` + StatusReason types.String `tfsdk:"status_reason"` + CpuCoreCount types.Int32 `tfsdk:"cpu_core_count"` + DbNodeIds fwtypes.ListOfString `tfsdk:"db_node_ids"` + DbNodeStorageSizeInGBs types.Int32 `tfsdk:"db_node_storage_size_in_gbs"` + DbServerPatchingDetails fwtypes.ObjectValueOf[dbNodePatchingDetailsDbServerDataSourceModel] `tfsdk:"db_server_patching_details"` + DisplayName types.String `tfsdk:"display_name"` + ExadataInfrastructureId types.String `tfsdk:"exadata_infrastructure_id"` + OCID types.String `tfsdk:"ocid"` + OciResourceAnchorName types.String `tfsdk:"oci_resource_anchor_name"` + MaxCpuCount types.Int32 `tfsdk:"max_cpu_count"` + MaxDbNodeStorageInGBs types.Int32 `tfsdk:"max_db_node_storage_in_gbs"` + MaxMemoryInGBs types.Int32 `tfsdk:"max_memory_in_gbs"` + MemorySizeInGBs types.Int32 `tfsdk:"memory_size_in_gbs"` + Shape types.String `tfsdk:"shape"` + CreatedAt types.String `tfsdk:"created_at" autoflex:",noflatten"` + VmClusterIds fwtypes.ListOfString `tfsdk:"vm_cluster_ids"` + ComputeModel fwtypes.StringEnum[odbtypes.ComputeModel] `tfsdk:"compute_model"` + AutonomousVmClusterIds fwtypes.ListOfString `tfsdk:"autonomous_vm_cluster_ids"` + AutonomousVirtualMachineIds fwtypes.ListOfString `tfsdk:"autonomous_virtual_machine_ids"` +} + +type dbNodePatchingDetailsDbServerDataSourceModel struct { + EstimatedPatchDuration types.Int32 `tfsdk:"estimated_patch_duration"` + PatchingStatus types.String `tfsdk:"patching_status"` + TimePatchingEnded types.String `tfsdk:"time_patching_ended"` + TimePatchingStarted types.String `tfsdk:"time_patching_started"` +} diff --git a/internal/service/odb/db_server_data_source_test.go b/internal/service/odb/db_server_data_source_test.go new file mode 100644 index 000000000000..3eee595e9544 --- /dev/null +++ b/internal/service/odb/db_server_data_source_test.go @@ -0,0 +1,196 @@ +//Copyright © 2025, Oracle and/or its affiliates. All rights reserved. + +package odb_test + +import ( + "context" + "errors" + "fmt" + "github.com/aws/aws-sdk-go-v2/aws" + odbtypes "github.com/aws/aws-sdk-go-v2/service/odb/types" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" + sdkacctest "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-provider-aws/internal/errs" + "github.com/hashicorp/terraform-provider-aws/internal/tfresource" + "testing" + + "github.com/aws/aws-sdk-go-v2/service/odb" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" + "github.com/hashicorp/terraform-provider-aws/internal/acctest" + "github.com/hashicorp/terraform-provider-aws/internal/conns" + "github.com/hashicorp/terraform-provider-aws/internal/create" + + tfodb "github.com/hashicorp/terraform-provider-aws/internal/service/odb" + "github.com/hashicorp/terraform-provider-aws/names" +) + +type testDbServerDataSourceTest struct { + exaDisplayNamePrefix string +} + +var dbServerDataSourceTestEntity = testDbServerDataSourceTest{ + exaDisplayNamePrefix: "Ofake-exa", +} + +// Acceptance test access AWS and cost money to run. +func TestAccODBDbServerDataSource(t *testing.T) { + ctx := acctest.Context(t) + + if testing.Short() { + t.Skip("skipping long-running test in short mode") + } + + var dbServer odb.GetDbServerOutput + exaInfraDisplayName := sdkacctest.RandomWithPrefix(dbServersListDataSourceTests.displayNamePrefix) + + dataSourceName := "data.aws_odb_db_server.test" + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { + acctest.PreCheck(ctx, t) + }, + ErrorCheck: acctest.ErrorCheck(t, names.ODBServiceID), + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + CheckDestroy: dbServerDataSourceTestEntity.testAccCheckDbServersDestroyed(ctx), + Steps: []resource.TestStep{ + { + Config: dbServerDataSourceTestEntity.basic(dbServerDataSourceTestEntity.exaInfra(exaInfraDisplayName)), + Check: resource.ComposeAggregateTestCheckFunc( + dbServerDataSourceTestEntity.testAccCheckDbServerExists(ctx, dataSourceName, &dbServer), + ), + }, + }, + }) +} + +func (testDbServerDataSourceTest) testAccCheckDbServerExists(ctx context.Context, name string, output *odb.GetDbServerOutput) resource.TestCheckFunc { + return func(s *terraform.State) error { + rs, ok := s.RootModule().Resources[name] + if !ok { + return create.Error(names.ODB, create.ErrActionCheckingExistence, tfodb.DSNameDbServer, name, errors.New("not found")) + } + conn := acctest.Provider.Meta().(*conns.AWSClient).ODBClient(ctx) + var dbServerId = rs.Primary.ID + var attributes = rs.Primary.Attributes + exaId := attributes["exadata_infrastructure_id"] + resp, err := dbServerDataSourceTestEntity.findDbServer(ctx, conn, &dbServerId, &exaId) + if err != nil { + return create.Error(names.ODB, create.ErrActionCheckingExistence, tfodb.DSNameDbServer, rs.Primary.ID, err) + } + *output = *resp + return nil + } +} + +func (testDbServerDataSourceTest) testAccCheckDbServersDestroyed(ctx context.Context) resource.TestCheckFunc { + return func(s *terraform.State) error { + conn := acctest.Provider.Meta().(*conns.AWSClient).ODBClient(ctx) + + for _, rs := range s.RootModule().Resources { + if rs.Type != "aws_odb_cloud_exadata_infrastructure" { + continue + } + + _, err := dbServerDataSourceTestEntity.findExaInfra(ctx, conn, rs.Primary.ID) + + if tfresource.NotFound(err) { + return nil + } + if err != nil { + return create.Error(names.ODB, create.ErrActionCheckingDestroyed, tfodb.DSNameDbServer, rs.Primary.ID, err) + } + + return create.Error(names.ODB, create.ErrActionCheckingDestroyed, tfodb.DSNameDbServer, rs.Primary.ID, errors.New("not destroyed")) + } + + return nil + } +} + +func (testDbServerDataSourceTest) findExaInfra(ctx context.Context, conn *odb.Client, id string) (*odbtypes.CloudExadataInfrastructure, error) { + input := odb.GetCloudExadataInfrastructureInput{ + CloudExadataInfrastructureId: aws.String(id), + } + + out, err := conn.GetCloudExadataInfrastructure(ctx, &input) + if err != nil { + if errs.IsA[*odbtypes.ResourceNotFoundException](err) { + return nil, &retry.NotFoundError{ + LastError: err, + LastRequest: &input, + } + } + + return nil, err + } + + if out == nil || out.CloudExadataInfrastructure == nil { + return nil, tfresource.NewEmptyResultError(&input) + } + + return out.CloudExadataInfrastructure, nil +} + +func (testDbServerDataSourceTest) findDbServer(ctx context.Context, conn *odb.Client, dbServerId *string, exaInfraId *string) (*odb.GetDbServerOutput, error) { + inputWithExaId := &odb.GetDbServerInput{ + DbServerId: dbServerId, + CloudExadataInfrastructureId: exaInfraId, + } + output, err := conn.GetDbServer(ctx, inputWithExaId) + if err != nil { + return nil, err + } + return output, nil +} + +func (testDbServerDataSourceTest) basic(exaInfra string) string { + return fmt.Sprintf(` +%s + +data "aws_odb_db_servers_list" "test" { + cloud_exadata_infrastructure_id = aws_odb_cloud_exadata_infrastructure.test.id +} + +data "aws_odb_db_server" "test" { + id = data.aws_odb_db_servers_list.test.db_servers[0].id + cloud_exadata_infrastructure_id = aws_odb_cloud_exadata_infrastructure.test.id +} +`, exaInfra) +} + +func (testDbServerDataSourceTest) exaInfra(rName string) string { + exaRes := fmt.Sprintf(` +resource "aws_odb_cloud_exadata_infrastructure" "test" { + display_name = "%[1]s" + shape = "Exadata.X9M" + storage_count = 3 + compute_count = 2 + availability_zone_id = "use1-az6" + customer_contacts_to_send_to_oci = ["abc@example.com"] + maintenance_window = { + custom_action_timeout_in_mins = 16 + days_of_week = [] + hours_of_day = [] + is_custom_action_timeout_enabled = true + lead_time_in_weeks = 0 + months = [] + patching_mode = "ROLLING" + preference = "NO_PREFERENCE" + weeks_of_month =[] + } +} +`, rName) + return exaRes +} + +/*func (testDbServerDataSourceTest) foo(dbServerId, exaInfraId string) string { + return fmt.Sprintf(` + +data "aws_odb_db_server" "test" { + id = %[1]q +cloud_exadata_infrastructure_id = %[2]q +} +`, dbServerId, exaInfraId) +} +*/ diff --git a/internal/service/odb/network.go b/internal/service/odb/network.go index 4119d3f536c7..cc81deb4f37a 100644 --- a/internal/service/odb/network.go +++ b/internal/service/odb/network.go @@ -59,6 +59,7 @@ type resourceNetwork struct { } var OdbNetwork = newResourceNetwork +var managedServiceTimeout = 15 * time.Minute func (r *resourceNetwork) Schema(ctx context.Context, req resource.SchemaRequest, resp *resource.SchemaResponse) { statusType := fwtypes.StringEnumType[odbtypes.ResourceStatus]() @@ -158,6 +159,12 @@ func (r *resourceNetwork) Schema(ctx context.Context, req resource.SchemaRequest }, }, }, + "peered_cidrs": schema.SetAttribute{ + CustomType: fwtypes.SetOfStringType, + ElementType: types.StringType, + Computed: true, + Description: "The list of CIDR ranges from the peered VPC that are allowed access to the ODB network. Please refer odb network peering documentation.", + }, "oci_network_anchor_id": schema.StringAttribute{ Computed: true, Description: "The unique identifier of the OCI network anchor for the ODB network.", @@ -264,7 +271,7 @@ func (r *resourceNetwork) Create(ctx context.Context, req resource.CreateRequest Tags: getTagsIn(ctx), } - resp.Diagnostics.Append(flex.Expand(ctx, plan, &input, flex.WithIgnoredFieldNamesAppend("PeeredCidrs"))...) + resp.Diagnostics.Append(flex.Expand(ctx, plan, &input)...) if resp.Diagnostics.HasError() { return } @@ -293,70 +300,66 @@ func (r *resourceNetwork) Create(ctx context.Context, req resource.CreateRequest ) return } + //set zero etl access + if plan.ZeroEtlAccess.ValueEnum() == odbtypes.AccessEnabled { + _, err = waitManagedServiceEnabled(ctx, conn, *createdOdbNetwork.OdbNetworkId, managedServiceTimeout, func(managedService *odbtypes.ManagedServices) odbtypes.ManagedResourceStatus { + return managedService.ZeroEtlAccess.Status + }) + if err != nil { + resp.Diagnostics.AddError( + create.ProblemStandardMessage(names.ODB, create.ErrActionWaitingForUpdate, ResNameNetwork, plan.OdbNetworkId.String(), err), + err.Error(), + ) + return + } + plan.ZeroEtlAccess = fwtypes.StringEnumValue(odbtypes.AccessEnabled) - createdOdbNetwork, err = waitOdbNetworkManagedServiceResponse(ctx, conn, *out.OdbNetworkId, createTimeout, func(managedService *odbtypes.ManagedServices) odbtypes.ManagedResourceStatus { - return managedService.ZeroEtlAccess.Status - }) - if err != nil { - resp.Diagnostics.AddError( - create.ProblemStandardMessage(names.ODB, create.ErrActionWaitingForCreation, ResNameNetwork, plan.DisplayName.String(), err), - err.Error(), - ) - return - } - returnedZeroEtlAccess, err := managedServiceStatusToAccessStatus(createdOdbNetwork.ManagedServices.ZeroEtlAccess.Status) - if err != nil { - resp.Diagnostics.AddError( - create.ProblemStandardMessage(names.ODB, create.ErrActionWaitingForCreation, ResNameNetwork, plan.DisplayName.String(), err), - err.Error(), - ) - return + } else if plan.ZeroEtlAccess.ValueEnum() == odbtypes.AccessDisabled { + _, err = waitManagedServiceDisabled(ctx, conn, *createdOdbNetwork.OdbNetworkId, managedServiceTimeout, func(managedService *odbtypes.ManagedServices) odbtypes.ManagedResourceStatus { + return managedService.ZeroEtlAccess.Status + }) + if err != nil { + resp.Diagnostics.AddError( + create.ProblemStandardMessage(names.ODB, create.ErrActionWaitingForUpdate, ResNameNetwork, plan.OdbNetworkId.String(), err), + err.Error(), + ) + return + } + plan.ZeroEtlAccess = fwtypes.StringEnumValue(odbtypes.AccessDisabled) } - if returnedZeroEtlAccess != input.ZeroEtlAccess { - resp.Diagnostics.AddError( - create.ProblemStandardMessage(names.ODB, create.ErrActionWaitingForCreation, ResNameNetwork, plan.DisplayName.String(), errors.New("unexpected status of zero_tl_access")), - "Inconsistent zero_tl_access state", - ) - return - } - plan.ZeroEtlAccess = fwtypes.StringEnumValue(returnedZeroEtlAccess) + //set s3 access + if plan.S3Access.ValueEnum() == odbtypes.AccessEnabled { + _, err = waitManagedServiceEnabled(ctx, conn, *createdOdbNetwork.OdbNetworkId, managedServiceTimeout, func(managedService *odbtypes.ManagedServices) odbtypes.ManagedResourceStatus { + return managedService.S3Access.Status + }) + if err != nil { + resp.Diagnostics.AddError( + create.ProblemStandardMessage(names.ODB, create.ErrActionWaitingForUpdate, ResNameNetwork, plan.OdbNetworkId.String(), err), + err.Error(), + ) + return + } + plan.S3Access = fwtypes.StringEnumValue(odbtypes.AccessEnabled) - createdOdbNetwork, err = waitOdbNetworkManagedServiceResponse(ctx, conn, *out.OdbNetworkId, createTimeout, func(managedService *odbtypes.ManagedServices) odbtypes.ManagedResourceStatus { - return managedService.S3Access.Status - }) - if err != nil { - resp.Diagnostics.AddError( - create.ProblemStandardMessage(names.ODB, create.ErrActionWaitingForCreation, ResNameNetwork, plan.DisplayName.String(), err), - err.Error(), - ) - return - } - returnedS3Access, err := managedServiceStatusToAccessStatus(createdOdbNetwork.ManagedServices.S3Access.Status) - if err != nil { - resp.Diagnostics.AddError( - create.ProblemStandardMessage(names.ODB, create.ErrActionWaitingForCreation, ResNameNetwork, plan.DisplayName.String(), err), - err.Error(), - ) - return - } - if returnedS3Access != input.S3Access { - resp.Diagnostics.AddError( - create.ProblemStandardMessage(names.ODB, create.ErrActionWaitingForCreation, ResNameNetwork, plan.DisplayName.String(), errors.New("unexpected status of s3_access")), - "Inconsistent s3_access state", - ) - return + } else if plan.S3Access.ValueEnum() == odbtypes.AccessDisabled { + _, err = waitManagedServiceDisabled(ctx, conn, *createdOdbNetwork.OdbNetworkId, managedServiceTimeout, func(managedService *odbtypes.ManagedServices) odbtypes.ManagedResourceStatus { + return managedService.S3Access.Status + }) + if err != nil { + resp.Diagnostics.AddError( + create.ProblemStandardMessage(names.ODB, create.ErrActionWaitingForUpdate, ResNameNetwork, plan.OdbNetworkId.String(), err), + err.Error(), + ) + return + } + plan.S3Access = fwtypes.StringEnumValue(odbtypes.AccessDisabled) } - plan.S3Access = fwtypes.StringEnumValue(returnedS3Access) - plan.S3PolicyDocument = types.StringPointerValue(createdOdbNetwork.ManagedServices.S3Access.S3PolicyDocument) + plan.S3PolicyDocument = types.StringPointerValue(createdOdbNetwork.ManagedServices.S3Access.S3PolicyDocument) plan.CreatedAt = types.StringValue(createdOdbNetwork.CreatedAt.Format(time.RFC3339)) - resp.Diagnostics.Append(flex.Flatten(ctx, createdOdbNetwork, &plan, flex.WithIgnoredFieldNamesAppend("CreatedAt"), - flex.WithIgnoredFieldNamesAppend("S3Access"), - flex.WithIgnoredFieldNamesAppend("ZeroEtlAccess"), - flex.WithIgnoredFieldNamesAppend("S3PolicyDocument"))...) - + resp.Diagnostics.Append(flex.Flatten(ctx, createdOdbNetwork, &plan)...) if resp.Diagnostics.HasError() { return } @@ -417,9 +420,7 @@ func (r *resourceNetwork) Read(ctx context.Context, req resource.ReadRequest, re return } state.CreatedAt = types.StringValue(out.CreatedAt.Format(time.RFC3339)) - resp.Diagnostics.Append(flex.Flatten(ctx, out, &state, flex.WithIgnoredFieldNamesAppend("CreatedAt"), - flex.WithIgnoredFieldNamesAppend("S3Access"), flex.WithIgnoredFieldNamesAppend("ZeroEtlAccess"), - flex.WithIgnoredFieldNamesAppend("S3PolicyDocument"))...) + resp.Diagnostics.Append(flex.Flatten(ctx, out, &state)...) if resp.Diagnostics.HasError() { return } @@ -444,27 +445,18 @@ func (r *resourceNetwork) Update(ctx context.Context, req resource.UpdateRequest isUpdateRequired = true input.DisplayName = plan.DisplayName.ValueStringPointer() } - isS3AccessUpdated := false + if !plan.S3Access.Equal(state.S3Access) { isUpdateRequired = true - isS3AccessUpdated = true - if !plan.S3Access.IsNull() || !state.S3Access.IsUnknown() { - input.S3Access = plan.S3Access.ValueEnum() - } - + input.S3Access = plan.S3Access.ValueEnum() } - isZeroEtlAccessUpdated := false + if !plan.ZeroEtlAccess.Equal(state.ZeroEtlAccess) { isUpdateRequired = true - if !plan.ZeroEtlAccess.IsNull() || !plan.ZeroEtlAccess.IsUnknown() { - input.ZeroEtlAccess = plan.ZeroEtlAccess.ValueEnum() - } - isZeroEtlAccessUpdated = true + input.ZeroEtlAccess = plan.ZeroEtlAccess.ValueEnum() } - isS3EndpointPolicyUpdated := false if !plan.S3PolicyDocument.Equal(state.S3PolicyDocument) { isUpdateRequired = true - isS3EndpointPolicyUpdated = true if !plan.S3PolicyDocument.IsNull() || !plan.S3PolicyDocument.IsUnknown() { input.S3PolicyDocument = plan.S3PolicyDocument.ValueStringPointer() } @@ -499,66 +491,63 @@ func (r *resourceNetwork) Update(ctx context.Context, req resource.UpdateRequest return } - if isS3AccessUpdated || isS3EndpointPolicyUpdated { + if plan.S3Access.ValueEnum() == odbtypes.AccessEnabled { + _, err = waitManagedServiceEnabled(ctx, conn, *input.OdbNetworkId, managedServiceTimeout, func(managedService *odbtypes.ManagedServices) odbtypes.ManagedResourceStatus { + return managedService.S3Access.Status + }) + if err != nil { + resp.Diagnostics.AddError( + create.ProblemStandardMessage(names.ODB, create.ErrActionWaitingForUpdate, ResNameNetwork, plan.OdbNetworkId.String(), err), + err.Error(), + ) + return + } + plan.S3Access = fwtypes.StringEnumValue(odbtypes.AccessEnabled) - if plan.S3Access.ValueEnum() == odbtypes.AccessEnabled { - _, err = waitManagedServiceEnabled(ctx, conn, *input.OdbNetworkId, updateTimeout, func(managedService *odbtypes.ManagedServices) odbtypes.ManagedResourceStatus { - return managedService.S3Access.Status - }) - if err != nil { - resp.Diagnostics.AddError( - create.ProblemStandardMessage(names.ODB, create.ErrActionWaitingForUpdate, ResNameNetwork, plan.OdbNetworkId.String(), err), - err.Error(), - ) - return - } - plan.S3Access = fwtypes.StringEnumValue(odbtypes.AccessEnabled) - } else if plan.S3Access.ValueEnum() == odbtypes.AccessDisabled { - _, err = waitManagedServiceDisabled(ctx, conn, *input.OdbNetworkId, updateTimeout, func(managedService *odbtypes.ManagedServices) odbtypes.ManagedResourceStatus { - return managedService.S3Access.Status - }) - if err != nil { - resp.Diagnostics.AddError( - create.ProblemStandardMessage(names.ODB, create.ErrActionWaitingForUpdate, ResNameNetwork, plan.OdbNetworkId.String(), err), - err.Error(), - ) - return - } - plan.S3Access = fwtypes.StringEnumValue(odbtypes.AccessDisabled) + } else if plan.S3Access.ValueEnum() == odbtypes.AccessDisabled { + _, err = waitManagedServiceDisabled(ctx, conn, *input.OdbNetworkId, managedServiceTimeout, func(managedService *odbtypes.ManagedServices) odbtypes.ManagedResourceStatus { + return managedService.S3Access.Status + }) + if err != nil { + resp.Diagnostics.AddError( + create.ProblemStandardMessage(names.ODB, create.ErrActionWaitingForUpdate, ResNameNetwork, plan.OdbNetworkId.String(), err), + err.Error(), + ) + return } + plan.S3Access = fwtypes.StringEnumValue(odbtypes.AccessDisabled) } - if isZeroEtlAccessUpdated { - if plan.ZeroEtlAccess.ValueEnum() == odbtypes.AccessEnabled { - _, err = waitManagedServiceEnabled(ctx, conn, *input.OdbNetworkId, updateTimeout, func(managedService *odbtypes.ManagedServices) odbtypes.ManagedResourceStatus { - return managedService.ZeroEtlAccess.Status - }) - if err != nil { - resp.Diagnostics.AddError( - create.ProblemStandardMessage(names.ODB, create.ErrActionWaitingForUpdate, ResNameNetwork, plan.OdbNetworkId.String(), err), - err.Error(), - ) - return - } - plan.ZeroEtlAccess = fwtypes.StringEnumValue(odbtypes.AccessEnabled) - } else if plan.ZeroEtlAccess.ValueEnum() == odbtypes.AccessDisabled { - _, err = waitManagedServiceEnabled(ctx, conn, *input.OdbNetworkId, updateTimeout, func(managedService *odbtypes.ManagedServices) odbtypes.ManagedResourceStatus { - return managedService.ZeroEtlAccess.Status - }) - if err != nil { - resp.Diagnostics.AddError( - create.ProblemStandardMessage(names.ODB, create.ErrActionWaitingForUpdate, ResNameNetwork, plan.OdbNetworkId.String(), err), - err.Error(), - ) - return - } - plan.ZeroEtlAccess = fwtypes.StringEnumValue(odbtypes.AccessDisabled) + if plan.ZeroEtlAccess.ValueEnum() == odbtypes.AccessEnabled { + _, err = waitManagedServiceEnabled(ctx, conn, *input.OdbNetworkId, managedServiceTimeout, func(managedService *odbtypes.ManagedServices) odbtypes.ManagedResourceStatus { + return managedService.ZeroEtlAccess.Status + }) + if err != nil { + resp.Diagnostics.AddError( + create.ProblemStandardMessage(names.ODB, create.ErrActionWaitingForUpdate, ResNameNetwork, plan.OdbNetworkId.String(), err), + err.Error(), + ) + return } - } + plan.ZeroEtlAccess = fwtypes.StringEnumValue(odbtypes.AccessEnabled) + } else if plan.ZeroEtlAccess.ValueEnum() == odbtypes.AccessDisabled { + _, err = waitManagedServiceDisabled(ctx, conn, *input.OdbNetworkId, managedServiceTimeout, func(managedService *odbtypes.ManagedServices) odbtypes.ManagedResourceStatus { + return managedService.ZeroEtlAccess.Status + }) + if err != nil { + resp.Diagnostics.AddError( + create.ProblemStandardMessage(names.ODB, create.ErrActionWaitingForUpdate, ResNameNetwork, plan.OdbNetworkId.String(), err), + err.Error(), + ) + return + } + plan.ZeroEtlAccess = fwtypes.StringEnumValue(odbtypes.AccessDisabled) + } + plan.S3PolicyDocument = types.StringPointerValue(updatedOdbNwk.ManagedServices.S3Access.S3PolicyDocument) plan.CreatedAt = types.StringValue(updatedOdbNwk.CreatedAt.Format(time.RFC3339)) - resp.Diagnostics.Append(flex.Flatten(ctx, updatedOdbNwk, &plan, flex.WithIgnoredFieldNamesAppend("CreatedAt"))..., //flex.WithIgnoredFieldNamesAppend("PeeredCidrs") - ) + + resp.Diagnostics.Append(flex.Flatten(ctx, updatedOdbNwk, &plan)...) resp.Diagnostics.Append(resp.State.Set(ctx, &plan)...) } @@ -632,22 +621,6 @@ func managedServiceStatusToAccessStatus(mangedStatus odbtypes.ManagedResourceSta return "", errors.New("can not convert managed status to access status") } -func waitOdbNetworkManagedServiceResponse(ctx context.Context, conn *odb.Client, id string, timeout time.Duration, managedResourceStatus func(managedService *odbtypes.ManagedServices) odbtypes.ManagedResourceStatus) (*odbtypes.OdbNetwork, error) { - stateConf := &retry.StateChangeConf{ - Pending: enum.Slice(odbtypes.ManagedResourceStatusEnabling, odbtypes.ManagedResourceStatusDisabling), - Target: enum.Slice(odbtypes.ManagedResourceStatusEnabled, odbtypes.ManagedResourceStatusDisabled), - Refresh: statusManagedService(ctx, conn, id, managedResourceStatus), - Timeout: timeout, - } - - outputRaw, err := stateConf.WaitForStateContext(ctx) - if out, ok := outputRaw.(*odbtypes.OdbNetwork); ok { - return out, err - } - - return nil, err -} - func waitManagedServiceEnabled(ctx context.Context, conn *odb.Client, id string, timeout time.Duration, managedResourceStatus func(managedService *odbtypes.ManagedServices) odbtypes.ManagedResourceStatus) (*odbtypes.OdbNetwork, error) { stateConf := &retry.StateChangeConf{ Pending: enum.Slice(odbtypes.ManagedResourceStatusEnabling), @@ -797,10 +770,11 @@ type odbNetworkResourceModel struct { BackupSubnetCidr types.String `tfsdk:"backup_subnet_cidr"` CustomDomainName types.String `tfsdk:"custom_domain_name"` DefaultDnsPrefix types.String `tfsdk:"default_dns_prefix"` - S3Access fwtypes.StringEnum[odbtypes.Access] `tfsdk:"s3_access"` - ZeroEtlAccess fwtypes.StringEnum[odbtypes.Access] `tfsdk:"zero_etl_access"` - S3PolicyDocument types.String `tfsdk:"s3_policy_document"` + S3Access fwtypes.StringEnum[odbtypes.Access] `tfsdk:"s3_access" autoflex:",noflatten"` + ZeroEtlAccess fwtypes.StringEnum[odbtypes.Access] `tfsdk:"zero_etl_access" autoflex:",noflatten"` + S3PolicyDocument types.String `tfsdk:"s3_policy_document" autoflex:",noflatten"` OdbNetworkId types.String `tfsdk:"id"` + PeeredCidrs fwtypes.SetValueOf[types.String] `tfsdk:"peered_cidrs"` OciDnsForwardingConfigs fwtypes.ListNestedObjectValueOf[odbNwkOciDnsForwardingConfigResourceModel] `tfsdk:"oci_dns_forwarding_configs"` OciNetworkAnchorId types.String `tfsdk:"oci_network_anchor_id"` OciNetworkAnchorUrl types.String `tfsdk:"oci_network_anchor_url"` @@ -813,7 +787,7 @@ type odbNetworkResourceModel struct { StatusReason types.String `tfsdk:"status_reason"` Timeouts timeouts.Value `tfsdk:"timeouts"` ManagedServices fwtypes.ObjectValueOf[odbNetworkManagedServicesResourceModel] `tfsdk:"managed_services"` - CreatedAt types.String `tfsdk:"created_at"` + CreatedAt types.String `tfsdk:"created_at" autoflex:",noflatten"` Tags tftags.Map `tfsdk:"tags"` TagsAll tftags.Map `tfsdk:"tags_all"` } diff --git a/internal/service/odb/network_data_source.go b/internal/service/odb/network_data_source.go index 570bfc38d12b..1f7e94865848 100644 --- a/internal/service/odb/network_data_source.go +++ b/internal/service/odb/network_data_source.go @@ -82,6 +82,12 @@ func (d *dataSourceNetwork) Schema(ctx context.Context, req datasource.SchemaReq "percent_progress": schema.Float64Attribute{ Computed: true, }, + "peered_cidrs": schema.SetAttribute{ + CustomType: fwtypes.SetOfStringType, + ElementType: types.StringType, + Computed: true, + Description: "The list of CIDR ranges from the peered VPC that are allowed access to the ODB network. Please refer odb network peering documentation.", + }, "status": schema.StringAttribute{ CustomType: statusType, Computed: true, @@ -195,6 +201,7 @@ type odbNetworkDataSourceModel struct { OciVcnUrl types.String `tfsdk:"oci_vcn_url"` OdbNetworkArn types.String `tfsdk:"arn"` OdbNetworkId types.String `tfsdk:"id"` + PeeredCidrs fwtypes.SetValueOf[types.String] `tfsdk:"peered_cidrs"` PercentProgress types.Float64 `tfsdk:"percent_progress"` Status fwtypes.StringEnum[odbtypes.ResourceStatus] `tfsdk:"status"` StatusReason types.String `tfsdk:"status_reason"` diff --git a/internal/service/odb/network_peering_connection.go b/internal/service/odb/network_peering_connection.go index ea9613cf63cf..46f057869e4c 100644 --- a/internal/service/odb/network_peering_connection.go +++ b/internal/service/odb/network_peering_connection.go @@ -59,6 +59,7 @@ type resourceNetworkPeeringConnection struct { func (r *resourceNetworkPeeringConnection) Schema(ctx context.Context, req resource.SchemaRequest, resp *resource.SchemaResponse) { resp.Schema = schema.Schema{ + Description: "Information about an ODB network. Also refer odb_network_peering resource : A peering connection between an ODB network and either another ODB network or a customer-owned VPC.", Attributes: map[string]schema.Attribute{ names.AttrARN: framework.ARNAttributeComputedOnly(), names.AttrID: framework.IDAttribute(), diff --git a/internal/service/odb/network_test.go b/internal/service/odb/network_test.go index cdd2278f63d5..e5864fb21190 100644 --- a/internal/service/odb/network_test.go +++ b/internal/service/odb/network_test.go @@ -16,6 +16,7 @@ import ( "github.com/hashicorp/terraform-provider-aws/internal/create" "github.com/hashicorp/terraform-provider-aws/internal/tfresource" "github.com/hashicorp/terraform-provider-aws/names" + "strings" "testing" tfodb "github.com/hashicorp/terraform-provider-aws/internal/service/odb" @@ -101,21 +102,19 @@ func TestOdbNetworkWithAllParams(t *testing.T) { }) } -// TestAccODBNetwork_Update -func TestAccODBNetwork_Delete_Create(t *testing.T) { +func TestAccODBNetworkUpdateManagedService(t *testing.T) { ctx := acctest.Context(t) if testing.Short() { t.Skip("skipping long-running test in short mode") } - var network odbtypes.OdbNetwork + var network1, network2 odbtypes.OdbNetwork rName := sdkacctest.RandomWithPrefix(odbNetResourceTest.displayNamePrefix) resourceName := "aws_odb_network.test" resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { acctest.PreCheck(ctx, t) - //acctest.PreCheckPartitionHasService(t, names.ODBEndpointID) odbNetResourceTest.testAccPreCheck(ctx, t) }, ErrorCheck: acctest.ErrorCheck(t, names.ODBServiceID), @@ -124,19 +123,76 @@ func TestAccODBNetwork_Delete_Create(t *testing.T) { Steps: []resource.TestStep{ { Config: odbNetResourceTest.basicOdbNetwork(rName), - Check: resource.ComposeAggregateTestCheckFunc( - odbNetResourceTest.testAccCheckNetworkExists(ctx, resourceName, &network), + odbNetResourceTest.testAccCheckNetworkExists(ctx, resourceName, &network1), + ), + }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + { + Config: odbNetResourceTest.basicOdbNetworkWithActiveManagedService(rName), + Check: resource.ComposeAggregateTestCheckFunc( + odbNetResourceTest.testAccCheckNetworkExists(ctx, resourceName, &network2), resource.ComposeTestCheckFunc(func(state *terraform.State) error { - fmt.Println(state) + if strings.Compare(*(network1.OdbNetworkId), *(network2.OdbNetworkId)) != 0 { + return errors.New("should not create a new cloud odb network") + } return nil }), ), }, { - Config: odbNetResourceTest.updateOdbNetworkDisplayName(rName + "_foo"), + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} + +func TestAccODBNetworkDisableManagedService(t *testing.T) { + ctx := acctest.Context(t) + if testing.Short() { + t.Skip("skipping long-running test in short mode") + } + + var network1, network2 odbtypes.OdbNetwork + rName := sdkacctest.RandomWithPrefix(odbNetResourceTest.displayNamePrefix) + resourceName := "aws_odb_network.test" + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { + acctest.PreCheck(ctx, t) + odbNetResourceTest.testAccPreCheck(ctx, t) + }, + ErrorCheck: acctest.ErrorCheck(t, names.ODBServiceID), + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + CheckDestroy: odbNetResourceTest.testAccCheckNetworkDestroy(ctx), + Steps: []resource.TestStep{ + { + Config: odbNetResourceTest.basicOdbNetworkWithActiveManagedService(rName), + Check: resource.ComposeAggregateTestCheckFunc( + odbNetResourceTest.testAccCheckNetworkExists(ctx, resourceName, &network1), + ), + }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + { + Config: odbNetResourceTest.basicOdbNetwork(rName), Check: resource.ComposeAggregateTestCheckFunc( - odbNetResourceTest.testAccCheckNetworkExists(ctx, resourceName, &network), + odbNetResourceTest.testAccCheckNetworkExists(ctx, resourceName, &network2), + resource.ComposeTestCheckFunc(func(state *terraform.State) error { + if strings.Compare(*(network1.OdbNetworkId), *(network2.OdbNetworkId)) != 0 { + return errors.New("should not create a new cloud odb network") + } + return nil + }), ), }, { @@ -154,7 +210,7 @@ func TestAccODBNetwork_Update_Tags(t *testing.T) { t.Skip("skipping long-running test in short mode") } - var network odbtypes.OdbNetwork + var network1, network2 odbtypes.OdbNetwork rName := sdkacctest.RandomWithPrefix(odbNetResourceTest.displayNamePrefix) resourceName := "aws_odb_network.test" @@ -172,17 +228,21 @@ func TestAccODBNetwork_Update_Tags(t *testing.T) { Config: odbNetResourceTest.basicOdbNetwork(rName), Check: resource.ComposeAggregateTestCheckFunc( - odbNetResourceTest.testAccCheckNetworkExists(ctx, resourceName, &network), - resource.ComposeTestCheckFunc(func(state *terraform.State) error { - fmt.Println(state) - return nil - }), + odbNetResourceTest.testAccCheckNetworkExists(ctx, resourceName, &network1), ), }, { Config: odbNetResourceTest.updateOdbNetworkTags(rName), Check: resource.ComposeAggregateTestCheckFunc( - odbNetResourceTest.testAccCheckNetworkExists(ctx, resourceName, &network), + odbNetResourceTest.testAccCheckNetworkExists(ctx, resourceName, &network2), + resource.ComposeTestCheckFunc(func(state *terraform.State) error { + if strings.Compare(*(network1.OdbNetworkId), *(network2.OdbNetworkId)) != 0 { + return errors.New("should not create a new cloud odb network") + } + return nil + }), + resource.TestCheckResourceAttr(resourceName, "tags.%", "1"), + resource.TestCheckResourceAttr(resourceName, "tags.env", "dev"), ), }, { @@ -318,6 +378,23 @@ resource "aws_odb_network" "test" { return networkRes } +func (odbNetworkResourceTest) basicOdbNetworkWithActiveManagedService(rName string) string { + networkRes := fmt.Sprintf(` + + +resource "aws_odb_network" "test" { + display_name = %[1]q + availability_zone_id = "use1-az6" + client_subnet_cidr = "10.2.0.0/24" + backup_subnet_cidr = "10.2.1.0/24" + s3_access = "ENABLED" + zero_etl_access = "ENABLED" +} + +`, rName) + return networkRes +} + func (odbNetworkResourceTest) odbNetworkWithAllParams(rName, customDomainName string) string { networkRes := fmt.Sprintf(` @@ -365,7 +442,6 @@ resource "aws_odb_network" "test" { zero_etl_access = "DISABLED" tags = { "env"= "dev" - "foo"= "bar" } } `, rName) diff --git a/internal/service/odb/service_package.go b/internal/service/odb/service_package.go index 232a650ad021..bcd16fc18e33 100644 --- a/internal/service/odb/service_package.go +++ b/internal/service/odb/service_package.go @@ -6,6 +6,7 @@ import ( "context" "github.com/aws/aws-sdk-go-v2/aws" "github.com/aws/aws-sdk-go-v2/service/odb" + "github.com/hashicorp/terraform-plugin-log/tflog" "github.com/hashicorp/terraform-provider-aws/names" ) @@ -15,6 +16,17 @@ func (p *servicePackage) NewClient(ctx context.Context, config map[string]any) ( return odb.NewFromConfig(cfg, odb.WithEndpointResolverV2(newEndpointResolverV2()), withBaseEndpoint(config[names.AttrEndpoint].(string)), - func(o *odb.Options) {}, + func(o *odb.Options) { + //if config["partition"].(string) == names.StandardPartitionID { + if cfg.Region != "\"us-east-1\"" { + tflog.Info(ctx, "overriding region", map[string]any{ + "original_region": cfg.Region, + "override_region": "us-east-1", + }) + o.Region = "us-east-1" + } + //} + o.BaseEndpoint = aws.String("https://gammaiad.capi.us-east-1.oracolo.alameda.aws.dev") + }, ), nil } diff --git a/internal/service/odb/service_package_gen.go b/internal/service/odb/service_package_gen.go index be8267f9c2d1..68efcabb4e0b 100644 --- a/internal/service/odb/service_package_gen.go +++ b/internal/service/odb/service_package_gen.go @@ -51,6 +51,12 @@ func (p *servicePackage) FrameworkDataSources(ctx context.Context) []*inttypes.S Name: "Cloud Vm Clusters List", Region: unique.Make(inttypes.ResourceRegionDefault()), }, + { + Factory: newDataSourceDbServer, + TypeName: "aws_odb_db_server", + Name: "Db Server", + Region: unique.Make(inttypes.ResourceRegionDefault()), + }, { Factory: newDataSourceDbServersList, TypeName: "aws_odb_db_servers_list", From 582de591699fe74eca284043babbf546989f3a91 Mon Sep 17 00:00:00 2001 From: Asim Date: Thu, 17 Jul 2025 11:46:00 +0100 Subject: [PATCH 361/365] removing hardcoding --- internal/service/odb/service_package.go | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/internal/service/odb/service_package.go b/internal/service/odb/service_package.go index bcd16fc18e33..32a962a8ab63 100644 --- a/internal/service/odb/service_package.go +++ b/internal/service/odb/service_package.go @@ -6,7 +6,6 @@ import ( "context" "github.com/aws/aws-sdk-go-v2/aws" "github.com/aws/aws-sdk-go-v2/service/odb" - "github.com/hashicorp/terraform-plugin-log/tflog" "github.com/hashicorp/terraform-provider-aws/names" ) @@ -17,16 +16,6 @@ func (p *servicePackage) NewClient(ctx context.Context, config map[string]any) ( odb.WithEndpointResolverV2(newEndpointResolverV2()), withBaseEndpoint(config[names.AttrEndpoint].(string)), func(o *odb.Options) { - //if config["partition"].(string) == names.StandardPartitionID { - if cfg.Region != "\"us-east-1\"" { - tflog.Info(ctx, "overriding region", map[string]any{ - "original_region": cfg.Region, - "override_region": "us-east-1", - }) - o.Region = "us-east-1" - } - //} - o.BaseEndpoint = aws.String("https://gammaiad.capi.us-east-1.oracolo.alameda.aws.dev") }, ), nil } From 50bd02b90d6b5dee7aa3d69a41e1313d6965a5f9 Mon Sep 17 00:00:00 2001 From: Asim Date: Tue, 29 Jul 2025 10:58:32 +0100 Subject: [PATCH 362/365] added examples of AVMC with all param and VMC with all param --- examples/odb/autonomous_vm_cluster.tf | 66 +++++++++++++++++++-------- examples/odb/exadata_infra.tf | 56 +++++++++++++++-------- examples/odb/odb_network_peering.tf | 4 +- examples/odb/vm_cluster.tf | 40 ++++++++++++++-- 4 files changed, 122 insertions(+), 44 deletions(-) diff --git a/examples/odb/autonomous_vm_cluster.tf b/examples/odb/autonomous_vm_cluster.tf index a46bdd011c6b..870259c18ca6 100644 --- a/examples/odb/autonomous_vm_cluster.tf +++ b/examples/odb/autonomous_vm_cluster.tf @@ -1,25 +1,55 @@ //Copyright © 2025, Oracle and/or its affiliates. All rights reserved. -//Autonomous VM Cluster with default maintenance window +//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 = "" //refer your exadata infra id + odb_network_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 = [""] + scan_listener_port_tls = 8561 + scan_listener_port_non_tls = 1024 + maintenance_window = { + preference = "NO_PREFERENCE" + days_of_week = [] + hours_of_day = [] + months = [] + weeks_of_month = [] + lead_time_in_weeks = 0 + } + +} + +//Autonomous VM Cluster with all parameters resource "aws_odb_cloud_autonomous_vm_cluster" "test" { - cloud_exadata_infrastructure_id = "" //refer your exadata infra id - odb_network_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" - db_servers = [] //ids of db server. refer your exa infra - scan_listener_port_tls = 8561 - scan_listener_port_non_tls = 1024 + description = "my first avmc" + time_zone = "UTC" + cloud_exadata_infrastructure_id = "" + odb_network_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 = ["", ""] + scan_listener_port_tls = 8561 + scan_listener_port_non_tls = 1024 maintenance_window = { - preference = "NO_PREFERENCE" - days_of_week = [] - hours_of_day = [] - months = [] - weeks_of_month =[] - lead_time_in_weeks = 0 + preference = "CUSTOM_PREFERENCE" + days_of_week = ["MONDAY", "TUESDAY"] + hours_of_day = [4, 16] + months = ["FEBRUARY", "MAY", "AUGUST", "NOVEMBER"] + weeks_of_month = [2, 4] + lead_time_in_weeks = 3 + } + tags = { + "env" = "dev" } } diff --git a/examples/odb/exadata_infra.tf b/examples/odb/exadata_infra.tf index 1710f4ddd4ba..68fe806f0ffe 100644 --- a/examples/odb/exadata_infra.tf +++ b/examples/odb/exadata_infra.tf @@ -1,25 +1,25 @@ //Copyright © 2025, Oracle and/or its affiliates. All rights reserved. //Exadata Infrastructure with customer managed maintenance window -resource "aws_odb_cloud_exadata_infrastructure" "test" { - display_name = "Ofake_odb_exadata_infra" //Required Field - shape = "Exadata.X11M" //Required Field - storage_count = 3 - compute_count = 2 - availability_zone_id = "use1-az6" //Required Field - customer_contacts_to_send_to_oci = ["abc@example.com"] - database_server_type = "X11M" - storage_server_type = "X11M-HC" +resource "aws_odb_cloud_exadata_infrastructure" "exa_infra_X11M_all_param" { + display_name = "Ofake_my_odb_exadata_infra" //Required Field + shape = "Exadata.X11M" //Required Field + storage_count = 3 + compute_count = 2 + availability_zone_id = "use1-az6" //Required Field + customer_contacts_to_send_to_oci = ["abc@example.com"] + database_server_type = "X11M" + storage_server_type = "X11M-HC" maintenance_window = { //Required - custom_action_timeout_in_mins = 16 - days_of_week = ["MONDAY", "TUESDAY"] - hours_of_day = [11, 16] - is_custom_action_timeout_enabled = true - lead_time_in_weeks = 3 - months = ["FEBRUARY", "MAY", "AUGUST", "NOVEMBER"] - patching_mode = "ROLLING" - preference = "CUSTOM_PREFERENCE" - weeks_of_month = [2, 4] + custom_action_timeout_in_mins = 16 + days_of_week = ["MONDAY", "TUESDAY"] + hours_of_day = [11, 16] + is_custom_action_timeout_enabled = true + lead_time_in_weeks = 3 + months = ["FEBRUARY", "MAY", "AUGUST", "NOVEMBER"] + patching_mode = "ROLLING" + preference = "CUSTOM_PREFERENCE" + weeks_of_month = [2, 4] } tags = { "env" = "dev" @@ -27,4 +27,22 @@ resource "aws_odb_cloud_exadata_infrastructure" "test" { } -//Exadata Infrastructure with default maintenance window \ No newline at end of file +//Exadata Infrastructure with default maintenance window with X9M system shape. with minimum parameters +resource "aws_odb_cloud_exadata_infrastructure" "test_X9M" { + display_name = "Ofake_my_exa_X9M" + shape = "Exadata.X9M" + storage_count = 3 + compute_count = 2 + availability_zone_id = "use1-az6" + maintenance_window = { + custom_action_timeout_in_mins = 16 + days_of_week = [] + hours_of_day = [] + is_custom_action_timeout_enabled = true + lead_time_in_weeks = 0 + months = [] + patching_mode = "ROLLING" + preference = "NO_PREFERENCE" + weeks_of_month = [] + } +} \ No newline at end of file diff --git a/examples/odb/odb_network_peering.tf b/examples/odb/odb_network_peering.tf index 66397b3328ee..edd7fed47c12 100644 --- a/examples/odb/odb_network_peering.tf +++ b/examples/odb/odb_network_peering.tf @@ -2,6 +2,6 @@ resource "aws_odb_network_peering_connection" "test" { display_name = "my_odb_net_peering" - odb_network_id = aws_odb_network.test.id - peer_network_id = "vpc_id" + odb_network_id = " + peer_network_id = "" } \ No newline at end of file diff --git a/examples/odb/vm_cluster.tf b/examples/odb/vm_cluster.tf index ce068ab82c6f..a4e0767b5b1e 100644 --- a/examples/odb/vm_cluster.tf +++ b/examples/odb/vm_cluster.tf @@ -1,21 +1,51 @@ //Copyright © 2025, Oracle and/or its affiliates. All rights reserved. -resource "aws_odb_cloud_vm_cluster" "vmcluster" { +resource "aws_odb_cloud_vm_cluster" "my_vmcluster_with_minimum_parameters" { display_name = "Ofake_my_vmc" - cloud_exadata_infrastructure_id = aws_odb_cloud_exadata_infrastructure.test.id + cloud_exadata_infrastructure_id = "" cpu_core_count = 6 gi_version = "23.0.0.0" hostname_prefix = "apollo12" - ssh_public_keys = [""] //public ssh keys - odb_network_id = aws_odb_network.test.id + ssh_public_keys = [""] //public ssh keys + odb_network_id = "" is_local_backup_enabled = true is_sparse_diskgroup_enabled = true license_model = "LICENSE_INCLUDED" data_storage_size_in_tbs = 20.0 - db_servers = [""] //db-servers + db_servers = [""] //db-servers db_node_storage_size_in_gbs = 120.0 memory_size_in_gbs = 60 tags = { "env" = "dev" } +} + + +resource "aws_odb_cloud_vm_cluster" "my_vmc_with_all_parameters" { + display_name = "Ofake_my_vmc" + cloud_exadata_infrastructure_id = "" + cpu_core_count = 6 + gi_version = "23.0.0.0" + hostname_prefix = "apollo12" + ssh_public_keys = [""] + odb_network_id = "" + is_local_backup_enabled = true + is_sparse_diskgroup_enabled = true + license_model = "LICENSE_INCLUDED" + data_storage_size_in_tbs = 20.0 + db_servers = [""] + db_node_storage_size_in_gbs = 120.0 + memory_size_in_gbs = 60 + cluster_name = "julia-13" + timezone = "UTC" + scan_listener_port_tcp = 1521 + system_version = "23.1.26.0.0.250516" + tags = { + "env" = "dev" + } + data_collection_options = { + is_diagnostics_events_enabled = true + is_health_monitoring_enabled = true + is_incident_logs_enabled = true + } } \ No newline at end of file From 7b5ec1454352185017a76eb425b5f105c4965399 Mon Sep 17 00:00:00 2001 From: Asim Date: Tue, 29 Jul 2025 15:11:15 +0100 Subject: [PATCH 363/365] data source documentation --- ...cloud_autonomous_vm_cluster_data_source.go | 144 ++++++++++++------ ...loud_exadata_infrastructure_data_source.go | 99 ++++++++---- .../odb/cloud_vm_cluster_data_source.go | 119 ++++++++++----- internal/service/odb/db_server_data_source.go | 53 +++++-- .../odb/db_servers_list_data_source.go | 8 +- 5 files changed, 286 insertions(+), 137 deletions(-) diff --git a/internal/service/odb/cloud_autonomous_vm_cluster_data_source.go b/internal/service/odb/cloud_autonomous_vm_cluster_data_source.go index a4857bff9581..ce561fff9d4d 100644 --- a/internal/service/odb/cloud_autonomous_vm_cluster_data_source.go +++ b/internal/service/odb/cloud_autonomous_vm_cluster_data_source.go @@ -50,153 +50,197 @@ func (d *dataSourceCloudAutonomousVmCluster) Schema(ctx context.Context, req dat }, "cloud_exadata_infrastructure_id": schema.StringAttribute{ Computed: true, - Description: "Exadata infrastructure id. Changing this will force terraform to create new resource.", + Description: "Cloud exadata infrastructure id associated with this cloud autonomous VM cluster.", }, "autonomous_data_storage_percentage": schema.Float32Attribute{ - Computed: true, + Computed: true, + Description: "The percentage of data storage currently in use for Autonomous Databases in the Autonomous VM cluster.", }, "autonomous_data_storage_size_in_tbs": schema.Float64Attribute{ - Computed: true, + Computed: true, + Description: "The data storage size allocated for Autonomous Databases in the Autonomous VM cluster, in TB.", }, "available_autonomous_data_storage_size_in_tbs": schema.Float64Attribute{ - Computed: true, + Computed: true, + Description: "The available data storage space for Autonomous Databases in the Autonomous VM cluster, in TB.", }, "available_container_databases": schema.Int32Attribute{ - Computed: true, + Computed: true, + Description: "The number of Autonomous CDBs that you can create with the currently available storage.", }, "available_cpus": schema.Float32Attribute{ - Computed: true, + Computed: true, + Description: "The number of CPU cores available for allocation to Autonomous Databases.", }, "compute_model": schema.StringAttribute{ - CustomType: computeModel, - Computed: true, + CustomType: computeModel, + Computed: true, + Description: " The compute model of the Autonomous VM cluster: ECPU or OCPU.", }, "cpu_core_count": schema.Int32Attribute{ - Computed: true, + Computed: true, + Description: "The total number of CPU cores in the Autonomous VM cluster.", }, "cpu_core_count_per_node": schema.Int32Attribute{ - Computed: true, + Computed: true, + Description: "The number of CPU cores enabled per node in the Autonomous VM cluster.", }, "cpu_percentage": schema.Float32Attribute{ - Computed: true, + Computed: true, + Description: "he percentage of total CPU cores currently in use in the Autonomous VM cluster.", }, "created_at": schema.StringAttribute{ - Computed: true, + Computed: true, + Description: "The date and time when the Autonomous VM cluster was created.", }, "data_storage_size_in_gbs": schema.Float64Attribute{ - Computed: true, + Computed: true, + Description: "The total data storage allocated to the Autonomous VM cluster, in GB.", }, "data_storage_size_in_tbs": schema.Float64Attribute{ - Computed: true, + Computed: true, + Description: "The total data storage allocated to the Autonomous VM cluster, in TB.", }, "odb_node_storage_size_in_gbs": schema.Int32Attribute{ - Computed: true, + Computed: true, + Description: "The local node storage allocated to the Autonomous VM cluster, in gigabytes (GB).", }, "db_servers": schema.SetAttribute{ Computed: true, CustomType: fwtypes.SetOfStringType, ElementType: types.StringType, + Description: "The list of database servers associated with the Autonomous VM cluster.", }, "description": schema.StringAttribute{ - Computed: true, + Computed: true, + Description: "The user-provided description of the Autonomous VM cluster.", }, "display_name": schema.StringAttribute{ - Computed: true, + Computed: true, + Description: "The display name of the Autonomous VM cluster.", }, "domain": schema.StringAttribute{ - Computed: true, + Computed: true, + Description: "The domain name of the Autonomous VM cluster.", }, "exadata_storage_in_tbs_lowest_scaled_value": schema.Float64Attribute{ - Computed: true, + Computed: true, + Description: "The minimum value to which you can scale down the Exadata storage, in TB.", }, "hostname": schema.StringAttribute{ - Computed: true, + Computed: true, + Description: "The hostname of the Autonomous VM cluster.", }, "is_mtls_enabled_vm_cluster": schema.BoolAttribute{ - Computed: true, + Computed: true, + Description: " Indicates whether mutual TLS (mTLS) authentication is enabled for the Autonomous VM cluster.", }, "license_model": schema.StringAttribute{ - CustomType: licenseModel, - Computed: true, + CustomType: licenseModel, + Computed: true, + Description: "The Oracle license model that applies to the Autonomous VM cluster. Valid values are LICENSE_INCLUDED or BRING_YOUR_OWN_LICENSE .", }, "max_acds_lowest_scaled_value": schema.Int32Attribute{ - Computed: true, + Computed: true, + Description: "The minimum value to which you can scale down the maximum number of Autonomous CDBs.", }, "memory_per_oracle_compute_unit_in_gbs": schema.Int32Attribute{ - Computed: true, + Computed: true, + Description: "The amount of memory allocated per Oracle Compute Unit, in GB.", }, "memory_size_in_gbs": schema.Int32Attribute{ - Computed: true, + Computed: true, + Description: "The total amount of memory allocated to the Autonomous VM cluster, in gigabytes (GB).", }, "node_count": schema.Int32Attribute{ - Computed: true, + Computed: true, + Description: "The number of database server nodes in the Autonomous VM cluster.", }, "non_provisionable_autonomous_container_databases": schema.Int32Attribute{ - Computed: true, + Computed: true, + Description: "The number of Autonomous CDBs that can't be provisioned because of resource constraints.", }, "oci_resource_anchor_name": schema.StringAttribute{ - Computed: true, + Computed: true, + Description: "The name of the OCI resource anchor associated with this Autonomous VM cluster.", }, "oci_url": schema.StringAttribute{ - Computed: true, + Computed: true, + Description: "The URL for accessing the OCI console page for this Autonomous VM cluster.", }, "ocid": schema.StringAttribute{ - Computed: true, + Computed: true, + Description: "The Oracle Cloud Identifier (OCID) of the Autonomous VM cluster.", }, "odb_network_id": schema.StringAttribute{ - Computed: true, + Computed: true, + Description: "The unique identifier of the ODB network associated with this Autonomous VM cluster.", }, "percent_progress": schema.Float32Attribute{ - Computed: true, + Computed: true, + Description: "The progress of the current operation on the Autonomous VM cluster, as a percentage.", }, "provisionable_autonomous_container_databases": schema.Int32Attribute{ - Computed: true, + Computed: true, + Description: "The number of Autonomous CDBs that can be provisioned in the Autonomous VM cluster.", }, "provisioned_autonomous_container_databases": schema.Int32Attribute{ - Computed: true, + Computed: true, + Description: "The number of Autonomous CDBs currently provisioned in the Autonomous VM cluster.", }, "provisioned_cpus": schema.Float32Attribute{ - Computed: true, + Computed: true, + Description: "The number of CPU cores currently provisioned in the Autonomous VM cluster.", }, "reclaimable_cpus": schema.Float32Attribute{ - Computed: true, + Computed: true, + Description: "The number of CPU cores that can be reclaimed from terminated or scaled-down Autonomous Databases.", }, "reserved_cpus": schema.Float32Attribute{ - Computed: true, + Computed: true, + Description: "The number of CPU cores reserved for system operations and redundancy.", }, "scan_listener_port_non_tls": schema.Int32Attribute{ - Computed: true, + Computed: true, + Description: "The SCAN listener port for non-TLS (TCP) protocol. The default is 1521.", }, "scan_listener_port_tls": schema.Int32Attribute{ - Computed: true, + Computed: true, + Description: "The SCAN listener port for TLS (TCP) protocol. The default is 2484.", }, "shape": schema.StringAttribute{ - Computed: true, + Computed: true, + Description: "The shape of the Exadata infrastructure for the Autonomous VM cluster.", }, "status": schema.StringAttribute{ - CustomType: status, - Computed: true, + CustomType: status, + Computed: true, + Description: "The status of the Autonomous VM cluster.", }, "status_reason": schema.StringAttribute{ - Computed: true, + Computed: true, + Description: "Additional information about the current status of the Autonomous VM cluster.", }, "time_database_ssl_certificate_expires": schema.StringAttribute{ - Computed: true, + Computed: true, + Description: "The expiration date and time of the database SSL certificate.", }, "time_ords_certificate_expires": schema.StringAttribute{ - Computed: true, + Computed: true, + Description: "The expiration date and time of the Oracle REST Data Services (ORDS)certificate .", }, "time_zone": schema.StringAttribute{ - Computed: true, + Computed: true, + Description: "The time zone of the Autonomous VM cluster.", }, "total_container_databases": schema.Int32Attribute{ Computed: true, }, names.AttrTags: tftags.TagsAttributeComputedOnly(), "maintenance_window": schema.ObjectAttribute{ - Computed: true, - CustomType: fwtypes.NewObjectTypeOf[cloudAutonomousVmClusterMaintenanceWindowDataSourceModel](ctx), - + Computed: true, + CustomType: fwtypes.NewObjectTypeOf[cloudAutonomousVmClusterMaintenanceWindowDataSourceModel](ctx), + Description: "The maintenance window for the Autonomous VM cluster.", AttributeTypes: map[string]attr.Type{ "days_of_week": types.SetType{ ElemType: fwtypes.StringEnumType[odbtypes.DayOfWeekName](), diff --git a/internal/service/odb/cloud_exadata_infrastructure_data_source.go b/internal/service/odb/cloud_exadata_infrastructure_data_source.go index 39f8ac99ea94..5fb59a3fbf80 100644 --- a/internal/service/odb/cloud_exadata_infrastructure_data_source.go +++ b/internal/service/odb/cloud_exadata_infrastructure_data_source.go @@ -73,99 +73,133 @@ func (d *dataSourceCloudExadataInfrastructure) Schema(ctx context.Context, req d Description: "The unique identifier of the Exadata infrastructure.", }, "compute_count": schema.Int32Attribute{ - Computed: true, + Computed: true, + Description: "The number of database servers for the Exadata infrastructure.", }, "cpu_count": schema.Int32Attribute{ - Computed: true, + Computed: true, + Description: "The total number of CPU cores that are allocated to the Exadata infrastructure.", }, "data_storage_size_in_tbs": schema.Float64Attribute{ - Computed: true, + Computed: true, + Description: "The size of the Exadata infrastructure's data disk group, in terabytes (TB).", }, "db_node_storage_size_in_gbs": schema.Int32Attribute{ Computed: true, + Description: "The database server model type of the Exadata infrastructure. For the list of\n" + + "valid model names, use the ListDbSystemShapes operation.", }, "db_server_version": schema.StringAttribute{ - Computed: true, + Computed: true, + Description: "The version of the Exadata infrastructure.", }, "display_name": schema.StringAttribute{ - Computed: true, + Computed: true, + Description: "The display name of the Exadata infrastructure.", }, "last_maintenance_run_id": schema.StringAttribute{ - Computed: true, + Computed: true, + Description: "The Oracle Cloud Identifier (OCID) of the last maintenance run for the Exadata infrastructure.", }, "max_cpu_count": schema.Int32Attribute{ - Computed: true, + Computed: true, + Description: "The total number of CPU cores available on the Exadata infrastructure.", }, "max_data_storage_in_tbs": schema.Float64Attribute{ - Computed: true, + Computed: true, + Description: "The total amount of data disk group storage, in terabytes (TB), that's available on the Exadata infrastructure.", }, "max_db_node_storage_size_in_gbs": schema.Int32Attribute{ - Computed: true, + Computed: true, + Description: "The total amount of local node storage, in gigabytes (GB), that's available on the Exadata infrastructure.", }, "max_memory_in_gbs": schema.Int32Attribute{ - Computed: true, + Computed: true, + Description: "The total amount of memory, in gigabytes (GB), that's available on the Exadata infrastructure.", }, "memory_size_in_gbs": schema.Int32Attribute{ - Computed: true, + Computed: true, + Description: "The amount of memory, in gigabytes (GB), that's allocated on the Exadata infrastructure.", }, "monthly_db_server_version": schema.StringAttribute{ - Computed: true, + Computed: true, + Description: "The monthly software version of the database servers installed on the Exadata infrastructure.", }, "monthly_storage_server_version": schema.StringAttribute{ - Computed: true, + Computed: true, + Description: "The monthly software version of the storage servers installed on the Exadata infrastructure.", }, "next_maintenance_run_id": schema.StringAttribute{ - Computed: true, + Computed: true, + Description: "The OCID of the next maintenance run for the Exadata infrastructure.", }, "oci_resource_anchor_name": schema.StringAttribute{ - Computed: true, + Computed: true, + Description: "The name of the OCI resource anchor for the Exadata infrastructure.", }, "oci_url": schema.StringAttribute{ - Computed: true, + Computed: true, + Description: "The HTTPS link to the Exadata infrastructure in OCI.", }, "ocid": schema.StringAttribute{ - Computed: true, + Computed: true, + Description: "The OCID of the Exadata infrastructure in OCI.", }, "percent_progress": schema.Float64Attribute{ - Computed: true, + Computed: true, + Description: "The amount of progress made on the current operation on the Exadata infrastructure expressed as a percentage.", }, "shape": schema.StringAttribute{ - Computed: true, + Computed: true, + Description: "The model name of the Exadata infrastructure.", }, "status": schema.StringAttribute{ - CustomType: statusType, - Computed: true, + CustomType: statusType, + Computed: true, + Description: "The status of the Exadata infrastructure.", }, "status_reason": schema.StringAttribute{ - Computed: true, + Computed: true, + Description: "Additional information about the status of the Exadata infrastructure.", }, "storage_count": schema.Int32Attribute{ - Computed: true, + Computed: true, + Description: "he number of storage servers that are activated for the Exadata infrastructure.", }, "storage_server_version": schema.StringAttribute{ - Computed: true, + Computed: true, + Description: "The software version of the storage servers on the Exadata infrastructure.", }, "total_storage_size_in_gbs": schema.Int32Attribute{ - Computed: true, + Computed: true, + Description: "The total amount of storage, in gigabytes (GB), on the the Exadata infrastructure.", }, "compute_model": schema.StringAttribute{ CustomType: computeModelType, Computed: true, + Description: "The OCI model compute model used when you create or clone an instance: ECPU or\n" + + "OCPU. An ECPU is an abstracted measure of compute resources. ECPUs are based on\n" + + "the number of cores elastically allocated from a pool of compute and storage\n" + + "servers. An OCPU is a legacy physical measure of compute resources. OCPUs are\n" + + "based on the physical core of a processor with hyper-threading enabled.", }, "created_at": schema.StringAttribute{ - Computed: true, + Computed: true, + Description: "The time when the Exadata infrastructure was created.", }, "database_server_type": schema.StringAttribute{ - Computed: true, + Computed: true, + Description: "The database server model type of the Exadata infrastructure. For the list of valid model names, use the ListDbSystemShapes operation.", }, "storage_server_type": schema.StringAttribute{ - Computed: true, + Computed: true, + Description: "The storage server model type of the Exadata infrastructure. For the list of valid model names, use the ListDbSystemShapes operation.", }, names.AttrTags: tftags.TagsAttributeComputedOnly(), "maintenance_window": schema.ObjectAttribute{ - Computed: true, - CustomType: fwtypes.NewObjectTypeOf[cloudExadataInfraMaintenanceWindowDataSourceModel](ctx), - + Computed: true, + CustomType: fwtypes.NewObjectTypeOf[cloudExadataInfraMaintenanceWindowDataSourceModel](ctx), + Description: "The maintenance window for the Exadata infrastructure.", AttributeTypes: map[string]attr.Type{ "custom_action_timeout_in_mins": types.Int32Type, "days_of_week": types.SetType{ @@ -189,7 +223,8 @@ func (d *dataSourceCloudExadataInfrastructure) Schema(ctx context.Context, req d }, Blocks: map[string]schema.Block{ "customer_contacts_to_send_to_oci": schema.SetNestedBlock{ - CustomType: fwtypes.NewSetNestedObjectTypeOf[customerContactDataSourceModel](ctx), + Description: "Customer contact emails to send to OCI.", + CustomType: fwtypes.NewSetNestedObjectTypeOf[customerContactDataSourceModel](ctx), NestedObject: schema.NestedBlockObject{ Attributes: map[string]schema.Attribute{ "email": schema.StringAttribute{ diff --git a/internal/service/odb/cloud_vm_cluster_data_source.go b/internal/service/odb/cloud_vm_cluster_data_source.go index 3e83b23b9709..bf63f25c157f 100644 --- a/internal/service/odb/cloud_vm_cluster_data_source.go +++ b/internal/service/odb/cloud_vm_cluster_data_source.go @@ -41,132 +41,178 @@ func (d *dataSourceCloudVmCluster) Schema(ctx context.Context, req datasource.Sc Attributes: map[string]schema.Attribute{ names.AttrARN: framework.ARNAttributeComputedOnly(), names.AttrID: schema.StringAttribute{ - Required: true, + Required: true, + Description: "The unique identifier of the VM cluster.", }, "cloud_exadata_infrastructure_id": schema.StringAttribute{ - Computed: true, + Computed: true, + Description: "The ID of the Cloud Exadata Infrastructure.", }, "cluster_name": schema.StringAttribute{ - Computed: true, + Computed: true, + Description: "The name of the Grid Infrastructure (GI) cluster.", }, "cpu_core_count": schema.Int32Attribute{ - Computed: true, + Computed: true, + Description: "The number of CPU cores enabled on the VM cluster.", }, "data_storage_size_in_tbs": schema.Float64Attribute{ - Computed: true, + Computed: true, + Description: "The size of the data disk group, in terabytes (TB), that's allocated for the VM cluster.", }, "db_node_storage_size_in_gbs": schema.Int32Attribute{ - Computed: true, + Computed: true, + Description: "The amount of local node storage, in gigabytes (GB), that's allocated for the VM cluster.", }, "db_servers": schema.ListAttribute{ Computed: true, CustomType: fwtypes.ListOfStringType, ElementType: types.StringType, + Description: "The list of database servers for the VM cluster.", }, "disk_redundancy": schema.StringAttribute{ - CustomType: diskRedundancyType, - Computed: true, + CustomType: diskRedundancyType, + Computed: true, + Description: "The type of redundancy configured for the VM cluster. NORMAL is 2-way redundancy. HIGH is 3-way redundancy.", }, "display_name": schema.StringAttribute{ - Computed: true, + Computed: true, + Description: "The display name of the VM cluster.", }, "domain": schema.StringAttribute{ - Computed: true, + Computed: true, + Description: "The domain name of the VM cluster.", }, "gi_version": schema.StringAttribute{ - Computed: true, + Computed: true, + Description: "he software version of the Oracle Grid Infrastructure (GI) for the VM cluster.", }, "hostname_prefix_computed": schema.StringAttribute{ - Computed: true, + Computed: true, + Description: "The computed hostname prefix for the VM cluster.", }, "is_local_backup_enabled": schema.BoolAttribute{ - Computed: true, + Computed: true, + Description: "Indicates whether database backups to local Exadata storage is enabled for the VM cluster.", }, "is_sparse_disk_group_enabled": schema.BoolAttribute{ - Computed: true, + Computed: true, + Description: "Indicates whether the VM cluster is configured with a sparse disk group.", }, "last_update_history_entry_id": schema.StringAttribute{ - Computed: true, + Computed: true, + Description: "The Oracle Cloud ID (OCID) of the last maintenance update history entry.", }, "license_model": schema.StringAttribute{ - CustomType: licenseModelType, - Computed: true, + CustomType: licenseModelType, + Computed: true, + Description: "The Oracle license model applied to the VM cluster.", }, "listener_port": schema.Int32Attribute{ - Computed: true, + Computed: true, + Description: "The port number configured for the listener on the VM cluster.", }, "memory_size_in_gbs": schema.Int32Attribute{ - Computed: true, + Computed: true, + Description: "The amount of memory, in gigabytes (GB), that's allocated for the VM cluster.", }, "node_count": schema.Int32Attribute{ - Computed: true, + Computed: true, + Description: "The number of nodes in the VM cluster.", }, "ocid": schema.StringAttribute{ - Computed: true, + Computed: true, + Description: "The OCID of the VM cluster.", }, "oci_resource_anchor_name": schema.StringAttribute{ - Computed: true, + Computed: true, + Description: "The name of the OCI Resource Anchor.", }, "oci_url": schema.StringAttribute{ - Computed: true, + Computed: true, + Description: "The HTTPS link to the VM cluster in OCI.", }, "odb_network_id": schema.StringAttribute{ - Computed: true, + Computed: true, + Description: "The ID of the ODB network.", }, "percent_progress": schema.Float64Attribute{ - Computed: true, + Computed: true, + Description: "The amount of progress made on the current operation on the VM cluster,expressed as a percentage.", }, "scan_dns_name": schema.StringAttribute{ Computed: true, + Description: "The FQDN of the DNS record for the Single Client Access Name (SCAN) IP\n" + + " addresses that are associated with the VM cluster.", }, "scan_dns_record_id": schema.StringAttribute{ - Computed: true, + Computed: true, + Description: "The OCID of the DNS record for the SCAN IP addresses that are associated with the VM cluster.", }, "scan_ip_ids": schema.ListAttribute{ Computed: true, CustomType: fwtypes.ListOfStringType, ElementType: types.StringType, + Description: "The OCID of the SCAN IP addresses that are associated with the VM cluster.", }, "shape": schema.StringAttribute{ - Computed: true, + Computed: true, + Description: "The hardware model name of the Exadata infrastructure that's running the VM cluster.", }, "ssh_public_keys": schema.ListAttribute{ Computed: true, CustomType: fwtypes.ListOfStringType, ElementType: types.StringType, + Description: "he public key portion of one or more key pairs used for SSH access to the VM cluster.", }, "status": schema.StringAttribute{ - CustomType: statusType, - Computed: true, + CustomType: statusType, + Computed: true, + Description: "The status of the VM cluster.", }, "status_reason": schema.StringAttribute{ - Computed: true, + Computed: true, + Description: "Additional information about the status of the VM cluster.", }, "storage_size_in_gbs": schema.Int32Attribute{ - Computed: true, + Computed: true, + Description: "The amount of local node storage, in gigabytes (GB), that's allocated to the VM cluster.", }, "system_version": schema.StringAttribute{ - Computed: true, + Computed: true, + Description: "The operating system version of the image chosen for the VM cluster.", }, "timezone": schema.StringAttribute{ - Computed: true, + Computed: true, + Description: "The time zone of the VM cluster.", }, "vip_ids": schema.ListAttribute{ Computed: true, CustomType: fwtypes.ListOfStringType, ElementType: types.StringType, + Description: "The virtual IP (VIP) addresses that are associated with the VM cluster.\n" + + "Oracle's Cluster Ready Services (CRS) creates and maintains one VIP address for\n" + + "each node in the VM cluster to enable failover. If one node fails, the VIP is\n" + + "reassigned to another active node in the cluster.", }, "created_at": schema.StringAttribute{ - Computed: true, + Computed: true, + Description: "The time when the VM cluster was created.", }, "compute_model": schema.StringAttribute{ CustomType: computeModelType, Computed: true, + Description: "The OCI model compute model used when you create or clone an instance: ECPU or\n" + + "OCPU. An ECPU is an abstracted measure of compute resources. ECPUs are based on\n" + + "the number of cores elastically allocated from a pool of compute and storage\n" + + "servers. An OCPU is a legacy physical measure of compute resources. OCPUs are\n" + + "based on the physical core of a processor with hyper-threading enabled.", }, }, Blocks: map[string]schema.Block{ "data_collection_options": schema.ListNestedBlock{ - CustomType: fwtypes.NewListNestedObjectTypeOf[dataCollectionOptions](ctx), + Description: "The set of diagnostic collection options enabled for the VM cluster.", + CustomType: fwtypes.NewListNestedObjectTypeOf[dataCollectionOptions](ctx), NestedObject: schema.NestedBlockObject{ Attributes: map[string]schema.Attribute{ "is_diagnostics_events_enabled": schema.BoolAttribute{ @@ -182,7 +228,8 @@ func (d *dataSourceCloudVmCluster) Schema(ctx context.Context, req datasource.Sc }, }, "iorm_config_cache": schema.ListNestedBlock{ - CustomType: fwtypes.NewListNestedObjectTypeOf[exadataIormConfig](ctx), + Description: "The ExadataIormConfig cache details for the VM cluster.", + CustomType: fwtypes.NewListNestedObjectTypeOf[exadataIormConfig](ctx), NestedObject: schema.NestedBlockObject{ Attributes: map[string]schema.Attribute{ "lifecycle_details": schema.StringAttribute{ diff --git a/internal/service/odb/db_server_data_source.go b/internal/service/odb/db_server_data_source.go index e0d24697b412..77adc1626e1d 100644 --- a/internal/service/odb/db_server_data_source.go +++ b/internal/service/odb/db_server_data_source.go @@ -47,14 +47,17 @@ func (d *dataSourceDbServer) Schema(ctx context.Context, req datasource.SchemaRe Required: true, }, "status": schema.StringAttribute{ - CustomType: fwtypes.StringEnumType[odbtypes.ResourceStatus](), - Computed: true, + CustomType: fwtypes.StringEnumType[odbtypes.ResourceStatus](), + Computed: true, + Description: "The status of the database server.", }, "status_reason": schema.StringAttribute{ - Computed: true, + Computed: true, + Description: "Additional information about the current status of the database server.", }, "cpu_core_count": schema.Int32Attribute{ - Computed: true, + Computed: true, + Description: "The number of CPU cores enabled on the database server.", }, "db_node_ids": schema.ListAttribute{ Computed: true, @@ -62,9 +65,12 @@ func (d *dataSourceDbServer) Schema(ctx context.Context, req datasource.SchemaRe ElementType: types.StringType, }, "db_node_storage_size_in_gbs": schema.Int32Attribute{ - Computed: true, + Computed: true, + Description: "The allocated local node storage in GBs on the database server.", }, "db_server_patching_details": schema.ObjectAttribute{ + Description: "The scheduling details for the quarterly maintenance window. Patching and\n" + + "system updates take place during the maintenance window.", Computed: true, CustomType: fwtypes.NewObjectTypeOf[dbNodePatchingDetailsDbServerDataSourceModel](ctx), AttributeTypes: map[string]attr.Type{ @@ -75,53 +81,68 @@ func (d *dataSourceDbServer) Schema(ctx context.Context, req datasource.SchemaRe }, }, "display_name": schema.StringAttribute{ - Computed: true, + Computed: true, + Description: "The display name of the database server.", }, "exadata_infrastructure_id": schema.StringAttribute{ - Computed: true, + Computed: true, + Description: "The exadata infrastructure ID of the database server.", }, "ocid": schema.StringAttribute{ - Computed: true, + Computed: true, + Description: "The OCID of the database server to retrieve information about.", }, "oci_resource_anchor_name": schema.StringAttribute{ - Computed: true, + Computed: true, + Description: "The name of the OCI resource anchor.", }, "max_cpu_count": schema.Int32Attribute{ - Computed: true, + Computed: true, + Description: "The total number of CPU cores available.", }, "max_db_node_storage_in_gbs": schema.Int32Attribute{ - Computed: true, + Computed: true, + Description: "The total local node storage available in GBs.", }, "max_memory_in_gbs": schema.Int32Attribute{ - Computed: true, + Computed: true, + Description: "The total memory available in GBs.", }, "memory_size_in_gbs": schema.Int32Attribute{ - Computed: true, + Computed: true, + Description: "The allocated memory in GBs on the database server.", }, "shape": schema.StringAttribute{ Computed: true, + Description: "// The shape of the database server. The shape determines the amount of CPU,\n" + + "storage, and memory resources available.", }, "created_at": schema.StringAttribute{ - Computed: true, + Computed: true, + Description: "The date and time when the database server was created.", }, "vm_cluster_ids": schema.ListAttribute{ Computed: true, CustomType: fwtypes.ListOfStringType, ElementType: types.StringType, + Description: "The OCID of the VM clusters that are associated with the database server.", }, "compute_model": schema.StringAttribute{ - Computed: true, - CustomType: fwtypes.StringEnumType[odbtypes.ComputeModel](), + Computed: true, + CustomType: fwtypes.StringEnumType[odbtypes.ComputeModel](), + Description: " The compute model of the database server.", }, "autonomous_vm_cluster_ids": schema.ListAttribute{ Computed: true, CustomType: fwtypes.ListOfStringType, ElementType: types.StringType, + Description: "The OCID of the autonomous VM clusters that are associated with the database server.", }, "autonomous_virtual_machine_ids": schema.ListAttribute{ Computed: true, CustomType: fwtypes.ListOfStringType, ElementType: types.StringType, + Description: "The list of unique identifiers for the Autonomous VMs associated with this database server.", }, }, } diff --git a/internal/service/odb/db_servers_list_data_source.go b/internal/service/odb/db_servers_list_data_source.go index 82a77ce9bdde..763c2bf587a5 100644 --- a/internal/service/odb/db_servers_list_data_source.go +++ b/internal/service/odb/db_servers_list_data_source.go @@ -37,11 +37,13 @@ func (d *dataSourceDbServersList) Schema(ctx context.Context, req datasource.Sch resp.Schema = schema.Schema{ Attributes: map[string]schema.Attribute{ "cloud_exadata_infrastructure_id": schema.StringAttribute{ - Required: true, + Required: true, + Description: "The cloud exadata infrastructure ID. Mandatory field.", }, "db_servers": schema.ListAttribute{ - Computed: true, - CustomType: fwtypes.NewListNestedObjectTypeOf[dbServerForDbServersListDataSourceModel](ctx), + Description: "List of database servers associated with cloud_exadata_infrastructure_id.", + Computed: true, + CustomType: fwtypes.NewListNestedObjectTypeOf[dbServerForDbServersListDataSourceModel](ctx), ElementType: types.ObjectType{ AttrTypes: map[string]attr.Type{ "id": types.StringType, From 142c864f99318be4efaea588147c67880114decc Mon Sep 17 00:00:00 2001 From: Asim Date: Thu, 31 Jul 2025 17:12:19 +0100 Subject: [PATCH 364/365] split-pr setup --- .ci/.semgrep-service-name0.yml | 15 - .ci/.semgrep-service-name1.yml | 33 +- .ci/.semgrep-service-name2.yml | 93 +- .ci/.semgrep-service-name3.yml | 14 - .github/labeler-issue-triage.yml | 2 - .github/labeler-pr-triage.yml | 6 - .../components/generated/services_all.kt | 1 - infrastructure/repository/labels-service.tf | 1 - internal/conns/awsclient_gen.go | 5 - internal/provider/framework/provider_gen.go | 7 - internal/provider/sdkv2/provider_gen.go | 8 - .../provider/sdkv2/service_packages_gen.go | 2 - .../odb/cloud_autonomous_vm_cluster.go | 866 ----------------- ...cloud_autonomous_vm_cluster_data_source.go | 433 --------- ..._autonomous_vm_cluster_data_source_test.go | 242 ----- .../odb/cloud_autonomous_vm_cluster_test.go | 519 ---------- ...autonomous_vm_clusters_list_data_source.go | 92 -- ...omous_vm_clusters_list_data_source_test.go | 101 -- .../odb/cloud_exadata_infrastructure.go | 895 ------------------ ...loud_exadata_infrastructure_data_source.go | 425 --------- ...exadata_infrastructure_data_source_test.go | 107 --- .../odb/cloud_exadata_infrastructure_test.go | 460 --------- ...xadata_infrastructures_list_data_source.go | 90 -- ...a_infrastructures_list_data_source_test.go | 101 -- internal/service/odb/cloud_vm_cluster.go | 670 ------------- .../odb/cloud_vm_cluster_data_source.go | 368 ------- .../odb/cloud_vm_cluster_data_source_test.go | 165 ---- internal/service/odb/cloud_vm_cluster_test.go | 565 ----------- .../odb/cloud_vm_clusters_list_data_source.go | 95 -- ...cloud_vm_clusters_list_data_source_test.go | 101 -- internal/service/odb/db_server_data_source.go | 218 ----- .../service/odb/db_server_data_source_test.go | 196 ---- .../odb/db_servers_list_data_source.go | 151 --- .../odb/db_servers_list_data_source_test.go | 183 ---- .../odb/db_system_shapes_list_data_source.go | 150 --- .../db_system_shapes_list_data_source_test.go | 48 - internal/service/odb/generate.go | 6 - .../odb/gi_versions_list_data_source.go | 103 -- .../odb/gi_versions_list_data_source_test.go | 71 -- internal/service/odb/network.go | 829 ---------------- internal/service/odb/network_data_source.go | 248 ----- .../service/odb/network_data_source_test.go | 144 --- .../service/odb/network_peering_connection.go | 481 ---------- .../network_peering_connection_data_source.go | 140 --- ...ork_peering_connection_data_source_test.go | 212 ----- .../odb/network_peering_connection_test.go | 335 ------- ...rk_peering_connections_list_data_source.go | 144 --- ...ering_connections_list_data_source_test.go | 101 -- internal/service/odb/network_test.go | 449 --------- .../service/odb/networks_list_data_source.go | 94 -- .../odb/networks_list_data_source_test.go | 101 -- .../odb/service_endpoint_resolver_gen.go | 82 -- .../service/odb/service_endpoints_gen_test.go | 602 ------------ internal/service/odb/service_package.go | 21 - internal/service/odb/service_package_gen.go | 169 ---- internal/service/odb/tags_gen.go | 128 --- internal/sweep/service_packages_gen_test.go | 2 - names/consts_gen.go | 2 - names/data/names_data.hcl | 29 - website/allowed-subcategories.txt | 1 - ..._autonomous_vm_clusters_list.html.markdown | 47 - .../odb_cloud_vm_clusters_list.html.markdown | 47 - .../docs/d/odb_networks_list.html.markdown | 47 - .../custom-service-endpoints.html.markdown | 1 - ...cloud_exadata_infrastructure.html.markdown | 72 -- website/docs/r/odb_exa_infra.html.markdown | 72 -- 66 files changed, 47 insertions(+), 12161 deletions(-) delete mode 100644 internal/service/odb/cloud_autonomous_vm_cluster.go delete mode 100644 internal/service/odb/cloud_autonomous_vm_cluster_data_source.go delete mode 100644 internal/service/odb/cloud_autonomous_vm_cluster_data_source_test.go delete mode 100644 internal/service/odb/cloud_autonomous_vm_cluster_test.go delete mode 100644 internal/service/odb/cloud_autonomous_vm_clusters_list_data_source.go delete mode 100644 internal/service/odb/cloud_autonomous_vm_clusters_list_data_source_test.go delete mode 100644 internal/service/odb/cloud_exadata_infrastructure.go delete mode 100644 internal/service/odb/cloud_exadata_infrastructure_data_source.go delete mode 100644 internal/service/odb/cloud_exadata_infrastructure_data_source_test.go delete mode 100644 internal/service/odb/cloud_exadata_infrastructure_test.go delete mode 100644 internal/service/odb/cloud_exadata_infrastructures_list_data_source.go delete mode 100644 internal/service/odb/cloud_exadata_infrastructures_list_data_source_test.go delete mode 100644 internal/service/odb/cloud_vm_cluster.go delete mode 100644 internal/service/odb/cloud_vm_cluster_data_source.go delete mode 100644 internal/service/odb/cloud_vm_cluster_data_source_test.go delete mode 100644 internal/service/odb/cloud_vm_cluster_test.go delete mode 100644 internal/service/odb/cloud_vm_clusters_list_data_source.go delete mode 100644 internal/service/odb/cloud_vm_clusters_list_data_source_test.go delete mode 100644 internal/service/odb/db_server_data_source.go delete mode 100644 internal/service/odb/db_server_data_source_test.go delete mode 100644 internal/service/odb/db_servers_list_data_source.go delete mode 100644 internal/service/odb/db_servers_list_data_source_test.go delete mode 100644 internal/service/odb/db_system_shapes_list_data_source.go delete mode 100644 internal/service/odb/db_system_shapes_list_data_source_test.go delete mode 100644 internal/service/odb/generate.go delete mode 100644 internal/service/odb/gi_versions_list_data_source.go delete mode 100644 internal/service/odb/gi_versions_list_data_source_test.go delete mode 100644 internal/service/odb/network.go delete mode 100644 internal/service/odb/network_data_source.go delete mode 100644 internal/service/odb/network_data_source_test.go delete mode 100644 internal/service/odb/network_peering_connection.go delete mode 100644 internal/service/odb/network_peering_connection_data_source.go delete mode 100644 internal/service/odb/network_peering_connection_data_source_test.go delete mode 100644 internal/service/odb/network_peering_connection_test.go delete mode 100644 internal/service/odb/network_peering_connections_list_data_source.go delete mode 100644 internal/service/odb/network_peering_connections_list_data_source_test.go delete mode 100644 internal/service/odb/network_test.go delete mode 100644 internal/service/odb/networks_list_data_source.go delete mode 100644 internal/service/odb/networks_list_data_source_test.go delete mode 100644 internal/service/odb/service_endpoint_resolver_gen.go delete mode 100644 internal/service/odb/service_endpoints_gen_test.go delete mode 100644 internal/service/odb/service_package.go delete mode 100644 internal/service/odb/service_package_gen.go delete mode 100644 internal/service/odb/tags_gen.go delete mode 100644 website/docs/d/odb_cloud_autonomous_vm_clusters_list.html.markdown delete mode 100644 website/docs/d/odb_cloud_vm_clusters_list.html.markdown delete mode 100644 website/docs/d/odb_networks_list.html.markdown delete mode 100644 website/docs/r/odb_cloud_exadata_infrastructure.html.markdown delete mode 100644 website/docs/r/odb_exa_infra.html.markdown diff --git a/.ci/.semgrep-service-name0.yml b/.ci/.semgrep-service-name0.yml index 87d0ffadc241..505867179cd5 100644 --- a/.ci/.semgrep-service-name0.yml +++ b/.ci/.semgrep-service-name0.yml @@ -4376,18 +4376,3 @@ rules: - focus-metavariable: $NAME - pattern-not: func $NAME($T *testing.T) severity: WARNING - - id: connect-in-test-name - languages: - - go - message: Include "Connect" in test name - paths: - include: - - internal/service/connect/*_test.go - patterns: - - pattern: func $NAME( ... ) - - metavariable-pattern: - metavariable: $NAME - patterns: - - pattern-not-regex: "^TestAccConnect" - - pattern-regex: ^TestAcc.* - severity: WARNING diff --git a/.ci/.semgrep-service-name1.yml b/.ci/.semgrep-service-name1.yml index 26778435636f..9667e2aac131 100644 --- a/.ci/.semgrep-service-name1.yml +++ b/.ci/.semgrep-service-name1.yml @@ -1,5 +1,20 @@ # Generated by internal/generate/servicesemgrep/main.go; DO NOT EDIT. rules: + - id: connect-in-test-name + languages: + - go + message: Include "Connect" in test name + paths: + include: + - internal/service/connect/*_test.go + patterns: + - pattern: func $NAME( ... ) + - metavariable-pattern: + metavariable: $NAME + patterns: + - pattern-not-regex: "^TestAccConnect" + - pattern-regex: ^TestAcc.* + severity: WARNING - id: connect-in-const-name languages: - go @@ -4365,21 +4380,3 @@ rules: patterns: - pattern-regex: "(?i)Invoicing" severity: WARNING - - id: iot-in-func-name - languages: - - go - message: Do not use "IoT" in func name inside iot package - paths: - include: - - internal/service/iot - exclude: - - internal/service/iot/list_pages_gen.go - patterns: - - pattern: func $NAME( ... ) - - metavariable-pattern: - metavariable: $NAME - patterns: - - pattern-regex: "(?i)IoT" - - focus-metavariable: $NAME - - pattern-not: func $NAME($T *testing.T) - severity: WARNING diff --git a/.ci/.semgrep-service-name2.yml b/.ci/.semgrep-service-name2.yml index 177631291711..7b145a586f94 100644 --- a/.ci/.semgrep-service-name2.yml +++ b/.ci/.semgrep-service-name2.yml @@ -1,5 +1,23 @@ # Generated by internal/generate/servicesemgrep/main.go; DO NOT EDIT. rules: + - id: iot-in-func-name + languages: + - go + message: Do not use "IoT" in func name inside iot package + paths: + include: + - internal/service/iot + exclude: + - internal/service/iot/list_pages_gen.go + patterns: + - pattern: func $NAME( ... ) + - metavariable-pattern: + metavariable: $NAME + patterns: + - pattern-regex: "(?i)IoT" + - focus-metavariable: $NAME + - pattern-not: func $NAME($T *testing.T) + severity: WARNING - id: iot-in-test-name languages: - go @@ -3003,67 +3021,6 @@ rules: patterns: - pattern-regex: "(?i)ObservabilityAccessManager" severity: WARNING - - id: odb-in-func-name - languages: - - go - message: Do not use "ODB" in func name inside odb package - paths: - include: - - internal/service/odb - exclude: - - internal/service/odb/list_pages_gen.go - patterns: - - pattern: func $NAME( ... ) - - metavariable-pattern: - metavariable: $NAME - patterns: - - pattern-regex: "(?i)ODB" - - focus-metavariable: $NAME - - pattern-not: func $NAME($T *testing.T) - severity: WARNING - - id: odb-in-test-name - languages: - - go - message: Include "ODB" in test name - paths: - include: - - internal/service/odb/*_test.go - patterns: - - pattern: func $NAME( ... ) - - metavariable-pattern: - metavariable: $NAME - patterns: - - pattern-not-regex: "^TestAccODB" - - pattern-regex: ^TestAcc.* - severity: WARNING - - id: odb-in-const-name - languages: - - go - message: Do not use "ODB" in const name inside odb package - paths: - include: - - internal/service/odb - patterns: - - pattern: const $NAME = ... - - metavariable-pattern: - metavariable: $NAME - patterns: - - pattern-regex: "(?i)ODB" - severity: WARNING - - id: odb-in-var-name - languages: - - go - message: Do not use "ODB" in var name inside odb package - paths: - include: - - internal/service/odb - patterns: - - pattern: var $NAME = ... - - metavariable-pattern: - metavariable: $NAME - patterns: - - pattern-regex: "(?i)ODB" - severity: WARNING - id: opensearch-in-func-name languages: - go @@ -4399,3 +4356,17 @@ rules: patterns: - pattern-regex: "(?i)RDS" severity: WARNING + - id: rds-in-var-name + languages: + - go + message: Do not use "RDS" in var name inside rds package + paths: + include: + - internal/service/rds + patterns: + - pattern: var $NAME = ... + - metavariable-pattern: + metavariable: $NAME + patterns: + - pattern-regex: "(?i)RDS" + severity: WARNING diff --git a/.ci/.semgrep-service-name3.yml b/.ci/.semgrep-service-name3.yml index 5818938d1f26..bdca7386db66 100644 --- a/.ci/.semgrep-service-name3.yml +++ b/.ci/.semgrep-service-name3.yml @@ -1,19 +1,5 @@ # Generated by internal/generate/servicesemgrep/main.go; DO NOT EDIT. rules: - - id: rds-in-var-name - languages: - - go - message: Do not use "RDS" in var name inside rds package - paths: - include: - - internal/service/rds - patterns: - - pattern: var $NAME = ... - - metavariable-pattern: - metavariable: $NAME - patterns: - - pattern-regex: "(?i)RDS" - severity: WARNING - id: recyclebin-in-func-name languages: - go diff --git a/.github/labeler-issue-triage.yml b/.github/labeler-issue-triage.yml index a1bbf64f59b7..5e07c149b293 100644 --- a/.github/labeler-issue-triage.yml +++ b/.github/labeler-issue-triage.yml @@ -505,8 +505,6 @@ service/notificationscontacts: - '((\*|-)\s*`?|(data|resource)\s+"?)aws_notificationscontacts_' service/oam: - '((\*|-)\s*`?|(data|resource)\s+"?)aws_oam_' -service/odb: - - '((\*|-)\s*`?|(data|resource)\s+"?)aws_odb_' service/opensearch: - '((\*|-)\s*`?|(data|resource)\s+"?)aws_opensearch_' service/opensearchserverless: diff --git a/.github/labeler-pr-triage.yml b/.github/labeler-pr-triage.yml index 2d07161612a7..7d87c0503313 100644 --- a/.github/labeler-pr-triage.yml +++ b/.github/labeler-pr-triage.yml @@ -1602,12 +1602,6 @@ service/oam: - any-glob-to-any-file: - 'internal/service/oam/**/*' - 'website/**/oam_*' -service/odb: - - any: - - changed-files: - - any-glob-to-any-file: - - 'internal/service/odb/**/*' - - 'website/**/odb_*' service/opensearch: - any: - changed-files: diff --git a/.teamcity/components/generated/services_all.kt b/.teamcity/components/generated/services_all.kt index d8b76d8b3ed2..af54a68fba64 100644 --- a/.teamcity/components/generated/services_all.kt +++ b/.teamcity/components/generated/services_all.kt @@ -168,7 +168,6 @@ val services = mapOf( "notifications" to ServiceSpec("User Notifications"), "notificationscontacts" to ServiceSpec("User Notifications Contacts"), "oam" to ServiceSpec("CloudWatch Observability Access Manager"), - "odb" to ServiceSpec("Oracle Database@AWS"), "opensearch" to ServiceSpec("OpenSearch", vpcLock = true), "opensearchserverless" to ServiceSpec("OpenSearch Serverless"), "organizations" to ServiceSpec("Organizations"), diff --git a/infrastructure/repository/labels-service.tf b/infrastructure/repository/labels-service.tf index 862c8410b218..cd13188084d7 100644 --- a/infrastructure/repository/labels-service.tf +++ b/infrastructure/repository/labels-service.tf @@ -240,7 +240,6 @@ variable "service_labels" { "notifications", "notificationscontacts", "oam", - "odb", "opensearch", "opensearchserverless", "opsworks", diff --git a/internal/conns/awsclient_gen.go b/internal/conns/awsclient_gen.go index ca7e5101e520..4c14e3c15a83 100644 --- a/internal/conns/awsclient_gen.go +++ b/internal/conns/awsclient_gen.go @@ -171,7 +171,6 @@ import ( "github.com/aws/aws-sdk-go-v2/service/notifications" "github.com/aws/aws-sdk-go-v2/service/notificationscontacts" "github.com/aws/aws-sdk-go-v2/service/oam" - "github.com/aws/aws-sdk-go-v2/service/odb" "github.com/aws/aws-sdk-go-v2/service/opensearch" "github.com/aws/aws-sdk-go-v2/service/opensearchserverless" "github.com/aws/aws-sdk-go-v2/service/organizations" @@ -923,10 +922,6 @@ func (c *AWSClient) NotificationsContactsClient(ctx context.Context) *notificati return errs.Must(client[*notificationscontacts.Client](ctx, c, names.NotificationsContacts, make(map[string]any))) } -func (c *AWSClient) ODBClient(ctx context.Context) *odb.Client { - return errs.Must(client[*odb.Client](ctx, c, names.ODB, make(map[string]any))) -} - func (c *AWSClient) ObservabilityAccessManagerClient(ctx context.Context) *oam.Client { return errs.Must(client[*oam.Client](ctx, c, names.ObservabilityAccessManager, make(map[string]any))) } diff --git a/internal/provider/framework/provider_gen.go b/internal/provider/framework/provider_gen.go index 60149e451f1c..b0c5d9c5af7d 100644 --- a/internal/provider/framework/provider_gen.go +++ b/internal/provider/framework/provider_gen.go @@ -1354,13 +1354,6 @@ func endpointsBlock() schema.SetNestedBlock { Description: "Use this to override the default service endpoint URL", }, - // odb - - "odb": schema.StringAttribute{ - Optional: true, - Description: "Use this to override the default service endpoint URL", - }, - // opensearch "opensearch": schema.StringAttribute{ diff --git a/internal/provider/sdkv2/provider_gen.go b/internal/provider/sdkv2/provider_gen.go index 0c12b2c3382b..b4e5810e444c 100644 --- a/internal/provider/sdkv2/provider_gen.go +++ b/internal/provider/sdkv2/provider_gen.go @@ -1565,14 +1565,6 @@ func endpointsSchema() *schema.Schema { Description: "Use this to override the default service endpoint URL", }, - // odb - - "odb": { - Type: schema.TypeString, - Optional: true, - Description: "Use this to override the default service endpoint URL", - }, - // opensearch "opensearch": { diff --git a/internal/provider/sdkv2/service_packages_gen.go b/internal/provider/sdkv2/service_packages_gen.go index 08818e211ccf..fa6119d49328 100644 --- a/internal/provider/sdkv2/service_packages_gen.go +++ b/internal/provider/sdkv2/service_packages_gen.go @@ -175,7 +175,6 @@ import ( "github.com/hashicorp/terraform-provider-aws/internal/service/notifications" "github.com/hashicorp/terraform-provider-aws/internal/service/notificationscontacts" "github.com/hashicorp/terraform-provider-aws/internal/service/oam" - "github.com/hashicorp/terraform-provider-aws/internal/service/odb" "github.com/hashicorp/terraform-provider-aws/internal/service/opensearch" "github.com/hashicorp/terraform-provider-aws/internal/service/opensearchserverless" "github.com/hashicorp/terraform-provider-aws/internal/service/organizations" @@ -431,7 +430,6 @@ func servicePackages(ctx context.Context) []conns.ServicePackage { notifications.ServicePackage(ctx), notificationscontacts.ServicePackage(ctx), oam.ServicePackage(ctx), - odb.ServicePackage(ctx), opensearch.ServicePackage(ctx), opensearchserverless.ServicePackage(ctx), organizations.ServicePackage(ctx), diff --git a/internal/service/odb/cloud_autonomous_vm_cluster.go b/internal/service/odb/cloud_autonomous_vm_cluster.go deleted file mode 100644 index 97fee679bdc9..000000000000 --- a/internal/service/odb/cloud_autonomous_vm_cluster.go +++ /dev/null @@ -1,866 +0,0 @@ -// Copyright © 2025, Oracle and/or its affiliates. All rights reserved. - -package odb - -import ( - "context" - "errors" - "github.com/hashicorp/terraform-plugin-framework-validators/stringvalidator" - "github.com/hashicorp/terraform-plugin-framework/attr" - "github.com/hashicorp/terraform-plugin-framework/resource/schema/boolplanmodifier" - "github.com/hashicorp/terraform-plugin-framework/resource/schema/float64planmodifier" - "github.com/hashicorp/terraform-plugin-framework/resource/schema/int32planmodifier" - "github.com/hashicorp/terraform-plugin-framework/resource/schema/objectplanmodifier" - "github.com/hashicorp/terraform-plugin-framework/resource/schema/setplanmodifier" - "github.com/hashicorp/terraform-plugin-framework/types/basetypes" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/id" - "github.com/hashicorp/terraform-provider-aws/internal/enum" - tftags "github.com/hashicorp/terraform-provider-aws/internal/tags" - "time" - - "github.com/aws/aws-sdk-go-v2/aws" - "github.com/aws/aws-sdk-go-v2/service/odb" - odbtypes "github.com/aws/aws-sdk-go-v2/service/odb/types" - "github.com/hashicorp/terraform-plugin-framework-timeouts/resource/timeouts" - "github.com/hashicorp/terraform-plugin-framework/path" - "github.com/hashicorp/terraform-plugin-framework/resource" - "github.com/hashicorp/terraform-plugin-framework/resource/schema" - "github.com/hashicorp/terraform-plugin-framework/resource/schema/planmodifier" - "github.com/hashicorp/terraform-plugin-framework/resource/schema/stringplanmodifier" - "github.com/hashicorp/terraform-plugin-framework/schema/validator" - "github.com/hashicorp/terraform-plugin-framework/types" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" - "github.com/hashicorp/terraform-provider-aws/internal/conns" - "github.com/hashicorp/terraform-provider-aws/internal/create" - "github.com/hashicorp/terraform-provider-aws/internal/errs" - "github.com/hashicorp/terraform-provider-aws/internal/errs/fwdiag" - "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/sweep" - sweepfw "github.com/hashicorp/terraform-provider-aws/internal/sweep/framework" - "github.com/hashicorp/terraform-provider-aws/internal/tfresource" - "github.com/hashicorp/terraform-provider-aws/names" -) - -// Function annotations are used for resource registration to the Provider. DO NOT EDIT. -// @FrameworkResource("aws_odb_cloud_autonomous_vm_cluster", name="Cloud Autonomous Vm Cluster") -// @Tags(identifierAttribute="arn") -func newResourceCloudAutonomousVmCluster(_ context.Context) (resource.ResourceWithConfigure, error) { - r := &resourceCloudAutonomousVmCluster{} - r.SetDefaultCreateTimeout(24 * time.Hour) - r.SetDefaultUpdateTimeout(24 * time.Hour) - r.SetDefaultDeleteTimeout(24 * time.Hour) - - return r, nil -} - -const ( - ResNameCloudAutonomousVmCluster = "Cloud Autonomous Vm Cluster" - NotAvailableValues = "NOT_AVAILABLE" -) - -var ResourceCloudAutonomousVMCluster = newResourceCloudAutonomousVmCluster - -type resourceCloudAutonomousVmCluster struct { - framework.ResourceWithModel[cloudAutonomousVmClusterResourceModel] - framework.WithTimeouts -} - -func (r *resourceCloudAutonomousVmCluster) Schema(ctx context.Context, req resource.SchemaRequest, resp *resource.SchemaResponse) { - status := fwtypes.StringEnumType[odbtypes.ResourceStatus]() - licenseModel := fwtypes.StringEnumType[odbtypes.LicenseModel]() - computeModel := fwtypes.StringEnumType[odbtypes.ComputeModel]() - stringLengthBetween1And255Validator := []validator.String{ - stringvalidator.LengthBetween(1, 255), - } - resp.Schema = schema.Schema{ - Attributes: map[string]schema.Attribute{ - names.AttrARN: framework.ARNAttributeComputedOnly(), - names.AttrID: framework.IDAttribute(), - "cloud_exadata_infrastructure_id": schema.StringAttribute{ - Required: true, - PlanModifiers: []planmodifier.String{ - stringplanmodifier.RequiresReplace(), - }, - Description: "Exadata infrastructure id. Changing this will force terraform to create new resource.", - }, - "autonomous_data_storage_percentage": schema.Float32Attribute{ - Computed: true, - Description: "The progress of the current operation on the Autonomous VM cluster, as a percentage.", - }, - "autonomous_data_storage_size_in_tbs": schema.Float64Attribute{ - Required: true, - PlanModifiers: []planmodifier.Float64{ - float64planmodifier.RequiresReplace(), - }, - Description: "The data storage size allocated for Autonomous Databases in the Autonomous VM cluster, in TB. Changing this will force terraform to create new resource.", - }, - "available_autonomous_data_storage_size_in_tbs": schema.Float64Attribute{ - Computed: true, - Description: "The available data storage space for Autonomous Databases in the Autonomous VM cluster, in TB.", - }, - "available_container_databases": schema.Int32Attribute{ - Computed: true, - Description: "The number of Autonomous CDBs that you can create with the currently available storage.", - }, - "available_cpus": schema.Float32Attribute{ - Computed: true, - Description: "The number of CPU cores available for allocation to Autonomous Databases", - }, - "compute_model": schema.StringAttribute{ - CustomType: computeModel, - Computed: true, - Description: "The compute model of the Autonomous VM cluster: ECPU or OCPU.", - }, - "cpu_core_count": schema.Int32Attribute{ - Computed: true, - Description: "The total number of CPU cores in the Autonomous VM cluster.", - }, - "cpu_core_count_per_node": schema.Int32Attribute{ - Required: true, - PlanModifiers: []planmodifier.Int32{ - int32planmodifier.RequiresReplace(), - }, - Description: "The number of CPU cores enabled per node in the Autonomous VM cluster.", - }, - "cpu_percentage": schema.Float32Attribute{ - Computed: true, - Description: "The percentage of total CPU cores currently in use in the Autonomous VM cluster.", - }, - "created_at": schema.StringAttribute{ - Computed: true, - Description: "The date and time when the Autonomous VM cluster was created.", - }, - "data_storage_size_in_gbs": schema.Float64Attribute{ - Computed: true, - Description: "The total data storage allocated to the Autonomous VM cluster, in GB.", - }, - "data_storage_size_in_tbs": schema.Float64Attribute{ - Computed: true, - Description: "The total data storage allocated to the Autonomous VM cluster, in TB.", - }, - "odb_node_storage_size_in_gbs": schema.Int32Attribute{ - Computed: true, - Description: " The local node storage allocated to the Autonomous VM cluster, in gigabytes (GB)", - }, - "db_servers": schema.SetAttribute{ - Required: true, - CustomType: fwtypes.SetOfStringType, - ElementType: types.StringType, - PlanModifiers: []planmodifier.Set{ - setplanmodifier.RequiresReplace(), - }, - Description: "The database servers in the Autonomous VM cluster. Changing this will force terraform to create new resource.", - }, - "description": schema.StringAttribute{ - Optional: true, - PlanModifiers: []planmodifier.String{ - stringplanmodifier.RequiresReplace(), - stringplanmodifier.UseStateForUnknown(), - }, - Description: "The description of the Autonomous VM cluster.", - }, - "display_name": schema.StringAttribute{ - Required: true, - Validators: stringLengthBetween1And255Validator, - PlanModifiers: []planmodifier.String{ - stringplanmodifier.RequiresReplace(), - }, - Description: "The display name of the Autonomous VM cluster. Changing this will force terraform to create new resource.", - }, - "domain": schema.StringAttribute{ - Computed: true, - Description: "The domain name of the Autonomous VM cluster.", - }, - "exadata_storage_in_tbs_lowest_scaled_value": schema.Float64Attribute{ - Computed: true, - Description: "The minimum value to which you can scale down the Exadata storage, in TB.", - }, - "hostname": schema.StringAttribute{ - Computed: true, - PlanModifiers: []planmodifier.String{ - stringplanmodifier.UseStateForUnknown(), - }, - Description: "The hostname of the Autonomous VM cluster.", - }, - "is_mtls_enabled_vm_cluster": schema.BoolAttribute{ - Optional: true, - Computed: true, - PlanModifiers: []planmodifier.Bool{ - boolplanmodifier.RequiresReplace(), - boolplanmodifier.UseStateForUnknown(), - }, - Description: "Indicates whether mutual TLS (mTLS) authentication is enabled for the Autonomous VM cluster. Changing this will force terraform to create new resource. ", - }, - "license_model": schema.StringAttribute{ - CustomType: licenseModel, - Optional: true, - Computed: true, - PlanModifiers: []planmodifier.String{ - stringplanmodifier.RequiresReplace(), - stringplanmodifier.UseStateForUnknown(), - }, - Description: "The license model for the Autonomous VM cluster. Valid values are LICENSE_INCLUDED or BRING_YOUR_OWN_LICENSE . Changing this will force terraform to create new resource.", - }, - "max_acds_lowest_scaled_value": schema.Int32Attribute{ - Computed: true, - Description: "The minimum value to which you can scale down the maximum number of Autonomous CDBs.", - }, - "memory_per_oracle_compute_unit_in_gbs": schema.Int32Attribute{ - Required: true, - PlanModifiers: []planmodifier.Int32{ - int32planmodifier.RequiresReplace(), - }, - Description: "The amount of memory allocated per Oracle Compute Unit, in GB. Changing this will force terraform to create new resource.", - }, - "memory_size_in_gbs": schema.Int32Attribute{ - Computed: true, - Description: "The total amount of memory allocated to the Autonomous VM cluster, in gigabytes(GB).", - }, - "node_count": schema.Int32Attribute{ - Computed: true, - Description: "The number of database server nodes in the Autonomous VM cluster.", - }, - "non_provisionable_autonomous_container_databases": schema.Int32Attribute{ - Computed: true, - Description: "The number of Autonomous CDBs that can't be provisioned because of resource constraints.", - }, - "oci_resource_anchor_name": schema.StringAttribute{ - Computed: true, - Description: "The name of the OCI resource anchor associated with this Autonomous VM cluster.", - }, - "oci_url": schema.StringAttribute{ - Computed: true, - Description: "The URL for accessing the OCI console page for this Autonomous VM cluster.", - }, - "ocid": schema.StringAttribute{ - Computed: true, - Description: "The Oracle Cloud Identifier (OCID) of the Autonomous VM cluster.", - }, - "odb_network_id": schema.StringAttribute{ - Required: true, - PlanModifiers: []planmodifier.String{ - stringplanmodifier.RequiresReplace(), - }, - Description: "The unique identifier of the ODB network associated with this Autonomous VM Cluster. Changing this will force terraform to create new resource.", - }, - "percent_progress": schema.Float32Attribute{ - Computed: true, - Description: `The progress of the current operation on the Autonomous VM cluster, as a percentage.`, - }, - "provisionable_autonomous_container_databases": schema.Int32Attribute{ - Computed: true, - Description: "The number of Autonomous CDBs that can be provisioned in the Autonomous VM cluster.", - }, - "provisioned_autonomous_container_databases": schema.Int32Attribute{ - Computed: true, - Description: "The number of Autonomous CDBs currently provisioned in the Autonomous VM cluster.", - }, - "provisioned_cpus": schema.Float32Attribute{ - Computed: true, - Description: "The number of CPUs provisioned in the Autonomous VM cluster.", - }, - "reclaimable_cpus": schema.Float32Attribute{ - Computed: true, - Description: "The number of CPU cores that can be reclaimed from terminated or scaled-down Autonomous Databases.", - }, - "reserved_cpus": schema.Float32Attribute{ - Computed: true, - Description: "The number of CPU cores reserved for system operations and redundancy.", - }, - "scan_listener_port_non_tls": schema.Int32Attribute{ - Required: true, - PlanModifiers: []planmodifier.Int32{ - int32planmodifier.RequiresReplace(), - }, - Description: "The SCAN listener port for non-TLS (TCP) protocol. The default is 1521. Changing this will force terraform to create new resource.", - }, - "scan_listener_port_tls": schema.Int32Attribute{ - Required: true, - PlanModifiers: []planmodifier.Int32{ - int32planmodifier.RequiresReplace(), - }, - Description: "The SCAN listener port for TLS (TCP) protocol. The default is 2484. Changing this will force terraform to create new resource.", - }, - "shape": schema.StringAttribute{ - Computed: true, - Description: "The shape of the Exadata infrastructure for the Autonomous VM cluster.", - }, - "status": schema.StringAttribute{ - CustomType: status, - Computed: true, - Description: "The status of the Autonomous VM cluster. Possible values include CREATING, AVAILABLE , UPDATING , DELETING , DELETED , FAILED ", - }, - "status_reason": schema.StringAttribute{ - Computed: true, - Description: "Additional information about the current status of the Autonomous VM cluster.", - }, - "time_zone": schema.StringAttribute{ - Optional: true, - Computed: true, - PlanModifiers: []planmodifier.String{ - stringplanmodifier.RequiresReplace(), - stringplanmodifier.UseStateForUnknown(), - }, - Description: "The time zone of the Autonomous VM cluster. Changing this will force terraform to create new resource.", - }, - "total_container_databases": schema.Int32Attribute{ - Required: true, - PlanModifiers: []planmodifier.Int32{ - int32planmodifier.RequiresReplace(), - }, - Description: "The total number of Autonomous Container Databases that can be created with the allocated local storage. Changing this will force terraform to create new resource.", - }, - "time_ords_certificate_expires": schema.StringAttribute{ - Computed: true, - }, - "time_database_ssl_certificate_expires": schema.StringAttribute{ - Computed: true, - Description: "The expiration date and time of the database SSL certificate.", - }, - "maintenance_window": schema.ObjectAttribute{ - Required: true, - CustomType: fwtypes.NewObjectTypeOf[cloudAutonomousVmClusterMaintenanceWindowResourceModel](ctx), - PlanModifiers: []planmodifier.Object{ - objectplanmodifier.RequiresReplace(), - }, - Description: "The maintenance window of the Autonomous VM cluster.", - AttributeTypes: map[string]attr.Type{ - "days_of_week": types.SetType{ - ElemType: fwtypes.StringEnumType[odbtypes.DayOfWeekName](), - }, - "hours_of_day": types.SetType{ - ElemType: types.Int32Type, - }, - "lead_time_in_weeks": types.Int32Type, - "months": types.SetType{ - ElemType: fwtypes.StringEnumType[odbtypes.MonthName](), - }, - "preference": fwtypes.StringEnumType[odbtypes.PreferenceType](), - "weeks_of_month": types.SetType{ - ElemType: types.Int32Type, - }, - }, - }, - names.AttrTags: tftags.TagsAttribute(), - names.AttrTagsAll: tftags.TagsAttributeComputedOnly(), - }, - Blocks: map[string]schema.Block{ - names.AttrTimeouts: timeouts.Block(ctx, timeouts.Opts{ - Create: true, - Update: true, - Delete: true, - }), - }, - } -} - -func (r *resourceCloudAutonomousVmCluster) Create(ctx context.Context, req resource.CreateRequest, resp *resource.CreateResponse) { - conn := r.Meta().ODBClient(ctx) - - var plan cloudAutonomousVmClusterResourceModel - resp.Diagnostics.Append(req.Plan.Get(ctx, &plan)...) - if resp.Diagnostics.HasError() { - return - } - - input := odb.CreateCloudAutonomousVmClusterInput{ - ClientToken: aws.String(id.UniqueId()), - Tags: getTagsIn(ctx), - MaintenanceWindow: r.expandMaintenanceWindow(ctx, plan.MaintenanceWindow), - } - resp.Diagnostics.Append(flex.Expand(ctx, plan, &input)...) - if resp.Diagnostics.HasError() { - return - } - - out, err := conn.CreateCloudAutonomousVmCluster(ctx, &input) - if err != nil { - - resp.Diagnostics.AddError( - create.ProblemStandardMessage(names.ODB, create.ErrActionCreating, ResNameCloudAutonomousVmCluster, plan.DisplayName.ValueString(), err), - err.Error(), - ) - return - } - if out == nil || out.CloudAutonomousVmClusterId == nil { - resp.Diagnostics.AddError( - create.ProblemStandardMessage(names.ODB, create.ErrActionCreating, ResNameCloudAutonomousVmCluster, plan.DisplayName.ValueString(), nil), - errors.New("empty output").Error(), - ) - return - } - - createTimeout := r.CreateTimeout(ctx, plan.Timeouts) - createdAVMC, err := waitCloudAutonomousVmClusterCreated(ctx, conn, *out.CloudAutonomousVmClusterId, createTimeout) - if err != nil { - resp.Diagnostics.AddError( - create.ProblemStandardMessage(names.ODB, create.ErrActionWaitingForCreation, ResNameCloudAutonomousVmCluster, plan.DisplayName.ValueString(), err), - err.Error(), - ) - return - } - plan.CreatedAt = types.StringValue(createdAVMC.CreatedAt.Format(time.RFC3339)) - - if createdAVMC.TimeDatabaseSslCertificateExpires != nil { - plan.TimeDatabaseSslCertificateExpires = types.StringValue(createdAVMC.TimeDatabaseSslCertificateExpires.Format(time.RFC3339)) - } else { - plan.TimeDatabaseSslCertificateExpires = types.StringValue(NotAvailableValues) - } - - if createdAVMC.TimeOrdsCertificateExpires != nil { - plan.TimeOrdsCertificateExpires = types.StringValue(createdAVMC.TimeOrdsCertificateExpires.Format(time.RFC3339)) - } else { - plan.TimeOrdsCertificateExpires = types.StringValue(NotAvailableValues) - } - - if createdAVMC.MaintenanceWindow != nil { - plan.MaintenanceWindow = r.flattenMaintenanceWindow(ctx, createdAVMC.MaintenanceWindow) - } - resp.Diagnostics.Append(flex.Flatten(ctx, createdAVMC, &plan, - flex.WithIgnoredFieldNamesAppend("TimeOrdsCertificateExpires"), - flex.WithIgnoredFieldNamesAppend("TimeDatabaseSslCertificateExpires"))...) - - resp.Diagnostics.Append(resp.State.Set(ctx, plan)...) -} - -func (r *resourceCloudAutonomousVmCluster) Read(ctx context.Context, req resource.ReadRequest, resp *resource.ReadResponse) { - - conn := r.Meta().ODBClient(ctx) - - var state cloudAutonomousVmClusterResourceModel - resp.Diagnostics.Append(req.State.Get(ctx, &state)...) - if resp.Diagnostics.HasError() { - return - } - - out, err := FindCloudAutonomousVmClusterByID(ctx, conn, state.CloudAutonomousVmClusterId.ValueString()) - - if tfresource.NotFound(err) { - resp.Diagnostics.Append(fwdiag.NewResourceNotFoundWarningDiagnostic(err)) - resp.State.RemoveResource(ctx) - return - } - if err != nil { - resp.Diagnostics.AddError( - create.ProblemStandardMessage(names.ODB, create.ErrActionReading, ResNameCloudAutonomousVmCluster, state.DisplayName.ValueString(), err), - err.Error(), - ) - return - } - - state.CreatedAt = types.StringValue(out.CreatedAt.Format(time.RFC3339)) - if out.TimeOrdsCertificateExpires != nil { - state.TimeOrdsCertificateExpires = types.StringValue(out.TimeOrdsCertificateExpires.Format(time.RFC3339)) - } else { - state.TimeOrdsCertificateExpires = types.StringValue(NotAvailableValues) - } - if out.TimeDatabaseSslCertificateExpires != nil { - state.TimeDatabaseSslCertificateExpires = types.StringValue(out.TimeDatabaseSslCertificateExpires.Format(time.RFC3339)) - } else { - state.TimeDatabaseSslCertificateExpires = types.StringValue(NotAvailableValues) - } - state.MaintenanceWindow = r.flattenMaintenanceWindow(ctx, out.MaintenanceWindow) - - resp.Diagnostics.Append(flex.Flatten(ctx, out, &state, - flex.WithIgnoredFieldNamesAppend("TimeOrdsCertificateExpires"), - flex.WithIgnoredFieldNamesAppend("TimeDatabaseSslCertificateExpires"))...) - - if resp.Diagnostics.HasError() { - return - } - - resp.Diagnostics.Append(resp.State.Set(ctx, &state)...) -} - -func (r *resourceCloudAutonomousVmCluster) Update(ctx context.Context, req resource.UpdateRequest, resp *resource.UpdateResponse) { - - var plan, state cloudAutonomousVmClusterResourceModel - resp.Diagnostics.Append(req.Plan.Get(ctx, &plan)...) - resp.Diagnostics.Append(req.State.Get(ctx, &state)...) - if resp.Diagnostics.HasError() { - return - } - conn := r.Meta().ODBClient(ctx) - - updateTimeout := r.UpdateTimeout(ctx, plan.Timeouts) - updatedAVMC, err := waitCloudAutonomousVmClusterUpdated(ctx, conn, state.CloudAutonomousVmClusterId.ValueString(), updateTimeout) - - if err != nil { - resp.Diagnostics.AddError( - create.ProblemStandardMessage(names.ODB, create.ErrActionWaitingForUpdate, ResNameCloudAutonomousVmCluster, state.CloudAutonomousVmClusterId.String(), err), - err.Error(), - ) - return - } - plan.CreatedAt = types.StringValue(updatedAVMC.CreatedAt.Format(time.RFC3339)) - - if updatedAVMC.TimeDatabaseSslCertificateExpires != nil { - plan.TimeDatabaseSslCertificateExpires = types.StringValue(updatedAVMC.TimeDatabaseSslCertificateExpires.Format(time.RFC3339)) - } else { - plan.TimeDatabaseSslCertificateExpires = types.StringValue(NotAvailableValues) - } - - if updatedAVMC.TimeOrdsCertificateExpires != nil { - plan.TimeOrdsCertificateExpires = types.StringValue(updatedAVMC.TimeOrdsCertificateExpires.Format(time.RFC3339)) - } else { - plan.TimeOrdsCertificateExpires = types.StringValue(NotAvailableValues) - } - plan.MaintenanceWindow = r.flattenMaintenanceWindow(ctx, updatedAVMC.MaintenanceWindow) - resp.Diagnostics.Append(flex.Flatten(ctx, updatedAVMC, &plan, - flex.WithIgnoredFieldNamesAppend("TimeOrdsCertificateExpires"), - flex.WithIgnoredFieldNamesAppend("TimeDatabaseSslCertificateExpires"))...) - - if resp.Diagnostics.HasError() { - return - } - resp.Diagnostics.Append(resp.State.Set(ctx, &plan)...) -} - -func (r *resourceCloudAutonomousVmCluster) Delete(ctx context.Context, req resource.DeleteRequest, resp *resource.DeleteResponse) { - - conn := r.Meta().ODBClient(ctx) - - var state cloudAutonomousVmClusterResourceModel - resp.Diagnostics.Append(req.State.Get(ctx, &state)...) - if resp.Diagnostics.HasError() { - return - } - - input := odb.DeleteCloudAutonomousVmClusterInput{ - CloudAutonomousVmClusterId: state.CloudAutonomousVmClusterId.ValueStringPointer(), - } - - _, err := conn.DeleteCloudAutonomousVmCluster(ctx, &input) - - if err != nil { - if errs.IsA[*odbtypes.ResourceNotFoundException](err) { - return - } - - resp.Diagnostics.AddError( - create.ProblemStandardMessage(names.ODB, create.ErrActionDeleting, ResNameCloudAutonomousVmCluster, state.CloudAutonomousVmClusterId.ValueString(), err), - err.Error(), - ) - return - } - deleteTimeout := r.DeleteTimeout(ctx, state.Timeouts) - _, err = waitCloudAutonomousVmClusterDeleted(ctx, conn, state.CloudAutonomousVmClusterId.ValueString(), deleteTimeout) - if err != nil { - resp.Diagnostics.AddError( - create.ProblemStandardMessage(names.ODB, create.ErrActionWaitingForDeletion, ResNameCloudAutonomousVmCluster, state.CloudAutonomousVmClusterId.ValueString(), err), - err.Error(), - ) - return - } -} - -func (r *resourceCloudAutonomousVmCluster) ImportState(ctx context.Context, req resource.ImportStateRequest, resp *resource.ImportStateResponse) { - resource.ImportStatePassthroughID(ctx, path.Root(names.AttrID), req, resp) -} - -func waitCloudAutonomousVmClusterCreated(ctx context.Context, conn *odb.Client, id string, timeout time.Duration) (*odbtypes.CloudAutonomousVmCluster, error) { - stateConf := &retry.StateChangeConf{ - Pending: enum.Slice(odbtypes.ResourceStatusProvisioning), - Target: enum.Slice(odbtypes.ResourceStatusAvailable, odbtypes.ResourceStatusFailed), - Refresh: statusCloudAutonomousVmCluster(ctx, conn, id), - Timeout: timeout, - } - - outputRaw, err := stateConf.WaitForStateContext(ctx) - if out, ok := outputRaw.(*odbtypes.CloudAutonomousVmCluster); ok { - return out, err - } - - return nil, err -} - -func waitCloudAutonomousVmClusterUpdated(ctx context.Context, conn *odb.Client, id string, timeout time.Duration) (*odbtypes.CloudAutonomousVmCluster, error) { - stateConf := &retry.StateChangeConf{ - Pending: enum.Slice(odbtypes.ResourceStatusUpdating), - Target: enum.Slice(odbtypes.ResourceStatusAvailable, odbtypes.ResourceStatusFailed), - Refresh: statusCloudAutonomousVmCluster(ctx, conn, id), - Timeout: timeout, - } - - outputRaw, err := stateConf.WaitForStateContext(ctx) - if out, ok := outputRaw.(*odbtypes.CloudAutonomousVmCluster); ok { - return out, err - } - - return nil, err -} - -func waitCloudAutonomousVmClusterDeleted(ctx context.Context, conn *odb.Client, id string, timeout time.Duration) (*odbtypes.CloudAutonomousVmCluster, error) { - stateConf := &retry.StateChangeConf{ - Pending: enum.Slice(odbtypes.ResourceStatusTerminating), - Target: []string{}, - Refresh: statusCloudAutonomousVmCluster(ctx, conn, id), - Timeout: timeout, - } - - outputRaw, err := stateConf.WaitForStateContext(ctx) - if out, ok := outputRaw.(*odbtypes.CloudAutonomousVmCluster); ok { - return out, err - } - - return nil, err -} - -func statusCloudAutonomousVmCluster(ctx context.Context, conn *odb.Client, id string) retry.StateRefreshFunc { - return func() (any, string, error) { - out, err := FindCloudAutonomousVmClusterByID(ctx, conn, id) - if tfresource.NotFound(err) { - return nil, "", nil - } - - if err != nil { - return nil, "", err - } - - return out, string(out.Status), nil - } -} - -func FindCloudAutonomousVmClusterByID(ctx context.Context, conn *odb.Client, id string) (*odbtypes.CloudAutonomousVmCluster, error) { - input := odb.GetCloudAutonomousVmClusterInput{ - CloudAutonomousVmClusterId: aws.String(id), - } - out, err := conn.GetCloudAutonomousVmCluster(ctx, &input) - if err != nil { - if errs.IsA[*odbtypes.ResourceNotFoundException](err) { - return nil, &retry.NotFoundError{ - LastError: err, - LastRequest: &input, - } - } - return nil, err - } - - if out == nil || out.CloudAutonomousVmCluster == nil { - return nil, tfresource.NewEmptyResultError(&input) - } - - return out.CloudAutonomousVmCluster, nil -} - -// TIP: ==== SWEEPERS ==== -// When acceptance testing resources, interrupted or failed tests may -// leave behind orphaned resources in an account. To facilitate cleaning -// up lingering resources, each resource implementation should include -// a corresponding "sweeper" function. -// -// The sweeper function lists all resources of a given type and sets the -// appropriate identifers required to delete the resource via the Delete -// method implemented above. -// -// Once the sweeper function is implemented, register it in sweeper.go -// as follows: -// -// awsv2.Register("aws_odb_cloud_autonomous_vm_cluster", sweepCloudAutonomousVmClusters) -// -// See more: -// https://hashicorp.github.io/terraform-provider-aws/running-and-writing-acceptance-tests/#acceptance-test-sweepers -func sweepCloudAutonomousVmClusters(ctx context.Context, client *conns.AWSClient) ([]sweep.Sweepable, error) { - input := odb.ListCloudAutonomousVmClustersInput{} - conn := client.ODBClient(ctx) - var sweepResources []sweep.Sweepable - - pages := odb.NewListCloudAutonomousVmClustersPaginator(conn, &input) - for pages.HasMorePages() { - page, err := pages.NextPage(ctx) - if err != nil { - return nil, err - } - - for _, v := range page.CloudAutonomousVmClusters { - sweepResources = append(sweepResources, sweepfw.NewSweepResource(newResourceCloudAutonomousVmCluster, client, - sweepfw.NewAttribute(names.AttrID, aws.ToString(v.CloudAutonomousVmClusterId))), - ) - } - } - - return sweepResources, nil -} - -func (r *resourceCloudAutonomousVmCluster) expandMaintenanceWindow(ctx context.Context, avmcMaintenanceWindowFwTypesObj fwtypes.ObjectValueOf[cloudAutonomousVmClusterMaintenanceWindowResourceModel]) *odbtypes.MaintenanceWindow { - var avmcMaintenanceWindowResource cloudAutonomousVmClusterMaintenanceWindowResourceModel - - avmcMaintenanceWindowFwTypesObj.As(ctx, &avmcMaintenanceWindowResource, basetypes.ObjectAsOptions{ - UnhandledNullAsEmpty: true, - UnhandledUnknownAsEmpty: true, - }) - - var daysOfWeekNames []odbtypes.DayOfWeekName - avmcMaintenanceWindowResource.DaysOfWeek.ElementsAs(ctx, &daysOfWeekNames, false) - daysOfWeek := make([]odbtypes.DayOfWeek, 0, len(daysOfWeekNames)) - - for _, dayOfWeek := range daysOfWeekNames { - daysOfWeek = append(daysOfWeek, odbtypes.DayOfWeek{ - Name: dayOfWeek, - }) - } - - var hoursOfTheDay []int32 - avmcMaintenanceWindowResource.HoursOfDay.ElementsAs(ctx, &hoursOfTheDay, false) - - var monthNames []odbtypes.MonthName - avmcMaintenanceWindowResource.Months.ElementsAs(ctx, &monthNames, false) - months := make([]odbtypes.Month, 0, len(monthNames)) - for _, month := range monthNames { - months = append(months, odbtypes.Month{ - Name: month, - }) - } - - var weeksOfMonth []int32 - avmcMaintenanceWindowResource.WeeksOfMonth.ElementsAs(ctx, &weeksOfMonth, false) - - odbTypeMW := odbtypes.MaintenanceWindow{ - DaysOfWeek: daysOfWeek, - HoursOfDay: hoursOfTheDay, - LeadTimeInWeeks: avmcMaintenanceWindowResource.LeadTimeInWeeks.ValueInt32Pointer(), - Months: months, - Preference: avmcMaintenanceWindowResource.Preference.ValueEnum(), - WeeksOfMonth: weeksOfMonth, - } - if len(odbTypeMW.DaysOfWeek) == 0 { - odbTypeMW.DaysOfWeek = nil - } - if len(odbTypeMW.HoursOfDay) == 0 { - odbTypeMW.HoursOfDay = nil - } - if len(odbTypeMW.Months) == 0 { - odbTypeMW.Months = nil - } - if len(odbTypeMW.WeeksOfMonth) == 0 { - odbTypeMW.WeeksOfMonth = nil - } - if *odbTypeMW.LeadTimeInWeeks == 0 { - odbTypeMW.LeadTimeInWeeks = nil - } - return &odbTypeMW -} - -func (r *resourceCloudAutonomousVmCluster) flattenMaintenanceWindow(ctx context.Context, avmcMW *odbtypes.MaintenanceWindow) fwtypes.ObjectValueOf[cloudAutonomousVmClusterMaintenanceWindowResourceModel] { - //days of week - daysOfWeek := make([]attr.Value, 0, len(avmcMW.DaysOfWeek)) - for _, dayOfWeek := range avmcMW.DaysOfWeek { - dayOfWeekStringValue := fwtypes.StringEnumValue(dayOfWeek.Name).StringValue - daysOfWeek = append(daysOfWeek, dayOfWeekStringValue) - } - setValueOfDaysOfWeek, _ := basetypes.NewSetValue(types.StringType, daysOfWeek) - daysOfWeekRead := fwtypes.SetValueOf[fwtypes.StringEnum[odbtypes.DayOfWeekName]]{ - SetValue: setValueOfDaysOfWeek, - } - //hours of the day - hoursOfTheDay := make([]attr.Value, 0, len(avmcMW.HoursOfDay)) - for _, hourOfTheDay := range avmcMW.HoursOfDay { - daysOfWeekInt32Value := types.Int32Value(hourOfTheDay) - hoursOfTheDay = append(hoursOfTheDay, daysOfWeekInt32Value) - } - setValuesOfHoursOfTheDay, _ := basetypes.NewSetValue(types.Int32Type, hoursOfTheDay) - hoursOfTheDayRead := fwtypes.SetValueOf[types.Int32]{ - SetValue: setValuesOfHoursOfTheDay, - } - //monts - months := make([]attr.Value, 0, len(avmcMW.Months)) - for _, month := range avmcMW.Months { - monthStringValue := fwtypes.StringEnumValue(month.Name).StringValue - months = append(months, monthStringValue) - } - setValuesOfMonth, _ := basetypes.NewSetValue(types.StringType, months) - monthsRead := fwtypes.SetValueOf[fwtypes.StringEnum[odbtypes.MonthName]]{ - SetValue: setValuesOfMonth, - } - //weeks of month - weeksOfMonth := make([]attr.Value, 0, len(avmcMW.WeeksOfMonth)) - for _, weekOfMonth := range avmcMW.WeeksOfMonth { - weeksOfMonthInt32Value := types.Int32Value(weekOfMonth) - weeksOfMonth = append(weeksOfMonth, weeksOfMonthInt32Value) - } - setValuesOfWeekOfMonth, _ := basetypes.NewSetValue(types.Int32Type, weeksOfMonth) - weeksOfMonthRead := fwtypes.SetValueOf[types.Int32]{ - SetValue: setValuesOfWeekOfMonth, - } - - computedMW := cloudAutonomousVmClusterMaintenanceWindowResourceModel{ - DaysOfWeek: daysOfWeekRead, - HoursOfDay: hoursOfTheDayRead, - LeadTimeInWeeks: types.Int32PointerValue(avmcMW.LeadTimeInWeeks), - Months: monthsRead, - Preference: fwtypes.StringEnumValue(avmcMW.Preference), - WeeksOfMonth: weeksOfMonthRead, - } - if avmcMW.LeadTimeInWeeks == nil { - computedMW.LeadTimeInWeeks = types.Int32Value(0) - } - result, _ := fwtypes.NewObjectValueOf[cloudAutonomousVmClusterMaintenanceWindowResourceModel](ctx, &computedMW) - return result -} - -type cloudAutonomousVmClusterResourceModel struct { - framework.WithRegionModel - CloudAutonomousVmClusterArn types.String `tfsdk:"arn"` - CloudAutonomousVmClusterId types.String `tfsdk:"id"` - CloudExadataInfrastructureId types.String `tfsdk:"cloud_exadata_infrastructure_id"` - AutonomousDataStoragePercentage types.Float32 `tfsdk:"autonomous_data_storage_percentage"` - AutonomousDataStorageSizeInTBs types.Float64 `tfsdk:"autonomous_data_storage_size_in_tbs"` - AvailableAutonomousDataStorageSizeInTBs types.Float64 `tfsdk:"available_autonomous_data_storage_size_in_tbs"` - AvailableContainerDatabases types.Int32 `tfsdk:"available_container_databases"` - AvailableCpus types.Float32 `tfsdk:"available_cpus"` - ComputeModel fwtypes.StringEnum[odbtypes.ComputeModel] `tfsdk:"compute_model"` - CpuCoreCount types.Int32 `tfsdk:"cpu_core_count"` - CpuCoreCountPerNode types.Int32 `tfsdk:"cpu_core_count_per_node"` - CpuPercentage types.Float32 `tfsdk:"cpu_percentage"` - CreatedAt types.String `tfsdk:"created_at" autoflex:",noflatten"` - DataStorageSizeInGBs types.Float64 `tfsdk:"data_storage_size_in_gbs"` - DataStorageSizeInTBs types.Float64 `tfsdk:"data_storage_size_in_tbs"` - DbNodeStorageSizeInGBs types.Int32 `tfsdk:"odb_node_storage_size_in_gbs"` - DbServers fwtypes.SetValueOf[types.String] `tfsdk:"db_servers"` - Description types.String `tfsdk:"description"` - DisplayName types.String `tfsdk:"display_name"` - Domain types.String `tfsdk:"domain"` - ExadataStorageInTBsLowestScaledValue types.Float64 `tfsdk:"exadata_storage_in_tbs_lowest_scaled_value"` - Hostname types.String `tfsdk:"hostname"` - IsMtlsEnabledVmCluster types.Bool `tfsdk:"is_mtls_enabled_vm_cluster"` - LicenseModel fwtypes.StringEnum[odbtypes.LicenseModel] `tfsdk:"license_model"` - MaxAcdsLowestScaledValue types.Int32 `tfsdk:"max_acds_lowest_scaled_value"` - MemoryPerOracleComputeUnitInGBs types.Int32 `tfsdk:"memory_per_oracle_compute_unit_in_gbs"` - MemorySizeInGBs types.Int32 `tfsdk:"memory_size_in_gbs"` - NodeCount types.Int32 `tfsdk:"node_count"` - NonProvisionableAutonomousContainerDatabases types.Int32 `tfsdk:"non_provisionable_autonomous_container_databases"` - OciResourceAnchorName types.String `tfsdk:"oci_resource_anchor_name"` - OciUrl types.String `tfsdk:"oci_url"` - Ocid types.String `tfsdk:"ocid"` - OdbNetworkId types.String `tfsdk:"odb_network_id"` - PercentProgress types.Float32 `tfsdk:"percent_progress"` - ProvisionableAutonomousContainerDatabases types.Int32 `tfsdk:"provisionable_autonomous_container_databases"` - ProvisionedAutonomousContainerDatabases types.Int32 `tfsdk:"provisioned_autonomous_container_databases"` - ProvisionedCpus types.Float32 `tfsdk:"provisioned_cpus"` - ReclaimableCpus types.Float32 `tfsdk:"reclaimable_cpus"` - ReservedCpus types.Float32 `tfsdk:"reserved_cpus"` - ScanListenerPortNonTls types.Int32 `tfsdk:"scan_listener_port_non_tls"` - ScanListenerPortTls types.Int32 `tfsdk:"scan_listener_port_tls"` - Shape types.String `tfsdk:"shape"` - Status fwtypes.StringEnum[odbtypes.ResourceStatus] `tfsdk:"status"` - StatusReason types.String `tfsdk:"status_reason"` - TimeZone types.String `tfsdk:"time_zone"` - TotalContainerDatabases types.Int32 `tfsdk:"total_container_databases"` - Timeouts timeouts.Value `tfsdk:"timeouts"` - Tags tftags.Map `tfsdk:"tags"` - TagsAll tftags.Map `tfsdk:"tags_all"` - TimeOrdsCertificateExpires types.String `tfsdk:"time_ords_certificate_expires"` - TimeDatabaseSslCertificateExpires types.String `tfsdk:"time_database_ssl_certificate_expires"` - MaintenanceWindow fwtypes.ObjectValueOf[cloudAutonomousVmClusterMaintenanceWindowResourceModel] `tfsdk:"maintenance_window" autoflex:"-"` -} - -type cloudAutonomousVmClusterMaintenanceWindowResourceModel struct { - DaysOfWeek fwtypes.SetValueOf[fwtypes.StringEnum[odbtypes.DayOfWeekName]] `tfsdk:"days_of_week"` - HoursOfDay fwtypes.SetValueOf[types.Int32] `tfsdk:"hours_of_day"` - LeadTimeInWeeks types.Int32 `tfsdk:"lead_time_in_weeks"` - Months fwtypes.SetValueOf[fwtypes.StringEnum[odbtypes.MonthName]] `tfsdk:"months"` - Preference fwtypes.StringEnum[odbtypes.PreferenceType] `tfsdk:"preference"` - WeeksOfMonth fwtypes.SetValueOf[types.Int32] `tfsdk:"weeks_of_month"` -} diff --git a/internal/service/odb/cloud_autonomous_vm_cluster_data_source.go b/internal/service/odb/cloud_autonomous_vm_cluster_data_source.go deleted file mode 100644 index ce561fff9d4d..000000000000 --- a/internal/service/odb/cloud_autonomous_vm_cluster_data_source.go +++ /dev/null @@ -1,433 +0,0 @@ -//Copyright © 2025, Oracle and/or its affiliates. All rights reserved. - -package odb - -import ( - "context" - "github.com/hashicorp/terraform-plugin-framework/attr" - "github.com/hashicorp/terraform-plugin-framework/types/basetypes" - tftags "github.com/hashicorp/terraform-provider-aws/internal/tags" - "time" - - "github.com/aws/aws-sdk-go-v2/service/odb" - odbtypes "github.com/aws/aws-sdk-go-v2/service/odb/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/create" - "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/names" -) - -// Function annotations are used for datasource registration to the Provider. DO NOT EDIT. -// @FrameworkDataSource("aws_odb_cloud_autonomous_vm_cluster", name="Cloud Autonomous Vm Cluster") -func newDataSourceCloudAutonomousVmCluster(context.Context) (datasource.DataSourceWithConfigure, error) { - return &dataSourceCloudAutonomousVmCluster{}, nil -} - -const ( - DSNameCloudAutonomousVmCluster = "Cloud Autonomous Vm Cluster Data Source" -) - -type dataSourceCloudAutonomousVmCluster struct { - framework.DataSourceWithModel[cloudAutonomousVmClusterDataSourceModel] -} - -func (d *dataSourceCloudAutonomousVmCluster) Schema(ctx context.Context, req datasource.SchemaRequest, resp *datasource.SchemaResponse) { - status := fwtypes.StringEnumType[odbtypes.ResourceStatus]() - licenseModel := fwtypes.StringEnumType[odbtypes.LicenseModel]() - computeModel := fwtypes.StringEnumType[odbtypes.ComputeModel]() - resp.Schema = schema.Schema{ - Attributes: map[string]schema.Attribute{ - names.AttrARN: framework.ARNAttributeComputedOnly(), - - names.AttrID: schema.StringAttribute{ - Required: true, - Description: "Unique ID of the Autonomous VM cluster.", - }, - "cloud_exadata_infrastructure_id": schema.StringAttribute{ - Computed: true, - Description: "Cloud exadata infrastructure id associated with this cloud autonomous VM cluster.", - }, - "autonomous_data_storage_percentage": schema.Float32Attribute{ - Computed: true, - Description: "The percentage of data storage currently in use for Autonomous Databases in the Autonomous VM cluster.", - }, - "autonomous_data_storage_size_in_tbs": schema.Float64Attribute{ - Computed: true, - Description: "The data storage size allocated for Autonomous Databases in the Autonomous VM cluster, in TB.", - }, - "available_autonomous_data_storage_size_in_tbs": schema.Float64Attribute{ - Computed: true, - Description: "The available data storage space for Autonomous Databases in the Autonomous VM cluster, in TB.", - }, - "available_container_databases": schema.Int32Attribute{ - Computed: true, - Description: "The number of Autonomous CDBs that you can create with the currently available storage.", - }, - "available_cpus": schema.Float32Attribute{ - Computed: true, - Description: "The number of CPU cores available for allocation to Autonomous Databases.", - }, - "compute_model": schema.StringAttribute{ - CustomType: computeModel, - Computed: true, - Description: " The compute model of the Autonomous VM cluster: ECPU or OCPU.", - }, - "cpu_core_count": schema.Int32Attribute{ - Computed: true, - Description: "The total number of CPU cores in the Autonomous VM cluster.", - }, - "cpu_core_count_per_node": schema.Int32Attribute{ - Computed: true, - Description: "The number of CPU cores enabled per node in the Autonomous VM cluster.", - }, - "cpu_percentage": schema.Float32Attribute{ - Computed: true, - Description: "he percentage of total CPU cores currently in use in the Autonomous VM cluster.", - }, - "created_at": schema.StringAttribute{ - Computed: true, - Description: "The date and time when the Autonomous VM cluster was created.", - }, - "data_storage_size_in_gbs": schema.Float64Attribute{ - Computed: true, - Description: "The total data storage allocated to the Autonomous VM cluster, in GB.", - }, - "data_storage_size_in_tbs": schema.Float64Attribute{ - Computed: true, - Description: "The total data storage allocated to the Autonomous VM cluster, in TB.", - }, - "odb_node_storage_size_in_gbs": schema.Int32Attribute{ - Computed: true, - Description: "The local node storage allocated to the Autonomous VM cluster, in gigabytes (GB).", - }, - "db_servers": schema.SetAttribute{ - Computed: true, - CustomType: fwtypes.SetOfStringType, - ElementType: types.StringType, - Description: "The list of database servers associated with the Autonomous VM cluster.", - }, - "description": schema.StringAttribute{ - Computed: true, - Description: "The user-provided description of the Autonomous VM cluster.", - }, - "display_name": schema.StringAttribute{ - Computed: true, - Description: "The display name of the Autonomous VM cluster.", - }, - "domain": schema.StringAttribute{ - Computed: true, - Description: "The domain name of the Autonomous VM cluster.", - }, - "exadata_storage_in_tbs_lowest_scaled_value": schema.Float64Attribute{ - Computed: true, - Description: "The minimum value to which you can scale down the Exadata storage, in TB.", - }, - "hostname": schema.StringAttribute{ - Computed: true, - Description: "The hostname of the Autonomous VM cluster.", - }, - "is_mtls_enabled_vm_cluster": schema.BoolAttribute{ - Computed: true, - Description: " Indicates whether mutual TLS (mTLS) authentication is enabled for the Autonomous VM cluster.", - }, - "license_model": schema.StringAttribute{ - CustomType: licenseModel, - Computed: true, - Description: "The Oracle license model that applies to the Autonomous VM cluster. Valid values are LICENSE_INCLUDED or BRING_YOUR_OWN_LICENSE .", - }, - "max_acds_lowest_scaled_value": schema.Int32Attribute{ - Computed: true, - Description: "The minimum value to which you can scale down the maximum number of Autonomous CDBs.", - }, - "memory_per_oracle_compute_unit_in_gbs": schema.Int32Attribute{ - Computed: true, - Description: "The amount of memory allocated per Oracle Compute Unit, in GB.", - }, - "memory_size_in_gbs": schema.Int32Attribute{ - Computed: true, - Description: "The total amount of memory allocated to the Autonomous VM cluster, in gigabytes (GB).", - }, - "node_count": schema.Int32Attribute{ - Computed: true, - Description: "The number of database server nodes in the Autonomous VM cluster.", - }, - "non_provisionable_autonomous_container_databases": schema.Int32Attribute{ - Computed: true, - Description: "The number of Autonomous CDBs that can't be provisioned because of resource constraints.", - }, - "oci_resource_anchor_name": schema.StringAttribute{ - Computed: true, - Description: "The name of the OCI resource anchor associated with this Autonomous VM cluster.", - }, - "oci_url": schema.StringAttribute{ - Computed: true, - Description: "The URL for accessing the OCI console page for this Autonomous VM cluster.", - }, - "ocid": schema.StringAttribute{ - Computed: true, - Description: "The Oracle Cloud Identifier (OCID) of the Autonomous VM cluster.", - }, - "odb_network_id": schema.StringAttribute{ - Computed: true, - Description: "The unique identifier of the ODB network associated with this Autonomous VM cluster.", - }, - "percent_progress": schema.Float32Attribute{ - Computed: true, - Description: "The progress of the current operation on the Autonomous VM cluster, as a percentage.", - }, - "provisionable_autonomous_container_databases": schema.Int32Attribute{ - Computed: true, - Description: "The number of Autonomous CDBs that can be provisioned in the Autonomous VM cluster.", - }, - "provisioned_autonomous_container_databases": schema.Int32Attribute{ - Computed: true, - Description: "The number of Autonomous CDBs currently provisioned in the Autonomous VM cluster.", - }, - "provisioned_cpus": schema.Float32Attribute{ - Computed: true, - Description: "The number of CPU cores currently provisioned in the Autonomous VM cluster.", - }, - "reclaimable_cpus": schema.Float32Attribute{ - Computed: true, - Description: "The number of CPU cores that can be reclaimed from terminated or scaled-down Autonomous Databases.", - }, - "reserved_cpus": schema.Float32Attribute{ - Computed: true, - Description: "The number of CPU cores reserved for system operations and redundancy.", - }, - "scan_listener_port_non_tls": schema.Int32Attribute{ - Computed: true, - Description: "The SCAN listener port for non-TLS (TCP) protocol. The default is 1521.", - }, - "scan_listener_port_tls": schema.Int32Attribute{ - Computed: true, - Description: "The SCAN listener port for TLS (TCP) protocol. The default is 2484.", - }, - "shape": schema.StringAttribute{ - Computed: true, - Description: "The shape of the Exadata infrastructure for the Autonomous VM cluster.", - }, - "status": schema.StringAttribute{ - CustomType: status, - Computed: true, - Description: "The status of the Autonomous VM cluster.", - }, - "status_reason": schema.StringAttribute{ - Computed: true, - Description: "Additional information about the current status of the Autonomous VM cluster.", - }, - "time_database_ssl_certificate_expires": schema.StringAttribute{ - Computed: true, - Description: "The expiration date and time of the database SSL certificate.", - }, - "time_ords_certificate_expires": schema.StringAttribute{ - Computed: true, - Description: "The expiration date and time of the Oracle REST Data Services (ORDS)certificate .", - }, - "time_zone": schema.StringAttribute{ - Computed: true, - Description: "The time zone of the Autonomous VM cluster.", - }, - "total_container_databases": schema.Int32Attribute{ - Computed: true, - }, - names.AttrTags: tftags.TagsAttributeComputedOnly(), - "maintenance_window": schema.ObjectAttribute{ - Computed: true, - CustomType: fwtypes.NewObjectTypeOf[cloudAutonomousVmClusterMaintenanceWindowDataSourceModel](ctx), - Description: "The maintenance window for the Autonomous VM cluster.", - AttributeTypes: map[string]attr.Type{ - "days_of_week": types.SetType{ - ElemType: fwtypes.StringEnumType[odbtypes.DayOfWeekName](), - }, - "hours_of_day": types.SetType{ - ElemType: types.Int32Type, - }, - "lead_time_in_weeks": types.Int32Type, - "months": types.SetType{ - ElemType: fwtypes.StringEnumType[odbtypes.MonthName](), - }, - "preference": fwtypes.StringEnumType[odbtypes.PreferenceType](), - "weeks_of_month": types.SetType{ - ElemType: types.Int32Type, - }, - }, - }, - }, - } -} - -func (d *dataSourceCloudAutonomousVmCluster) Read(ctx context.Context, req datasource.ReadRequest, resp *datasource.ReadResponse) { - - conn := d.Meta().ODBClient(ctx) - - var data cloudAutonomousVmClusterDataSourceModel - resp.Diagnostics.Append(req.Config.Get(ctx, &data)...) - if resp.Diagnostics.HasError() { - return - } - input := odb.GetCloudAutonomousVmClusterInput{ - CloudAutonomousVmClusterId: data.CloudAutonomousVmClusterId.ValueStringPointer(), - } - - out, err := conn.GetCloudAutonomousVmCluster(ctx, &input) - if err != nil { - resp.Diagnostics.AddError( - create.ProblemStandardMessage(names.ODB, create.ErrActionReading, DSNameCloudAutonomousVmCluster, data.CloudAutonomousVmClusterId.ValueString(), err), - err.Error(), - ) - return - } - data.CreatedAt = types.StringValue(out.CloudAutonomousVmCluster.CreatedAt.Format(time.RFC3339)) - if out.CloudAutonomousVmCluster.TimeOrdsCertificateExpires != nil { - data.TimeOrdsCertificateExpires = types.StringValue(out.CloudAutonomousVmCluster.TimeOrdsCertificateExpires.Format(time.RFC3339)) - } else { - data.TimeOrdsCertificateExpires = types.StringValue(NotAvailableValues) - } - if out.CloudAutonomousVmCluster.TimeDatabaseSslCertificateExpires != nil { - data.TimeDatabaseSslCertificateExpires = types.StringValue(out.CloudAutonomousVmCluster.TimeDatabaseSslCertificateExpires.Format(time.RFC3339)) - } else { - data.TimeDatabaseSslCertificateExpires = types.StringValue(NotAvailableValues) - } - tagsRead, err := listTags(ctx, conn, *out.CloudAutonomousVmCluster.CloudAutonomousVmClusterArn) - if err != nil { - resp.Diagnostics.AddError( - create.ProblemStandardMessage(names.ODB, create.ErrActionReading, DSNameCloudAutonomousVmCluster, data.CloudAutonomousVmClusterId.ValueString(), err), - err.Error(), - ) - return - } - if tagsRead != nil { - data.Tags = tftags.FlattenStringValueMap(ctx, tagsRead.Map()) - } - - data.MaintenanceWindow = d.flattenMaintenanceWindow(ctx, out.CloudAutonomousVmCluster.MaintenanceWindow) - - resp.Diagnostics.Append(flex.Flatten(ctx, out.CloudAutonomousVmCluster, &data)...) - if resp.Diagnostics.HasError() { - return - } - - resp.Diagnostics.Append(resp.State.Set(ctx, &data)...) -} - -func (d *dataSourceCloudAutonomousVmCluster) flattenMaintenanceWindow(ctx context.Context, avmcMW *odbtypes.MaintenanceWindow) fwtypes.ObjectValueOf[cloudAutonomousVmClusterMaintenanceWindowDataSourceModel] { - //days of week - daysOfWeek := make([]attr.Value, 0, len(avmcMW.DaysOfWeek)) - for _, dayOfWeek := range avmcMW.DaysOfWeek { - dayOfWeekStringValue := fwtypes.StringEnumValue(dayOfWeek.Name).StringValue - daysOfWeek = append(daysOfWeek, dayOfWeekStringValue) - } - setValueOfDaysOfWeek, _ := basetypes.NewSetValue(types.StringType, daysOfWeek) - daysOfWeekRead := fwtypes.SetValueOf[fwtypes.StringEnum[odbtypes.DayOfWeekName]]{ - SetValue: setValueOfDaysOfWeek, - } - //hours of the day - hoursOfTheDay := make([]attr.Value, 0, len(avmcMW.HoursOfDay)) - for _, hourOfTheDay := range avmcMW.HoursOfDay { - daysOfWeekInt32Value := types.Int32Value(hourOfTheDay) - hoursOfTheDay = append(hoursOfTheDay, daysOfWeekInt32Value) - } - setValuesOfHoursOfTheDay, _ := basetypes.NewSetValue(types.Int32Type, hoursOfTheDay) - hoursOfTheDayRead := fwtypes.SetValueOf[types.Int32]{ - SetValue: setValuesOfHoursOfTheDay, - } - //monts - months := make([]attr.Value, 0, len(avmcMW.Months)) - for _, month := range avmcMW.Months { - monthStringValue := fwtypes.StringEnumValue(month.Name).StringValue - months = append(months, monthStringValue) - } - setValuesOfMonth, _ := basetypes.NewSetValue(types.StringType, months) - monthsRead := fwtypes.SetValueOf[fwtypes.StringEnum[odbtypes.MonthName]]{ - SetValue: setValuesOfMonth, - } - //weeks of month - weeksOfMonth := make([]attr.Value, 0, len(avmcMW.WeeksOfMonth)) - for _, weekOfMonth := range avmcMW.WeeksOfMonth { - weeksOfMonthInt32Value := types.Int32Value(weekOfMonth) - weeksOfMonth = append(weeksOfMonth, weeksOfMonthInt32Value) - } - setValuesOfWeekOfMonth, _ := basetypes.NewSetValue(types.Int32Type, weeksOfMonth) - weeksOfMonthRead := fwtypes.SetValueOf[types.Int32]{ - SetValue: setValuesOfWeekOfMonth, - } - - computedMW := cloudAutonomousVmClusterMaintenanceWindowDataSourceModel{ - DaysOfWeek: daysOfWeekRead, - HoursOfDay: hoursOfTheDayRead, - LeadTimeInWeeks: types.Int32PointerValue(avmcMW.LeadTimeInWeeks), - Months: monthsRead, - Preference: fwtypes.StringEnumValue(avmcMW.Preference), - WeeksOfMonth: weeksOfMonthRead, - } - result, _ := fwtypes.NewObjectValueOf[cloudAutonomousVmClusterMaintenanceWindowDataSourceModel](ctx, &computedMW) - return result -} - -type cloudAutonomousVmClusterDataSourceModel struct { - framework.WithRegionModel - CloudAutonomousVmClusterArn types.String `tfsdk:"arn"` - CloudAutonomousVmClusterId types.String `tfsdk:"id"` - CloudExadataInfrastructureId types.String `tfsdk:"cloud_exadata_infrastructure_id"` - AutonomousDataStoragePercentage types.Float32 `tfsdk:"autonomous_data_storage_percentage"` - AutonomousDataStorageSizeInTBs types.Float64 `tfsdk:"autonomous_data_storage_size_in_tbs"` - AvailableAutonomousDataStorageSizeInTBs types.Float64 `tfsdk:"available_autonomous_data_storage_size_in_tbs"` - AvailableContainerDatabases types.Int32 `tfsdk:"available_container_databases"` - AvailableCpus types.Float32 `tfsdk:"available_cpus"` - ComputeModel fwtypes.StringEnum[odbtypes.ComputeModel] `tfsdk:"compute_model"` - CpuCoreCount types.Int32 `tfsdk:"cpu_core_count"` - CpuCoreCountPerNode types.Int32 `tfsdk:"cpu_core_count_per_node"` - CpuPercentage types.Float32 `tfsdk:"cpu_percentage"` - CreatedAt types.String `tfsdk:"created_at" autoflex:",noflatten"` - DataStorageSizeInGBs types.Float64 `tfsdk:"data_storage_size_in_gbs"` - DataStorageSizeInTBs types.Float64 `tfsdk:"data_storage_size_in_tbs"` - DbNodeStorageSizeInGBs types.Int32 `tfsdk:"odb_node_storage_size_in_gbs"` - DbServers fwtypes.SetValueOf[types.String] `tfsdk:"db_servers"` - Description types.String `tfsdk:"description"` - DisplayName types.String `tfsdk:"display_name"` - Domain types.String `tfsdk:"domain"` - ExadataStorageInTBsLowestScaledValue types.Float64 `tfsdk:"exadata_storage_in_tbs_lowest_scaled_value"` - Hostname types.String `tfsdk:"hostname"` - IsMtlsEnabledVmCluster types.Bool `tfsdk:"is_mtls_enabled_vm_cluster"` - LicenseModel fwtypes.StringEnum[odbtypes.LicenseModel] `tfsdk:"license_model"` - MaxAcdsLowestScaledValue types.Int32 `tfsdk:"max_acds_lowest_scaled_value"` - MemoryPerOracleComputeUnitInGBs types.Int32 `tfsdk:"memory_per_oracle_compute_unit_in_gbs"` - MemorySizeInGBs types.Int32 `tfsdk:"memory_size_in_gbs"` - NodeCount types.Int32 `tfsdk:"node_count"` - NonProvisionableAutonomousContainerDatabases types.Int32 `tfsdk:"non_provisionable_autonomous_container_databases"` - OciResourceAnchorName types.String `tfsdk:"oci_resource_anchor_name"` - OciUrl types.String `tfsdk:"oci_url"` - Ocid types.String `tfsdk:"ocid"` - OdbNetworkId types.String `tfsdk:"odb_network_id"` - PercentProgress types.Float32 `tfsdk:"percent_progress"` - ProvisionableAutonomousContainerDatabases types.Int32 `tfsdk:"provisionable_autonomous_container_databases"` - ProvisionedAutonomousContainerDatabases types.Int32 `tfsdk:"provisioned_autonomous_container_databases"` - ProvisionedCpus types.Float32 `tfsdk:"provisioned_cpus"` - ReclaimableCpus types.Float32 `tfsdk:"reclaimable_cpus"` - ReservedCpus types.Float32 `tfsdk:"reserved_cpus"` - ScanListenerPortNonTls types.Int32 `tfsdk:"scan_listener_port_non_tls"` - ScanListenerPortTls types.Int32 `tfsdk:"scan_listener_port_tls"` - Shape types.String `tfsdk:"shape"` - Status fwtypes.StringEnum[odbtypes.ResourceStatus] `tfsdk:"status"` - StatusReason types.String `tfsdk:"status_reason"` - TimeDatabaseSslCertificateExpires types.String `tfsdk:"time_database_ssl_certificate_expires" autoflex:",noflatten"` - TimeOrdsCertificateExpires types.String `tfsdk:"time_ords_certificate_expires" autoflex:",noflatten"` - TimeZone types.String `tfsdk:"time_zone"` - TotalContainerDatabases types.Int32 `tfsdk:"total_container_databases"` - MaintenanceWindow fwtypes.ObjectValueOf[cloudAutonomousVmClusterMaintenanceWindowDataSourceModel] `tfsdk:"maintenance_window" autoflex:",noflatten"` - Tags tftags.Map `tfsdk:"tags"` -} -type cloudAutonomousVmClusterMaintenanceWindowDataSourceModel struct { - DaysOfWeek fwtypes.SetValueOf[fwtypes.StringEnum[odbtypes.DayOfWeekName]] `tfsdk:"days_of_week"` - HoursOfDay fwtypes.SetValueOf[types.Int32] `tfsdk:"hours_of_day"` - LeadTimeInWeeks types.Int32 `tfsdk:"lead_time_in_weeks"` - Months fwtypes.SetValueOf[fwtypes.StringEnum[odbtypes.MonthName]] `tfsdk:"months"` - Preference fwtypes.StringEnum[odbtypes.PreferenceType] `tfsdk:"preference"` - WeeksOfMonth fwtypes.SetValueOf[types.Int32] `tfsdk:"weeks_of_month"` -} diff --git a/internal/service/odb/cloud_autonomous_vm_cluster_data_source_test.go b/internal/service/odb/cloud_autonomous_vm_cluster_data_source_test.go deleted file mode 100644 index 8061ab284f3f..000000000000 --- a/internal/service/odb/cloud_autonomous_vm_cluster_data_source_test.go +++ /dev/null @@ -1,242 +0,0 @@ -//Copyright © 2025, Oracle and/or its affiliates. All rights reserved. - -package odb_test - -import ( - "context" - "errors" - "fmt" - "github.com/aws/aws-sdk-go-v2/aws" - "github.com/aws/aws-sdk-go-v2/service/odb" - odbtypes "github.com/aws/aws-sdk-go-v2/service/odb/types" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" - sdkacctest "github.com/hashicorp/terraform-plugin-testing/helper/acctest" - "github.com/hashicorp/terraform-plugin-testing/terraform" - "github.com/hashicorp/terraform-provider-aws/internal/conns" - "github.com/hashicorp/terraform-provider-aws/internal/create" - "github.com/hashicorp/terraform-provider-aws/internal/errs" - tfodb "github.com/hashicorp/terraform-provider-aws/internal/service/odb" - "github.com/hashicorp/terraform-provider-aws/internal/tfresource" - "testing" - - "github.com/hashicorp/terraform-plugin-testing/helper/resource" - "github.com/hashicorp/terraform-provider-aws/internal/acctest" - "github.com/hashicorp/terraform-provider-aws/names" -) - -type autonomousVMClusterDSTest struct { - exaInfraDisplayNamePrefix string - odbNetDisplayNamePrefix string - autonomousVmClusterDisplayNamePrefix string -} - -var autonomousVMClusterDSTestEntity = autonomousVMClusterDSTest{ - exaInfraDisplayNamePrefix: "Ofake-exa", - odbNetDisplayNamePrefix: "odb-net", - autonomousVmClusterDisplayNamePrefix: "Ofake-avmc", -} - -func TestAccODBCloudAutonomousVmClusterDataSource_basic(t *testing.T) { - ctx := acctest.Context(t) - - if testing.Short() { - t.Skip("skipping long-running test in short mode") - } - var avmc1 odbtypes.CloudAutonomousVmCluster - dataSourceName := "data.aws_odb_cloud_autonomous_vm_cluster.test" - - resource.ParallelTest(t, resource.TestCase{ - PreCheck: func() { - acctest.PreCheck(ctx, t) - autonomousVMClusterDSTestEntity.testAccPreCheck(ctx, t) - }, - ErrorCheck: acctest.ErrorCheck(t, names.ODBServiceID), - ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, - CheckDestroy: autonomousVMClusterDSTestEntity.testAccCheckCloudAutonomousVmClusterDestroy(ctx), - Steps: []resource.TestStep{ - { - Config: autonomousVMClusterDSTestEntity.avmcBasic(), - Check: resource.ComposeAggregateTestCheckFunc( - resource.TestCheckResourceAttr(dataSourceName, "display_name", *avmc1.DisplayName), - ), - }, - }, - }) -} -func (autonomousVMClusterDSTest) checkCloudAutonomousVmClusterExists(ctx context.Context, name string, cloudAutonomousVMCluster *odbtypes.CloudAutonomousVmCluster) resource.TestCheckFunc { - return func(s *terraform.State) error { - rs, ok := s.RootModule().Resources[name] - if !ok { - return create.Error(names.ODB, create.ErrActionCheckingExistence, tfodb.ResNameCloudAutonomousVmCluster, name, errors.New("not found")) - } - - if rs.Primary.ID == "" { - return create.Error(names.ODB, create.ErrActionCheckingExistence, tfodb.ResNameCloudAutonomousVmCluster, name, errors.New("not set")) - } - - conn := acctest.Provider.Meta().(*conns.AWSClient).ODBClient(ctx) - resp, err := autonomousVMClusterDSTestEntity.findAVMC(ctx, conn, rs.Primary.ID) - if err != nil { - return create.Error(names.ODB, create.ErrActionCheckingExistence, tfodb.ResNameCloudAutonomousVmCluster, rs.Primary.ID, err) - } - - *cloudAutonomousVMCluster = *resp - - return nil - } -} - -func (autonomousVMClusterDSTest) findAVMC(ctx context.Context, conn *odb.Client, id string) (*odbtypes.CloudAutonomousVmCluster, error) { - input := odb.GetCloudAutonomousVmClusterInput{ - CloudAutonomousVmClusterId: aws.String(id), - } - out, err := conn.GetCloudAutonomousVmCluster(ctx, &input) - if err != nil { - if errs.IsA[*odbtypes.ResourceNotFoundException](err) { - return nil, &retry.NotFoundError{ - LastError: err, - LastRequest: &input, - } - } - return nil, err - } - - if out == nil || out.CloudAutonomousVmCluster == nil { - return nil, tfresource.NewEmptyResultError(&input) - } - - return out.CloudAutonomousVmCluster, nil -} - -func (autonomousVMClusterDSTest) testAccCheckCloudAutonomousVmClusterDestroy(ctx context.Context) resource.TestCheckFunc { - return func(s *terraform.State) error { - conn := acctest.Provider.Meta().(*conns.AWSClient).ODBClient(ctx) - - for _, rs := range s.RootModule().Resources { - if rs.Type != "aws_odb_cloud_autonomous_vm_cluster" { - continue - } - - _, err := tfodb.FindCloudAutonomousVmClusterByID(ctx, conn, rs.Primary.ID) - if tfresource.NotFound(err) { - return nil - } - if err != nil { - return create.Error(names.ODB, create.ErrActionCheckingDestroyed, tfodb.ResNameCloudAutonomousVmCluster, rs.Primary.ID, err) - } - - return create.Error(names.ODB, create.ErrActionCheckingDestroyed, tfodb.ResNameCloudAutonomousVmCluster, rs.Primary.ID, errors.New("not destroyed")) - } - - return nil - } -} -func (autonomousVMClusterDSTest) testAccPreCheck(ctx context.Context, t *testing.T) { - conn := acctest.Provider.Meta().(*conns.AWSClient).ODBClient(ctx) - - input := &odb.ListCloudAutonomousVmClustersInput{} - - _, err := conn.ListCloudAutonomousVmClusters(ctx, input) - - if acctest.PreCheckSkipError(err) { - t.Skipf("skipping acceptance testing: %s", err) - } - if err != nil { - t.Fatalf("unexpected PreCheck error: %s", err) - } -} - -func (autonomousVMClusterDSTest) avmcBasic() string { - - exaInfraDisplayName := sdkacctest.RandomWithPrefix(autonomousVMClusterDSTestEntity.exaInfraDisplayNamePrefix) - odbNetworkDisplayName := sdkacctest.RandomWithPrefix(autonomousVMClusterDSTestEntity.odbNetDisplayNamePrefix) - avmcDisplayName := sdkacctest.RandomWithPrefix(autonomousVMClusterDSTestEntity.autonomousVmClusterDisplayNamePrefix) - - exaInfraRes := autonomousVMClusterDSTestEntity.exaInfra(exaInfraDisplayName) - odbNetRes := autonomousVMClusterDSTestEntity.odbNet(odbNetworkDisplayName) - res := fmt.Sprintf(` -%s - -%s - -data "aws_odb_db_servers_list" "test" { - cloud_exadata_infrastructure_id = aws_odb_cloud_exadata_infrastructure.test.id -} - -resource "aws_odb_cloud_autonomous_vm_cluster" "test" { - cloud_exadata_infrastructure_id = aws_odb_cloud_exadata_infrastructure.test.id - odb_network_id =aws_odb_network.test.id - display_name = %[3]q - 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 = [ for db_server in data.aws_odb_db_servers_list.test.db_servers : db_server.id] - scan_listener_port_tls = 8561 - scan_listener_port_non_tls = 1024 - maintenance_window = { - preference = "NO_PREFERENCE" - days_of_week = [] - hours_of_day = [] - months = [] - weeks_of_month =[] - lead_time_in_weeks = 0 - } - -} - - -data "aws_odb_cloud_autonomous_vm_cluster" "test" { - id = aws_odb_cloud_autonomous_vm_cluster.test.id - -} -`, exaInfraRes, odbNetRes, avmcDisplayName) - - return res -} - -func (autonomousVMClusterDSTest) odbNet(odbNetName string) string { - networkRes := fmt.Sprintf(` - - -resource "aws_odb_network" "test" { - display_name = %[1]q - availability_zone_id = "use1-az6" - client_subnet_cidr = "10.2.0.0/24" - backup_subnet_cidr = "10.2.1.0/24" - s3_access = "DISABLED" - zero_etl_access = "DISABLED" -} - -`, odbNetName) - return networkRes -} - -func (autonomousVMClusterDSTest) exaInfra(exaInfraName string) string { - exaInfraRes := fmt.Sprintf(` - - -resource "aws_odb_cloud_exadata_infrastructure" "test" { - display_name = %[1]q - shape = "Exadata.X9M" - storage_count = 3 - compute_count = 2 - availability_zone_id = "use1-az6" - customer_contacts_to_send_to_oci = ["abc@example.com"] -maintenance_window = { - custom_action_timeout_in_mins = 16 - days_of_week = [] - hours_of_day = [] - is_custom_action_timeout_enabled = true - lead_time_in_weeks = 0 - months = [] - patching_mode = "ROLLING" - preference = "NO_PREFERENCE" - weeks_of_month =[] - } -} - -`, exaInfraName) - return exaInfraRes -} diff --git a/internal/service/odb/cloud_autonomous_vm_cluster_test.go b/internal/service/odb/cloud_autonomous_vm_cluster_test.go deleted file mode 100644 index b46517573f90..000000000000 --- a/internal/service/odb/cloud_autonomous_vm_cluster_test.go +++ /dev/null @@ -1,519 +0,0 @@ -//Copyright © 2025, Oracle and/or its affiliates. All rights reserved. - -package odb_test - -import ( - "context" - "errors" - "fmt" - "github.com/aws/aws-sdk-go-v2/aws" - "github.com/aws/aws-sdk-go-v2/service/odb" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" - "github.com/hashicorp/terraform-provider-aws/internal/errs" - "github.com/hashicorp/terraform-provider-aws/internal/tfresource" - "strings" - "testing" - - sdkacctest "github.com/hashicorp/terraform-plugin-testing/helper/acctest" - "github.com/hashicorp/terraform-plugin-testing/helper/resource" - "github.com/hashicorp/terraform-plugin-testing/terraform" - "github.com/hashicorp/terraform-provider-aws/internal/acctest" - "github.com/hashicorp/terraform-provider-aws/internal/conns" - "github.com/hashicorp/terraform-provider-aws/internal/create" - - "github.com/hashicorp/terraform-provider-aws/names" - - odbtypes "github.com/aws/aws-sdk-go-v2/service/odb/types" - - tfodb "github.com/hashicorp/terraform-provider-aws/internal/service/odb" -) - -type autonomousVMClusterResourceTest struct { - exaInfraDisplayNamePrefix string - odbNetDisplayNamePrefix string - autonomousVmClusterDisplayNamePrefix string -} - -var autonomousVMClusterResourceTestEntity = autonomousVMClusterResourceTest{ - exaInfraDisplayNamePrefix: "Ofake-exa", - odbNetDisplayNamePrefix: "odb-net", - autonomousVmClusterDisplayNamePrefix: "Ofake-avmc", -} - -func TestAccODBCloudAutonomousVmClusterCreationBasic(t *testing.T) { - ctx := acctest.Context(t) - if testing.Short() { - t.Skip("skipping long-running test in short mode") - } - - var cloudAVMC odbtypes.CloudAutonomousVmCluster - - resourceName := "aws_odb_cloud_autonomous_vm_cluster.test" - - resource.Test(t, resource.TestCase{ - PreCheck: func() { - acctest.PreCheck(ctx, t) - autonomousVMClusterResourceTestEntity.testAccPreCheck(ctx, t) - }, - ErrorCheck: acctest.ErrorCheck(t, names.ODBServiceID), - ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, - CheckDestroy: autonomousVMClusterResourceTestEntity.testAccCheckCloudAutonomousVmClusterDestroy(ctx), - Steps: []resource.TestStep{ - { - Config: autonomousVMClusterResourceTestEntity.avmcBasic(), - Check: resource.ComposeAggregateTestCheckFunc( - autonomousVMClusterResourceTestEntity.checkCloudAutonomousVmClusterExists(ctx, resourceName, &cloudAVMC), - ), - }, - { - ResourceName: resourceName, - ImportState: true, - ImportStateVerify: true, - }, - }, - }) -} - -func TestAccODBCloudAutonomousVmClusterCreationWithAllParams(t *testing.T) { - ctx := acctest.Context(t) - if testing.Short() { - t.Skip("skipping long-running test in short mode") - } - - var cloudAVMC odbtypes.CloudAutonomousVmCluster - - resourceName := "aws_odb_cloud_autonomous_vm_cluster.test" - - resource.Test(t, resource.TestCase{ - PreCheck: func() { - acctest.PreCheck(ctx, t) - //acctest.PreCheckPartitionHasService(t, names.ODBServiceID) - autonomousVMClusterResourceTestEntity.testAccPreCheck(ctx, t) - }, - ErrorCheck: acctest.ErrorCheck(t, names.ODBServiceID), - ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, - CheckDestroy: autonomousVMClusterResourceTestEntity.testAccCheckCloudAutonomousVmClusterDestroy(ctx), - Steps: []resource.TestStep{ - { - Config: autonomousVMClusterResourceTestEntity.avmcAllParamsConfig(), - Check: resource.ComposeAggregateTestCheckFunc( - autonomousVMClusterResourceTestEntity.checkCloudAutonomousVmClusterExists(ctx, resourceName, &cloudAVMC), - ), - }, - { - ResourceName: resourceName, - ImportState: true, - ImportStateVerify: true, - }, - }, - }) -} - -func TestAccODBCloudAutonomousVmClusterTagging(t *testing.T) { - fmt.Println("Update tags test") - ctx := acctest.Context(t) - if testing.Short() { - t.Skip("skipping long-running test in short mode") - } - - var avmc1, avmc2 odbtypes.CloudAutonomousVmCluster - resourceName := "aws_odb_cloud_autonomous_vm_cluster.test" - withoutTag, withTag := autonomousVMClusterResourceTestEntity.avmcNoTagWithTag() - resource.Test(t, resource.TestCase{ - PreCheck: func() { - acctest.PreCheck(ctx, t) - autonomousVMClusterResourceTestEntity.testAccPreCheck(ctx, t) - }, - ErrorCheck: acctest.ErrorCheck(t, names.ODBServiceID), - ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, - CheckDestroy: autonomousVMClusterResourceTestEntity.testAccCheckCloudAutonomousVmClusterDestroy(ctx), - - Steps: []resource.TestStep{ - { - Config: withoutTag, - - Check: resource.ComposeAggregateTestCheckFunc( - autonomousVMClusterResourceTestEntity.checkCloudAutonomousVmClusterExists(ctx, resourceName, &avmc1), - resource.TestCheckResourceAttr(resourceName, "tags.%", "0"), - ), - }, - { - ResourceName: resourceName, - ImportState: true, - ImportStateVerify: true, - }, - { - Config: withTag, - Check: resource.ComposeAggregateTestCheckFunc( - autonomousVMClusterResourceTestEntity.checkCloudAutonomousVmClusterExists(ctx, resourceName, &avmc2), - resource.TestCheckResourceAttr(resourceName, "tags.%", "1"), - resource.TestCheckResourceAttr(resourceName, "tags.env", "dev"), - resource.ComposeTestCheckFunc(func(state *terraform.State) error { - if strings.Compare(*(avmc1.CloudAutonomousVmClusterId), *(avmc2.CloudAutonomousVmClusterId)) != 0 { - return errors.New("shouldn't create a new autonomous vm cluster") - } - return nil - }), - ), - }, - }, - }) -} - -func TestAccODBCloudAutonomousVmCluster_disappears(t *testing.T) { - ctx := acctest.Context(t) - if testing.Short() { - t.Skip("skipping long-running test in short mode") - } - var cloudautonomousvmcluster odbtypes.CloudAutonomousVmCluster - resourceName := "aws_odb_cloud_autonomous_vm_cluster.test" - - resource.Test(t, resource.TestCase{ - PreCheck: func() { - acctest.PreCheck(ctx, t) - autonomousVMClusterResourceTestEntity.testAccPreCheck(ctx, t) - }, - ErrorCheck: acctest.ErrorCheck(t, names.ODBServiceID), - ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, - CheckDestroy: autonomousVMClusterResourceTestEntity.testAccCheckCloudAutonomousVmClusterDestroy(ctx), - Steps: []resource.TestStep{ - { - Config: autonomousVMClusterResourceTestEntity.avmcBasic(), - Check: resource.ComposeAggregateTestCheckFunc( - autonomousVMClusterResourceTestEntity.checkCloudAutonomousVmClusterExists(ctx, resourceName, &cloudautonomousvmcluster), - acctest.CheckFrameworkResourceDisappears(ctx, acctest.Provider, tfodb.ResourceCloudAutonomousVMCluster, resourceName), - ), - ExpectNonEmptyPlan: true, - }, - }, - }) -} - -func (autonomousVMClusterResourceTest) testAccPreCheck(ctx context.Context, t *testing.T) { - conn := acctest.Provider.Meta().(*conns.AWSClient).ODBClient(ctx) - - input := &odb.ListCloudAutonomousVmClustersInput{} - - _, err := conn.ListCloudAutonomousVmClusters(ctx, input) - - if acctest.PreCheckSkipError(err) { - t.Skipf("skipping acceptance testing: %s", err) - } - if err != nil { - t.Fatalf("unexpected PreCheck error: %s", err) - } -} -func (autonomousVMClusterResourceTest) testAccCheckCloudAutonomousVmClusterDestroy(ctx context.Context) resource.TestCheckFunc { - return func(s *terraform.State) error { - conn := acctest.Provider.Meta().(*conns.AWSClient).ODBClient(ctx) - - for _, rs := range s.RootModule().Resources { - if rs.Type != "aws_odb_cloud_autonomous_vm_cluster" { - continue - } - - _, err := autonomousVMClusterResourceTestEntity.findAVMC(ctx, conn, rs.Primary.ID) - if tfresource.NotFound(err) { - return nil - } - if err != nil { - return create.Error(names.ODB, create.ErrActionCheckingDestroyed, tfodb.ResNameCloudAutonomousVmCluster, rs.Primary.ID, err) - } - - return create.Error(names.ODB, create.ErrActionCheckingDestroyed, tfodb.ResNameCloudAutonomousVmCluster, rs.Primary.ID, errors.New("not destroyed")) - } - - return nil - } -} - -func (autonomousVMClusterResourceTest) checkCloudAutonomousVmClusterExists(ctx context.Context, name string, cloudAutonomousVMCluster *odbtypes.CloudAutonomousVmCluster) resource.TestCheckFunc { - return func(s *terraform.State) error { - rs, ok := s.RootModule().Resources[name] - if !ok { - return create.Error(names.ODB, create.ErrActionCheckingExistence, tfodb.ResNameCloudAutonomousVmCluster, name, errors.New("not found")) - } - - if rs.Primary.ID == "" { - return create.Error(names.ODB, create.ErrActionCheckingExistence, tfodb.ResNameCloudAutonomousVmCluster, name, errors.New("not set")) - } - - conn := acctest.Provider.Meta().(*conns.AWSClient).ODBClient(ctx) - fmt.Println("") - resp, err := autonomousVMClusterResourceTestEntity.findAVMC(ctx, conn, rs.Primary.ID) - if err != nil { - return create.Error(names.ODB, create.ErrActionCheckingExistence, tfodb.ResNameCloudAutonomousVmCluster, rs.Primary.ID, err) - } - - *cloudAutonomousVMCluster = *resp - - return nil - } -} - -func (autonomousVMClusterResourceTest) findAVMC(ctx context.Context, conn *odb.Client, id string) (*odbtypes.CloudAutonomousVmCluster, error) { - input := odb.GetCloudAutonomousVmClusterInput{ - CloudAutonomousVmClusterId: aws.String(id), - } - out, err := conn.GetCloudAutonomousVmCluster(ctx, &input) - if err != nil { - if errs.IsA[*odbtypes.ResourceNotFoundException](err) { - return nil, &retry.NotFoundError{ - LastError: err, - LastRequest: &input, - } - } - return nil, err - } - - if out == nil || out.CloudAutonomousVmCluster == nil { - return nil, tfresource.NewEmptyResultError(&input) - } - - return out.CloudAutonomousVmCluster, nil -} - -func (autonomousVMClusterResourceTest) avmcBasic() string { - - exaInfraDisplayName := sdkacctest.RandomWithPrefix(autonomousVMClusterDSTestEntity.exaInfraDisplayNamePrefix) - odbNetworkDisplayName := sdkacctest.RandomWithPrefix(autonomousVMClusterDSTestEntity.odbNetDisplayNamePrefix) - avmcDisplayName := sdkacctest.RandomWithPrefix(autonomousVMClusterDSTestEntity.autonomousVmClusterDisplayNamePrefix) - - exaInfraRes := autonomousVMClusterDSTestEntity.exaInfra(exaInfraDisplayName) - odbNetRes := autonomousVMClusterDSTestEntity.odbNet(odbNetworkDisplayName) - res := fmt.Sprintf(` -%s - -%s - -data "aws_odb_db_servers_list" "test" { - cloud_exadata_infrastructure_id = aws_odb_cloud_exadata_infrastructure.test.id -} - -resource "aws_odb_cloud_autonomous_vm_cluster" "test" { - cloud_exadata_infrastructure_id = aws_odb_cloud_exadata_infrastructure.test.id - odb_network_id =aws_odb_network.test.id - display_name = %[3]q - 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 = [ for db_server in data.aws_odb_db_servers_list.test.db_servers : db_server.id] - scan_listener_port_tls = 8561 - scan_listener_port_non_tls = 1024 - maintenance_window = { - preference = "NO_PREFERENCE" - days_of_week = [] - hours_of_day = [] - months = [] - weeks_of_month =[] - lead_time_in_weeks = 0 - } - -} - -`, exaInfraRes, odbNetRes, avmcDisplayName) - - return res -} - -func (autonomousVMClusterResourceTest) avmcNoTagWithTag() (string, string) { - exaInfraDisplayName := sdkacctest.RandomWithPrefix(autonomousVMClusterDSTestEntity.exaInfraDisplayNamePrefix) - odbNetworkDisplayName := sdkacctest.RandomWithPrefix(autonomousVMClusterDSTestEntity.odbNetDisplayNamePrefix) - avmcDisplayName := sdkacctest.RandomWithPrefix(autonomousVMClusterDSTestEntity.autonomousVmClusterDisplayNamePrefix) - - exaInfraRes := autonomousVMClusterDSTestEntity.exaInfra(exaInfraDisplayName) - odbNetRes := autonomousVMClusterDSTestEntity.odbNet(odbNetworkDisplayName) - noTag := fmt.Sprintf(` -%s - -%s - -data "aws_odb_db_servers_list" "test" { - cloud_exadata_infrastructure_id = aws_odb_cloud_exadata_infrastructure.test.id -} - -resource "aws_odb_cloud_autonomous_vm_cluster" "test" { - cloud_exadata_infrastructure_id = aws_odb_cloud_exadata_infrastructure.test.id - odb_network_id =aws_odb_network.test.id - display_name = %[3]q - 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 = [ for db_server in data.aws_odb_db_servers_list.test.db_servers : db_server.id] - scan_listener_port_tls = 8561 - scan_listener_port_non_tls = 1024 - maintenance_window = { - preference = "NO_PREFERENCE" - days_of_week = [] - hours_of_day = [] - months = [] - weeks_of_month =[] - lead_time_in_weeks = 0 - } - -} - -`, exaInfraRes, odbNetRes, avmcDisplayName) - withTag := fmt.Sprintf(` -%s - -%s - -data "aws_odb_db_servers_list" "test" { - cloud_exadata_infrastructure_id = aws_odb_cloud_exadata_infrastructure.test.id -} - -resource "aws_odb_cloud_autonomous_vm_cluster" "test" { - cloud_exadata_infrastructure_id = aws_odb_cloud_exadata_infrastructure.test.id - odb_network_id =aws_odb_network.test.id - display_name = %[3]q - 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 = [ for db_server in data.aws_odb_db_servers_list.test.db_servers : db_server.id] - scan_listener_port_tls = 8561 - scan_listener_port_non_tls = 1024 - maintenance_window = { - preference = "NO_PREFERENCE" - days_of_week = [] - hours_of_day = [] - months = [] - weeks_of_month =[] - lead_time_in_weeks = 0 - } - tags = { - "env"= "dev" - } - -} - -`, exaInfraRes, odbNetRes, avmcDisplayName) - - return noTag, withTag -} - -func (autonomousVMClusterResourceTest) avmcAllParamsConfig() string { - - exaInfraDisplayName := sdkacctest.RandomWithPrefix(autonomousVMClusterDSTestEntity.exaInfraDisplayNamePrefix) - odbNetworkDisplayName := sdkacctest.RandomWithPrefix(autonomousVMClusterDSTestEntity.odbNetDisplayNamePrefix) - avmcDisplayName := sdkacctest.RandomWithPrefix(autonomousVMClusterDSTestEntity.autonomousVmClusterDisplayNamePrefix) - - exaInfraRes := autonomousVMClusterDSTestEntity.exaInfra(exaInfraDisplayName) - odbNetRes := autonomousVMClusterDSTestEntity.odbNet(odbNetworkDisplayName) - res := fmt.Sprintf(` -%s - -%s - -data "aws_odb_db_servers_list" "test" { - cloud_exadata_infrastructure_id = aws_odb_cloud_exadata_infrastructure.test.id -} - -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 = %[3]q - 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 = [ for db_server in data.aws_odb_db_servers_list.test.db_servers : db_server.id] - scan_listener_port_tls = 8561 - scan_listener_port_non_tls = 1024 - maintenance_window = { - preference = "CUSTOM_PREFERENCE" - days_of_week = ["MONDAY", "TUESDAY"] - hours_of_day = [4,16] - months = ["FEBRUARY","MAY","AUGUST","NOVEMBER"] - weeks_of_month =[2,4] - lead_time_in_weeks = 3 - } - tags = { - "env"= "dev" - } - -} - -`, exaInfraRes, odbNetRes, avmcDisplayName) - - return res -} - -func (autonomousVMClusterResourceTest) odbNet(odbNetName string) string { - networkRes := fmt.Sprintf(` - - -resource "aws_odb_network" "test" { - display_name = %[1]q - availability_zone_id = "use1-az6" - client_subnet_cidr = "10.2.0.0/24" - backup_subnet_cidr = "10.2.1.0/24" - s3_access = "DISABLED" - zero_etl_access = "DISABLED" -} - -`, odbNetName) - return networkRes -} - -func (autonomousVMClusterResourceTest) avmcWithMandatoryParamsWithTag(exaInfra, odbNetwork, avmcDisplayName string) string { - res := fmt.Sprintf(` -%s - -%s - -resource "aws_odb_cloud_autonomous_vm_cluster" "test" { - display_name = %[1]q - cloud_exadata_infrastructure_id = "exa_ky7jabi90t" - odb_network_id = "odbnet_fjey4b8oth" - autonomous_data_storage_size_in_tbs = 5 - memory_per_oracle_compute_unit_in_gbs = 2 - total_container_databases = 1 - cpu_core_count_per_node = 4 - tags = { - "env"= "dev" - } - -} -`, exaInfra, odbNetwork, avmcDisplayName) - - return res -} - -func (autonomousVMClusterResourceTest) exaInfra(exaDisplayName string) string { - resource := fmt.Sprintf(` -resource "aws_odb_cloud_exadata_infrastructure" "test" { - display_name = "%[1]s" - shape = "Exadata.X9M" - storage_count = 3 - compute_count = 2 - availability_zone_id = "use1-az6" - customer_contacts_to_send_to_oci = ["abc@example.com"] - -} -`, exaDisplayName) - - return resource -} -func (autonomousVMClusterResourceTest) odbNetwork(odbNetDisplayName string) string { - return fmt.Sprintf(` - resource "aws_odb_network" "test" { - display_name = %[1]q - availability_zone_id = "use1-az6" - client_subnet_cidr = "10.2.0.0/24" - backup_subnet_cidr = "10.2.1.0/24" - s3_access = "DISABLED" - zero_etl_access = "DISABLED" - } -`, odbNetDisplayName) - -} diff --git a/internal/service/odb/cloud_autonomous_vm_clusters_list_data_source.go b/internal/service/odb/cloud_autonomous_vm_clusters_list_data_source.go deleted file mode 100644 index 0e30a6b667a7..000000000000 --- a/internal/service/odb/cloud_autonomous_vm_clusters_list_data_source.go +++ /dev/null @@ -1,92 +0,0 @@ -//Copyright © 2025, Oracle and/or its affiliates. All rights reserved. - -package odb - -import ( - "context" - "github.com/hashicorp/terraform-plugin-framework/attr" - - "github.com/aws/aws-sdk-go-v2/service/odb" - "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/create" - "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/names" -) - -// Function annotations are used for datasource registration to the Provider. DO NOT EDIT. -// @FrameworkDataSource("aws_odb_cloud_autonomous_vm_clusters_list", name="Cloud Autonomous Vm Clusters List") -func newDataSourceCloudAutonomousVmClustersList(context.Context) (datasource.DataSourceWithConfigure, error) { - return &dataSourceCloudAutonomousVmClustersList{}, nil -} - -const ( - DSNameCloudAutonomousVmClustersList = "Cloud Autonomous Vm Clusters List Data Source" -) - -type dataSourceCloudAutonomousVmClustersList struct { - framework.DataSourceWithModel[cloudAutonomousVmClusterListModel] -} - -func (d *dataSourceCloudAutonomousVmClustersList) Schema(ctx context.Context, req datasource.SchemaRequest, resp *datasource.SchemaResponse) { - resp.Schema = schema.Schema{ - Attributes: map[string]schema.Attribute{ - "cloud_autonomous_vm_clusters": schema.ListAttribute{ - Computed: true, - Description: "List of Cloud Autonomous VM Clusters (OCID, ID, ARN, OCI URL, Display Name)", - CustomType: fwtypes.NewListNestedObjectTypeOf[cloudAutonomousVmClusterSummary](ctx), - ElementType: types.ObjectType{ - AttrTypes: map[string]attr.Type{ - "arn": types.StringType, - "id": types.StringType, - "oci_url": types.StringType, - "ocid": types.StringType, - "display_name": types.StringType, - }, - }, - }, - }, - } -} - -// Data sources only have a read method. -func (d *dataSourceCloudAutonomousVmClustersList) Read(ctx context.Context, req datasource.ReadRequest, resp *datasource.ReadResponse) { - - conn := d.Meta().ODBClient(ctx) - - var data cloudExadataInfrastructuresListDataSourceModel - resp.Diagnostics.Append(req.Config.Get(ctx, &data)...) - if resp.Diagnostics.HasError() { - return - } - - out, err := conn.ListCloudAutonomousVmClusters(ctx, &odb.ListCloudAutonomousVmClustersInput{}) - if err != nil { - resp.Diagnostics.AddError( - create.ProblemStandardMessage(names.ODB, create.ErrActionReading, DSNameCloudAutonomousVmClustersList, "", err), - err.Error(), - ) - return - } - resp.Diagnostics.Append(flex.Flatten(ctx, out, &data)...) - if resp.Diagnostics.HasError() { - return - } - resp.Diagnostics.Append(resp.State.Set(ctx, &data)...) -} - -type cloudAutonomousVmClusterListModel struct { - framework.WithRegionModel - CloudAutonomousVmClusters fwtypes.ListNestedObjectValueOf[cloudAutonomousVmClusterSummary] `tfsdk:"cloud_autonomous_vm_clusters"` -} - -type cloudAutonomousVmClusterSummary struct { - CloudExadataInfrastructureArn types.String `tfsdk:"arn"` - CloudAutonomousVmClusterId types.String `tfsdk:"id"` - OciUrl types.String `tfsdk:"oci_url"` - Ocid types.String `tfsdk:"ocid"` - DisplayName types.String `tfsdk:"display_name"` -} diff --git a/internal/service/odb/cloud_autonomous_vm_clusters_list_data_source_test.go b/internal/service/odb/cloud_autonomous_vm_clusters_list_data_source_test.go deleted file mode 100644 index 8ee9395f9557..000000000000 --- a/internal/service/odb/cloud_autonomous_vm_clusters_list_data_source_test.go +++ /dev/null @@ -1,101 +0,0 @@ -//Copyright © 2025, Oracle and/or its affiliates. All rights reserved. - -package odb_test - -import ( - "context" - "errors" - "fmt" - "strconv" - - "testing" - - "github.com/aws/aws-sdk-go-v2/service/odb" - - "github.com/hashicorp/terraform-plugin-testing/helper/resource" - "github.com/hashicorp/terraform-plugin-testing/terraform" - "github.com/hashicorp/terraform-provider-aws/internal/acctest" - "github.com/hashicorp/terraform-provider-aws/internal/conns" - "github.com/hashicorp/terraform-provider-aws/internal/create" - - tfodb "github.com/hashicorp/terraform-provider-aws/internal/service/odb" - "github.com/hashicorp/terraform-provider-aws/names" -) - -type listAVMCListDSTest struct { -} - -func TestAccListAutonomousVmClusterDataSource(t *testing.T) { - ctx := acctest.Context(t) - var avmcListTest = listAVMCListDSTest{} - var output odb.ListCloudAutonomousVmClustersOutput - - dataSourceName := "data.aws_odb_cloud_autonomous_vm_clusters_list.test" - resource.Test(t, resource.TestCase{ - PreCheck: func() { - acctest.PreCheck(ctx, t) - avmcListTest.testAccPreCheck(ctx, t) - }, - ErrorCheck: acctest.ErrorCheck(t, names.ODBServiceID), - ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, - Steps: []resource.TestStep{ - { - Config: avmcListTest.basic(), - Check: resource.ComposeAggregateTestCheckFunc( - - resource.ComposeTestCheckFunc(func(s *terraform.State) error { - avmcListTest.count(ctx, dataSourceName, &output) - resource.TestCheckResourceAttr(dataSourceName, "cloud_autonomous_vm_clusters.#", strconv.Itoa(len(output.CloudAutonomousVmClusters))) - return nil - }, - ), - ), - }, - }, - }) -} - -func (listAVMCListDSTest) basic() string { - config := fmt.Sprintf(` - - -data "aws_odb_cloud_autonomous_vm_clusters_list" "test" { - -} -`) - return config -} - -func (listAVMCListDSTest) count(ctx context.Context, name string, list *odb.ListCloudAutonomousVmClustersOutput) resource.TestCheckFunc { - return func(s *terraform.State) error { - rs, ok := s.RootModule().Resources[name] - if !ok { - return create.Error(names.ODB, create.ErrActionCheckingExistence, tfodb.ResNameCloudVmCluster, name, errors.New("not found")) - } - - conn := acctest.Provider.Meta().(*conns.AWSClient).ODBClient(ctx) - - resp, err := conn.ListCloudAutonomousVmClusters(ctx, &odb.ListCloudAutonomousVmClustersInput{}) - if err != nil { - return create.Error(names.ODB, create.ErrActionCheckingExistence, tfodb.ResNameCloudVmCluster, rs.Primary.ID, err) - } - - list.CloudAutonomousVmClusters = resp.CloudAutonomousVmClusters - - return nil - } -} -func (listAVMCListDSTest) testAccPreCheck(ctx context.Context, t *testing.T) { - conn := acctest.Provider.Meta().(*conns.AWSClient).ODBClient(ctx) - - input := &odb.ListCloudAutonomousVmClustersInput{} - - _, err := conn.ListCloudAutonomousVmClusters(ctx, input) - - if acctest.PreCheckSkipError(err) { - t.Skipf("skipping acceptance testing: %s", err) - } - if err != nil { - t.Fatalf("unexpected PreCheck error: %s", err) - } -} diff --git a/internal/service/odb/cloud_exadata_infrastructure.go b/internal/service/odb/cloud_exadata_infrastructure.go deleted file mode 100644 index 805aab905033..000000000000 --- a/internal/service/odb/cloud_exadata_infrastructure.go +++ /dev/null @@ -1,895 +0,0 @@ -//Copyright © 2025, Oracle and/or its affiliates. All rights reserved. - -package odb - -import ( - "context" - "errors" - "fmt" - "github.com/hashicorp/terraform-plugin-framework/attr" - "github.com/hashicorp/terraform-plugin-framework/resource/schema/int32planmodifier" - "github.com/hashicorp/terraform-plugin-framework/resource/schema/setplanmodifier" - "github.com/hashicorp/terraform-plugin-framework/types/basetypes" - "github.com/hashicorp/terraform-provider-aws/internal/enum" - "github.com/hashicorp/terraform-provider-aws/internal/framework/flex" - tftags "github.com/hashicorp/terraform-provider-aws/internal/tags" - "time" - - "github.com/aws/aws-sdk-go-v2/aws" - "github.com/aws/aws-sdk-go-v2/service/odb" - odbtypes "github.com/aws/aws-sdk-go-v2/service/odb/types" - "github.com/hashicorp/terraform-plugin-framework-timeouts/resource/timeouts" - - "github.com/hashicorp/terraform-plugin-framework/path" - "github.com/hashicorp/terraform-plugin-framework/resource" - "github.com/hashicorp/terraform-plugin-framework/resource/schema" - "github.com/hashicorp/terraform-plugin-framework/resource/schema/planmodifier" - "github.com/hashicorp/terraform-plugin-framework/resource/schema/stringplanmodifier" - - "github.com/hashicorp/terraform-plugin-framework/types" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" - "github.com/hashicorp/terraform-provider-aws/internal/conns" - "github.com/hashicorp/terraform-provider-aws/internal/create" - "github.com/hashicorp/terraform-provider-aws/internal/errs" - "github.com/hashicorp/terraform-provider-aws/internal/errs/fwdiag" - "github.com/hashicorp/terraform-provider-aws/internal/framework" - fwtypes "github.com/hashicorp/terraform-provider-aws/internal/framework/types" - "github.com/hashicorp/terraform-provider-aws/internal/sweep" - sweepfw "github.com/hashicorp/terraform-provider-aws/internal/sweep/framework" - "github.com/hashicorp/terraform-provider-aws/internal/tfresource" - "github.com/hashicorp/terraform-provider-aws/names" -) - -// Function annotations are used for resource registration to the Provider. DO NOT EDIT. -// @FrameworkResource("aws_odb_cloud_exadata_infrastructure", name="Cloud Exadata Infrastructure") -// @Tags(identifierAttribute="arn") -func newResourceCloudExadataInfrastructure(_ context.Context) (resource.ResourceWithConfigure, error) { - r := &resourceCloudExadataInfrastructure{} - - r.SetDefaultCreateTimeout(24 * time.Hour) - r.SetDefaultUpdateTimeout(24 * time.Hour) - r.SetDefaultDeleteTimeout(24 * time.Hour) - - return r, nil -} - -const ( - ResNameCloudExadataInfrastructure = "Cloud Exadata Infrastructure" - ExaInfraStorageServerTypeNotAvailable = "Storage_Server_Type_NA" - ExaInfraDBServerTypeNotAvailable = "DB_Server_Type_NA" -) - -var ResourceCloudExadataInfrastructure = newResourceCloudExadataInfrastructure - -type resourceCloudExadataInfrastructure struct { - framework.ResourceWithModel[cloudExadataInfrastructureResourceModel] - framework.WithTimeouts -} - -// For more about schema options, visit -// https://developer.hashicorp.com/terraform/plugin/framework/handling-data/schemas?page=schemas -func (r *resourceCloudExadataInfrastructure) Schema(ctx context.Context, req resource.SchemaRequest, resp *resource.SchemaResponse) { - statusType := fwtypes.StringEnumType[odbtypes.ResourceStatus]() - computeModelType := fwtypes.StringEnumType[odbtypes.ComputeModel]() - - resp.Schema = schema.Schema{ - Attributes: map[string]schema.Attribute{ - "activated_storage_count": schema.Int32Attribute{ - Computed: true, - Description: "The number of storage servers requested for the Exadata infrastructure", - }, - "additional_storage_count": schema.Int32Attribute{ - Computed: true, - Description: " The number of storage servers requested for the Exadata infrastructure", - }, - "database_server_type": schema.StringAttribute{ - Optional: true, - PlanModifiers: []planmodifier.String{ - stringplanmodifier.RequiresReplace(), - }, - Description: "The database server model type of the Exadata infrastructure. For the list of valid model names, use the ListDbSystemShapes operation", - }, - "database_server_type_computed": schema.StringAttribute{ - Computed: true, - Description: "The database server model type of the Exadata infrastructure. For the list of valid model names, use the ListDbSystemShapes operation", - }, - "storage_server_type": schema.StringAttribute{ - Optional: true, - PlanModifiers: []planmodifier.String{ - stringplanmodifier.RequiresReplace(), - }, - Description: "The storage server model type of the Exadata infrastructure. For the list of valid model names, use the ListDbSystemShapes operation", - }, - "storage_server_type_computed": schema.StringAttribute{ - Computed: true, - Description: "The storage server model type of the Exadata infrastructure. For the list of valid model names, use the ListDbSystemShapes operation", - }, - names.AttrARN: framework.ARNAttributeComputedOnly(), - names.AttrID: framework.IDAttribute(), - "available_storage_size_in_gbs": schema.Int32Attribute{ - Computed: true, - Description: "The amount of available storage, in gigabytes (GB), for the Exadata infrastructure", - }, - "availability_zone": schema.StringAttribute{ - Optional: true, - Computed: true, - PlanModifiers: []planmodifier.String{ - stringplanmodifier.RequiresReplace(), - stringplanmodifier.UseStateForUnknown(), - }, - Description: "The name of the Availability Zone (AZ) where the Exadata infrastructure is located. Changing this will force terraform to create new resource", - }, - "availability_zone_id": schema.StringAttribute{ - Required: true, - PlanModifiers: []planmodifier.String{ - stringplanmodifier.RequiresReplace(), - stringplanmodifier.UseStateForUnknown(), - }, - Description: " The AZ ID of the AZ where the Exadata infrastructure is located. Changing this will force terraform to create new resource", - }, - "compute_count": schema.Int32Attribute{ - Optional: true, - Computed: true, - PlanModifiers: []planmodifier.Int32{ - int32planmodifier.RequiresReplace(), - int32planmodifier.UseStateForUnknown(), - }, - Description: " The number of compute instances that the Exadata infrastructure is located", - }, - "cpu_count": schema.Int32Attribute{ - Computed: true, - Description: "The total number of CPU cores that are allocated to the Exadata infrastructure", - }, - "customer_contacts_to_send_to_oci": schema.SetAttribute{ - ElementType: types.StringType, - CustomType: fwtypes.SetOfStringType, - Optional: true, - PlanModifiers: []planmodifier.Set{ - setplanmodifier.RequiresReplace(), - setplanmodifier.UseStateForUnknown(), - }, - Description: "The email addresses of contacts to receive notification from Oracle about maintenance updates for the Exadata infrastructure. Changing this will force terraform to create new resource", - }, - "data_storage_size_in_tbs": schema.Float64Attribute{ - Computed: true, - Description: "The size of the Exadata infrastructure's data disk group, in terabytes (TB)", - }, - "db_node_storage_size_in_gbs": schema.Int32Attribute{ - Computed: true, - Description: "The size of the Exadata infrastructure's local node storage, in gigabytes (GB)", - }, - "db_server_version": schema.StringAttribute{ - Computed: true, - Description: "The software version of the database servers (dom0) in the Exadata infrastructure", - }, - "display_name": schema.StringAttribute{ - Required: true, - PlanModifiers: []planmodifier.String{ - stringplanmodifier.RequiresReplace(), - }, - Description: "The user-friendly name for the Exadata infrastructure. Changing this will force terraform to create a new resource", - }, - "last_maintenance_run_id": schema.StringAttribute{ - Computed: true, - Description: "The Oracle Cloud Identifier (OCID) of the last maintenance run for the Exadata infrastructure", - }, - "max_cpu_count": schema.Int32Attribute{ - Computed: true, - Description: "The total number of CPU cores available on the Exadata infrastructure", - }, - "max_data_storage_in_tbs": schema.Float64Attribute{ - Computed: true, - Description: "The total amount of data disk group storage, in terabytes (TB), that's available on the Exadata infrastructure", - }, - "max_db_node_storage_size_in_gbs": schema.Int32Attribute{ - Computed: true, - Description: "The total amount of local node storage, in gigabytes (GB), that's available on the Exadata infrastructure", - }, - "max_memory_in_gbs": schema.Int32Attribute{ - Computed: true, - Description: "The total amount of memory in gigabytes (GB) available on the Exadata infrastructure", - }, - "memory_size_in_gbs": schema.Int32Attribute{ - Computed: true, - Description: "The amount of memory, in gigabytes (GB), that's allocated on the Exadata infrastructure", - }, - "monthly_db_server_version": schema.StringAttribute{ - Computed: true, - Description: "The monthly software version of the database servers in the Exadata infrastructure", - }, - "monthly_storage_server_version": schema.StringAttribute{ - Computed: true, - Description: "The monthly software version of the storage servers installed on the Exadata infrastructure", - }, - "next_maintenance_run_id": schema.StringAttribute{ - Computed: true, - Description: "The OCID of the next maintenance run for the Exadata infrastructure", - }, - "ocid": schema.StringAttribute{ - Computed: true, - Description: "The OCID of the Exadata infrastructure", - }, - "oci_resource_anchor_name": schema.StringAttribute{ - Computed: true, - Description: "The name of the OCI resource anchor for the Exadata infrastructure", - }, - "oci_url": schema.StringAttribute{ - Computed: true, - Description: "The HTTPS link to the Exadata infrastructure in OCI", - }, - "percent_progress": schema.Float64Attribute{ - Computed: true, - Description: "The amount of progress made on the current operation on the Exadata infrastructure, expressed as a percentage", - }, - "shape": schema.StringAttribute{ - Required: true, - PlanModifiers: []planmodifier.String{ - stringplanmodifier.RequiresReplace(), - }, - Description: "The model name of the Exadata infrastructure. Changing this will force terraform to create new resource", - }, - "status": schema.StringAttribute{ - CustomType: statusType, - Computed: true, - Description: "The current status of the Exadata infrastructure", - }, - "status_reason": schema.StringAttribute{ - Computed: true, - Description: "Additional information about the status of the Exadata infrastructure", - }, - "storage_count": schema.Int32Attribute{ - Optional: true, - Computed: true, - PlanModifiers: []planmodifier.Int32{ - int32planmodifier.RequiresReplace(), - int32planmodifier.UseStateForUnknown(), - }, - Description: "TThe number of storage servers that are activated for the Exadata infrastructure", - }, - "storage_server_version": schema.StringAttribute{ - Computed: true, - Description: "The software version of the storage servers on the Exadata infrastructure.", - }, - names.AttrTags: tftags.TagsAttribute(), - names.AttrTagsAll: tftags.TagsAttributeComputedOnly(), - "total_storage_size_in_gbs": schema.Int32Attribute{ - Computed: true, - }, - "created_at": schema.StringAttribute{ - Computed: true, - Description: "The time when the Exadata infrastructure was created", - }, - "compute_model": schema.StringAttribute{ - CustomType: computeModelType, - Computed: true, - Description: fmt.Sprint("The OCI model compute model used when you create or clone an\n " + - " instance: ECPU or OCPU. An ECPU is an abstracted measure of\n " + - "compute resources. ECPUs are based on the number of cores\n " + - "elastically allocated from a pool of compute and storage servers.\n " + - " An OCPU is a legacy physical measure of compute resources. OCPUs\n " + - "are based on the physical core of a processor with\n " + - " hyper-threading enabled."), - }, - "maintenance_window": schema.ObjectAttribute{ - Required: true, - CustomType: fwtypes.NewObjectTypeOf[cloudExadataInfraMaintenanceWindowResourceModel](ctx), - Description: " The scheduling details for the maintenance window. Patching and system updates take place during the maintenance window ", - AttributeTypes: map[string]attr.Type{ - "custom_action_timeout_in_mins": types.Int32Type, - "days_of_week": types.SetType{ - ElemType: fwtypes.StringEnumType[odbtypes.DayOfWeekName](), - }, - "hours_of_day": types.SetType{ - ElemType: types.Int32Type, - }, - "is_custom_action_timeout_enabled": types.BoolType, - "lead_time_in_weeks": types.Int32Type, - "months": types.SetType{ - ElemType: fwtypes.StringEnumType[odbtypes.MonthName](), - }, - "patching_mode": fwtypes.StringEnumType[odbtypes.PatchingModeType](), - "preference": fwtypes.StringEnumType[odbtypes.PreferenceType](), - "weeks_of_month": types.SetType{ - ElemType: types.Int32Type, - }, - }, - }, - }, - Blocks: map[string]schema.Block{ - names.AttrTimeouts: timeouts.Block(ctx, timeouts.Opts{ - Create: true, - Update: true, - Delete: true, - }), - }, - } -} - -func (r *resourceCloudExadataInfrastructure) Create(ctx context.Context, req resource.CreateRequest, resp *resource.CreateResponse) { - conn := r.Meta().ODBClient(ctx) - - var plan cloudExadataInfrastructureResourceModel - - resp.Diagnostics.Append(req.Plan.Get(ctx, &plan)...) - if resp.Diagnostics.HasError() { - return - } - - input := odb.CreateCloudExadataInfrastructureInput{ - Tags: getTagsIn(ctx), - MaintenanceWindow: r.expandMaintenanceWindow(ctx, plan.MaintenanceWindow), - } - - if !plan.CustomerContactsToSendToOCI.IsNull() && !plan.CustomerContactsToSendToOCI.IsUnknown() { - input.CustomerContactsToSendToOCI = r.expandCustomerContacts(ctx, plan.CustomerContactsToSendToOCI) - } - - resp.Diagnostics.Append(flex.Expand(ctx, plan, &input)...) - if resp.Diagnostics.HasError() { - return - } - - out, err := conn.CreateCloudExadataInfrastructure(ctx, &input) - if err != nil { - resp.Diagnostics.AddError( - create.ProblemStandardMessage(names.ODB, create.ErrActionCreating, ResNameCloudExadataInfrastructure, plan.DisplayName.ValueString(), err), - err.Error(), - ) - return - } - if out == nil || out.CloudExadataInfrastructureId == nil { - resp.Diagnostics.AddError( - create.ProblemStandardMessage(names.ODB, create.ErrActionCreating, ResNameCloudExadataInfrastructure, plan.DisplayName.ValueString(), nil), - errors.New("empty output").Error(), - ) - return - } - - createTimeout := r.CreateTimeout(ctx, plan.Timeouts) - createdExaInfra, err := waitCloudExadataInfrastructureCreated(ctx, conn, *out.CloudExadataInfrastructureId, createTimeout) - if err != nil { - resp.Diagnostics.AddError( - create.ProblemStandardMessage(names.ODB, create.ErrActionWaitingForCreation, ResNameCloudExadataInfrastructure, plan.DisplayName.ValueString(), err), - err.Error(), - ) - return - } - - plan.CustomerContactsToSendToOCI = r.flattenCustomerContacts(createdExaInfra.CustomerContactsToSendToOCI) - plan.MaintenanceWindow = r.flattenMaintenanceWindow(ctx, createdExaInfra.MaintenanceWindow) - - plan.CreatedAt = types.StringValue(createdExaInfra.CreatedAt.Format(time.RFC3339)) - - if createdExaInfra.DatabaseServerType == nil { - plan.DatabaseServerTypeComputed = types.StringValue(ExaInfraDBServerTypeNotAvailable) - } else { - plan.DatabaseServerType = types.StringValue(*createdExaInfra.DatabaseServerType) - plan.DatabaseServerTypeComputed = types.StringValue(*createdExaInfra.DatabaseServerType) - } - if createdExaInfra.StorageServerType == nil { - plan.StorageServerTypeComputed = types.StringValue(ExaInfraStorageServerTypeNotAvailable) - } else { - plan.StorageServerType = types.StringValue(*createdExaInfra.StorageServerType) - plan.StorageServerTypeComputed = types.StringValue(*createdExaInfra.StorageServerType) - } - resp.Diagnostics.Append(flex.Flatten(ctx, createdExaInfra, &plan)...) - - if resp.Diagnostics.HasError() { - return - } - resp.Diagnostics.Append(resp.State.Set(ctx, plan)...) -} - -func (r *resourceCloudExadataInfrastructure) Read(ctx context.Context, req resource.ReadRequest, resp *resource.ReadResponse) { - conn := r.Meta().ODBClient(ctx) - var state cloudExadataInfrastructureResourceModel - resp.Diagnostics.Append(req.State.Get(ctx, &state)...) - if resp.Diagnostics.HasError() { - return - } - - out, err := FindOdbExadataInfraResourceByID(ctx, conn, state.CloudExadataInfrastructureId.ValueString()) - if tfresource.NotFound(err) { - resp.Diagnostics.Append(fwdiag.NewResourceNotFoundWarningDiagnostic(err)) - resp.State.RemoveResource(ctx) - return - } - if err != nil { - resp.Diagnostics.AddError( - create.ProblemStandardMessage(names.ODB, create.ErrActionReading, ResNameCloudExadataInfrastructure, state.CloudExadataInfrastructureId.String(), err), - err.Error(), - ) - return - } - - state.CustomerContactsToSendToOCI = r.flattenCustomerContacts(out.CustomerContactsToSendToOCI) - state.CreatedAt = types.StringValue(out.CreatedAt.Format(time.RFC3339)) - - state.MaintenanceWindow = r.flattenMaintenanceWindow(ctx, out.MaintenanceWindow) - - if out.DatabaseServerType == nil { - state.DatabaseServerTypeComputed = types.StringValue(ExaInfraDBServerTypeNotAvailable) - } else { - state.DatabaseServerType = types.StringValue(*out.DatabaseServerType) - state.DatabaseServerTypeComputed = types.StringValue(*out.DatabaseServerType) - } - if out.StorageServerType == nil { - state.StorageServerTypeComputed = types.StringValue(ExaInfraStorageServerTypeNotAvailable) - } else { - state.StorageServerType = types.StringValue(*out.StorageServerType) - state.StorageServerTypeComputed = types.StringValue(*out.StorageServerType) - } - resp.Diagnostics.Append(flex.Flatten(ctx, out, &state)...) - - if resp.Diagnostics.HasError() { - return - } - resp.Diagnostics.Append(resp.State.Set(ctx, &state)...) -} - -func (r *resourceCloudExadataInfrastructure) Update(ctx context.Context, req resource.UpdateRequest, resp *resource.UpdateResponse) { - - var plan, state cloudExadataInfrastructureResourceModel - resp.Diagnostics.Append(req.Plan.Get(ctx, &plan)...) - resp.Diagnostics.Append(req.State.Get(ctx, &state)...) - if resp.Diagnostics.HasError() { - return - } - conn := r.Meta().ODBClient(ctx) - - if !state.MaintenanceWindow.Equal(plan.MaintenanceWindow) { - - //we need to call update maintenance window - - updatedMW := odb.UpdateCloudExadataInfrastructureInput{ - CloudExadataInfrastructureId: plan.CloudExadataInfrastructureId.ValueStringPointer(), - MaintenanceWindow: r.expandMaintenanceWindow(ctx, plan.MaintenanceWindow), - } - - out, err := conn.UpdateCloudExadataInfrastructure(ctx, &updatedMW) - if err != nil { - resp.Diagnostics.AddError( - create.ProblemStandardMessage(names.ODB, create.ErrActionUpdating, ResNameCloudExadataInfrastructure, state.CloudExadataInfrastructureId.ValueString(), err), - err.Error(), - ) - return - } - if out == nil { - resp.Diagnostics.AddError( - create.ProblemStandardMessage(names.ODB, create.ErrActionUpdating, ResNameCloudExadataInfrastructure, state.CloudExadataInfrastructureId.ValueString(), err), - err.Error(), - ) - return - } - - } - - updateTimeout := r.UpdateTimeout(ctx, plan.Timeouts) - updatedExaInfra, err := waitCloudExadataInfrastructureUpdated(ctx, conn, state.CloudExadataInfrastructureId.ValueString(), updateTimeout) - if err != nil { - resp.Diagnostics.AddError( - create.ProblemStandardMessage(names.ODB, create.ErrActionWaitingForUpdate, ResNameCloudExadataInfrastructure, state.CloudExadataInfrastructureId.ValueString(), err), - err.Error(), - ) - return - } - plan.CustomerContactsToSendToOCI = r.flattenCustomerContacts(updatedExaInfra.CustomerContactsToSendToOCI) - plan.CreatedAt = types.StringValue(updatedExaInfra.CreatedAt.Format(time.RFC3339)) - plan.MaintenanceWindow = r.flattenMaintenanceWindow(ctx, updatedExaInfra.MaintenanceWindow) - if updatedExaInfra.DatabaseServerType == nil { - plan.DatabaseServerTypeComputed = types.StringValue(ExaInfraDBServerTypeNotAvailable) - } else { - plan.DatabaseServerType = types.StringValue(*updatedExaInfra.DatabaseServerType) - plan.DatabaseServerTypeComputed = types.StringValue(*updatedExaInfra.DatabaseServerType) - } - if updatedExaInfra.StorageServerType == nil { - plan.StorageServerTypeComputed = types.StringValue(ExaInfraStorageServerTypeNotAvailable) - } else { - plan.StorageServerType = types.StringValue(*updatedExaInfra.StorageServerType) - plan.StorageServerTypeComputed = types.StringValue(*updatedExaInfra.StorageServerType) - } - - resp.Diagnostics.Append(flex.Flatten(ctx, updatedExaInfra, &plan)...) - - resp.Diagnostics.Append(resp.State.Set(ctx, &plan)...) - -} - -func (r *resourceCloudExadataInfrastructure) Delete(ctx context.Context, req resource.DeleteRequest, resp *resource.DeleteResponse) { - conn := r.Meta().ODBClient(ctx) - - var state cloudExadataInfrastructureResourceModel - resp.Diagnostics.Append(req.State.Get(ctx, &state)...) - if resp.Diagnostics.HasError() { - return - } - - input := odb.DeleteCloudExadataInfrastructureInput{ - CloudExadataInfrastructureId: state.CloudExadataInfrastructureId.ValueStringPointer(), - } - - _, err := conn.DeleteCloudExadataInfrastructure(ctx, &input) - if err != nil { - if errs.IsA[*odbtypes.ResourceNotFoundException](err) { - return - } - - resp.Diagnostics.AddError( - create.ProblemStandardMessage(names.ODB, create.ErrActionDeleting, ResNameCloudExadataInfrastructure, state.CloudExadataInfrastructureId.String(), err), - err.Error(), - ) - return - } - - deleteTimeout := r.DeleteTimeout(ctx, state.Timeouts) - _, err = waitCloudExadataInfrastructureDeleted(ctx, conn, state.CloudExadataInfrastructureId.ValueString(), deleteTimeout) - if err != nil { - resp.Diagnostics.AddError( - create.ProblemStandardMessage(names.ODB, create.ErrActionWaitingForDeletion, ResNameCloudExadataInfrastructure, state.CloudExadataInfrastructureId.String(), err), - err.Error(), - ) - return - } -} - -func (r *resourceCloudExadataInfrastructure) ImportState(ctx context.Context, req resource.ImportStateRequest, resp *resource.ImportStateResponse) { - resource.ImportStatePassthroughID(ctx, path.Root("id"), req, resp) -} - -func waitCloudExadataInfrastructureCreated(ctx context.Context, conn *odb.Client, id string, timeout time.Duration) (*odbtypes.CloudExadataInfrastructure, error) { - stateConf := &retry.StateChangeConf{ - Pending: enum.Slice(odbtypes.ResourceStatusProvisioning), - Target: enum.Slice(odbtypes.ResourceStatusAvailable, odbtypes.ResourceStatusFailed), - Refresh: statusCloudExadataInfrastructure(ctx, conn, id), - PollInterval: 1 * time.Minute, - Timeout: timeout, - } - - outputRaw, err := stateConf.WaitForStateContext(ctx) - if out, ok := outputRaw.(*odbtypes.CloudExadataInfrastructure); ok { - return out, err - } - return nil, err -} - -func waitCloudExadataInfrastructureUpdated(ctx context.Context, conn *odb.Client, id string, timeout time.Duration) (*odbtypes.CloudExadataInfrastructure, error) { - stateConf := &retry.StateChangeConf{ - Pending: enum.Slice(odbtypes.ResourceStatusUpdating), - Target: enum.Slice(odbtypes.ResourceStatusAvailable, odbtypes.ResourceStatusFailed), - Refresh: statusCloudExadataInfrastructure(ctx, conn, id), - PollInterval: 1 * time.Minute, - Timeout: timeout, - } - - outputRaw, err := stateConf.WaitForStateContext(ctx) - if out, ok := outputRaw.(*odbtypes.CloudExadataInfrastructure); ok { - return out, err - } - - return nil, err -} - -func waitCloudExadataInfrastructureDeleted(ctx context.Context, conn *odb.Client, id string, timeout time.Duration) (*odbtypes.CloudExadataInfrastructure, error) { - stateConf := &retry.StateChangeConf{ - Pending: enum.Slice(odbtypes.ResourceStatusTerminating), - Target: []string{}, - Refresh: statusCloudExadataInfrastructure(ctx, conn, id), - Timeout: timeout, - } - - outputRaw, err := stateConf.WaitForStateContext(ctx) - if out, ok := outputRaw.(*odbtypes.CloudExadataInfrastructure); ok { - return out, err - } - - return nil, err -} - -func statusCloudExadataInfrastructure(ctx context.Context, conn *odb.Client, id string) retry.StateRefreshFunc { - return func() (any, string, error) { - out, err := FindOdbExadataInfraResourceByID(ctx, conn, id) - if tfresource.NotFound(err) { - return nil, "", nil - } - - if err != nil { - return nil, "", err - } - - return out, string(out.Status), nil - } -} -func (r *resourceCloudExadataInfrastructure) expandCustomerContacts(ctx context.Context, contactsList fwtypes.SetValueOf[types.String]) []odbtypes.CustomerContact { - if contactsList.IsNull() || contactsList.IsUnknown() { - return nil - } - - var contacts []types.String - - contactsList.ElementsAs(ctx, &contacts, false) - - result := make([]odbtypes.CustomerContact, 0, len(contacts)) - for _, element := range contacts { - result = append(result, odbtypes.CustomerContact{ - Email: element.ValueStringPointer(), - }) - } - - return result -} - -func (r *resourceCloudExadataInfrastructure) flattenCustomerContacts(contacts []odbtypes.CustomerContact) fwtypes.SetValueOf[types.String] { - if len(contacts) == 0 { - return fwtypes.SetValueOf[types.String]{ - SetValue: basetypes.NewSetNull(types.StringType), - } - } - - elements := make([]attr.Value, 0, len(contacts)) - for _, contact := range contacts { - if contact.Email != nil { - stringValue := types.StringValue(*contact.Email) - elements = append(elements, stringValue) - } - } - - list, _ := basetypes.NewSetValue(types.StringType, elements) - - return fwtypes.SetValueOf[types.String]{ - SetValue: list, - } -} - -func FindOdbExadataInfraResourceByID(ctx context.Context, conn *odb.Client, id string) (*odbtypes.CloudExadataInfrastructure, error) { - input := odb.GetCloudExadataInfrastructureInput{ - CloudExadataInfrastructureId: aws.String(id), - } - - out, err := conn.GetCloudExadataInfrastructure(ctx, &input) - if err != nil { - if errs.IsA[*odbtypes.ResourceNotFoundException](err) { - return nil, &retry.NotFoundError{ - LastError: err, - LastRequest: &input, - } - } - - return nil, err - } - - if out == nil || out.CloudExadataInfrastructure == nil { - return nil, tfresource.NewEmptyResultError(&input) - } - - return out.CloudExadataInfrastructure, nil -} -func (r *resourceCloudExadataInfrastructure) expandMaintenanceWindow(ctx context.Context, exaInfraMWResourceObj fwtypes.ObjectValueOf[cloudExadataInfraMaintenanceWindowResourceModel]) *odbtypes.MaintenanceWindow { - - var exaInfraMWResource cloudExadataInfraMaintenanceWindowResourceModel - - exaInfraMWResourceObj.As(ctx, &exaInfraMWResource, basetypes.ObjectAsOptions{ - UnhandledNullAsEmpty: true, - UnhandledUnknownAsEmpty: true, - }) - - var daysOfWeekNames []odbtypes.DayOfWeekName - exaInfraMWResource.DaysOfWeek.ElementsAs(ctx, &daysOfWeekNames, false) - daysOfWeek := make([]odbtypes.DayOfWeek, 0, len(daysOfWeekNames)) - - for _, dayOfWeek := range daysOfWeekNames { - daysOfWeek = append(daysOfWeek, odbtypes.DayOfWeek{ - Name: dayOfWeek, - }) - } - - var hoursOfTheDay []int32 - exaInfraMWResource.HoursOfDay.ElementsAs(ctx, &hoursOfTheDay, false) - - var monthNames []odbtypes.MonthName - exaInfraMWResource.Months.ElementsAs(ctx, &monthNames, false) - months := make([]odbtypes.Month, 0, len(monthNames)) - for _, month := range monthNames { - months = append(months, odbtypes.Month{ - Name: month, - }) - } - - var weeksOfMonth []int32 - exaInfraMWResource.WeeksOfMonth.ElementsAs(ctx, &weeksOfMonth, false) - odbTypeMW := odbtypes.MaintenanceWindow{ - CustomActionTimeoutInMins: exaInfraMWResource.CustomActionTimeoutInMins.ValueInt32Pointer(), - DaysOfWeek: daysOfWeek, - HoursOfDay: hoursOfTheDay, - IsCustomActionTimeoutEnabled: exaInfraMWResource.IsCustomActionTimeoutEnabled.ValueBoolPointer(), - LeadTimeInWeeks: exaInfraMWResource.LeadTimeInWeeks.ValueInt32Pointer(), - Months: months, - PatchingMode: exaInfraMWResource.PatchingMode.ValueEnum(), - Preference: exaInfraMWResource.Preference.ValueEnum(), - WeeksOfMonth: weeksOfMonth, - } - - if len(odbTypeMW.DaysOfWeek) == 0 { - odbTypeMW.DaysOfWeek = nil - } - if len(odbTypeMW.HoursOfDay) == 0 { - odbTypeMW.HoursOfDay = nil - } - if len(odbTypeMW.WeeksOfMonth) == 0 { - odbTypeMW.WeeksOfMonth = nil - } - if len(odbTypeMW.Months) == 0 { - odbTypeMW.Months = nil - } - if *odbTypeMW.LeadTimeInWeeks == 0 { - odbTypeMW.LeadTimeInWeeks = nil - } - - return &odbTypeMW -} - -func (r *resourceCloudExadataInfrastructure) flattenMaintenanceWindow(ctx context.Context, obdExaInfraMW *odbtypes.MaintenanceWindow) fwtypes.ObjectValueOf[cloudExadataInfraMaintenanceWindowResourceModel] { - //days of week - daysOfWeek := make([]attr.Value, 0, len(obdExaInfraMW.DaysOfWeek)) - for _, dayOfWeek := range obdExaInfraMW.DaysOfWeek { - dayOfWeekStringValue := fwtypes.StringEnumValue(dayOfWeek.Name).StringValue - daysOfWeek = append(daysOfWeek, dayOfWeekStringValue) - } - setValueOfDaysOfWeek, _ := basetypes.NewSetValue(types.StringType, daysOfWeek) - daysOfWeekRead := fwtypes.SetValueOf[fwtypes.StringEnum[odbtypes.DayOfWeekName]]{ - SetValue: setValueOfDaysOfWeek, - } - //hours of the day - hoursOfTheDay := make([]attr.Value, 0, len(obdExaInfraMW.HoursOfDay)) - for _, hourOfTheDay := range obdExaInfraMW.HoursOfDay { - daysOfWeekInt32Value := types.Int32Value(hourOfTheDay) - hoursOfTheDay = append(hoursOfTheDay, daysOfWeekInt32Value) - } - setValuesOfHoursOfTheDay, _ := basetypes.NewSetValue(types.Int32Type, hoursOfTheDay) - hoursOfTheDayRead := fwtypes.SetValueOf[types.Int64]{ - SetValue: setValuesOfHoursOfTheDay, - } - //months - months := make([]attr.Value, 0, len(obdExaInfraMW.Months)) - for _, month := range obdExaInfraMW.Months { - monthStringValue := fwtypes.StringEnumValue(month.Name).StringValue - months = append(months, monthStringValue) - } - setValuesOfMonth, _ := basetypes.NewSetValue(types.StringType, months) - monthsRead := fwtypes.SetValueOf[fwtypes.StringEnum[odbtypes.MonthName]]{ - SetValue: setValuesOfMonth, - } - //weeks of month - weeksOfMonth := make([]attr.Value, 0, len(obdExaInfraMW.WeeksOfMonth)) - for _, weekOfMonth := range obdExaInfraMW.WeeksOfMonth { - weeksOfMonthInt32Value := types.Int32Value(weekOfMonth) - weeksOfMonth = append(weeksOfMonth, weeksOfMonthInt32Value) - } - setValuesOfWeekOfMonth, _ := basetypes.NewSetValue(types.Int32Type, weeksOfMonth) - weeksOfMonthRead := fwtypes.SetValueOf[types.Int64]{ - SetValue: setValuesOfWeekOfMonth, - } - - flattenMW := cloudExadataInfraMaintenanceWindowResourceModel{ - CustomActionTimeoutInMins: types.Int32PointerValue(obdExaInfraMW.CustomActionTimeoutInMins), - DaysOfWeek: daysOfWeekRead, - HoursOfDay: hoursOfTheDayRead, - IsCustomActionTimeoutEnabled: types.BoolPointerValue(obdExaInfraMW.IsCustomActionTimeoutEnabled), - LeadTimeInWeeks: types.Int32PointerValue(obdExaInfraMW.LeadTimeInWeeks), - Months: monthsRead, - PatchingMode: fwtypes.StringEnumValue(obdExaInfraMW.PatchingMode), - Preference: fwtypes.StringEnumValue(obdExaInfraMW.Preference), - WeeksOfMonth: weeksOfMonthRead, - } - if obdExaInfraMW.LeadTimeInWeeks == nil { - flattenMW.LeadTimeInWeeks = types.Int32Value(0) - } - if obdExaInfraMW.CustomActionTimeoutInMins == nil { - flattenMW.CustomActionTimeoutInMins = types.Int32Value(0) - } - if obdExaInfraMW.IsCustomActionTimeoutEnabled == nil { - flattenMW.IsCustomActionTimeoutEnabled = types.BoolValue(false) - } - - result, _ := fwtypes.NewObjectValueOf[cloudExadataInfraMaintenanceWindowResourceModel](ctx, &flattenMW) - return result -} - -// See more: -// https://developer.hashicorp.com/terraform/plugin/framework/handling-data/accessing-values -type cloudExadataInfrastructureResourceModel struct { - framework.WithRegionModel - ActivatedStorageCount types.Int32 `tfsdk:"activated_storage_count"` - AdditionalStorageCount types.Int32 `tfsdk:"additional_storage_count"` - DatabaseServerType types.String `tfsdk:"database_server_type" autoflex:"-"` - DatabaseServerTypeComputed types.String `tfsdk:"database_server_type_computed" autoflex:"-"` - StorageServerType types.String `tfsdk:"storage_server_type" autoflex:"-"` - StorageServerTypeComputed types.String `tfsdk:"storage_server_type_computed" autoflex:"-"` - AvailabilityZone types.String `tfsdk:"availability_zone"` - AvailabilityZoneId types.String `tfsdk:"availability_zone_id"` - AvailableStorageSizeInGBs types.Int32 `tfsdk:"available_storage_size_in_gbs"` - CloudExadataInfrastructureArn types.String `tfsdk:"arn"` - CloudExadataInfrastructureId types.String `tfsdk:"id"` - ComputeCount types.Int32 `tfsdk:"compute_count"` - CpuCount types.Int32 `tfsdk:"cpu_count"` - CustomerContactsToSendToOCI fwtypes.SetValueOf[types.String] `tfsdk:"customer_contacts_to_send_to_oci" autoflex:"-"` - DataStorageSizeInTBs types.Float64 `tfsdk:"data_storage_size_in_tbs"` - DbNodeStorageSizeInGBs types.Int32 `tfsdk:"db_node_storage_size_in_gbs"` - DbServerVersion types.String `tfsdk:"db_server_version"` - DisplayName types.String `tfsdk:"display_name"` - LastMaintenanceRunId types.String `tfsdk:"last_maintenance_run_id"` - MaxCpuCount types.Int32 `tfsdk:"max_cpu_count"` - MaxDataStorageInTBs types.Float64 `tfsdk:"max_data_storage_in_tbs"` - MaxDbNodeStorageSizeInGBs types.Int32 `tfsdk:"max_db_node_storage_size_in_gbs"` - MaxMemoryInGBs types.Int32 `tfsdk:"max_memory_in_gbs"` - MemorySizeInGBs types.Int32 `tfsdk:"memory_size_in_gbs"` - MonthlyDbServerVersion types.String `tfsdk:"monthly_db_server_version"` - MonthlyStorageServerVersion types.String `tfsdk:"monthly_storage_server_version"` - NextMaintenanceRunId types.String `tfsdk:"next_maintenance_run_id"` - Ocid types.String `tfsdk:"ocid"` - OciResourceAnchorName types.String `tfsdk:"oci_resource_anchor_name"` - OciUrl types.String `tfsdk:"oci_url"` - PercentProgress types.Float64 `tfsdk:"percent_progress"` - Shape types.String `tfsdk:"shape"` - Status fwtypes.StringEnum[odbtypes.ResourceStatus] `tfsdk:"status"` - StatusReason types.String `tfsdk:"status_reason"` - StorageCount types.Int32 `tfsdk:"storage_count"` - StorageServerVersion types.String `tfsdk:"storage_server_version"` - TotalStorageSizeInGBs types.Int32 `tfsdk:"total_storage_size_in_gbs"` - Timeouts timeouts.Value `tfsdk:"timeouts"` - CreatedAt types.String `tfsdk:"created_at" autoflex:",noflatten"` - ComputeModel fwtypes.StringEnum[odbtypes.ComputeModel] `tfsdk:"compute_model"` - MaintenanceWindow fwtypes.ObjectValueOf[cloudExadataInfraMaintenanceWindowResourceModel] `tfsdk:"maintenance_window" autoflex:"-"` - Tags tftags.Map `tfsdk:"tags"` - TagsAll tftags.Map `tfsdk:"tags_all"` -} - -type cloudExadataInfraMaintenanceWindowResourceModel struct { - CustomActionTimeoutInMins types.Int32 `tfsdk:"custom_action_timeout_in_mins"` - DaysOfWeek fwtypes.SetValueOf[fwtypes.StringEnum[odbtypes.DayOfWeekName]] `tfsdk:"days_of_week"` - HoursOfDay fwtypes.SetValueOf[types.Int64] `tfsdk:"hours_of_day"` - IsCustomActionTimeoutEnabled types.Bool `tfsdk:"is_custom_action_timeout_enabled"` - LeadTimeInWeeks types.Int32 `tfsdk:"lead_time_in_weeks"` - Months fwtypes.SetValueOf[fwtypes.StringEnum[odbtypes.MonthName]] `tfsdk:"months"` - PatchingMode fwtypes.StringEnum[odbtypes.PatchingModeType] `tfsdk:"patching_mode"` - Preference fwtypes.StringEnum[odbtypes.PreferenceType] `tfsdk:"preference"` - WeeksOfMonth fwtypes.SetValueOf[types.Int64] `tfsdk:"weeks_of_month"` -} - -// TIP: ==== SWEEPERS ==== -// When acceptance testing resources, interrupted or failed tests may -// leave behind orphaned resources in an account. To facilitate cleaning -// up lingering resources, each resource implementation should include -// a corresponding "sweeper" function. -// -// The sweeper function lists all resources of a given type and sets the -// appropriate identifers required to delete the resource via the Delete -// method implemented above. -// -// Once the sweeper function is implemented, register it in sweep.go -// as follows: -// -// awsv2.Register("aws_odb_cloud_exadata_infrastructure", sweepCloudExadataInfrastructures) -// -// See more: -// https://hashicorp.github.io/terraform-provider-aws/running-and-writing-acceptance-tests/#acceptance-test-sweepers -func sweepCloudExadataInfrastructures(ctx context.Context, client *conns.AWSClient) ([]sweep.Sweepable, error) { - input := odb.ListCloudExadataInfrastructuresInput{} - conn := client.ODBClient(ctx) - var sweepResources []sweep.Sweepable - - pages := odb.NewListCloudExadataInfrastructuresPaginator(conn, &input) - for pages.HasMorePages() { - page, err := pages.NextPage(ctx) - if err != nil { - return nil, err - } - - for _, v := range page.CloudExadataInfrastructures { - sweepResources = append(sweepResources, sweepfw.NewSweepResource(newResourceCloudExadataInfrastructure, client, - sweepfw.NewAttribute(names.AttrID, aws.ToString(v.CloudExadataInfrastructureId))), - ) - } - } - - return sweepResources, nil -} diff --git a/internal/service/odb/cloud_exadata_infrastructure_data_source.go b/internal/service/odb/cloud_exadata_infrastructure_data_source.go deleted file mode 100644 index 5fb59a3fbf80..000000000000 --- a/internal/service/odb/cloud_exadata_infrastructure_data_source.go +++ /dev/null @@ -1,425 +0,0 @@ -//Copyright © 2025, Oracle and/or its affiliates. All rights reserved. - -package odb - -import ( - "context" - "github.com/hashicorp/terraform-plugin-framework/attr" - "github.com/hashicorp/terraform-plugin-framework/types/basetypes" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" - "github.com/hashicorp/terraform-provider-aws/internal/errs" - tftags "github.com/hashicorp/terraform-provider-aws/internal/tags" - "github.com/hashicorp/terraform-provider-aws/internal/tfresource" - "time" - - "github.com/aws/aws-sdk-go-v2/aws" - "github.com/aws/aws-sdk-go-v2/service/odb" - odbtypes "github.com/aws/aws-sdk-go-v2/service/odb/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/create" - "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/names" -) - -// Function annotations are used for datasource registration to the Provider. DO NOT EDIT. -// @FrameworkDataSource("aws_odb_cloud_exadata_infrastructure", name="Cloud Exadata Infrastructure") -func newDataSourceCloudExadataInfrastructure(context.Context) (datasource.DataSourceWithConfigure, error) { - return &dataSourceCloudExadataInfrastructure{}, nil -} - -const ( - DSNameCloudExadataInfrastructure = "Cloud Exadata Infrastructure Data Source" -) - -type dataSourceCloudExadataInfrastructure struct { - framework.DataSourceWithModel[cloudExadataInfrastructureDataSourceModel] -} - -func (d *dataSourceCloudExadataInfrastructure) Schema(ctx context.Context, req datasource.SchemaRequest, resp *datasource.SchemaResponse) { - statusType := fwtypes.StringEnumType[odbtypes.ResourceStatus]() - computeModelType := fwtypes.StringEnumType[odbtypes.ComputeModel]() - resp.Schema = schema.Schema{ - Attributes: map[string]schema.Attribute{ - "activated_storage_count": schema.Int32Attribute{ - Computed: true, - Description: "The number of storage servers requested for the Exadata infrastructure.", - }, - "additional_storage_count": schema.Int32Attribute{ - Computed: true, - Description: "The number of storage servers requested for the Exadata infrastructure.", - }, - "available_storage_size_in_gbs": schema.Int32Attribute{ - Computed: true, - Description: "The amount of available storage, in gigabytes (GB), for the Exadata infrastructure.", - }, - "availability_zone": schema.StringAttribute{ - Computed: true, - Description: "he name of the Availability Zone (AZ) where the Exadata infrastructure is located.", - }, - "availability_zone_id": schema.StringAttribute{ - Computed: true, - Description: "The AZ ID of the AZ where the Exadata infrastructure is located.", - }, - names.AttrARN: schema.StringAttribute{ - Computed: true, - Description: "The Amazon Resource Name (ARN) for the Exadata infrastructure.", - }, - names.AttrID: schema.StringAttribute{ - Required: true, - Description: "The unique identifier of the Exadata infrastructure.", - }, - "compute_count": schema.Int32Attribute{ - Computed: true, - Description: "The number of database servers for the Exadata infrastructure.", - }, - "cpu_count": schema.Int32Attribute{ - Computed: true, - Description: "The total number of CPU cores that are allocated to the Exadata infrastructure.", - }, - "data_storage_size_in_tbs": schema.Float64Attribute{ - Computed: true, - Description: "The size of the Exadata infrastructure's data disk group, in terabytes (TB).", - }, - "db_node_storage_size_in_gbs": schema.Int32Attribute{ - Computed: true, - Description: "The database server model type of the Exadata infrastructure. For the list of\n" + - "valid model names, use the ListDbSystemShapes operation.", - }, - "db_server_version": schema.StringAttribute{ - Computed: true, - Description: "The version of the Exadata infrastructure.", - }, - "display_name": schema.StringAttribute{ - Computed: true, - Description: "The display name of the Exadata infrastructure.", - }, - "last_maintenance_run_id": schema.StringAttribute{ - Computed: true, - Description: "The Oracle Cloud Identifier (OCID) of the last maintenance run for the Exadata infrastructure.", - }, - "max_cpu_count": schema.Int32Attribute{ - Computed: true, - Description: "The total number of CPU cores available on the Exadata infrastructure.", - }, - "max_data_storage_in_tbs": schema.Float64Attribute{ - Computed: true, - Description: "The total amount of data disk group storage, in terabytes (TB), that's available on the Exadata infrastructure.", - }, - "max_db_node_storage_size_in_gbs": schema.Int32Attribute{ - Computed: true, - Description: "The total amount of local node storage, in gigabytes (GB), that's available on the Exadata infrastructure.", - }, - "max_memory_in_gbs": schema.Int32Attribute{ - Computed: true, - Description: "The total amount of memory, in gigabytes (GB), that's available on the Exadata infrastructure.", - }, - "memory_size_in_gbs": schema.Int32Attribute{ - Computed: true, - Description: "The amount of memory, in gigabytes (GB), that's allocated on the Exadata infrastructure.", - }, - "monthly_db_server_version": schema.StringAttribute{ - Computed: true, - Description: "The monthly software version of the database servers installed on the Exadata infrastructure.", - }, - "monthly_storage_server_version": schema.StringAttribute{ - Computed: true, - Description: "The monthly software version of the storage servers installed on the Exadata infrastructure.", - }, - "next_maintenance_run_id": schema.StringAttribute{ - Computed: true, - Description: "The OCID of the next maintenance run for the Exadata infrastructure.", - }, - "oci_resource_anchor_name": schema.StringAttribute{ - Computed: true, - Description: "The name of the OCI resource anchor for the Exadata infrastructure.", - }, - "oci_url": schema.StringAttribute{ - Computed: true, - Description: "The HTTPS link to the Exadata infrastructure in OCI.", - }, - "ocid": schema.StringAttribute{ - Computed: true, - Description: "The OCID of the Exadata infrastructure in OCI.", - }, - "percent_progress": schema.Float64Attribute{ - Computed: true, - Description: "The amount of progress made on the current operation on the Exadata infrastructure expressed as a percentage.", - }, - "shape": schema.StringAttribute{ - Computed: true, - Description: "The model name of the Exadata infrastructure.", - }, - "status": schema.StringAttribute{ - CustomType: statusType, - Computed: true, - Description: "The status of the Exadata infrastructure.", - }, - "status_reason": schema.StringAttribute{ - Computed: true, - Description: "Additional information about the status of the Exadata infrastructure.", - }, - "storage_count": schema.Int32Attribute{ - Computed: true, - Description: "he number of storage servers that are activated for the Exadata infrastructure.", - }, - "storage_server_version": schema.StringAttribute{ - Computed: true, - Description: "The software version of the storage servers on the Exadata infrastructure.", - }, - "total_storage_size_in_gbs": schema.Int32Attribute{ - Computed: true, - Description: "The total amount of storage, in gigabytes (GB), on the the Exadata infrastructure.", - }, - "compute_model": schema.StringAttribute{ - CustomType: computeModelType, - Computed: true, - Description: "The OCI model compute model used when you create or clone an instance: ECPU or\n" + - "OCPU. An ECPU is an abstracted measure of compute resources. ECPUs are based on\n" + - "the number of cores elastically allocated from a pool of compute and storage\n" + - "servers. An OCPU is a legacy physical measure of compute resources. OCPUs are\n" + - "based on the physical core of a processor with hyper-threading enabled.", - }, - "created_at": schema.StringAttribute{ - Computed: true, - Description: "The time when the Exadata infrastructure was created.", - }, - "database_server_type": schema.StringAttribute{ - Computed: true, - Description: "The database server model type of the Exadata infrastructure. For the list of valid model names, use the ListDbSystemShapes operation.", - }, - "storage_server_type": schema.StringAttribute{ - Computed: true, - Description: "The storage server model type of the Exadata infrastructure. For the list of valid model names, use the ListDbSystemShapes operation.", - }, - names.AttrTags: tftags.TagsAttributeComputedOnly(), - "maintenance_window": schema.ObjectAttribute{ - Computed: true, - CustomType: fwtypes.NewObjectTypeOf[cloudExadataInfraMaintenanceWindowDataSourceModel](ctx), - Description: "The maintenance window for the Exadata infrastructure.", - AttributeTypes: map[string]attr.Type{ - "custom_action_timeout_in_mins": types.Int32Type, - "days_of_week": types.SetType{ - ElemType: fwtypes.StringEnumType[odbtypes.DayOfWeekName](), - }, - "hours_of_day": types.SetType{ - ElemType: types.Int32Type, - }, - "is_custom_action_timeout_enabled": types.BoolType, - "lead_time_in_weeks": types.Int32Type, - "months": types.SetType{ - ElemType: fwtypes.StringEnumType[odbtypes.MonthName](), - }, - "patching_mode": fwtypes.StringEnumType[odbtypes.PatchingModeType](), - "preference": fwtypes.StringEnumType[odbtypes.PreferenceType](), - "weeks_of_month": types.SetType{ - ElemType: types.Int32Type, - }, - }, - }, - }, - Blocks: map[string]schema.Block{ - "customer_contacts_to_send_to_oci": schema.SetNestedBlock{ - Description: "Customer contact emails to send to OCI.", - CustomType: fwtypes.NewSetNestedObjectTypeOf[customerContactDataSourceModel](ctx), - NestedObject: schema.NestedBlockObject{ - Attributes: map[string]schema.Attribute{ - "email": schema.StringAttribute{ - Computed: true, - }, - }, - }, - }, - }, - } -} - -func (d *dataSourceCloudExadataInfrastructure) Read(ctx context.Context, req datasource.ReadRequest, resp *datasource.ReadResponse) { - conn := d.Meta().ODBClient(ctx) - - var data cloudExadataInfrastructureDataSourceModel - resp.Diagnostics.Append(req.Config.Get(ctx, &data)...) - if resp.Diagnostics.HasError() { - return - } - - out, err := FindOdbExaDataInfraForDataSourceByID(ctx, conn, data.CloudExadataInfrastructureId.ValueString()) - if err != nil { - resp.Diagnostics.AddError( - create.ProblemStandardMessage(names.ODB, create.ErrActionReading, DSNameCloudExadataInfrastructure, data.CloudExadataInfrastructureId.String(), err), - err.Error(), - ) - return - } - tagsRead, err := listTags(ctx, conn, *out.CloudExadataInfrastructureArn) - if err != nil { - resp.Diagnostics.AddError( - create.ProblemStandardMessage(names.ODB, create.ErrActionReading, DSNameCloudExadataInfrastructure, data.CloudExadataInfrastructureId.String(), err), - err.Error(), - ) - return - } - if tagsRead != nil { - data.Tags = tftags.FlattenStringValueMap(ctx, tagsRead.Map()) - } - data.CreatedAt = types.StringValue(out.CreatedAt.Format(time.RFC3339)) - data.MaintenanceWindow = d.flattenMaintenanceWindow(ctx, out.MaintenanceWindow) - resp.Diagnostics.Append(flex.Flatten(ctx, out, &data)...) - if resp.Diagnostics.HasError() { - return - } - - resp.Diagnostics.Append(resp.State.Set(ctx, &data)...) -} - -func FindOdbExaDataInfraForDataSourceByID(ctx context.Context, conn *odb.Client, id string) (*odbtypes.CloudExadataInfrastructure, error) { - input := odb.GetCloudExadataInfrastructureInput{ - CloudExadataInfrastructureId: aws.String(id), - } - - out, err := conn.GetCloudExadataInfrastructure(ctx, &input) - if err != nil { - if errs.IsA[*odbtypes.ResourceNotFoundException](err) { - return nil, &retry.NotFoundError{ - LastError: err, - LastRequest: &input, - } - } - - return nil, err - } - - if out == nil || out.CloudExadataInfrastructure == nil { - return nil, tfresource.NewEmptyResultError(&input) - } - - return out.CloudExadataInfrastructure, nil -} - -func (d *dataSourceCloudExadataInfrastructure) flattenMaintenanceWindow(ctx context.Context, obdExaInfraMW *odbtypes.MaintenanceWindow) fwtypes.ObjectValueOf[cloudExadataInfraMaintenanceWindowDataSourceModel] { - //days of week - daysOfWeek := make([]attr.Value, 0, len(obdExaInfraMW.DaysOfWeek)) - for _, dayOfWeek := range obdExaInfraMW.DaysOfWeek { - dayOfWeekStringValue := fwtypes.StringEnumValue(dayOfWeek.Name).StringValue - daysOfWeek = append(daysOfWeek, dayOfWeekStringValue) - } - setValueOfDaysOfWeek, _ := basetypes.NewSetValue(types.StringType, daysOfWeek) - daysOfWeekRead := fwtypes.SetValueOf[fwtypes.StringEnum[odbtypes.DayOfWeekName]]{ - SetValue: setValueOfDaysOfWeek, - } - //hours of the day - hoursOfTheDay := make([]attr.Value, 0, len(obdExaInfraMW.HoursOfDay)) - for _, hourOfTheDay := range obdExaInfraMW.HoursOfDay { - daysOfWeekInt32Value := types.Int32Value(hourOfTheDay) - hoursOfTheDay = append(hoursOfTheDay, daysOfWeekInt32Value) - } - setValuesOfHoursOfTheDay, _ := basetypes.NewSetValue(types.Int32Type, hoursOfTheDay) - hoursOfTheDayRead := fwtypes.SetValueOf[types.Int64]{ - SetValue: setValuesOfHoursOfTheDay, - } - //months - months := make([]attr.Value, 0, len(obdExaInfraMW.Months)) - for _, month := range obdExaInfraMW.Months { - monthStringValue := fwtypes.StringEnumValue(month.Name).StringValue - months = append(months, monthStringValue) - } - setValuesOfMonth, _ := basetypes.NewSetValue(types.StringType, months) - monthsRead := fwtypes.SetValueOf[fwtypes.StringEnum[odbtypes.MonthName]]{ - SetValue: setValuesOfMonth, - } - //weeks of month - weeksOfMonth := make([]attr.Value, 0, len(obdExaInfraMW.WeeksOfMonth)) - for _, weekOfMonth := range obdExaInfraMW.WeeksOfMonth { - weeksOfMonthInt32Value := types.Int32Value(weekOfMonth) - weeksOfMonth = append(weeksOfMonth, weeksOfMonthInt32Value) - } - setValuesOfWeekOfMonth, _ := basetypes.NewSetValue(types.Int32Type, weeksOfMonth) - weeksOfMonthRead := fwtypes.SetValueOf[types.Int64]{ - SetValue: setValuesOfWeekOfMonth, - } - - flattenMW := cloudExadataInfraMaintenanceWindowDataSourceModel{ - CustomActionTimeoutInMins: types.Int32PointerValue(obdExaInfraMW.CustomActionTimeoutInMins), - DaysOfWeek: daysOfWeekRead, - HoursOfDay: hoursOfTheDayRead, - IsCustomActionTimeoutEnabled: types.BoolPointerValue(obdExaInfraMW.IsCustomActionTimeoutEnabled), - LeadTimeInWeeks: types.Int32PointerValue(obdExaInfraMW.LeadTimeInWeeks), - Months: monthsRead, - PatchingMode: fwtypes.StringEnumValue(obdExaInfraMW.PatchingMode), - Preference: fwtypes.StringEnumValue(obdExaInfraMW.Preference), - WeeksOfMonth: weeksOfMonthRead, - } - if obdExaInfraMW.LeadTimeInWeeks == nil { - flattenMW.LeadTimeInWeeks = types.Int32Value(0) - } - if obdExaInfraMW.CustomActionTimeoutInMins == nil { - flattenMW.CustomActionTimeoutInMins = types.Int32Value(0) - } - if obdExaInfraMW.IsCustomActionTimeoutEnabled == nil { - flattenMW.IsCustomActionTimeoutEnabled = types.BoolValue(false) - } - - result, _ := fwtypes.NewObjectValueOf[cloudExadataInfraMaintenanceWindowDataSourceModel](ctx, &flattenMW) - return result -} - -type cloudExadataInfrastructureDataSourceModel struct { - framework.WithRegionModel - ActivatedStorageCount types.Int32 `tfsdk:"activated_storage_count"` - AdditionalStorageCount types.Int32 `tfsdk:"additional_storage_count"` - AvailabilityZone types.String `tfsdk:"availability_zone"` - AvailabilityZoneId types.String `tfsdk:"availability_zone_id"` - AvailableStorageSizeInGBs types.Int32 `tfsdk:"available_storage_size_in_gbs"` - CloudExadataInfrastructureArn types.String `tfsdk:"arn"` - CloudExadataInfrastructureId types.String `tfsdk:"id"` - ComputeCount types.Int32 `tfsdk:"compute_count"` - CpuCount types.Int32 `tfsdk:"cpu_count"` - DataStorageSizeInTBs types.Float64 `tfsdk:"data_storage_size_in_tbs"` - DbNodeStorageSizeInGBs types.Int32 `tfsdk:"db_node_storage_size_in_gbs"` - DbServerVersion types.String `tfsdk:"db_server_version"` - DisplayName types.String `tfsdk:"display_name"` - LastMaintenanceRunId types.String `tfsdk:"last_maintenance_run_id"` - MaxCpuCount types.Int32 `tfsdk:"max_cpu_count"` - MaxDataStorageInTBs types.Float64 `tfsdk:"max_data_storage_in_tbs"` - MaxDbNodeStorageSizeInGBs types.Int32 `tfsdk:"max_db_node_storage_size_in_gbs"` - MaxMemoryInGBs types.Int32 `tfsdk:"max_memory_in_gbs"` - MemorySizeInGBs types.Int32 `tfsdk:"memory_size_in_gbs"` - MonthlyDbServerVersion types.String `tfsdk:"monthly_db_server_version"` - MonthlyStorageServerVersion types.String `tfsdk:"monthly_storage_server_version"` - NextMaintenanceRunId types.String `tfsdk:"next_maintenance_run_id"` - OciResourceAnchorName types.String `tfsdk:"oci_resource_anchor_name"` - OciUrl types.String `tfsdk:"oci_url"` - Ocid types.String `tfsdk:"ocid"` - PercentProgress types.Float64 `tfsdk:"percent_progress"` - Shape types.String `tfsdk:"shape"` - Status fwtypes.StringEnum[odbtypes.ResourceStatus] `tfsdk:"status"` - StatusReason types.String `tfsdk:"status_reason"` - StorageCount types.Int32 `tfsdk:"storage_count"` - StorageServerVersion types.String `tfsdk:"storage_server_version"` - TotalStorageSizeInGBs types.Int32 `tfsdk:"total_storage_size_in_gbs"` - CustomerContactsToSendToOCI fwtypes.SetNestedObjectValueOf[customerContactDataSourceModel] `tfsdk:"customer_contacts_to_send_to_oci"` - ComputeModel fwtypes.StringEnum[odbtypes.ComputeModel] `tfsdk:"compute_model"` - CreatedAt types.String `tfsdk:"created_at" autoflex:",noflatten"` - DatabaseServerType types.String `tfsdk:"database_server_type"` - StorageServerType types.String `tfsdk:"storage_server_type"` - MaintenanceWindow fwtypes.ObjectValueOf[cloudExadataInfraMaintenanceWindowDataSourceModel] `tfsdk:"maintenance_window" autoflex:",noflatten"` - Tags tftags.Map `tfsdk:"tags"` -} - -type cloudExadataInfraMaintenanceWindowDataSourceModel struct { - CustomActionTimeoutInMins types.Int32 `tfsdk:"custom_action_timeout_in_mins"` - DaysOfWeek fwtypes.SetValueOf[fwtypes.StringEnum[odbtypes.DayOfWeekName]] `tfsdk:"days_of_week"` - HoursOfDay fwtypes.SetValueOf[types.Int64] `tfsdk:"hours_of_day"` - IsCustomActionTimeoutEnabled types.Bool `tfsdk:"is_custom_action_timeout_enabled"` - LeadTimeInWeeks types.Int32 `tfsdk:"lead_time_in_weeks"` - Months fwtypes.SetValueOf[fwtypes.StringEnum[odbtypes.MonthName]] `tfsdk:"months"` - PatchingMode fwtypes.StringEnum[odbtypes.PatchingModeType] `tfsdk:"patching_mode"` - Preference fwtypes.StringEnum[odbtypes.PreferenceType] `tfsdk:"preference"` - WeeksOfMonth fwtypes.SetValueOf[types.Int64] `tfsdk:"weeks_of_month"` -} -type customerContactDataSourceModel struct { - Email types.String `tfsdk:"email"` -} diff --git a/internal/service/odb/cloud_exadata_infrastructure_data_source_test.go b/internal/service/odb/cloud_exadata_infrastructure_data_source_test.go deleted file mode 100644 index 28f0cb416572..000000000000 --- a/internal/service/odb/cloud_exadata_infrastructure_data_source_test.go +++ /dev/null @@ -1,107 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package odb_test - -import ( - "context" - "errors" - "fmt" - sdkacctest "github.com/hashicorp/terraform-plugin-testing/helper/acctest" - "github.com/hashicorp/terraform-plugin-testing/helper/resource" - "github.com/hashicorp/terraform-plugin-testing/terraform" - "github.com/hashicorp/terraform-provider-aws/internal/acctest" - "github.com/hashicorp/terraform-provider-aws/internal/conns" - "github.com/hashicorp/terraform-provider-aws/internal/create" - tfodb "github.com/hashicorp/terraform-provider-aws/internal/service/odb" - "github.com/hashicorp/terraform-provider-aws/internal/tfresource" - "github.com/hashicorp/terraform-provider-aws/names" - "testing" -) - -// Acceptance test access AWS and cost money to run. -func TestAccODBCloudExadataInfrastructureDataSource_basic(t *testing.T) { - ctx := acctest.Context(t) - if testing.Short() { - t.Skip("skipping long-running test in short mode") - } - exaInfraResource := "aws_odb_cloud_exadata_infrastructure.test" - exaInfraDataSource := "data.aws_odb_cloud_exadata_infrastructure.test" - displayNameSuffix := sdkacctest.RandomWithPrefix("tf_") - - resource.Test(t, resource.TestCase{ - PreCheck: func() { - acctest.PreCheck(ctx, t) - }, - ErrorCheck: acctest.ErrorCheck(t, names.ODBServiceID), - ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, - CheckDestroy: testAccCheckCloudExadataInfrastructureDestroy(ctx), - Steps: []resource.TestStep{ - { - Config: basicExaInfraDataSource(displayNameSuffix), - Check: resource.ComposeAggregateTestCheckFunc( - resource.TestCheckResourceAttrPair(exaInfraResource, "id", exaInfraDataSource, "id"), - resource.TestCheckResourceAttr(exaInfraDataSource, "shape", "Exadata.X9M"), - resource.TestCheckResourceAttr(exaInfraDataSource, "status", "AVAILABLE"), - resource.TestCheckResourceAttr(exaInfraDataSource, "storage_count", "3"), - resource.TestCheckResourceAttr(exaInfraDataSource, "compute_count", "2"), - ), - }, - }, - }) -} - -func testAccCheckCloudExadataInfrastructureDestroy(ctx context.Context) resource.TestCheckFunc { - return func(s *terraform.State) error { - conn := acctest.Provider.Meta().(*conns.AWSClient).ODBClient(ctx) - - for _, rs := range s.RootModule().Resources { - if rs.Type != "aws_odb_cloud_exadata_infrastructure" { - continue - } - _, err := tfodb.FindOdbExaDataInfraForDataSourceByID(ctx, conn, rs.Primary.ID) - if tfresource.NotFound(err) { - return nil - } - if err != nil { - return create.Error(names.ODB, create.ErrActionCheckingDestroyed, tfodb.ResNameCloudExadataInfrastructure, rs.Primary.ID, err) - } - - return create.Error(names.ODB, create.ErrActionCheckingDestroyed, tfodb.ResNameCloudExadataInfrastructure, rs.Primary.ID, errors.New("not destroyed")) - } - - return nil - } -} - -func basicExaInfraDataSource(displayNameSuffix string) string { - - testData := fmt.Sprintf(` - - -resource "aws_odb_cloud_exadata_infrastructure" "test" { - display_name = "Ofake_exa_%[1]s" - shape = "Exadata.X9M" - storage_count = 3 - compute_count = 2 - availability_zone_id = "use1-az6" - customer_contacts_to_send_to_oci = ["abc@example.com"] -maintenance_window = { - custom_action_timeout_in_mins = 16 - days_of_week = [] - hours_of_day = [] - is_custom_action_timeout_enabled = true - lead_time_in_weeks = 0 - months = [] - patching_mode = "ROLLING" - preference = "NO_PREFERENCE" - weeks_of_month =[] - } -} - -data "aws_odb_cloud_exadata_infrastructure" "test" { - id = aws_odb_cloud_exadata_infrastructure.test.id -} -`, displayNameSuffix) - return testData -} diff --git a/internal/service/odb/cloud_exadata_infrastructure_test.go b/internal/service/odb/cloud_exadata_infrastructure_test.go deleted file mode 100644 index 4726d9f88372..000000000000 --- a/internal/service/odb/cloud_exadata_infrastructure_test.go +++ /dev/null @@ -1,460 +0,0 @@ -//Copyright © 2025, Oracle and/or its affiliates. All rights reserved. - -package odb_test - -import ( - "context" - "errors" - "fmt" - odbtypes "github.com/aws/aws-sdk-go-v2/service/odb/types" - "github.com/hashicorp/terraform-plugin-testing/terraform" - "github.com/hashicorp/terraform-provider-aws/internal/create" - tfodb "github.com/hashicorp/terraform-provider-aws/internal/service/odb" - "github.com/hashicorp/terraform-provider-aws/internal/tfresource" - "strings" - "testing" - - "github.com/aws/aws-sdk-go-v2/service/odb" - sdkacctest "github.com/hashicorp/terraform-plugin-testing/helper/acctest" - "github.com/hashicorp/terraform-plugin-testing/helper/resource" - "github.com/hashicorp/terraform-provider-aws/internal/acctest" - "github.com/hashicorp/terraform-provider-aws/internal/conns" - "github.com/hashicorp/terraform-provider-aws/names" -) - -// Acceptance test access AWS and cost money to run. - -type cloudExaDataInfraResourceTest struct { - displayNamePrefix string -} - -var exaInfraTestResource = cloudExaDataInfraResourceTest{ - displayNamePrefix: "Ofake-exa", -} - -func TestAccODBCloudExadataInfrastructureCreate_basic(t *testing.T) { - ctx := acctest.Context(t) - - if testing.Short() { - t.Skip("skipping long-running test in short mode") - } - - var cloudExaDataInfrastructure odbtypes.CloudExadataInfrastructure - resourceName := "aws_odb_cloud_exadata_infrastructure.test" - rName := sdkacctest.RandomWithPrefix(exaInfraTestResource.displayNamePrefix) - resource.ParallelTest(t, resource.TestCase{ - PreCheck: func() { - acctest.PreCheck(ctx, t) - exaInfraTestResource.testAccPreCheck(ctx, t) - }, - ErrorCheck: acctest.ErrorCheck(t, names.ODBServiceID), - ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, - CheckDestroy: exaInfraTestResource.testAccCheckCloudExaDataInfraDestroyed(ctx), - Steps: []resource.TestStep{ - { - Config: exaInfraTestResource.exaDataInfraResourceBasicConfig(rName), - Check: resource.ComposeAggregateTestCheckFunc( - exaInfraTestResource.testAccCheckCloudExadataInfrastructureExists(ctx, resourceName, &cloudExaDataInfrastructure), - ), - }, - { - ResourceName: resourceName, - ImportState: true, - ImportStateVerify: true, - }, - }, - }) -} -func TestAccODBCloudExadataInfrastructureCreateWithAllParameters(t *testing.T) { - ctx := acctest.Context(t) - - if testing.Short() { - t.Skip("skipping long-running test in short mode") - } - - var cloudExaDataInfrastructure odbtypes.CloudExadataInfrastructure - resourceName := "aws_odb_cloud_exadata_infrastructure.test" - rName := sdkacctest.RandomWithPrefix(exaInfraTestResource.displayNamePrefix) - resource.ParallelTest(t, resource.TestCase{ - PreCheck: func() { - acctest.PreCheck(ctx, t) - exaInfraTestResource.testAccPreCheck(ctx, t) - }, - ErrorCheck: acctest.ErrorCheck(t, names.ODBServiceID), - ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, - CheckDestroy: exaInfraTestResource.testAccCheckCloudExaDataInfraDestroyed(ctx), - Steps: []resource.TestStep{ - { - Config: exaInfraTestResource.exaDataInfraResourceWithAllConfig(rName), - Check: resource.ComposeAggregateTestCheckFunc( - exaInfraTestResource.testAccCheckCloudExadataInfrastructureExists(ctx, resourceName, &cloudExaDataInfrastructure), - ), - }, - { - ResourceName: resourceName, - ImportState: true, - ImportStateVerify: true, - }, - }, - }) -} - -func TestAccODBCloudExadataInfrastructureTagging(t *testing.T) { - ctx := acctest.Context(t) - if testing.Short() { - t.Skip("skipping long-running test in short mode") - } - - var cloudExaDataInfrastructure1 odbtypes.CloudExadataInfrastructure - var cloudExaDataInfrastructure2 odbtypes.CloudExadataInfrastructure - var cloudExaDataInfrastructure3 odbtypes.CloudExadataInfrastructure - resourceName := "aws_odb_cloud_exadata_infrastructure.test" - rName := sdkacctest.RandomWithPrefix(exaInfraTestResource.displayNamePrefix) - resource.Test(t, resource.TestCase{ - PreCheck: func() { - acctest.PreCheck(ctx, t) - //testAccPreCheck(ctx, t) - }, - ErrorCheck: acctest.ErrorCheck(t, names.ODBServiceID), - ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, - CheckDestroy: exaInfraTestResource.testAccCheckCloudExaDataInfraDestroyed(ctx), - Steps: []resource.TestStep{ - { - Config: exaInfraTestResource.exaDataInfraResourceBasicConfig(rName), - Check: resource.ComposeAggregateTestCheckFunc( - exaInfraTestResource.testAccCheckCloudExadataInfrastructureExists(ctx, resourceName, &cloudExaDataInfrastructure1), - resource.TestCheckResourceAttr(resourceName, "tags.%", "0"), - ), - }, - { - ResourceName: resourceName, - ImportState: true, - ImportStateVerify: true, - }, - { - Config: exaInfraTestResource.exaDataInfraResourceBasicConfigAddTags(rName), - Check: resource.ComposeAggregateTestCheckFunc( - exaInfraTestResource.testAccCheckCloudExadataInfrastructureExists(ctx, resourceName, &cloudExaDataInfrastructure2), - resource.ComposeTestCheckFunc(func(state *terraform.State) error { - if strings.Compare(*(cloudExaDataInfrastructure1.CloudExadataInfrastructureId), *(cloudExaDataInfrastructure2.CloudExadataInfrastructureId)) != 0 { - return errors.New("Should not create a new cloud exa basicExaInfraDataSource after update") - } - return nil - }), - resource.TestCheckResourceAttr(resourceName, "tags.%", "1"), - resource.TestCheckResourceAttr(resourceName, "tags.env", "dev"), - ), - }, - { - ResourceName: resourceName, - ImportState: true, - ImportStateVerify: true, - }, - { - Config: exaInfraTestResource.exaDataInfraResourceBasicConfigRemoveTags(rName), - Check: resource.ComposeAggregateTestCheckFunc( - exaInfraTestResource.testAccCheckCloudExadataInfrastructureExists(ctx, resourceName, &cloudExaDataInfrastructure3), - resource.ComposeTestCheckFunc(func(state *terraform.State) error { - if strings.Compare(*(cloudExaDataInfrastructure1.CloudExadataInfrastructureId), *(cloudExaDataInfrastructure3.CloudExadataInfrastructureId)) != 0 { - return errors.New("Should not create a new cloud exa basicExaInfraDataSource after update") - } - return nil - }), - resource.TestCheckResourceAttr(resourceName, "tags.%", "0"), - ), - }, - { - ResourceName: resourceName, - ImportState: true, - ImportStateVerify: true, - }, - }, - }) -} - -func TestAccODBCloudExadataUpdateMaintenanceWindow(t *testing.T) { - ctx := acctest.Context(t) - if testing.Short() { - t.Skip("skipping long-running test in short mode") - } - - var cloudExaDataInfrastructure1 odbtypes.CloudExadataInfrastructure - var cloudExaDataInfrastructure2 odbtypes.CloudExadataInfrastructure - resourceName := "aws_odb_cloud_exadata_infrastructure.test" - rName := sdkacctest.RandomWithPrefix(exaInfraTestResource.displayNamePrefix) - resource.Test(t, resource.TestCase{ - PreCheck: func() { - acctest.PreCheck(ctx, t) - //testAccPreCheck(ctx, t) - }, - ErrorCheck: acctest.ErrorCheck(t, names.ODBServiceID), - ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, - CheckDestroy: exaInfraTestResource.testAccCheckCloudExaDataInfraDestroyed(ctx), - Steps: []resource.TestStep{ - { - Config: exaInfraTestResource.exaDataInfraResourceBasicConfig(rName), - Check: resource.ComposeAggregateTestCheckFunc( - exaInfraTestResource.testAccCheckCloudExadataInfrastructureExists(ctx, resourceName, &cloudExaDataInfrastructure1), - resource.TestCheckResourceAttr(resourceName, "maintenance_window.preference", "NO_PREFERENCE"), - ), - }, - { - ResourceName: resourceName, - ImportState: true, - ImportStateVerify: true, - }, - { - Config: exaInfraTestResource.basicWithCustomMaintenanceWindow(rName), - Check: resource.ComposeAggregateTestCheckFunc( - exaInfraTestResource.testAccCheckCloudExadataInfrastructureExists(ctx, resourceName, &cloudExaDataInfrastructure2), - resource.ComposeTestCheckFunc(func(state *terraform.State) error { - if strings.Compare(*(cloudExaDataInfrastructure1.CloudExadataInfrastructureId), *(cloudExaDataInfrastructure2.CloudExadataInfrastructureId)) != 0 { - return errors.New("Should not create a new cloud exa basicExaInfraDataSource after update") - } - return nil - }), - resource.TestCheckResourceAttr(resourceName, "maintenance_window.preference", "CUSTOM_PREFERENCE"), - ), - }, - { - ResourceName: resourceName, - ImportState: true, - ImportStateVerify: true, - }, - }, - }) -} - -func TestAccODBCloudExadataInfrastructure_disappears(t *testing.T) { - ctx := acctest.Context(t) - if testing.Short() { - t.Skip("skipping long-running test in short mode") - } - - var cloudExaDataInfrastructure odbtypes.CloudExadataInfrastructure - - rName := sdkacctest.RandomWithPrefix("") - resourceName := "aws_odb_cloud_exadata_infrastructure.test" - - resource.ParallelTest(t, resource.TestCase{ - PreCheck: func() { - acctest.PreCheck(ctx, t) - //testAccPreCheck(ctx, t) - }, - ErrorCheck: acctest.ErrorCheck(t, names.ODBServiceID), - ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, - CheckDestroy: exaInfraTestResource.testAccCheckCloudExaDataInfraDestroyed(ctx), - Steps: []resource.TestStep{ - { - Config: exaInfraTestResource.exaDataInfraResourceBasicConfig(rName), - Check: resource.ComposeTestCheckFunc( - exaInfraTestResource.testAccCheckCloudExadataInfrastructureExists(ctx, resourceName, &cloudExaDataInfrastructure), - acctest.CheckFrameworkResourceDisappears(ctx, acctest.Provider, tfodb.ResourceCloudExadataInfrastructure, resourceName), - ), - ExpectNonEmptyPlan: true, - }, - }, - }) -} - -func (cloudExaDataInfraResourceTest) testAccCheckCloudExaDataInfraDestroyed(ctx context.Context) resource.TestCheckFunc { - return func(s *terraform.State) error { - conn := acctest.Provider.Meta().(*conns.AWSClient).ODBClient(ctx) - - for _, rs := range s.RootModule().Resources { - if rs.Type != "aws_odb_cloud_exadata_infrastructure" { - continue - } - _, err := tfodb.FindOdbExadataInfraResourceByID(ctx, conn, rs.Primary.ID) - if tfresource.NotFound(err) { - return nil - } - if err != nil { - return create.Error(names.ODB, create.ErrActionCheckingDestroyed, tfodb.ResNameCloudExadataInfrastructure, rs.Primary.ID, err) - } - - return create.Error(names.ODB, create.ErrActionCheckingDestroyed, tfodb.ResNameCloudExadataInfrastructure, rs.Primary.ID, errors.New("not destroyed")) - } - - return nil - } -} - -func (cloudExaDataInfraResourceTest) testAccCheckCloudExadataInfrastructureExists(ctx context.Context, name string, cloudExadataInfrastructure *odbtypes.CloudExadataInfrastructure) resource.TestCheckFunc { - return func(s *terraform.State) error { - rs, ok := s.RootModule().Resources[name] - if !ok { - return create.Error(names.ODB, create.ErrActionCheckingExistence, tfodb.ResNameCloudExadataInfrastructure, name, errors.New("not found")) - } - - if rs.Primary.ID == "" { - return create.Error(names.ODB, create.ErrActionCheckingExistence, tfodb.ResNameCloudExadataInfrastructure, name, errors.New("not set")) - } - - conn := acctest.Provider.Meta().(*conns.AWSClient).ODBClient(ctx) - - resp, err := tfodb.FindOdbExadataInfraResourceByID(ctx, conn, rs.Primary.ID) - if err != nil { - return create.Error(names.ODB, create.ErrActionCheckingExistence, tfodb.ResNameCloudExadataInfrastructure, rs.Primary.ID, err) - } - - *cloudExadataInfrastructure = *resp - - return nil - } -} - -func (cloudExaDataInfraResourceTest) testAccPreCheck(ctx context.Context, t *testing.T) { - conn := acctest.Provider.Meta().(*conns.AWSClient).ODBClient(ctx) - - input := &odb.ListCloudExadataInfrastructuresInput{} - - _, err := conn.ListCloudExadataInfrastructures(ctx, input) - - if acctest.PreCheckSkipError(err) { - t.Skipf("skipping acceptance testing: %s", err) - } - if err != nil { - t.Fatalf("unexpected PreCheck error: %s", err) - } -} - -/* - func testAccCheckCloudExadataInfrastructureNotRecreated(before, after *odb.DescribeCloudExadataInfrastructureResponse) resource.TestCheckFunc { - return func(s *terraform.State) error { - if before, after := aws.ToString(before.CloudExadataInfrastructureId), aws.ToString(after.CloudExadataInfrastructureId); before != after { - return create.Error(names.ODB, create.ErrActionCheckingNotRecreated, tfodb.ResNameCloudExadataInfrastructure, aws.ToString(before.CloudExadataInfrastructureId), errors.New("recreated")) - } - - return nil - } - } -*/ -func (cloudExaDataInfraResourceTest) exaDataInfraResourceWithAllConfig(randomId string) string { - exaDataInfra := fmt.Sprintf(` - -resource "aws_odb_cloud_exadata_infrastructure" "test" { - display_name = %[1]q - shape = "Exadata.X11M" - storage_count = 3 - compute_count = 2 - availability_zone_id = "use1-az6" - customer_contacts_to_send_to_oci = ["abc@example.com"] - database_server_type = "X11M" - storage_server_type = "X11M-HC" - maintenance_window = { - custom_action_timeout_in_mins = 16 - days_of_week = ["MONDAY", "TUESDAY"] - hours_of_day = [11,16] - is_custom_action_timeout_enabled = true - lead_time_in_weeks = 3 - months = ["FEBRUARY","MAY","AUGUST","NOVEMBER"] - patching_mode = "ROLLING" - preference = "CUSTOM_PREFERENCE" - weeks_of_month =[2,4] - } - tags = { - "env"= "dev" - } - -} -`, randomId) - //fmt.Println(exaDataInfra) - return exaDataInfra -} -func (cloudExaDataInfraResourceTest) exaDataInfraResourceBasicConfig(displayName string) string { - exaInfra := fmt.Sprintf(` -resource "aws_odb_cloud_exadata_infrastructure" "test" { - display_name = %[1]q - shape = "Exadata.X9M" - storage_count = 3 - compute_count = 2 - availability_zone_id = "use1-az6" - maintenance_window = { - custom_action_timeout_in_mins = 16 - days_of_week = [] - hours_of_day = [] - is_custom_action_timeout_enabled = true - lead_time_in_weeks = 0 - months = [] - patching_mode = "ROLLING" - preference = "NO_PREFERENCE" - weeks_of_month =[] - } -} -`, displayName) - return exaInfra -} -func (cloudExaDataInfraResourceTest) exaDataInfraResourceBasicConfigAddTags(displayName string) string { - exaInfra := fmt.Sprintf(` -resource "aws_odb_cloud_exadata_infrastructure" "test" { - display_name = %[1]q - shape = "Exadata.X9M" - storage_count = 3 - compute_count = 2 - availability_zone_id = "use1-az6" -maintenance_window = { - custom_action_timeout_in_mins = 16 - days_of_week = [] - hours_of_day = [] - is_custom_action_timeout_enabled = true - lead_time_in_weeks = 0 - months = [] - patching_mode = "ROLLING" - preference = "NO_PREFERENCE" - weeks_of_month =[] - } - tags = { - "env"= "dev" - } -} -`, displayName) - return exaInfra -} - -func (cloudExaDataInfraResourceTest) exaDataInfraResourceBasicConfigRemoveTags(displayName string) string { - exaInfra := fmt.Sprintf(` -resource "aws_odb_cloud_exadata_infrastructure" "test" { - display_name = %[1]q - shape = "Exadata.X9M" - storage_count = 3 - compute_count = 2 - availability_zone_id = "use1-az6" -maintenance_window = { - custom_action_timeout_in_mins = 16 - days_of_week = [] - hours_of_day = [] - is_custom_action_timeout_enabled = true - lead_time_in_weeks = 0 - months = [] - patching_mode = "ROLLING" - preference = "NO_PREFERENCE" - weeks_of_month =[] - } -} -`, displayName) - return exaInfra -} -func (cloudExaDataInfraResourceTest) basicWithCustomMaintenanceWindow(displayName string) string { - exaInfra := fmt.Sprintf(` -resource "aws_odb_cloud_exadata_infrastructure" "test" { - display_name = %[1]q - shape = "Exadata.X9M" - storage_count = 3 - compute_count = 2 - availability_zone_id = "use1-az6" - maintenance_window = { - custom_action_timeout_in_mins = 16 - days_of_week = ["MONDAY", "TUESDAY"] - hours_of_day = [11,16] - is_custom_action_timeout_enabled = true - lead_time_in_weeks = 3 - months = ["FEBRUARY","MAY","AUGUST","NOVEMBER"] - patching_mode = "ROLLING" - preference = "CUSTOM_PREFERENCE" - weeks_of_month =[2,4] - } -} -`, displayName) - return exaInfra -} diff --git a/internal/service/odb/cloud_exadata_infrastructures_list_data_source.go b/internal/service/odb/cloud_exadata_infrastructures_list_data_source.go deleted file mode 100644 index 9194f93d62ff..000000000000 --- a/internal/service/odb/cloud_exadata_infrastructures_list_data_source.go +++ /dev/null @@ -1,90 +0,0 @@ -//Copyright © 2025, Oracle and/or its affiliates. All rights reserved. - -package odb - -import ( - "context" - "github.com/aws/aws-sdk-go-v2/service/odb" - "github.com/hashicorp/terraform-plugin-framework/attr" - "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/create" - "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/names" -) - -// @FrameworkDataSource("aws_odb_cloud_exadata_infrastructures_list", name="Cloud Exadata Infrastructures List") -func newDataSourceCloudExadataInfrastructuresList(context.Context) (datasource.DataSourceWithConfigure, error) { - return &dataSourceCloudExadataInfrastructuresList{}, nil -} - -const ( - DSNameCloudExadataInfrastructuresList = "Cloud Exadata Infrastructures List Data Source" -) - -type dataSourceCloudExadataInfrastructuresList struct { - framework.DataSourceWithModel[cloudExadataInfrastructuresListDataSourceModel] -} - -func (d *dataSourceCloudExadataInfrastructuresList) Schema(ctx context.Context, req datasource.SchemaRequest, resp *datasource.SchemaResponse) { - resp.Schema = schema.Schema{ - Attributes: map[string]schema.Attribute{ - "cloud_exadata_infrastructures": schema.ListAttribute{ - Computed: true, - Description: "List of Cloud Exadata Infrastructures (OCID, ID, ARN and OCI URL)", - CustomType: fwtypes.NewListNestedObjectTypeOf[cloudExadataInfrastructureDataSourceListSummary](ctx), - ElementType: types.ObjectType{ - AttrTypes: map[string]attr.Type{ - "arn": types.StringType, - "id": types.StringType, - "oci_url": types.StringType, - "ocid": types.StringType, - }, - }, - }, - }, - } - -} - -func (d *dataSourceCloudExadataInfrastructuresList) Read(ctx context.Context, req datasource.ReadRequest, resp *datasource.ReadResponse) { - - conn := d.Meta().ODBClient(ctx) - - var data cloudExadataInfrastructuresListDataSourceModel - resp.Diagnostics.Append(req.Config.Get(ctx, &data)...) - if resp.Diagnostics.HasError() { - return - } - - out, err := conn.ListCloudExadataInfrastructures(ctx, &odb.ListCloudExadataInfrastructuresInput{}) - if err != nil { - resp.Diagnostics.AddError( - create.ProblemStandardMessage(names.ODB, create.ErrActionReading, DSNameCloudExadataInfrastructuresList, "", err), - err.Error(), - ) - return - } - - resp.Diagnostics.Append(flex.Flatten(ctx, out, &data)...) - if resp.Diagnostics.HasError() { - return - } - - resp.Diagnostics.Append(resp.State.Set(ctx, &data)...) -} - -type cloudExadataInfrastructuresListDataSourceModel struct { - framework.WithRegionModel - CloudExadataInfrastructures fwtypes.ListNestedObjectValueOf[cloudExadataInfrastructureDataSourceListSummary] `tfsdk:"cloud_exadata_infrastructures"` -} - -type cloudExadataInfrastructureDataSourceListSummary struct { - CloudExadataInfrastructureArn types.String `tfsdk:"arn"` - CloudExadataInfrastructureId types.String `tfsdk:"id"` - OciUrl types.String `tfsdk:"oci_url"` - Ocid types.String `tfsdk:"ocid"` -} diff --git a/internal/service/odb/cloud_exadata_infrastructures_list_data_source_test.go b/internal/service/odb/cloud_exadata_infrastructures_list_data_source_test.go deleted file mode 100644 index 370d4a07b88c..000000000000 --- a/internal/service/odb/cloud_exadata_infrastructures_list_data_source_test.go +++ /dev/null @@ -1,101 +0,0 @@ -//Copyright © 2025, Oracle and/or its affiliates. All rights reserved. - -package odb_test - -import ( - "context" - "errors" - "fmt" - "github.com/hashicorp/terraform-plugin-testing/terraform" - "github.com/hashicorp/terraform-provider-aws/internal/create" - tfodb "github.com/hashicorp/terraform-provider-aws/internal/service/odb" - "strconv" - "testing" - - "github.com/aws/aws-sdk-go-v2/service/odb" - - "github.com/hashicorp/terraform-plugin-testing/helper/resource" - - "github.com/hashicorp/terraform-provider-aws/internal/acctest" - "github.com/hashicorp/terraform-provider-aws/internal/conns" - - "github.com/hashicorp/terraform-provider-aws/names" -) - -type listExaInfraTest struct { -} - -func TestAccODBCloudExadataInfrastructuresListDataSource_basic(t *testing.T) { - ctx := acctest.Context(t) - var listExaInfraDSTest = listExaInfraTest{} - var infraList odb.ListCloudExadataInfrastructuresOutput - - dataSourceName := "data.aws_odb_cloud_exadata_infrastructures_list.test" - resource.Test(t, resource.TestCase{ - PreCheck: func() { - acctest.PreCheck(ctx, t) - listExaInfraDSTest.testAccPreCheck(ctx, t) - }, - ErrorCheck: acctest.ErrorCheck(t, names.ODBServiceID), - ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, - Steps: []resource.TestStep{ - { - Config: listExaInfraDSTest.basic(), - Check: resource.ComposeAggregateTestCheckFunc( - - resource.ComposeTestCheckFunc(func(s *terraform.State) error { - listExaInfraDSTest.countExaInfrastructures(ctx, dataSourceName, &infraList) - resource.TestCheckResourceAttr(dataSourceName, "cloud_exadata_infrastructures.#", strconv.Itoa(len(infraList.CloudExadataInfrastructures))) - return nil - }, - ), - ), - }, - }, - }) -} - -func (listExaInfraTest) basic() string { - config := fmt.Sprintf(` - - -data "aws_odb_cloud_exadata_infrastructures_list" "test" { - -} -`) - return config -} - -func (listExaInfraTest) countExaInfrastructures(ctx context.Context, name string, listOfInfra *odb.ListCloudExadataInfrastructuresOutput) resource.TestCheckFunc { - return func(s *terraform.State) error { - rs, ok := s.RootModule().Resources[name] - if !ok { - return create.Error(names.ODB, create.ErrActionCheckingExistence, tfodb.ResNameCloudVmCluster, name, errors.New("not found")) - } - - conn := acctest.Provider.Meta().(*conns.AWSClient).ODBClient(ctx) - - resp, err := conn.ListCloudExadataInfrastructures(ctx, &odb.ListCloudExadataInfrastructuresInput{}) - if err != nil { - return create.Error(names.ODB, create.ErrActionCheckingExistence, tfodb.ResNameCloudVmCluster, rs.Primary.ID, err) - } - - listOfInfra.CloudExadataInfrastructures = resp.CloudExadataInfrastructures - - return nil - } -} -func (listExaInfraTest) testAccPreCheck(ctx context.Context, t *testing.T) { - conn := acctest.Provider.Meta().(*conns.AWSClient).ODBClient(ctx) - - input := &odb.ListCloudAutonomousVmClustersInput{} - - _, err := conn.ListCloudAutonomousVmClusters(ctx, input) - - if acctest.PreCheckSkipError(err) { - t.Skipf("skipping acceptance testing: %s", err) - } - if err != nil { - t.Fatalf("unexpected PreCheck error: %s", err) - } -} diff --git a/internal/service/odb/cloud_vm_cluster.go b/internal/service/odb/cloud_vm_cluster.go deleted file mode 100644 index f4447a87be25..000000000000 --- a/internal/service/odb/cloud_vm_cluster.go +++ /dev/null @@ -1,670 +0,0 @@ -//Copyright © 2025, Oracle and/or its affiliates. All rights reserved. - -package odb - -import ( - "context" - "errors" - awstypes "github.com/aws/aws-sdk-go-v2/service/computeoptimizer/types" - "github.com/hashicorp/terraform-plugin-framework/resource/schema/setplanmodifier" - "strings" - - "github.com/hashicorp/terraform-plugin-framework/attr" - "github.com/hashicorp/terraform-plugin-framework/resource/schema/float64planmodifier" - "github.com/hashicorp/terraform-plugin-framework/resource/schema/int32planmodifier" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/id" - "github.com/hashicorp/terraform-provider-aws/internal/enum" - tftags "github.com/hashicorp/terraform-provider-aws/internal/tags" - "time" - - "github.com/aws/aws-sdk-go-v2/aws" - "github.com/aws/aws-sdk-go-v2/service/odb" - odbtypes "github.com/aws/aws-sdk-go-v2/service/odb/types" - "github.com/hashicorp/terraform-plugin-framework-timeouts/resource/timeouts" - "github.com/hashicorp/terraform-plugin-framework/path" - "github.com/hashicorp/terraform-plugin-framework/resource" - "github.com/hashicorp/terraform-plugin-framework/resource/schema" - "github.com/hashicorp/terraform-plugin-framework/resource/schema/planmodifier" - "github.com/hashicorp/terraform-plugin-framework/resource/schema/stringplanmodifier" - "github.com/hashicorp/terraform-plugin-framework/types" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" - "github.com/hashicorp/terraform-provider-aws/internal/conns" - "github.com/hashicorp/terraform-provider-aws/internal/create" - "github.com/hashicorp/terraform-provider-aws/internal/errs" - "github.com/hashicorp/terraform-provider-aws/internal/errs/fwdiag" - "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/sweep" - sweepfw "github.com/hashicorp/terraform-provider-aws/internal/sweep/framework" - "github.com/hashicorp/terraform-provider-aws/internal/tfresource" - "github.com/hashicorp/terraform-provider-aws/names" -) - -// Function annotations are used for resource registration to the Provider. DO NOT EDIT. -// @FrameworkResource("aws_odb_cloud_vm_cluster", name="Cloud Vm Cluster") -// @Tags(identifierAttribute="arn") -func newResourceCloudVmCluster(_ context.Context) (resource.ResourceWithConfigure, error) { - r := &resourceCloudVmCluster{} - - r.SetDefaultCreateTimeout(24 * time.Hour) - r.SetDefaultUpdateTimeout(24 * time.Hour) - r.SetDefaultDeleteTimeout(24 * time.Hour) - - return r, nil -} - -const ( - ResNameCloudVmCluster = "Cloud Vm Cluster" -) - -var ResourceCloudVmCluster = newResourceCloudVmCluster - -type resourceCloudVmCluster struct { - framework.ResourceWithModel[cloudVmClusterResourceModel] - framework.WithTimeouts -} - -func (r *resourceCloudVmCluster) Schema(ctx context.Context, req resource.SchemaRequest, resp *resource.SchemaResponse) { - statusType := fwtypes.StringEnumType[odbtypes.ResourceStatus]() - licenseModelType := fwtypes.StringEnumType[odbtypes.LicenseModel]() - diskRedundancyType := fwtypes.StringEnumType[odbtypes.DiskRedundancy]() - computeModelType := fwtypes.StringEnumType[odbtypes.ComputeModel]() - resp.Schema = schema.Schema{ - Attributes: map[string]schema.Attribute{ - names.AttrARN: framework.ARNAttributeComputedOnly(), - "cloud_exadata_infrastructure_id": schema.StringAttribute{ - Required: true, - PlanModifiers: []planmodifier.String{ - stringplanmodifier.RequiresReplace(), - }, - }, - "cluster_name": schema.StringAttribute{ - Optional: true, - Computed: true, - PlanModifiers: []planmodifier.String{ - stringplanmodifier.RequiresReplace(), - stringplanmodifier.UseStateForUnknown(), - }, - }, - "cpu_core_count": schema.Int32Attribute{ - Required: true, - PlanModifiers: []planmodifier.Int32{ - int32planmodifier.RequiresReplace(), - }, - }, - "data_collection_options": schema.ObjectAttribute{ - Computed: true, - Optional: true, - CustomType: fwtypes.NewObjectTypeOf[cloudVMCResourceModelDataCollectionOptions](ctx), - }, - "data_storage_size_in_tbs": schema.Float64Attribute{ - Optional: true, - Computed: true, - PlanModifiers: []planmodifier.Float64{ - float64planmodifier.RequiresReplace(), - float64planmodifier.UseStateForUnknown(), - }, - }, - "db_node_storage_size_in_gbs": schema.Int32Attribute{ - Optional: true, - Computed: true, - PlanModifiers: []planmodifier.Int32{ - int32planmodifier.RequiresReplace(), - int32planmodifier.UseStateForUnknown(), - }, - }, - "db_servers": schema.SetAttribute{ - CustomType: fwtypes.SetOfStringType, - ElementType: types.StringType, - Required: true, - PlanModifiers: []planmodifier.Set{ - setplanmodifier.RequiresReplace(), - }, - }, - "disk_redundancy": schema.StringAttribute{ - CustomType: diskRedundancyType, - Computed: true, - }, - "display_name": schema.StringAttribute{ - Required: true, - PlanModifiers: []planmodifier.String{ - stringplanmodifier.UseStateForUnknown(), - }, - }, - "domain": schema.StringAttribute{ - Computed: true, - }, - "gi_version": schema.StringAttribute{ - Required: true, - PlanModifiers: []planmodifier.String{ - stringplanmodifier.RequiresReplace(), - }, - }, - "hostname_prefix_computed": schema.StringAttribute{ - Computed: true, - PlanModifiers: []planmodifier.String{ - stringplanmodifier.UseStateForUnknown(), - }, - }, - "hostname_prefix": schema.StringAttribute{ - Required: true, - PlanModifiers: []planmodifier.String{ - stringplanmodifier.RequiresReplace(), - }, - }, - names.AttrID: framework.IDAttribute(), - "iorm_config_cache": schema.ListAttribute{ - Computed: true, - CustomType: fwtypes.NewListNestedObjectTypeOf[cloudVMCResourceModelExadataIormConfig](ctx), - ElementType: types.ObjectType{ - AttrTypes: map[string]attr.Type{ - "lifecycle_details": types.StringType, - "lifecycle_state": fwtypes.StringEnumType[odbtypes.IormLifecycleState](), - "objective": fwtypes.StringEnumType[odbtypes.Objective](), - "db_plans": types.ListType{ - ElemType: types.ObjectType{ - AttrTypes: map[string]attr.Type{ - "db_name": types.StringType, - "flash_cache_limit": types.StringType, - "share": types.Int32Type, - }, - }, - }, - }, - }, - }, - "is_local_backup_enabled": schema.BoolAttribute{ - Optional: true, - Computed: true, - }, - "is_sparse_diskgroup_enabled": schema.BoolAttribute{ - Optional: true, - Computed: true, - }, - "last_update_history_entry_id": schema.StringAttribute{ - Computed: true, - }, - "license_model": schema.StringAttribute{ - CustomType: licenseModelType, - Optional: true, - Computed: true, - }, - "listener_port": schema.Int32Attribute{ - Computed: true, - }, - "memory_size_in_gbs": schema.Int32Attribute{ - Optional: true, - Computed: true, - PlanModifiers: []planmodifier.Int32{ - int32planmodifier.RequiresReplace(), - int32planmodifier.UseStateForUnknown(), - }, - }, - "node_count": schema.Int32Attribute{ - Computed: true, - }, - "ocid": schema.StringAttribute{ - Computed: true, - }, - "oci_resource_anchor_name": schema.StringAttribute{ - Computed: true, - }, - "oci_url": schema.StringAttribute{ - Computed: true, - }, - "odb_network_id": schema.StringAttribute{ - Required: true, - PlanModifiers: []planmodifier.String{ - stringplanmodifier.RequiresReplace(), - }, - }, - "percent_progress": schema.Float32Attribute{ - Computed: true, - }, - "scan_dns_name": schema.StringAttribute{ - Computed: true, - }, - "scan_dns_record_id": schema.StringAttribute{ - Computed: true, - }, - "scan_ip_ids": schema.ListAttribute{ - CustomType: fwtypes.ListOfStringType, - ElementType: types.StringType, - Computed: true, - }, - "shape": schema.StringAttribute{ - Computed: true, - }, - "ssh_public_keys": schema.SetAttribute{ - Required: true, - CustomType: fwtypes.SetOfStringType, - ElementType: types.StringType, - PlanModifiers: []planmodifier.Set{ - setplanmodifier.RequiresReplace(), - }, - }, - "status": schema.StringAttribute{ - Computed: true, - CustomType: statusType, - }, - "status_reason": schema.StringAttribute{ - Computed: true, - }, - "storage_size_in_gbs": schema.Int32Attribute{ - Computed: true, - }, - "system_version": schema.StringAttribute{ - Optional: true, - Computed: true, - }, - "timezone": schema.StringAttribute{ - Optional: true, - Computed: true, - }, - "vip_ids": schema.ListAttribute{ - Computed: true, - CustomType: fwtypes.ListOfStringType, - ElementType: types.StringType, - }, - "created_at": schema.StringAttribute{ - Computed: true, - }, - "compute_model": schema.StringAttribute{ - CustomType: computeModelType, - Computed: true, - }, - "scan_listener_port_tcp": schema.Int32Attribute{ - Computed: true, - Optional: true, - PlanModifiers: []planmodifier.Int32{ - int32planmodifier.RequiresReplace(), - int32planmodifier.UseStateForUnknown(), - }, - }, - names.AttrTags: tftags.TagsAttribute(), - names.AttrTagsAll: tftags.TagsAttributeComputedOnly(), - }, - Blocks: map[string]schema.Block{ - "timeouts": timeouts.Block(ctx, timeouts.Opts{ - Create: true, - Update: true, - Delete: true, - }), - }, - } -} - -func (r *resourceCloudVmCluster) Create(ctx context.Context, req resource.CreateRequest, resp *resource.CreateResponse) { - conn := r.Meta().ODBClient(ctx) - - var plan cloudVmClusterResourceModel - resp.Diagnostics.Append(req.Plan.Get(ctx, &plan)...) - if resp.Diagnostics.HasError() { - return - } - - input := odb.CreateCloudVmClusterInput{ - Tags: getTagsIn(ctx), - GiVersion: plan.GiVersion.ValueStringPointer(), - ClientToken: aws.String(id.UniqueId()), - Hostname: plan.HostnamePrefix.ValueStringPointer(), - } - resp.Diagnostics.Append(flex.Expand(ctx, plan, &input)...) - - if resp.Diagnostics.HasError() { - return - } - - out, err := conn.CreateCloudVmCluster(ctx, &input) - if err != nil { - resp.Diagnostics.AddError( - create.ProblemStandardMessage(names.ODB, create.ErrActionCreating, ResNameCloudVmCluster, plan.DisplayName.ValueString(), err), - err.Error(), - ) - return - } - if out == nil || out.CloudVmClusterId == nil { - resp.Diagnostics.AddError( - create.ProblemStandardMessage(names.ODB, create.ErrActionCreating, ResNameCloudVmCluster, plan.DisplayName.ValueString(), nil), - errors.New("empty output").Error(), - ) - return - } - - createTimeout := r.CreateTimeout(ctx, plan.Timeouts) - createdVmCluster, err := waitCloudVmClusterCreated(ctx, conn, *out.CloudVmClusterId, createTimeout) - if err != nil { - resp.Diagnostics.AddError( - create.ProblemStandardMessage(names.ODB, create.ErrActionWaitingForCreation, ResNameCloudVmCluster, plan.DisplayName.ValueString(), err), - err.Error(), - ) - return - } - hostnamePrefix := strings.Split(*input.Hostname, "-")[0] - plan.HostnamePrefix = types.StringValue(hostnamePrefix) - plan.HostnamePrefixComputed = types.StringValue(*createdVmCluster.Hostname) - plan.CreatedAt = types.StringValue(createdVmCluster.CreatedAt.Format(time.RFC3339)) - plan.ScanListenerPortTcp = types.Int32PointerValue(createdVmCluster.ListenerPort) - - resp.Diagnostics.Append(flex.Flatten(ctx, createdVmCluster, &plan, flex.WithIgnoredFieldNamesAppend("HostnamePrefix"), - flex.WithIgnoredFieldNamesAppend("HostnamePrefixComputed"), - flex.WithIgnoredFieldNamesAppend("CreatedAt"), - flex.WithIgnoredFieldNamesAppend("ScanListenerPortTcp"))...) - if resp.Diagnostics.HasError() { - return - } - - resp.Diagnostics.Append(resp.State.Set(ctx, plan)...) -} - -func (r *resourceCloudVmCluster) Read(ctx context.Context, req resource.ReadRequest, resp *resource.ReadResponse) { - - conn := r.Meta().ODBClient(ctx) - var state cloudVmClusterResourceModel - resp.Diagnostics.Append(req.State.Get(ctx, &state)...) - if resp.Diagnostics.HasError() { - return - } - - out, err := FindCloudVmClusterForResourceByID(ctx, conn, state.CloudVmClusterId.ValueString()) - if tfresource.NotFound(err) { - resp.Diagnostics.Append(fwdiag.NewResourceNotFoundWarningDiagnostic(err)) - resp.State.RemoveResource(ctx) - return - } - if err != nil { - resp.Diagnostics.AddError( - create.ProblemStandardMessage(names.ODB, create.ErrActionReading, ResNameCloudVmCluster, state.CloudVmClusterId.ValueString(), err), - err.Error(), - ) - return - } - hostnamePrefix := strings.Split(*out.Hostname, "-")[0] - state.HostnamePrefix = types.StringValue(hostnamePrefix) - state.HostnamePrefixComputed = types.StringValue(*out.Hostname) - state.CreatedAt = types.StringValue(out.CreatedAt.Format(time.RFC3339)) - state.ScanListenerPortTcp = types.Int32PointerValue(out.ListenerPort) - resp.Diagnostics.Append(flex.Flatten(ctx, out, &state, flex.WithIgnoredFieldNamesAppend("HostnamePrefix"), - flex.WithIgnoredFieldNamesAppend("HostnamePrefixComputed"), flex.WithIgnoredFieldNamesAppend("CreatedAt"), - flex.WithIgnoredFieldNamesAppend("ScanListenerPortTcp"))...) - - if resp.Diagnostics.HasError() { - return - } - resp.Diagnostics.Append(resp.State.Set(ctx, &state)...) -} - -func (r *resourceCloudVmCluster) Update(ctx context.Context, req resource.UpdateRequest, resp *resource.UpdateResponse) { - - var plan, state cloudVmClusterResourceModel - resp.Diagnostics.Append(req.Plan.Get(ctx, &plan)...) - resp.Diagnostics.Append(req.State.Get(ctx, &state)...) - if resp.Diagnostics.HasError() { - return - } - - conn := r.Meta().ODBClient(ctx) - updateTimeout := r.UpdateTimeout(ctx, plan.Timeouts) - updatedVMC, err := waitCloudVmClusterUpdated(ctx, conn, plan.CloudVmClusterId.ValueString(), updateTimeout) - if err != nil { - resp.Diagnostics.AddError( - create.ProblemStandardMessage(names.ODB, create.ErrActionWaitingForUpdate, ResNameCloudVmCluster, plan.CloudVmClusterId.String(), err), - err.Error(), - ) - return - } - hostnamePrefix := strings.Split(*updatedVMC.Hostname, "-")[0] - plan.HostnamePrefix = types.StringValue(hostnamePrefix) - plan.HostnamePrefixComputed = types.StringValue(*updatedVMC.Hostname) - plan.CreatedAt = types.StringValue(updatedVMC.CreatedAt.Format(time.RFC3339)) - plan.ScanListenerPortTcp = types.Int32PointerValue(updatedVMC.ListenerPort) - resp.Diagnostics.Append(flex.Flatten(ctx, updatedVMC, &plan, flex.WithIgnoredFieldNamesAppend("HostnamePrefix"), - flex.WithIgnoredFieldNamesAppend("HostnamePrefixComputed"), flex.WithIgnoredFieldNamesAppend("CreatedAt"), - flex.WithIgnoredFieldNamesAppend("ScanListenerPortTcp"))...) - - if resp.Diagnostics.HasError() { - return - } - resp.Diagnostics.Append(resp.State.Set(ctx, &plan)...) -} - -func (r *resourceCloudVmCluster) Delete(ctx context.Context, req resource.DeleteRequest, resp *resource.DeleteResponse) { - - conn := r.Meta().ODBClient(ctx) - - var state cloudVmClusterResourceModel - resp.Diagnostics.Append(req.State.Get(ctx, &state)...) - if resp.Diagnostics.HasError() { - return - } - - input := odb.DeleteCloudVmClusterInput{ - CloudVmClusterId: state.CloudVmClusterId.ValueStringPointer(), - } - - _, err := conn.DeleteCloudVmCluster(ctx, &input) - if err != nil { - if errs.IsA[*awstypes.ResourceNotFoundException](err) { - return - } - - resp.Diagnostics.AddError( - create.ProblemStandardMessage(names.ODB, create.ErrActionDeleting, ResNameCloudVmCluster, state.CloudVmClusterId.ValueString(), err), - err.Error(), - ) - return - } - - // TIP: -- 5. Use a waiter to wait for delete to complete - deleteTimeout := r.DeleteTimeout(ctx, state.Timeouts) - _, err = waitCloudVmClusterDeleted(ctx, conn, state.CloudVmClusterId.ValueString(), deleteTimeout) - if err != nil { - resp.Diagnostics.AddError( - create.ProblemStandardMessage(names.ODB, create.ErrActionWaitingForDeletion, ResNameCloudVmCluster, state.CloudVmClusterId.ValueString(), err), - err.Error(), - ) - return - } -} - -func (r *resourceCloudVmCluster) ImportState(ctx context.Context, req resource.ImportStateRequest, resp *resource.ImportStateResponse) { - resource.ImportStatePassthroughID(ctx, path.Root(names.AttrID), req, resp) -} - -func waitCloudVmClusterCreated(ctx context.Context, conn *odb.Client, id string, timeout time.Duration) (*odbtypes.CloudVmCluster, error) { - stateConf := &retry.StateChangeConf{ - Pending: enum.Slice(odbtypes.ResourceStatusProvisioning), - Target: enum.Slice(odbtypes.ResourceStatusAvailable, odbtypes.ResourceStatusFailed), - Refresh: statusCloudVmCluster(ctx, conn, id), - Timeout: timeout, - NotFoundChecks: 20, - ContinuousTargetOccurence: 2, - } - - outputRaw, err := stateConf.WaitForStateContext(ctx) - if out, ok := outputRaw.(*odbtypes.CloudVmCluster); ok { - return out, err - } - - return nil, err -} - -func waitCloudVmClusterUpdated(ctx context.Context, conn *odb.Client, id string, timeout time.Duration) (*odbtypes.CloudVmCluster, error) { - stateConf := &retry.StateChangeConf{ - Pending: enum.Slice(odbtypes.ResourceStatusUpdating), - Target: enum.Slice(odbtypes.ResourceStatusAvailable, odbtypes.ResourceStatusFailed), - Refresh: statusCloudVmCluster(ctx, conn, id), - Timeout: timeout, - NotFoundChecks: 20, - ContinuousTargetOccurence: 2, - } - - outputRaw, err := stateConf.WaitForStateContext(ctx) - if out, ok := outputRaw.(*odbtypes.CloudVmCluster); ok { - return out, err - } - - return nil, err -} - -func waitCloudVmClusterDeleted(ctx context.Context, conn *odb.Client, id string, timeout time.Duration) (*odbtypes.CloudVmCluster, error) { - stateConf := &retry.StateChangeConf{ - Pending: enum.Slice(odbtypes.ResourceStatusTerminating), - Target: []string{}, - Refresh: statusCloudVmCluster(ctx, conn, id), - Timeout: timeout, - } - - outputRaw, err := stateConf.WaitForStateContext(ctx) - if out, ok := outputRaw.(*odbtypes.CloudVmCluster); ok { - return out, err - } - - return nil, err -} - -func statusCloudVmCluster(ctx context.Context, conn *odb.Client, id string) retry.StateRefreshFunc { - return func() (any, string, error) { - out, err := FindCloudVmClusterForResourceByID(ctx, conn, id) - if tfresource.NotFound(err) { - return nil, "", nil - } - - if err != nil { - return nil, "", err - } - - return out, string(out.Status), nil - } -} - -func FindCloudVmClusterForResourceByID(ctx context.Context, conn *odb.Client, id string) (*odbtypes.CloudVmCluster, error) { - input := odb.GetCloudVmClusterInput{ - CloudVmClusterId: aws.String(id), - } - - out, err := conn.GetCloudVmCluster(ctx, &input) - if err != nil { - if errs.IsA[*odbtypes.ResourceNotFoundException](err) { - return nil, &retry.NotFoundError{ - LastError: err, - LastRequest: &input, - } - } - - return nil, err - } - - if out == nil || out.CloudVmCluster == nil { - return nil, tfresource.NewEmptyResultError(&input) - } - return out.CloudVmCluster, nil -} - -// TIP: ==== SWEEPERS ==== -// When acceptance testing resources, interrupted or failed tests may -// leave behind orphaned resources in an account. To facilitate cleaning -// up lingering resources, each resource implementation should include -// a corresponding "sweeper" function. -// -// The sweeper function lists all resources of a given type and sets the -// appropriate identifers required to delete the resource via the Delete -// method implemented above. -// -// Once the sweeper function is implemented, register it in sweeper.go -// as follows: -// -// awsv2.Register("aws_odb_cloud_vm_cluster", sweepCloudVmClusters) -// -// See more: -// https://hashicorp.github.io/terraform-provider-aws/running-and-writing-acceptance-tests/#acceptance-test-sweepers -func sweepCloudVmClusters(ctx context.Context, client *conns.AWSClient) ([]sweep.Sweepable, error) { - input := odb.ListCloudVmClustersInput{} - conn := client.ODBClient(ctx) - var sweepResources []sweep.Sweepable - - pages := odb.NewListCloudVmClustersPaginator(conn, &input) - for pages.HasMorePages() { - page, err := pages.NextPage(ctx) - if err != nil { - return nil, err - } - - for _, v := range page.CloudVmClusters { - sweepResources = append(sweepResources, sweepfw.NewSweepResource(newResourceCloudVmCluster, client, - sweepfw.NewAttribute(names.AttrID, aws.ToString(v.CloudVmClusterId))), - ) - } - } - - return sweepResources, nil -} - -type cloudVmClusterResourceModel struct { - framework.WithRegionModel - CloudVmClusterArn types.String `tfsdk:"arn"` - CloudExadataInfrastructureId types.String `tfsdk:"cloud_exadata_infrastructure_id"` - CloudVmClusterId types.String `tfsdk:"id"` - ClusterName types.String `tfsdk:"cluster_name"` - CpuCoreCount types.Int32 `tfsdk:"cpu_core_count"` - DataCollectionOptions fwtypes.ObjectValueOf[cloudVMCResourceModelDataCollectionOptions] `tfsdk:"data_collection_options"` - DataStorageSizeInTBs types.Float64 `tfsdk:"data_storage_size_in_tbs"` - DbNodeStorageSizeInGBs types.Int32 `tfsdk:"db_node_storage_size_in_gbs"` - DbServers fwtypes.SetValueOf[types.String] `tfsdk:"db_servers"` - DiskRedundancy fwtypes.StringEnum[odbtypes.DiskRedundancy] `tfsdk:"disk_redundancy"` - DisplayName types.String `tfsdk:"display_name"` - Domain types.String `tfsdk:"domain"` - GiVersion types.String `tfsdk:"gi_version"` - HostnamePrefixComputed types.String `tfsdk:"hostname_prefix_computed"` - HostnamePrefix types.String `tfsdk:"hostname_prefix"` - IormConfigCache fwtypes.ListNestedObjectValueOf[cloudVMCResourceModelExadataIormConfig] `tfsdk:"iorm_config_cache"` - IsLocalBackupEnabled types.Bool `tfsdk:"is_local_backup_enabled"` - IsSparseDiskGroupEnabled types.Bool `tfsdk:"is_sparse_diskgroup_enabled"` - LastUpdateHistoryEntryId types.String `tfsdk:"last_update_history_entry_id"` - LicenseModel fwtypes.StringEnum[odbtypes.LicenseModel] `tfsdk:"license_model"` - ListenerPort types.Int32 `tfsdk:"listener_port"` - MemorySizeInGbs types.Int32 `tfsdk:"memory_size_in_gbs"` - NodeCount types.Int32 `tfsdk:"node_count"` - Ocid types.String `tfsdk:"ocid"` - OciResourceAnchorName types.String `tfsdk:"oci_resource_anchor_name"` - OciUrl types.String `tfsdk:"oci_url"` - OdbNetworkId types.String `tfsdk:"odb_network_id"` - PercentProgress types.Float32 `tfsdk:"percent_progress"` - ScanDnsName types.String `tfsdk:"scan_dns_name"` - ScanDnsRecordId types.String `tfsdk:"scan_dns_record_id"` - ScanIpIds fwtypes.ListValueOf[types.String] `tfsdk:"scan_ip_ids"` - Shape types.String `tfsdk:"shape"` - SshPublicKeys fwtypes.SetValueOf[types.String] `tfsdk:"ssh_public_keys"` - Status fwtypes.StringEnum[odbtypes.ResourceStatus] `tfsdk:"status"` - StatusReason types.String `tfsdk:"status_reason"` - StorageSizeInGBs types.Int32 `tfsdk:"storage_size_in_gbs"` - SystemVersion types.String `tfsdk:"system_version"` - Timeouts timeouts.Value `tfsdk:"timeouts"` - Timezone types.String `tfsdk:"timezone"` - VipIds fwtypes.ListValueOf[types.String] `tfsdk:"vip_ids"` - CreatedAt types.String `tfsdk:"created_at"` - ComputeModel fwtypes.StringEnum[odbtypes.ComputeModel] `tfsdk:"compute_model"` - ScanListenerPortTcp types.Int32 `tfsdk:"scan_listener_port_tcp"` - Tags tftags.Map `tfsdk:"tags"` - TagsAll tftags.Map `tfsdk:"tags_all"` -} - -type cloudVMCResourceModelDataCollectionOptions struct { - IsDiagnosticsEventsEnabled types.Bool `tfsdk:"is_diagnostics_events_enabled"` - IsHealthMonitoringEnabled types.Bool `tfsdk:"is_health_monitoring_enabled"` - IsIncidentLogsEnabled types.Bool `tfsdk:"is_incident_logs_enabled"` -} - -type cloudVMCResourceModelExadataIormConfig struct { - DbPlans fwtypes.ListNestedObjectValueOf[cloudVMCResourceModelDbIormConfig] `tfsdk:"db_plans"` - LifecycleDetails types.String `tfsdk:"lifecycle_details"` - LifecycleState fwtypes.StringEnum[odbtypes.IormLifecycleState] `tfsdk:"lifecycle_state"` - Objective fwtypes.StringEnum[odbtypes.Objective] `tfsdk:"objective"` -} - -type cloudVMCResourceModelDbIormConfig struct { - DbName types.String `tfsdk:"db_name"` - FlashCacheLimit types.String `tfsdk:"flash_cache_limit"` - Share types.Int32 `tfsdk:"share"` -} diff --git a/internal/service/odb/cloud_vm_cluster_data_source.go b/internal/service/odb/cloud_vm_cluster_data_source.go deleted file mode 100644 index bf63f25c157f..000000000000 --- a/internal/service/odb/cloud_vm_cluster_data_source.go +++ /dev/null @@ -1,368 +0,0 @@ -//Copyright © 2025, Oracle and/or its affiliates. All rights reserved. - -package odb - -import ( - "context" - "time" - - "github.com/aws/aws-sdk-go-v2/service/odb" - - odbtypes "github.com/aws/aws-sdk-go-v2/service/odb/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/create" - "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/names" -) - -// @FrameworkDataSource("aws_odb_cloud_vm_cluster", name="Cloud Vm Cluster") -func newDataSourceCloudVmCluster(context.Context) (datasource.DataSourceWithConfigure, error) { - return &dataSourceCloudVmCluster{}, nil -} - -const ( - DSNameCloudVmCluster = "Cloud Vm Cluster Data Source" -) - -type dataSourceCloudVmCluster struct { - framework.DataSourceWithModel[dataSourceCloudVmClusterModel] -} - -func (d *dataSourceCloudVmCluster) Schema(ctx context.Context, req datasource.SchemaRequest, resp *datasource.SchemaResponse) { - statusType := fwtypes.StringEnumType[odbtypes.ResourceStatus]() - diskRedundancyType := fwtypes.StringEnumType[odbtypes.DiskRedundancy]() - licenseModelType := fwtypes.StringEnumType[odbtypes.LicenseModel]() - computeModelType := fwtypes.StringEnumType[odbtypes.ComputeModel]() - resp.Schema = schema.Schema{ - Attributes: map[string]schema.Attribute{ - names.AttrARN: framework.ARNAttributeComputedOnly(), - names.AttrID: schema.StringAttribute{ - Required: true, - Description: "The unique identifier of the VM cluster.", - }, - "cloud_exadata_infrastructure_id": schema.StringAttribute{ - Computed: true, - Description: "The ID of the Cloud Exadata Infrastructure.", - }, - "cluster_name": schema.StringAttribute{ - Computed: true, - Description: "The name of the Grid Infrastructure (GI) cluster.", - }, - "cpu_core_count": schema.Int32Attribute{ - Computed: true, - Description: "The number of CPU cores enabled on the VM cluster.", - }, - "data_storage_size_in_tbs": schema.Float64Attribute{ - Computed: true, - Description: "The size of the data disk group, in terabytes (TB), that's allocated for the VM cluster.", - }, - "db_node_storage_size_in_gbs": schema.Int32Attribute{ - Computed: true, - Description: "The amount of local node storage, in gigabytes (GB), that's allocated for the VM cluster.", - }, - "db_servers": schema.ListAttribute{ - Computed: true, - CustomType: fwtypes.ListOfStringType, - ElementType: types.StringType, - Description: "The list of database servers for the VM cluster.", - }, - "disk_redundancy": schema.StringAttribute{ - CustomType: diskRedundancyType, - Computed: true, - Description: "The type of redundancy configured for the VM cluster. NORMAL is 2-way redundancy. HIGH is 3-way redundancy.", - }, - "display_name": schema.StringAttribute{ - Computed: true, - Description: "The display name of the VM cluster.", - }, - "domain": schema.StringAttribute{ - Computed: true, - Description: "The domain name of the VM cluster.", - }, - "gi_version": schema.StringAttribute{ - Computed: true, - Description: "he software version of the Oracle Grid Infrastructure (GI) for the VM cluster.", - }, - "hostname_prefix_computed": schema.StringAttribute{ - Computed: true, - Description: "The computed hostname prefix for the VM cluster.", - }, - "is_local_backup_enabled": schema.BoolAttribute{ - Computed: true, - Description: "Indicates whether database backups to local Exadata storage is enabled for the VM cluster.", - }, - "is_sparse_disk_group_enabled": schema.BoolAttribute{ - Computed: true, - Description: "Indicates whether the VM cluster is configured with a sparse disk group.", - }, - "last_update_history_entry_id": schema.StringAttribute{ - Computed: true, - Description: "The Oracle Cloud ID (OCID) of the last maintenance update history entry.", - }, - "license_model": schema.StringAttribute{ - CustomType: licenseModelType, - Computed: true, - Description: "The Oracle license model applied to the VM cluster.", - }, - "listener_port": schema.Int32Attribute{ - Computed: true, - Description: "The port number configured for the listener on the VM cluster.", - }, - "memory_size_in_gbs": schema.Int32Attribute{ - Computed: true, - Description: "The amount of memory, in gigabytes (GB), that's allocated for the VM cluster.", - }, - "node_count": schema.Int32Attribute{ - Computed: true, - Description: "The number of nodes in the VM cluster.", - }, - "ocid": schema.StringAttribute{ - Computed: true, - Description: "The OCID of the VM cluster.", - }, - "oci_resource_anchor_name": schema.StringAttribute{ - Computed: true, - Description: "The name of the OCI Resource Anchor.", - }, - "oci_url": schema.StringAttribute{ - Computed: true, - Description: "The HTTPS link to the VM cluster in OCI.", - }, - "odb_network_id": schema.StringAttribute{ - Computed: true, - Description: "The ID of the ODB network.", - }, - "percent_progress": schema.Float64Attribute{ - Computed: true, - Description: "The amount of progress made on the current operation on the VM cluster,expressed as a percentage.", - }, - "scan_dns_name": schema.StringAttribute{ - Computed: true, - Description: "The FQDN of the DNS record for the Single Client Access Name (SCAN) IP\n" + - " addresses that are associated with the VM cluster.", - }, - "scan_dns_record_id": schema.StringAttribute{ - Computed: true, - Description: "The OCID of the DNS record for the SCAN IP addresses that are associated with the VM cluster.", - }, - "scan_ip_ids": schema.ListAttribute{ - Computed: true, - CustomType: fwtypes.ListOfStringType, - ElementType: types.StringType, - Description: "The OCID of the SCAN IP addresses that are associated with the VM cluster.", - }, - "shape": schema.StringAttribute{ - Computed: true, - Description: "The hardware model name of the Exadata infrastructure that's running the VM cluster.", - }, - "ssh_public_keys": schema.ListAttribute{ - Computed: true, - CustomType: fwtypes.ListOfStringType, - ElementType: types.StringType, - Description: "he public key portion of one or more key pairs used for SSH access to the VM cluster.", - }, - "status": schema.StringAttribute{ - CustomType: statusType, - Computed: true, - Description: "The status of the VM cluster.", - }, - "status_reason": schema.StringAttribute{ - Computed: true, - Description: "Additional information about the status of the VM cluster.", - }, - "storage_size_in_gbs": schema.Int32Attribute{ - Computed: true, - Description: "The amount of local node storage, in gigabytes (GB), that's allocated to the VM cluster.", - }, - "system_version": schema.StringAttribute{ - Computed: true, - Description: "The operating system version of the image chosen for the VM cluster.", - }, - "timezone": schema.StringAttribute{ - Computed: true, - Description: "The time zone of the VM cluster.", - }, - "vip_ids": schema.ListAttribute{ - Computed: true, - CustomType: fwtypes.ListOfStringType, - ElementType: types.StringType, - Description: "The virtual IP (VIP) addresses that are associated with the VM cluster.\n" + - "Oracle's Cluster Ready Services (CRS) creates and maintains one VIP address for\n" + - "each node in the VM cluster to enable failover. If one node fails, the VIP is\n" + - "reassigned to another active node in the cluster.", - }, - "created_at": schema.StringAttribute{ - Computed: true, - Description: "The time when the VM cluster was created.", - }, - "compute_model": schema.StringAttribute{ - CustomType: computeModelType, - Computed: true, - Description: "The OCI model compute model used when you create or clone an instance: ECPU or\n" + - "OCPU. An ECPU is an abstracted measure of compute resources. ECPUs are based on\n" + - "the number of cores elastically allocated from a pool of compute and storage\n" + - "servers. An OCPU is a legacy physical measure of compute resources. OCPUs are\n" + - "based on the physical core of a processor with hyper-threading enabled.", - }, - }, - Blocks: map[string]schema.Block{ - "data_collection_options": schema.ListNestedBlock{ - Description: "The set of diagnostic collection options enabled for the VM cluster.", - CustomType: fwtypes.NewListNestedObjectTypeOf[dataCollectionOptions](ctx), - NestedObject: schema.NestedBlockObject{ - Attributes: map[string]schema.Attribute{ - "is_diagnostics_events_enabled": schema.BoolAttribute{ - Computed: true, - }, - "is_health_monitoring_enabled": schema.BoolAttribute{ - Computed: true, - }, - "is_incident_logs_enabled": schema.BoolAttribute{ - Computed: true, - }, - }, - }, - }, - "iorm_config_cache": schema.ListNestedBlock{ - Description: "The ExadataIormConfig cache details for the VM cluster.", - CustomType: fwtypes.NewListNestedObjectTypeOf[exadataIormConfig](ctx), - NestedObject: schema.NestedBlockObject{ - Attributes: map[string]schema.Attribute{ - "lifecycle_details": schema.StringAttribute{ - Computed: true, - }, - "lifecycle_state": schema.StringAttribute{ - CustomType: fwtypes.StringEnumType[odbtypes.IormLifecycleState](), - Computed: true, - }, - "objective": schema.StringAttribute{ - CustomType: fwtypes.StringEnumType[odbtypes.Objective](), - Computed: true, - }, - }, - Blocks: map[string]schema.Block{ - "db_plans": schema.ListNestedBlock{ - CustomType: fwtypes.NewListNestedObjectTypeOf[dbIormConfig](ctx), - NestedObject: schema.NestedBlockObject{ - Attributes: map[string]schema.Attribute{ - "db_name": schema.StringAttribute{ - Computed: true, - }, - "flash_cache_limit": schema.StringAttribute{ - Computed: true, - }, - "share": schema.Int32Attribute{ - Computed: true, - }, - }, - }, - }, - }, - }, - }, - }, - } -} - -// Data sources only have a read method. -func (d *dataSourceCloudVmCluster) Read(ctx context.Context, req datasource.ReadRequest, resp *datasource.ReadResponse) { - - conn := d.Meta().ODBClient(ctx) - - var data dataSourceCloudVmClusterModel - resp.Diagnostics.Append(req.Config.Get(ctx, &data)...) - if resp.Diagnostics.HasError() { - return - } - - input := odb.GetCloudVmClusterInput{ - CloudVmClusterId: data.CloudVmClusterId.ValueStringPointer(), - } - - out, err := conn.GetCloudVmCluster(ctx, &input) - if err != nil { - resp.Diagnostics.AddError( - create.ProblemStandardMessage(names.ODB, create.ErrActionReading, DSNameCloudVmCluster, data.CloudVmClusterId.ValueString(), err), - err.Error(), - ) - return - } - - data.HostnamePrefixComputed = types.StringValue(*out.CloudVmCluster.Hostname) - data.CreatedAt = types.StringValue(time.Time{}.Format(time.RFC3339)) - - resp.Diagnostics.Append(flex.Flatten(ctx, out.CloudVmCluster, &data, flex.WithIgnoredFieldNamesAppend("HostnamePrefixComputed"), - flex.WithIgnoredFieldNamesAppend("CreatedAt"))...) - if resp.Diagnostics.HasError() { - return - } - - resp.Diagnostics.Append(resp.State.Set(ctx, &data)...) -} - -type dataSourceCloudVmClusterModel struct { - framework.WithRegionModel - CloudExadataInfrastructureId types.String `tfsdk:"cloud_exadata_infrastructure_id"` - CloudVmClusterArn types.String `tfsdk:"arn"` - CloudVmClusterId types.String `tfsdk:"id"` - ClusterName types.String `tfsdk:"cluster_name"` - CpuCoreCount types.Int32 `tfsdk:"cpu_core_count"` - DataCollectionOptions fwtypes.ListNestedObjectValueOf[dataCollectionOptions] `tfsdk:"data_collection_options"` - DataStorageSizeInTBs types.Float64 `tfsdk:"data_storage_size_in_tbs"` - DbNodeStorageSizeInGBs types.Int32 `tfsdk:"db_node_storage_size_in_gbs"` - DbServers fwtypes.ListValueOf[types.String] `tfsdk:"db_servers"` - DiskRedundancy fwtypes.StringEnum[odbtypes.DiskRedundancy] `tfsdk:"disk_redundancy"` - DisplayName types.String `tfsdk:"display_name"` - Domain types.String `tfsdk:"domain"` - GiVersion types.String `tfsdk:"gi_version"` - HostnamePrefixComputed types.String `tfsdk:"hostname_prefix_computed"` - IormConfigCache fwtypes.ListNestedObjectValueOf[exadataIormConfig] `tfsdk:"iorm_config_cache"` - IsLocalBackupEnabled types.Bool `tfsdk:"is_local_backup_enabled"` - IsSparseDiskGroupEnabled types.Bool `tfsdk:"is_sparse_disk_group_enabled"` - LastUpdateHistoryEntryId types.String `tfsdk:"last_update_history_entry_id"` - LicenseModel fwtypes.StringEnum[odbtypes.LicenseModel] `tfsdk:"license_model"` - ListenerPort types.Int32 `tfsdk:"listener_port"` - MemorySizeInGbs types.Int32 `tfsdk:"memory_size_in_gbs"` - NodeCount types.Int32 `tfsdk:"node_count"` - Ocid types.String `tfsdk:"ocid"` - OciResourceAnchorName types.String `tfsdk:"oci_resource_anchor_name"` - OciUrl types.String `tfsdk:"oci_url"` - OdbNetworkId types.String `tfsdk:"odb_network_id"` - PercentProgress types.Float64 `tfsdk:"percent_progress"` - ScanDnsName types.String `tfsdk:"scan_dns_name"` - ScanDnsRecordId types.String `tfsdk:"scan_dns_record_id"` - ScanIpIds fwtypes.ListValueOf[types.String] `tfsdk:"scan_ip_ids"` - Shape types.String `tfsdk:"shape"` - SshPublicKeys fwtypes.ListValueOf[types.String] `tfsdk:"ssh_public_keys"` - Status fwtypes.StringEnum[odbtypes.ResourceStatus] `tfsdk:"status"` - StatusReason types.String `tfsdk:"status_reason"` - StorageSizeInGBs types.Int32 `tfsdk:"storage_size_in_gbs"` - SystemVersion types.String `tfsdk:"system_version"` - Timezone types.String `tfsdk:"timezone"` - VipIds fwtypes.ListValueOf[types.String] `tfsdk:"vip_ids"` - CreatedAt types.String `tfsdk:"created_at"` - ComputeModel fwtypes.StringEnum[odbtypes.ComputeModel] `tfsdk:"compute_model"` -} - -type dataCollectionOptions struct { - IsDiagnosticsEventsEnabled types.Bool `tfsdk:"is_diagnostics_events_enabled"` - IsHealthMonitoringEnabled types.Bool `tfsdk:"is_health_monitoring_enabled"` - IsIncidentLogsEnabled types.Bool `tfsdk:"is_incident_logs_enabled"` -} - -type exadataIormConfig struct { - DbPlans fwtypes.ListNestedObjectValueOf[dbIormConfig] `tfsdk:"db_plans"` - LifecycleDetails types.String `tfsdk:"lifecycle_details"` - LifecycleState fwtypes.StringEnum[odbtypes.IormLifecycleState] `tfsdk:"lifecycle_state"` - Objective fwtypes.StringEnum[odbtypes.Objective] `tfsdk:"objective"` -} - -type dbIormConfig struct { - DbName types.String `tfsdk:"db_name"` - FlashCacheLimit types.String `tfsdk:"flash_cache_limit"` - Share types.Int32 `tfsdk:"share"` -} diff --git a/internal/service/odb/cloud_vm_cluster_data_source_test.go b/internal/service/odb/cloud_vm_cluster_data_source_test.go deleted file mode 100644 index c7e688523d98..000000000000 --- a/internal/service/odb/cloud_vm_cluster_data_source_test.go +++ /dev/null @@ -1,165 +0,0 @@ -//Copyright © 2025, Oracle and/or its affiliates. All rights reserved. - -package odb_test - -import ( - "context" - "errors" - "fmt" - "github.com/aws/aws-sdk-go-v2/service/odb" - odbtypes "github.com/aws/aws-sdk-go-v2/service/odb/types" - sdkacctest "github.com/hashicorp/terraform-plugin-testing/helper/acctest" - "github.com/hashicorp/terraform-plugin-testing/terraform" - "github.com/hashicorp/terraform-provider-aws/internal/acctest" - "github.com/hashicorp/terraform-provider-aws/internal/conns" - "github.com/hashicorp/terraform-provider-aws/internal/create" - tfodb "github.com/hashicorp/terraform-provider-aws/internal/service/odb" - "github.com/hashicorp/terraform-provider-aws/internal/tfresource" - "github.com/hashicorp/terraform-provider-aws/names" - "testing" -) - -import ( - "github.com/hashicorp/terraform-plugin-testing/helper/resource" -) - -type cloudVmClusterDSTest struct { - vmClusterDisplayNamePrefix string - exaInfraDisplayNamePrefix string - odbNetDisplayNamePrefix string -} - -var vmClusterTestDS = cloudVmClusterDSTest{ - vmClusterDisplayNamePrefix: "Ofake-vmc", - exaInfraDisplayNamePrefix: "Ofake-exa-infra", - odbNetDisplayNamePrefix: "odb-net", -} - -func TestAccODBCloudVmClusterDataSource_basic(t *testing.T) { - ctx := acctest.Context(t) - - if testing.Short() { - t.Skip("skipping long-running test in short mode") - } - - var cloudvmcluster odbtypes.CloudVmCluster - vmcDisplayName := sdkacctest.RandomWithPrefix(vmClusterTestDS.vmClusterDisplayNamePrefix) - dataSourceName := "data.aws_odb_cloud_vm_cluster.test" - publicKey, _, err := sdkacctest.RandSSHKeyPair(acctest.DefaultEmailAddress) - if err != nil { - t.Fatal(err) - return - } - resource.ParallelTest(t, resource.TestCase{ - PreCheck: func() { - acctest.PreCheck(ctx, t) - // testAccPreCheck(ctx, t) - }, - ErrorCheck: acctest.ErrorCheck(t, names.ODBServiceID), - ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, - CheckDestroy: vmClusterTestDS.testAccCheckCloudVmClusterDestroy(ctx), - Steps: []resource.TestStep{ - { - Config: vmClusterTestDS.cloudVmClusterWithHardcoded("odbnet_c91byo6y6m", "exa_ji5quxxzn9", vmcDisplayName, publicKey), - Check: resource.ComposeAggregateTestCheckFunc( - vmClusterTestDS.testAccCheckCloudVmClusterExists(ctx, dataSourceName, &cloudvmcluster), - resource.TestCheckResourceAttr(dataSourceName, "display_name", vmcDisplayName), - ), - }, - }, - }) -} - -func (cloudVmClusterDSTest) testAccCheckCloudVmClusterDestroy(ctx context.Context) resource.TestCheckFunc { - return func(s *terraform.State) error { - conn := acctest.Provider.Meta().(*conns.AWSClient).ODBClient(ctx) - - for _, rs := range s.RootModule().Resources { - if rs.Type != "aws_odb_cloud_vm_cluster" { - continue - } - - _, err := tfodb.FindCloudVmClusterForResourceByID(ctx, conn, rs.Primary.ID) - if tfresource.NotFound(err) { - return nil - } - if err != nil { - return create.Error(names.ODB, create.ErrActionCheckingDestroyed, tfodb.ResNameCloudVmCluster, rs.Primary.ID, err) - } - - return create.Error(names.ODB, create.ErrActionCheckingDestroyed, tfodb.ResNameCloudVmCluster, rs.Primary.ID, errors.New("not destroyed")) - } - - return nil - } -} - -func (cloudVmClusterDSTest) testAccCheckCloudVmClusterExists(ctx context.Context, name string, cloudvmcluster *odbtypes.CloudVmCluster) resource.TestCheckFunc { - return func(s *terraform.State) error { - rs, ok := s.RootModule().Resources[name] - if !ok { - return create.Error(names.ODB, create.ErrActionCheckingExistence, tfodb.ResNameCloudVmCluster, name, errors.New("not found")) - } - - if rs.Primary.ID == "" { - return create.Error(names.ODB, create.ErrActionCheckingExistence, tfodb.ResNameCloudVmCluster, name, errors.New("not set")) - } - - conn := acctest.Provider.Meta().(*conns.AWSClient).ODBClient(ctx) - - resp, err := tfodb.FindCloudVmClusterForResourceByID(ctx, conn, rs.Primary.ID) - if err != nil { - return create.Error(names.ODB, create.ErrActionCheckingExistence, tfodb.ResNameCloudVmCluster, rs.Primary.ID, err) - } - - *cloudvmcluster = *resp - - return nil - } -} - -func (cloudVmClusterDSTest) testAccPreCheck(ctx context.Context, t *testing.T) { - conn := acctest.Provider.Meta().(*conns.AWSClient).ODBClient(ctx) - - input := &odb.ListCloudVmClustersInput{} - - _, err := conn.ListCloudVmClusters(ctx, input) - - if acctest.PreCheckSkipError(err) { - t.Skipf("skipping acceptance testing: %s", err) - } - if err != nil { - t.Fatalf("unexpected PreCheck error: %s", err) - } -} - -func (cloudVmClusterDSTest) cloudVmClusterWithHardcoded(odbNet, exaInfra, displayName, sshKey string) string { - dsTfCodeVmCluster := fmt.Sprintf(` -resource "aws_odb_cloud_vm_cluster" "test" { - odb_network_id = %[1]q - cloud_exadata_infrastructure_id = %[2]q - display_name = %[3]q - ssh_public_keys = [%[4]q] - cpu_core_count = 6 - gi_version = "23.0.0.0" - hostname_prefix = "apollo12" - is_local_backup_enabled = true - is_sparse_diskgroup_enabled = true - license_model = "LICENSE_INCLUDED" - data_storage_size_in_tbs = 20.0 - db_servers = [ "dbs_7ecm4wbjxy","dbs_uy5wmaqk6s"] - db_node_storage_size_in_gbs = 120.0 - memory_size_in_gbs = 60 - tags = { - "env"= "dev" - } - -} - -data "aws_odb_cloud_vm_cluster" "test" { - id = aws_odb_cloud_vm_cluster.test.id -} -`, odbNet, exaInfra, displayName, sshKey) - //fmt.Println(dsTfCodeVmCluster) - return dsTfCodeVmCluster -} diff --git a/internal/service/odb/cloud_vm_cluster_test.go b/internal/service/odb/cloud_vm_cluster_test.go deleted file mode 100644 index 98de316a7e2d..000000000000 --- a/internal/service/odb/cloud_vm_cluster_test.go +++ /dev/null @@ -1,565 +0,0 @@ -//Copyright © 2025, Oracle and/or its affiliates. All rights reserved. - -package odb_test - -import ( - "context" - "errors" - "fmt" - "github.com/aws/aws-sdk-go-v2/service/odb" - "strings" - - odbtypes "github.com/aws/aws-sdk-go-v2/service/odb/types" - sdkacctest "github.com/hashicorp/terraform-plugin-testing/helper/acctest" - "github.com/hashicorp/terraform-plugin-testing/helper/resource" - "github.com/hashicorp/terraform-plugin-testing/terraform" - "github.com/hashicorp/terraform-provider-aws/internal/acctest" - "github.com/hashicorp/terraform-provider-aws/internal/conns" - "github.com/hashicorp/terraform-provider-aws/internal/create" - - tfodb "github.com/hashicorp/terraform-provider-aws/internal/service/odb" - "github.com/hashicorp/terraform-provider-aws/internal/tfresource" - "github.com/hashicorp/terraform-provider-aws/names" - "testing" -) - -type cloudVmClusterResourceTest struct { - vmClusterDisplayNamePrefix string - exaInfraDisplayNamePrefix string - odbNetDisplayNamePrefix string -} - -var vmClusterTestResource = cloudVmClusterResourceTest{ - vmClusterDisplayNamePrefix: "Ofake-vmc", - exaInfraDisplayNamePrefix: "Ofake-exa-infra", - odbNetDisplayNamePrefix: "odb-net", -} - -func TestPrintCloudVmClusterUnitTest(t *testing.T) { - vmcRName := sdkacctest.RandomWithPrefix(vmClusterTestResource.vmClusterDisplayNamePrefix) - exaInfraRName := sdkacctest.RandomWithPrefix(vmClusterTestResource.exaInfraDisplayNamePrefix) - odbNetRName := sdkacctest.RandomWithPrefix(vmClusterTestResource.odbNetDisplayNamePrefix) - - publicKey, _, err := sdkacctest.RandSSHKeyPair(acctest.DefaultEmailAddress) - if err != nil { - t.Fatal(err) - return - } - fmt.Println(vmClusterTestResource.testAccCloudVmClusterConfigBasic(vmClusterTestResource.exaInfra(exaInfraRName), vmClusterTestResource.odbNetwork(odbNetRName), vmcRName, publicKey)) -} - -func TestAccODBCloudVmCluster_basic(t *testing.T) { - ctx := acctest.Context(t) - if testing.Short() { - t.Skip("skipping long-running test in short mode") - } - - var cloudvmcluster odbtypes.CloudVmCluster - vmcRName := sdkacctest.RandomWithPrefix(vmClusterTestResource.vmClusterDisplayNamePrefix) - exaInfraRName := sdkacctest.RandomWithPrefix(vmClusterTestResource.exaInfraDisplayNamePrefix) - odbNetRName := sdkacctest.RandomWithPrefix(vmClusterTestResource.odbNetDisplayNamePrefix) - - publicKey, _, err := sdkacctest.RandSSHKeyPair(acctest.DefaultEmailAddress) - if err != nil { - t.Fatal(err) - return - } - resourceName := "aws_odb_cloud_vm_cluster.test" - - resource.ParallelTest(t, resource.TestCase{ - PreCheck: func() { - acctest.PreCheck(ctx, t) - //acctest.PreCheckPartitionHasService(t, names.ODBEndpointID) - vmClusterTestResource.testAccPreCheck(ctx, t) - }, - ErrorCheck: acctest.ErrorCheck(t, names.ODBServiceID), - ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, - CheckDestroy: vmClusterTestResource.testAccCheckCloudVmClusterDestroy(ctx), - Steps: []resource.TestStep{ - { - Config: vmClusterTestResource.testAccCloudVmClusterConfigBasic(vmClusterTestResource.exaInfra(exaInfraRName), vmClusterTestResource.odbNetwork(odbNetRName), vmcRName, publicKey), - Check: resource.ComposeAggregateTestCheckFunc( - vmClusterTestResource.testAccCheckCloudVmClusterExists(ctx, resourceName, &cloudvmcluster), - ), - }, - { - ResourceName: resourceName, - ImportState: true, - ImportStateVerify: true, - }, - }, - }) -} - -func TestAccODBCloudVmClusterCreationWithAllParams(t *testing.T) { - ctx := acctest.Context(t) - if testing.Short() { - t.Skip("skipping long-running test in short mode") - } - - var cloudvmcluster odbtypes.CloudVmCluster - vmcRName := sdkacctest.RandomWithPrefix(vmClusterTestResource.vmClusterDisplayNamePrefix) - exaInfraRName := sdkacctest.RandomWithPrefix(vmClusterTestResource.exaInfraDisplayNamePrefix) - odbNetRName := sdkacctest.RandomWithPrefix(vmClusterTestResource.odbNetDisplayNamePrefix) - - publicKey, _, err := sdkacctest.RandSSHKeyPair(acctest.DefaultEmailAddress) - if err != nil { - t.Fatal(err) - return - } - resourceName := "aws_odb_cloud_vm_cluster.test" - - resource.ParallelTest(t, resource.TestCase{ - PreCheck: func() { - acctest.PreCheck(ctx, t) - //acctest.PreCheckPartitionHasService(t, names.ODBEndpointID) - vmClusterTestResource.testAccPreCheck(ctx, t) - }, - ErrorCheck: acctest.ErrorCheck(t, names.ODBServiceID), - ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, - CheckDestroy: vmClusterTestResource.testAccCheckCloudVmClusterDestroy(ctx), - Steps: []resource.TestStep{ - { - Config: vmClusterTestResource.cloudVmClusterWithAllParameters(vmClusterTestResource.exaInfra(exaInfraRName), vmClusterTestResource.odbNetwork(odbNetRName), vmcRName, publicKey), - Check: resource.ComposeAggregateTestCheckFunc( - vmClusterTestResource.testAccCheckCloudVmClusterExists(ctx, resourceName, &cloudvmcluster), - ), - }, - { - ResourceName: resourceName, - ImportState: true, - ImportStateVerify: true, - }, - }, - }) -} - -func TestAccODBCloudVmClusterAddRemoveTags(t *testing.T) { - ctx := acctest.Context(t) - // TIP: This is a long-running test guard for tests that run longer than - // 300s (5 min) generally. - if testing.Short() { - t.Skip("skipping long-running test in short mode") - } - - var cloudvmcluster1 odbtypes.CloudVmCluster - var cloudvmcluster2 odbtypes.CloudVmCluster - var cloudvmcluster3 odbtypes.CloudVmCluster - rName := sdkacctest.RandomWithPrefix(vmClusterTestResource.vmClusterDisplayNamePrefix) - exaInfraRName := sdkacctest.RandomWithPrefix(vmClusterTestResource.exaInfraDisplayNamePrefix) - odbNetRName := sdkacctest.RandomWithPrefix(vmClusterTestResource.odbNetDisplayNamePrefix) - resourceName := "aws_odb_cloud_vm_cluster.test" - - publicKey, _, err := sdkacctest.RandSSHKeyPair(acctest.DefaultEmailAddress) - if err != nil { - t.Fatal(err) - return - } - - resource.ParallelTest(t, resource.TestCase{ - PreCheck: func() { - acctest.PreCheck(ctx, t) - //acctest.PreCheckPartitionHasService(t, names.ODBEndpointID) - vmClusterTestResource.testAccPreCheck(ctx, t) - }, - ErrorCheck: acctest.ErrorCheck(t, names.ODBServiceID), - ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, - CheckDestroy: vmClusterTestResource.testAccCheckCloudVmClusterDestroy(ctx), - Steps: []resource.TestStep{ - { - Config: vmClusterTestResource.testAccCloudVmClusterConfigBasic(vmClusterTestResource.exaInfra(exaInfraRName), vmClusterTestResource.odbNetwork(odbNetRName), rName, publicKey), - Check: resource.ComposeAggregateTestCheckFunc( - resource.ComposeTestCheckFunc(func(state *terraform.State) error { - return nil - }), - vmClusterTestResource.testAccCheckCloudVmClusterExists(ctx, resourceName, &cloudvmcluster1), - resource.TestCheckResourceAttr(resourceName, "tags.%", "1"), - resource.TestCheckResourceAttr(resourceName, "tags.env", "dev"), - ), - }, - { - ResourceName: resourceName, - ImportState: true, - ImportStateVerify: true, - }, - { - Config: vmClusterTestResource.testAccCloudVmClusterConfigUpdatedTags(vmClusterTestResource.exaInfra(exaInfraRName), vmClusterTestResource.odbNetwork(odbNetRName), rName, publicKey), - Check: resource.ComposeAggregateTestCheckFunc( - resource.TestCheckResourceAttr(resourceName, "tags.%", "2"), - resource.TestCheckResourceAttr(resourceName, "tags.env", "dev"), - resource.TestCheckResourceAttr(resourceName, "tags.foo", "bar"), - vmClusterTestResource.testAccCheckCloudVmClusterExists(ctx, resourceName, &cloudvmcluster2), - resource.ComposeTestCheckFunc(func(state *terraform.State) error { - if strings.Compare(*(cloudvmcluster1.CloudVmClusterId), *(cloudvmcluster2.CloudVmClusterId)) != 0 { - return errors.New("Should not create a new cloud vm cluster for tag update") - } - return nil - }), - ), - }, - { - ResourceName: resourceName, - ImportState: true, - ImportStateVerify: true, - }, - { - Config: vmClusterTestResource.testAccCloudVmClusterConfigBasic(vmClusterTestResource.exaInfra(exaInfraRName), vmClusterTestResource.odbNetwork(odbNetRName), rName, publicKey), - Check: resource.ComposeAggregateTestCheckFunc( - vmClusterTestResource.testAccCheckCloudVmClusterExists(ctx, resourceName, &cloudvmcluster3), - resource.ComposeTestCheckFunc(func(state *terraform.State) error { - if strings.Compare(*(cloudvmcluster1.CloudVmClusterId), *(cloudvmcluster3.CloudVmClusterId)) != 0 { - return errors.New("Should not create a new cloud vm cluster for tag update") - } - return nil - }), - - resource.TestCheckResourceAttr(resourceName, "tags.%", "1"), - resource.TestCheckResourceAttr(resourceName, "tags.env", "dev"), - ), - }, - { - ResourceName: resourceName, - ImportState: true, - ImportStateVerify: true, - }, - }, - }) -} - -func TestAccODBCloudVmCluster_recreates_new(t *testing.T) { - ctx := acctest.Context(t) - // TIP: This is a long-running test guard for tests that run longer than - // 300s (5 min) generally. - if testing.Short() { - t.Skip("skipping long-running test in short mode") - } - - var cloudvmcluster1 odbtypes.CloudVmCluster - var cloudvmcluster2 odbtypes.CloudVmCluster - rName := sdkacctest.RandomWithPrefix(vmClusterTestResource.vmClusterDisplayNamePrefix) - exaInfraRName := sdkacctest.RandomWithPrefix(vmClusterTestResource.exaInfraDisplayNamePrefix) - odbNetRName := sdkacctest.RandomWithPrefix(vmClusterTestResource.odbNetDisplayNamePrefix) - - resourceName := "aws_odb_cloud_vm_cluster.test" - publicKey, _, err := sdkacctest.RandSSHKeyPair(acctest.DefaultEmailAddress) - if err != nil { - t.Fatal(err) - return - } - - resource.ParallelTest(t, resource.TestCase{ - PreCheck: func() { - acctest.PreCheck(ctx, t) - //acctest.PreCheckPartitionHasService(t, names.ODBEndpointID) - vmClusterTestResource.testAccPreCheck(ctx, t) - }, - ErrorCheck: acctest.ErrorCheck(t, names.ODBServiceID), - ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, - CheckDestroy: vmClusterTestResource.testAccCheckCloudVmClusterDestroy(ctx), - Steps: []resource.TestStep{ - { - Config: vmClusterTestResource.testAccCloudVmClusterConfigBasic(vmClusterTestResource.exaInfra(exaInfraRName), vmClusterTestResource.odbNetwork(odbNetRName), rName, publicKey), - Check: resource.ComposeAggregateTestCheckFunc( - resource.ComposeTestCheckFunc(func(state *terraform.State) error { - //fmt.Println(state) - return nil - }), - vmClusterTestResource.testAccCheckCloudVmClusterExists(ctx, resourceName, &cloudvmcluster1), - resource.TestCheckResourceAttr(resourceName, "tags.%", "1"), - resource.TestCheckResourceAttr(resourceName, "tags.env", "dev"), - ), - }, - { - Config: vmClusterTestResource.testAccCloudVmClusterConfigUpdatedTags(vmClusterTestResource.exaInfra(exaInfraRName+"_u"), vmClusterTestResource.odbNetwork(odbNetRName), rName, publicKey), - Check: resource.ComposeAggregateTestCheckFunc( - resource.TestCheckResourceAttr(resourceName, "tags.%", "2"), - resource.TestCheckResourceAttr(resourceName, "tags.env", "dev"), - resource.TestCheckResourceAttr(resourceName, "tags.foo", "bar"), - vmClusterTestResource.testAccCheckCloudVmClusterExists(ctx, resourceName, &cloudvmcluster2), - resource.ComposeTestCheckFunc(func(state *terraform.State) error { - //fmt.Println(state) - if strings.Compare(*(cloudvmcluster1.CloudVmClusterId), *(cloudvmcluster2.CloudVmClusterId)) == 0 { - return errors.New("Should create a new cloud vm cluster for tag update") - } - return nil - }), - ), - }, - { - ResourceName: resourceName, - ImportState: true, - ImportStateVerify: true, - }, - }, - }) -} - -func TestAccODBCloudVmCluster_disappears(t *testing.T) { - ctx := acctest.Context(t) - if testing.Short() { - t.Skip("skipping long-running test in short mode") - } - - var cloudvmcluster odbtypes.CloudVmCluster - rName := sdkacctest.RandomWithPrefix(vmClusterTestResource.vmClusterDisplayNamePrefix) - exaInfraRName := sdkacctest.RandomWithPrefix(vmClusterTestResource.exaInfraDisplayNamePrefix) - odbNetRName := sdkacctest.RandomWithPrefix(vmClusterTestResource.odbNetDisplayNamePrefix) - - resourceName := "aws_odb_cloud_vm_cluster.test" - publicKey, _, err := sdkacctest.RandSSHKeyPair(acctest.DefaultEmailAddress) - if err != nil { - t.Fatal(err) - return - } - resource.ParallelTest(t, resource.TestCase{ - PreCheck: func() { - acctest.PreCheck(ctx, t) - //acctest.PreCheckPartitionHasService(t, names.ODBEndpointID) - vmClusterTestResource.testAccPreCheck(ctx, t) - }, - ErrorCheck: acctest.ErrorCheck(t, names.ODBServiceID), - ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, - CheckDestroy: vmClusterTestResource.testAccCheckCloudVmClusterDestroy(ctx), - Steps: []resource.TestStep{ - { - Config: vmClusterTestResource.testAccCloudVmClusterConfigBasic(vmClusterTestResource.exaInfra(exaInfraRName), vmClusterTestResource.odbNetwork(odbNetRName), rName, publicKey), - Check: resource.ComposeAggregateTestCheckFunc( - vmClusterTestResource.testAccCheckCloudVmClusterExists(ctx, resourceName, &cloudvmcluster), - acctest.CheckFrameworkResourceDisappears(ctx, acctest.Provider, tfodb.ResourceCloudVmCluster, resourceName), - ), - ExpectNonEmptyPlan: true, - }, - }, - }) -} - -func (cloudVmClusterResourceTest) testAccCheckCloudVmClusterDestroy(ctx context.Context) resource.TestCheckFunc { - return func(s *terraform.State) error { - conn := acctest.Provider.Meta().(*conns.AWSClient).ODBClient(ctx) - - for _, rs := range s.RootModule().Resources { - if rs.Type != "aws_odb_cloud_vm_cluster" { - continue - } - - _, err := tfodb.FindCloudVmClusterForResourceByID(ctx, conn, rs.Primary.ID) - if tfresource.NotFound(err) { - return nil - } - if err != nil { - return create.Error(names.ODB, create.ErrActionCheckingDestroyed, tfodb.ResNameCloudVmCluster, rs.Primary.ID, err) - } - - return create.Error(names.ODB, create.ErrActionCheckingDestroyed, tfodb.ResNameCloudVmCluster, rs.Primary.ID, errors.New("not destroyed")) - } - - return nil - } -} - -func (cloudVmClusterResourceTest) testAccCheckCloudVmClusterExists(ctx context.Context, name string, cloudvmcluster *odbtypes.CloudVmCluster) resource.TestCheckFunc { - return func(s *terraform.State) error { - rs, ok := s.RootModule().Resources[name] - if !ok { - return create.Error(names.ODB, create.ErrActionCheckingExistence, tfodb.ResNameCloudVmCluster, name, errors.New("not found")) - } - - if rs.Primary.ID == "" { - return create.Error(names.ODB, create.ErrActionCheckingExistence, tfodb.ResNameCloudVmCluster, name, errors.New("not set")) - } - - conn := acctest.Provider.Meta().(*conns.AWSClient).ODBClient(ctx) - - resp, err := tfodb.FindCloudVmClusterForResourceByID(ctx, conn, rs.Primary.ID) - if err != nil { - return create.Error(names.ODB, create.ErrActionCheckingExistence, tfodb.ResNameCloudVmCluster, rs.Primary.ID, err) - } - - *cloudvmcluster = *resp - - return nil - } -} - -func (cloudVmClusterResourceTest) testAccPreCheck(ctx context.Context, t *testing.T) { - conn := acctest.Provider.Meta().(*conns.AWSClient).ODBClient(ctx) - - input := &odb.ListCloudVmClustersInput{} - - _, err := conn.ListCloudVmClusters(ctx, input) - - if acctest.PreCheckSkipError(err) { - t.Skipf("skipping acceptance testing: %s", err) - } - if err != nil { - t.Fatalf("unexpected PreCheck error: %s", err) - } -} - -/*func testAccCheckCloudVmClusterNotRecreated(before, after *odb.DescribeCloudVmClusterResponse) resource.TestCheckFunc { - return func(s *terraform.State) error { - if before, after := aws.ToString(before.CloudVmClusterId), aws.ToString(after.CloudVmClusterId); before != after { - return create.Error(names.ODB, create.ErrActionCheckingNotRecreated, tfodb.ResNameCloudVmCluster, aws.ToString(before.CloudVmClusterId), errors.New("recreated")) - } - - return nil - } -}*/ - -func (cloudVmClusterResourceTest) testAccCloudVmClusterConfigBasic(exaInfra, odbNet, rName, sshKey string) string { - - res := fmt.Sprintf(` -%s - -%s - -data "aws_odb_db_servers_list" "test" { - cloud_exadata_infrastructure_id = aws_odb_cloud_exadata_infrastructure.test.id -} - -resource "aws_odb_cloud_vm_cluster" "test" { - display_name = %[3]q - cloud_exadata_infrastructure_id = aws_odb_cloud_exadata_infrastructure.test.id - cpu_core_count = 6 - gi_version = "23.0.0.0" - hostname_prefix = "apollo12" - ssh_public_keys = [%[4]q] - odb_network_id = aws_odb_network.test.id - is_local_backup_enabled = true - is_sparse_diskgroup_enabled = true - license_model = "LICENSE_INCLUDED" - data_storage_size_in_tbs = 20.0 - db_servers = [ for db_server in data.aws_odb_db_servers_list.test.db_servers : db_server.id] - db_node_storage_size_in_gbs = 120.0 - memory_size_in_gbs = 60 - tags = { - "env"= "dev" - } - -} -`, exaInfra, odbNet, rName, sshKey) - return res -} - -func (cloudVmClusterResourceTest) testAccCloudVmClusterConfigUpdatedTags(exaInfra, odbNet, rName, sshKey string) string { - - res := fmt.Sprintf(` -%s - -%s - -data "aws_odb_db_servers_list" "test" { - cloud_exadata_infrastructure_id = aws_odb_cloud_exadata_infrastructure.test.id -} - -resource "aws_odb_cloud_vm_cluster" "test" { - display_name = %[3]q - cloud_exadata_infrastructure_id = aws_odb_cloud_exadata_infrastructure.test.id - cpu_core_count = 6 - gi_version = "23.0.0.0" - hostname_prefix = "apollo12" - ssh_public_keys = [%[4]q] - odb_network_id = aws_odb_network.test.id - is_local_backup_enabled = true - is_sparse_diskgroup_enabled = true - license_model = "LICENSE_INCLUDED" - data_storage_size_in_tbs = 20.0 - db_servers = [ for db_server in data.aws_odb_db_servers_list.test.db_servers : db_server.id] - db_node_storage_size_in_gbs = 120.0 - memory_size_in_gbs = 60 - tags = { - "env"= "dev" - "foo"= "bar" - } - -} -`, exaInfra, odbNet, rName, sshKey) - return res -} - -func (cloudVmClusterResourceTest) exaInfra(rName string) string { - resource := fmt.Sprintf(` -resource "aws_odb_cloud_exadata_infrastructure" "test" { - display_name = "%[1]s" - shape = "Exadata.X9M" - storage_count = 3 - compute_count = 2 - availability_zone_id = "use1-az6" - customer_contacts_to_send_to_oci = ["abc@example.com"] - maintenance_window = { - custom_action_timeout_in_mins = 16 - days_of_week = [] - hours_of_day = [] - is_custom_action_timeout_enabled = true - lead_time_in_weeks = 0 - months = [] - patching_mode = "ROLLING" - preference = "NO_PREFERENCE" - weeks_of_month =[] - } - -} -`, rName) - //fmt.Println(resource) - return resource -} - -func (cloudVmClusterResourceTest) odbNetwork(rName string) string { - resource := fmt.Sprintf(` -resource "aws_odb_network" "test" { - display_name = %[1]q - availability_zone_id = "use1-az6" - client_subnet_cidr = "10.2.0.0/24" - backup_subnet_cidr = "10.2.1.0/24" - s3_access = "DISABLED" - zero_etl_access = "DISABLED" -} -`, rName) - //fmt.Println(resource) - return resource -} - -func (cloudVmClusterResourceTest) cloudVmClusterWithAllParameters(exaInfra, odbNet, rName, sshKey string) string { - - res := fmt.Sprintf(` - -%s - -%s - - -data "aws_odb_db_servers_list" "test" { - cloud_exadata_infrastructure_id = aws_odb_cloud_exadata_infrastructure.test.id -} - -resource "aws_odb_cloud_vm_cluster" "test" { - display_name = %[3]q - cloud_exadata_infrastructure_id = aws_odb_cloud_exadata_infrastructure.test.id - cpu_core_count = 6 - gi_version = "23.0.0.0" - hostname_prefix = "apollo12" - ssh_public_keys = [%[4]q] - odb_network_id = aws_odb_network.test.id - is_local_backup_enabled = true - is_sparse_diskgroup_enabled = true - license_model = "LICENSE_INCLUDED" - data_storage_size_in_tbs = 20.0 - db_servers = [ for db_server in data.aws_odb_db_servers_list.test.db_servers : db_server.id] - db_node_storage_size_in_gbs = 120.0 - memory_size_in_gbs = 60 - cluster_name = "julia-13" - timezone = "UTC" - scan_listener_port_tcp = 1521 - system_version = "23.1.26.0.0.250516" - tags = { - "env"= "dev" - } - data_collection_options ={ - is_diagnostics_events_enabled = true - is_health_monitoring_enabled = true - is_incident_logs_enabled = true - } -} -`, exaInfra, odbNet, rName, sshKey) - return res -} diff --git a/internal/service/odb/cloud_vm_clusters_list_data_source.go b/internal/service/odb/cloud_vm_clusters_list_data_source.go deleted file mode 100644 index 1bf76740aec1..000000000000 --- a/internal/service/odb/cloud_vm_clusters_list_data_source.go +++ /dev/null @@ -1,95 +0,0 @@ -//Copyright © 2025, Oracle and/or its affiliates. All rights reserved. - -package odb - -import ( - "context" - "github.com/hashicorp/terraform-plugin-framework/attr" - - "github.com/aws/aws-sdk-go-v2/service/odb" - - "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/create" - "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/names" -) - -// Function annotations are used for datasource registration to the Provider. DO NOT EDIT. -// @FrameworkDataSource("aws_odb_cloud_vm_clusters_list", name="Cloud Vm Clusters List") -func newDataSourceCloudVmClustersList(context.Context) (datasource.DataSourceWithConfigure, error) { - return &dataSourceCloudVmClustersList{}, nil -} - -const ( - DSNameCloudVmClustersList = "Cloud Vm Clusters List Data Source" -) - -type dataSourceCloudVmClustersList struct { - framework.DataSourceWithModel[dataSourceCloudVmClustersListModel] -} - -func (d *dataSourceCloudVmClustersList) Schema(ctx context.Context, req datasource.SchemaRequest, resp *datasource.SchemaResponse) { - resp.Schema = schema.Schema{ - Attributes: map[string]schema.Attribute{ - "cloud_vm_clusters": schema.ListAttribute{ - Computed: true, - Description: "List of Cloud VM Clusters (OCID, ID, ARN, OCI URL, Display Name)", - CustomType: fwtypes.NewListNestedObjectTypeOf[cloudAutonomousVmClusterSummary](ctx), - ElementType: types.ObjectType{ - AttrTypes: map[string]attr.Type{ - "arn": types.StringType, - "id": types.StringType, - "oci_url": types.StringType, - "ocid": types.StringType, - "display_name": types.StringType, - }, - }, - }, - }, - } -} - -// Data sources only have a read method. -func (d *dataSourceCloudVmClustersList) Read(ctx context.Context, req datasource.ReadRequest, resp *datasource.ReadResponse) { - - conn := d.Meta().ODBClient(ctx) - - var data dataSourceCloudVmClustersListModel - resp.Diagnostics.Append(req.Config.Get(ctx, &data)...) - if resp.Diagnostics.HasError() { - return - } - - out, err := conn.ListCloudVmClusters(ctx, &odb.ListCloudVmClustersInput{}) - if err != nil { - resp.Diagnostics.AddError( - create.ProblemStandardMessage(names.ODB, create.ErrActionReading, DSNameCloudVmClustersList, "", err), - err.Error(), - ) - return - } - - resp.Diagnostics.Append(flex.Flatten(ctx, out, &data)...) - if resp.Diagnostics.HasError() { - return - } - - resp.Diagnostics.Append(resp.State.Set(ctx, &data)...) -} - -type dataSourceCloudVmClustersListModel struct { - framework.WithRegionModel - CloudVmClusters fwtypes.ListNestedObjectValueOf[cloudVmClusterSummary] `tfsdk:"cloud_vm_clusters"` -} - -type cloudVmClusterSummary struct { - CloudExadataInfrastructureArn types.String `tfsdk:"arn"` - CloudAutonomousVmClusterId types.String `tfsdk:"id"` - OciUrl types.String `tfsdk:"oci_url"` - Ocid types.String `tfsdk:"ocid"` - DisplayName types.String `tfsdk:"display_name"` -} diff --git a/internal/service/odb/cloud_vm_clusters_list_data_source_test.go b/internal/service/odb/cloud_vm_clusters_list_data_source_test.go deleted file mode 100644 index c06772c2db74..000000000000 --- a/internal/service/odb/cloud_vm_clusters_list_data_source_test.go +++ /dev/null @@ -1,101 +0,0 @@ -//Copyright © 2025, Oracle and/or its affiliates. All rights reserved. - -package odb_test - -import ( - "context" - "errors" - "fmt" - "strconv" - - "testing" - - "github.com/aws/aws-sdk-go-v2/service/odb" - - "github.com/hashicorp/terraform-plugin-testing/helper/resource" - "github.com/hashicorp/terraform-plugin-testing/terraform" - "github.com/hashicorp/terraform-provider-aws/internal/acctest" - "github.com/hashicorp/terraform-provider-aws/internal/conns" - "github.com/hashicorp/terraform-provider-aws/internal/create" - - tfodb "github.com/hashicorp/terraform-provider-aws/internal/service/odb" - "github.com/hashicorp/terraform-provider-aws/names" -) - -type listVMCListDSTest struct { -} - -func TestAccListVmClusterDataSource(t *testing.T) { - ctx := acctest.Context(t) - var vmcListTest = listVMCListDSTest{} - var output odb.ListCloudVmClustersOutput - - dataSourceName := "data.aws_odb_cloud_vm_clusters_list.test" - resource.Test(t, resource.TestCase{ - PreCheck: func() { - acctest.PreCheck(ctx, t) - vmcListTest.testAccPreCheck(ctx, t) - }, - ErrorCheck: acctest.ErrorCheck(t, names.ODBServiceID), - ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, - Steps: []resource.TestStep{ - { - Config: vmcListTest.basic(), - Check: resource.ComposeAggregateTestCheckFunc( - - resource.ComposeTestCheckFunc(func(s *terraform.State) error { - vmcListTest.count(ctx, dataSourceName, &output) - resource.TestCheckResourceAttr(dataSourceName, "cloud_autonomous_vm_clusters.#", strconv.Itoa(len(output.CloudVmClusters))) - return nil - }, - ), - ), - }, - }, - }) -} - -func (listVMCListDSTest) basic() string { - config := fmt.Sprintf(` - - -data "aws_odb_cloud_vm_clusters_list" "test" { - -} -`) - return config -} - -func (listVMCListDSTest) count(ctx context.Context, name string, list *odb.ListCloudVmClustersOutput) resource.TestCheckFunc { - return func(s *terraform.State) error { - rs, ok := s.RootModule().Resources[name] - if !ok { - return create.Error(names.ODB, create.ErrActionCheckingExistence, tfodb.ResNameCloudVmCluster, name, errors.New("not found")) - } - - conn := acctest.Provider.Meta().(*conns.AWSClient).ODBClient(ctx) - - resp, err := conn.ListCloudVmClusters(ctx, &odb.ListCloudVmClustersInput{}) - if err != nil { - return create.Error(names.ODB, create.ErrActionCheckingExistence, tfodb.ResNameCloudVmCluster, rs.Primary.ID, err) - } - - list.CloudVmClusters = resp.CloudVmClusters - - return nil - } -} -func (listVMCListDSTest) testAccPreCheck(ctx context.Context, t *testing.T) { - conn := acctest.Provider.Meta().(*conns.AWSClient).ODBClient(ctx) - - input := &odb.ListCloudVmClustersInput{} - - _, err := conn.ListCloudVmClusters(ctx, input) - - if acctest.PreCheckSkipError(err) { - t.Skipf("skipping acceptance testing: %s", err) - } - if err != nil { - t.Fatalf("unexpected PreCheck error: %s", err) - } -} diff --git a/internal/service/odb/db_server_data_source.go b/internal/service/odb/db_server_data_source.go deleted file mode 100644 index 77adc1626e1d..000000000000 --- a/internal/service/odb/db_server_data_source.go +++ /dev/null @@ -1,218 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package odb - -import ( - "context" - "github.com/hashicorp/terraform-plugin-framework/attr" - "time" - - "github.com/aws/aws-sdk-go-v2/service/odb" - odbtypes "github.com/aws/aws-sdk-go-v2/service/odb/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/create" - "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/names" -) - -// Function annotations are used for datasource registration to the Provider. DO NOT EDIT. -// @FrameworkDataSource("aws_odb_db_server", name="Db Server") -func newDataSourceDbServer(context.Context) (datasource.DataSourceWithConfigure, error) { - return &dataSourceDbServer{}, nil -} - -const ( - DSNameDbServer = "Db Server Data Source" -) - -type dataSourceDbServer struct { - framework.DataSourceWithModel[dbServerDataSourceModel] -} - -func (d *dataSourceDbServer) Schema(ctx context.Context, req datasource.SchemaRequest, resp *datasource.SchemaResponse) { - resp.Schema = schema.Schema{ - Attributes: map[string]schema.Attribute{ - names.AttrID: schema.StringAttribute{ - Description: "The identifier of the the database server.", - Required: true, - }, - "cloud_exadata_infrastructure_id": schema.StringAttribute{ - Description: "The identifier of the database server to retrieve information about.", - Required: true, - }, - "status": schema.StringAttribute{ - CustomType: fwtypes.StringEnumType[odbtypes.ResourceStatus](), - Computed: true, - Description: "The status of the database server.", - }, - "status_reason": schema.StringAttribute{ - Computed: true, - Description: "Additional information about the current status of the database server.", - }, - "cpu_core_count": schema.Int32Attribute{ - Computed: true, - Description: "The number of CPU cores enabled on the database server.", - }, - "db_node_ids": schema.ListAttribute{ - Computed: true, - CustomType: fwtypes.ListOfStringType, - ElementType: types.StringType, - }, - "db_node_storage_size_in_gbs": schema.Int32Attribute{ - Computed: true, - Description: "The allocated local node storage in GBs on the database server.", - }, - "db_server_patching_details": schema.ObjectAttribute{ - Description: "The scheduling details for the quarterly maintenance window. Patching and\n" + - "system updates take place during the maintenance window.", - Computed: true, - CustomType: fwtypes.NewObjectTypeOf[dbNodePatchingDetailsDbServerDataSourceModel](ctx), - AttributeTypes: map[string]attr.Type{ - "estimated_patch_duration": types.Int32Type, - "patching_status": types.StringType, - "time_patching_ended": types.StringType, - "time_patching_started": types.StringType, - }, - }, - "display_name": schema.StringAttribute{ - Computed: true, - Description: "The display name of the database server.", - }, - "exadata_infrastructure_id": schema.StringAttribute{ - Computed: true, - Description: "The exadata infrastructure ID of the database server.", - }, - "ocid": schema.StringAttribute{ - Computed: true, - Description: "The OCID of the database server to retrieve information about.", - }, - "oci_resource_anchor_name": schema.StringAttribute{ - Computed: true, - Description: "The name of the OCI resource anchor.", - }, - "max_cpu_count": schema.Int32Attribute{ - Computed: true, - Description: "The total number of CPU cores available.", - }, - "max_db_node_storage_in_gbs": schema.Int32Attribute{ - Computed: true, - Description: "The total local node storage available in GBs.", - }, - "max_memory_in_gbs": schema.Int32Attribute{ - Computed: true, - Description: "The total memory available in GBs.", - }, - "memory_size_in_gbs": schema.Int32Attribute{ - Computed: true, - Description: "The allocated memory in GBs on the database server.", - }, - "shape": schema.StringAttribute{ - Computed: true, - Description: "// The shape of the database server. The shape determines the amount of CPU,\n" + - "storage, and memory resources available.", - }, - "created_at": schema.StringAttribute{ - Computed: true, - Description: "The date and time when the database server was created.", - }, - "vm_cluster_ids": schema.ListAttribute{ - Computed: true, - CustomType: fwtypes.ListOfStringType, - ElementType: types.StringType, - Description: "The OCID of the VM clusters that are associated with the database server.", - }, - "compute_model": schema.StringAttribute{ - Computed: true, - CustomType: fwtypes.StringEnumType[odbtypes.ComputeModel](), - Description: " The compute model of the database server.", - }, - "autonomous_vm_cluster_ids": schema.ListAttribute{ - Computed: true, - CustomType: fwtypes.ListOfStringType, - ElementType: types.StringType, - Description: "The OCID of the autonomous VM clusters that are associated with the database server.", - }, - "autonomous_virtual_machine_ids": schema.ListAttribute{ - Computed: true, - CustomType: fwtypes.ListOfStringType, - ElementType: types.StringType, - Description: "The list of unique identifiers for the Autonomous VMs associated with this database server.", - }, - }, - } -} - -func (d *dataSourceDbServer) Read(ctx context.Context, req datasource.ReadRequest, resp *datasource.ReadResponse) { - - conn := d.Meta().ODBClient(ctx) - - var data dbServerDataSourceModel - resp.Diagnostics.Append(req.Config.Get(ctx, &data)...) - if resp.Diagnostics.HasError() { - return - } - - input := odb.GetDbServerInput{ - DbServerId: data.DbServerID.ValueStringPointer(), - CloudExadataInfrastructureId: data.CloudExadataInfrastructureID.ValueStringPointer(), - } - - out, err := conn.GetDbServer(ctx, &input) - if err != nil { - resp.Diagnostics.AddError( - create.ProblemStandardMessage(names.ODB, create.ErrActionReading, DSNameDbServer, data.DbServerID.ValueString(), err), - err.Error(), - ) - return - } - - if out.DbServer.CreatedAt != nil { - data.CreatedAt = types.StringValue(out.DbServer.CreatedAt.Format(time.RFC3339)) - } - - resp.Diagnostics.Append(flex.Flatten(ctx, out.DbServer, &data)...) - if resp.Diagnostics.HasError() { - return - } - - resp.Diagnostics.Append(resp.State.Set(ctx, &data)...) -} - -type dbServerDataSourceModel struct { - framework.WithRegionModel - DbServerID types.String `tfsdk:"id"` - CloudExadataInfrastructureID types.String `tfsdk:"cloud_exadata_infrastructure_id"` - Status fwtypes.StringEnum[odbtypes.ResourceStatus] `tfsdk:"status"` - StatusReason types.String `tfsdk:"status_reason"` - CpuCoreCount types.Int32 `tfsdk:"cpu_core_count"` - DbNodeIds fwtypes.ListOfString `tfsdk:"db_node_ids"` - DbNodeStorageSizeInGBs types.Int32 `tfsdk:"db_node_storage_size_in_gbs"` - DbServerPatchingDetails fwtypes.ObjectValueOf[dbNodePatchingDetailsDbServerDataSourceModel] `tfsdk:"db_server_patching_details"` - DisplayName types.String `tfsdk:"display_name"` - ExadataInfrastructureId types.String `tfsdk:"exadata_infrastructure_id"` - OCID types.String `tfsdk:"ocid"` - OciResourceAnchorName types.String `tfsdk:"oci_resource_anchor_name"` - MaxCpuCount types.Int32 `tfsdk:"max_cpu_count"` - MaxDbNodeStorageInGBs types.Int32 `tfsdk:"max_db_node_storage_in_gbs"` - MaxMemoryInGBs types.Int32 `tfsdk:"max_memory_in_gbs"` - MemorySizeInGBs types.Int32 `tfsdk:"memory_size_in_gbs"` - Shape types.String `tfsdk:"shape"` - CreatedAt types.String `tfsdk:"created_at" autoflex:",noflatten"` - VmClusterIds fwtypes.ListOfString `tfsdk:"vm_cluster_ids"` - ComputeModel fwtypes.StringEnum[odbtypes.ComputeModel] `tfsdk:"compute_model"` - AutonomousVmClusterIds fwtypes.ListOfString `tfsdk:"autonomous_vm_cluster_ids"` - AutonomousVirtualMachineIds fwtypes.ListOfString `tfsdk:"autonomous_virtual_machine_ids"` -} - -type dbNodePatchingDetailsDbServerDataSourceModel struct { - EstimatedPatchDuration types.Int32 `tfsdk:"estimated_patch_duration"` - PatchingStatus types.String `tfsdk:"patching_status"` - TimePatchingEnded types.String `tfsdk:"time_patching_ended"` - TimePatchingStarted types.String `tfsdk:"time_patching_started"` -} diff --git a/internal/service/odb/db_server_data_source_test.go b/internal/service/odb/db_server_data_source_test.go deleted file mode 100644 index 3eee595e9544..000000000000 --- a/internal/service/odb/db_server_data_source_test.go +++ /dev/null @@ -1,196 +0,0 @@ -//Copyright © 2025, Oracle and/or its affiliates. All rights reserved. - -package odb_test - -import ( - "context" - "errors" - "fmt" - "github.com/aws/aws-sdk-go-v2/aws" - odbtypes "github.com/aws/aws-sdk-go-v2/service/odb/types" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" - sdkacctest "github.com/hashicorp/terraform-plugin-testing/helper/acctest" - "github.com/hashicorp/terraform-provider-aws/internal/errs" - "github.com/hashicorp/terraform-provider-aws/internal/tfresource" - "testing" - - "github.com/aws/aws-sdk-go-v2/service/odb" - "github.com/hashicorp/terraform-plugin-testing/helper/resource" - "github.com/hashicorp/terraform-plugin-testing/terraform" - "github.com/hashicorp/terraform-provider-aws/internal/acctest" - "github.com/hashicorp/terraform-provider-aws/internal/conns" - "github.com/hashicorp/terraform-provider-aws/internal/create" - - tfodb "github.com/hashicorp/terraform-provider-aws/internal/service/odb" - "github.com/hashicorp/terraform-provider-aws/names" -) - -type testDbServerDataSourceTest struct { - exaDisplayNamePrefix string -} - -var dbServerDataSourceTestEntity = testDbServerDataSourceTest{ - exaDisplayNamePrefix: "Ofake-exa", -} - -// Acceptance test access AWS and cost money to run. -func TestAccODBDbServerDataSource(t *testing.T) { - ctx := acctest.Context(t) - - if testing.Short() { - t.Skip("skipping long-running test in short mode") - } - - var dbServer odb.GetDbServerOutput - exaInfraDisplayName := sdkacctest.RandomWithPrefix(dbServersListDataSourceTests.displayNamePrefix) - - dataSourceName := "data.aws_odb_db_server.test" - - resource.ParallelTest(t, resource.TestCase{ - PreCheck: func() { - acctest.PreCheck(ctx, t) - }, - ErrorCheck: acctest.ErrorCheck(t, names.ODBServiceID), - ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, - CheckDestroy: dbServerDataSourceTestEntity.testAccCheckDbServersDestroyed(ctx), - Steps: []resource.TestStep{ - { - Config: dbServerDataSourceTestEntity.basic(dbServerDataSourceTestEntity.exaInfra(exaInfraDisplayName)), - Check: resource.ComposeAggregateTestCheckFunc( - dbServerDataSourceTestEntity.testAccCheckDbServerExists(ctx, dataSourceName, &dbServer), - ), - }, - }, - }) -} - -func (testDbServerDataSourceTest) testAccCheckDbServerExists(ctx context.Context, name string, output *odb.GetDbServerOutput) resource.TestCheckFunc { - return func(s *terraform.State) error { - rs, ok := s.RootModule().Resources[name] - if !ok { - return create.Error(names.ODB, create.ErrActionCheckingExistence, tfodb.DSNameDbServer, name, errors.New("not found")) - } - conn := acctest.Provider.Meta().(*conns.AWSClient).ODBClient(ctx) - var dbServerId = rs.Primary.ID - var attributes = rs.Primary.Attributes - exaId := attributes["exadata_infrastructure_id"] - resp, err := dbServerDataSourceTestEntity.findDbServer(ctx, conn, &dbServerId, &exaId) - if err != nil { - return create.Error(names.ODB, create.ErrActionCheckingExistence, tfodb.DSNameDbServer, rs.Primary.ID, err) - } - *output = *resp - return nil - } -} - -func (testDbServerDataSourceTest) testAccCheckDbServersDestroyed(ctx context.Context) resource.TestCheckFunc { - return func(s *terraform.State) error { - conn := acctest.Provider.Meta().(*conns.AWSClient).ODBClient(ctx) - - for _, rs := range s.RootModule().Resources { - if rs.Type != "aws_odb_cloud_exadata_infrastructure" { - continue - } - - _, err := dbServerDataSourceTestEntity.findExaInfra(ctx, conn, rs.Primary.ID) - - if tfresource.NotFound(err) { - return nil - } - if err != nil { - return create.Error(names.ODB, create.ErrActionCheckingDestroyed, tfodb.DSNameDbServer, rs.Primary.ID, err) - } - - return create.Error(names.ODB, create.ErrActionCheckingDestroyed, tfodb.DSNameDbServer, rs.Primary.ID, errors.New("not destroyed")) - } - - return nil - } -} - -func (testDbServerDataSourceTest) findExaInfra(ctx context.Context, conn *odb.Client, id string) (*odbtypes.CloudExadataInfrastructure, error) { - input := odb.GetCloudExadataInfrastructureInput{ - CloudExadataInfrastructureId: aws.String(id), - } - - out, err := conn.GetCloudExadataInfrastructure(ctx, &input) - if err != nil { - if errs.IsA[*odbtypes.ResourceNotFoundException](err) { - return nil, &retry.NotFoundError{ - LastError: err, - LastRequest: &input, - } - } - - return nil, err - } - - if out == nil || out.CloudExadataInfrastructure == nil { - return nil, tfresource.NewEmptyResultError(&input) - } - - return out.CloudExadataInfrastructure, nil -} - -func (testDbServerDataSourceTest) findDbServer(ctx context.Context, conn *odb.Client, dbServerId *string, exaInfraId *string) (*odb.GetDbServerOutput, error) { - inputWithExaId := &odb.GetDbServerInput{ - DbServerId: dbServerId, - CloudExadataInfrastructureId: exaInfraId, - } - output, err := conn.GetDbServer(ctx, inputWithExaId) - if err != nil { - return nil, err - } - return output, nil -} - -func (testDbServerDataSourceTest) basic(exaInfra string) string { - return fmt.Sprintf(` -%s - -data "aws_odb_db_servers_list" "test" { - cloud_exadata_infrastructure_id = aws_odb_cloud_exadata_infrastructure.test.id -} - -data "aws_odb_db_server" "test" { - id = data.aws_odb_db_servers_list.test.db_servers[0].id - cloud_exadata_infrastructure_id = aws_odb_cloud_exadata_infrastructure.test.id -} -`, exaInfra) -} - -func (testDbServerDataSourceTest) exaInfra(rName string) string { - exaRes := fmt.Sprintf(` -resource "aws_odb_cloud_exadata_infrastructure" "test" { - display_name = "%[1]s" - shape = "Exadata.X9M" - storage_count = 3 - compute_count = 2 - availability_zone_id = "use1-az6" - customer_contacts_to_send_to_oci = ["abc@example.com"] - maintenance_window = { - custom_action_timeout_in_mins = 16 - days_of_week = [] - hours_of_day = [] - is_custom_action_timeout_enabled = true - lead_time_in_weeks = 0 - months = [] - patching_mode = "ROLLING" - preference = "NO_PREFERENCE" - weeks_of_month =[] - } -} -`, rName) - return exaRes -} - -/*func (testDbServerDataSourceTest) foo(dbServerId, exaInfraId string) string { - return fmt.Sprintf(` - -data "aws_odb_db_server" "test" { - id = %[1]q -cloud_exadata_infrastructure_id = %[2]q -} -`, dbServerId, exaInfraId) -} -*/ diff --git a/internal/service/odb/db_servers_list_data_source.go b/internal/service/odb/db_servers_list_data_source.go deleted file mode 100644 index 763c2bf587a5..000000000000 --- a/internal/service/odb/db_servers_list_data_source.go +++ /dev/null @@ -1,151 +0,0 @@ -//Copyright © 2025, Oracle and/or its affiliates. All rights reserved. - -package odb - -import ( - "context" - "github.com/hashicorp/terraform-plugin-framework/attr" - - "github.com/aws/aws-sdk-go-v2/service/odb" - odbtypes "github.com/aws/aws-sdk-go-v2/service/odb/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/create" - "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/names" -) - -// Function annotations are used for datasource registration to the Provider. DO NOT EDIT. -// @FrameworkDataSource("aws_odb_db_servers_list", name="Db Servers List") -func newDataSourceDbServersList(context.Context) (datasource.DataSourceWithConfigure, error) { - return &dataSourceDbServersList{}, nil -} - -const ( - DSNameDbServersList = "Db Servers List Data Source" -) - -type dataSourceDbServersList struct { - framework.DataSourceWithModel[dbServersListDataSourceModel] -} - -func (d *dataSourceDbServersList) Schema(ctx context.Context, req datasource.SchemaRequest, resp *datasource.SchemaResponse) { - resp.Schema = schema.Schema{ - Attributes: map[string]schema.Attribute{ - "cloud_exadata_infrastructure_id": schema.StringAttribute{ - Required: true, - Description: "The cloud exadata infrastructure ID. Mandatory field.", - }, - "db_servers": schema.ListAttribute{ - Description: "List of database servers associated with cloud_exadata_infrastructure_id.", - Computed: true, - CustomType: fwtypes.NewListNestedObjectTypeOf[dbServerForDbServersListDataSourceModel](ctx), - ElementType: types.ObjectType{ - AttrTypes: map[string]attr.Type{ - "id": types.StringType, - "status": fwtypes.StringEnumType[odbtypes.ResourceStatus](), - "status_reason": types.StringType, - "cpu_core_count": types.Int32Type, - "cpu_core_count_per_node": types.Int32Type, - "db_server_patching_details": types.ObjectType{ - AttrTypes: map[string]attr.Type{ - "estimated_patch_duration": types.Int32Type, - "patching_status": fwtypes.StringEnumType[odbtypes.DbServerPatchingStatus](), - "time_patching_ended": types.StringType, - "time_patching_started": types.StringType, - }, - }, - "display_name": types.StringType, - "exadata_infrastructure_id": types.StringType, - "ocid": types.StringType, - "oci_resource_anchor_name": types.StringType, - "max_cpu_count": types.Int32Type, - "max_db_node_storage_in_gbs": types.Int32Type, - "max_memory_in_gbs": types.Int32Type, - "memory_size_in_gbs": types.Int32Type, - "shape": types.StringType, - "vm_cluster_ids": types.ListType{ - ElemType: types.StringType, - }, - "compute_model": fwtypes.StringEnumType[odbtypes.ComputeModel](), - "autonomous_vm_cluster_ids": types.ListType{ - ElemType: types.StringType, - }, - "autonomous_virtual_machine_ids": types.ListType{ - ElemType: types.StringType, - }, - }, - }, - }, - }, - } -} - -// Data sources only have a read method. -func (d *dataSourceDbServersList) Read(ctx context.Context, req datasource.ReadRequest, resp *datasource.ReadResponse) { - - conn := d.Meta().ODBClient(ctx) - var data dbServersListDataSourceModel - resp.Diagnostics.Append(req.Config.Get(ctx, &data)...) - if resp.Diagnostics.HasError() { - return - } - input := odb.ListDbServersInput{} - if !data.CloudExadataInfrastructureId.IsNull() && !data.CloudExadataInfrastructureId.IsUnknown() { - input.CloudExadataInfrastructureId = data.CloudExadataInfrastructureId.ValueStringPointer() - } - out, err := conn.ListDbServers(ctx, &input) - if err != nil { - resp.Diagnostics.AddError( - create.ProblemStandardMessage(names.ODB, create.ErrActionReading, DSNameDbServersList, "", err), - err.Error(), - ) - return - } - - resp.Diagnostics.Append(flex.Flatten(ctx, out, &data)...) - if resp.Diagnostics.HasError() { - return - } - resp.Diagnostics.Append(resp.State.Set(ctx, &data)...) -} - -type dbServersListDataSourceModel struct { - framework.WithRegionModel - CloudExadataInfrastructureId types.String `tfsdk:"cloud_exadata_infrastructure_id"` - DbServers fwtypes.ListNestedObjectValueOf[dbServerForDbServersListDataSourceModel] `tfsdk:"db_servers"` -} - -type dbServerForDbServersListDataSourceModel struct { - DbServerId types.String `tfsdk:"id"` - Status fwtypes.StringEnum[odbtypes.ResourceStatus] `tfsdk:"status"` - StatusReason types.String `tfsdk:"status_reason"` - CpuCoreCount types.Int32 `tfsdk:"cpu_core_count"` - DbNodeStorageSizeInGBs types.Int32 `tfsdk:"db_node_storage_size_in_gbs"` - DbServerPatchingDetails fwtypes.ObjectValueOf[dbNodePatchingDetailsForDbServersListDataSourceModel] `tfsdk:"db_server_patching_details"` - DisplayName types.String `tfsdk:"display_name"` - ExadataInfrastructureId types.String `tfsdk:"exadata_infrastructure_id"` - OCID types.String `tfsdk:"ocid"` - OciResourceAnchorName types.String `tfsdk:"oci_resource_anchor_name"` - MaxCpuCount types.Int32 `tfsdk:"max_cpu_count"` - MaxDbNodeStorageInGBs types.Int32 `tfsdk:"max_db_node_storage_in_gbs"` - MaxMemoryInGBs types.Int32 `tfsdk:"max_memory_in_gbs"` - MemorySizeInGBs types.Int32 `tfsdk:"memory_size_in_gbs"` - Shape types.String `tfsdk:"shape"` - //CreatedAt types.String `tfsdk:"created_at"` - VmClusterIds fwtypes.ListOfString `tfsdk:"vm_cluster_ids"` - ComputeModel fwtypes.StringEnum[odbtypes.ComputeModel] `tfsdk:"compute_model"` - AutonomousVmClusterIds fwtypes.ListOfString `tfsdk:"autonomous_vm_cluster_ids"` - AutonomousVirtualMachineIds fwtypes.ListOfString `tfsdk:"autonomous_virtual_machine_ids"` -} - -type dbNodePatchingDetailsForDbServersListDataSourceModel struct { - EstimatedPatchDuration types.Int32 `tfsdk:"estimated_patch_duration"` - PatchingStatus fwtypes.StringEnum[odbtypes.DbServerPatchingStatus] `tfsdk:"patching_status"` - TimePatchingEnded types.String `tfsdk:"time_patching_ended"` - TimePatchingStarted types.String `tfsdk:"time_patching_started"` -} diff --git a/internal/service/odb/db_servers_list_data_source_test.go b/internal/service/odb/db_servers_list_data_source_test.go deleted file mode 100644 index f70a6b38d184..000000000000 --- a/internal/service/odb/db_servers_list_data_source_test.go +++ /dev/null @@ -1,183 +0,0 @@ -//Copyright © 2025, Oracle and/or its affiliates. All rights reserved. - -package odb_test - -import ( - "context" - "errors" - "fmt" - "github.com/aws/aws-sdk-go-v2/aws" - odbtypes "github.com/aws/aws-sdk-go-v2/service/odb/types" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" - "github.com/hashicorp/terraform-provider-aws/internal/errs" - "github.com/hashicorp/terraform-provider-aws/internal/tfresource" - "strconv" - "testing" - - "github.com/aws/aws-sdk-go-v2/service/odb" - sdkacctest "github.com/hashicorp/terraform-plugin-testing/helper/acctest" - "github.com/hashicorp/terraform-plugin-testing/helper/resource" - "github.com/hashicorp/terraform-plugin-testing/terraform" - "github.com/hashicorp/terraform-provider-aws/internal/acctest" - "github.com/hashicorp/terraform-provider-aws/internal/conns" - "github.com/hashicorp/terraform-provider-aws/internal/create" - - tfodb "github.com/hashicorp/terraform-provider-aws/internal/service/odb" - "github.com/hashicorp/terraform-provider-aws/names" -) - -type testDbServersListDataSource struct { - displayNamePrefix string -} - -var dbServersListDataSourceTests = testDbServersListDataSource{ - displayNamePrefix: "Ofake-exa", -} - -// Acceptance test access AWS and cost money to run. -func TestAccODBDbServersListDataSource_basic(t *testing.T) { - ctx := acctest.Context(t) - - if testing.Short() { - t.Skip("skipping long-running test in short mode") - } - - var dbserverslist odb.ListDbServersOutput - exaInfraDisplayName := sdkacctest.RandomWithPrefix(dbServersListDataSourceTests.displayNamePrefix) - - dataSourceName := "data.aws_odb_db_servers_list.test" - exaInfraResourceName := "aws_odb_cloud_exadata_infrastructure.test" - - resource.ParallelTest(t, resource.TestCase{ - PreCheck: func() { - acctest.PreCheck(ctx, t) - - }, - ErrorCheck: acctest.ErrorCheck(t, names.ODBServiceID), - ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, - CheckDestroy: dbServersListDataSourceTests.testAccCheckDbServersDestroyed(ctx), - Steps: []resource.TestStep{ - { - Config: dbServersListDataSourceTests.testAccDbServersListDataSourceConfigBasic(dbServersListDataSourceTests.exaInfra(exaInfraDisplayName)), - Check: resource.ComposeAggregateTestCheckFunc( - dbServersListDataSourceTests.testAccCheckDbServersListExists(ctx, exaInfraResourceName, &dbserverslist), - resource.TestCheckResourceAttr(dataSourceName, "aws_odb_db_servers_list.db_servers.#", strconv.Itoa(len(dbserverslist.DbServers))), - ), - }, - }, - }) -} - -func (testDbServersListDataSource) testAccCheckDbServersListExists(ctx context.Context, name string, output *odb.ListDbServersOutput) resource.TestCheckFunc { - return func(s *terraform.State) error { - rs, ok := s.RootModule().Resources[name] - if !ok { - return create.Error(names.ODB, create.ErrActionCheckingExistence, tfodb.DSNameDbServersList, name, errors.New("not found")) - } - conn := acctest.Provider.Meta().(*conns.AWSClient).ODBClient(ctx) - var exaInfraId = &rs.Primary.ID - - resp, err := dbServersListDataSourceTests.findDbServersList(ctx, conn, exaInfraId) - if err != nil { - return create.Error(names.ODB, create.ErrActionCheckingExistence, tfodb.DSNameDbServersList, rs.Primary.ID, err) - } - *output = *resp - return nil - } -} - -func (testDbServersListDataSource) testAccCheckDbServersDestroyed(ctx context.Context) resource.TestCheckFunc { - return func(s *terraform.State) error { - conn := acctest.Provider.Meta().(*conns.AWSClient).ODBClient(ctx) - - for _, rs := range s.RootModule().Resources { - if rs.Type != "aws_odb_cloud_exadata_infrastructure" { - continue - } - - _, err := dbServersListDataSourceTests.findExaInfra(ctx, conn, rs.Primary.ID) - - if tfresource.NotFound(err) { - return nil - } - if err != nil { - return create.Error(names.ODB, create.ErrActionCheckingDestroyed, tfodb.DSNameDbServersList, rs.Primary.ID, err) - } - - return create.Error(names.ODB, create.ErrActionCheckingDestroyed, tfodb.DSNameDbServersList, rs.Primary.ID, errors.New("not destroyed")) - } - - return nil - } -} - -func (testDbServersListDataSource) findExaInfra(ctx context.Context, conn *odb.Client, id string) (*odbtypes.CloudExadataInfrastructure, error) { - input := odb.GetCloudExadataInfrastructureInput{ - CloudExadataInfrastructureId: aws.String(id), - } - - out, err := conn.GetCloudExadataInfrastructure(ctx, &input) - if err != nil { - if errs.IsA[*odbtypes.ResourceNotFoundException](err) { - return nil, &retry.NotFoundError{ - LastError: err, - LastRequest: &input, - } - } - - return nil, err - } - - if out == nil || out.CloudExadataInfrastructure == nil { - return nil, tfresource.NewEmptyResultError(&input) - } - - return out.CloudExadataInfrastructure, nil -} - -func (testDbServersListDataSource) findDbServersList(ctx context.Context, conn *odb.Client, exaInfraId *string) (*odb.ListDbServersOutput, error) { - inputWithExaId := &odb.ListDbServersInput{ - CloudExadataInfrastructureId: exaInfraId, - } - output, err := conn.ListDbServers(ctx, inputWithExaId) - if err != nil { - return nil, err - } - return output, nil -} - -func (testDbServersListDataSource) testAccDbServersListDataSourceConfigBasic(exaInfra string) string { - return fmt.Sprintf(` -%s - -data "aws_odb_db_servers_list" "test" { - cloud_exadata_infrastructure_id = aws_odb_cloud_exadata_infrastructure.test.id -} -`, exaInfra) -} - -func (testDbServersListDataSource) exaInfra(rName string) string { - exaRes := fmt.Sprintf(` -resource "aws_odb_cloud_exadata_infrastructure" "test" { - display_name = "%[1]s" - shape = "Exadata.X9M" - storage_count = 3 - compute_count = 2 - availability_zone_id = "use1-az6" - customer_contacts_to_send_to_oci = ["abc@example.com"] - maintenance_window = { - custom_action_timeout_in_mins = 16 - days_of_week = [] - hours_of_day = [] - is_custom_action_timeout_enabled = true - lead_time_in_weeks = 0 - months = [] - patching_mode = "ROLLING" - preference = "NO_PREFERENCE" - weeks_of_month =[] - } -} -`, rName) - //fmt.Println(resource) - return exaRes -} diff --git a/internal/service/odb/db_system_shapes_list_data_source.go b/internal/service/odb/db_system_shapes_list_data_source.go deleted file mode 100644 index 5272b2d0ed8b..000000000000 --- a/internal/service/odb/db_system_shapes_list_data_source.go +++ /dev/null @@ -1,150 +0,0 @@ -//Copyright © 2025, Oracle and/or its affiliates. All rights reserved. - -package odb - -import ( - "context" - "fmt" - "github.com/hashicorp/terraform-plugin-framework/attr" - - "github.com/aws/aws-sdk-go-v2/service/odb" - - "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/create" - "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/names" -) - -// Function annotations are used for datasource registration to the Provider. DO NOT EDIT. -// @FrameworkDataSource("aws_odb_db_system_shapes_list", name="Db System Shapes List") -func newDataSourceDbSystemShapesList(context.Context) (datasource.DataSourceWithConfigure, error) { - return &dataSourceDbSystemShapesList{}, nil -} - -const ( - DSNameDbSystemShapesList = "Db System Shapes List Data Source" -) - -type dataSourceDbSystemShapesList struct { - framework.DataSourceWithModel[dbSystemShapesListDataSourceModel] -} - -func (d *dataSourceDbSystemShapesList) Schema(ctx context.Context, req datasource.SchemaRequest, resp *datasource.SchemaResponse) { - resp.Schema = schema.Schema{ - Attributes: map[string]schema.Attribute{ - "availability_zone_id": schema.StringAttribute{ - Optional: true, - Description: "The physical ID of the AZ, for example, use1-az4. This ID persists across accounts", - }, - "db_system_shapes": schema.ListAttribute{ - Computed: true, - CustomType: fwtypes.NewListNestedObjectTypeOf[dbSystemShapeDataSourceModel](ctx), - Description: fmt.Sprint("The list of shapes and their properties.\n\n" + - "(structure)\n" + - "Information about a hardware system model (shape) that's\n " + - "available for an Exadata infrastructure. The shape determines\n" + - "resources, such as CPU cores, memory, and storage, to allocate to\n " + - "the Exadata infrastructure.\n"), - ElementType: types.ObjectType{ - - AttrTypes: map[string]attr.Type{ - "available_core_count": types.Int32Type, - "available_core_count_per_node": types.Int32Type, - "available_data_storage_in_tbs": types.Int32Type, - "available_data_storage_per_server_in_tbs": types.Int32Type, - "available_db_node_per_node_in_gbs": types.Int32Type, - "available_db_node_storage_in_gbs": types.Int32Type, - "available_memory_in_gbs": types.Int32Type, - "available_memory_per_node_in_gbs": types.Int32Type, - "core_count_increment": types.Int32Type, - "max_storage_count": types.Int32Type, - "maximum_node_count": types.Int32Type, - "min_core_count_per_node": types.Int32Type, - "min_data_storage_in_tbs": types.Int32Type, - "min_db_node_storage_per_node_in_gbs": types.Int32Type, - "min_memory_per_node_in_gbs": types.Int32Type, - "min_storage_count": types.Int32Type, - "minimum_core_count": types.Int32Type, - "minimum_node_count": types.Int32Type, - "name": types.StringType, - "runtime_minimum_core_count": types.Int32Type, - "shape_family": types.StringType, - "shape_type": types.StringType, - }, - }, - }, - }, - } -} - -func (d *dataSourceDbSystemShapesList) Read(ctx context.Context, req datasource.ReadRequest, resp *datasource.ReadResponse) { - - conn := d.Meta().ODBClient(ctx) - - var data dbSystemShapesListDataSourceModel - resp.Diagnostics.Append(req.Config.Get(ctx, &data)...) - if resp.Diagnostics.HasError() { - return - } - input := odb.ListDbSystemShapesInput{} - if !data.AvailabilityZoneId.IsNull() && !data.AvailabilityZoneId.IsUnknown() { - input.AvailabilityZoneId = data.AvailabilityZoneId.ValueStringPointer() - } - paginator := odb.NewListDbSystemShapesPaginator(conn, &input) - var out odb.ListDbSystemShapesOutput - for paginator.HasMorePages() { - page, err := paginator.NextPage(ctx) - if err != nil { - resp.Diagnostics.AddError( - create.ProblemStandardMessage(names.ODB, create.ErrActionReading, DSNameDbSystemShapesList, "", err), - err.Error(), - ) - return - } - - if page != nil && len(page.DbSystemShapes) > 0 { - out.DbSystemShapes = append(out.DbSystemShapes, page.DbSystemShapes...) - } - } - resp.Diagnostics.Append(flex.Flatten(ctx, out, &data)...) - if resp.Diagnostics.HasError() { - return - } - - resp.Diagnostics.Append(resp.State.Set(ctx, &data)...) -} - -type dbSystemShapesListDataSourceModel struct { - framework.WithRegionModel - AvailabilityZoneId types.String `tfsdk:"availability_zone_id"` - DbSystemShapes fwtypes.ListNestedObjectValueOf[dbSystemShapeDataSourceModel] `tfsdk:"db_system_shapes"` -} - -type dbSystemShapeDataSourceModel struct { - AvailableCoreCount types.Int32 `tfsdk:"available_core_count"` - AvailableCoreCountPerNode types.Int32 `tfsdk:"available_core_count_per_node"` - AvailableDataStorageInTBs types.Int32 `tfsdk:"available_data_storage_in_tbs"` - AvailableDataStoragePerServerInTBs types.Int32 `tfsdk:"available_data_storage_per_server_in_tbs"` - AvailableDbNodePerNodeInGBs types.Int32 `tfsdk:"available_db_node_per_node_in_gbs"` - AvailableDbNodeStorageInGBs types.Int32 `tfsdk:"available_db_node_storage_in_gbs"` - AvailableMemoryInGBs types.Int32 `tfsdk:"available_memory_in_gbs"` - AvailableMemoryPerNodeInGBs types.Int32 `tfsdk:"available_memory_per_node_in_gbs"` - CoreCountIncrement types.Int32 `tfsdk:"core_count_increment"` - MaxStorageCount types.Int32 `tfsdk:"max_storage_count"` - MaximumNodeCount types.Int32 `tfsdk:"maximum_node_count"` - MinCoreCountPerNode types.Int32 `tfsdk:"min_core_count_per_node"` - MinDataStorageInTBs types.Int32 `tfsdk:"min_data_storage_in_tbs"` - MinDbNodeStoragePerNodeInGBs types.Int32 `tfsdk:"min_db_node_storage_per_node_in_gbs"` - MinMemoryPerNodeInGBs types.Int32 `tfsdk:"min_memory_per_node_in_gbs"` - MinStorageCount types.Int32 `tfsdk:"min_storage_count"` - MinimumCoreCount types.Int32 `tfsdk:"minimum_core_count"` - MinimumNodeCount types.Int32 `tfsdk:"minimum_node_count"` - Name types.String `tfsdk:"name"` - RuntimeMinimumCoreCount types.Int32 `tfsdk:"runtime_minimum_core_count"` - ShapeFamily types.String `tfsdk:"shape_family"` - ShapeType types.String `tfsdk:"shape_type"` -} diff --git a/internal/service/odb/db_system_shapes_list_data_source_test.go b/internal/service/odb/db_system_shapes_list_data_source_test.go deleted file mode 100644 index 3e5802761975..000000000000 --- a/internal/service/odb/db_system_shapes_list_data_source_test.go +++ /dev/null @@ -1,48 +0,0 @@ -//Copyright © 2025, Oracle and/or its affiliates. All rights reserved. - -package odb_test - -import ( - "fmt" - - "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 TestAccODBDbSystemShapesListDataSource_basic(t *testing.T) { - ctx := acctest.Context(t) - // TIP: This is a long-running test guard for tests that run longer than - // 300s (5 min) generally. - if testing.Short() { - t.Skip("skipping long-running test in short mode") - } - - dataSourceName := "data.aws_odb_db_system_shapes_list.test" - - resource.ParallelTest(t, resource.TestCase{ - PreCheck: func() { - acctest.PreCheck(ctx, t) - }, - ErrorCheck: acctest.ErrorCheck(t, names.ODBServiceID), - ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, - Steps: []resource.TestStep{ - { - Config: testAccDbSystemShapesListDataSourceConfig_basic("use1-az6"), - Check: resource.ComposeAggregateTestCheckFunc( - resource.TestCheckResourceAttr(dataSourceName, "db_system_shapes.#", "2"), - ), - }, - }, - }) -} - -func testAccDbSystemShapesListDataSourceConfig_basic(availabilityZoneId string) string { - return fmt.Sprintf(` -data "aws_odb_db_system_shapes_list" "test"{ - availability_zone_id = %[1]q -} -`, availabilityZoneId) -} diff --git a/internal/service/odb/generate.go b/internal/service/odb/generate.go deleted file mode 100644 index 2fef8ab1a1c7..000000000000 --- a/internal/service/odb/generate.go +++ /dev/null @@ -1,6 +0,0 @@ -//Copyright © 2025, Oracle and/or its affiliates. All rights reserved. -//go:generate go run ../../generate/tags/main.go -ServiceTagsMap -ListTags -KVTValues -UpdateTags -//go:generate go run ../../generate/servicepackage/main.go -// ONLY generate directives and package declaration! Do not add anything else to this file. - -package odb diff --git a/internal/service/odb/gi_versions_list_data_source.go b/internal/service/odb/gi_versions_list_data_source.go deleted file mode 100644 index 9708dd98f9e9..000000000000 --- a/internal/service/odb/gi_versions_list_data_source.go +++ /dev/null @@ -1,103 +0,0 @@ -//Copyright © 2025, Oracle and/or its affiliates. All rights reserved. - -package odb - -import ( - "context" - "fmt" - - "github.com/aws/aws-sdk-go-v2/service/odb" - - "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/create" - "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/names" -) - -// Function annotations are used for datasource registration to the Provider. DO NOT EDIT. -// @FrameworkDataSource("aws_odb_gi_versions_list", name="Gi Versions List") -func newDataSourceGiVersionsList(context.Context) (datasource.DataSourceWithConfigure, error) { - return &dataSourceGiVersionsList{}, nil -} - -const ( - DSNameGiVersionsList = "Gi Versions List Data Source" -) - -type dataSourceGiVersionsList struct { - framework.DataSourceWithModel[giVersionDataSourceModel] -} - -func (d *dataSourceGiVersionsList) Schema(ctx context.Context, req datasource.SchemaRequest, resp *datasource.SchemaResponse) { - resp.Schema = schema.Schema{ - Attributes: map[string]schema.Attribute{ - "shape": schema.StringAttribute{ - Optional: true, - Description: "The system shape.", - }, - }, - Blocks: map[string]schema.Block{ - "gi_versions": schema.ListNestedBlock{ - Description: fmt.Sprint(" (structure)\n " + - "Information about a specific version of Oracle Grid\n" + - "Infrastructure (GI) software that can be installed on a VM\n " + - "cluster.\n\n " + - "version -> (string)\n " + - "The GI software version."), - CustomType: fwtypes.NewListNestedObjectTypeOf[giVersionSummaryModel](ctx), - NestedObject: schema.NestedBlockObject{ - Attributes: map[string]schema.Attribute{ - "version": schema.StringAttribute{ - Computed: true, - }, - }, - }, - }, - }, - } -} - -func (d *dataSourceGiVersionsList) Read(ctx context.Context, req datasource.ReadRequest, resp *datasource.ReadResponse) { - - conn := d.Meta().ODBClient(ctx) - - var data giVersionDataSourceModel - resp.Diagnostics.Append(req.Config.Get(ctx, &data)...) - if resp.Diagnostics.HasError() { - return - } - - var input odb.ListGiVersionsInput - if !data.Shape.IsNull() { - input.Shape = data.Shape.ValueStringPointer() - } - out, err := conn.ListGiVersions(ctx, &input) - if err != nil { - resp.Diagnostics.AddError( - create.ProblemStandardMessage(names.ODB, create.ErrActionReading, DSNameGiVersionsList, "", err), - err.Error(), - ) - return - } - - resp.Diagnostics.Append(flex.Flatten(ctx, out, &data)...) - if resp.Diagnostics.HasError() { - return - } - - resp.Diagnostics.Append(resp.State.Set(ctx, &data)...) -} - -type giVersionDataSourceModel struct { - framework.WithRegionModel - GiVersions fwtypes.ListNestedObjectValueOf[giVersionSummaryModel] `tfsdk:"gi_versions"` - Shape types.String `tfsdk:"shape"` -} - -type giVersionSummaryModel struct { - Version types.String `tfsdk:"version"` -} diff --git a/internal/service/odb/gi_versions_list_data_source_test.go b/internal/service/odb/gi_versions_list_data_source_test.go deleted file mode 100644 index 0e0e19a2272a..000000000000 --- a/internal/service/odb/gi_versions_list_data_source_test.go +++ /dev/null @@ -1,71 +0,0 @@ -//Copyright © 2025, Oracle and/or its affiliates. All rights reserved. - -package odb_test - -import ( - "fmt" - "github.com/hashicorp/terraform-plugin-testing/helper/resource" - "github.com/hashicorp/terraform-provider-aws/internal/acctest" - "github.com/hashicorp/terraform-provider-aws/names" - "testing" -) - -func TestAccGiVersionsListDataSource_basicX9M(t *testing.T) { - ctx := acctest.Context(t) - - if testing.Short() { - t.Skip("skipping long-running test in short mode") - } - dataSourceName := "data.aws_odb_gi_versions_list.test" - - resource.Test(t, resource.TestCase{ - PreCheck: func() { - acctest.PreCheck(ctx, t) - }, - ErrorCheck: acctest.ErrorCheck(t, names.ODBServiceID), - ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, - Steps: []resource.TestStep{ - { - Config: testAccGiVersionsListeConfig_basic("Exadata.X9M"), - Check: resource.ComposeAggregateTestCheckFunc( - resource.TestCheckResourceAttr(dataSourceName, "gi_versions.#", "2"), - ), - }, - }, - }) - -} - -func TestAccGiVersionsListDataSource_basicX11M(t *testing.T) { - ctx := acctest.Context(t) - - if testing.Short() { - t.Skip("skipping long-running test in short mode") - } - dataSourceName := "data.aws_odb_gi_versions_list.test" - - resource.Test(t, resource.TestCase{ - PreCheck: func() { - acctest.PreCheck(ctx, t) - }, - ErrorCheck: acctest.ErrorCheck(t, names.ODBServiceID), - ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, - Steps: []resource.TestStep{ - { - Config: testAccGiVersionsListeConfig_basic("Exadata.X11M"), - Check: resource.ComposeAggregateTestCheckFunc( - resource.TestCheckResourceAttr(dataSourceName, "gi_versions.#", "2"), - ), - }, - }, - }) -} - -func testAccGiVersionsListeConfig_basic(shape string) string { - return fmt.Sprintf(` - -data "aws_odb_gi_versions_list" "test" { - shape = %[1]q -} -`, shape) -} diff --git a/internal/service/odb/network.go b/internal/service/odb/network.go deleted file mode 100644 index cc81deb4f37a..000000000000 --- a/internal/service/odb/network.go +++ /dev/null @@ -1,829 +0,0 @@ -//Copyright © 2025, Oracle and/or its affiliates. All rights reserved. - -package odb - -import ( - "context" - "errors" - "github.com/hashicorp/terraform-plugin-framework-validators/stringvalidator" - "github.com/hashicorp/terraform-plugin-framework/attr" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/id" - "github.com/hashicorp/terraform-provider-aws/internal/enum" - tftags "github.com/hashicorp/terraform-provider-aws/internal/tags" - "time" - - "github.com/aws/aws-sdk-go-v2/aws" - "github.com/aws/aws-sdk-go-v2/service/odb" - odbtypes "github.com/aws/aws-sdk-go-v2/service/odb/types" - "github.com/hashicorp/terraform-plugin-framework-timeouts/resource/timeouts" - "github.com/hashicorp/terraform-plugin-framework/path" - "github.com/hashicorp/terraform-plugin-framework/resource" - "github.com/hashicorp/terraform-plugin-framework/resource/schema" - "github.com/hashicorp/terraform-plugin-framework/resource/schema/planmodifier" - "github.com/hashicorp/terraform-plugin-framework/resource/schema/stringplanmodifier" - "github.com/hashicorp/terraform-plugin-framework/schema/validator" - "github.com/hashicorp/terraform-plugin-framework/types" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" - "github.com/hashicorp/terraform-provider-aws/internal/conns" - "github.com/hashicorp/terraform-provider-aws/internal/create" - "github.com/hashicorp/terraform-provider-aws/internal/errs" - "github.com/hashicorp/terraform-provider-aws/internal/errs/fwdiag" - "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/sweep" - sweepfw "github.com/hashicorp/terraform-provider-aws/internal/sweep/framework" - "github.com/hashicorp/terraform-provider-aws/internal/tfresource" - "github.com/hashicorp/terraform-provider-aws/names" -) - -// Function annotations are used for resource registration to the Provider. DO NOT EDIT. -// @FrameworkResource("aws_odb_network", name="Network") -// @Tags(identifierAttribute="arn") -func newResourceNetwork(_ context.Context) (resource.ResourceWithConfigure, error) { - r := &resourceNetwork{} - r.SetDefaultCreateTimeout(24 * time.Hour) - r.SetDefaultUpdateTimeout(24 * time.Hour) - r.SetDefaultDeleteTimeout(24 * time.Hour) - - return r, nil -} - -const ( - ResNameNetwork = "Odb Network" -) - -type resourceNetwork struct { - framework.ResourceWithModel[odbNetworkResourceModel] - framework.WithTimeouts -} - -var OdbNetwork = newResourceNetwork -var managedServiceTimeout = 15 * time.Minute - -func (r *resourceNetwork) Schema(ctx context.Context, req resource.SchemaRequest, resp *resource.SchemaResponse) { - statusType := fwtypes.StringEnumType[odbtypes.ResourceStatus]() - stringLengthBetween1And255Validator := []validator.String{ - stringvalidator.LengthBetween(1, 255), - } - resp.Schema = schema.Schema{ - Attributes: map[string]schema.Attribute{ - names.AttrARN: framework.ARNAttributeComputedOnly(), - names.AttrID: framework.IDAttribute(), - "display_name": schema.StringAttribute{ - Required: true, - Description: "Display name for the network resource.", - }, - "availability_zone_id": schema.StringAttribute{ - Required: true, - PlanModifiers: []planmodifier.String{ - stringplanmodifier.RequiresReplace(), - }, - Description: "The AZ ID of the AZ where the ODB network is located. Changing this will force terraform to create new resource.", - }, - "client_subnet_cidr": schema.StringAttribute{ - Required: true, - Validators: stringLengthBetween1And255Validator, - PlanModifiers: []planmodifier.String{ - stringplanmodifier.RequiresReplace(), - }, - Description: "The CIDR notation for the network resource. Changing this will force terraform to create new resource.\n" + - " Constraints:\n " + - "\t - Must not overlap with the CIDR range of the backup subnet.\n " + - "\t- Must not overlap with the CIDR ranges of the VPCs that are connected to the\n " + - " ODB network.\n " + - "\t- Must not use the following CIDR ranges that are reserved by OCI:\n " + - "\t - 100.106.0.0/16 and 100.107.0.0/16\n " + - "\t - 169.254.0.0/16\n " + - "\t- 224.0.0.0 - 239.255.255.255\n " + - "\t- 240.0.0.0 - 255.255.255.255", - }, - "backup_subnet_cidr": schema.StringAttribute{ - Required: true, - Validators: stringLengthBetween1And255Validator, - PlanModifiers: []planmodifier.String{ - stringplanmodifier.RequiresReplace(), - }, - Description: " The CIDR range of the backup subnet for the ODB network. Changing this will force terraform to create new resource.\n" + - "\tConstraints:\n" + - "\t - Must not overlap with the CIDR range of the client subnet.\n" + - "\t - Must not overlap with the CIDR ranges of the VPCs that are connected to the\n" + - "\t ODB network.\n" + - "\t - Must not use the following CIDR ranges that are reserved by OCI:\n" + - "\t - 100.106.0.0/16 and 100.107.0.0/16\n" + - "\t - 169.254.0.0/16\n" + - "\t - 224.0.0.0 - 239.255.255.255\n" + - "\t - 240.0.0.0 - 255.255.255.255", - }, - - "custom_domain_name": schema.StringAttribute{ - Optional: true, - Validators: stringLengthBetween1And255Validator, - PlanModifiers: []planmodifier.String{ - stringplanmodifier.RequiresReplace(), - }, - Description: "The name of the custom domain that the network is located. custom_domain_name and default_dns_prefix both can't be given.", - }, - "default_dns_prefix": schema.StringAttribute{ - Optional: true, - PlanModifiers: []planmodifier.String{ - stringplanmodifier.RequiresReplace(), - }, - Description: "The default DNS prefix for the network resource. Changing this will force terraform to create new resource.", - }, - "s3_access": schema.StringAttribute{ - Required: true, - CustomType: fwtypes.StringEnumType[odbtypes.Access](), - Description: "Specifies the configuration for Amazon S3 access from the ODB network.", - }, - "zero_etl_access": schema.StringAttribute{ - Required: true, - CustomType: fwtypes.StringEnumType[odbtypes.Access](), - Description: "pecifies the configuration for Zero-ETL access from the ODB network.", - }, - "s3_policy_document": schema.StringAttribute{ - Optional: true, - PlanModifiers: []planmodifier.String{ - stringplanmodifier.UseStateForUnknown(), - }, - Description: "Specifies the endpoint policy for Amazon S3 access from the ODB network.", - }, - "oci_dns_forwarding_configs": schema.ListAttribute{ - CustomType: fwtypes.NewListNestedObjectTypeOf[odbNwkOciDnsForwardingConfigResourceModel](ctx), - Computed: true, - Description: "The DNS resolver endpoint in OCI for forwarding DNS queries for the ociPrivateZone domain.", - ElementType: types.ObjectType{ - AttrTypes: map[string]attr.Type{ - "domain_name": types.StringType, - "oci_dns_listener_ip": types.StringType, - }, - }, - }, - "peered_cidrs": schema.SetAttribute{ - CustomType: fwtypes.SetOfStringType, - ElementType: types.StringType, - Computed: true, - Description: "The list of CIDR ranges from the peered VPC that are allowed access to the ODB network. Please refer odb network peering documentation.", - }, - "oci_network_anchor_id": schema.StringAttribute{ - Computed: true, - Description: "The unique identifier of the OCI network anchor for the ODB network.", - }, - "oci_network_anchor_url": schema.StringAttribute{ - Computed: true, - Description: "The URL of the OCI network anchor for the ODB network.", - }, - "oci_resource_anchor_name": schema.StringAttribute{ - Computed: true, - Description: "The name of the OCI resource anchor for the ODB network.", - }, - "oci_vcn_id": schema.StringAttribute{ - Computed: true, - Description: "The unique identifier Oracle Cloud ID (OCID) of the OCI VCN for the ODB network.", - }, - "oci_vcn_url": schema.StringAttribute{ - Computed: true, - Description: "The URL of the OCI VCN for the ODB network.", - }, - "percent_progress": schema.Float32Attribute{ - Computed: true, - Description: "The amount of progress made on the current operation on the ODB network, expressed as a percentage.", - }, - "status": schema.StringAttribute{ - CustomType: statusType, - Computed: true, - Description: "The status of the network resource.", - }, - "status_reason": schema.StringAttribute{ - Computed: true, - Description: "Additional information about the current status of the ODB network.", - }, - "created_at": schema.StringAttribute{ - Computed: true, - Description: "The date and time when the ODB network was created.", - }, - "managed_services": schema.ObjectAttribute{ - Computed: true, - CustomType: fwtypes.NewObjectTypeOf[odbNetworkManagedServicesResourceModel](ctx), - Description: "The managed services configuration for the ODB network.", - AttributeTypes: map[string]attr.Type{ - "service_network_arn": types.StringType, - "resource_gateway_arn": types.StringType, - "managed_service_ipv4_cidrs": types.SetType{ - ElemType: types.StringType, - }, - "service_network_endpoint": types.ObjectType{ - AttrTypes: map[string]attr.Type{ - "vpc_endpoint_id": types.StringType, - "vpc_endpoint_type": fwtypes.StringEnumType[odbtypes.VpcEndpointType](), - }, - }, - "managed_s3_backup_access": types.ObjectType{ - AttrTypes: map[string]attr.Type{ - "status": fwtypes.StringEnumType[odbtypes.ManagedResourceStatus](), - "ipv4_addresses": types.SetType{ - ElemType: types.StringType, - }, - }, - }, - "zero_tl_access": types.ObjectType{ - AttrTypes: map[string]attr.Type{ - "status": fwtypes.StringEnumType[odbtypes.ManagedResourceStatus](), - "cidr": types.StringType, - }, - }, - "s3_access": types.ObjectType{ - AttrTypes: map[string]attr.Type{ - "status": fwtypes.StringEnumType[odbtypes.ManagedResourceStatus](), - "ipv4_addresses": types.SetType{ - ElemType: types.StringType, - }, - "domain_name": types.StringType, - "s3_policy_document": types.StringType, - }, - }, - }, - }, - names.AttrTags: tftags.TagsAttribute(), - names.AttrTagsAll: tftags.TagsAttributeComputedOnly(), - }, - Blocks: map[string]schema.Block{ - names.AttrTimeouts: timeouts.Block(ctx, timeouts.Opts{ - Create: true, - Update: true, - Delete: true, - }), - }, - } -} - -func (r *resourceNetwork) Create(ctx context.Context, req resource.CreateRequest, resp *resource.CreateResponse) { - - conn := r.Meta().ODBClient(ctx) - var plan odbNetworkResourceModel - resp.Diagnostics.Append(req.Plan.Get(ctx, &plan)...) - if resp.Diagnostics.HasError() { - return - } - - input := odb.CreateOdbNetworkInput{ - ClientToken: aws.String(id.UniqueId()), - Tags: getTagsIn(ctx), - } - - resp.Diagnostics.Append(flex.Expand(ctx, plan, &input)...) - if resp.Diagnostics.HasError() { - return - } - out, err := conn.CreateOdbNetwork(ctx, &input) - if err != nil { - resp.Diagnostics.AddError( - create.ProblemStandardMessage(names.ODB, create.ErrActionCreating, ResNameNetwork, plan.DisplayName.String(), err), - err.Error(), - ) - return - } - if out == nil || out.OdbNetworkId == nil { - resp.Diagnostics.AddError( - create.ProblemStandardMessage(names.ODB, create.ErrActionCreating, ResNameNetwork, plan.DisplayName.String(), nil), - errors.New("empty output").Error(), - ) - return - } - - createTimeout := r.CreateTimeout(ctx, plan.Timeouts) - createdOdbNetwork, err := waitNetworkCreated(ctx, conn, *out.OdbNetworkId, createTimeout) - if err != nil { - resp.Diagnostics.AddError( - create.ProblemStandardMessage(names.ODB, create.ErrActionWaitingForCreation, ResNameNetwork, plan.DisplayName.String(), err), - err.Error(), - ) - return - } - //set zero etl access - if plan.ZeroEtlAccess.ValueEnum() == odbtypes.AccessEnabled { - _, err = waitManagedServiceEnabled(ctx, conn, *createdOdbNetwork.OdbNetworkId, managedServiceTimeout, func(managedService *odbtypes.ManagedServices) odbtypes.ManagedResourceStatus { - return managedService.ZeroEtlAccess.Status - }) - if err != nil { - resp.Diagnostics.AddError( - create.ProblemStandardMessage(names.ODB, create.ErrActionWaitingForUpdate, ResNameNetwork, plan.OdbNetworkId.String(), err), - err.Error(), - ) - return - } - plan.ZeroEtlAccess = fwtypes.StringEnumValue(odbtypes.AccessEnabled) - - } else if plan.ZeroEtlAccess.ValueEnum() == odbtypes.AccessDisabled { - _, err = waitManagedServiceDisabled(ctx, conn, *createdOdbNetwork.OdbNetworkId, managedServiceTimeout, func(managedService *odbtypes.ManagedServices) odbtypes.ManagedResourceStatus { - return managedService.ZeroEtlAccess.Status - }) - if err != nil { - resp.Diagnostics.AddError( - create.ProblemStandardMessage(names.ODB, create.ErrActionWaitingForUpdate, ResNameNetwork, plan.OdbNetworkId.String(), err), - err.Error(), - ) - return - } - plan.ZeroEtlAccess = fwtypes.StringEnumValue(odbtypes.AccessDisabled) - } - - //set s3 access - if plan.S3Access.ValueEnum() == odbtypes.AccessEnabled { - _, err = waitManagedServiceEnabled(ctx, conn, *createdOdbNetwork.OdbNetworkId, managedServiceTimeout, func(managedService *odbtypes.ManagedServices) odbtypes.ManagedResourceStatus { - return managedService.S3Access.Status - }) - if err != nil { - resp.Diagnostics.AddError( - create.ProblemStandardMessage(names.ODB, create.ErrActionWaitingForUpdate, ResNameNetwork, plan.OdbNetworkId.String(), err), - err.Error(), - ) - return - } - plan.S3Access = fwtypes.StringEnumValue(odbtypes.AccessEnabled) - - } else if plan.S3Access.ValueEnum() == odbtypes.AccessDisabled { - _, err = waitManagedServiceDisabled(ctx, conn, *createdOdbNetwork.OdbNetworkId, managedServiceTimeout, func(managedService *odbtypes.ManagedServices) odbtypes.ManagedResourceStatus { - return managedService.S3Access.Status - }) - if err != nil { - resp.Diagnostics.AddError( - create.ProblemStandardMessage(names.ODB, create.ErrActionWaitingForUpdate, ResNameNetwork, plan.OdbNetworkId.String(), err), - err.Error(), - ) - return - } - plan.S3Access = fwtypes.StringEnumValue(odbtypes.AccessDisabled) - } - - plan.S3PolicyDocument = types.StringPointerValue(createdOdbNetwork.ManagedServices.S3Access.S3PolicyDocument) - plan.CreatedAt = types.StringValue(createdOdbNetwork.CreatedAt.Format(time.RFC3339)) - - resp.Diagnostics.Append(flex.Flatten(ctx, createdOdbNetwork, &plan)...) - if resp.Diagnostics.HasError() { - return - } - - resp.Diagnostics.Append(resp.State.Set(ctx, plan)...) - -} - -func (r *resourceNetwork) Read(ctx context.Context, req resource.ReadRequest, resp *resource.ReadResponse) { - conn := r.Meta().ODBClient(ctx) - - var state odbNetworkResourceModel - resp.Diagnostics.Append(req.State.Get(ctx, &state)...) - if resp.Diagnostics.HasError() { - return - } - - out, err := FindOdbNetworkByID(ctx, conn, state.OdbNetworkId.ValueString()) - if tfresource.NotFound(err) { - resp.Diagnostics.Append(fwdiag.NewResourceNotFoundWarningDiagnostic(err)) - resp.State.RemoveResource(ctx) - return - } - if err != nil { - resp.Diagnostics.AddError( - create.ProblemStandardMessage(names.ODB, create.ErrActionReading, ResNameNetwork, state.OdbNetworkId.String(), err), - err.Error(), - ) - return - } - if out.ManagedServices != nil { - - readS3AccessStatus, err := managedServiceStatusToAccessStatus(out.ManagedServices.S3Access.Status) - if err != nil { - resp.Diagnostics.AddError( - create.ProblemStandardMessage(names.ODB, create.ErrActionReading, ResNameNetwork, state.OdbNetworkId.String(), err), - err.Error(), - ) - return - } - state.S3Access = fwtypes.StringEnumValue(readS3AccessStatus) - state.S3PolicyDocument = types.StringPointerValue(out.ManagedServices.S3Access.S3PolicyDocument) - - readZeroEtlAccessStatus, err := managedServiceStatusToAccessStatus(out.ManagedServices.ZeroEtlAccess.Status) - if err != nil { - resp.Diagnostics.AddError( - create.ProblemStandardMessage(names.ODB, create.ErrActionReading, ResNameNetwork, state.OdbNetworkId.String(), err), - err.Error(), - ) - return - } - state.ZeroEtlAccess = fwtypes.StringEnumValue(readZeroEtlAccessStatus) - } else { - resp.Diagnostics.AddError( - create.ProblemStandardMessage(names.ODB, create.ErrActionReading, ResNameNetwork, state.OdbNetworkId.String(), errors.New("odbNetwork managed service not found")), - "Odb Network managed service cannot be nil", - ) - return - } - state.CreatedAt = types.StringValue(out.CreatedAt.Format(time.RFC3339)) - resp.Diagnostics.Append(flex.Flatten(ctx, out, &state)...) - if resp.Diagnostics.HasError() { - return - } - resp.Diagnostics.Append(resp.State.Set(ctx, &state)...) -} - -func (r *resourceNetwork) Update(ctx context.Context, req resource.UpdateRequest, resp *resource.UpdateResponse) { - - conn := r.Meta().ODBClient(ctx) - - var plan, state odbNetworkResourceModel - resp.Diagnostics.Append(req.Plan.Get(ctx, &plan)...) - resp.Diagnostics.Append(req.State.Get(ctx, &state)...) - if resp.Diagnostics.HasError() { - return - } - - isUpdateRequired := false - var input odb.UpdateOdbNetworkInput - - if !plan.DisplayName.Equal(state.DisplayName) { - isUpdateRequired = true - input.DisplayName = plan.DisplayName.ValueStringPointer() - } - - if !plan.S3Access.Equal(state.S3Access) { - isUpdateRequired = true - input.S3Access = plan.S3Access.ValueEnum() - } - - if !plan.ZeroEtlAccess.Equal(state.ZeroEtlAccess) { - isUpdateRequired = true - input.ZeroEtlAccess = plan.ZeroEtlAccess.ValueEnum() - } - if !plan.S3PolicyDocument.Equal(state.S3PolicyDocument) { - isUpdateRequired = true - if !plan.S3PolicyDocument.IsNull() || !plan.S3PolicyDocument.IsUnknown() { - input.S3PolicyDocument = plan.S3PolicyDocument.ValueStringPointer() - } - } - if isUpdateRequired { - input.OdbNetworkId = state.OdbNetworkId.ValueStringPointer() - - out, err := conn.UpdateOdbNetwork(ctx, &input) - if err != nil { - resp.Diagnostics.AddError( - create.ProblemStandardMessage(names.ODB, create.ErrActionUpdating, ResNameNetwork, plan.OdbNetworkId.String(), err), - err.Error(), - ) - return - } - if out == nil || out.OdbNetworkId == nil { - resp.Diagnostics.AddError( - create.ProblemStandardMessage(names.ODB, create.ErrActionUpdating, ResNameNetwork, plan.OdbNetworkId.String(), nil), - errors.New("empty output").Error(), - ) - return - } - } - - updateTimeout := r.UpdateTimeout(ctx, plan.Timeouts) - updatedOdbNwk, err := waitNetworkUpdated(ctx, conn, plan.OdbNetworkId.ValueString(), updateTimeout) - if err != nil { - resp.Diagnostics.AddError( - create.ProblemStandardMessage(names.ODB, create.ErrActionWaitingForUpdate, ResNameNetwork, plan.OdbNetworkId.String(), err), - err.Error(), - ) - return - } - - if plan.S3Access.ValueEnum() == odbtypes.AccessEnabled { - _, err = waitManagedServiceEnabled(ctx, conn, *input.OdbNetworkId, managedServiceTimeout, func(managedService *odbtypes.ManagedServices) odbtypes.ManagedResourceStatus { - return managedService.S3Access.Status - }) - if err != nil { - resp.Diagnostics.AddError( - create.ProblemStandardMessage(names.ODB, create.ErrActionWaitingForUpdate, ResNameNetwork, plan.OdbNetworkId.String(), err), - err.Error(), - ) - return - } - plan.S3Access = fwtypes.StringEnumValue(odbtypes.AccessEnabled) - - } else if plan.S3Access.ValueEnum() == odbtypes.AccessDisabled { - _, err = waitManagedServiceDisabled(ctx, conn, *input.OdbNetworkId, managedServiceTimeout, func(managedService *odbtypes.ManagedServices) odbtypes.ManagedResourceStatus { - return managedService.S3Access.Status - }) - if err != nil { - resp.Diagnostics.AddError( - create.ProblemStandardMessage(names.ODB, create.ErrActionWaitingForUpdate, ResNameNetwork, plan.OdbNetworkId.String(), err), - err.Error(), - ) - return - } - plan.S3Access = fwtypes.StringEnumValue(odbtypes.AccessDisabled) - } - - if plan.ZeroEtlAccess.ValueEnum() == odbtypes.AccessEnabled { - _, err = waitManagedServiceEnabled(ctx, conn, *input.OdbNetworkId, managedServiceTimeout, func(managedService *odbtypes.ManagedServices) odbtypes.ManagedResourceStatus { - return managedService.ZeroEtlAccess.Status - }) - if err != nil { - resp.Diagnostics.AddError( - create.ProblemStandardMessage(names.ODB, create.ErrActionWaitingForUpdate, ResNameNetwork, plan.OdbNetworkId.String(), err), - err.Error(), - ) - return - } - plan.ZeroEtlAccess = fwtypes.StringEnumValue(odbtypes.AccessEnabled) - - } else if plan.ZeroEtlAccess.ValueEnum() == odbtypes.AccessDisabled { - _, err = waitManagedServiceDisabled(ctx, conn, *input.OdbNetworkId, managedServiceTimeout, func(managedService *odbtypes.ManagedServices) odbtypes.ManagedResourceStatus { - return managedService.ZeroEtlAccess.Status - }) - if err != nil { - resp.Diagnostics.AddError( - create.ProblemStandardMessage(names.ODB, create.ErrActionWaitingForUpdate, ResNameNetwork, plan.OdbNetworkId.String(), err), - err.Error(), - ) - return - } - plan.ZeroEtlAccess = fwtypes.StringEnumValue(odbtypes.AccessDisabled) - } - plan.S3PolicyDocument = types.StringPointerValue(updatedOdbNwk.ManagedServices.S3Access.S3PolicyDocument) - plan.CreatedAt = types.StringValue(updatedOdbNwk.CreatedAt.Format(time.RFC3339)) - - resp.Diagnostics.Append(flex.Flatten(ctx, updatedOdbNwk, &plan)...) - resp.Diagnostics.Append(resp.State.Set(ctx, &plan)...) -} - -func (r *resourceNetwork) Delete(ctx context.Context, req resource.DeleteRequest, resp *resource.DeleteResponse) { - conn := r.Meta().ODBClient(ctx) - - var state odbNetworkResourceModel - resp.Diagnostics.Append(req.State.Get(ctx, &state)...) - if resp.Diagnostics.HasError() { - return - } - - deleteAssociatedResources := false - input := odb.DeleteOdbNetworkInput{ - OdbNetworkId: state.OdbNetworkId.ValueStringPointer(), - DeleteAssociatedResources: &deleteAssociatedResources, - } - - _, err := conn.DeleteOdbNetwork(ctx, &input) - - if err != nil { - if errs.IsA[*odbtypes.ResourceNotFoundException](err) { - return - } - - resp.Diagnostics.AddError( - create.ProblemStandardMessage(names.ODB, create.ErrActionDeleting, ResNameNetwork, state.OdbNetworkId.String(), err), - err.Error(), - ) - return - } - - deleteTimeout := r.DeleteTimeout(ctx, state.Timeouts) - _, err = waitNetworkDeleted(ctx, conn, state.OdbNetworkId.ValueString(), deleteTimeout) - if err != nil { - resp.Diagnostics.AddError( - create.ProblemStandardMessage(names.ODB, create.ErrActionWaitingForDeletion, ResNameNetwork, state.OdbNetworkArn.String(), err), - err.Error(), - ) - return - } -} - -func (r *resourceNetwork) ImportState(ctx context.Context, req resource.ImportStateRequest, resp *resource.ImportStateResponse) { - resource.ImportStatePassthroughID(ctx, path.Root(names.AttrID), req, resp) -} - -func waitNetworkCreated(ctx context.Context, conn *odb.Client, id string, timeout time.Duration) (*odbtypes.OdbNetwork, error) { - stateConf := &retry.StateChangeConf{ - Pending: enum.Slice(odbtypes.ResourceStatusProvisioning), - Target: enum.Slice(odbtypes.ResourceStatusAvailable, odbtypes.ResourceStatusFailed), - Refresh: statusNetwork(ctx, conn, id), - Timeout: timeout, - } - - outputRaw, err := stateConf.WaitForStateContext(ctx) - if out, ok := outputRaw.(*odbtypes.OdbNetwork); ok { - return out, err - } - - return nil, err -} - -func managedServiceStatusToAccessStatus(mangedStatus odbtypes.ManagedResourceStatus) (odbtypes.Access, error) { - if mangedStatus == odbtypes.ManagedResourceStatusDisabled { - return odbtypes.AccessDisabled, nil - } - if mangedStatus == odbtypes.ManagedResourceStatusEnabled { - return odbtypes.AccessEnabled, nil - } - return "", errors.New("can not convert managed status to access status") -} - -func waitManagedServiceEnabled(ctx context.Context, conn *odb.Client, id string, timeout time.Duration, managedResourceStatus func(managedService *odbtypes.ManagedServices) odbtypes.ManagedResourceStatus) (*odbtypes.OdbNetwork, error) { - stateConf := &retry.StateChangeConf{ - Pending: enum.Slice(odbtypes.ManagedResourceStatusEnabling), - Target: enum.Slice(odbtypes.ManagedResourceStatusEnabled), - Refresh: statusManagedService(ctx, conn, id, managedResourceStatus), - Timeout: timeout, - } - - outputRaw, err := stateConf.WaitForStateContext(ctx) - if out, ok := outputRaw.(*odbtypes.OdbNetwork); ok { - return out, err - } - - return nil, err -} - -func waitManagedServiceDisabled(ctx context.Context, conn *odb.Client, id string, timeout time.Duration, managedResourceStatus func(managedService *odbtypes.ManagedServices) odbtypes.ManagedResourceStatus) (*odbtypes.OdbNetwork, error) { - stateConf := &retry.StateChangeConf{ - Pending: enum.Slice(odbtypes.ManagedResourceStatusDisabling), - Target: enum.Slice(odbtypes.ManagedResourceStatusDisabled), - Refresh: statusManagedService(ctx, conn, id, managedResourceStatus), - Timeout: timeout, - } - - outputRaw, err := stateConf.WaitForStateContext(ctx) - if out, ok := outputRaw.(*odbtypes.OdbNetwork); ok { - return out, err - } - - return nil, err -} - -func statusManagedService(ctx context.Context, conn *odb.Client, id string, managedResourceStatus func(managedService *odbtypes.ManagedServices) odbtypes.ManagedResourceStatus) retry.StateRefreshFunc { - return func() (any, string, error) { - out, err := FindOdbNetworkByID(ctx, conn, id) - - if err != nil { - return nil, "", err - } - - if out.ManagedServices == nil { - return nil, "", nil - } - - return out, string(managedResourceStatus(out.ManagedServices)), nil - } -} - -func waitNetworkUpdated(ctx context.Context, conn *odb.Client, id string, timeout time.Duration) (*odbtypes.OdbNetwork, error) { - stateConf := &retry.StateChangeConf{ - Pending: enum.Slice(odbtypes.ResourceStatusUpdating), - Target: enum.Slice(odbtypes.ResourceStatusAvailable, odbtypes.ResourceStatusFailed), - Refresh: statusNetwork(ctx, conn, id), - Timeout: timeout, - } - - outputRaw, err := stateConf.WaitForStateContext(ctx) - if out, ok := outputRaw.(*odbtypes.OdbNetwork); ok { - return out, err - } - - return nil, err -} - -func waitNetworkDeleted(ctx context.Context, conn *odb.Client, id string, timeout time.Duration) (*odbtypes.OdbNetwork, error) { - stateConf := &retry.StateChangeConf{ - Pending: enum.Slice(odbtypes.ResourceStatusTerminating), - Target: []string{}, - Refresh: statusNetwork(ctx, conn, id), - Timeout: timeout, - } - - outputRaw, err := stateConf.WaitForStateContext(ctx) - if out, ok := outputRaw.(*odbtypes.OdbNetwork); ok { - return out, err - } - - return nil, err -} - -func statusNetwork(ctx context.Context, conn *odb.Client, id string) retry.StateRefreshFunc { - return func() (any, string, error) { - out, err := FindOdbNetworkByID(ctx, conn, id) - if tfresource.NotFound(err) { - return nil, "", nil - } - - if err != nil { - return nil, "", err - } - - return out, string(out.Status), nil - } -} - -func FindOdbNetworkByID(ctx context.Context, conn *odb.Client, id string) (*odbtypes.OdbNetwork, error) { - input := odb.GetOdbNetworkInput{ - OdbNetworkId: aws.String(id), - } - - out, err := conn.GetOdbNetwork(ctx, &input) - if err != nil { - if errs.IsA[*odbtypes.ResourceNotFoundException](err) { - return nil, &retry.NotFoundError{ - LastError: err, - LastRequest: &input, - } - } - - return nil, err - } - - if out == nil || out.OdbNetwork == nil { - return nil, tfresource.NewEmptyResultError(&input) - } - - return out.OdbNetwork, nil -} - -func sweepNetworks(ctx context.Context, client *conns.AWSClient) ([]sweep.Sweepable, error) { - input := odb.ListOdbNetworksInput{} - conn := client.ODBClient(ctx) - var sweepResources []sweep.Sweepable - - pages := odb.NewListOdbNetworksPaginator(conn, &input) - for pages.HasMorePages() { - page, err := pages.NextPage(ctx) - if err != nil { - return nil, err - } - - for _, v := range page.OdbNetworks { - sweepResources = append(sweepResources, sweepfw.NewSweepResource(newResourceNetwork, client, - sweepfw.NewAttribute(names.AttrID, aws.ToString(v.OdbNetworkId))), - ) - } - } - - return sweepResources, nil -} - -type odbNetworkResourceModel struct { - framework.WithRegionModel - DisplayName types.String `tfsdk:"display_name"` - AvailabilityZoneId types.String `tfsdk:"availability_zone_id"` - ClientSubnetCidr types.String `tfsdk:"client_subnet_cidr"` - BackupSubnetCidr types.String `tfsdk:"backup_subnet_cidr"` - CustomDomainName types.String `tfsdk:"custom_domain_name"` - DefaultDnsPrefix types.String `tfsdk:"default_dns_prefix"` - S3Access fwtypes.StringEnum[odbtypes.Access] `tfsdk:"s3_access" autoflex:",noflatten"` - ZeroEtlAccess fwtypes.StringEnum[odbtypes.Access] `tfsdk:"zero_etl_access" autoflex:",noflatten"` - S3PolicyDocument types.String `tfsdk:"s3_policy_document" autoflex:",noflatten"` - OdbNetworkId types.String `tfsdk:"id"` - PeeredCidrs fwtypes.SetValueOf[types.String] `tfsdk:"peered_cidrs"` - OciDnsForwardingConfigs fwtypes.ListNestedObjectValueOf[odbNwkOciDnsForwardingConfigResourceModel] `tfsdk:"oci_dns_forwarding_configs"` - OciNetworkAnchorId types.String `tfsdk:"oci_network_anchor_id"` - OciNetworkAnchorUrl types.String `tfsdk:"oci_network_anchor_url"` - OciResourceAnchorName types.String `tfsdk:"oci_resource_anchor_name"` - OciVcnId types.String `tfsdk:"oci_vcn_id"` - OciVcnUrl types.String `tfsdk:"oci_vcn_url"` - OdbNetworkArn types.String `tfsdk:"arn"` - PercentProgress types.Float32 `tfsdk:"percent_progress"` - Status fwtypes.StringEnum[odbtypes.ResourceStatus] `tfsdk:"status"` - StatusReason types.String `tfsdk:"status_reason"` - Timeouts timeouts.Value `tfsdk:"timeouts"` - ManagedServices fwtypes.ObjectValueOf[odbNetworkManagedServicesResourceModel] `tfsdk:"managed_services"` - CreatedAt types.String `tfsdk:"created_at" autoflex:",noflatten"` - Tags tftags.Map `tfsdk:"tags"` - TagsAll tftags.Map `tfsdk:"tags_all"` -} - -type odbNwkOciDnsForwardingConfigResourceModel struct { - DomainName types.String `tfsdk:"domain_name"` - OciDnsListenerIp types.String `tfsdk:"oci_dns_listener_ip"` -} -type odbNetworkManagedServicesResourceModel struct { - ServiceNetworkArn types.String `tfsdk:"service_network_arn"` - ResourceGatewayArn types.String `tfsdk:"resource_gateway_arn"` - ManagedServicesIpv4Cidrs fwtypes.SetOfString `tfsdk:"managed_service_ipv4_cidrs"` - ServiceNetworkEndpoint fwtypes.ObjectValueOf[serviceNetworkEndpointOdbNetworkResourceModel] `tfsdk:"service_network_endpoint"` - ManagedS3BackupAccess fwtypes.ObjectValueOf[managedS3BackupAccessOdbNetworkResourceModel] `tfsdk:"managed_s3_backup_access"` - ZeroEtlAccess fwtypes.ObjectValueOf[zeroEtlAccessOdbNetworkResourceModel] `tfsdk:"zero_etl_access"` - S3Access fwtypes.ObjectValueOf[s3AccessOdbNetworkResourceModel] `tfsdk:"s3_access"` -} - -type serviceNetworkEndpointOdbNetworkResourceModel struct { - VpcEndpointId types.String `tfsdk:"vpc_endpoint_id"` - VpcEndpointType fwtypes.StringEnum[odbtypes.VpcEndpointType] `tfsdk:"vpc_endpoint_type"` -} - -type managedS3BackupAccessOdbNetworkResourceModel struct { - Status fwtypes.StringEnum[odbtypes.ManagedResourceStatus] `tfsdk:"status"` - Ipv4Addresses fwtypes.SetOfString `tfsdk:"ipv4_addresses"` -} - -type zeroEtlAccessOdbNetworkResourceModel struct { - Status fwtypes.StringEnum[odbtypes.ManagedResourceStatus] `tfsdk:"status"` - Cidr types.String `tfsdk:"cidr"` -} - -type s3AccessOdbNetworkResourceModel struct { - Status fwtypes.StringEnum[odbtypes.ManagedResourceStatus] `tfsdk:"status"` - Ipv4Addresses fwtypes.SetOfString `tfsdk:"ipv4_addresses"` - DomainName types.String `tfsdk:"domain_name"` - S3PolicyDocument types.String `tfsdk:"s3_policy_document"` -} diff --git a/internal/service/odb/network_data_source.go b/internal/service/odb/network_data_source.go deleted file mode 100644 index 1f7e94865848..000000000000 --- a/internal/service/odb/network_data_source.go +++ /dev/null @@ -1,248 +0,0 @@ -//Copyright © 2025, Oracle and/or its affiliates. All rights reserved. - -package odb - -import ( - "context" - "github.com/aws/aws-sdk-go-v2/service/odb" - odbtypes "github.com/aws/aws-sdk-go-v2/service/odb/types" - "github.com/hashicorp/terraform-plugin-framework/attr" - "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/create" - "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" - tftags "github.com/hashicorp/terraform-provider-aws/internal/tags" - "github.com/hashicorp/terraform-provider-aws/names" - "time" -) - -// Function annotations are used for datasource registration to the Provider. DO NOT EDIT. -// @FrameworkDataSource("aws_odb_network", name="Network") -func newDataSourceNetwork(context.Context) (datasource.DataSourceWithConfigure, error) { - return &dataSourceNetwork{}, nil -} - -const ( - DSNameNetwork = "Odb Network Data Source" -) - -type dataSourceNetwork struct { - framework.DataSourceWithModel[odbNetworkDataSourceModel] -} - -var OdbNetworkDataSource dataSourceNetwork - -func (d *dataSourceNetwork) Schema(ctx context.Context, req datasource.SchemaRequest, resp *datasource.SchemaResponse) { - statusType := fwtypes.StringEnumType[odbtypes.ResourceStatus]() - resp.Schema = schema.Schema{ - Attributes: map[string]schema.Attribute{ - names.AttrARN: framework.ARNAttributeComputedOnly(), - names.AttrID: schema.StringAttribute{ - Required: true, - }, - "display_name": schema.StringAttribute{ - Computed: true, - }, - "availability_zone_id": schema.StringAttribute{ - Computed: true, - }, - "availability_zone": schema.StringAttribute{ - Computed: true, - }, - "backup_subnet_cidr": schema.StringAttribute{ - Computed: true, - }, - "client_subnet_cidr": schema.StringAttribute{ - Computed: true, - }, - "custom_domain_name": schema.StringAttribute{ - Computed: true, - }, - "default_dns_prefix": schema.StringAttribute{ - Computed: true, - }, - "oci_network_anchor_id": schema.StringAttribute{ - Computed: true, - }, - "oci_network_anchor_url": schema.StringAttribute{ - Computed: true, - }, - "oci_resource_anchor_name": schema.StringAttribute{ - Computed: true, - }, - "oci_vcn_id": schema.StringAttribute{ - Computed: true, - }, - "oci_vcn_url": schema.StringAttribute{ - Computed: true, - }, - "percent_progress": schema.Float64Attribute{ - Computed: true, - }, - "peered_cidrs": schema.SetAttribute{ - CustomType: fwtypes.SetOfStringType, - ElementType: types.StringType, - Computed: true, - Description: "The list of CIDR ranges from the peered VPC that are allowed access to the ODB network. Please refer odb network peering documentation.", - }, - "status": schema.StringAttribute{ - CustomType: statusType, - Computed: true, - }, - "status_reason": schema.StringAttribute{ - Computed: true, - }, - "created_at": schema.StringAttribute{ - Computed: true, - }, - "managed_services": schema.ObjectAttribute{ - Computed: true, - CustomType: fwtypes.NewObjectTypeOf[odbNetworkManagedServicesDataSourceModel](ctx), - AttributeTypes: map[string]attr.Type{ - "service_network_arn": types.StringType, - "resource_gateway_arn": types.StringType, - "managed_service_ipv4_cidrs": types.ListType{ - ElemType: types.StringType, - }, - "service_network_endpoint": types.ObjectType{ - AttrTypes: map[string]attr.Type{ - "vpc_endpoint_id": types.StringType, - "vpc_endpoint_type": fwtypes.StringEnumType[odbtypes.VpcEndpointType](), - }, - }, - "managed_s3_backup_access": types.ObjectType{ - AttrTypes: map[string]attr.Type{ - "status": fwtypes.StringEnumType[odbtypes.ResourceStatus](), - "ipv4_addresses": types.ListType{ - ElemType: types.StringType, - }, - }, - }, - "zero_tl_access": types.ObjectType{ - AttrTypes: map[string]attr.Type{ - "status": fwtypes.StringEnumType[odbtypes.ManagedResourceStatus](), - "cidr": types.StringType, - }, - }, - "s3_access": types.ObjectType{ - AttrTypes: map[string]attr.Type{ - "status": fwtypes.StringEnumType[odbtypes.ManagedResourceStatus](), - "ipv4_addresses": types.ListType{ - ElemType: types.StringType, - }, - "domain_name": types.StringType, - "s3_policy_document": types.StringType, - }, - }, - }, - }, - names.AttrTags: tftags.TagsAttributeComputedOnly(), - "oci_dns_forwarding_configs": schema.ListAttribute{ - Computed: true, - CustomType: fwtypes.NewListNestedObjectTypeOf[odbNwkOciDnsForwardingConfigDataSourceModel](ctx), - ElementType: types.ObjectType{ - AttrTypes: map[string]attr.Type{ - "domain_name": types.StringType, - "oci_dns_listener_ip": types.StringType, - }, - }, - }, - }, - } -} - -func (d *dataSourceNetwork) Read(ctx context.Context, req datasource.ReadRequest, resp *datasource.ReadResponse) { - conn := d.Meta().ODBClient(ctx) - var data odbNetworkDataSourceModel - resp.Diagnostics.Append(req.Config.Get(ctx, &data)...) - if resp.Diagnostics.HasError() { - return - } - - input := odb.GetOdbNetworkInput{ - OdbNetworkId: data.OdbNetworkId.ValueStringPointer(), - } - - out, err := conn.GetOdbNetwork(ctx, &input) - if err != nil { - resp.Diagnostics.AddError( - create.ProblemStandardMessage(names.ODB, create.ErrActionReading, DSNameNetwork, data.OdbNetworkId.String(), err), - err.Error(), - ) - return - } - - data.CreatedAt = types.StringValue(out.OdbNetwork.CreatedAt.Format(time.RFC3339)) - resp.Diagnostics.Append(flex.Flatten(ctx, out.OdbNetwork, &data, flex.WithIgnoredFieldNamesAppend("CreatedAt"))...) - if resp.Diagnostics.HasError() { - return - } - - resp.Diagnostics.Append(resp.State.Set(ctx, &data)...) -} - -type odbNetworkDataSourceModel struct { - framework.WithRegionModel - AvailabilityZone types.String `tfsdk:"availability_zone"` - AvailabilityZoneId types.String `tfsdk:"availability_zone_id"` - BackupSubnetCidr types.String `tfsdk:"backup_subnet_cidr"` - ClientSubnetCidr types.String `tfsdk:"client_subnet_cidr"` - CustomDomainName types.String `tfsdk:"custom_domain_name"` - DefaultDnsPrefix types.String `tfsdk:"default_dns_prefix"` - DisplayName types.String `tfsdk:"display_name"` - OciDnsForwardingConfigs fwtypes.ListNestedObjectValueOf[odbNwkOciDnsForwardingConfigDataSourceModel] `tfsdk:"oci_dns_forwarding_configs"` - OciNetworkAnchorId types.String `tfsdk:"oci_network_anchor_id"` - OciNetworkAnchorUrl types.String `tfsdk:"oci_network_anchor_url"` - OciResourceAnchorName types.String `tfsdk:"oci_resource_anchor_name"` - OciVcnId types.String `tfsdk:"oci_vcn_id"` - OciVcnUrl types.String `tfsdk:"oci_vcn_url"` - OdbNetworkArn types.String `tfsdk:"arn"` - OdbNetworkId types.String `tfsdk:"id"` - PeeredCidrs fwtypes.SetValueOf[types.String] `tfsdk:"peered_cidrs"` - PercentProgress types.Float64 `tfsdk:"percent_progress"` - Status fwtypes.StringEnum[odbtypes.ResourceStatus] `tfsdk:"status"` - StatusReason types.String `tfsdk:"status_reason"` - CreatedAt types.String `tfsdk:"created_at"` - ManagedServices fwtypes.ObjectValueOf[odbNetworkManagedServicesDataSourceModel] `tfsdk:"managed_services"` - Tags tftags.Map `tfsdk:"tags"` -} - -type odbNwkOciDnsForwardingConfigDataSourceModel struct { - DomainName types.String `tfsdk:"domain_name"` - OciDnsListenerIp types.String `tfsdk:"oci_dns_listener_ip"` -} - -type odbNetworkManagedServicesDataSourceModel struct { - ServiceNetworkArn types.String `tfsdk:"service_network_arn"` - ResourceGatewayArn types.String `tfsdk:"resource_gateway_arn"` - ManagedServicesIpv4Cidrs fwtypes.ListOfString `tfsdk:"managed_service_ipv4_cidrs"` - ServiceNetworkEndpoint fwtypes.ObjectValueOf[serviceNetworkEndpointOdbNetworkDataSourceModel] `tfsdk:"service_network_endpoint"` - ManagedS3BackupAccess fwtypes.ObjectValueOf[managedS3BackupAccessOdbNetworkDataSourceModel] `tfsdk:"managed_s3_backup_access"` - ZeroEtlAccess fwtypes.ObjectValueOf[zeroEtlAccessOdbNetworkDataSourceModel] `tfsdk:"zero_tl_access"` - S3Access fwtypes.ObjectValueOf[s3AccessOdbNetworkDataSourceModel] `tfsdk:"s3_access"` -} - -type serviceNetworkEndpointOdbNetworkDataSourceModel struct { - VpcEndpointId types.String `tfsdk:"vpc_endpoint_id"` - VpcEndpointType fwtypes.StringEnum[odbtypes.VpcEndpointType] `tfsdk:"vpc_endpoint_type"` -} - -type managedS3BackupAccessOdbNetworkDataSourceModel struct { - Status fwtypes.StringEnum[odbtypes.ManagedResourceStatus] `tfsdk:"status"` - Ipv4Addresses fwtypes.ListOfString `tfsdk:"ipv4_addresses"` -} - -type zeroEtlAccessOdbNetworkDataSourceModel struct { - Status fwtypes.StringEnum[odbtypes.ManagedResourceStatus] `tfsdk:"status"` - Cidr types.String `tfsdk:"cidr"` -} - -type s3AccessOdbNetworkDataSourceModel struct { - Status fwtypes.StringEnum[odbtypes.ManagedResourceStatus] `tfsdk:"status"` - Ipv4Addresses fwtypes.ListOfString `tfsdk:"ipv4_addresses"` - DomainName types.String `tfsdk:"domain_name"` - S3PolicyDocument types.String `tfsdk:"s3_policy_document"` -} diff --git a/internal/service/odb/network_data_source_test.go b/internal/service/odb/network_data_source_test.go deleted file mode 100644 index a6a4161a7461..000000000000 --- a/internal/service/odb/network_data_source_test.go +++ /dev/null @@ -1,144 +0,0 @@ -//Copyright © 2025, Oracle and/or its affiliates. All rights reserved. - -package odb_test - -import ( - "context" - "errors" - "fmt" - "github.com/aws/aws-sdk-go-v2/aws" - "github.com/aws/aws-sdk-go-v2/service/odb" - odbtypes "github.com/aws/aws-sdk-go-v2/service/odb/types" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" - sdkacctest "github.com/hashicorp/terraform-plugin-testing/helper/acctest" - "github.com/hashicorp/terraform-plugin-testing/terraform" - "github.com/hashicorp/terraform-provider-aws/internal/conns" - "github.com/hashicorp/terraform-provider-aws/internal/create" - "github.com/hashicorp/terraform-provider-aws/internal/errs" - tfodb "github.com/hashicorp/terraform-provider-aws/internal/service/odb" - "github.com/hashicorp/terraform-provider-aws/internal/tfresource" - "testing" - - "github.com/hashicorp/terraform-plugin-testing/helper/resource" - "github.com/hashicorp/terraform-provider-aws/internal/acctest" - "github.com/hashicorp/terraform-provider-aws/names" -) - -type odbNetworkDataSourceTestCase struct { -} - -var odbNetDSTest = odbNetworkDataSourceTestCase{} - -func TestAccODBOdbNetworkDataSource_basic(t *testing.T) { - ctx := acctest.Context(t) - if testing.Short() { - t.Skip("skipping long-running test in short mode") - } - networkResource := "aws_odb_network.test_resource" - networkDataSource := "data.aws_odb_network.test" - rName := sdkacctest.RandomWithPrefix("tf-odb-net") - - resource.Test(t, resource.TestCase{ - PreCheck: func() { - acctest.PreCheck(ctx, t) - odbNetDSTest.testAccOdbNetworkDataSourcePreCheck(ctx, t) - }, - ErrorCheck: acctest.ErrorCheck(t, names.ODBServiceID), - ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, - CheckDestroy: odbNetDSTest.testAccCheckOdbNetworkDataSourceDestroyed(ctx), - Steps: []resource.TestStep{ - { - Config: odbNetDSTest.basicOdbNetworkDataSource(rName), - Check: resource.ComposeAggregateTestCheckFunc( - resource.TestCheckResourceAttrPair(networkResource, "id", networkDataSource, "id"), - ), - }, - }, - }) -} - -func (odbNetworkDataSourceTestCase) testAccCheckOdbNetworkDataSourceDestroyed(ctx context.Context) resource.TestCheckFunc { - return func(s *terraform.State) error { - conn := acctest.Provider.Meta().(*conns.AWSClient).ODBClient(ctx) - - for _, rs := range s.RootModule().Resources { - if rs.Type != "aws_odb_network" { - continue - } - _, err := odbNetDSTest.findOdbNetwork(ctx, conn, rs.Primary.ID) - if tfresource.NotFound(err) { - return nil - } - if err != nil { - return create.Error(names.ODB, create.ErrActionCheckingDestroyed, tfodb.ResNameNetwork, rs.Primary.ID, err) - } - - return create.Error(names.ODB, create.ErrActionCheckingDestroyed, tfodb.ResNameNetwork, rs.Primary.ID, errors.New("not destroyed")) - } - - return nil - } -} - -func (odbNetworkDataSourceTestCase) findOdbNetwork(ctx context.Context, conn *odb.Client, id string) (*odbtypes.OdbNetwork, error) { - input := odb.GetOdbNetworkInput{ - OdbNetworkId: aws.String(id), - } - - out, err := conn.GetOdbNetwork(ctx, &input) - if err != nil { - if errs.IsA[*odbtypes.ResourceNotFoundException](err) { - return nil, &retry.NotFoundError{ - LastError: err, - LastRequest: &input, - } - } - - return nil, err - } - - if out == nil || out.OdbNetwork == nil { - return nil, tfresource.NewEmptyResultError(&input) - } - - return out.OdbNetwork, nil -} - -func (odbNetworkDataSourceTestCase) basicOdbNetworkDataSource(rName string) string { - networkRes := fmt.Sprintf(` - - -resource "aws_odb_network" "test_resource" { - display_name = %[1]q - availability_zone_id = "use1-az6" - client_subnet_cidr = "10.2.0.0/24" - backup_subnet_cidr = "10.2.1.0/24" - s3_access = "DISABLED" - zero_etl_access = "DISABLED" - tags = { - "env"= "dev" - } -} - - -data "aws_odb_network" "test" { - id = aws_odb_network.test_resource.id -} - -`, rName) - return networkRes -} -func (odbNetworkDataSourceTestCase) testAccOdbNetworkDataSourcePreCheck(ctx context.Context, t *testing.T) { - conn := acctest.Provider.Meta().(*conns.AWSClient).ODBClient(ctx) - - input := &odb.ListOdbNetworksInput{} - - _, err := conn.ListOdbNetworks(ctx, input) - - if acctest.PreCheckSkipError(err) { - t.Skipf("skipping acceptance testing: %s", err) - } - if err != nil { - t.Fatalf("unexpected PreCheck error: %s", err) - } -} diff --git a/internal/service/odb/network_peering_connection.go b/internal/service/odb/network_peering_connection.go deleted file mode 100644 index 46f057869e4c..000000000000 --- a/internal/service/odb/network_peering_connection.go +++ /dev/null @@ -1,481 +0,0 @@ -//Copyright © 2025, Oracle and/or its affiliates. All rights reserved. - -package odb - -import ( - "context" - "errors" - "github.com/hashicorp/terraform-provider-aws/internal/enum" - tftags "github.com/hashicorp/terraform-provider-aws/internal/tags" - "time" - - "github.com/aws/aws-sdk-go-v2/aws" - "github.com/aws/aws-sdk-go-v2/service/odb" - odbtypes "github.com/aws/aws-sdk-go-v2/service/odb/types" - "github.com/hashicorp/terraform-plugin-framework-timeouts/resource/timeouts" - - "github.com/hashicorp/terraform-plugin-framework/path" - "github.com/hashicorp/terraform-plugin-framework/resource" - "github.com/hashicorp/terraform-plugin-framework/resource/schema" - "github.com/hashicorp/terraform-plugin-framework/resource/schema/planmodifier" - "github.com/hashicorp/terraform-plugin-framework/resource/schema/stringplanmodifier" - - "github.com/hashicorp/terraform-plugin-framework/types" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" - "github.com/hashicorp/terraform-provider-aws/internal/conns" - "github.com/hashicorp/terraform-provider-aws/internal/create" - "github.com/hashicorp/terraform-provider-aws/internal/errs" - "github.com/hashicorp/terraform-provider-aws/internal/errs/fwdiag" - "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/sweep" - sweepfw "github.com/hashicorp/terraform-provider-aws/internal/sweep/framework" - "github.com/hashicorp/terraform-provider-aws/internal/tfresource" - "github.com/hashicorp/terraform-provider-aws/names" -) - -// Function annotations are used for resource registration to the Provider. DO NOT EDIT. -// @FrameworkResource("aws_odb_network_peering_connection", name="Network Peering Connection") -// @Tags(identifierAttribute="arn") -func newResourceNetworkPeeringConnection(_ context.Context) (resource.ResourceWithConfigure, error) { - r := &resourceNetworkPeeringConnection{} - - r.SetDefaultCreateTimeout(24 * time.Hour) - r.SetDefaultUpdateTimeout(24 * time.Hour) - r.SetDefaultDeleteTimeout(24 * time.Hour) - - return r, nil -} - -const ( - ResNameNetworkPeeringConnection = "Network Peering Connection" -) - -type resourceNetworkPeeringConnection struct { - framework.ResourceWithModel[odbNetworkPeeringConnectionResourceModel] - framework.WithTimeouts -} - -func (r *resourceNetworkPeeringConnection) Schema(ctx context.Context, req resource.SchemaRequest, resp *resource.SchemaResponse) { - resp.Schema = schema.Schema{ - Description: "Information about an ODB network. Also refer odb_network_peering resource : A peering connection between an ODB network and either another ODB network or a customer-owned VPC.", - Attributes: map[string]schema.Attribute{ - names.AttrARN: framework.ARNAttributeComputedOnly(), - names.AttrID: framework.IDAttribute(), - "odb_network_id": schema.StringAttribute{ - Required: true, - PlanModifiers: []planmodifier.String{ - stringplanmodifier.RequiresReplace(), - }, - Description: "Required field. The unique identifier of the ODB network that initiates the peering connection. " + - "A sample ID is odbpcx-abcdefgh12345678. Changing this will force terraform to create new resource.", - }, - "peer_network_id": schema.StringAttribute{ - Required: true, - PlanModifiers: []planmodifier.String{ - stringplanmodifier.RequiresReplace(), - }, - Description: "Required field. The unique identifier of the ODB peering connection. Changing this will force terraform to create new resource", - }, - - "display_name": schema.StringAttribute{ - Description: "Display name of the odb network peering connection. Changing this will force terraform to create new resource", - Required: true, - PlanModifiers: []planmodifier.String{ - stringplanmodifier.RequiresReplace(), - }, - }, - - "status": schema.StringAttribute{ - Description: "Status of the odb network peering connection.", - CustomType: fwtypes.StringEnumType[odbtypes.ResourceStatus](), - Computed: true, - }, - "status_reason": schema.StringAttribute{ - Description: "The reason for the current status of the ODB peering connection..", - Computed: true, - }, - - "odb_network_arn": schema.StringAttribute{ - Description: "ARN of the odb network peering connection.", - Computed: true, - }, - - "peer_network_arn": schema.StringAttribute{ - Description: "ARN of the peer network peering connection.", - Computed: true, - }, - "odb_peering_connection_type": schema.StringAttribute{ - Description: "Type of the odb peering connection.", - Computed: true, - }, - "created_at": schema.StringAttribute{ - Description: "Created time of the odb network peering connection.", - Computed: true, - }, - "percent_progress": schema.Float32Attribute{ - Description: "Progress of the odb network peering connection.", - Computed: true, - }, - names.AttrTags: tftags.TagsAttribute(), - names.AttrTagsAll: tftags.TagsAttributeComputedOnly(), - }, - Blocks: map[string]schema.Block{ - names.AttrTimeouts: timeouts.Block(ctx, timeouts.Opts{ - Create: true, - Update: true, - Delete: true, - }), - }, - } -} - -func (r *resourceNetworkPeeringConnection) Create(ctx context.Context, req resource.CreateRequest, resp *resource.CreateResponse) { - conn := r.Meta().ODBClient(ctx) - - var plan odbNetworkPeeringConnectionResourceModel - resp.Diagnostics.Append(req.Plan.Get(ctx, &plan)...) - if resp.Diagnostics.HasError() { - return - } - - input := odb.CreateOdbPeeringConnectionInput{ - OdbNetworkId: plan.OdbNetworkId.ValueStringPointer(), - PeerNetworkId: plan.PeerNetworkId.ValueStringPointer(), - DisplayName: plan.DisplayName.ValueStringPointer(), - Tags: getTagsIn(ctx), - } - - out, err := conn.CreateOdbPeeringConnection(ctx, &input) - if err != nil { - - resp.Diagnostics.AddError( - create.ProblemStandardMessage(names.ODB, create.ErrActionCreating, ResNameNetworkPeeringConnection, plan.DisplayName.ValueString(), err), - err.Error(), - ) - return - } - if out == nil || out.OdbPeeringConnectionId == nil { - resp.Diagnostics.AddError( - create.ProblemStandardMessage(names.ODB, create.ErrActionCreating, ResNameNetworkPeeringConnection, plan.DisplayName.ValueString(), nil), - errors.New("empty output").Error(), - ) - return - } - - resp.Diagnostics.Append(flex.Flatten(ctx, out, &plan)...) - if resp.Diagnostics.HasError() { - return - } - - createTimeout := r.CreateTimeout(ctx, plan.Timeouts) - createdPeeredConnection, err := waitNetworkPeeringConnectionCreated(ctx, conn, plan.OdbPeeringConnectionId.ValueString(), createTimeout) - if err != nil { - resp.Diagnostics.AddError( - create.ProblemStandardMessage(names.ODB, create.ErrActionWaitingForCreation, ResNameNetworkPeeringConnection, plan.DisplayName.ValueString(), err), - err.Error(), - ) - return - } - plan.CreatedAt = types.StringValue(createdPeeredConnection.CreatedAt.Format(time.RFC3339)) - resp.Diagnostics.Append(flex.Flatten(ctx, createdPeeredConnection, &plan, flex.WithIgnoredFieldNamesAppend("CreatedAt"))...) - if resp.Diagnostics.HasError() { - return - } - - resp.Diagnostics.Append(resp.State.Set(ctx, plan)...) -} - -func (r *resourceNetworkPeeringConnection) Read(ctx context.Context, req resource.ReadRequest, resp *resource.ReadResponse) { - conn := r.Meta().ODBClient(ctx) - var state odbNetworkPeeringConnectionResourceModel - resp.Diagnostics.Append(req.State.Get(ctx, &state)...) - if resp.Diagnostics.HasError() { - return - } - - out, err := findNetworkPeeringConnectionByID(ctx, conn, state.OdbPeeringConnectionId.ValueString()) - if tfresource.NotFound(err) { - resp.Diagnostics.Append(fwdiag.NewResourceNotFoundWarningDiagnostic(err)) - resp.State.RemoveResource(ctx) - return - } - if err != nil { - resp.Diagnostics.AddError( - create.ProblemStandardMessage(names.ODB, create.ErrActionReading, ResNameNetworkPeeringConnection, state.OdbPeeringConnectionId.ValueString(), err), - err.Error(), - ) - return - } - state.CreatedAt = types.StringValue(out.CreatedAt.Format(time.RFC3339)) - - resp.Diagnostics.Append(flex.Flatten(ctx, out, &state, flex.WithIgnoredFieldNamesAppend("CreatedAt"))...) - if resp.Diagnostics.HasError() { - return - } - resp.Diagnostics.Append(resp.State.Set(ctx, &state)...) -} - -func (r *resourceNetworkPeeringConnection) Update(ctx context.Context, req resource.UpdateRequest, resp *resource.UpdateResponse) { - conn := r.Meta().ODBClient(ctx) - - var plan, state odbNetworkPeeringConnectionResourceModel - resp.Diagnostics.Append(req.Plan.Get(ctx, &plan)...) - resp.Diagnostics.Append(req.State.Get(ctx, &state)...) - if resp.Diagnostics.HasError() { - return - } - - updateTimeout := r.UpdateTimeout(ctx, plan.Timeouts) - updatedOdbNetPeeringConn, err := waitNetworkPeeringConnectionUpdated(ctx, conn, plan.OdbPeeringConnectionId.ValueString(), updateTimeout) - if err != nil { - resp.Diagnostics.AddError( - create.ProblemStandardMessage(names.ODB, create.ErrActionWaitingForUpdate, ResNameNetworkPeeringConnection, plan.OdbPeeringConnectionId.ValueString(), err), - err.Error(), - ) - return - } - plan.CreatedAt = types.StringValue(updatedOdbNetPeeringConn.CreatedAt.Format(time.RFC3339)) - resp.Diagnostics.Append(flex.Flatten(ctx, updatedOdbNetPeeringConn, &plan, flex.WithIgnoredFieldNamesAppend("CreatedAt"))...) - if resp.Diagnostics.HasError() { - return - } - resp.Diagnostics.Append(resp.State.Set(ctx, &plan)...) -} - -func (r *resourceNetworkPeeringConnection) Delete(ctx context.Context, req resource.DeleteRequest, resp *resource.DeleteResponse) { - conn := r.Meta().ODBClient(ctx) - var state odbNetworkPeeringConnectionResourceModel - resp.Diagnostics.Append(req.State.Get(ctx, &state)...) - if resp.Diagnostics.HasError() { - return - } - - input := odb.DeleteOdbPeeringConnectionInput{ - OdbPeeringConnectionId: state.OdbPeeringConnectionId.ValueStringPointer(), - } - - _, err := conn.DeleteOdbPeeringConnection(ctx, &input) - - if err != nil { - if errs.IsA[*odbtypes.ResourceNotFoundException](err) { - return - } - - resp.Diagnostics.AddError( - create.ProblemStandardMessage(names.ODB, create.ErrActionDeleting, ResNameNetworkPeeringConnection, state.OdbPeeringConnectionId.ValueString(), err), - err.Error(), - ) - return - } - - deleteTimeout := r.DeleteTimeout(ctx, state.Timeouts) - _, err = waitNetworkPeeringConnectionDeleted(ctx, conn, state.OdbPeeringConnectionId.ValueString(), deleteTimeout) - if err != nil { - resp.Diagnostics.AddError( - create.ProblemStandardMessage(names.ODB, create.ErrActionWaitingForDeletion, ResNameNetworkPeeringConnection, state.OdbPeeringConnectionId.String(), err), - err.Error(), - ) - return - } -} - -// TIP: ==== TERRAFORM IMPORTING ==== -// If Read can get all the information it needs from the Identifier -// (i.e., path.Root("id")), you can use the PassthroughID importer. Otherwise, -// you'll need a custom import function. -// -// See more: -// https://developer.hashicorp.com/terraform/plugin/framework/resources/import -func (r *resourceNetworkPeeringConnection) ImportState(ctx context.Context, req resource.ImportStateRequest, resp *resource.ImportStateResponse) { - resource.ImportStatePassthroughID(ctx, path.Root(names.AttrID), req, resp) -} - -// TIP: ==== WAITERS ==== -// Some resources of some services have waiters provided by the AWS API. -// Unless they do not work properly, use them rather than defining new ones -// here. -// -// Sometimes we define the wait, status, and find functions in separate -// files, wait.go, status.go, and find.go. Follow the pattern set out in the -// service and define these where it makes the most sense. -// -// If these functions are used in the _test.go file, they will need to be -// exported (i.e., capitalized). -// -// You will need to adjust the parameters and names to fit the service. -func waitNetworkPeeringConnectionCreated(ctx context.Context, conn *odb.Client, id string, timeout time.Duration) (*odbtypes.OdbPeeringConnection, error) { - stateConf := &retry.StateChangeConf{ - Pending: enum.Slice(odbtypes.ResourceStatusProvisioning), - Target: enum.Slice(odbtypes.ResourceStatusAvailable, odbtypes.ResourceStatusFailed), - Refresh: statusNetworkPeeringConnection(ctx, conn, id), - Timeout: timeout, - NotFoundChecks: 20, - ContinuousTargetOccurence: 2, - } - - outputRaw, err := stateConf.WaitForStateContext(ctx) - if out, ok := outputRaw.(*odbtypes.OdbPeeringConnection); ok { - return out, err - } - - return nil, err -} - -func waitNetworkPeeringConnectionUpdated(ctx context.Context, conn *odb.Client, id string, timeout time.Duration) (*odbtypes.OdbPeeringConnection, error) { - stateConf := &retry.StateChangeConf{ - Pending: enum.Slice(odbtypes.ResourceStatusUpdating), - Target: enum.Slice(odbtypes.ResourceStatusAvailable, odbtypes.ResourceStatusFailed), - Refresh: statusNetworkPeeringConnection(ctx, conn, id), - Timeout: timeout, - NotFoundChecks: 20, - ContinuousTargetOccurence: 2, - } - - outputRaw, err := stateConf.WaitForStateContext(ctx) - if out, ok := outputRaw.(*odbtypes.OdbPeeringConnection); ok { - return out, err - } - - return nil, err -} - -// TIP: A deleted waiter is almost like a backwards created waiter. There may -// be additional pending states, however. -func waitNetworkPeeringConnectionDeleted(ctx context.Context, conn *odb.Client, id string, timeout time.Duration) (*odbtypes.OdbPeeringConnection, error) { - stateConf := &retry.StateChangeConf{ - Pending: enum.Slice(odbtypes.ResourceStatusTerminating), - Target: []string{}, - Refresh: statusNetworkPeeringConnection(ctx, conn, id), - Timeout: timeout, - } - - outputRaw, err := stateConf.WaitForStateContext(ctx) - if out, ok := outputRaw.(*odbtypes.OdbPeeringConnection); ok { - return out, err - } - - return nil, err -} - -// TIP: ==== STATUS ==== -// The status function can return an actual status when that field is -// available from the API (e.g., out.Status). Otherwise, you can use custom -// statuses to communicate the states of the resource. -// -// Waiters consume the values returned by status functions. Design status so -// that it can be reused by a create, update, and delete waiter, if possible. -func statusNetworkPeeringConnection(ctx context.Context, conn *odb.Client, id string) retry.StateRefreshFunc { - return func() (any, string, error) { - out, err := findNetworkPeeringConnectionByID(ctx, conn, id) - if tfresource.NotFound(err) { - return nil, "", nil - } - - if err != nil { - return nil, "", err - } - - return out, string(out.Status), nil - } -} - -// TIP: ==== FINDERS ==== -// The find function is not strictly necessary. You could do the API -// request from the status function. However, we have found that find often -// comes in handy in other places besides the status function. As a result, it -// is good practice to define it separately. -func findNetworkPeeringConnectionByID(ctx context.Context, conn *odb.Client, id string) (*odbtypes.OdbPeeringConnection, error) { - input := odb.GetOdbPeeringConnectionInput{ - OdbPeeringConnectionId: &id, - } - - out, err := conn.GetOdbPeeringConnection(ctx, &input) - if err != nil { - if errs.IsA[*odbtypes.ResourceNotFoundException](err) { - return nil, &retry.NotFoundError{ - LastError: err, - LastRequest: &input, - } - } - - return nil, err - } - - if out == nil || out.OdbPeeringConnection == nil { - return nil, tfresource.NewEmptyResultError(&input) - } - - return out.OdbPeeringConnection, nil -} - -// TIP: ==== DATA STRUCTURES ==== -// With Terraform Plugin-Framework configurations are deserialized into -// Go types, providing type safety without the need for type assertions. -// These structs should match the schema definition exactly, and the `tfsdk` -// tag value should match the attribute name. -// -// Nested objects are represented in their own basicExaInfraDataSource struct. These will -// also have a corresponding attribute type mapping for use inside flex -// functions. -// -// See more: -// https://developer.hashicorp.com/terraform/plugin/framework/handling-data/accessing-values -type odbNetworkPeeringConnectionResourceModel struct { - framework.WithRegionModel - OdbNetworkId types.String `tfsdk:"odb_network_id"` - PeerNetworkId types.String `tfsdk:"peer_network_id"` - OdbPeeringConnectionId types.String `tfsdk:"id"` - DisplayName types.String `tfsdk:"display_name"` - Status fwtypes.StringEnum[odbtypes.ResourceStatus] `tfsdk:"status"` - StatusReason types.String `tfsdk:"status_reason"` - OdbPeeringConnectionArn types.String `tfsdk:"arn"` - OdbNetworkArn types.String `tfsdk:"odb_network_arn"` - PeerNetworkArn types.String `tfsdk:"peer_network_arn"` - OdbPeeringConnectionType types.String `tfsdk:"odb_peering_connection_type"` - CreatedAt types.String `tfsdk:"created_at"` - PercentProgress types.Float32 `tfsdk:"percent_progress"` - Timeouts timeouts.Value `tfsdk:"timeouts"` - Tags tftags.Map `tfsdk:"tags"` - TagsAll tftags.Map `tfsdk:"tags_all"` -} - -// TIP: ==== SWEEPERS ==== -// When acceptance testing resources, interrupted or failed tests may -// leave behind orphaned resources in an account. To facilitate cleaning -// up lingering resources, each resource implementation should include -// a corresponding "sweeper" function. -// -// The sweeper function lists all resources of a given type and sets the -// appropriate identifers required to delete the resource via the Delete -// method implemented above. -// -// Once the sweeper function is implemented, register it in sweeper.go -// as follows: -// -// awsv2.Register("aws_odb_network_peering_connection", sweepNetworkPeeringConnections) -// -// See more: -// https://hashicorp.github.io/terraform-provider-aws/running-and-writing-acceptance-tests/#acceptance-test-sweepers -func sweepNetworkPeeringConnections(ctx context.Context, client *conns.AWSClient) ([]sweep.Sweepable, error) { - input := odb.ListOdbPeeringConnectionsInput{} - conn := client.ODBClient(ctx) - var sweepResources []sweep.Sweepable - - pages := odb.NewListOdbPeeringConnectionsPaginator(conn, &input) - for pages.HasMorePages() { - page, err := pages.NextPage(ctx) - if err != nil { - return nil, err - } - - for _, v := range page.OdbPeeringConnections { - sweepResources = append(sweepResources, sweepfw.NewSweepResource(newResourceNetworkPeeringConnection, client, - sweepfw.NewAttribute(names.AttrID, aws.ToString(v.OdbPeeringConnectionId))), - ) - } - } - - return sweepResources, nil -} diff --git a/internal/service/odb/network_peering_connection_data_source.go b/internal/service/odb/network_peering_connection_data_source.go deleted file mode 100644 index 4afce23fad10..000000000000 --- a/internal/service/odb/network_peering_connection_data_source.go +++ /dev/null @@ -1,140 +0,0 @@ -//Copyright © 2025, Oracle and/or its affiliates. All rights reserved. - -package odb - -import ( - "context" - tftags "github.com/hashicorp/terraform-provider-aws/internal/tags" - "time" - - "github.com/aws/aws-sdk-go-v2/service/odb" - odbtypes "github.com/aws/aws-sdk-go-v2/service/odb/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/create" - "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/names" -) - -// Function annotations are used for datasource registration to the Provider. DO NOT EDIT. -// @FrameworkDataSource("aws_odb_network_peering_connection", name="Network Peering Connection") -func newDataSourceNetworkPeeringConnection(context.Context) (datasource.DataSourceWithConfigure, error) { - return &dataSourceNetworkPeeringConnection{}, nil -} - -const ( - DSNameNetworkPeeringConnection = "Network Peering Connection Data Source" -) - -type dataSourceNetworkPeeringConnection struct { - framework.DataSourceWithModel[odbNetworkPeeringConnectionDataSourceModel] -} - -func (d *dataSourceNetworkPeeringConnection) Schema(ctx context.Context, req datasource.SchemaRequest, resp *datasource.SchemaResponse) { - resp.Schema = schema.Schema{ - Attributes: map[string]schema.Attribute{ - names.AttrID: schema.StringAttribute{ - Description: "Network Peering Connection identifier.", - Required: true, - }, - "display_name": schema.StringAttribute{ - Description: "Display name of the odb network peering connection.", - Computed: true, - }, - "status": schema.StringAttribute{ - Description: "Status of the odb network peering connection.", - CustomType: fwtypes.StringEnumType[odbtypes.ResourceStatus](), - Computed: true, - }, - "status_reason": schema.StringAttribute{ - Description: "Status of the odb network peering connection.", - Computed: true, - }, - - "odb_network_arn": schema.StringAttribute{ - Description: "ARN of the odb network peering connection.", - Computed: true, - }, - - names.AttrARN: framework.ARNAttributeComputedOnly(), - - "peer_network_arn": schema.StringAttribute{ - Description: "ARN of the peer network peering connection.", - Computed: true, - }, - "odb_peering_connection_type": schema.StringAttribute{ - Description: "Type of the odb peering connection.", - Computed: true, - }, - "created_at": schema.StringAttribute{ - Description: "Created time of the odb network peering connection.", - Computed: true, - }, - "percent_progress": schema.Float32Attribute{ - Description: "Progress of the odb network peering connection.", - Computed: true, - }, - names.AttrTags: tftags.TagsAttributeComputedOnly(), - }, - } -} - -func (d *dataSourceNetworkPeeringConnection) Read(ctx context.Context, req datasource.ReadRequest, resp *datasource.ReadResponse) { - - conn := d.Meta().ODBClient(ctx) - var data odbNetworkPeeringConnectionDataSourceModel - resp.Diagnostics.Append(req.Config.Get(ctx, &data)...) - if resp.Diagnostics.HasError() { - return - } - - input := odb.GetOdbPeeringConnectionInput{ - OdbPeeringConnectionId: data.OdbPeeringConnectionId.ValueStringPointer(), - } - out, err := conn.GetOdbPeeringConnection(ctx, &input) - if err != nil { - resp.Diagnostics.AddError( - create.ProblemStandardMessage(names.ODB, create.ErrActionReading, DSNameNetworkPeeringConnection, data.OdbPeeringConnectionId.ValueString(), err), - err.Error(), - ) - return - } - tagsRead, err := listTags(ctx, conn, *out.OdbPeeringConnection.OdbPeeringConnectionArn) - if err != nil { - resp.Diagnostics.AddError( - create.ProblemStandardMessage(names.ODB, create.ErrActionReading, DSNameNetworkPeeringConnection, data.OdbPeeringConnectionId.ValueString(), err), - err.Error(), - ) - return - } - if tagsRead != nil { - data.Tags = tftags.FlattenStringValueMap(ctx, tagsRead.Map()) - } - if out.OdbPeeringConnection.CreatedAt != nil { - data.CreatedAt = types.StringValue(out.OdbPeeringConnection.CreatedAt.Format(time.RFC3339)) - } - resp.Diagnostics.Append(flex.Flatten(ctx, out.OdbPeeringConnection, &data, flex.WithIgnoredFieldNamesAppend("CreatedAt"))...) - if resp.Diagnostics.HasError() { - return - } - resp.Diagnostics.Append(resp.State.Set(ctx, &data)...) -} - -type odbNetworkPeeringConnectionDataSourceModel struct { - framework.WithRegionModel - OdbPeeringConnectionId types.String `tfsdk:"id"` - DisplayName types.String `tfsdk:"display_name"` - Status fwtypes.StringEnum[odbtypes.ResourceStatus] `tfsdk:"status"` - StatusReason types.String `tfsdk:"status_reason"` - OdbPeeringConnectionArn types.String `tfsdk:"arn"` - OdbNetworkArn types.String `tfsdk:"odb_network_arn"` - PeerNetworkArn types.String `tfsdk:"peer_network_arn"` - OdbPeeringConnectionType types.String `tfsdk:"odb_peering_connection_type"` - CreatedAt types.String `tfsdk:"created_at"` - PercentProgress types.Float32 `tfsdk:"percent_progress"` - Tags tftags.Map `tfsdk:"tags"` -} diff --git a/internal/service/odb/network_peering_connection_data_source_test.go b/internal/service/odb/network_peering_connection_data_source_test.go deleted file mode 100644 index ec8c0b0268ee..000000000000 --- a/internal/service/odb/network_peering_connection_data_source_test.go +++ /dev/null @@ -1,212 +0,0 @@ -//Copyright © 2025, Oracle and/or its affiliates. All rights reserved. - -package odb_test - -import ( - "context" - "errors" - "fmt" - "github.com/aws/aws-sdk-go-v2/service/odb" - odbtypes "github.com/aws/aws-sdk-go-v2/service/odb/types" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" - sdkacctest "github.com/hashicorp/terraform-plugin-testing/helper/acctest" - "github.com/hashicorp/terraform-plugin-testing/helper/resource" - "github.com/hashicorp/terraform-plugin-testing/terraform" - "github.com/hashicorp/terraform-provider-aws/internal/acctest" - "github.com/hashicorp/terraform-provider-aws/internal/conns" - "github.com/hashicorp/terraform-provider-aws/internal/create" - "github.com/hashicorp/terraform-provider-aws/internal/errs" - tfodb "github.com/hashicorp/terraform-provider-aws/internal/service/odb" - "github.com/hashicorp/terraform-provider-aws/internal/tfresource" - "github.com/hashicorp/terraform-provider-aws/names" - "testing" -) - -type odbPeeringDataSourceTest struct { - odbNetDisplayNamePrefix string - odbNetworkPeeringDisplayNamePrefix string - vpcNamePrefix string -} - -var odbPeeringDSTest = odbPeeringDataSourceTest{ - odbNetDisplayNamePrefix: "tf", - odbNetworkPeeringDisplayNamePrefix: "tf", - vpcNamePrefix: "tf", -} - -func TestPrintOdbPeeringResourceUnitTest(t *testing.T) { - odbNetDispName := sdkacctest.RandomWithPrefix(odbPeeringDSTest.odbNetDisplayNamePrefix) - odbNetPeeringDisplayName := sdkacctest.RandomWithPrefix(odbPeeringDSTest.odbNetworkPeeringDisplayNamePrefix) - //vpcNamePrefix := sdkacctest.RandomWithPrefix(odbPeeringDSTest.vpcNamePrefix) - - fmt.Println(odbPeeringDSTest.basicVpcHardCoded("vpc-084bc7dd335e156cc", odbNetDispName, odbNetPeeringDisplayName)) -} - -// Acceptance test access AWS and cost money to run. -func TestAccODBNetworkPeeringConnectionDataSource_basic(t *testing.T) { - - ctx := acctest.Context(t) - if testing.Short() { - t.Skip("skipping long-running test in short mode") - } - networkPeeringResource := "aws_odb_network_peering_connection.test" - networkPerringDataSource := "data.aws_odb_network_peering_connection.test" - odbNetPeeringDisplayName := sdkacctest.RandomWithPrefix(odbPeeringDSTest.odbNetworkPeeringDisplayNamePrefix) - //odbNetDispName := sdkacctest.RandomWithPrefix(odbPeeringDSTest.odbNetDisplayNamePrefix) - //vpcName := sdkacctest.RandomWithPrefix(odbPeeringDSTest.vpcNamePrefix) - - resource.Test(t, resource.TestCase{ - PreCheck: func() { - acctest.PreCheck(ctx, t) - }, - ErrorCheck: acctest.ErrorCheck(t, names.ODBServiceID), - ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, - CheckDestroy: odbPeeringDSTest.testAccCheckCloudOdbNetworkPeeringDestroy(ctx), - Steps: []resource.TestStep{ - { - Config: odbPeeringDSTest.basicHardCoded("vpc-084bc7dd335e156cc", "odbnet_c91byo6y6m", odbNetPeeringDisplayName), - - //odbPeeringDSTest.basicPeeringConfig(vpcName, odbNetDispName, odbNetPeeringDisplayName), - Check: resource.ComposeAggregateTestCheckFunc( - resource.TestCheckResourceAttrPair(networkPeeringResource, "id", networkPerringDataSource, "id"), - ), - }, - }, - }) -} - -func (odbPeeringDataSourceTest) testAccCheckCloudOdbNetworkPeeringDestroy(ctx context.Context) resource.TestCheckFunc { - return func(s *terraform.State) error { - conn := acctest.Provider.Meta().(*conns.AWSClient).ODBClient(ctx) - - for _, rs := range s.RootModule().Resources { - if rs.Type != "aws_odb_network_peering_connection" { - continue - } - _, err := odbPeeringDSTest.findOdbPeering(ctx, conn, rs.Primary.ID) - - if err != nil { - if tfresource.NotFound(err) { - return nil - } - return create.Error(names.ODB, create.ErrActionCheckingDestroyed, tfodb.DSNameNetworkPeeringConnection, rs.Primary.ID, err) - } - - return create.Error(names.ODB, create.ErrActionCheckingDestroyed, tfodb.ResNameCloudExadataInfrastructure, rs.Primary.ID, errors.New("not destroyed")) - } - - return nil - } -} - -func (odbPeeringDataSourceTest) findOdbPeering(ctx context.Context, conn *odb.Client, id string) (output *odb.GetOdbPeeringConnectionOutput, err error) { - input := odb.GetOdbPeeringConnectionInput{ - OdbPeeringConnectionId: &id, - } - out, err := conn.GetOdbPeeringConnection(ctx, &input) - if err != nil { - if errs.IsA[*odbtypes.ResourceNotFoundException](err) { - return nil, &retry.NotFoundError{ - LastError: err, - LastRequest: &input, - } - } - - return nil, err - } - if out == nil { - return nil, errors.New("odb Network Peering Connection resource can not be nil") - } - return out, nil -} -func (odbPeeringDataSourceTest) basicPeeringConfig(vpcName, odbNetDisplayName, odbPeeringDisplayName string) string { - - testData := fmt.Sprintf(` - -resource "aws_vpc" "test" { - cidr_block = "10.0.0.0/16" - instance_tenancy = "default" - - tags = { - Name = %[1]q - } -} - -resource "aws_odb_network" "test" { - display_name = %[2]q - availability_zone_id = "use1-az6" - client_subnet_cidr = "10.2.0.0/24" - backup_subnet_cidr = "10.2.1.0/24" - s3_access = "DISABLED" - zero_etl_access = "DISABLED" -} - -resource "aws_odb_network_peering_connection" "test" { - display_name = %[3]q - odb_network_id = aws_odb_network.test.id - peer_network_id = aws_vpc.test.id - -} - -data "aws_odb_network_peering_connection" "test" { - id=aws_odb_network_peering_connection.test.id -} - -`, vpcName, odbNetDisplayName, odbPeeringDisplayName) - //fmt.Println(testData) - return testData -} - -func (odbPeeringDataSourceTest) basicVpcHardCoded(vpcName, odbNetDisplayName, odbPeeringDisplayName string) string { - - testData := fmt.Sprintf(` - - -resource "aws_odb_network" "test" { - display_name = %[2]q - availability_zone_id = "use1-az6" - client_subnet_cidr = "10.2.0.0/24" - backup_subnet_cidr = "10.2.1.0/24" - s3_access = "DISABLED" - zero_etl_access = "DISABLED" -} - - -resource "aws_odb_network_peering_connection" "test" { - peer_network_id = %[1]q - odb_network_id = aws_odb_network.test.id - display_name = %[3]q - -} - -data "aws_odb_network_peering_connection" "test" { - id=aws_odb_network_peering_connection.test.id -} - -`, vpcName, odbNetDisplayName, odbPeeringDisplayName) - //fmt.Println(testData) - return testData -} - -func (odbPeeringDataSourceTest) basicHardCoded(vpcName, odbNetDisplayName, odbPeeringDisplayName string) string { - - testData := fmt.Sprintf(` - - - - -resource "aws_odb_network_peering_connection" "test" { - peer_network_id = %[1]q - odb_network_id = %[2]q - display_name = %[3]q - -} - -data "aws_odb_network_peering_connection" "test" { - id=aws_odb_network_peering_connection.test.id -} - -`, vpcName, odbNetDisplayName, odbPeeringDisplayName) - //fmt.Println(testData) - return testData -} diff --git a/internal/service/odb/network_peering_connection_test.go b/internal/service/odb/network_peering_connection_test.go deleted file mode 100644 index 7d4714930f90..000000000000 --- a/internal/service/odb/network_peering_connection_test.go +++ /dev/null @@ -1,335 +0,0 @@ -//Copyright © 2025, Oracle and/or its affiliates. All rights reserved. - -package odb_test - -import ( - "context" - "errors" - "fmt" - odbtypes "github.com/aws/aws-sdk-go-v2/service/odb/types" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" - "github.com/hashicorp/terraform-provider-aws/internal/errs" - "github.com/hashicorp/terraform-provider-aws/internal/tfresource" - "testing" - - "github.com/aws/aws-sdk-go-v2/service/odb" - sdkacctest "github.com/hashicorp/terraform-plugin-testing/helper/acctest" - "github.com/hashicorp/terraform-plugin-testing/helper/resource" - "github.com/hashicorp/terraform-plugin-testing/terraform" - "github.com/hashicorp/terraform-provider-aws/internal/acctest" - "github.com/hashicorp/terraform-provider-aws/internal/conns" - "github.com/hashicorp/terraform-provider-aws/internal/create" - "github.com/hashicorp/terraform-provider-aws/names" - - tfodb "github.com/hashicorp/terraform-provider-aws/internal/service/odb" -) - -type odbNwkPeeringResourceTest struct { - vpcNamePrefix string - odbPeeringDisplayNamePrefix string - odbNwkDisplayNamePrefix string -} - -var odbPeeringTestResource = odbNwkPeeringResourceTest{ - vpcNamePrefix: "vpc", - odbPeeringDisplayNamePrefix: "odb-peering", - odbNwkDisplayNamePrefix: "odb-net", -} - -func TestAccODBNetworkPeeringConnection_basic(t *testing.T) { - ctx := acctest.Context(t) - - if testing.Short() { - t.Skip("skipping long-running test in short mode") - } - - var odbPeeringResource odb.GetOdbPeeringConnectionOutput - odbPeeringDisplayName := sdkacctest.RandomWithPrefix(odbPeeringTestResource.odbPeeringDisplayNamePrefix) - vpcName := sdkacctest.RandomWithPrefix(odbPeeringTestResource.vpcNamePrefix) - odbNetName := sdkacctest.RandomWithPrefix(odbPeeringTestResource.odbNwkDisplayNamePrefix) - resourceName := "aws_odb_network_peering_connection.test" - - resource.ParallelTest(t, resource.TestCase{ - PreCheck: func() { - acctest.PreCheck(ctx, t) - //acctest.PreCheckPartitionHasService(t, names.ODBEndpointID) - odbPeeringTestResource.testAccPreCheck(ctx, t) - }, - ErrorCheck: acctest.ErrorCheck(t, names.ODBServiceID), - ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, - CheckDestroy: odbPeeringTestResource.testAccCheckNetworkPeeringConnectionDestroy(ctx), - Steps: []resource.TestStep{ - { - Config: odbPeeringTestResource.basicConfig(vpcName, odbNetName, odbPeeringDisplayName), - Check: resource.ComposeAggregateTestCheckFunc( - testAccCheckNetworkPeeringConnectionExists(ctx, resourceName, &odbPeeringResource), - resource.TestCheckResourceAttr(resourceName, "tags.%", "1"), - resource.TestCheckResourceAttr(resourceName, "tags.env", "dev"), - ), - }, - { - ResourceName: resourceName, - ImportState: true, - ImportStateVerify: true, - }, - }, - }) -} - -func TestAccODBNetworkPeeringConnectionAddRemoveTag(t *testing.T) { - ctx := acctest.Context(t) - - if testing.Short() { - t.Skip("skipping long-running test in short mode") - } - - var odbPeeringResource odb.GetOdbPeeringConnectionOutput - odbPeeringDisplayName := sdkacctest.RandomWithPrefix(odbPeeringTestResource.odbPeeringDisplayNamePrefix) - //vpcName := sdkacctest.RandomWithPrefix(odbPeeringTestResource.vpcNamePrefix) - odbNetName := sdkacctest.RandomWithPrefix(odbPeeringTestResource.odbNwkDisplayNamePrefix) - resourceName := "aws_odb_network_peering_connection.test" - - resource.ParallelTest(t, resource.TestCase{ - PreCheck: func() { - acctest.PreCheck(ctx, t) - //acctest.PreCheckPartitionHasService(t, names.ODBEndpointID) - odbPeeringTestResource.testAccPreCheck(ctx, t) - }, - ErrorCheck: acctest.ErrorCheck(t, names.ODBServiceID), - ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, - CheckDestroy: odbPeeringTestResource.testAccCheckNetworkPeeringConnectionDestroy(ctx), - Steps: []resource.TestStep{ - { - Config: odbPeeringTestResource.basicConfigWithVPC("vpc-084bc7dd335e156cc", odbNetName, odbPeeringDisplayName), - //odbPeeringTestResource.basicConfig(vpcName, odbNetName, odbPeeringDisplayName), - Check: resource.ComposeAggregateTestCheckFunc( - testAccCheckNetworkPeeringConnectionExists(ctx, resourceName, &odbPeeringResource), - resource.TestCheckResourceAttr(resourceName, "tags.%", "1"), - resource.TestCheckResourceAttr(resourceName, "tags.env", "dev"), - ), - }, - { - ResourceName: resourceName, - ImportState: true, - ImportStateVerify: true, - }, - { - Config: odbPeeringTestResource.basicConfigWithVPCWithNoTag("vpc-084bc7dd335e156cc", odbNetName, odbPeeringDisplayName), - //odbPeeringTestResource.basicConfig(vpcName, odbNetName, odbPeeringDisplayName), - Check: resource.ComposeAggregateTestCheckFunc( - testAccCheckNetworkPeeringConnectionExists(ctx, resourceName, &odbPeeringResource), - resource.TestCheckResourceAttr(resourceName, "tags.%", "0"), - ), - }, - { - ResourceName: resourceName, - ImportState: true, - ImportStateVerify: true, - }, - }, - }) -} - -func TestAccODBNetworkPeeringConnection_disappears(t *testing.T) { - ctx := acctest.Context(t) - if testing.Short() { - t.Skip("skipping long-running test in short mode") - } - - var odbPeering odb.GetOdbPeeringConnectionOutput - odbPeeringDisplayName := sdkacctest.RandomWithPrefix(odbPeeringTestResource.odbPeeringDisplayNamePrefix) - vpcName := sdkacctest.RandomWithPrefix(odbPeeringTestResource.vpcNamePrefix) - odbNetDisplayName := sdkacctest.RandomWithPrefix(odbPeeringTestResource.odbPeeringDisplayNamePrefix) - resourceName := "aws_odb_network_peering_connection.test" - - resource.ParallelTest(t, resource.TestCase{ - PreCheck: func() { - acctest.PreCheck(ctx, t) - //acctest.PreCheckPartitionHasService(t, names.ODBEndpointID) - odbPeeringTestResource.testAccPreCheck(ctx, t) - }, - ErrorCheck: acctest.ErrorCheck(t, names.ODBServiceID), - ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, - //CheckDestroy: odbPeeringTestResource.testAccCheckNetworkPeeringConnectionDestroy(ctx), - Steps: []resource.TestStep{ - { - Config: odbPeeringTestResource.basicConfig(vpcName, odbNetDisplayName, odbPeeringDisplayName), - Check: resource.ComposeAggregateTestCheckFunc( - testAccCheckNetworkPeeringConnectionExists(ctx, resourceName, &odbPeering), - - //acctest.CheckFrameworkResourceDisappears(ctx, acctest.Provider, tfodb.odbPeering, resourceName), - ), - ExpectNonEmptyPlan: true, - }, - }, - }) -} - -func (odbNwkPeeringResourceTest) testAccCheckNetworkPeeringConnectionDestroy(ctx context.Context) resource.TestCheckFunc { - return func(s *terraform.State) error { - conn := acctest.Provider.Meta().(*conns.AWSClient).ODBClient(ctx) - - for _, rs := range s.RootModule().Resources { - if rs.Type != "aws_odb_network_peering_connection" { - continue - } - - _, err := odbPeeringTestResource.findOdbPeering(ctx, conn, rs.Primary.ID) - if tfresource.NotFound(err) { - return nil - } - if err != nil { - return create.Error(names.ODB, create.ErrActionCheckingDestroyed, tfodb.ResNameNetworkPeeringConnection, rs.Primary.ID, err) - } - - return create.Error(names.ODB, create.ErrActionCheckingDestroyed, tfodb.ResNameNetworkPeeringConnection, rs.Primary.ID, errors.New("not destroyed")) - } - - return nil - } -} - -func testAccCheckNetworkPeeringConnectionExists(ctx context.Context, name string, odbPeeringConnection *odb.GetOdbPeeringConnectionOutput) resource.TestCheckFunc { - return func(s *terraform.State) error { - rs, ok := s.RootModule().Resources[name] - if !ok { - return create.Error(names.ODB, create.ErrActionCheckingExistence, tfodb.ResNameNetworkPeeringConnection, name, errors.New("not found")) - } - - if rs.Primary.ID == "" { - return create.Error(names.ODB, create.ErrActionCheckingExistence, tfodb.ResNameNetworkPeeringConnection, name, errors.New("not set")) - } - - conn := acctest.Provider.Meta().(*conns.AWSClient).ODBClient(ctx) - - resp, err := odbPeeringTestResource.findOdbPeering(ctx, conn, rs.Primary.ID) - if err != nil { - return create.Error(names.ODB, create.ErrActionCheckingExistence, tfodb.ResNameNetworkPeeringConnection, rs.Primary.ID, err) - } - - *odbPeeringConnection = *resp - - return nil - } -} - -func (odbNwkPeeringResourceTest) testAccPreCheck(ctx context.Context, t *testing.T) { - conn := acctest.Provider.Meta().(*conns.AWSClient).ODBClient(ctx) - - input := &odb.ListOdbPeeringConnectionsInput{} - - _, err := conn.ListOdbPeeringConnections(ctx, input) - - if acctest.PreCheckSkipError(err) { - t.Skipf("skipping acceptance testing: %s", err) - } - if err != nil { - t.Fatalf("unexpected PreCheck error: %s", err) - } -} - -/*func testAccCheckNetworkPeeringConnectionNotRecreated(before, after *odb.GetOdbPeeringConnectionOutput) resource.TestCheckFunc { - return func(s *terraform.State) error { - if before, after := aws.ToString(before.NetworkPeeringConnectionId), aws.ToString(after.NetworkPeeringConnectionId); before != after { - return create.Error(names.ODB, create.ErrActionCheckingNotRecreated, tfodb.ResNameNetworkPeeringConnection, aws.ToString(before.NetworkPeeringConnectionId), errors.New("recreated")) - } - - return nil - } -}*/ - -func (odbNwkPeeringResourceTest) findOdbPeering(ctx context.Context, conn *odb.Client, id string) (output *odb.GetOdbPeeringConnectionOutput, err error) { - input := odb.GetOdbPeeringConnectionInput{ - OdbPeeringConnectionId: &id, - } - out, err := conn.GetOdbPeeringConnection(ctx, &input) - if err != nil { - if errs.IsA[*odbtypes.ResourceNotFoundException](err) { - return nil, &retry.NotFoundError{ - LastError: err, - LastRequest: &input, - } - } - return nil, err - } - if out == nil { - return nil, errors.New("odb Network Peering Connection resource can not be nil") - } - return out, nil -} - -func (odbNwkPeeringResourceTest) basicConfig(vpcName, odbNetName, odbPeeringName string) string { - return fmt.Sprintf(` -resource "aws_vpc" "test" { - cidr_block = "10.0.0.0/16" - instance_tenancy = "default" - - tags = { - Name = %[1]q - } -} - -resource "aws_odb_network" "test" { - display_name = %[2]q - availability_zone_id = "use1-az6" - client_subnet_cidr = "10.2.0.0/24" - backup_subnet_cidr = "10.2.1.0/24" - s3_access = "DISABLED" - zero_etl_access = "DISABLED" -} - -resource "aws_odb_network_peering_connection" "test" { - display_name = %[3]q - odb_network_id = aws_odb_network.test.id - peer_network_id = aws_vpc.test.id - tags = { - "env"="dev" - } -} -`, vpcName, odbNetName, odbPeeringName) -} - -func (odbNwkPeeringResourceTest) basicConfigWithVPC(vpcName, odbNetName, odbPeeringName string) string { - return fmt.Sprintf(` - - -resource "aws_odb_network" "test" { - display_name = %[2]q - availability_zone_id = "use1-az6" - client_subnet_cidr = "10.2.0.0/24" - backup_subnet_cidr = "10.2.1.0/24" - s3_access = "DISABLED" - zero_etl_access = "DISABLED" -} - -resource "aws_odb_network_peering_connection" "test" { - display_name = %[3]q - odb_network_id = aws_odb_network.test.id - peer_network_id = %[1]q - tags = { - "env"="dev" - } -} -`, vpcName, odbNetName, odbPeeringName) -} - -func (odbNwkPeeringResourceTest) basicConfigWithVPCWithNoTag(vpcName, odbNetName, odbPeeringName string) string { - return fmt.Sprintf(` - - -resource "aws_odb_network" "test" { - display_name = %[2]q - availability_zone_id = "use1-az6" - client_subnet_cidr = "10.2.0.0/24" - backup_subnet_cidr = "10.2.1.0/24" - s3_access = "DISABLED" - zero_etl_access = "DISABLED" -} - -resource "aws_odb_network_peering_connection" "test" { - display_name = %[3]q - odb_network_id = aws_odb_network.test.id - peer_network_id = %[1]q -} -`, vpcName, odbNetName, odbPeeringName) -} diff --git a/internal/service/odb/network_peering_connections_list_data_source.go b/internal/service/odb/network_peering_connections_list_data_source.go deleted file mode 100644 index b2a884b90ec2..000000000000 --- a/internal/service/odb/network_peering_connections_list_data_source.go +++ /dev/null @@ -1,144 +0,0 @@ -//Copyright © 2025, Oracle and/or its affiliates. All rights reserved. - -package odb - -import ( - "context" - "github.com/aws/aws-sdk-go-v2/service/odb" - odbtypes "github.com/aws/aws-sdk-go-v2/service/odb/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/names" -) - -// Function annotations are used for datasource registration to the Provider. DO NOT EDIT. -// @FrameworkDataSource("aws_odb_network_peering_connections_list", name="Network Peering Connections List") -func newDataSourceNetworkPeeringConnectionsList(context.Context) (datasource.DataSourceWithConfigure, error) { - return &dataSourceNetworkPeeringConnectionsList{}, nil -} - -const ( - DSNameNetworkPeeringConnectionsList = "Network Peering Connections List Data Source" -) - -type dataSourceNetworkPeeringConnectionsList struct { - framework.DataSourceWithModel[odbNetworkPeeringConnectionsListDataSourceModel] -} - -func (d *dataSourceNetworkPeeringConnectionsList) Schema(ctx context.Context, req datasource.SchemaRequest, resp *datasource.SchemaResponse) { - resp.Schema = schema.Schema{ - Attributes: map[string]schema.Attribute{}, - Blocks: map[string]schema.Block{ - "odb_peering_connections": schema.ListNestedBlock{ - Description: " The list of ODB peering connections. A summary of an ODB peering connection.", - CustomType: fwtypes.NewListNestedObjectTypeOf[odbNetworkPeeringConnectionSummaryDataSourceModel](ctx), - NestedObject: schema.NestedBlockObject{ - Attributes: map[string]schema.Attribute{ - names.AttrID: schema.StringAttribute{ - Computed: true, - Description: "ID of the network peering connection.", - }, - - "display_name": schema.StringAttribute{ - Computed: true, - Description: "Display name for the network peering connection.", - }, - "status": schema.StringAttribute{ - Computed: true, - CustomType: fwtypes.StringEnumType[odbtypes.ResourceStatus](), - Description: "Status of this network peering connection.", - }, - "status_reason": schema.StringAttribute{ - Computed: true, - Description: "Status reason of this network peering connection.", - }, - names.AttrARN: framework.ARNAttributeComputedOnly(), - "odb_network_arn": schema.StringAttribute{ - Computed: true, - Description: "The ARN of the ODB network peering connection.", - }, - "odb_peering_connection_type": schema.StringAttribute{ - Computed: true, - Description: "The type of the ODB peering connection.", - }, - "percent_progress": schema.Float32Attribute{ - Computed: true, - Description: "The percentage of progress made in network peering .", - }, - }, - }, - }, - }, - } -} - -func (d *dataSourceNetworkPeeringConnectionsList) Read(ctx context.Context, req datasource.ReadRequest, resp *datasource.ReadResponse) { - - conn := d.Meta().ODBClient(ctx) - - var data odbNetworkPeeringConnectionsListDataSourceModel - resp.Diagnostics.Append(req.Config.Get(ctx, &data)...) - if resp.Diagnostics.HasError() { - return - } - - out, err := conn.ListOdbPeeringConnections(ctx, &odb.ListOdbPeeringConnectionsInput{}) - listOfPeerConnections := make([]peeringConnectionSummaryRead, 0) - if err == nil && out.OdbPeeringConnections != nil { - for _, peerConn := range out.OdbPeeringConnections { - peerConnSummary := peeringConnectionSummaryRead{ - OdbPeeringConnectionId: peerConn.OdbPeeringConnectionId, - DisplayName: peerConn.DisplayName, - OdbNetworkArn: peerConn.OdbNetworkArn, - OdbPeeringConnectionArn: peerConn.OdbPeeringConnectionArn, - OdbPeeringConnectionType: peerConn.OdbPeeringConnectionType, - PeerNetworkArn: peerConn.PeerNetworkArn, - PercentProgress: peerConn.PercentProgress, - Status: peerConn.Status, - StatusReason: peerConn.StatusReason, - } - listOfPeerConnections = append(listOfPeerConnections, peerConnSummary) - } - resp.Diagnostics.Append(flex.Flatten(ctx, listOdbPeeringConnectionsOutputRead{ - OdbPeeringConnections: listOfPeerConnections, - }, &data)...) - if resp.Diagnostics.HasError() { - return - - } - } - resp.Diagnostics.Append(resp.State.Set(ctx, &data)...) -} - -type odbNetworkPeeringConnectionsListDataSourceModel struct { - framework.WithRegionModel - OdbPeeringConnections fwtypes.ListNestedObjectValueOf[odbNetworkPeeringConnectionSummaryDataSourceModel] `tfsdk:"odb_peering_connections"` -} -type odbNetworkPeeringConnectionSummaryDataSourceModel struct { - OdbPeeringConnectionId types.String `tfsdk:"id"` - DisplayName types.String `tfsdk:"display_name"` - Status fwtypes.StringEnum[odbtypes.ResourceStatus] `tfsdk:"status"` - StatusReason types.String `tfsdk:"status_reason"` - OdbPeeringConnectionArn types.String `tfsdk:"arn"` - OdbNetworkArn types.String `tfsdk:"odb_network_arn"` - OdbPeeringConnectionType types.String `tfsdk:"odb_peering_connection_type"` - PercentProgress types.Float32 `tfsdk:"percent_progress"` -} -type peeringConnectionSummaryRead struct { - OdbPeeringConnectionId *string - DisplayName *string - OdbNetworkArn *string - OdbPeeringConnectionArn *string - OdbPeeringConnectionType *string - PeerNetworkArn *string - PercentProgress *float32 - Status odbtypes.ResourceStatus - StatusReason *string -} -type listOdbPeeringConnectionsOutputRead struct { - OdbPeeringConnections []peeringConnectionSummaryRead -} diff --git a/internal/service/odb/network_peering_connections_list_data_source_test.go b/internal/service/odb/network_peering_connections_list_data_source_test.go deleted file mode 100644 index aa1a6bfced24..000000000000 --- a/internal/service/odb/network_peering_connections_list_data_source_test.go +++ /dev/null @@ -1,101 +0,0 @@ -//Copyright © 2025, Oracle and/or its affiliates. All rights reserved. - -package odb_test - -import ( - "context" - "errors" - "fmt" - "github.com/hashicorp/terraform-plugin-testing/terraform" - "github.com/hashicorp/terraform-provider-aws/internal/create" - tfodb "github.com/hashicorp/terraform-provider-aws/internal/service/odb" - "strconv" - "testing" - - "github.com/aws/aws-sdk-go-v2/service/odb" - - "github.com/hashicorp/terraform-plugin-testing/helper/resource" - - "github.com/hashicorp/terraform-provider-aws/internal/acctest" - "github.com/hashicorp/terraform-provider-aws/internal/conns" - - "github.com/hashicorp/terraform-provider-aws/names" -) - -type listOdbNetworkPeering struct { -} - -func TestAccODBNetworkPeeringBasic(t *testing.T) { - ctx := acctest.Context(t) - var listOfPeeredNwks = listOdbNetworkPeering{} - var output odb.ListOdbPeeringConnectionsOutput - - dataSourceName := "data.aws_odb_network_peering_connections_list.test" - resource.Test(t, resource.TestCase{ - PreCheck: func() { - acctest.PreCheck(ctx, t) - listOfPeeredNwks.testAccPreCheck(ctx, t) - }, - ErrorCheck: acctest.ErrorCheck(t, names.ODBServiceID), - ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, - Steps: []resource.TestStep{ - { - Config: listOfPeeredNwks.basic(), - Check: resource.ComposeAggregateTestCheckFunc( - - resource.ComposeTestCheckFunc(func(s *terraform.State) error { - listOfPeeredNwks.count(ctx, dataSourceName, &output) - resource.TestCheckResourceAttr(dataSourceName, "odb_peering_connections.#", strconv.Itoa(len(output.OdbPeeringConnections))) - return nil - }, - ), - ), - }, - }, - }) -} - -func (listOdbNetworkPeering) basic() string { - config := fmt.Sprintf(` - - -data "aws_odb_network_peering_connections_list" "test" { - -} -`) - return config -} - -func (listOdbNetworkPeering) count(ctx context.Context, name string, list *odb.ListOdbPeeringConnectionsOutput) resource.TestCheckFunc { - return func(s *terraform.State) error { - rs, ok := s.RootModule().Resources[name] - if !ok { - return create.Error(names.ODB, create.ErrActionCheckingExistence, tfodb.ResNameCloudVmCluster, name, errors.New("not found")) - } - - conn := acctest.Provider.Meta().(*conns.AWSClient).ODBClient(ctx) - - resp, err := conn.ListOdbPeeringConnections(ctx, &odb.ListOdbPeeringConnectionsInput{}) - if err != nil { - return create.Error(names.ODB, create.ErrActionCheckingExistence, tfodb.ResNameCloudVmCluster, rs.Primary.ID, err) - } - - list.OdbPeeringConnections = resp.OdbPeeringConnections - - return nil - } -} -func (listOdbNetworkPeering) testAccPreCheck(ctx context.Context, t *testing.T) { - conn := acctest.Provider.Meta().(*conns.AWSClient).ODBClient(ctx) - - input := &odb.ListOdbPeeringConnectionsInput{} - - _, err := conn.ListOdbPeeringConnections(ctx, input) - - if acctest.PreCheckSkipError(err) { - t.Skipf("skipping acceptance testing: %s", err) - } - if err != nil { - t.Fatalf("unexpected PreCheck error: %s", err) - } -} diff --git a/internal/service/odb/network_test.go b/internal/service/odb/network_test.go deleted file mode 100644 index e5864fb21190..000000000000 --- a/internal/service/odb/network_test.go +++ /dev/null @@ -1,449 +0,0 @@ -//Copyright © 2025, Oracle and/or its affiliates. All rights reserved. - -package odb_test - -import ( - "context" - "errors" - "fmt" - "github.com/aws/aws-sdk-go-v2/service/odb" - odbtypes "github.com/aws/aws-sdk-go-v2/service/odb/types" - sdkacctest "github.com/hashicorp/terraform-plugin-testing/helper/acctest" - "github.com/hashicorp/terraform-plugin-testing/helper/resource" - "github.com/hashicorp/terraform-plugin-testing/terraform" - "github.com/hashicorp/terraform-provider-aws/internal/acctest" - "github.com/hashicorp/terraform-provider-aws/internal/conns" - "github.com/hashicorp/terraform-provider-aws/internal/create" - "github.com/hashicorp/terraform-provider-aws/internal/tfresource" - "github.com/hashicorp/terraform-provider-aws/names" - "strings" - "testing" - - tfodb "github.com/hashicorp/terraform-provider-aws/internal/service/odb" -) - -type odbNetworkResourceTest struct { - displayNamePrefix string -} - -var odbNetResourceTest = odbNetworkResourceTest{ - displayNamePrefix: "tf-odb-net", -} - -// Basic test with bare minimum input -func TestOdbNetworkBasic(t *testing.T) { - ctx := acctest.Context(t) - // TIP: This is a long-running test guard for tests that run longer than - // 300s (5 min) generally. - if testing.Short() { - t.Skip("skipping long-running test in short mode") - } - - var network odbtypes.OdbNetwork - rName := sdkacctest.RandomWithPrefix(odbNetResourceTest.displayNamePrefix) - resourceName := "aws_odb_network.test" - - resource.ParallelTest(t, resource.TestCase{ - PreCheck: func() { - acctest.PreCheck(ctx, t) - //testAccPreCheck(ctx, t) - }, - ErrorCheck: acctest.ErrorCheck(t, names.ODBServiceID), - ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, - CheckDestroy: odbNetResourceTest.testAccCheckNetworkDestroy(ctx), - Steps: []resource.TestStep{ - { - Config: odbNetResourceTest.basicOdbNetwork(rName), - Check: resource.ComposeAggregateTestCheckFunc( - odbNetResourceTest.testAccCheckNetworkExists(ctx, resourceName, &network), - ), - }, - { - ResourceName: resourceName, - ImportState: true, - ImportStateVerify: true, - }, - }, - }) -} - -func TestOdbNetworkWithAllParams(t *testing.T) { - ctx := acctest.Context(t) - - if testing.Short() { - t.Skip("skipping long-running test in short mode") - } - - var network odbtypes.OdbNetwork - rName := sdkacctest.RandomWithPrefix(odbNetResourceTest.displayNamePrefix) - resourceName := "aws_odb_network.test" - - resource.ParallelTest(t, resource.TestCase{ - PreCheck: func() { - acctest.PreCheck(ctx, t) - odbNetResourceTest.testAccPreCheck(ctx, t) - }, - ErrorCheck: acctest.ErrorCheck(t, names.ODBServiceID), - ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, - CheckDestroy: odbNetResourceTest.testAccCheckNetworkDestroy(ctx), - Steps: []resource.TestStep{ - { - Config: odbNetResourceTest.odbNetworkWithAllParams(rName, "julia.com"), - Check: resource.ComposeAggregateTestCheckFunc( - odbNetResourceTest.testAccCheckNetworkExists(ctx, resourceName, &network), - ), - }, - { - ResourceName: resourceName, - ImportState: true, - ImportStateVerify: true, - }, - }, - }) -} - -func TestAccODBNetworkUpdateManagedService(t *testing.T) { - ctx := acctest.Context(t) - if testing.Short() { - t.Skip("skipping long-running test in short mode") - } - - var network1, network2 odbtypes.OdbNetwork - rName := sdkacctest.RandomWithPrefix(odbNetResourceTest.displayNamePrefix) - resourceName := "aws_odb_network.test" - - resource.ParallelTest(t, resource.TestCase{ - PreCheck: func() { - acctest.PreCheck(ctx, t) - odbNetResourceTest.testAccPreCheck(ctx, t) - }, - ErrorCheck: acctest.ErrorCheck(t, names.ODBServiceID), - ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, - CheckDestroy: odbNetResourceTest.testAccCheckNetworkDestroy(ctx), - Steps: []resource.TestStep{ - { - Config: odbNetResourceTest.basicOdbNetwork(rName), - Check: resource.ComposeAggregateTestCheckFunc( - odbNetResourceTest.testAccCheckNetworkExists(ctx, resourceName, &network1), - ), - }, - { - ResourceName: resourceName, - ImportState: true, - ImportStateVerify: true, - }, - { - Config: odbNetResourceTest.basicOdbNetworkWithActiveManagedService(rName), - Check: resource.ComposeAggregateTestCheckFunc( - odbNetResourceTest.testAccCheckNetworkExists(ctx, resourceName, &network2), - resource.ComposeTestCheckFunc(func(state *terraform.State) error { - if strings.Compare(*(network1.OdbNetworkId), *(network2.OdbNetworkId)) != 0 { - return errors.New("should not create a new cloud odb network") - } - return nil - }), - ), - }, - { - ResourceName: resourceName, - ImportState: true, - ImportStateVerify: true, - }, - }, - }) -} - -func TestAccODBNetworkDisableManagedService(t *testing.T) { - ctx := acctest.Context(t) - if testing.Short() { - t.Skip("skipping long-running test in short mode") - } - - var network1, network2 odbtypes.OdbNetwork - rName := sdkacctest.RandomWithPrefix(odbNetResourceTest.displayNamePrefix) - resourceName := "aws_odb_network.test" - - resource.ParallelTest(t, resource.TestCase{ - PreCheck: func() { - acctest.PreCheck(ctx, t) - odbNetResourceTest.testAccPreCheck(ctx, t) - }, - ErrorCheck: acctest.ErrorCheck(t, names.ODBServiceID), - ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, - CheckDestroy: odbNetResourceTest.testAccCheckNetworkDestroy(ctx), - Steps: []resource.TestStep{ - { - Config: odbNetResourceTest.basicOdbNetworkWithActiveManagedService(rName), - Check: resource.ComposeAggregateTestCheckFunc( - odbNetResourceTest.testAccCheckNetworkExists(ctx, resourceName, &network1), - ), - }, - { - ResourceName: resourceName, - ImportState: true, - ImportStateVerify: true, - }, - { - Config: odbNetResourceTest.basicOdbNetwork(rName), - Check: resource.ComposeAggregateTestCheckFunc( - odbNetResourceTest.testAccCheckNetworkExists(ctx, resourceName, &network2), - resource.ComposeTestCheckFunc(func(state *terraform.State) error { - if strings.Compare(*(network1.OdbNetworkId), *(network2.OdbNetworkId)) != 0 { - return errors.New("should not create a new cloud odb network") - } - return nil - }), - ), - }, - { - ResourceName: resourceName, - ImportState: true, - ImportStateVerify: true, - }, - }, - }) -} - -func TestAccODBNetwork_Update_Tags(t *testing.T) { - ctx := acctest.Context(t) - if testing.Short() { - t.Skip("skipping long-running test in short mode") - } - - var network1, network2 odbtypes.OdbNetwork - rName := sdkacctest.RandomWithPrefix(odbNetResourceTest.displayNamePrefix) - resourceName := "aws_odb_network.test" - - resource.ParallelTest(t, resource.TestCase{ - PreCheck: func() { - acctest.PreCheck(ctx, t) - //acctest.PreCheckPartitionHasService(t, names.ODBEndpointID) - odbNetResourceTest.testAccPreCheck(ctx, t) - }, - ErrorCheck: acctest.ErrorCheck(t, names.ODBServiceID), - ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, - CheckDestroy: odbNetResourceTest.testAccCheckNetworkDestroy(ctx), - Steps: []resource.TestStep{ - { - Config: odbNetResourceTest.basicOdbNetwork(rName), - - Check: resource.ComposeAggregateTestCheckFunc( - odbNetResourceTest.testAccCheckNetworkExists(ctx, resourceName, &network1), - ), - }, - { - Config: odbNetResourceTest.updateOdbNetworkTags(rName), - Check: resource.ComposeAggregateTestCheckFunc( - odbNetResourceTest.testAccCheckNetworkExists(ctx, resourceName, &network2), - resource.ComposeTestCheckFunc(func(state *terraform.State) error { - if strings.Compare(*(network1.OdbNetworkId), *(network2.OdbNetworkId)) != 0 { - return errors.New("should not create a new cloud odb network") - } - return nil - }), - resource.TestCheckResourceAttr(resourceName, "tags.%", "1"), - resource.TestCheckResourceAttr(resourceName, "tags.env", "dev"), - ), - }, - { - ResourceName: resourceName, - ImportState: true, - ImportStateVerify: true, - }, - }, - }) -} - -func TestAccODBNetwork_disappears(t *testing.T) { - ctx := acctest.Context(t) - if testing.Short() { - t.Skip("skipping long-running test in short mode") - } - - var network odbtypes.OdbNetwork - rName := sdkacctest.RandomWithPrefix(odbNetResourceTest.displayNamePrefix) - resourceName := "aws_odb_network.test" - - resource.ParallelTest(t, resource.TestCase{ - PreCheck: func() { - acctest.PreCheck(ctx, t) - odbNetResourceTest.testAccPreCheck(ctx, t) - }, - ErrorCheck: acctest.ErrorCheck(t, names.ODBServiceID), - ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, - CheckDestroy: odbNetResourceTest.testAccCheckNetworkDestroy(ctx), - Steps: []resource.TestStep{ - { - Config: odbNetResourceTest.basicOdbNetwork(rName), - Check: resource.ComposeAggregateTestCheckFunc( - odbNetResourceTest.testAccCheckNetworkExists(ctx, resourceName, &network), - acctest.CheckFrameworkResourceDisappears(ctx, acctest.Provider, tfodb.OdbNetwork, resourceName), - ), - ExpectNonEmptyPlan: true, - }, - }, - }) -} - -func (odbNetworkResourceTest) testAccCheckNetworkDestroy(ctx context.Context) resource.TestCheckFunc { - return func(s *terraform.State) error { - conn := acctest.Provider.Meta().(*conns.AWSClient).ODBClient(ctx) - - for _, rs := range s.RootModule().Resources { - if rs.Type != "aws_odb_network" { - continue - } - - // TIP: ==== FINDERS ==== - // The find function should be exported. Since it won't be used outside of the package, it can be exported - // in the `exports_test.go` file. - _, err := tfodb.FindOdbNetworkByID(ctx, conn, rs.Primary.ID) - if tfresource.NotFound(err) { - return nil - } - if err != nil { - return create.Error(names.ODB, create.ErrActionCheckingDestroyed, tfodb.ResNameNetwork, rs.Primary.ID, err) - } - - return create.Error(names.ODB, create.ErrActionCheckingDestroyed, tfodb.ResNameNetwork, rs.Primary.ID, errors.New("not destroyed")) - } - - return nil - } -} - -func (odbNetworkResourceTest) testAccCheckNetworkExists(ctx context.Context, name string, network *odbtypes.OdbNetwork) resource.TestCheckFunc { - return func(s *terraform.State) error { - rs, ok := s.RootModule().Resources[name] - if !ok { - return create.Error(names.ODB, create.ErrActionCheckingExistence, tfodb.ResNameNetwork, name, errors.New("not found")) - } - - if rs.Primary.ID == "" { - return create.Error(names.ODB, create.ErrActionCheckingExistence, tfodb.ResNameNetwork, name, errors.New("not set")) - } - - conn := acctest.Provider.Meta().(*conns.AWSClient).ODBClient(ctx) - - resp, err := tfodb.FindOdbNetworkByID(ctx, conn, rs.Primary.ID) - if err != nil { - return create.Error(names.ODB, create.ErrActionCheckingExistence, tfodb.ResNameNetwork, rs.Primary.ID, err) - } - - *network = *resp - - return nil - } -} - -func (odbNetworkResourceTest) testAccPreCheck(ctx context.Context, t *testing.T) { - conn := acctest.Provider.Meta().(*conns.AWSClient).ODBClient(ctx) - - input := &odb.ListOdbNetworksInput{} - - _, err := conn.ListOdbNetworks(ctx, input) - - if acctest.PreCheckSkipError(err) { - t.Skipf("skipping acceptance testing: %s", err) - } - if err != nil { - t.Fatalf("unexpected PreCheck error: %s", err) - } -} - -/*func testAccCheckNetworkNotRecreated(before, after *odb.DescribeNetworkResponse) resource.TestCheckFunc { - return func(s *terraform.State) error { - if before, after := aws.ToString(before.NetworkId), aws.ToString(after.NetworkId); before != after { - return create.Error(names.ODB, create.ErrActionCheckingNotRecreated, tfodb.ResNameNetwork, aws.ToString(before.NetworkId), errors.New("recreated")) - } - - return nil - } -}*/ - -func (odbNetworkResourceTest) basicOdbNetwork(rName string) string { - networkRes := fmt.Sprintf(` - - -resource "aws_odb_network" "test" { - display_name = %[1]q - availability_zone_id = "use1-az6" - client_subnet_cidr = "10.2.0.0/24" - backup_subnet_cidr = "10.2.1.0/24" - s3_access = "DISABLED" - zero_etl_access = "DISABLED" -} - -`, rName) - return networkRes -} - -func (odbNetworkResourceTest) basicOdbNetworkWithActiveManagedService(rName string) string { - networkRes := fmt.Sprintf(` - - -resource "aws_odb_network" "test" { - display_name = %[1]q - availability_zone_id = "use1-az6" - client_subnet_cidr = "10.2.0.0/24" - backup_subnet_cidr = "10.2.1.0/24" - s3_access = "ENABLED" - zero_etl_access = "ENABLED" -} - -`, rName) - return networkRes -} - -func (odbNetworkResourceTest) odbNetworkWithAllParams(rName, customDomainName string) string { - networkRes := fmt.Sprintf(` - - -resource "aws_odb_network" "test" { - display_name = %[1]q - availability_zone_id = "use1-az6" - client_subnet_cidr = "10.2.0.0/24" - backup_subnet_cidr = "10.2.1.0/24" - s3_access = "DISABLED" - zero_etl_access = "DISABLED" - custom_domain_name = %[2]q -} - -`, rName, customDomainName) - return networkRes -} - -func (odbNetworkResourceTest) updateOdbNetworkDisplayName(rName string) string { - networkRes := fmt.Sprintf(` - - -resource "aws_odb_network" "test" { - display_name = %[1]q - availability_zone_id = "use1-az6" - client_subnet_cidr = "10.2.0.0/24" - backup_subnet_cidr = "10.2.1.0/24" - s3_access = "DISABLED" - zero_etl_access = "DISABLED" -} -`, rName) - return networkRes -} - -func (odbNetworkResourceTest) updateOdbNetworkTags(rName string) string { - networkRes := fmt.Sprintf(` - - -resource "aws_odb_network" "test" { - display_name = %[1]q - availability_zone_id = "use1-az6" - client_subnet_cidr = "10.2.0.0/24" - backup_subnet_cidr = "10.2.1.0/24" - s3_access = "DISABLED" - zero_etl_access = "DISABLED" - tags = { - "env"= "dev" - } -} -`, rName) - return networkRes -} diff --git a/internal/service/odb/networks_list_data_source.go b/internal/service/odb/networks_list_data_source.go deleted file mode 100644 index 5ebd6840caa9..000000000000 --- a/internal/service/odb/networks_list_data_source.go +++ /dev/null @@ -1,94 +0,0 @@ -//Copyright © 2025, Oracle and/or its affiliates. All rights reserved. - -package odb - -import ( - "context" - "github.com/hashicorp/terraform-plugin-framework/attr" - - "github.com/aws/aws-sdk-go-v2/service/odb" - "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/create" - "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/names" -) - -// Function annotations are used for datasource registration to the Provider. DO NOT EDIT. -// @FrameworkDataSource("aws_odb_networks_list", name="Networks List") -func newDataSourceNetworksList(context.Context) (datasource.DataSourceWithConfigure, error) { - return &dataSourceNetworksList{}, nil -} - -const ( - DSNameNetworksList = "Networks List Data Source" -) - -type dataSourceNetworksList struct { - framework.DataSourceWithModel[odbNetworksListModel] -} - -func (d *dataSourceNetworksList) Schema(ctx context.Context, req datasource.SchemaRequest, resp *datasource.SchemaResponse) { - resp.Schema = schema.Schema{ - Attributes: map[string]schema.Attribute{ - "odb_networks": schema.ListAttribute{ - Computed: true, - Description: "List of odb networks (OCID, ID, ARN, OCI URL, Display Name)", - CustomType: fwtypes.NewListNestedObjectTypeOf[cloudAutonomousVmClusterSummary](ctx), - ElementType: types.ObjectType{ - AttrTypes: map[string]attr.Type{ - "arn": types.StringType, - "id": types.StringType, - "oci_url": types.StringType, - "ocid": types.StringType, - "display_name": types.StringType, - }, - }, - }, - }, - } -} - -// Data sources only have a read method. -func (d *dataSourceNetworksList) Read(ctx context.Context, req datasource.ReadRequest, resp *datasource.ReadResponse) { - - conn := d.Meta().ODBClient(ctx) - - var data odbNetworksListModel - resp.Diagnostics.Append(req.Config.Get(ctx, &data)...) - if resp.Diagnostics.HasError() { - return - } - - out, err := conn.ListOdbNetworks(ctx, &odb.ListOdbNetworksInput{}) - if err != nil { - resp.Diagnostics.AddError( - create.ProblemStandardMessage(names.ODB, create.ErrActionReading, DSNameNetworksList, "", err), - err.Error(), - ) - return - } - - resp.Diagnostics.Append(flex.Flatten(ctx, out, &data)...) - if resp.Diagnostics.HasError() { - return - } - - resp.Diagnostics.Append(resp.State.Set(ctx, &data)...) -} - -type odbNetworksListModel struct { - framework.WithRegionModel - OdbNetworks fwtypes.ListNestedObjectValueOf[odbNetworkSummary] `tfsdk:"odb_networks"` -} - -type odbNetworkSummary struct { - CloudExadataInfrastructureArn types.String `tfsdk:"arn"` - CloudAutonomousVmClusterId types.String `tfsdk:"id"` - OciUrl types.String `tfsdk:"oci_url"` - Ocid types.String `tfsdk:"ocid"` - DisplayName types.String `tfsdk:"display_name"` -} diff --git a/internal/service/odb/networks_list_data_source_test.go b/internal/service/odb/networks_list_data_source_test.go deleted file mode 100644 index 77ce4b1b7836..000000000000 --- a/internal/service/odb/networks_list_data_source_test.go +++ /dev/null @@ -1,101 +0,0 @@ -//Copyright © 2025, Oracle and/or its affiliates. All rights reserved. - -package odb_test - -import ( - "context" - "errors" - "fmt" - "strconv" - - "testing" - - "github.com/aws/aws-sdk-go-v2/service/odb" - - "github.com/hashicorp/terraform-plugin-testing/helper/resource" - "github.com/hashicorp/terraform-plugin-testing/terraform" - "github.com/hashicorp/terraform-provider-aws/internal/acctest" - "github.com/hashicorp/terraform-provider-aws/internal/conns" - "github.com/hashicorp/terraform-provider-aws/internal/create" - - tfodb "github.com/hashicorp/terraform-provider-aws/internal/service/odb" - "github.com/hashicorp/terraform-provider-aws/names" -) - -type odbNetworksListTestDS struct { -} - -func TestAccListOdbNetworksDataSource(t *testing.T) { - ctx := acctest.Context(t) - var networkListTest = odbNetworksListTestDS{} - var output odb.ListOdbNetworksOutput - - dataSourceName := "data.aws_odb_networks_list.test" - resource.Test(t, resource.TestCase{ - PreCheck: func() { - acctest.PreCheck(ctx, t) - networkListTest.testAccPreCheck(ctx, t) - }, - ErrorCheck: acctest.ErrorCheck(t, names.ODBServiceID), - ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, - Steps: []resource.TestStep{ - { - Config: networkListTest.basic(), - Check: resource.ComposeAggregateTestCheckFunc( - - resource.ComposeTestCheckFunc(func(s *terraform.State) error { - networkListTest.count(ctx, dataSourceName, &output) - resource.TestCheckResourceAttr(dataSourceName, "cloud_autonomous_vm_clusters.#", strconv.Itoa(len(output.OdbNetworks))) - return nil - }, - ), - ), - }, - }, - }) -} - -func (odbNetworksListTestDS) basic() string { - config := fmt.Sprintf(` - - -data "aws_odb_cloud_autonomous_vm_clusters_list" "test" { - -} -`) - return config -} - -func (odbNetworksListTestDS) count(ctx context.Context, name string, list *odb.ListOdbNetworksOutput) resource.TestCheckFunc { - return func(s *terraform.State) error { - rs, ok := s.RootModule().Resources[name] - if !ok { - return create.Error(names.ODB, create.ErrActionCheckingExistence, tfodb.ResNameCloudVmCluster, name, errors.New("not found")) - } - - conn := acctest.Provider.Meta().(*conns.AWSClient).ODBClient(ctx) - - resp, err := conn.ListOdbNetworks(ctx, &odb.ListOdbNetworksInput{}) - if err != nil { - return create.Error(names.ODB, create.ErrActionCheckingExistence, tfodb.ResNameCloudVmCluster, rs.Primary.ID, err) - } - - list.OdbNetworks = resp.OdbNetworks - - return nil - } -} -func (odbNetworksListTestDS) testAccPreCheck(ctx context.Context, t *testing.T) { - conn := acctest.Provider.Meta().(*conns.AWSClient).ODBClient(ctx) - - input := &odb.ListOdbNetworksInput{} - - _, err := conn.ListOdbNetworks(ctx, input) - - if acctest.PreCheckSkipError(err) { - t.Skipf("skipping acceptance testing: %s", err) - } - if err != nil { - t.Fatalf("unexpected PreCheck error: %s", err) - } -} diff --git a/internal/service/odb/service_endpoint_resolver_gen.go b/internal/service/odb/service_endpoint_resolver_gen.go deleted file mode 100644 index 103f29abab6b..000000000000 --- a/internal/service/odb/service_endpoint_resolver_gen.go +++ /dev/null @@ -1,82 +0,0 @@ -// Code generated by internal/generate/servicepackage/main.go; DO NOT EDIT. - -package odb - -import ( - "context" - "fmt" - "net" - - "github.com/aws/aws-sdk-go-v2/aws" - "github.com/aws/aws-sdk-go-v2/service/odb" - smithyendpoints "github.com/aws/smithy-go/endpoints" - "github.com/hashicorp/terraform-plugin-log/tflog" - "github.com/hashicorp/terraform-provider-aws/internal/errs" -) - -var _ odb.EndpointResolverV2 = resolverV2{} - -type resolverV2 struct { - defaultResolver odb.EndpointResolverV2 -} - -func newEndpointResolverV2() resolverV2 { - return resolverV2{ - defaultResolver: odb.NewDefaultEndpointResolverV2(), - } -} - -func (r resolverV2) ResolveEndpoint(ctx context.Context, params odb.EndpointParameters) (endpoint smithyendpoints.Endpoint, err error) { - params = params.WithDefaults() - useFIPS := aws.ToBool(params.UseFIPS) - - if eps := params.Endpoint; aws.ToString(eps) != "" { - tflog.Debug(ctx, "setting endpoint", map[string]any{ - "tf_aws.endpoint": endpoint, - }) - - if useFIPS { - tflog.Debug(ctx, "endpoint set, ignoring UseFIPSEndpoint setting") - params.UseFIPS = aws.Bool(false) - } - - return r.defaultResolver.ResolveEndpoint(ctx, params) - } else if useFIPS { - ctx = tflog.SetField(ctx, "tf_aws.use_fips", useFIPS) - - endpoint, err = r.defaultResolver.ResolveEndpoint(ctx, params) - if err != nil { - return endpoint, err - } - - tflog.Debug(ctx, "endpoint resolved", map[string]any{ - "tf_aws.endpoint": endpoint.URI.String(), - }) - - hostname := endpoint.URI.Hostname() - _, err = net.LookupHost(hostname) - if err != nil { - if dnsErr, ok := errs.As[*net.DNSError](err); ok && dnsErr.IsNotFound { - tflog.Debug(ctx, "default endpoint host not found, disabling FIPS", map[string]any{ - "tf_aws.hostname": hostname, - }) - params.UseFIPS = aws.Bool(false) - } else { - err = fmt.Errorf("looking up odb endpoint %q: %s", hostname, err) - return - } - } else { - return endpoint, err - } - } - - return r.defaultResolver.ResolveEndpoint(ctx, params) -} - -func withBaseEndpoint(endpoint string) func(*odb.Options) { - return func(o *odb.Options) { - if endpoint != "" { - o.BaseEndpoint = aws.String(endpoint) - } - } -} diff --git a/internal/service/odb/service_endpoints_gen_test.go b/internal/service/odb/service_endpoints_gen_test.go deleted file mode 100644 index bc88b1023c35..000000000000 --- a/internal/service/odb/service_endpoints_gen_test.go +++ /dev/null @@ -1,602 +0,0 @@ -// Code generated by internal/generate/serviceendpointtests/main.go; DO NOT EDIT. - -package odb_test - -import ( - "context" - "errors" - "fmt" - "maps" - "net" - "net/url" - "os" - "path/filepath" - "reflect" - "strings" - "testing" - - "github.com/aws/aws-sdk-go-v2/aws" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/odb" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" - "github.com/google/go-cmp/cmp" - "github.com/hashicorp/aws-sdk-go-base/v2/servicemocks" - "github.com/hashicorp/terraform-plugin-sdk/v2/diag" - terraformsdk "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" - "github.com/hashicorp/terraform-provider-aws/internal/conns" - "github.com/hashicorp/terraform-provider-aws/internal/errs" - "github.com/hashicorp/terraform-provider-aws/internal/errs/sdkdiag" - "github.com/hashicorp/terraform-provider-aws/internal/provider/sdkv2" - "github.com/hashicorp/terraform-provider-aws/names" -) - -type endpointTestCase struct { - with []setupFunc - expected caseExpectations -} - -type caseSetup struct { - config map[string]any - configFile configFile - environmentVariables map[string]string -} - -type configFile struct { - baseUrl string - serviceUrl string -} - -type caseExpectations struct { - diags diag.Diagnostics - endpoint string - region string -} - -type apiCallParams struct { - endpoint string - region string -} - -type setupFunc func(setup *caseSetup) - -type callFunc func(ctx context.Context, t *testing.T, meta *conns.AWSClient) apiCallParams - -const ( - packageNameConfigEndpoint = "https://packagename-config.endpoint.test/" - awsServiceEnvvarEndpoint = "https://service-envvar.endpoint.test/" - baseEnvvarEndpoint = "https://base-envvar.endpoint.test/" - serviceConfigFileEndpoint = "https://service-configfile.endpoint.test/" - baseConfigFileEndpoint = "https://base-configfile.endpoint.test/" -) - -const ( - packageName = "odb" - awsEnvVar = "AWS_ENDPOINT_URL_ODB" - baseEnvVar = "AWS_ENDPOINT_URL" - configParam = "odb" -) - -const ( - expectedCallRegion = "us-east-1" //lintignore:AWSAT003 -) - -func TestEndpointConfiguration(t *testing.T) { //nolint:paralleltest // uses t.Setenv - ctx := t.Context() - const providerRegion = "us-west-2" //lintignore:AWSAT003 - const expectedEndpointRegion = providerRegion - - testcases := map[string]endpointTestCase{ - "no config": { - with: []setupFunc{withNoConfig}, - expected: expectDefaultEndpoint(ctx, t, expectedEndpointRegion), - }, - - // Package name endpoint on Config - - "package name endpoint config": { - with: []setupFunc{ - withPackageNameEndpointInConfig, - }, - expected: expectPackageNameConfigEndpoint(), - }, - - "package name endpoint config overrides aws service envvar": { - with: []setupFunc{ - withPackageNameEndpointInConfig, - withAwsEnvVar, - }, - expected: expectPackageNameConfigEndpoint(), - }, - - "package name endpoint config overrides base envvar": { - with: []setupFunc{ - withPackageNameEndpointInConfig, - withBaseEnvVar, - }, - expected: expectPackageNameConfigEndpoint(), - }, - - "package name endpoint config overrides service config file": { - with: []setupFunc{ - withPackageNameEndpointInConfig, - withServiceEndpointInConfigFile, - }, - expected: expectPackageNameConfigEndpoint(), - }, - - "package name endpoint config overrides base config file": { - with: []setupFunc{ - withPackageNameEndpointInConfig, - withBaseEndpointInConfigFile, - }, - expected: expectPackageNameConfigEndpoint(), - }, - - // Service endpoint in AWS envvar - - "service aws envvar": { - with: []setupFunc{ - withAwsEnvVar, - }, - expected: expectAwsEnvVarEndpoint(), - }, - - "service aws envvar overrides base envvar": { - with: []setupFunc{ - withAwsEnvVar, - withBaseEnvVar, - }, - expected: expectAwsEnvVarEndpoint(), - }, - - "service aws envvar overrides service config file": { - with: []setupFunc{ - withAwsEnvVar, - withServiceEndpointInConfigFile, - }, - expected: expectAwsEnvVarEndpoint(), - }, - - "service aws envvar overrides base config file": { - with: []setupFunc{ - withAwsEnvVar, - withBaseEndpointInConfigFile, - }, - expected: expectAwsEnvVarEndpoint(), - }, - - // Base endpoint in envvar - - "base endpoint envvar": { - with: []setupFunc{ - withBaseEnvVar, - }, - expected: expectBaseEnvVarEndpoint(), - }, - - "base endpoint envvar overrides service config file": { - with: []setupFunc{ - withBaseEnvVar, - withServiceEndpointInConfigFile, - }, - expected: expectBaseEnvVarEndpoint(), - }, - - "base endpoint envvar overrides base config file": { - with: []setupFunc{ - withBaseEnvVar, - withBaseEndpointInConfigFile, - }, - expected: expectBaseEnvVarEndpoint(), - }, - - // Service endpoint in config file - - "service config file": { - with: []setupFunc{ - withServiceEndpointInConfigFile, - }, - expected: expectServiceConfigFileEndpoint(), - }, - - "service config file overrides base config file": { - with: []setupFunc{ - withServiceEndpointInConfigFile, - withBaseEndpointInConfigFile, - }, - expected: expectServiceConfigFileEndpoint(), - }, - - // Base endpoint in config file - - "base endpoint config file": { - with: []setupFunc{ - withBaseEndpointInConfigFile, - }, - expected: expectBaseConfigFileEndpoint(), - }, - - // Use FIPS endpoint on Config - - "use fips config": { - with: []setupFunc{ - withUseFIPSInConfig, - }, - expected: expectDefaultFIPSEndpoint(ctx, t, expectedEndpointRegion), - }, - - "use fips config with package name endpoint config": { - with: []setupFunc{ - withUseFIPSInConfig, - withPackageNameEndpointInConfig, - }, - expected: expectPackageNameConfigEndpoint(), - }, - } - - for name, testcase := range testcases { //nolint:paralleltest // uses t.Setenv - t.Run(name, func(t *testing.T) { - testEndpointCase(ctx, t, providerRegion, testcase, callService) - }) - } -} - -func defaultEndpoint(ctx context.Context, region string) (url.URL, error) { - r := odb.NewDefaultEndpointResolverV2() - - ep, err := r.ResolveEndpoint(ctx, odb.EndpointParameters{ - Region: aws.String(region), - }) - if err != nil { - return url.URL{}, err - } - - if ep.URI.Path == "" { - ep.URI.Path = "/" - } - - return ep.URI, nil -} - -func defaultFIPSEndpoint(ctx context.Context, region string) (url.URL, error) { - r := odb.NewDefaultEndpointResolverV2() - - ep, err := r.ResolveEndpoint(ctx, odb.EndpointParameters{ - Region: aws.String(region), - UseFIPS: aws.Bool(true), - }) - if err != nil { - return url.URL{}, err - } - - if ep.URI.Path == "" { - ep.URI.Path = "/" - } - - return ep.URI, nil -} - -func callService(ctx context.Context, t *testing.T, meta *conns.AWSClient) apiCallParams { - t.Helper() - - client := meta.ODBClient(ctx) - - var result apiCallParams - - input := odb.ListCloudExadataInfrastructuresInput{} - _, err := client.ListCloudExadataInfrastructures(ctx, &input, - func(opts *odb.Options) { - opts.APIOptions = append(opts.APIOptions, - addRetrieveEndpointURLMiddleware(t, &result.endpoint), - addRetrieveRegionMiddleware(&result.region), - addCancelRequestMiddleware(), - ) - }, - ) - if err == nil { - t.Fatal("Expected an error, got none") - } else if !errors.Is(err, errCancelOperation) { - t.Fatalf("Unexpected error: %s", err) - } - - return result -} - -func withNoConfig(_ *caseSetup) { - // no-op -} - -func withPackageNameEndpointInConfig(setup *caseSetup) { - if _, ok := setup.config[names.AttrEndpoints]; !ok { - setup.config[names.AttrEndpoints] = []any{ - map[string]any{}, - } - } - endpoints := setup.config[names.AttrEndpoints].([]any)[0].(map[string]any) - endpoints[packageName] = packageNameConfigEndpoint -} - -func withAwsEnvVar(setup *caseSetup) { - setup.environmentVariables[awsEnvVar] = awsServiceEnvvarEndpoint -} - -func withBaseEnvVar(setup *caseSetup) { - setup.environmentVariables[baseEnvVar] = baseEnvvarEndpoint -} - -func withServiceEndpointInConfigFile(setup *caseSetup) { - setup.configFile.serviceUrl = serviceConfigFileEndpoint -} - -func withBaseEndpointInConfigFile(setup *caseSetup) { - setup.configFile.baseUrl = baseConfigFileEndpoint -} - -func withUseFIPSInConfig(setup *caseSetup) { - setup.config["use_fips_endpoint"] = true -} - -func expectDefaultEndpoint(ctx context.Context, t *testing.T, region string) caseExpectations { - t.Helper() - - endpoint, err := defaultEndpoint(ctx, region) - if err != nil { - t.Fatalf("resolving accessanalyzer default endpoint: %s", err) - } - - return caseExpectations{ - endpoint: endpoint.String(), - region: expectedCallRegion, - } -} - -func expectDefaultFIPSEndpoint(ctx context.Context, t *testing.T, region string) caseExpectations { - t.Helper() - - endpoint, err := defaultFIPSEndpoint(ctx, region) - if err != nil { - t.Fatalf("resolving accessanalyzer FIPS endpoint: %s", err) - } - - hostname := endpoint.Hostname() - _, err = net.LookupHost(hostname) - if dnsErr, ok := errs.As[*net.DNSError](err); ok && dnsErr.IsNotFound { - return expectDefaultEndpoint(ctx, t, region) - } else if err != nil { - t.Fatalf("looking up accessanalyzer endpoint %q: %s", hostname, err) - } - - return caseExpectations{ - endpoint: endpoint.String(), - region: expectedCallRegion, - } -} - -func expectPackageNameConfigEndpoint() caseExpectations { - return caseExpectations{ - endpoint: packageNameConfigEndpoint, - region: expectedCallRegion, - } -} - -func expectAwsEnvVarEndpoint() caseExpectations { - return caseExpectations{ - endpoint: awsServiceEnvvarEndpoint, - region: expectedCallRegion, - } -} - -func expectBaseEnvVarEndpoint() caseExpectations { - return caseExpectations{ - endpoint: baseEnvvarEndpoint, - region: expectedCallRegion, - } -} - -func expectServiceConfigFileEndpoint() caseExpectations { - return caseExpectations{ - endpoint: serviceConfigFileEndpoint, - region: expectedCallRegion, - } -} - -func expectBaseConfigFileEndpoint() caseExpectations { - return caseExpectations{ - endpoint: baseConfigFileEndpoint, - region: expectedCallRegion, - } -} - -func testEndpointCase(ctx context.Context, t *testing.T, region string, testcase endpointTestCase, callF callFunc) { - t.Helper() - - setup := caseSetup{ - config: map[string]any{}, - environmentVariables: map[string]string{}, - } - - for _, f := range testcase.with { - f(&setup) - } - - config := map[string]any{ - names.AttrAccessKey: servicemocks.MockStaticAccessKey, - names.AttrSecretKey: servicemocks.MockStaticSecretKey, - names.AttrRegion: region, - names.AttrSkipCredentialsValidation: true, - names.AttrSkipRequestingAccountID: true, - } - - maps.Copy(config, setup.config) - - if setup.configFile.baseUrl != "" || setup.configFile.serviceUrl != "" { - config[names.AttrProfile] = "default" - tempDir := t.TempDir() - writeSharedConfigFile(t, &config, tempDir, generateSharedConfigFile(setup.configFile)) - } - - for k, v := range setup.environmentVariables { - t.Setenv(k, v) - } - - p, err := sdkv2.NewProvider(ctx) - if err != nil { - t.Fatal(err) - } - - p.TerraformVersion = "1.0.0" - - expectedDiags := testcase.expected.diags - diags := p.Configure(ctx, terraformsdk.NewResourceConfigRaw(config)) - - if diff := cmp.Diff(diags, expectedDiags, cmp.Comparer(sdkdiag.Comparer)); diff != "" { - t.Errorf("unexpected diagnostics difference: %s", diff) - } - - if diags.HasError() { - return - } - - meta := p.Meta().(*conns.AWSClient) - - callParams := callF(ctx, t, meta) - - if e, a := testcase.expected.endpoint, callParams.endpoint; e != a { - t.Errorf("expected endpoint %q, got %q", e, a) - } - - if e, a := testcase.expected.region, callParams.region; e != a { - t.Errorf("expected region %q, got %q", e, a) - } -} - -func addRetrieveEndpointURLMiddleware(t *testing.T, endpoint *string) func(*middleware.Stack) error { - return func(stack *middleware.Stack) error { - return stack.Finalize.Add( - retrieveEndpointURLMiddleware(t, endpoint), - middleware.After, - ) - } -} - -func retrieveEndpointURLMiddleware(t *testing.T, endpoint *string) middleware.FinalizeMiddleware { - return middleware.FinalizeMiddlewareFunc( - "Test: Retrieve Endpoint", - func(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) (middleware.FinalizeOutput, middleware.Metadata, error) { - t.Helper() - - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - t.Fatalf("Expected *github.com/aws/smithy-go/transport/http.Request, got %s", fullTypeName(in.Request)) - } - - url := request.URL - url.RawQuery = "" - url.Path = "/" - - *endpoint = url.String() - - return next.HandleFinalize(ctx, in) - }) -} - -func addRetrieveRegionMiddleware(region *string) func(*middleware.Stack) error { - return func(stack *middleware.Stack) error { - return stack.Serialize.Add( - retrieveRegionMiddleware(region), - middleware.After, - ) - } -} - -func retrieveRegionMiddleware(region *string) middleware.SerializeMiddleware { - return middleware.SerializeMiddlewareFunc( - "Test: Retrieve Region", - func(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (middleware.SerializeOutput, middleware.Metadata, error) { - *region = awsmiddleware.GetRegion(ctx) - - return next.HandleSerialize(ctx, in) - }, - ) -} - -var errCancelOperation = fmt.Errorf("Test: Canceling request") - -func addCancelRequestMiddleware() func(*middleware.Stack) error { - return func(stack *middleware.Stack) error { - return stack.Finalize.Add( - cancelRequestMiddleware(), - middleware.After, - ) - } -} - -// cancelRequestMiddleware creates a Smithy middleware that intercepts the request before sending and cancels it -func cancelRequestMiddleware() middleware.FinalizeMiddleware { - return middleware.FinalizeMiddlewareFunc( - "Test: Cancel Requests", - func(_ context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) (middleware.FinalizeOutput, middleware.Metadata, error) { - return middleware.FinalizeOutput{}, middleware.Metadata{}, errCancelOperation - }) -} - -func fullTypeName(i any) string { - return fullValueTypeName(reflect.ValueOf(i)) -} - -func fullValueTypeName(v reflect.Value) string { - if v.Kind() == reflect.Ptr { - return "*" + fullValueTypeName(reflect.Indirect(v)) - } - - requestType := v.Type() - return fmt.Sprintf("%s.%s", requestType.PkgPath(), requestType.Name()) -} - -func generateSharedConfigFile(config configFile) string { - var buf strings.Builder - - buf.WriteString(` -[default] -aws_access_key_id = DefaultSharedCredentialsAccessKey -aws_secret_access_key = DefaultSharedCredentialsSecretKey -`) - if config.baseUrl != "" { - fmt.Fprintf(&buf, "endpoint_url = %s\n", config.baseUrl) - } - - if config.serviceUrl != "" { - fmt.Fprintf(&buf, ` -services = endpoint-test - -[services endpoint-test] -%[1]s = - endpoint_url = %[2]s -`, configParam, serviceConfigFileEndpoint) - } - - return buf.String() -} - -func writeSharedConfigFile(t *testing.T, config *map[string]any, tempDir, content string) string { - t.Helper() - - file, err := os.Create(filepath.Join(tempDir, "aws-sdk-go-base-shared-configuration-file")) - if err != nil { - t.Fatalf("creating shared configuration file: %s", err) - } - - _, err = file.WriteString(content) - if err != nil { - t.Fatalf(" writing shared configuration file: %s", err) - } - - if v, ok := (*config)[names.AttrSharedConfigFiles]; !ok { - (*config)[names.AttrSharedConfigFiles] = []any{file.Name()} - } else { - (*config)[names.AttrSharedConfigFiles] = append(v.([]any), file.Name()) - } - - return file.Name() -} diff --git a/internal/service/odb/service_package.go b/internal/service/odb/service_package.go deleted file mode 100644 index 32a962a8ab63..000000000000 --- a/internal/service/odb/service_package.go +++ /dev/null @@ -1,21 +0,0 @@ -//Copyright © 2025, Oracle and/or its affiliates. All rights reserved. - -package odb - -import ( - "context" - "github.com/aws/aws-sdk-go-v2/aws" - "github.com/aws/aws-sdk-go-v2/service/odb" - "github.com/hashicorp/terraform-provider-aws/names" -) - -func (p *servicePackage) NewClient(ctx context.Context, config map[string]any) (*odb.Client, error) { - cfg := *(config["aws_sdkv2_config"].(*aws.Config)) - - return odb.NewFromConfig(cfg, - odb.WithEndpointResolverV2(newEndpointResolverV2()), - withBaseEndpoint(config[names.AttrEndpoint].(string)), - func(o *odb.Options) { - }, - ), nil -} diff --git a/internal/service/odb/service_package_gen.go b/internal/service/odb/service_package_gen.go deleted file mode 100644 index 68efcabb4e0b..000000000000 --- a/internal/service/odb/service_package_gen.go +++ /dev/null @@ -1,169 +0,0 @@ -// Code generated by internal/generate/servicepackage/main.go; DO NOT EDIT. - -package odb - -import ( - "context" - "unique" - - "github.com/hashicorp/terraform-provider-aws/internal/conns" - inttypes "github.com/hashicorp/terraform-provider-aws/internal/types" - "github.com/hashicorp/terraform-provider-aws/names" -) - -type servicePackage struct{} - -func (p *servicePackage) FrameworkDataSources(ctx context.Context) []*inttypes.ServicePackageFrameworkDataSource { - return []*inttypes.ServicePackageFrameworkDataSource{ - { - Factory: newDataSourceCloudAutonomousVmCluster, - TypeName: "aws_odb_cloud_autonomous_vm_cluster", - Name: "Cloud Autonomous Vm Cluster", - Region: unique.Make(inttypes.ResourceRegionDefault()), - }, - { - Factory: newDataSourceCloudAutonomousVmClustersList, - TypeName: "aws_odb_cloud_autonomous_vm_clusters_list", - Name: "Cloud Autonomous Vm Clusters List", - Region: unique.Make(inttypes.ResourceRegionDefault()), - }, - { - Factory: newDataSourceCloudExadataInfrastructure, - TypeName: "aws_odb_cloud_exadata_infrastructure", - Name: "Cloud Exadata Infrastructure", - Region: unique.Make(inttypes.ResourceRegionDefault()), - }, - { - Factory: newDataSourceCloudExadataInfrastructuresList, - TypeName: "aws_odb_cloud_exadata_infrastructures_list", - Name: "Cloud Exadata Infrastructures List", - Region: unique.Make(inttypes.ResourceRegionDefault()), - }, - { - Factory: newDataSourceCloudVmCluster, - TypeName: "aws_odb_cloud_vm_cluster", - Name: "Cloud Vm Cluster", - Region: unique.Make(inttypes.ResourceRegionDefault()), - }, - { - Factory: newDataSourceCloudVmClustersList, - TypeName: "aws_odb_cloud_vm_clusters_list", - Name: "Cloud Vm Clusters List", - Region: unique.Make(inttypes.ResourceRegionDefault()), - }, - { - Factory: newDataSourceDbServer, - TypeName: "aws_odb_db_server", - Name: "Db Server", - Region: unique.Make(inttypes.ResourceRegionDefault()), - }, - { - Factory: newDataSourceDbServersList, - TypeName: "aws_odb_db_servers_list", - Name: "Db Servers List", - Region: unique.Make(inttypes.ResourceRegionDefault()), - }, - { - Factory: newDataSourceDbSystemShapesList, - TypeName: "aws_odb_db_system_shapes_list", - Name: "Db System Shapes List", - Region: unique.Make(inttypes.ResourceRegionDefault()), - }, - { - Factory: newDataSourceGiVersionsList, - TypeName: "aws_odb_gi_versions_list", - Name: "Gi Versions List", - Region: unique.Make(inttypes.ResourceRegionDefault()), - }, - { - Factory: newDataSourceNetwork, - TypeName: "aws_odb_network", - Name: "Network", - Region: unique.Make(inttypes.ResourceRegionDefault()), - }, - { - Factory: newDataSourceNetworkPeeringConnection, - TypeName: "aws_odb_network_peering_connection", - Name: "Network Peering Connection", - Region: unique.Make(inttypes.ResourceRegionDefault()), - }, - { - Factory: newDataSourceNetworkPeeringConnectionsList, - TypeName: "aws_odb_network_peering_connections_list", - Name: "Network Peering Connections List", - Region: unique.Make(inttypes.ResourceRegionDefault()), - }, - { - Factory: newDataSourceNetworksList, - TypeName: "aws_odb_networks_list", - Name: "Networks List", - Region: unique.Make(inttypes.ResourceRegionDefault()), - }, - } -} - -func (p *servicePackage) FrameworkResources(ctx context.Context) []*inttypes.ServicePackageFrameworkResource { - return []*inttypes.ServicePackageFrameworkResource{ - { - Factory: newResourceCloudAutonomousVmCluster, - TypeName: "aws_odb_cloud_autonomous_vm_cluster", - Name: "Cloud Autonomous Vm Cluster", - Tags: unique.Make(inttypes.ServicePackageResourceTags{ - IdentifierAttribute: names.AttrARN, - }), - Region: unique.Make(inttypes.ResourceRegionDefault()), - }, - { - Factory: newResourceCloudExadataInfrastructure, - TypeName: "aws_odb_cloud_exadata_infrastructure", - Name: "Cloud Exadata Infrastructure", - Tags: unique.Make(inttypes.ServicePackageResourceTags{ - IdentifierAttribute: names.AttrARN, - }), - Region: unique.Make(inttypes.ResourceRegionDefault()), - }, - { - Factory: newResourceCloudVmCluster, - TypeName: "aws_odb_cloud_vm_cluster", - Name: "Cloud Vm Cluster", - Tags: unique.Make(inttypes.ServicePackageResourceTags{ - IdentifierAttribute: names.AttrARN, - }), - Region: unique.Make(inttypes.ResourceRegionDefault()), - }, - { - Factory: newResourceNetwork, - TypeName: "aws_odb_network", - Name: "Network", - Tags: unique.Make(inttypes.ServicePackageResourceTags{ - IdentifierAttribute: names.AttrARN, - }), - Region: unique.Make(inttypes.ResourceRegionDefault()), - }, - { - Factory: newResourceNetworkPeeringConnection, - TypeName: "aws_odb_network_peering_connection", - Name: "Network Peering Connection", - Tags: unique.Make(inttypes.ServicePackageResourceTags{ - IdentifierAttribute: names.AttrARN, - }), - Region: unique.Make(inttypes.ResourceRegionDefault()), - }, - } -} - -func (p *servicePackage) SDKDataSources(ctx context.Context) []*inttypes.ServicePackageSDKDataSource { - return []*inttypes.ServicePackageSDKDataSource{} -} - -func (p *servicePackage) SDKResources(ctx context.Context) []*inttypes.ServicePackageSDKResource { - return []*inttypes.ServicePackageSDKResource{} -} - -func (p *servicePackage) ServicePackageName() string { - return names.ODB -} - -func ServicePackage(ctx context.Context) conns.ServicePackage { - return &servicePackage{} -} diff --git a/internal/service/odb/tags_gen.go b/internal/service/odb/tags_gen.go deleted file mode 100644 index bc4b9c504732..000000000000 --- a/internal/service/odb/tags_gen.go +++ /dev/null @@ -1,128 +0,0 @@ -// Code generated by internal/generate/tags/main.go; DO NOT EDIT. -package odb - -import ( - "context" - "fmt" - - "github.com/aws/aws-sdk-go-v2/aws" - "github.com/aws/aws-sdk-go-v2/service/odb" - "github.com/hashicorp/terraform-plugin-log/tflog" - "github.com/hashicorp/terraform-provider-aws/internal/conns" - "github.com/hashicorp/terraform-provider-aws/internal/logging" - tftags "github.com/hashicorp/terraform-provider-aws/internal/tags" - "github.com/hashicorp/terraform-provider-aws/internal/types/option" - "github.com/hashicorp/terraform-provider-aws/names" -) - -// listTags lists odb service tags. -// The identifier is typically the Amazon Resource Name (ARN), although -// it may also be a different identifier depending on the service. -func listTags(ctx context.Context, conn *odb.Client, identifier string, optFns ...func(*odb.Options)) (tftags.KeyValueTags, error) { - input := odb.ListTagsForResourceInput{ - ResourceArn: aws.String(identifier), - } - - output, err := conn.ListTagsForResource(ctx, &input, optFns...) - - if err != nil { - return tftags.New(ctx, nil), err - } - - return keyValueTags(ctx, output.Tags), nil -} - -// ListTags lists odb service tags and set them in Context. -// It is called from outside this package. -func (p *servicePackage) ListTags(ctx context.Context, meta any, identifier string) error { - tags, err := listTags(ctx, meta.(*conns.AWSClient).ODBClient(ctx), identifier) - - if err != nil { - return err - } - - if inContext, ok := tftags.FromContext(ctx); ok { - inContext.TagsOut = option.Some(tags) - } - - return nil -} - -// map[string]string handling - -// svcTags returns odb service tags. -func svcTags(tags tftags.KeyValueTags) map[string]string { - return tags.Map() -} - -// keyValueTags creates tftags.KeyValueTags from odb service tags. -func keyValueTags(ctx context.Context, tags map[string]string) tftags.KeyValueTags { - return tftags.New(ctx, tags) -} - -// getTagsIn returns odb service tags from Context. -// nil is returned if there are no input tags. -func getTagsIn(ctx context.Context) map[string]string { - if inContext, ok := tftags.FromContext(ctx); ok { - if tags := svcTags(inContext.TagsIn.UnwrapOrDefault()); len(tags) > 0 { - return tags - } - } - - return nil -} - -// setTagsOut sets odb service tags in Context. -func setTagsOut(ctx context.Context, tags map[string]string) { - if inContext, ok := tftags.FromContext(ctx); ok { - inContext.TagsOut = option.Some(keyValueTags(ctx, tags)) - } -} - -// updateTags updates odb service tags. -// The identifier is typically the Amazon Resource Name (ARN), although -// it may also be a different identifier depending on the service. -func updateTags(ctx context.Context, conn *odb.Client, identifier string, oldTagsMap, newTagsMap any, optFns ...func(*odb.Options)) error { - oldTags := tftags.New(ctx, oldTagsMap) - newTags := tftags.New(ctx, newTagsMap) - - ctx = tflog.SetField(ctx, logging.KeyResourceId, identifier) - - removedTags := oldTags.Removed(newTags) - removedTags = removedTags.IgnoreSystem(names.ODB) - if len(removedTags) > 0 { - input := odb.UntagResourceInput{ - ResourceArn: aws.String(identifier), - TagKeys: removedTags.Keys(), - } - - _, err := conn.UntagResource(ctx, &input, optFns...) - - if err != nil { - return fmt.Errorf("untagging resource (%s): %w", identifier, err) - } - } - - updatedTags := oldTags.Updated(newTags) - updatedTags = updatedTags.IgnoreSystem(names.ODB) - if len(updatedTags) > 0 { - input := odb.TagResourceInput{ - ResourceArn: aws.String(identifier), - Tags: svcTags(updatedTags), - } - - _, err := conn.TagResource(ctx, &input, optFns...) - - if err != nil { - return fmt.Errorf("tagging resource (%s): %w", identifier, err) - } - } - - return nil -} - -// UpdateTags updates odb service tags. -// It is called from outside this package. -func (p *servicePackage) UpdateTags(ctx context.Context, meta any, identifier string, oldTags, newTags any) error { - return updateTags(ctx, meta.(*conns.AWSClient).ODBClient(ctx), identifier, oldTags, newTags) -} diff --git a/internal/sweep/service_packages_gen_test.go b/internal/sweep/service_packages_gen_test.go index b4930936066d..a063d088e82d 100644 --- a/internal/sweep/service_packages_gen_test.go +++ b/internal/sweep/service_packages_gen_test.go @@ -175,7 +175,6 @@ import ( "github.com/hashicorp/terraform-provider-aws/internal/service/notifications" "github.com/hashicorp/terraform-provider-aws/internal/service/notificationscontacts" "github.com/hashicorp/terraform-provider-aws/internal/service/oam" - "github.com/hashicorp/terraform-provider-aws/internal/service/odb" "github.com/hashicorp/terraform-provider-aws/internal/service/opensearch" "github.com/hashicorp/terraform-provider-aws/internal/service/opensearchserverless" "github.com/hashicorp/terraform-provider-aws/internal/service/organizations" @@ -431,7 +430,6 @@ func servicePackages(ctx context.Context) []conns.ServicePackage { notifications.ServicePackage(ctx), notificationscontacts.ServicePackage(ctx), oam.ServicePackage(ctx), - odb.ServicePackage(ctx), opensearch.ServicePackage(ctx), opensearchserverless.ServicePackage(ctx), organizations.ServicePackage(ctx), diff --git a/names/consts_gen.go b/names/consts_gen.go index 891ae53defe0..aa6170eb2602 100644 --- a/names/consts_gen.go +++ b/names/consts_gen.go @@ -168,7 +168,6 @@ const ( NetworkMonitor = "networkmonitor" Notifications = "notifications" NotificationsContacts = "notificationscontacts" - ODB = "odb" ObservabilityAccessManager = "oam" OpenSearch = "opensearch" OpenSearchIngestion = "osis" @@ -424,7 +423,6 @@ const ( NetworkMonitorServiceID = "NetworkMonitor" NotificationsServiceID = "notifications" NotificationsContactsServiceID = "notificationscontacts" - ODBServiceID = "ODB" ObservabilityAccessManagerServiceID = "OAM" OpenSearchServiceID = "OpenSearch" OpenSearchIngestionServiceID = "OSIS" diff --git a/names/data/names_data.hcl b/names/data/names_data.hcl index 43181a66f6a7..6a83a3386cfa 100644 --- a/names/data/names_data.hcl +++ b/names/data/names_data.hcl @@ -9441,33 +9441,4 @@ service "evs" { provider_package_correct = "evs" doc_prefix = ["evs_"] brand = "Amazon" -} -service "odb" { - sdk { - id = "ODB" - arn_namespace = "odb" - } - names { - provider_name_upper = "ODB" - human_friendly = "Oracle Database@AWS" - } - endpoint_info { - endpoint_api_call = "ListCloudExadataInfrastructures" - endpoint_region_overrides = { - "aws" = "us-east-1" - } - } - go_packages { - v1_package = "" - v2_package = "odb" - } - client{ - skip_client_generate = true - } - resource_prefix{ - correct = "aws_odb_" - } - provider_package_correct = "odb" - doc_prefix = ["odb_"] - brand = "AWS" } \ No newline at end of file diff --git a/website/allowed-subcategories.txt b/website/allowed-subcategories.txt index cd54f7ea7596..45c4b8b75701 100644 --- a/website/allowed-subcategories.txt +++ b/website/allowed-subcategories.txt @@ -174,7 +174,6 @@ Network Manager OpenSearch OpenSearch Ingestion OpenSearch Serverless -Oracle Database@AWS Organizations Outposts Outposts (EC2) diff --git a/website/docs/d/odb_cloud_autonomous_vm_clusters_list.html.markdown b/website/docs/d/odb_cloud_autonomous_vm_clusters_list.html.markdown deleted file mode 100644 index aaef5fcf4343..000000000000 --- a/website/docs/d/odb_cloud_autonomous_vm_clusters_list.html.markdown +++ /dev/null @@ -1,47 +0,0 @@ ---- -subcategory: "Oracle Database@AWS" -layout: "aws" -page_title: "AWS: aws_odb_cloud_autonomous_vm_clusters_list" -description: |- - Provides details about an AWS Oracle Database@AWS Cloud Autonomous Vm Clusters List. ---- - - -# Data Source: aws_odb_cloud_autonomous_vm_clusters_list - -Provides details about an AWS Oracle Database@AWS Cloud Autonomous Vm Clusters List. - -## Example Usage - -### Basic Usage - -```terraform -data "aws_odb_cloud_autonomous_vm_clusters_list" "example" { -} -``` - -## Argument Reference - -The following arguments are required: - -* `example_arg` - (Required) Brief description of the required argument. - -The following arguments are optional: - -* `optional_arg` - (Optional) Brief description of the optional argument. - -## Attribute Reference - -This data source exports the following attributes in addition to the arguments above: - -* `arn` - ARN of the Cloud Autonomous Vm Clusters List. -* `example_attribute` - Brief description of the attribute. diff --git a/website/docs/d/odb_cloud_vm_clusters_list.html.markdown b/website/docs/d/odb_cloud_vm_clusters_list.html.markdown deleted file mode 100644 index 1b9094fa50fb..000000000000 --- a/website/docs/d/odb_cloud_vm_clusters_list.html.markdown +++ /dev/null @@ -1,47 +0,0 @@ ---- -subcategory: "Oracle Database@AWS" -layout: "aws" -page_title: "AWS: aws_odb_cloud_vm_clusters_list" -description: |- - Provides details about an AWS Oracle Database@AWS Cloud Vm Clusters List. ---- - - -# Data Source: aws_odb_cloud_vm_clusters_list - -Provides details about an AWS Oracle Database@AWS Cloud Vm Clusters List. - -## Example Usage - -### Basic Usage - -```terraform -data "aws_odb_cloud_vm_clusters_list" "example" { -} -``` - -## Argument Reference - -The following arguments are required: - -* `example_arg` - (Required) Brief description of the required argument. - -The following arguments are optional: - -* `optional_arg` - (Optional) Brief description of the optional argument. - -## Attribute Reference - -This data source exports the following attributes in addition to the arguments above: - -* `arn` - ARN of the Cloud Vm Clusters List. -* `example_attribute` - Brief description of the attribute. diff --git a/website/docs/d/odb_networks_list.html.markdown b/website/docs/d/odb_networks_list.html.markdown deleted file mode 100644 index 759c339f9db3..000000000000 --- a/website/docs/d/odb_networks_list.html.markdown +++ /dev/null @@ -1,47 +0,0 @@ ---- -subcategory: "Oracle Database@AWS" -layout: "aws" -page_title: "AWS: aws_odb_networks_list" -description: |- - Provides details about an AWS Oracle Database@AWS Networks List. ---- - - -# Data Source: aws_odb_networks_list - -Provides details about an AWS Oracle Database@AWS Networks List. - -## Example Usage - -### Basic Usage - -```terraform -data "aws_odb_networks_list" "example" { -} -``` - -## Argument Reference - -The following arguments are required: - -* `example_arg` - (Required) Brief description of the required argument. - -The following arguments are optional: - -* `optional_arg` - (Optional) Brief description of the optional argument. - -## Attribute Reference - -This data source exports the following attributes in addition to the arguments above: - -* `arn` - ARN of the Networks List. -* `example_attribute` - Brief description of the attribute. diff --git a/website/docs/guides/custom-service-endpoints.html.markdown b/website/docs/guides/custom-service-endpoints.html.markdown index ee8b28828e8b..1bc7580337e4 100644 --- a/website/docs/guides/custom-service-endpoints.html.markdown +++ b/website/docs/guides/custom-service-endpoints.html.markdown @@ -250,7 +250,6 @@ provider "aws" { |User Notifications|`notifications`|`AWS_ENDPOINT_URL_NOTIFICATIONS`|`notifications`| |User Notifications Contacts|`notificationscontacts`|`AWS_ENDPOINT_URL_NOTIFICATIONSCONTACTS`|`notificationscontacts`| |CloudWatch Observability Access Manager|`oam`(or `cloudwatchobservabilityaccessmanager`)|`AWS_ENDPOINT_URL_OAM`|`oam`| -|Oracle Database@AWS|`odb`|`AWS_ENDPOINT_URL_ODB`|`odb`| |OpenSearch|`opensearch`(or `opensearchservice`)|`AWS_ENDPOINT_URL_OPENSEARCH`|`opensearch`| |OpenSearch Serverless|`opensearchserverless`|`AWS_ENDPOINT_URL_OPENSEARCHSERVERLESS`|`opensearchserverless`| |Organizations|`organizations`|`AWS_ENDPOINT_URL_ORGANIZATIONS`|`organizations`| diff --git a/website/docs/r/odb_cloud_exadata_infrastructure.html.markdown b/website/docs/r/odb_cloud_exadata_infrastructure.html.markdown deleted file mode 100644 index bc72d5c9a32b..000000000000 --- a/website/docs/r/odb_cloud_exadata_infrastructure.html.markdown +++ /dev/null @@ -1,72 +0,0 @@ ---- -subcategory: "Oracle Database@AWS" -layout: "aws" -page_title: "AWS: aws_odb_cloud_exadata_infrastructure" -description: |- - Manages an AWS Oracle Database@AWS Cloud Exadata Infrastructure. ---- - - -# Resource: aws_odb_cloud_exadata_infrastructure - -Manages an AWS Oracle Database@AWS Cloud Exadata Infrastructure. - -## Example Usage - -### Basic Usage - -```terraform -resource "aws_odb_cloud_exadata_infrastructure" "example" { -} -``` - -## Argument Reference - -The following arguments are required: - -* `example_arg` - (Required) Brief description of the required argument. - -The following arguments are optional: - -* `optional_arg` - (Optional) Brief description of the optional argument. - -## Attribute Reference - -This resource exports the following attributes in addition to the arguments above: - -* `arn` - ARN of the Cloud Exadata Infrastructure. -* `example_attribute` - Brief description of the attribute. - -## Timeouts - -[Configuration options](https://developer.hashicorp.com/terraform/language/resources/syntax#operation-timeouts): - -* `create` - (Default `60m`) -* `update` - (Default `180m`) -* `delete` - (Default `90m`) - -## Import - -In Terraform v1.5.0 and later, use an [`import` block](https://developer.hashicorp.com/terraform/language/import) to import Oracle Database@AWS Cloud Exadata Infrastructure using the `example_id_arg`. For example: - -```terraform -import { - to = aws_odb_cloud_exadata_infrastructure.example - id = "cloud_exadata_infrastructure-id-12345678" -} -``` - -Using `terraform import`, import Oracle Database@AWS Cloud Exadata Infrastructure using the `example_id_arg`. For example: - -```console -% terraform import aws_odb_cloud_exadata_infrastructure.example cloud_exadata_infrastructure-id-12345678 -``` diff --git a/website/docs/r/odb_exa_infra.html.markdown b/website/docs/r/odb_exa_infra.html.markdown deleted file mode 100644 index f52a8ff927b8..000000000000 --- a/website/docs/r/odb_exa_infra.html.markdown +++ /dev/null @@ -1,72 +0,0 @@ ---- -subcategory: "Oracle Database@AWS" -layout: "aws" -page_title: "AWS: aws_odb_exa_infra" -description: |- - Manages an AWS Oracle Database@AWS Exa Infra. ---- - - -# Resource: aws_odb_exa_infra - -Manages an AWS Oracle Database@AWS Exa Infra. - -## Example Usage - -### Basic Usage - -```terraform -resource "aws_odb_exa_infra" "example" { -} -``` - -## Argument Reference - -The following arguments are required: - -* `example_arg` - (Required) Brief description of the required argument. - -The following arguments are optional: - -* `optional_arg` - (Optional) Brief description of the optional argument. - -## Attribute Reference - -This resource exports the following attributes in addition to the arguments above: - -* `arn` - ARN of the Exa Infra. -* `example_attribute` - Brief description of the attribute. - -## Timeouts - -[Configuration options](https://developer.hashicorp.com/terraform/language/resources/syntax#operation-timeouts): - -* `create` - (Default `60m`) -* `update` - (Default `180m`) -* `delete` - (Default `90m`) - -## Import - -In Terraform v1.5.0 and later, use an [`import` block](https://developer.hashicorp.com/terraform/language/import) to import Oracle Database@AWS Exa Infra using the `example_id_arg`. For example: - -```terraform -import { - to = aws_odb_exa_infra.example - id = "exa_infra-id-12345678" -} -``` - -Using `terraform import`, import Oracle Database@AWS Exa Infra using the `example_id_arg`. For example: - -```console -% terraform import aws_odb_exa_infra.example exa_infra-id-12345678 -``` From 6ec88b928aa9116b49c8c2661e051052180cdb2c Mon Sep 17 00:00:00 2001 From: Asim Date: Thu, 31 Jul 2025 19:28:15 +0100 Subject: [PATCH 365/365] split-pr setup discarding changes --- examples/odb/autonomous_vm_cluster.tf | 55 --------------------------- examples/odb/exadata_infra.tf | 48 ----------------------- examples/odb/main.tf | 10 ----- examples/odb/odb_network.tf | 27 ------------- examples/odb/odb_network_peering.tf | 7 ---- examples/odb/vm_cluster.tf | 51 ------------------------- 6 files changed, 198 deletions(-) delete mode 100644 examples/odb/autonomous_vm_cluster.tf delete mode 100644 examples/odb/exadata_infra.tf delete mode 100644 examples/odb/main.tf delete mode 100644 examples/odb/odb_network.tf delete mode 100644 examples/odb/odb_network_peering.tf delete mode 100644 examples/odb/vm_cluster.tf diff --git a/examples/odb/autonomous_vm_cluster.tf b/examples/odb/autonomous_vm_cluster.tf deleted file mode 100644 index 870259c18ca6..000000000000 --- a/examples/odb/autonomous_vm_cluster.tf +++ /dev/null @@ -1,55 +0,0 @@ -//Copyright © 2025, Oracle and/or its affiliates. All rights reserved. - -//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 = "" //refer your exadata infra id - odb_network_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 = [""] - scan_listener_port_tls = 8561 - scan_listener_port_non_tls = 1024 - maintenance_window = { - preference = "NO_PREFERENCE" - days_of_week = [] - hours_of_day = [] - months = [] - weeks_of_month = [] - lead_time_in_weeks = 0 - } - -} - -//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 = "" - odb_network_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 = ["", ""] - scan_listener_port_tls = 8561 - scan_listener_port_non_tls = 1024 - maintenance_window = { - preference = "CUSTOM_PREFERENCE" - days_of_week = ["MONDAY", "TUESDAY"] - hours_of_day = [4, 16] - months = ["FEBRUARY", "MAY", "AUGUST", "NOVEMBER"] - weeks_of_month = [2, 4] - lead_time_in_weeks = 3 - } - tags = { - "env" = "dev" - } - -} diff --git a/examples/odb/exadata_infra.tf b/examples/odb/exadata_infra.tf deleted file mode 100644 index 68fe806f0ffe..000000000000 --- a/examples/odb/exadata_infra.tf +++ /dev/null @@ -1,48 +0,0 @@ -//Copyright © 2025, Oracle and/or its affiliates. All rights reserved. - -//Exadata Infrastructure with customer managed maintenance window -resource "aws_odb_cloud_exadata_infrastructure" "exa_infra_X11M_all_param" { - display_name = "Ofake_my_odb_exadata_infra" //Required Field - shape = "Exadata.X11M" //Required Field - storage_count = 3 - compute_count = 2 - availability_zone_id = "use1-az6" //Required Field - customer_contacts_to_send_to_oci = ["abc@example.com"] - database_server_type = "X11M" - storage_server_type = "X11M-HC" - maintenance_window = { //Required - custom_action_timeout_in_mins = 16 - days_of_week = ["MONDAY", "TUESDAY"] - hours_of_day = [11, 16] - is_custom_action_timeout_enabled = true - lead_time_in_weeks = 3 - months = ["FEBRUARY", "MAY", "AUGUST", "NOVEMBER"] - patching_mode = "ROLLING" - preference = "CUSTOM_PREFERENCE" - weeks_of_month = [2, 4] - } - tags = { - "env" = "dev" - } - -} - -//Exadata Infrastructure with default maintenance window with X9M system shape. with minimum parameters -resource "aws_odb_cloud_exadata_infrastructure" "test_X9M" { - display_name = "Ofake_my_exa_X9M" - shape = "Exadata.X9M" - storage_count = 3 - compute_count = 2 - availability_zone_id = "use1-az6" - maintenance_window = { - custom_action_timeout_in_mins = 16 - days_of_week = [] - hours_of_day = [] - is_custom_action_timeout_enabled = true - lead_time_in_weeks = 0 - months = [] - patching_mode = "ROLLING" - preference = "NO_PREFERENCE" - weeks_of_month = [] - } -} \ No newline at end of file diff --git a/examples/odb/main.tf b/examples/odb/main.tf deleted file mode 100644 index 58cccaccb19c..000000000000 --- a/examples/odb/main.tf +++ /dev/null @@ -1,10 +0,0 @@ -//Copyright © 2025, Oracle and/or its affiliates. All rights reserved. -terraform { - required_version = ">= 0.15.3" - required_providers { - aws = { - source = "hashicorp/aws" - version = "3.50.0" - } - } -} \ No newline at end of file diff --git a/examples/odb/odb_network.tf b/examples/odb/odb_network.tf deleted file mode 100644 index 495db44c3eb7..000000000000 --- a/examples/odb/odb_network.tf +++ /dev/null @@ -1,27 +0,0 @@ -//Copyright © 2025, Oracle and/or its affiliates. All rights reserved. - -//odb network without managed service -resource "aws_odb_network" "test" { - display_name = "odb-my-net" - availability_zone_id = "use1-az6" - client_subnet_cidr = "10.2.0.0/24" - backup_subnet_cidr = "10.2.1.0/24" - s3_access = "DISABLED" - zero_etl_access = "DISABLED" - tags = { - "env" = "dev" - } -} - -//odb network with managed service -resource "aws_odb_network" "test" { - display_name = "odb-my-net" - availability_zone_id = "use1-az6" - client_subnet_cidr = "10.2.0.0/24" - backup_subnet_cidr = "10.2.1.0/24" - s3_access = "ENABLED" - zero_etl_access = "ENABLED" - tags = { - "env" = "dev" - } -} \ No newline at end of file diff --git a/examples/odb/odb_network_peering.tf b/examples/odb/odb_network_peering.tf deleted file mode 100644 index edd7fed47c12..000000000000 --- a/examples/odb/odb_network_peering.tf +++ /dev/null @@ -1,7 +0,0 @@ -//Copyright © 2025, Oracle and/or its affiliates. All rights reserved. - -resource "aws_odb_network_peering_connection" "test" { - display_name = "my_odb_net_peering" - odb_network_id = " - peer_network_id = "" -} \ No newline at end of file diff --git a/examples/odb/vm_cluster.tf b/examples/odb/vm_cluster.tf deleted file mode 100644 index a4e0767b5b1e..000000000000 --- a/examples/odb/vm_cluster.tf +++ /dev/null @@ -1,51 +0,0 @@ -//Copyright © 2025, Oracle and/or its affiliates. All rights reserved. - -resource "aws_odb_cloud_vm_cluster" "my_vmcluster_with_minimum_parameters" { - display_name = "Ofake_my_vmc" - cloud_exadata_infrastructure_id = "" - cpu_core_count = 6 - gi_version = "23.0.0.0" - hostname_prefix = "apollo12" - ssh_public_keys = [""] //public ssh keys - odb_network_id = "" - is_local_backup_enabled = true - is_sparse_diskgroup_enabled = true - license_model = "LICENSE_INCLUDED" - data_storage_size_in_tbs = 20.0 - db_servers = [""] //db-servers - db_node_storage_size_in_gbs = 120.0 - memory_size_in_gbs = 60 - tags = { - "env" = "dev" - } -} - - -resource "aws_odb_cloud_vm_cluster" "my_vmc_with_all_parameters" { - display_name = "Ofake_my_vmc" - cloud_exadata_infrastructure_id = "" - cpu_core_count = 6 - gi_version = "23.0.0.0" - hostname_prefix = "apollo12" - ssh_public_keys = [""] - odb_network_id = "" - is_local_backup_enabled = true - is_sparse_diskgroup_enabled = true - license_model = "LICENSE_INCLUDED" - data_storage_size_in_tbs = 20.0 - db_servers = [""] - db_node_storage_size_in_gbs = 120.0 - memory_size_in_gbs = 60 - cluster_name = "julia-13" - timezone = "UTC" - scan_listener_port_tcp = 1521 - system_version = "23.1.26.0.0.250516" - tags = { - "env" = "dev" - } - data_collection_options = { - is_diagnostics_events_enabled = true - is_health_monitoring_enabled = true - is_incident_logs_enabled = true - } -} \ No newline at end of file