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

hcl2template: check bucket name at parse-time #12820

Merged
merged 1 commit into from
Jan 31, 2024

Conversation

lbajolet-hashicorp
Copy link
Contributor

Not validating the bucket's name during parse leads to configurations being marked as valid, even if the bucket name is not, which will fail during a real build afterwards.

To avoid this problem and fail with an error as quickly as possible, we add a check during parsing, so that it gets reported for validate as well.

@lbajolet-hashicorp lbajolet-hashicorp marked this pull request as ready for review January 30, 2024 16:52
@lbajolet-hashicorp lbajolet-hashicorp requested a review from a team as a code owner January 30, 2024 16:52
@lbajolet-hashicorp lbajolet-hashicorp force-pushed the check_hcp_bucket_name_parsing branch from 7643bd4 to b65e1fa Compare January 30, 2024 17:00
Not validating the bucket's name during parse leads to configurations
being marked as valid, even if the bucket name is not, which will fail
during a real build afterwards.

To avoid this problem and fail with an error as quickly as possible, we
add a check during parsing, so that it gets reported for validate as
well.
@lbajolet-hashicorp lbajolet-hashicorp force-pushed the check_hcp_bucket_name_parsing branch from b65e1fa to 56ca16e Compare January 30, 2024 17:03
@nywilken nywilken added the backport/1.10.x Backport PR changes to `release/1.10.x` label Jan 30, 2024
Copy link
Contributor

@nywilken nywilken left a comment

Choose a reason for hiding this comment

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

Nice addition

Copy link

github-actions bot commented Mar 2, 2024

I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 2, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
backport/1.10.x Backport PR changes to `release/1.10.x` enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants