• find and findstr: grep for Windows

    2 min read

    On a Windows server there's also a way of fitering other command's output just like you would do using grep on a Linux: You can do it using find and findstr

    09/04/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...
  • Terraform error: Provider configuration not present

    2 min read

    Due to the need to use the count keyword for making a resource optional I wanted to upgrade from terraform 0.12 to 0.13 but while doing so I found the following error:

    Error: Provider configuration not present
    
    To work with module.jenkins.aws_iam_policy.jenkins_policy
    its original provider configuration at provider["registry.terraform.io/-/aws"]
    is required, but it has been removed. This occurs when a provider
    configuration is removed while objects created by that provider still exist in
    the state. Re-add the provider configuration to destroy
    module.jenkins.aws_iam_policy.jenkins_policy, after which
    you can remove the provider configuration again.
    

    07/04/2021

    Read more...
  • AWS CLI configuration for assuming a different role

    2 min read

    On a previous post we saw how to test we can assume a role using AWS CLI but how can we configure AWS CLI to assume an specific role before performing some request? We can do it using a profile to save us from the trouble of having to change three different environment variables.

    06/04/2021

    Read more...
  • k3s: Join a new worker node to an existing cluster

    3 min read

    k3s join nodes

    On a previous post we saw how ridiculously easy is to bootstrap a k3s cluster on a Raspberry Pi but what do we need to do to join new worker nodes to the cluster?

    05/04/2021

    Read more...

More recent...

Older content...