Skip to content

Commit

Permalink
add azure region to docs and private endpoint config validator (#49)
Browse files Browse the repository at this point in the history
  • Loading branch information
Kinzeng authored Mar 14, 2024
1 parent 5f48194 commit 4902c72
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 22 deletions.
7 changes: 4 additions & 3 deletions clickhouse/datasource.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,9 @@ import (
)

const (
CloudProviderGCP = "gcp"
CloudProviderAWS = "aws"
CloudProviderGCP = "gcp"
CloudProviderAzure = "azure"
)

// Ensure the implementation satisfies the desired interfaces.
Expand Down Expand Up @@ -50,10 +51,10 @@ func (d *privateEndpointConfigDataSource) Schema(ctx context.Context, req dataso
resp.Schema = schema.Schema{
Attributes: map[string]schema.Attribute{
"cloud_provider": schema.StringAttribute{
Description: "The cloud provider for the private endpoint. Valid values are 'aws' or 'gcp'.",
Description: "The cloud provider for the private endpoint. Valid values are 'aws', 'gcp', or 'azure'.",
Required: true,
Validators: []validator.String{
stringvalidator.OneOf(CloudProviderAWS, CloudProviderGCP),
stringvalidator.OneOf(CloudProviderAWS, CloudProviderGCP, CloudProviderAzure),
},
},
"region": schema.StringAttribute{
Expand Down
2 changes: 1 addition & 1 deletion clickhouse/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ func (r *ServiceResource) Schema(_ context.Context, _ resource.SchemaRequest, re
Sensitive: true,
},
"cloud_provider": schema.StringAttribute{
Description: "Cloud provider ('aws' or 'gcp') in which the service is deployed in.",
Description: "Cloud provider ('aws', 'gcp', or 'azure') in which the service is deployed in.",
Required: true,
},
"region": schema.StringAttribute{
Expand Down
10 changes: 2 additions & 8 deletions docs/data-sources/private_endpoint_config.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,25 +3,19 @@
page_title: "clickhouse_private_endpoint_config Data Source - clickhouse"
subcategory: ""
description: |-
---

# clickhouse_private_endpoint_config (Data Source)





<!-- schema generated by tfplugindocs -->

## Schema

### Required

- `cloud_provider` (String) The cloud provider for the private endpoint. Valid values are 'aws' or 'gcp'.
- `cloud_provider` (String) The cloud provider for the private endpoint. Valid values are 'aws', 'gcp', or 'azure'.
- `region` (String) The region for the private endpoint. Valid values are specific to the cloud provider i.e. us-east-2

### Read-Only

- `endpoint_service_id` (String) The ID of the private endpoint that is used to securely connect to ClickHouse. This is a read-only attribute.


15 changes: 5 additions & 10 deletions docs/resources/service.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,17 @@
page_title: "clickhouse_service Resource - clickhouse"
subcategory: ""
description: |-
---

# clickhouse_service (Resource)





<!-- schema generated by tfplugindocs -->

## Schema

### Required

- `cloud_provider` (String) Cloud provider ('aws' or 'gcp') in which the service is deployed in.
- `cloud_provider` (String) Cloud provider ('aws', 'gcp', or 'azure') in which the service is deployed in.
- `ip_access` (Attributes List) List of IP addresses allowed to access the service. (see [below for nested schema](#nestedatt--ip_access))
- `name` (String) User defined identifier for the service.
- `region` (String) Region within the cloud provider in which the service is deployed in.
Expand All @@ -43,6 +39,7 @@ description: |-
- `private_endpoint_config` (Attributes) Service config for private endpoints (see [below for nested schema](#nestedatt--private_endpoint_config))

<a id="nestedatt--ip_access"></a>

### Nested Schema for `ip_access`

Required:
Expand All @@ -53,8 +50,8 @@ Optional:

- `description` (String) Description of the IP address.


<a id="nestedatt--endpoints"></a>

### Nested Schema for `endpoints`

Read-Only:
Expand All @@ -63,13 +60,11 @@ Read-Only:
- `port` (Number) Endpoint port.
- `protocol` (String) Endpoint protocol: https or nativesecure


<a id="nestedatt--private_endpoint_config"></a>

### Nested Schema for `private_endpoint_config`

Read-Only:

- `endpoint_service_id` (String) Unique identifier of the interface endpoint you created in your VPC with the AWS(Service Name) or GCP(Target Service) resource
- `private_dns_hostname` (String) Private DNS Hostname of the VPC you created


0 comments on commit 4902c72

Please sign in to comment.