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 support for cors and website blocks #63

Merged
merged 3 commits into from
May 26, 2020

Conversation

pkatsovich
Copy link
Contributor

@pkatsovich pkatsovich commented May 26, 2020

This PR adds support for the cors and website attribute blocks.
These are needed for managing buckets to be used as static sites.

https://www.terraform.io/docs/providers/google/r/storage_bucket.html#example-usage-creating-a-private-bucket-in-standard-storage-in-the-eu-region-bucket-configured-as-static-website-and-cors-configurations

I had to define the variables as type = any due to this issue: hashicorp/terraform#19898

I've also updated the prefix variable to have a default of an empty string. Which should be a nicer experience then having to explicitly set the attribute to an empty string as part of module inputs if you don't want a prefix and location info pre-pended to the bucket name.
Should make experiences like this a little cleaner: #12

@morgante morgante self-requested a review May 26, 2020 15:11
Copy link
Contributor

@morgante morgante left a comment

Choose a reason for hiding this comment

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

Thanks for the contribution!

@pkatsovich pkatsovich changed the title add support for `Co and blocks add support for cors and website blocks May 26, 2020
variables.tf Outdated Show resolved Hide resolved
@morgante
Copy link
Contributor

@pkatsovich Make sure to also regenerate the docs.

@pkatsovich
Copy link
Contributor Author

@morgante 😅, ofcourse.. updated.

Copy link
Contributor

@morgante morgante left a comment

Choose a reason for hiding this comment

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

Great, thanks! If you get a chance it'd be nice to add these to the examples/tests.

@morgante morgante merged commit 69dafb3 into terraform-google-modules:master May 26, 2020
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.

None yet

2 participants