You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When a value for the prefix input contains an uppercase characters, the terraform plan fails with a validation error on COS bucket name parameter (even if no COS will be actually provisioned).
2024/09/18 15:55:23 Terraform plan | Error: Invalid value for variable
2024/09/18 15:55:23 Terraform plan |
2024/09/18 15:55:23 Terraform plan | on main.tf line 33, in module "account_infrastructure_base":
2024/09/18 15:55:23 Terraform plan | 33: cos_bucket_name = var.cos_bucket_name == null ? try("${var.prefix}-cos-bucket", "cos-bucket") : var.cos_bucket_name
2024/09/18 15:55:23 Terraform plan | ├────────────────
2024/09/18 15:55:23 Terraform plan | │ var.cos_bucket_name is "MY-lab-00-cos-bucket"
2024/09/18 15:55:23 Terraform plan |
2024/09/18 15:55:23 Terraform plan | `cos_bucket_name` must match the following regex pattern:
2024/09/18 15:55:23 Terraform plan | "^[a-z0-9][a-z0-9]+[a-z0-9]$"
2024/09/18 15:55:23 Terraform plan |
2024/09/18 15:55:23 Terraform plan | This was checked by the validation rule at ../../variables.tf:329,3-13.
Debug output
Expected behavior
Option 1: add validation to prefix to not allow uppercase characters. However this would affect a lot of other DAs
Option 2: convert the bucket name constructed from prefix to lowercase.
Also, if no COS bucket is going to be created, it probably does not make sense to perform the validation anyway, but that would be addressed by a fix from options above.
Actual behavior
Steps to reproduce (including links and screen captures)
Run terraform apply
Anything else
By submitting this issue, you agree to follow our Code of Conduct
The text was updated successfully, but these errors were encountered:
When a value for the
prefix
input contains an uppercase characters, the terraform plan fails with a validation error on COS bucket name parameter (even if no COS will be actually provisioned).Affected modules
Terraform CLI and Terraform provider versions
Terraform output
Debug output
Expected behavior
Also, if no COS bucket is going to be created, it probably does not make sense to perform the validation anyway, but that would be addressed by a fix from options above.
Actual behavior
Steps to reproduce (including links and screen captures)
terraform apply
Anything else
By submitting this issue, you agree to follow our Code of Conduct
The text was updated successfully, but these errors were encountered: