Fix the dynamic creation of tf state bucket from branch name
rss04 opened this issue · 0 comments
rss04 commented
Issue identified:
we are dynamically creating bucket based on the branch name and it is failing in cases where branch name has /
like for example feat/sbox-rds-tf-state
Error:
Invalid bucket name "bitovi-devops-training-ec2-gha-example-feat/sbox-rds-tf-state": Bucket name must match the regex "^[a-zA-Z0-9.-_]{1,255}$" or be an ARN matching the regex "^arn:(aws).:(s3|s3-object-lambda):[a-z-0-9]:[0-9]{12}:accesspoint[/:][a-zA-Z0-9-.]{1,63}$|^arn:(aws).*:s3-outposts:[a-z-0-9]+:[0-9]{12}:outpost[/:][a-zA-Z0-9-]{1,63}[/:]accesspoint[/:][a-zA-Z0-9-]{1,63}$"