Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Add Validation on the distribution_bucket_name variable / environment variable #1310

@toast-gear

Description

@toast-gear

This variable https://github.com/philips-labs/terraform-aws-github-runner/blob/develop/modules/runner-binaries-syncer/variables.tf#L17-L20

variable "distribution_bucket_name" {
  description = "Bucket for storing the action runner distribution."
  type        = string
}

Has this limitation:

Error: Error validating S3 bucket name: only lowercase alphanumeric characters and hyphens allowed in "actions-Default-dist-u9g227runuin7nvex3pysvj9"

Would be good to add some Terraform validation on that variable so we can fail at the plan stage rather than the apply stage

OR

Add the same validation on the variable in the root module instead https://github.com/philips-labs/terraform-aws-github-runner/blob/develop/variables.tf#L22-L25

variable "environment" {
  description = "A name that identifies the environment, used as prefix and for tagging."
  type        = string
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions