From 3b95f8b2e99f345f85e2eda7d6791e2441ea2c3c Mon Sep 17 00:00:00 2001 From: ArthurEatsCode <145002626+ArthurEatsCode@users.noreply.github.com> Date: Tue, 10 Oct 2023 16:27:28 +0800 Subject: [PATCH] Bugfix: Add document for st-alicloud_aliadb_resource_group_bind_user (#33) Co-authored-by: sekhengchan@gmail.com --- README.md | 4 +++ alicloud/provider.go | 11 ++++--- .../aliadb_resource_group_bind_user.md | 30 +++++++++++++++++++ 3 files changed, 41 insertions(+), 4 deletions(-) create mode 100644 docs/resources/aliadb_resource_group_bind_user.md diff --git a/README.md b/README.md index 5bfd90c..c3f5613 100644 --- a/README.md +++ b/README.md @@ -108,6 +108,10 @@ scenario. The reason behind every resources and data sources are stated as below This resource is designed to associate a SSL certificate to a website/domain before being added into Anti-DDoS as AliCloud Terraform Provider does not support the SSL binding operation. +- **st-alicloud_aliadb_resource_group_bind_user** + + This resource is to bind user to a resource group. Binding user to a resource group allow user access to different resource groups. + - **st-alicloud_emr_metric_auto_scaling_rules** This resource is designed to create auto scaling rules for AliCloud E-MapReduce cluster as the provider's resource [*alicloud_emrv2_cluster*](https://registry.terraform.io/providers/aliyun/alicloud/latest/docs/resources/emrv2_cluster) diff --git a/alicloud/provider.go b/alicloud/provider.go index 5cef8c1..43cb359 100644 --- a/alicloud/provider.go +++ b/alicloud/provider.go @@ -295,16 +295,19 @@ func (p *alicloudProvider) Configure(ctx context.Context, req provider.Configure return } - // AliCloud ADB Client - adbClientConfig := clientCredentialsConfig - adbClientConfig.Endpoint = tea.String("adb.aliyuncs.com") - adbClient, err := alicloudAdbClient.NewClient(adbClientConfig) + // AliCloud ADB Client + adbClientConfig := clientCredentialsConfig + adbClientConfig.Endpoint = tea.String("adb.aliyuncs.com") + adbClient, err := alicloudAdbClient.NewClient(adbClientConfig) if err != nil { resp.Diagnostics.AddError( "Unable to Create AliCloud ADB API Client", "An unexpected error occurred when creating the AliCloud ADB API client. "+ "If the error is not clear, please contact the provider developers.\n\n"+ "AliCloud ADB Client Error: "+err.Error(), + ) + return + } // AliCloud EMR Client emrClientConfig := clientCredentialsConfig diff --git a/docs/resources/aliadb_resource_group_bind_user.md b/docs/resources/aliadb_resource_group_bind_user.md new file mode 100644 index 0000000..0712bc2 --- /dev/null +++ b/docs/resources/aliadb_resource_group_bind_user.md @@ -0,0 +1,30 @@ +--- +# generated by https://github.com/hashicorp/terraform-plugin-docs +page_title: "st-alicloud_aliadb_resource_group_bind_user Resource - terraform-provider-st-alicloud" +subcategory: "" +description: |- + Provides a Aliadb resource group association resource. +--- + +# st-alicloud_aliadb_resource_group_bind_user (Resource) + +Provides a Aliadb resource group association resource. + +## Example Usage + +```terraform +resource "st-alicloud_aliadb_resource_group_bind_user" "bind_user" { + dbcluster_id = "am-3ns9eg3ntm1g7y0m3" + group_name = "TEST" + group_user = "dts" +} +``` + + +## Schema + +### Required + +- `dbcluster_id` (String) The ID of the AnalyticDB for MySQL Data Warehouse Edition (V3.0) cluster. +- `group_name` (String) The name of the resource group. +- `group_user` (String) The database account with which to associate the resource group.