From 2516720d3c48bca9c09d7dbf075d8f6a471f5604 Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Wed, 17 May 2023 14:43:13 -0700 Subject: [PATCH 1/3] r/aws_connect_hours_of_operation: Remove 'hours_of_operation_arn'. Acceptance test output: % make testacc TESTARGS='-run=TestAccConnect_serial/HoursOfOperation/basic$$' PKG=connect ==> Checking that code complies with gofmt requirements... TF_ACC=1 go test ./internal/service/connect/... -v -count 1 -parallel 20 -run=TestAccConnect_serial/HoursOfOperation/basic$ -timeout 180m === RUN TestAccConnect_serial === PAUSE TestAccConnect_serial === CONT TestAccConnect_serial === RUN TestAccConnect_serial/HoursOfOperation === RUN TestAccConnect_serial/HoursOfOperation/basic --- PASS: TestAccConnect_serial (102.89s) --- PASS: TestAccConnect_serial/HoursOfOperation (102.89s) --- PASS: TestAccConnect_serial/HoursOfOperation/basic (102.89s) PASS ok github.com/hashicorp/terraform-provider-aws/internal/service/connect 108.416s --- .changelog/#####.txt | 3 +++ internal/service/connect/hours_of_operation.go | 9 +++------ internal/service/connect/hours_of_operation_test.go | 2 -- website/docs/guides/version-5-upgrade.html.md | 5 +++++ website/docs/r/connect_hours_of_operation.html.markdown | 1 - 5 files changed, 11 insertions(+), 9 deletions(-) create mode 100644 .changelog/#####.txt diff --git a/.changelog/#####.txt b/.changelog/#####.txt new file mode 100644 index 000000000000..822176394e75 --- /dev/null +++ b/.changelog/#####.txt @@ -0,0 +1,3 @@ +```release-note:breaking-change +resource/aws_connect_hours_of_operation: The `hours_of_operation_arn` attribute has been removed +``` \ No newline at end of file diff --git a/internal/service/connect/hours_of_operation.go b/internal/service/connect/hours_of_operation.go index 6c5d6cd291eb..7d4c435fe5d0 100644 --- a/internal/service/connect/hours_of_operation.go +++ b/internal/service/connect/hours_of_operation.go @@ -28,10 +28,13 @@ func ResourceHoursOfOperation() *schema.Resource { ReadWithoutTimeout: resourceHoursOfOperationRead, UpdateWithoutTimeout: resourceHoursOfOperationUpdate, DeleteWithoutTimeout: resourceHoursOfOperationDelete, + Importer: &schema.ResourceImporter{ StateContext: schema.ImportStatePassthroughContext, }, + CustomizeDiff: verify.SetTagsDiff, + Schema: map[string]*schema.Schema{ "arn": { Type: schema.TypeString, @@ -98,11 +101,6 @@ func ResourceHoursOfOperation() *schema.Resource { Optional: true, ValidateFunc: validation.StringLenBetween(1, 250), }, - "hours_of_operation_arn": { - Type: schema.TypeString, - Computed: true, - Deprecated: "use 'arn' attribute instead", - }, "hours_of_operation_id": { Type: schema.TypeString, Computed: true, @@ -193,7 +191,6 @@ func resourceHoursOfOperationRead(ctx context.Context, d *schema.ResourceData, m } d.Set("arn", resp.HoursOfOperation.HoursOfOperationArn) - d.Set("hours_of_operation_arn", resp.HoursOfOperation.HoursOfOperationArn) // Deprecated d.Set("hours_of_operation_id", resp.HoursOfOperation.HoursOfOperationId) d.Set("instance_id", instanceID) d.Set("description", resp.HoursOfOperation.Description) diff --git a/internal/service/connect/hours_of_operation_test.go b/internal/service/connect/hours_of_operation_test.go index e33b1a40beba..63e0fb53f01a 100644 --- a/internal/service/connect/hours_of_operation_test.go +++ b/internal/service/connect/hours_of_operation_test.go @@ -48,7 +48,6 @@ func testAccHoursOfOperation_basic(t *testing.T) { "start_time.0.minutes": "0", }), resource.TestCheckResourceAttr(resourceName, "description", originalDescription), - resource.TestCheckResourceAttrSet(resourceName, "hours_of_operation_arn"), // Deprecated resource.TestCheckResourceAttrSet(resourceName, "hours_of_operation_id"), resource.TestCheckResourceAttrPair(resourceName, "instance_id", "aws_connect_instance.test", "id"), resource.TestCheckResourceAttr(resourceName, "name", rName2), @@ -78,7 +77,6 @@ func testAccHoursOfOperation_basic(t *testing.T) { "start_time.0.minutes": "0", }), resource.TestCheckResourceAttr(resourceName, "description", updatedDescription), - resource.TestCheckResourceAttrSet(resourceName, "hours_of_operation_arn"), // Deprecated resource.TestCheckResourceAttrSet(resourceName, "hours_of_operation_id"), resource.TestCheckResourceAttrPair(resourceName, "instance_id", "aws_connect_instance.test", "id"), resource.TestCheckResourceAttr(resourceName, "name", rName2), diff --git a/website/docs/guides/version-5-upgrade.html.md b/website/docs/guides/version-5-upgrade.html.md index b1bdb6ac6b25..c3b3e578bb41 100644 --- a/website/docs/guides/version-5-upgrade.html.md +++ b/website/docs/guides/version-5-upgrade.html.md @@ -30,6 +30,7 @@ Upgrade topics: - [Resource: aws_budgets_budget](#resource-aws_budgets_budget) - [Resource: aws_ce_anomaly_subscription](#resource-aws_ce_anomaly_subscription) - [Resource: aws_cloudwatch_event_target](#resource-aws_cloudwatch_event_target) +- [Resource: aws_connect_hours_of_operation](#resource-aws_connect_hours_of_operation) - [Resource: aws_connect_queue](#resource-aws_connect_queue) - [Resource: aws_connect_routing_profile](#resource-aws_connect_routing_profile) - [Resource: aws_docdb_cluster](#resource-aws_docdb_cluster) @@ -126,6 +127,10 @@ The `threshold` attribute has been removed. The `ecs_target.propagate_tags` attribute now has no default value. If no value is specified, the tags are not propagated. +## Resource: aws_connect_hours_of_operation + +The `hours_of_operation_arn` attribute has been removed. + ## Resource: aws_connect_queue The `quick_connect_ids_associated` attribute has been removed. diff --git a/website/docs/r/connect_hours_of_operation.html.markdown b/website/docs/r/connect_hours_of_operation.html.markdown index 14994d000771..e319c57c1e1c 100644 --- a/website/docs/r/connect_hours_of_operation.html.markdown +++ b/website/docs/r/connect_hours_of_operation.html.markdown @@ -86,7 +86,6 @@ A `start_time` block supports the following arguments: In addition to all arguments above, the following attributes are exported: * `arn` - The Amazon Resource Name (ARN) of the Hours of Operation. -* `hours_of_operation_arn` - (**Deprecated**) The Amazon Resource Name (ARN) of the Hours of Operation. * `hours_of_operation_id` - The identifier for the hours of operation. * `id` - The identifier of the hosting Amazon Connect Instance and identifier of the Hours of Operation separated by a colon (`:`). * `tags_all` - A map of tags assigned to the resource, including those inherited from the provider [`default_tags` configuration block](https://registry.terraform.io/providers/hashicorp/aws/latest/docs#default_tags-configuration-block). From 5c14ee51034a79a68696e99b22e12544678cd657 Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Wed, 17 May 2023 14:50:07 -0700 Subject: [PATCH 2/3] d/aws_connect_hours_of_operation: Remove 'hours_of_operation_arn'. Acceptance test output: % make testacc TESTARGS='-run=TestAccConnect_serial/HoursOfOperation/dataSource_id$$' PKG=connect ==> Checking that code complies with gofmt requirements... TF_ACC=1 go test ./internal/service/connect/... -v -count 1 -parallel 20 -run=TestAccConnect_serial/HoursOfOperation/dataSource_id$ -timeout 180m === RUN TestAccConnect_serial === PAUSE TestAccConnect_serial === CONT TestAccConnect_serial === RUN TestAccConnect_serial/HoursOfOperation === RUN TestAccConnect_serial/HoursOfOperation/dataSource_id --- PASS: TestAccConnect_serial (89.76s) --- PASS: TestAccConnect_serial/HoursOfOperation (89.76s) --- PASS: TestAccConnect_serial/HoursOfOperation/dataSource_id (89.76s) PASS ok github.com/hashicorp/terraform-provider-aws/internal/service/connect 95.016s --- .changelog/#####.txt | 4 ++++ internal/service/connect/hours_of_operation_data_source.go | 6 ------ .../service/connect/hours_of_operation_data_source_test.go | 2 -- website/docs/d/connect_hours_of_operation.html.markdown | 1 - website/docs/guides/version-5-upgrade.html.md | 5 +++++ 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.changelog/#####.txt b/.changelog/#####.txt index 822176394e75..472d2623a4be 100644 --- a/.changelog/#####.txt +++ b/.changelog/#####.txt @@ -1,3 +1,7 @@ ```release-note:breaking-change resource/aws_connect_hours_of_operation: The `hours_of_operation_arn` attribute has been removed +``` + +```release-note:breaking-change +data-source/aws_connect_hours_of_operation: The `hours_of_operation_arn` attribute has been removed ``` \ No newline at end of file diff --git a/internal/service/connect/hours_of_operation_data_source.go b/internal/service/connect/hours_of_operation_data_source.go index d602c97cd2e8..001d64ccca32 100644 --- a/internal/service/connect/hours_of_operation_data_source.go +++ b/internal/service/connect/hours_of_operation_data_source.go @@ -79,11 +79,6 @@ func DataSourceHoursOfOperation() *schema.Resource { Type: schema.TypeString, Computed: true, }, - "hours_of_operation_arn": { - Type: schema.TypeString, - Computed: true, - Deprecated: "use 'arn' attribute instead", - }, "hours_of_operation_id": { Type: schema.TypeString, Optional: true, @@ -149,7 +144,6 @@ func dataSourceHoursOfOperationRead(ctx context.Context, d *schema.ResourceData, hoursOfOperation := resp.HoursOfOperation d.Set("arn", hoursOfOperation.HoursOfOperationArn) - d.Set("hours_of_operation_arn", hoursOfOperation.HoursOfOperationArn) // Deprecated d.Set("hours_of_operation_id", hoursOfOperation.HoursOfOperationId) d.Set("instance_id", instanceID) d.Set("description", hoursOfOperation.Description) diff --git a/internal/service/connect/hours_of_operation_data_source_test.go b/internal/service/connect/hours_of_operation_data_source_test.go index c275f0044f58..5b5042b87d5c 100644 --- a/internal/service/connect/hours_of_operation_data_source_test.go +++ b/internal/service/connect/hours_of_operation_data_source_test.go @@ -25,7 +25,6 @@ func testAccHoursOfOperationDataSource_hoursOfOperationID(t *testing.T) { Config: testAccHoursOfOperationDataSourceConfig_id(rName, resourceName), Check: resource.ComposeAggregateTestCheckFunc( resource.TestCheckResourceAttrPair(datasourceName, "arn", resourceName, "arn"), - resource.TestCheckResourceAttrPair(datasourceName, "hours_of_operation_arn", resourceName, "hours_of_operation_arn"), // Deprecated resource.TestCheckResourceAttrPair(datasourceName, "hours_of_operation_id", resourceName, "hours_of_operation_id"), resource.TestCheckResourceAttrPair(datasourceName, "instance_id", resourceName, "instance_id"), resource.TestCheckResourceAttrPair(datasourceName, "name", resourceName, "name"), @@ -55,7 +54,6 @@ func testAccHoursOfOperationDataSource_name(t *testing.T) { Config: testAccHoursOfOperationDataSourceConfig_name(rName, rName2), Check: resource.ComposeAggregateTestCheckFunc( resource.TestCheckResourceAttrPair(datasourceName, "arn", resourceName, "arn"), - resource.TestCheckResourceAttrPair(datasourceName, "hours_of_operation_arn", resourceName, "hours_of_operation_arn"), // Deprecated resource.TestCheckResourceAttrPair(datasourceName, "hours_of_operation_id", resourceName, "hours_of_operation_id"), resource.TestCheckResourceAttrPair(datasourceName, "instance_id", resourceName, "instance_id"), resource.TestCheckResourceAttrPair(datasourceName, "name", resourceName, "name"), diff --git a/website/docs/d/connect_hours_of_operation.html.markdown b/website/docs/d/connect_hours_of_operation.html.markdown index 3e9db8766b68..b4a117cdfb79 100644 --- a/website/docs/d/connect_hours_of_operation.html.markdown +++ b/website/docs/d/connect_hours_of_operation.html.markdown @@ -47,7 +47,6 @@ In addition to all of the arguments above, the following attributes are exported * `arn` - ARN of the Hours of Operation. * `config` - Configuration information for the hours of operation: day, start time, and end time . Config blocks are documented below. Config blocks are documented below. * `description` - Description of the Hours of Operation. -* `hours_of_operation_arn` - (**Deprecated**) ARN of the Hours of Operation. * `hours_of_operation_id` - The identifier for the hours of operation. * `instance_id` - Identifier of the hosting Amazon Connect Instance. * `name` - Name of the Hours of Operation. diff --git a/website/docs/guides/version-5-upgrade.html.md b/website/docs/guides/version-5-upgrade.html.md index c3b3e578bb41..c56cb20f8c7f 100644 --- a/website/docs/guides/version-5-upgrade.html.md +++ b/website/docs/guides/version-5-upgrade.html.md @@ -20,6 +20,7 @@ Upgrade topics: - [Provider Arguments](#provider-arguments) - [Default Tags](#default-tags) - [Data Source: aws_api_gateway_rest_api](#data-source-aws_api_gateway_rest_api) +- [Data Source: aws_connect_hours_of_operation](#resource-aws_connect_hours_of_operation) - [Data Source: aws_identitystore_group](#data-source-aws_identitystore_group) - [Data Source: aws_identitystore_user](#data-source-aws_identitystore_user) - [Data Source: aws_redshift_service_account](#data-source-aws_redshift_service_account) @@ -183,6 +184,10 @@ The `statement.rule_group_reference_statement.rule_action_override` attribute ha The `minimum_compression_size` attribute is now a String type, allowing it to be computed when set via the `body` attribute. +## Data Source: aws_connect_hours_of_operation + +The `hours_of_operation_arn` attribute has been removed. + ## Data Source: aws_identitystore_group The `filter` argument has been removed. From 4ddfcad08b04b391a782bb6f2471bfd95228bfdb Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Fri, 19 May 2023 08:33:16 -0400 Subject: [PATCH 3/3] Correct CHANGELOG entry file name. --- .changelog/{#####.txt => 31484.txt} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .changelog/{#####.txt => 31484.txt} (100%) diff --git a/.changelog/#####.txt b/.changelog/31484.txt similarity index 100% rename from .changelog/#####.txt rename to .changelog/31484.txt