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

NameDescriptionTypeDefault
subscription_idAzure subscription ID.stringn/a
resource_group_locationLocation of the resource group.string"eastus"
resource_group_name_prefixPrefix of the resource group name.string"rg"
node_countThe initial quantity of nodes for the node pool.number3
vm_sizeThe size of the Virtual Machine.string"Standard_D2_v2"
msi_idThe Managed Service Identity ID.stringnull
usernameThe admin username for the new cluster.string"azureadmin"
aws_regionAWS region for the primary provider.string"eu-west-1"
aws_region_aliasesMap 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_emailEmail for cert-manager.string"your-email@example.com"
anzen_staging_hostHost for Anzen staging.string"staging.example.com"
anzen_prod_hostHost for Anzen production.string"prod.example.com"
aws_s3_bucketsList 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

NameDescription
resource_group_nameThe name of the resource group.
kubernetes_cluster_nameThe name of the Kubernetes cluster.
client_certificateThe client certificate for the Kubernetes cluster.
client_keyThe client key for the Kubernetes cluster.
cluster_ca_certificateThe cluster CA certificate for the Kubernetes cluster.
cluster_passwordThe password for the Kubernetes cluster.
cluster_usernameThe username for the Kubernetes cluster.
hostThe host for the Kubernetes cluster.
kube_configThe raw kube config for the Kubernetes cluster.