Deployment
Prerequisites
Before you begin, ensure you have the following installed:
You will need a valid license to use AnzenStore and to access to the docker images.
Step 1: Initialize Terraform
Navigate to your Terraform configuration directory and run the following command to initialize Terraform:
terraform init
Step 2: Plan the Deployment
Run the following command to create an execution plan. This will show you what actions Terraform will take to deploy your module:
terraform plan
Step 3: Apply the Deployment
Apply the changes required to reach the desired state of the configuration:
terraform apply
Type yes
when prompted to confirm the deployment.
Clean Up
To destroy the resources created by Terraform, run the following command:
terraform destroy
Type yes
when prompted to confirm the destruction.
Usage
module "deploy_azure" {
source = "./deploy_azure"
subscription_id = "your-subscription-id"
resource_group_location = "eastus"
resource_group_name_prefix = "rg"
node_count = 3
vm_size = "Standard_D2_v2"
msi_id = null
username = "azureadmin"
aws_region = "eu-west-1"
aws_region_aliases = {
"eu-west-2" = "eu-west-2"
"eu-west-3" = "eu-west-3"
"eu-central-1" = "eu-central-1"
}
cert_manager_email = "your-email@example.com"
anzen_staging_host = "staging.example.com"
anzen_prod_host = "prod.example.com"
aws_s3_buckets = [
{ name = "s3-bucket1", region = "eu-west-1" },
{ name = "s3-bucket2", region = "eu-west-2" },
{ name = "s3-bucket3", region = "eu-west-3" },
{ name = "s3-bucket4", region = "eu-central-1" }
]
}
Inputs
Name | Description | Type | Default |
---|---|---|---|
subscription_id | Azure subscription ID. | string | n/a |
resource_group_location | Location of the resource group. | string | "eastus" |
resource_group_name_prefix | Prefix of the resource group name. | string | "rg" |
node_count | The initial quantity of nodes for the node pool. | number | 3 |
vm_size | The size of the Virtual Machine. | string | "Standard_D2_v2" |
msi_id | The Managed Service Identity ID. | string | null |
username | The admin username for the new cluster. | string | "azureadmin" |
aws_region | AWS region for the primary provider. | string | "eu-west-1" |
aws_region_aliases | Map of AWS region aliases. | map | {"eu-west-2" = "eu-west-2", "eu-west-3" = "eu-west-3", "eu-central-1" = "eu-central-1"} |
cert_manager_email | Email for cert-manager. | string | "your-email@example.com" |
anzen_staging_host | Host for Anzen staging. | string | "staging.example.com" |
anzen_prod_host | Host for Anzen production. | string | "prod.example.com" |
aws_s3_buckets | List of AWS S3 buckets to create with their respective regions. | list | [{"name" = "s3-bucket1", "region" = "eu-west-1"}, {"name" = "s3-bucket2", "region" = "eu-west-2"}, {"name" = "s3-bucket3", "region" = "eu-west-3"}, {"name" = "s3-bucket4", "region" = "eu-central-1"}] |
Outputs
Name | Description |
---|---|
resource_group_name | The name of the resource group. |
kubernetes_cluster_name | The name of the Kubernetes cluster. |
client_certificate | The client certificate for the Kubernetes cluster. |
client_key | The client key for the Kubernetes cluster. |
cluster_ca_certificate | The cluster CA certificate for the Kubernetes cluster. |
cluster_password | The password for the Kubernetes cluster. |
cluster_username | The username for the Kubernetes cluster. |
host | The host for the Kubernetes cluster. |
kube_config | The raw kube config for the Kubernetes cluster. |