From a623c91e0d6bb9602da455fa0db2d556bcea72e4 Mon Sep 17 00:00:00 2001 From: wuzhuanhong Date: Tue, 10 Sep 2024 20:10:38 +0800 Subject: [PATCH] fix(apig/group): remove the default value of the 'domain_access_enabled' (#5539) --- docs/resources/apig_group.md | 2 +- .../acceptance/apig/resource_huaweicloud_apig_group_test.go | 6 ++++++ .../services/apig/resource_huaweicloud_apig_group.go | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/docs/resources/apig_group.md b/docs/resources/apig_group.md index 74e134af69..f01505ae28 100644 --- a/docs/resources/apig_group.md +++ b/docs/resources/apig_group.md @@ -64,7 +64,7 @@ The following arguments are supported: Each API group can be associated with up to `5` domain names. * `domain_access_enabled` - (Optional, Bool) Specifies whether to use the debugging domain name to access the APIs - within the group. The default value is `true`. + within the group. The default value is `false`. * `force_destroy` - (Optional, Bool) Specifies whether to delete all sub-resources (for API) when deleting this group. Defaults to **false**. diff --git a/huaweicloud/services/acceptance/apig/resource_huaweicloud_apig_group_test.go b/huaweicloud/services/acceptance/apig/resource_huaweicloud_apig_group_test.go index dce1317391..c211e0f717 100644 --- a/huaweicloud/services/acceptance/apig/resource_huaweicloud_apig_group_test.go +++ b/huaweicloud/services/acceptance/apig/resource_huaweicloud_apig_group_test.go @@ -353,6 +353,12 @@ func TestAccGroup_withDomainAccess(t *testing.T) { resource.TestCheckResourceAttr(rNameWithDomainAccess, "domain_access_enabled", "true"), ), }, + { + ResourceName: rNameWithDomainAccess, + ImportState: true, + ImportStateVerify: true, + ImportStateIdFunc: testAccGroupImportStateFunc(rNameWithDomainAccess), + }, }, }) } diff --git a/huaweicloud/services/apig/resource_huaweicloud_apig_group.go b/huaweicloud/services/apig/resource_huaweicloud_apig_group.go index 32e1164e5b..ec512bea35 100644 --- a/huaweicloud/services/apig/resource_huaweicloud_apig_group.go +++ b/huaweicloud/services/apig/resource_huaweicloud_apig_group.go @@ -137,7 +137,7 @@ func ResourceApigGroupV2() *schema.Resource { "domain_access_enabled": { Type: schema.TypeBool, Optional: true, - Default: true, + Computed: true, Description: "Specifies whether to use the debugging domain name to access the APIs within the group.", }, "force_destroy": {