Skip to content

Commit

Permalink
docs: add missing template fos status datasources
Browse files Browse the repository at this point in the history
  • Loading branch information
ianaya89 committed Aug 2, 2024
1 parent bcb0c30 commit f611072
Show file tree
Hide file tree
Showing 8 changed files with 170 additions and 6 deletions.
40 changes: 38 additions & 2 deletions docs/data-sources/env_azure_status.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "altinitycloud_env_azure_status Data Source - terraform-provider-altinitycloud"
subcategory: ""
description: |-
Expand All @@ -10,7 +9,44 @@ description: |-

Altinity.Cloud Azure environment status data source. It will long pool the status until `matching_spec` is `true`. Use this data source to wait for the environment is fully provisioned.


## Example Usage

### Read Azure environment status:
```terraform
data "altinitycloud_env_azure_status" "current" {
name = "acme-staging"
}
```

### Wait for Azure environment to be fully provisioned:
```terraform
resource "altinitycloud_env_aws" "this" {
name = "acme-staging"
aws_account_id = "123456789012"
region = "us-east-1"
zones = ["us-east-1a", "us-east-1b"]
cidr = "10.67.0.0/21"
node_groups = [
{
node_type = "t4g.large"
capacity_per_zone = 10
reservations = ["SYSTEM", "ZOOKEEPER"]
},
{
node_type = "m6i.large"
capacity_per_zone = 10
reservations = ["CLICKHOUSE"]
}
]
cloud_connect = true
}
data "altinitycloud_env_aws_status" "current" {
name = altinitycloud_env_aws.this.name
wait_for_applied_spec_revision = altinitycloud_env_aws.this.spec_revision
}
```

<!-- schema generated by tfplugindocs -->
## Schema
Expand Down
38 changes: 37 additions & 1 deletion docs/data-sources/env_gcp_status.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "altinitycloud_env_gcp_status Data Source - terraform-provider-altinitycloud"
subcategory: ""
description: |-
Expand All @@ -10,7 +9,44 @@ description: |-

Altinity.Cloud GCP environment status data source. It will long pool the status until `matching_spec` is `true`. Use this data source to wait for the environment is fully provisioned.

## Example Usage

### Read GCP environment status:
```terraform
data "altinitycloud_env_gcp_status" "current" {
name = "acme-staging"
}
```

### Wait for GCP environment to be fully provisioned:
```terraform
resource "altinitycloud_env_aws" "this" {
name = "acme-staging"
aws_account_id = "123456789012"
region = "us-east-1"
zones = ["us-east-1a", "us-east-1b"]
cidr = "10.67.0.0/21"
node_groups = [
{
node_type = "t4g.large"
capacity_per_zone = 10
reservations = ["SYSTEM", "ZOOKEEPER"]
},
{
node_type = "m6i.large"
capacity_per_zone = 10
reservations = ["CLICKHOUSE"]
}
]
cloud_connect = true
}
data "altinitycloud_env_aws_status" "current" {
name = altinitycloud_env_aws.this.name
wait_for_applied_spec_revision = altinitycloud_env_aws.this.spec_revision
}
```

<!-- schema generated by tfplugindocs -->
## Schema
Expand Down
34 changes: 33 additions & 1 deletion docs/data-sources/env_k8s_status.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "altinitycloud_env_k8s_status Data Source - terraform-provider-altinitycloud"
subcategory: ""
description: |-
Expand All @@ -10,7 +9,40 @@ description: |-

Altinity.Cloud K8S environment status data source. It will long pool the status until `matching_spec` is `true`. Use this data source to wait for the environment is fully provisioned.

## Example Usage

### Read K8S environment status:
```terraform
data "altinitycloud_env_k8s_status" "current" {
name = "acme-staging"
}
```

### Wait for K8S environment to be fully provisioned:
```terraform
resource "altinitycloud_env_k8s" "this" {
name = "acme-staging"
distribution = "EKS"
node_groups = [
{
node_type = "t4g.large"
capacity_per_zone = 10
reservations = ["SYSTEM", "ZOOKEEPER"]
},
{
node_type = "m6i.large"
capacity_per_zone = 10
reservations = ["CLICKHOUSE"]
}
]
}
data "altinitycloud_env_k8s_status" "current" {
name = altinitycloud_env_k8s.this.name
wait_for_applied_spec_revision = altinitycloud_env_k8s.this.spec_revision
}
```

<!-- schema generated by tfplugindocs -->
## Schema
Expand Down
2 changes: 1 addition & 1 deletion docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ terraform {
altinitycloud = {
source = "altinity/altinitycloud"
# https://github.com/altinity/terraform-provider-altinitycloud/blob/master/CHANGELOG.md
version = "0.2.6"
version = "0.2.7"
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion examples/provider/provider.tf
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ terraform {
altinitycloud = {
source = "altinity/altinitycloud"
# https://github.com/altinity/terraform-provider-altinitycloud/blob/master/CHANGELOG.md
version = "0.2.6"
version = "0.2.7"
}
}
}
Expand Down
20 changes: 20 additions & 0 deletions templates/data-sources/env_azure_status.md.tmpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
page_title: "{{.Name}} {{.Type}} - {{.ProviderName}}"
subcategory: ""
description: |-
{{ .Description | plainmarkdown | trimspace | prefixlines " " }}
---

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

{{ .Description | trimspace }}

## Example Usage

### Read Azure environment status:
{{tffile "examples/data-sources/altinitycloud_env_azure_status/main.tf"}}

### Wait for Azure environment to be fully provisioned:
{{tffile "examples/data-sources/altinitycloud_env_azure_status/wait.tf"}}

{{ .SchemaMarkdown | trimspace }}
20 changes: 20 additions & 0 deletions templates/data-sources/env_gcp_status.md.tmpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
page_title: "{{.Name}} {{.Type}} - {{.ProviderName}}"
subcategory: ""
description: |-
{{ .Description | plainmarkdown | trimspace | prefixlines " " }}
---

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

{{ .Description | trimspace }}

## Example Usage

### Read GCP environment status:
{{tffile "examples/data-sources/altinitycloud_env_gcp_status/main.tf"}}

### Wait for GCP environment to be fully provisioned:
{{tffile "examples/data-sources/altinitycloud_env_aws_status/wait.tf"}}

{{ .SchemaMarkdown | trimspace }}
20 changes: 20 additions & 0 deletions templates/data-sources/env_k8s_status.md.tmpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
page_title: "{{.Name}} {{.Type}} - {{.ProviderName}}"
subcategory: ""
description: |-
{{ .Description | plainmarkdown | trimspace | prefixlines " " }}
---

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

{{ .Description | trimspace }}

## Example Usage

### Read K8S environment status:
{{tffile "examples/data-sources/altinitycloud_env_k8s_status/main.tf"}}

### Wait for K8S environment to be fully provisioned:
{{tffile "examples/data-sources/altinitycloud_env_k8s_status/wait.tf"}}

{{ .SchemaMarkdown | trimspace }}

0 comments on commit f611072

Please sign in to comment.