Skip to content

Commit

Permalink
feat(cluster-connection): add docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Dmitry Kropachev committed Apr 20, 2024
1 parent b4e63e1 commit 31dea58
Show file tree
Hide file tree
Showing 4 changed files with 113 additions and 0 deletions.
72 changes: 72 additions & 0 deletions docs/resources/cluster_connection.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
---
page_title: "scylladbcloud_cluster_connection Resource - terraform-provider-scylladbcloud"
subcategory: ""
description: |-
---

# scylladbcloud_cluster_connection (Resource)



## Example of AWS Transit Gateway VPC Attachment Cluster Connection

```terraform
# Create AWS TGW VPC Attachment Connection for the specified cluster.
resource "scylladbcloud_cluster_connection" "aws_tgw" {
cluster_id = 1337
name = "aws-tgw-test"
cidrlist = ["10.201.0.0/16"]
type = "AWS_TGW_ATTACHMENT"
datacenter = "AWS_US_EAST_1"
data = {
tgwid = "tgw-08461afa1119f390a"
ramarn = "arn:aws:ram:us-east-1:043400831220:resource-share/be3b0395-1782-47cb-9ae4-6d3517c6a721"
}
}
output "scylladbcloud_cluster_connection_id" {
value = scylladbcloud_cluster_connection.aws_tgw.id
}
```

<!-- schema generated by tfplugindocs -->
## Schema

### Required

- `cidrlist` (List of String) List of CIDRs to route to the cluster connection
- `cluster_id` (Number) Cluster ID
- `data` (Map of String) Connection Data
- `datacenter` (String) Cluster datacenter name
- `type` (String) Connection Type

### Optional

- `name` (String) Cluster Connection Name
- `status` (String) Connection Status
- `timeouts` (Block, Optional) (see [below for nested schema](#nestedblock--timeouts))

### Read-Only

- `external_id` (String) ID of the cloud resource that represents connection
- `id` (String) Cluster connection ID

<a id="nestedblock--timeouts"></a>
### Nested Schema for `timeouts`

Optional:

- `create` (String)
- `delete` (String)
- `update` (String)

## Import

Import is supported using the following syntax:

```shell
# An cluster connection can be imported by specifying the numeric identifier.
terraform import scylladbcloud_cluster_connection.example 123
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Create AWS TGW VPC Attachment Connection for the specified cluster.

resource "scylladbcloud_cluster_connection" "aws_tgw" {
cluster_id = 1337
name = "aws-tgw-test"
cidrlist = ["10.201.0.0/16"]
type = "AWS_TGW_ATTACHMENT"
datacenter = "AWS_US_EAST_1"
data = {
tgwid = "tgw-08461afa1119f390a"
ramarn = "arn:aws:ram:us-east-1:043400831220:resource-share/be3b0395-1782-47cb-9ae4-6d3517c6a721"
}
}

output "scylladbcloud_cluster_connection_id" {
value = scylladbcloud_cluster_connection.aws_tgw.id
}
2 changes: 2 additions & 0 deletions examples/resources/scylladbcloud_cluster_connection/import.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# An cluster connection can be imported by specifying the numeric identifier.
terraform import scylladbcloud_cluster_connection.example 123
22 changes: 22 additions & 0 deletions templates/resources/cluster_connection.md.tmpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
page_title: "{{.Name}} {{.Type}} - {{.ProviderName}}"
subcategory: ""
description: |-
{{ .Description | plainmarkdown | trimspace | prefixlines " " }}
---

# {{.Name}} ({{.Type}})

{{ .Description | trimspace }}

## Example of AWS Transit Gateway VPC Attachment Cluster Connection

{{ tffile (printf "examples/resources/%s/aws-tgw-vpc-attachment.tf" .Name)}}

{{ .SchemaMarkdown | trimspace }}

## Import

Import is supported using the following syntax:

{{ codefile "shell" (printf "examples/resources/%s/import.sh" .Name)}}

0 comments on commit 31dea58

Please sign in to comment.