From 393a402031d4c49d61a59d52f0eb8c7eb9131f69 Mon Sep 17 00:00:00 2001 From: shichangkuo Date: Tue, 26 Dec 2023 20:51:50 +0800 Subject: [PATCH] chore: update docs and acceptance tests of ELB (#1083) * docs: normalize FlexibleEngine in docs * chore: deprecate apig vpc channel resource * chore: rename dedicated elb logtank and security policy resources --- docs/data-sources/apig_environments.md | 2 +- docs/data-sources/elb_loadbalancers.md | 2 +- docs/resources/apig_api.md | 2 +- docs/resources/apig_api_publishment.md | 2 +- docs/resources/apig_custom_authorizer.md | 2 +- docs/resources/apig_environment.md | 2 +- docs/resources/apig_group.md | 2 +- docs/resources/apig_instance.md | 2 +- docs/resources/apig_response.md | 2 +- docs/resources/apig_throttling_policy.md | 2 +- .../apig_throttling_policy_associate.md | 2 +- docs/resources/apig_vpc_channel.md | 6 ++++-- docs/resources/cce_namespace.md | 2 +- docs/resources/cce_pvc.md | 2 +- docs/resources/cse_microservice.md | 2 +- docs/resources/cse_microservice_engine.md | 2 +- docs/resources/cse_microservice_instance.md | 2 +- docs/resources/dli_database.md | 2 +- docs/resources/dli_flinksql_job.md | 2 +- docs/resources/dli_package.md | 2 +- docs/resources/dli_spark_job.md | 2 +- docs/resources/dli_table.md | 2 +- docs/resources/drs_job.md | 2 +- .../{lb_logtank_v3.md => elb_logtank.md} | 8 ++++---- ...ty_policy_v3.md => elb_security_policy.md} | 10 +++++----- docs/resources/modelarts_dataset.md | 2 +- docs/resources/modelarts_dataset_version.md | 2 +- docs/resources/rds_account.md | 2 +- docs/resources/rds_database.md | 2 +- docs/resources/rds_database_privilege.md | 2 +- docs/resources/vpc_route.md | 2 +- docs/resources/vpc_route_table.md | 2 +- docs/resources/waf_dedicated_certificate.md | 2 +- docs/resources/waf_dedicated_domain.md | 2 +- docs/resources/waf_dedicated_instance.md | 2 +- docs/resources/waf_dedicated_policy.md | 2 +- ...source_flexibleengine_elb_logtank_test.go} | 12 +++++------ ...lexibleengine_elb_security_policy_test.go} | 20 +++++++++---------- flexibleengine/provider.go | 17 ++++++++-------- 39 files changed, 70 insertions(+), 69 deletions(-) rename docs/resources/{lb_logtank_v3.md => elb_logtank.md} (82%) rename docs/resources/{lb_security_policy_v3.md => elb_security_policy.md} (90%) rename flexibleengine/acceptance/{resource_flexibleengine_lb_logtank_v3_test.go => resource_flexibleengine_elb_logtank_test.go} (92%) rename flexibleengine/acceptance/{resource_flexibleengine_lb_security_policy_v3_test.go => resource_flexibleengine_elb_security_policy_test.go} (85%) diff --git a/docs/data-sources/apig_environments.md b/docs/data-sources/apig_environments.md index f9cffff5a..7bd26656f 100644 --- a/docs/data-sources/apig_environments.md +++ b/docs/data-sources/apig_environments.md @@ -4,7 +4,7 @@ subcategory: "API Gateway (Dedicated APIG)" # flexibleengine_apig_environments -Use this data source to query the environment list under the APIG instance within Flexibleengine. +Use this data source to query the environment list under the APIG instance within FlexibleEngine. ## Example Usage diff --git a/docs/data-sources/elb_loadbalancers.md b/docs/data-sources/elb_loadbalancers.md index 39600317f..0081b3ebf 100644 --- a/docs/data-sources/elb_loadbalancers.md +++ b/docs/data-sources/elb_loadbalancers.md @@ -1,5 +1,5 @@ --- -subcategory: Dedicated Load Balance (Dedicated ELB) +subcategory: "Elastic Load Balance (Dedicated ELB)" --- # flexibleengine_elb_loadbalancers diff --git a/docs/resources/apig_api.md b/docs/resources/apig_api.md index 6ee472873..237ad5c0d 100644 --- a/docs/resources/apig_api.md +++ b/docs/resources/apig_api.md @@ -6,7 +6,7 @@ page_title: "flexibleengine_apig_api" # flexibleengine_apig_api -Manages an APIG API resource within Flexibleengine. +Manages an APIG API resource within FlexibleEngine. ## Example Usage diff --git a/docs/resources/apig_api_publishment.md b/docs/resources/apig_api_publishment.md index 6c5599dbc..79869bb5d 100644 --- a/docs/resources/apig_api_publishment.md +++ b/docs/resources/apig_api_publishment.md @@ -6,7 +6,7 @@ page_title: "flexibleengine_apig_api_publishment" # flexibleengine_apig_api_publishment -API publish Management within Flexibleengine. +API publish Management within FlexibleEngine. ~> If you republish on the same environment or switch versions through other ways (such as console) after the API is published through terraform, the current resource attributes will be affected, resulting in data inconsistency. diff --git a/docs/resources/apig_custom_authorizer.md b/docs/resources/apig_custom_authorizer.md index 16da68240..a617b80fa 100644 --- a/docs/resources/apig_custom_authorizer.md +++ b/docs/resources/apig_custom_authorizer.md @@ -6,7 +6,7 @@ page_title: "flexibleengine_apig_custom_authorizer" # flexibleengine_apig_custom_authorizer -Manages an APIG custom authorizer resource within Flexibleengine. +Manages an APIG custom authorizer resource within FlexibleEngine. ## Example Usage diff --git a/docs/resources/apig_environment.md b/docs/resources/apig_environment.md index 0a1e866a4..3a3623f81 100644 --- a/docs/resources/apig_environment.md +++ b/docs/resources/apig_environment.md @@ -6,7 +6,7 @@ page_title: "flexibleengine_apig_environment" # flexibleengine_apig_environment -Manages an APIG environment resource within Flexibleengine. +Manages an APIG environment resource within FlexibleEngine. ## Example Usage diff --git a/docs/resources/apig_group.md b/docs/resources/apig_group.md index 907aaa8fc..d47bc4aa0 100644 --- a/docs/resources/apig_group.md +++ b/docs/resources/apig_group.md @@ -6,7 +6,7 @@ page_title: "flexibleengine_apig_group" # flexibleengine_apig_group -Manages an APIG (API) group resource within Flexibleengine. +Manages an APIG (API) group resource within FlexibleEngine. ## Example Usage diff --git a/docs/resources/apig_instance.md b/docs/resources/apig_instance.md index 257248fc5..234b3190f 100644 --- a/docs/resources/apig_instance.md +++ b/docs/resources/apig_instance.md @@ -6,7 +6,7 @@ page_title: "flexibleengine_apig_instance" # flexibleengine_apig_instance -Manages an APIG dedicated instance resource within Flexibleengine. +Manages an APIG dedicated instance resource within FlexibleEngine. ## Example Usage diff --git a/docs/resources/apig_response.md b/docs/resources/apig_response.md index 8fb6ad5f4..7b2fa90c0 100644 --- a/docs/resources/apig_response.md +++ b/docs/resources/apig_response.md @@ -6,7 +6,7 @@ page_title: "flexibleengine_apig_response" # flexibleengine_apig_response -Manages an APIG (API) custom response resource within Flexibleengine. +Manages an APIG (API) custom response resource within FlexibleEngine. ## Example Usage diff --git a/docs/resources/apig_throttling_policy.md b/docs/resources/apig_throttling_policy.md index e6b3f8606..c92af564d 100644 --- a/docs/resources/apig_throttling_policy.md +++ b/docs/resources/apig_throttling_policy.md @@ -6,7 +6,7 @@ page_title: "flexibleengine_apig_throttling_policy" # flexibleengine_apig_throttling_policy -Manages an APIG (API) throttling policy resource within Flexibleengine. +Manages an APIG (API) throttling policy resource within FlexibleEngine. ## Example Usage diff --git a/docs/resources/apig_throttling_policy_associate.md b/docs/resources/apig_throttling_policy_associate.md index 1b06a482b..7ca5618c9 100644 --- a/docs/resources/apig_throttling_policy_associate.md +++ b/docs/resources/apig_throttling_policy_associate.md @@ -6,7 +6,7 @@ page_title: "flexibleengine_apig_throttling_policy_associate" # flexibleengine_apig_throttling_policy_associate -Use this resource to bind the APIs to the throttling policy within Flexibleengine. +Use this resource to bind the APIs to the throttling policy within FlexibleEngine. ## Example Usage diff --git a/docs/resources/apig_vpc_channel.md b/docs/resources/apig_vpc_channel.md index 877bc1cc0..989293ed8 100644 --- a/docs/resources/apig_vpc_channel.md +++ b/docs/resources/apig_vpc_channel.md @@ -1,12 +1,14 @@ --- -subcategory: "API Gateway (Dedicated APIG)" +subcategory: "Deprecated" description: "" page_title: "flexibleengine_apig_vpc_channel" --- # flexibleengine_apig_vpc_channel -Manages a VPC channel resource within Flexibleengine. +!> **WARNING:** It has been deprecated. + +Manages a VPC channel resource within FlexibleEngine. ## Example Usage diff --git a/docs/resources/cce_namespace.md b/docs/resources/cce_namespace.md index 273f616c6..57a30f5eb 100644 --- a/docs/resources/cce_namespace.md +++ b/docs/resources/cce_namespace.md @@ -6,7 +6,7 @@ page_title: "flexibleengine_cce_namespace" # flexibleengine_cce_namespace -Manages a CCE namespace resource within Flexibleengine. +Manages a CCE namespace resource within FlexibleEngine. -> **NOTE:** Currently, there is an ongoing certificate issue regarding the namespace management APIs. Please set `insecure = true` in provider block to ignore SSL certificate verification. diff --git a/docs/resources/cce_pvc.md b/docs/resources/cce_pvc.md index ea3666890..4454ac7e7 100644 --- a/docs/resources/cce_pvc.md +++ b/docs/resources/cce_pvc.md @@ -6,7 +6,7 @@ page_title: "flexibleengine_cce_pvc" # flexibleengine_cce_pvc -Manages a CCE Persistent Volume Claim resource within Flexibleengine. +Manages a CCE Persistent Volume Claim resource within FlexibleEngine. -> **NOTE:** Currently, there is an ongoing certificate issue regarding the PVC management APIs. Please set `insecure = true` in provider block to ignore SSL certificate verification. diff --git a/docs/resources/cse_microservice.md b/docs/resources/cse_microservice.md index 7610bf291..79d9a0422 100644 --- a/docs/resources/cse_microservice.md +++ b/docs/resources/cse_microservice.md @@ -6,7 +6,7 @@ page_title: "flexibleengine_cse_microservice" # flexibleengine_cse_microservice -Manages a dedicated microservice resource within Flexibleengine. +Manages a dedicated microservice resource within FlexibleEngine. -> When deleting a microservice, all instances under it will also be deleted together. diff --git a/docs/resources/cse_microservice_engine.md b/docs/resources/cse_microservice_engine.md index e0b05425f..2d5f04d0d 100644 --- a/docs/resources/cse_microservice_engine.md +++ b/docs/resources/cse_microservice_engine.md @@ -6,7 +6,7 @@ page_title: "flexibleengine_cse_microservice_engine" # flexibleengine_cse_microservice_engine -Manages a dedicated microservice engine resource within Flexibleengine. +Manages a dedicated microservice engine resource within FlexibleEngine. ## Example Usage diff --git a/docs/resources/cse_microservice_instance.md b/docs/resources/cse_microservice_instance.md index 63d6404ae..672606fa5 100644 --- a/docs/resources/cse_microservice_instance.md +++ b/docs/resources/cse_microservice_instance.md @@ -6,7 +6,7 @@ page_title: "flexibleengine_cse_microservice_instance" # flexibleengine_cse_microservice_instance -Manages a dedicated microservice instance resource within Flexibleengine. +Manages a dedicated microservice instance resource within FlexibleEngine. ## Example Usage diff --git a/docs/resources/dli_database.md b/docs/resources/dli_database.md index 6387f77f1..25d2d3be8 100644 --- a/docs/resources/dli_database.md +++ b/docs/resources/dli_database.md @@ -6,7 +6,7 @@ page_title: "flexibleengine_dli_database" # flexibleengine_dli_database -Manages DLI SQL database resource within Flexibleengine. +Manages DLI SQL database resource within FlexibleEngine. ## Example Usage diff --git a/docs/resources/dli_flinksql_job.md b/docs/resources/dli_flinksql_job.md index 103927b6d..34163020c 100644 --- a/docs/resources/dli_flinksql_job.md +++ b/docs/resources/dli_flinksql_job.md @@ -6,7 +6,7 @@ page_title: "flexibleengine_dli_flinksql_job" # flexibleengine_dli_flinksql_job -Manages a flink sql job resource within Flexibleengine DLI. +Manages a flink sql job resource within FlexibleEngine DLI. ## Example Usage diff --git a/docs/resources/dli_package.md b/docs/resources/dli_package.md index 86509c910..d5349f913 100644 --- a/docs/resources/dli_package.md +++ b/docs/resources/dli_package.md @@ -6,7 +6,7 @@ page_title: "flexibleengine_dli_package" # flexibleengine_dli_package -Manages DLI package resource within Flexibleengine +Manages DLI package resource within FlexibleEngine ## Example Usage diff --git a/docs/resources/dli_spark_job.md b/docs/resources/dli_spark_job.md index dda98a6bd..027193d45 100644 --- a/docs/resources/dli_spark_job.md +++ b/docs/resources/dli_spark_job.md @@ -6,7 +6,7 @@ page_title: "flexibleengine_dli_spark_job" # flexibleengine_dli_spark_job -Manages spark job resource of DLI within Flexibleengine +Manages spark job resource of DLI within FlexibleEngine ## Example Usage diff --git a/docs/resources/dli_table.md b/docs/resources/dli_table.md index 44e38b999..5bb55d7ba 100644 --- a/docs/resources/dli_table.md +++ b/docs/resources/dli_table.md @@ -6,7 +6,7 @@ page_title: "flexibleengine_dli_table" # flexibleengine_dli_table -Manages DLI Table resource within Flexibleengine +Manages DLI Table resource within FlexibleEngine ## Example Usage diff --git a/docs/resources/drs_job.md b/docs/resources/drs_job.md index b52b0fdab..d0354609d 100644 --- a/docs/resources/drs_job.md +++ b/docs/resources/drs_job.md @@ -6,7 +6,7 @@ page_title: "flexibleengine_drs_job" # flexibleengine_drs_job -Manages DRS job resource within Flexibleengine. +Manages DRS job resource within FlexibleEngine. ## Example Usage diff --git a/docs/resources/lb_logtank_v3.md b/docs/resources/elb_logtank.md similarity index 82% rename from docs/resources/lb_logtank_v3.md rename to docs/resources/elb_logtank.md index 01e44878c..3215bad3e 100644 --- a/docs/resources/lb_logtank_v3.md +++ b/docs/resources/elb_logtank.md @@ -1,8 +1,8 @@ --- -subcategory: "Dedicated Load Balance (Dedicated ELB)" +subcategory: "Elastic Load Balance (Dedicated ELB)" --- -# flexibleengine_lb_logtank_v3 +# flexibleengine_elb_logtank Manage an LB logtank resource within FlexibleEngine. @@ -13,7 +13,7 @@ variable "loadbalancer_id" {} variable "group_id" {} variable "topic_id" {} -resource "flexibleengine_lb_logtank_v3" "test" { +resource "flexibleengine_elb_logtank" "test" { loadbalancer_id = var.loadbalancer_id log_group_id = var.group_id log_topic_id = var.topic_id @@ -45,5 +45,5 @@ In addition to all arguments above, the following attributes are exported: LB logtank can be imported using the logtank ID, e.g. ```bash -terraform import flexibleengine_lb_logtank_v3.test 2f148a75-acd3-4ce7-8f63-d5c9fadab3a0 +terraform import flexibleengine_elb_logtank.test 2f148a75-acd3-4ce7-8f63-d5c9fadab3a0 ``` diff --git a/docs/resources/lb_security_policy_v3.md b/docs/resources/elb_security_policy.md similarity index 90% rename from docs/resources/lb_security_policy_v3.md rename to docs/resources/elb_security_policy.md index 43c934d91..b6a1287a7 100644 --- a/docs/resources/lb_security_policy_v3.md +++ b/docs/resources/elb_security_policy.md @@ -1,15 +1,15 @@ --- -subcategory: "Dedicated Load Balance (Dedicated ELB)" +subcategory: "Elastic Load Balance (Dedicated ELB)" --- -# flexibleengine_lb_security_policy_v3 +# flexibleengine_elb_security_policy -Manages an ELB security policy resource within Flexibleengine. +Manages an ELB security policy resource within FlexibleEngine. ## Example Usage ```hcl -resource "flexibleengine_lb_security_policy_v3" "test" { +resource "flexibleengine_elb_security_policy" "test" { name = "security_policy_test" description = "this is a security policy" protocols = ["TLSv1", "TLSv1.1", "TLSv1.2", "TLSv1.3"] @@ -70,5 +70,5 @@ The `listeners` block supports: The elb security policies can be imported using the `id`, e.g. ```bash -terraform import flexibleengine_lb_security_policy_v3.test 0ce123456a00f2591fabc00385ff1234 +terraform import flexibleengine_elb_security_policy.test 0ce123456a00f2591fabc00385ff1234 ``` diff --git a/docs/resources/modelarts_dataset.md b/docs/resources/modelarts_dataset.md index afa64b8b0..f2ad8ec82 100644 --- a/docs/resources/modelarts_dataset.md +++ b/docs/resources/modelarts_dataset.md @@ -6,7 +6,7 @@ page_title: "flexibleengine_modelarts_dataset" # flexibleengine_modelarts_dataset -Manages ModelArts dataset resource within Flexibleengine. +Manages ModelArts dataset resource within FlexibleEngine. ## Example Usage diff --git a/docs/resources/modelarts_dataset_version.md b/docs/resources/modelarts_dataset_version.md index c3081dc7d..efbebff97 100644 --- a/docs/resources/modelarts_dataset_version.md +++ b/docs/resources/modelarts_dataset_version.md @@ -6,7 +6,7 @@ page_title: "flexibleengine_modelarts_dataset_version" # flexibleengine_modelarts_dataset_version -Manages ModelArts dataset version resource within Flexibleengine. +Manages ModelArts dataset version resource within FlexibleEngine. ## Example Usage diff --git a/docs/resources/rds_account.md b/docs/resources/rds_account.md index 39eafd3f3..c39dec5ca 100644 --- a/docs/resources/rds_account.md +++ b/docs/resources/rds_account.md @@ -6,7 +6,7 @@ page_title: "flexibleengine_rds_account" # flexibleengine_rds_account -Manages RDS Mysql account resource within Flexibleengine. +Manages RDS Mysql account resource within FlexibleEngine. ## Example Usage diff --git a/docs/resources/rds_database.md b/docs/resources/rds_database.md index 0c424f3c9..0d60b8ce1 100644 --- a/docs/resources/rds_database.md +++ b/docs/resources/rds_database.md @@ -6,7 +6,7 @@ page_title: "flexibleengine_rds_database" # flexibleengine_rds_database -Manages RDS Mysql database resource within Flexibleengine. +Manages RDS Mysql database resource within FlexibleEngine. ## Example Usage diff --git a/docs/resources/rds_database_privilege.md b/docs/resources/rds_database_privilege.md index b08d22daa..2f72eb514 100644 --- a/docs/resources/rds_database_privilege.md +++ b/docs/resources/rds_database_privilege.md @@ -6,7 +6,7 @@ page_title: "flexibleengine_rds_database_privilege" # flexibleengine_rds_database_privilege -Manages RDS Mysql database privilege resource within Flexibleengine. +Manages RDS Mysql database privilege resource within FlexibleEngine. ## Example Usage diff --git a/docs/resources/vpc_route.md b/docs/resources/vpc_route.md index 35cd2acd7..e83a5e4f2 100644 --- a/docs/resources/vpc_route.md +++ b/docs/resources/vpc_route.md @@ -6,7 +6,7 @@ page_title: "flexibleengine_vpc_route" # flexibleengine_vpc_route -Manages a VPC route resource within Flexibleengine. +Manages a VPC route resource within FlexibleEngine. ## Example Usage diff --git a/docs/resources/vpc_route_table.md b/docs/resources/vpc_route_table.md index dd07a054b..dec92fe53 100644 --- a/docs/resources/vpc_route_table.md +++ b/docs/resources/vpc_route_table.md @@ -6,7 +6,7 @@ page_title: "flexibleengine_vpc_route_table" # flexibleengine_vpc_route_table -Manages a VPC custom route table resource within Flexibleengine. +Manages a VPC custom route table resource within FlexibleEngine. -> **NOTE:** To use a custom route table, you need to submit a service ticket to increase quota. diff --git a/docs/resources/waf_dedicated_certificate.md b/docs/resources/waf_dedicated_certificate.md index 4d2aa6006..54f8f5ce1 100644 --- a/docs/resources/waf_dedicated_certificate.md +++ b/docs/resources/waf_dedicated_certificate.md @@ -6,7 +6,7 @@ page_title: "flexibleengine_waf_dedicated_certificate" # flexibleengine_waf_dedicated_certificate -Manages a WAF dedicated certificate resource within Flexibleengine. +Manages a WAF dedicated certificate resource within FlexibleEngine. ## Example Usage diff --git a/docs/resources/waf_dedicated_domain.md b/docs/resources/waf_dedicated_domain.md index f392e5418..8177a6e07 100644 --- a/docs/resources/waf_dedicated_domain.md +++ b/docs/resources/waf_dedicated_domain.md @@ -6,7 +6,7 @@ page_title: "flexibleengine_waf_dedicated_domain" # flexibleengine_waf_dedicated_domain -Manages a dedicated mode domain resource within Flexibleengine. +Manages a dedicated mode domain resource within FlexibleEngine. -> **NOTE:** All WAF resources depend on WAF instances, and the WAF instances need to be purchased before they can be used. The dedicated mode domain name resource can be used in Dedicated Mode and ELB Mode. diff --git a/docs/resources/waf_dedicated_instance.md b/docs/resources/waf_dedicated_instance.md index 58b83e96a..c6ce4bf8a 100644 --- a/docs/resources/waf_dedicated_instance.md +++ b/docs/resources/waf_dedicated_instance.md @@ -6,7 +6,7 @@ page_title: "flexibleengine_waf_dedicated_instance" # flexibleengine_waf_dedicated_instance -Manages a WAF dedicated instance resource within Flexibleengine. +Manages a WAF dedicated instance resource within FlexibleEngine. ## Example Usage diff --git a/docs/resources/waf_dedicated_policy.md b/docs/resources/waf_dedicated_policy.md index 939bbb61e..dc97f3afc 100644 --- a/docs/resources/waf_dedicated_policy.md +++ b/docs/resources/waf_dedicated_policy.md @@ -6,7 +6,7 @@ page_title: "flexibleengine_waf_dedicated_policy" # flexibleengine_waf_dedicated_policy -Manages a WAF dedicated policy resource within Flexibleengine. +Manages a WAF dedicated policy resource within FlexibleEngine. ## Example Usage diff --git a/flexibleengine/acceptance/resource_flexibleengine_lb_logtank_v3_test.go b/flexibleengine/acceptance/resource_flexibleengine_elb_logtank_test.go similarity index 92% rename from flexibleengine/acceptance/resource_flexibleengine_lb_logtank_v3_test.go rename to flexibleengine/acceptance/resource_flexibleengine_elb_logtank_test.go index c7e4991c9..3c42036bf 100644 --- a/flexibleengine/acceptance/resource_flexibleengine_lb_logtank_v3_test.go +++ b/flexibleengine/acceptance/resource_flexibleengine_elb_logtank_test.go @@ -13,7 +13,7 @@ import ( "github.com/huaweicloud/terraform-provider-huaweicloud/huaweicloud/services/acceptance" ) -func getELBLogTankResourceFunc(c *config.Config, state *terraform.ResourceState) (interface{}, error) { +func getElbLogTankResourceFunc(c *config.Config, state *terraform.ResourceState) (interface{}, error) { client, err := c.ElbV3Client(OS_REGION_NAME) if err != nil { return nil, fmt.Errorf("error creating ELB client: %s", err) @@ -24,12 +24,12 @@ func getELBLogTankResourceFunc(c *config.Config, state *terraform.ResourceState) func TestAccElbLogTank_basic(t *testing.T) { var logTanks logtanks.LogTank rName := acceptance.RandomAccResourceNameWithDash() - resourceName := "flexibleengine_lb_logtank_v3.test" + resourceName := "flexibleengine_elb_logtank.test" rc := acceptance.InitResourceCheck( resourceName, &logTanks, - getELBLogTankResourceFunc, + getElbLogTankResourceFunc, ) resource.ParallelTest(t, resource.TestCase{ @@ -94,7 +94,7 @@ resource "flexibleengine_lb_loadbalancer_v3" "test" { } resource "flexibleengine_lts_group" "%[2]s" { - group_name = "%[2]s" + group_name = "%[2]s" } resource "flexibleengine_lts_topic" "%[2]s" { @@ -108,7 +108,7 @@ func testAccElbLogTankConfig_basic(rName string) string { return fmt.Sprintf(` %s -resource "flexibleengine_lb_logtank_v3" "test" { +resource "flexibleengine_elb_logtank" "test" { loadbalancer_id = flexibleengine_lb_loadbalancer_v3.test.id log_group_id = flexibleengine_lts_group.test.id log_topic_id = flexibleengine_lts_topic.test.id @@ -120,7 +120,7 @@ func testAccElbLogTankConfig_update(rName string) string { return fmt.Sprintf(` %s -resource "flexibleengine_lb_logtank_v3" "test" { +resource "flexibleengine_elb_logtank" "test" { loadbalancer_id = flexibleengine_lb_loadbalancer_v3.test.id log_group_id = flexibleengine_lts_group.test_update.id log_topic_id = flexibleengine_lts_topic.test_update.id diff --git a/flexibleengine/acceptance/resource_flexibleengine_lb_security_policy_v3_test.go b/flexibleengine/acceptance/resource_flexibleengine_elb_security_policy_test.go similarity index 85% rename from flexibleengine/acceptance/resource_flexibleengine_lb_security_policy_v3_test.go rename to flexibleengine/acceptance/resource_flexibleengine_elb_security_policy_test.go index 77ea77c0a..84d31977a 100644 --- a/flexibleengine/acceptance/resource_flexibleengine_lb_security_policy_v3_test.go +++ b/flexibleengine/acceptance/resource_flexibleengine_elb_security_policy_test.go @@ -15,7 +15,7 @@ import ( "github.com/huaweicloud/terraform-provider-huaweicloud/huaweicloud/utils" ) -func getSecurityPoliciesV3ResourceFunc(cfg *config.Config, state *terraform.ResourceState) (interface{}, error) { +func getElbSecurityPolicieResourceFunc(cfg *config.Config, state *terraform.ResourceState) (interface{}, error) { region := OS_REGION_NAME // getSecurityPolicy: Query the ELB security policy var ( @@ -44,16 +44,16 @@ func getSecurityPoliciesV3ResourceFunc(cfg *config.Config, state *terraform.Reso return utils.FlattenResponse(getSecurityPolicyResp) } -func TestAccSecurityPoliciesV3_basic(t *testing.T) { +func TestElbAccSecurityPolicie_basic(t *testing.T) { var obj interface{} name := acceptance.RandomAccResourceName() - rName := "flexibleengine_lb_security_policy_v3.test" + rName := "flexibleengine_elb_security_policy.test" rc := acceptance.InitResourceCheck( rName, &obj, - getSecurityPoliciesV3ResourceFunc, + getElbSecurityPolicieResourceFunc, ) resource.ParallelTest(t, resource.TestCase{ @@ -62,7 +62,7 @@ func TestAccSecurityPoliciesV3_basic(t *testing.T) { CheckDestroy: rc.CheckResourceDestroy(), Steps: []resource.TestStep{ { - Config: testSecurityPoliciesV3_basic(name), + Config: testElbSecurityPolicie_basic(name), Check: resource.ComposeTestCheckFunc( rc.CheckResourceExists(), resource.TestCheckResourceAttr(rName, "protocols.0", "TLSv1"), @@ -72,7 +72,7 @@ func TestAccSecurityPoliciesV3_basic(t *testing.T) { ), }, { - Config: testSecurityPoliciesV3_basic_update(name), + Config: testElbSecurityPolicie_update(name), Check: resource.ComposeTestCheckFunc( rc.CheckResourceExists(), resource.TestCheckResourceAttr(rName, "protocols.0", "TLSv1.2"), @@ -89,9 +89,9 @@ func TestAccSecurityPoliciesV3_basic(t *testing.T) { }) } -func testSecurityPoliciesV3_basic(name string) string { +func testElbSecurityPolicie_basic(name string) string { return fmt.Sprintf(` -resource "flexibleengine_lb_security_policy_v3" "test" { +resource "flexibleengine_elb_security_policy" "test" { protocols = [ "TLSv1", "TLSv1.1", @@ -109,9 +109,9 @@ resource "flexibleengine_lb_security_policy_v3" "test" { `, name) } -func testSecurityPoliciesV3_basic_update(name string) string { +func testElbSecurityPolicie_update(name string) string { return fmt.Sprintf(` -resource "flexibleengine_lb_security_policy_v3" "test" { +resource "flexibleengine_elb_security_policy" "test" { protocols = [ "TLSv1.2", ] diff --git a/flexibleengine/provider.go b/flexibleengine/provider.go index e8185c2f3..22835155e 100644 --- a/flexibleengine/provider.go +++ b/flexibleengine/provider.go @@ -541,8 +541,6 @@ func Provider() *schema.Provider { "flexibleengine_dds_database_user": dds.ResourceDatabaseUser(), "flexibleengine_dds_parameter_template": dds.ResourceDdsParameterTemplate(), - "flexibleengine_apig_vpc_channel": deprecated.ResourceApigVpcChannelV2(), - "flexibleengine_dms_kafka_user": dms.ResourceDmsKafkaUser(), "flexibleengine_dms_rocketmq_instance": dms.ResourceDmsRocketMQInstance(), "flexibleengine_dms_rocketmq_consumer_group": dms.ResourceDmsRocketMQConsumerGroup(), @@ -577,8 +575,6 @@ func Provider() *schema.Provider { "flexibleengine_kms_grant": dew.ResourceKmsGrant(), - "flexibleengine_lb_security_policy_v3": elb.ResourceSecurityPolicy(), - "flexibleengine_nat_private_dnat_rule": nat.ResourcePrivateDnatRule(), "flexibleengine_nat_private_gateway": nat.ResourcePrivateGateway(), "flexibleengine_nat_private_snat_rule": nat.ResourcePrivateSnatRule(), @@ -613,11 +609,12 @@ func Provider() *schema.Provider { "flexibleengine_waf_dedicated_certificate": ResourceWafDedicatedCertificateV1(), "flexibleengine_waf_dedicated_domain": ResourceWafDedicatedDomainV1(), - "flexibleengine_lb_loadbalancer_v3": elb.ResourceLoadBalancerV3(), - "flexibleengine_lb_logtank_v3": elb.ResourceLogTank(), - "flexibleengine_lb_listener_v3": elb.ResourceListenerV3(), - "flexibleengine_elb_certificate": elb.ResourceCertificateV3(), - "flexibleengine_elb_ipgroup": elb.ResourceIpGroupV3(), + "flexibleengine_lb_loadbalancer_v3": elb.ResourceLoadBalancerV3(), + "flexibleengine_lb_listener_v3": elb.ResourceListenerV3(), + "flexibleengine_elb_certificate": elb.ResourceCertificateV3(), + "flexibleengine_elb_ipgroup": elb.ResourceIpGroupV3(), + "flexibleengine_elb_security_policy": elb.ResourceSecurityPolicy(), + "flexibleengine_elb_logtank": elb.ResourceLogTank(), "flexibleengine_modelarts_dataset": modelarts.ResourceDataset(), "flexibleengine_modelarts_dataset_version": modelarts.ResourceDatasetVersion(), @@ -660,6 +657,8 @@ func Provider() *schema.Provider { "flexibleengine_networking_router_v2": resourceNetworkingRouterV2(), "flexibleengine_networking_router_interface_v2": resourceNetworkingRouterInterfaceV2(), "flexibleengine_networking_router_route_v2": resourceNetworkingRouterRouteV2(), + + "flexibleengine_apig_vpc_channel": deprecated.ResourceApigVpcChannelV2(), }, // configuring the provider ConfigureContextFunc: configureProvider,