From 847d043c6ef00d805a9ec12335880aa76331cff1 Mon Sep 17 00:00:00 2001 From: wangzepeng666 Date: Tue, 12 Sep 2023 16:32:49 +0800 Subject: [PATCH] docs(as/cbr/cse): processing Fields Referencing Huawei Cloud --- docs/data-sources/as_groups.md | 5 +++++ docs/resources/cbr_vault.md | 3 +++ docs/resources/cse_microservice_engine.md | 3 +++ .../data_source_flexibleengine_as_groups_test.go | 15 +++++++++++++++ 4 files changed, 26 insertions(+) diff --git a/docs/data-sources/as_groups.md b/docs/data-sources/as_groups.md index 794c9dbe..62200ee3 100644 --- a/docs/data-sources/as_groups.md +++ b/docs/data-sources/as_groups.md @@ -7,6 +7,8 @@ subcategory: "Auto Scaling (AS)" Use this data source to get a list of AS groups. ```hcl +variable "ep_id" {} + data "flexibleengine_as_groups" "groups" { } ``` @@ -30,6 +32,9 @@ The following arguments are supported: - **DELETING**: indicates that the AS group is being deleted. - **FREEZED**: indicates that the AS group has been frozen. +* `enterprise_project_id` - (Optional, String) Specifies the enterprise project id of the AS group. + Changing this will create a new resource. + ## Attribute Reference In addition to all arguments above, the following attributes are exported: diff --git a/docs/resources/cbr_vault.md b/docs/resources/cbr_vault.md index c759e1cd..939342c8 100644 --- a/docs/resources/cbr_vault.md +++ b/docs/resources/cbr_vault.md @@ -151,6 +151,9 @@ The following arguments are supported: + **disk** (EVS Disks) + **turbo** (SFS Turbo file systems) +* `enterprise_project_id` - (Optional, String, ForceNew) Specifies the enterprise project id of the cbr vault resource. + Changing this will create a new resource. + * `protection_type` - (Required, String, ForceNew) Specifies the protection type of the CBR vault. The valid values are **backup** and **replication**. Vaults of type **disk** don't support **replication**. Changing this will create a new vault. diff --git a/docs/resources/cse_microservice_engine.md b/docs/resources/cse_microservice_engine.md index d550134d..e0b05425 100644 --- a/docs/resources/cse_microservice_engine.md +++ b/docs/resources/cse_microservice_engine.md @@ -35,6 +35,9 @@ The following arguments are supported: The name must start with a letter and cannot end with a hyphen (-). Changing this will create a new engine. +* `enterprise_project_id` - (Optional, String, ForceNew) Specifies the enterprise project id of the cse microservice + engine resource. Changing this will create a new resource. + * `flavor` - (Required, String, ForceNew) Specifies the flavor of the dedicated microservice engine. Changing this will create a new engine. diff --git a/flexibleengine/acceptance/data_source_flexibleengine_as_groups_test.go b/flexibleengine/acceptance/data_source_flexibleengine_as_groups_test.go index 78c52faa..ccc50878 100644 --- a/flexibleengine/acceptance/data_source_flexibleengine_as_groups_test.go +++ b/flexibleengine/acceptance/data_source_flexibleengine_as_groups_test.go @@ -27,6 +27,12 @@ func TestAccDataSourceASGroup_basic(t *testing.T) { resource.TestCheckResourceAttr(dataSourceName, "groups.0.scaling_group_name", name), ), }, + { + Config: testAccDataSourceASGroup_enterpriseProjectId(name), + Check: resource.ComposeTestCheckFunc( + dc.CheckResourceExists(), + ), + }, }, }) } @@ -42,3 +48,12 @@ data "flexibleengine_as_groups" "groups" { } `, testASGroup_basic(name)) } + +func testAccDataSourceASGroup_enterpriseProjectId(name string) string { + return fmt.Sprintf(` +%s +data "flexibleengine_as_groups" "groups" { + enterprise_project_id = 0 +} +`, testASGroup_basic(name)) +}