Terraform Configuration

The following shows how to configure Terraform.

Configure Route 53

  1. Ensure an AWS Route 53 public zone is created.

  2. Add its name to zone_name in example.tfvars.

Configure Terraform Backend

  1. Create an S3 bucket for Terraform state.

  2. Create a DynamoDB table with partition key LockID for state locking.

  3. Update bucket and dynamodb_table in versions.tf.

Configure Variables

  1. Create a .tfvars file or modify example.tfvars with your configuration.

  2. Set required variables: hostname, cluster_name, msk_cluster_name, vpc_name, and aws_region. For example:

    aws_region = "eu-central-1"
    aws_profile = "logscale-aws"
    
    vpc_name = "logscale-vpc"
    vpc_cidr = "10.0.0.0/16"
    
    cluster_name = "logscale-eks"
    cluster_version = "1.32"
    
    zone_name = "example.com"
    hostname = "logscale"
    
    logscale_cluster_size = "xsmall"
    logscale_cluster_type = "advanced"

    Refer to the Terraform Variables README for a full list of configuration values.

Set LogScale License

shell
export TF_VAR_humiocluster_license=<your_logscale_license>

Create Terraform Workspace

shell
terraform workspace new <workspace_name>
terraform workspace select <workspace_name>

Export the LogScale License Key

You will also be required to supply the LogScale license key as a Terraform environment variable:

shell
export TF_VAR_humiocluster_license="<LogScale License Key>"