Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Validation on the distribution_bucket_name variable / environment variable #1310

Closed
toast-gear opened this issue Oct 20, 2021 · 0 comments · Fixed by #1356
Closed

Add Validation on the distribution_bucket_name variable / environment variable #1310

toast-gear opened this issue Oct 20, 2021 · 0 comments · Fixed by #1356
Labels
good first issue Good for newcomers help wanted Extra attention is needed

Comments

@toast-gear
Copy link
Contributor

toast-gear commented Oct 20, 2021

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
}
@toast-gear toast-gear changed the title Add Validation on the distribution_bucket_name variable Add Validation on the distribution_bucket_name variable / environment variable Oct 20, 2021
@npalm npalm added good first issue Good for newcomers help wanted Extra attention is needed labels Oct 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants