Skip to content

Initial Release

Release notes - sudoblark.github-actions.library 1.0.0

Release doc template by good-docs, see here for their templates.

Avaialble on GitHub here

19th February 2025

Initial release of the GitHub Actions Library, primarily to enable CI/CD workshops next month, utilising GitHub composite actions for standardised terraform plan and apply templates.

New features

  • terraform/plan
Run quality checks against terraform, in addition to outputting a plan, with results outputted
to a pipeline artefact ZIP file with the name {{ inputs.prefix }}-terraform-artefact, contents
of which are as follows:

- terraform.plan        : Binary terraform plan
- terraform.validate    : Results of terraform validation
- terraform.show        : Terraform plan in human-readable format
- terraform.json        : Terraform plan in JSON format, required for some downstream CLI tooling
- terraform.format      : List of files which have failed terraform format checks, else an empty file
- checkov.xml           : JUnit output of Checkov results, can be used to upload test results downstream
Interface as follows
inputs:
  terraform_version:
    description: "Semantic version of Terraform to utilise for the task."
    type: string
    required: true
  working_directory:
    description: "The working directory to utilise when performing the task."
    type: string
    required: true
  artefact_prefix:
    description: "Prefix to append to terraform-artefact produced by the task."
    type: string
    required: true
  aws_region:
    description: "AWS_DEFAULT_REGION value, required if the hashicorp/aws provider is utilised."
    type: string
    default: ""
    required: false
  aws_access_key:
    description: "AWS_ACCESS_KEY_ID value, required if the hashicorp/aws provider is utilised."
    type: string
    default: ""
    required: false
  aws_secret_access_key:
    description: "AWS_SECRET_ACCESS_KEY value, required if the hashicorp/aws provider is utilised."
    type: string
    default: ""
    required: false
outputs:
  artefact_name:
    description: "Name of artefact ZIP file with outputted results."
    value: "{{ inputs.prefix }}-terraform-artefact"
Example usage
https://github.com/sudoblark/sudoblark.terraform.modularised-demo/compare/1.0.1...1.1.0#diff-4f9e38227ed64fefb17f4668a7ac4ab55b6149994d5ac2fd96182d5958479b54R35
     - uses: sudoblark/sudoblark.github-actions.library/terraform/plan@1.0.0
        with:
          terraform_version: $TERRAFORM_VERSION
          working_directory: $GITHUB_WORKSPACE/infrastructure/sudoblark
          artefact_prefix: sudoblark
          aws_region: eu-west-2
          aws_access_key: $AWS_ACCESS_KEY_ID
          aws_secret_access_key: $AWS_SECRET_ACCESS_KEY
  • terraform/apply
This template simply takes the artefact produced by the plan template and applies it.

Intended to be used in conjunction with sudoblark.github-actions.library/terraform/plan.
Interface as follows
inputs:
  terraform_version:
    description: "Semantic version of Terraform to utilise for the task."
    type: string
    required: true
  working_directory:
    description: "The working directory to utilise when performing the task."
    type: string
    required: true
  artefact:
    description: "Name of the artefact - produced by terraform/plan - which we wish to apply"
    type: string
    required: true
  aws_region:
    description: "AWS_DEFAULT_REGION value, required if the hashicorp/aws provider is utilised."
    type: string
    default: ""
    required: false
  aws_access_key:
    description: "AWS_ACCESS_KEY_ID value, required if the hashicorp/aws provider is utilised."
    type: string
    default: ""
    required: false
  aws_secret_access_key:
    description: "AWS_SECRET_ACCESS_KEY value, required if the hashicorp/aws provider is utilised."
    type: string
    default: ""
    required: false
Example usage
https://github.com/sudoblark/sudoblark.terraform.modularised-demo/compare/1.0.1...1.1.0#diff-4f9e38227ed64fefb17f4668a7ac4ab55b6149994d5ac2fd96182d5958479b54R82
    - uses: sudoblark/sudoblark.github-actions.library/terraform/apply@1.0.0
      with:
        terraform_version: $TERRAFORM_VERSION
        working_directory: $GITHUB_WORKSPACE/infrastructure/sudoblark
        artefact: sudoblark-terraform-artefact
        aws_region: eu-west-2
        aws_access_key: $AWS_ACCESS_KEY_ID
        aws_secret_access_key: $AWS_SECRET_ACCESS_KEY

Changelog

  • Add Terraform tasks by @benjaminlukeclark in https://github.com/sudoblark/sudoblark.github-actions.library/pull/3

Full Changelog: https://github.com/sudoblark/sudoblark.github-actions.library/commits/1.0.0

Feedback

Submit suggestions for improvements to enquires@sudoblark.com and/or raise an issue.