• Install Crossplane on AWS with the Jet provider

    3 min read

    crossplane kubernetes aws s3 jet provider

    To start creating resources on AWS we can choose the AWS native provider or go with the Jet provider that uses terraform's AWS provider under the hood to generate a Crossplane provider

    02/03/2022

    Read more...
  • Install Crossplane on AWS with the native provider

    4 min read

    crossplane kubernetes aws s3 native provider

    Crossplane is an open source Kubernetes add-on that lets you create cloud resources using Kubernetes objects (CRDs). It's installation it's straightforward, but once we have it installed the key it to properly configure it's providers. Here we are going to use the crossplane's native AWS provider

    28/02/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...
  • Unlocking remote terraform state

    2 min read

    terraform S3 bucket unlock tfstate force-unlock

    When you are working with the terraform state on a S3 bucket if you cancel an operation you might end up with the lock not being released so you won't be able to perform any more changes (not even plan a new change!)

    $ terraform plan
    Acquiring state lock. This may take a few moments...
    
    Error: Error locking state: Error acquiring the state lock: ConditionalCheckFailedException: The conditional request failed
    Lock Info:
      ID:        **6dec3c3f-dea3-4232-60f5-5fe0647a41f6**
      Path:      demo/terraform.tfstate
      Operation: OperationTypePlan
      Who:       jordi.prats@pet2cattle.com
      Version:   0.12.29
      Created:   2020-12-21 21:26:08.295375151 +0000 UTC
      Info:      
    
    
    Terraform acquires a state lock to protect the state from being written
    by multiple users at the same time. Please resolve the issue above and try
    again. For most commands, you can disable locking with the "-lock=false"
    flag, but this is not recommended.
    

    21/12/2020

    Read more...

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