Skip to content

Commit

Permalink
docs: add links to altinity and aks sample
Browse files Browse the repository at this point in the history
  • Loading branch information
ianaya89 committed Aug 2, 2024
1 parent ee3aa45 commit 55d69b5
Show file tree
Hide file tree
Showing 7 changed files with 79 additions and 0 deletions.
2 changes: 2 additions & 0 deletions docs/resources/env_aws.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ description: |-

# altinitycloud_env_aws (Resource)

> For a detailed guide on provisioning an AWS environment using Terraform, check our official [documentation](https://docs.altinity.com/altinitycloudanywhere/bring-your-own-cloud-byoc/aws-remote-provisioning/#method-1-using-our-terraform-module).
Bring Your Own Cloud (BYOC) AWS environment resource.

## Example Usage
Expand Down
2 changes: 2 additions & 0 deletions docs/resources/env_azure.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ description: |-

# altinitycloud_env_azure (Resource)

> For a detailed guide on provisioning an Azure environment using Terraform, check our official [documentation](https://docs.altinity.com/altinitycloudanywhere/bring-your-own-cloud-byoc/aks-remote-provisioning/#using-terraform).
Bring Your Own Cloud (BYOC) Azure environment resource.

## Example Usage
Expand Down
36 changes: 36 additions & 0 deletions docs/resources/env_k8s.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ description: |-

# altinitycloud_env_k8s (Resource)

> For a detailed guide on provisioning a K8S environment using Terraform, check our official [documentation](https://docs.altinity.com/altinitycloudanywhere/bring-your-own-kubernetes-byok/terraform/).
Bring Your Own Kubernetes (BYOK) environment resource.

## Example Usage
Expand Down Expand Up @@ -89,6 +91,40 @@ resource "altinitycloud_env_k8s" "this" {
}
```

BYOK/AKS (Azure):
```terraform
resource "altinitycloud_env_certificate" "this" {
env_name = "acme-staging"
}
provider "kubernetes" {
# https://registry.terraform.io/providers/hashicorp/kubernetes/latest/docs
config_context = "make sure provider points at the AKS you want to connect"
}
module "altinitycloud_connect" {
source = "altinity/connect/altinitycloud"
pem = altinitycloud_env_certificate.this.pem
}
resource "altinitycloud_env_k8s" "this" {
name = altinitycloud_env_certificate.this.env_name
distribution = "AKS"
// node_groups should match existing node pools configuration.
node_groups = [
{
node_type = "Standard_B2s_v2"
capacity_per_zone = 10
reservations = ["CLICKHOUSE", "SYSTEM", "ZOOKEEPER"]
}
]
depends_on = [
// "depends_on" is here to enforce "this resource, then altinitycloud_connect" order on destroy.
module.altinitycloud_connect
]
}
```

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

Expand Down
30 changes: 30 additions & 0 deletions examples/resources/altinitycloud_env_k8s/aks/main.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
resource "altinitycloud_env_certificate" "this" {
env_name = "acme-staging"
}

provider "kubernetes" {
# https://registry.terraform.io/providers/hashicorp/kubernetes/latest/docs
config_context = "make sure provider points at the AKS you want to connect"
}

module "altinitycloud_connect" {
source = "altinity/connect/altinitycloud"
pem = altinitycloud_env_certificate.this.pem
}

resource "altinitycloud_env_k8s" "this" {
name = altinitycloud_env_certificate.this.env_name
distribution = "AKS"
// node_groups should match existing node pools configuration.
node_groups = [
{
node_type = "Standard_B2s_v2"
capacity_per_zone = 10
reservations = ["CLICKHOUSE", "SYSTEM", "ZOOKEEPER"]
}
]
depends_on = [
// "depends_on" is here to enforce "this resource, then altinitycloud_connect" order on destroy.
module.altinitycloud_connect
]
}
2 changes: 2 additions & 0 deletions templates/resources/env_aws.md.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ description: |-

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

> For a detailed guide on provisioning an AWS environment using Terraform, check our official [documentation](https://docs.altinity.com/altinitycloudanywhere/bring-your-own-cloud-byoc/aws-remote-provisioning/#method-1-using-our-terraform-module).

{{ .Description | trimspace }}

## Example Usage
Expand Down
2 changes: 2 additions & 0 deletions templates/resources/env_azure.md.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ description: |-

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

> For a detailed guide on provisioning an Azure environment using Terraform, check our official [documentation](https://docs.altinity.com/altinitycloudanywhere/bring-your-own-cloud-byoc/aks-remote-provisioning/#using-terraform).

{{ .Description | trimspace }}

## Example Usage
Expand Down
5 changes: 5 additions & 0 deletions templates/resources/env_k8s.md.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ description: |-

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

> For a detailed guide on provisioning a K8S environment using Terraform, check our official [documentation](https://docs.altinity.com/altinitycloudanywhere/bring-your-own-kubernetes-byok/terraform/).

{{ .Description | trimspace }}

## Example Usage
Expand All @@ -17,6 +19,9 @@ BYOK/EKS (AWS)
BYOK/GKE (GCP):
{{tffile "examples/resources/altinitycloud_env_k8s/gke/main.tf"}}

BYOK/AKS (Azure):
{{tffile "examples/resources/altinitycloud_env_k8s/aks/main.tf"}}

{{ .SchemaMarkdown | trimspace }}
{{- if .HasImport }}

Expand Down

0 comments on commit 55d69b5

Please sign in to comment.