• Keeping the terraform state in a Kubernetes Secret

    2 min read

    terraform state Kubernetes Secret

    Storing the terraform state into a S3 bucket with dynamoDB for locking has become the de facto standard for being able to share the state across an organization. Nevertheless, there are interesting alternatives: We can use a Kubernetes Secret

    19/04/2022

    Read more...
  • Using MinIO instead of a S3 bucket

    4 min read

    terraform state S3 MinIO backend

    Since MinIO is an object storage server that implements the same public API as Amazon S3, can it be used to store terraform's state?

    15/06/2021

    Read more...
  • DynamoDB table for state locking and consistency checking on terraform

    2 min read

    terraform dynamodb_table S3

    When using a remote terraform state with S3, it is recomended to use a dynamoDB table for:

    • State locking: Ensures the terrafrom state it is not being modified by two threads at the same time
    • Consistency checking: Makes sure that that terraform it's being used it is the one that it is expected to be used

    For example:

    terraform {
      backend "s3" {
        bucket         = "infra-tfstate"
        key            = "jenkins/terraform.tfstate"
        region         = "eu-west-1"
        dynamodb_table = "terraform_locks"
      }
    }
    

    08/04/2021

    Read more...

From pet to cattle
Treat your kubernetes clusters like cattle, not pets