• sceptre: Multiple instances of a template

    2 min read

    sceptre multiple instances A stack named iam-policy-example already exists ProvisionedProductName

    When provisioning cloud resources using sceptre we can endup with plenty of errors that we'll have to track down:

    $ sceptre create example
    Do you want to create 'example' [y/N]: y
    [2023-01-26 05:18:31] - example/s3 - Creating Stack
    [2023-01-26 05:18:33] - example/s3 s3 AWS::CloudFormation::Stack CREATE_IN_PROGRESS User Initiated
    [2023-01-26 05:18:37] - example/s3 Bucket AWS::ServiceCatalog::CloudFormationProvisionedProduct CREATE_IN_PROGRESS
    [2023-01-26 05:18:41] - example/s3 Bucket AWS::ServiceCatalog::CloudFormationProvisionedProduct CREATE_IN_PROGRESS Resource creation Initiated
    [2023-01-26 05:20:15] - example/s3 Bucket AWS::ServiceCatalog::CloudFormationProvisionedProduct CREATE_COMPLETE
    [2023-01-26 05:20:20] - example/s3 s3 AWS::CloudFormation::Stack CREATE_COMPLETE
    [2023-01-26 05:20:24] - example/demo-policy - Creating Stack
    [2023-01-26 05:20:25] - example/demo-policy demo-policy AWS::CloudFormation::Stack CREATE_IN_PROGRESS User Initiated
    [2023-01-26 05:20:29] - example/demo-policy IAMPolicy AWS::ServiceCatalog::CloudFormationProvisionedProduct CREATE_IN_PROGRESS
    [2023-01-26 05:20:33] - example/demo-policy IAMPolicy AWS::ServiceCatalog::CloudFormationProvisionedProduct CREATE_FAILED Resource handler returned message: "Invalid request provided: AWS::ServiceCatalog::CloudFormationProvisionedProduct" (RequestToken: 4580f5a3-bec2-72cc-5f9f-abad3792e57a, HandlerErrorCode: InvalidRequest)
    [2023-01-26 09:20:33] - example/demo-policy demo-policy AWS::CloudFormation::Stack ROLLBACK_IN_PROGRESS The following resource(s) failed to create: [IAMPolicy]. Rollback requested by user.
    [2023-01-26 05:23:12] - example/demo-policy IAMPolicy AWS::ServiceCatalog::CloudFormationProvisionedProduct DELETE_COMPLETE
    [2023-01-26 05:23:12] - example/demo-policy demo-policy AWS::CloudFormation::Stack ROLLBACK_COMPLETE


  • GitHub Actions: Scheduled Runs

    2 min read

    github action scheduled workflow interval cron

    GitHub Actions is a powerful automation tool that allows you to automate various tasks and processes, usually triggered by some change in the source repository. Using scheduled runs we are going to be able to schedule runs as well.


  • Prometheus: Add label to a metric

    1 min read

    prometheus relabel_configs add label

    In Prometheus, to be able to add a label to the metrics retrieved by a particular job we can use relabel_configs.


  • Kustomize: Disabling hashed ConfigMap when using configMapGenerator

    2 min read

    kustomize configMapGenerator ConfigMap

    When we try to use configMapGenerator to generate a ConfigMap containing some files like this:

    - name: config-files
      behavior: create
      - files/file1.txt
      - files/file2.txt

    By default, it is going to append a hash to it:

    $ kubectl get configmap
    NAME                          DATA   AGE
    config-files-m55tkfhh8f       2      45d

    If we need to access this ConfigMap by name we might want to remove the hash.


  • Optional Secrets as Volumes or Environment variables

    3 min read

    kubernetes secret optional volume envirnment variable

    Secrets contain sensitive data such as passwords, tokens, and certificates. They can be used by Kubernetes pods to authenticate with other systems. However, some of them might be optional so we'll want to be able to create the Pod without having to use some template engine to handle whether the secret is present or not.



Older content...