这是indexloc提供的服务,不要输入任何密码
Skip to content

Conversation

@timblaktu
Copy link
Contributor

Adds validation to bucket name input variables, following the AWS Bucket Naming Rules. Currently, it allows . in case Transfer Accel is used. There may be other exceptions I have not covered, thus the review. I have tested this manually in my current project, that it produces the error when I include an _ and does not when I remove the _.

@nozaq nozaq self-requested a review October 15, 2022 09:47
Copy link
Owner

@nozaq nozaq left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@timblaktu Thank you, I like the idea of adding validations here.

According to the AWS doc, only lowercase letters are allowed in bucket names. How about changing [A-Za-z...] parts to [a-z...] ?

Copy link
Owner

@nozaq nozaq left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've pushed fixes myself since it's quite tiny.
Please open an issue if you have any further suggestions, thanks!

@nozaq nozaq merged commit f35f913 into nozaq:main Oct 22, 2022
yyxi pushed a commit to escapace/terraform-aws-terraform-backend that referenced this pull request Oct 27, 2024
* nozaq#101: added validation for s3_bucket_name* input variables

* nozaq#101: remove override variable from conditional bc validation condition can only refer to tha variable being validated

* nozaq#101: try to fix validation regex error

* nozaq#101: escape backslashes

* nozaq#101: remove lookaheads from regex bc tf doesn't support them

* nozaq#101: added missing backslash escape

* fix: do not allow uppercase letters for bucket names

* fix: do not fail vailidation when bucket names are not specified

Co-authored-by: nozaq <code@nozaq.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants