Skip to content

Commit

Permalink
Bugfix: Add document for st-alicloud_aliadb_resource_group_bind_user (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
ArthurEatsCode and [email protected] authored Oct 10, 2023
1 parent a19c821 commit 3b95f8b
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 4 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
11 changes: 7 additions & 4 deletions alicloud/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
30 changes: 30 additions & 0 deletions docs/resources/aliadb_resource_group_bind_user.md
Original file line number Diff line number Diff line change
@@ -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 generated by tfplugindocs -->
## 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.

0 comments on commit 3b95f8b

Please sign in to comment.