diff --git a/docs/data-sources/private_endpoint_config.md b/docs/data-sources/private_endpoint_config.md index d43a8869..0ad81db6 100644 --- a/docs/data-sources/private_endpoint_config.md +++ b/docs/data-sources/private_endpoint_config.md @@ -5,17 +5,36 @@ subcategory: "" description: |- --- -# clickhouse_private_endpoint_config (Data Source) +# Data Source: clickhouse_private_endpoint_config - +`clickhouse_private_endpoint_config` provides details about the service name that ClickHouse Cloud has for the specified region. + +This resource can be useful for getting the service name required for endpoint creation. + + +## Example Usage -## Schema +```terraform +data "clickhouse_private_endpoint_config" "this" { + cloud_provider = "aws" + region = "us-east-2" +} + +resource "aws_vpc_endpoint" "this" { + vpc_id = var.vpc_id + service_name = data.clickhouse_private_endpoint_config.this.endpoint_service_id +} +``` + + + +## Argument Reference ### Required -- `cloud_provider` (String) The cloud provider for the private endpoint. Valid values are 'aws' or 'gcp''. -- `region` (String) The region for the private endpoint. Valid values are specific to the cloud provider i.e. us-east-2 +- `cloud_provider` (String) The cloud provider for the private endpoint. Valid values are 'aws' or 'gcp'. +- `region` (String) The region for the private endpoint. Valid values are specific to the cloud provider i.e. 'us-east-2' -### Read-Only +### Attribute Reference -- `endpoint_service_id` (String) The ID of the private endpoint that is used to securely connect to ClickHouse. This is a read-only attribute. +- `endpoint_service_id` (String) The ID of the private endpoint that is used to securely connect to ClickHouse. diff --git a/docs/resources/private_endpoint_registration.md b/docs/resources/private_endpoint_registration.md index c4e06429..902168c2 100644 --- a/docs/resources/private_endpoint_registration.md +++ b/docs/resources/private_endpoint_registration.md @@ -6,14 +6,25 @@ description: |- --- -# clickhouse_private_endpoint_registration (Resource) +# Resource: clickhouse_private_endpoint_registration +Registers an Endpoint ID to ClickHouse Cloud organization +## Example Usage + +```terraform +resource "clickhouse_private_endpoint_registration" "this" { + cloud_provider = "aws" + region = "us-east-2" + id = "vpce-0abc1def234abc567" + description = "vpce-0abc1def234abc567" +} +``` -## Schema +## Argument Reference ### Required @@ -26,3 +37,19 @@ description: |- - `description` (String) Description of the private endpoint +## Import + +In Terraform v1.5.0 and later, use an [`import` block](https://developer.hashicorp.com/terraform/language/import) to import private endpoint registrations using the VPC endpoint `id`. For example: + +```terraform +import { + to = clickhouse_private_endpoint_registration.this + id = "vpce-0abc1def234abc567" +} +``` + +Using `terraform import`, import private endpoint registrations using the VPC endpoint `id`. For example: + +```console +% terraform import clickhouse_private_endpoint_registration.this vpce-0abc1def234abc567 +``` \ No newline at end of file diff --git a/docs/resources/service.md b/docs/resources/service.md index 78d9300d..32ed3362 100644 --- a/docs/resources/service.md +++ b/docs/resources/service.md @@ -5,11 +5,26 @@ subcategory: "" description: |- --- -# clickhouse_service (Resource) +# Resource: clickhouse_service - +Creates a new service on ClickHouse Cloud within your Organization. + + +## Example Usage + +```terraform +resource "clickhouse_service" "this" { + cloud_provider = "aws" + region = "us-east-2" + name = var.name + tier = "production" + ip_access = [{ "source" = "0.0.0.0/0", "description" = "Anywhere access" }] +} +``` -## Schema + + +## Argument Reference ### Required @@ -30,31 +45,28 @@ description: |- - `password_hash` (String, Sensitive) SHA256 hash of password for the default user. One of either `password` or `password_hash` must be specified. - `private_endpoint_ids` (List of String) List of private endpoint IDs -### Read-Only - -- `endpoints` (Attributes List) List of public endpoints. (see [below for nested schema](#nestedatt--endpoints)) -- `iam_role` (String) IAM role used for accessing objects in s3. -- `id` (String) ID of the created service. Generated by ClickHouse Cloud. -- `last_updated` (String) Date for when the service was last updated by Terraform. -- `private_endpoint_config` (Attributes) Service config for private endpoints (see [below for nested schema](#nestedatt--private_endpoint_config)) - -### Nested Schema for `ip_access` +#### Nested Schema for `ip_access` Required: - - `source` (String) IP address allowed to access the service. In case you want to set the ip_access to anywhere you should set source to 0.0.0.0/0 Optional: - - `description` (String) Description of the IP address. - -### Nested Schema for `endpoints` +## Attribute Reference -Read-Only: +- `endpoints` (Attributes List) List of public endpoints. (see [below for nested schema](#nestedatt--endpoints)) +- `iam_role` (String) IAM role used for accessing objects in s3. +- `id` (String) ID of the created service. Generated by ClickHouse Cloud. +- `last_updated` (String) Date for when the service was last updated by Terraform. +- `private_endpoint_config` (Attributes) Service config for private endpoints (see [below for nested schema](#nestedatt--private_endpoint_config)) + + + +#### Nested Schema for `endpoints` - `host` (String) Endpoint host. - `port` (Number) Endpoint port. @@ -62,9 +74,25 @@ Read-Only: -### Nested Schema for `private_endpoint_config` - -Read-Only: +#### Nested Schema for `private_endpoint_config` - `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 + + +## Import + +In Terraform v1.5.0 and later, use an [`import` block](https://developer.hashicorp.com/terraform/language/import) to import services using their `id`. For example: + +```terraform +import { + to = clickhouse_service.this + id = "01a2b34c-d56e-7f8a-bc9d-0efabc12defa" +} +``` + +Using `terraform import`, import services using their `id`. For example: + +```console +% terraform import clickhouse_service.this 01a2b34c-d56e-7f8a-bc9d-0efabc12defa +``` \ No newline at end of file