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

azurerm_storage_account - add support for static website #5649

Merged
merged 10 commits into from
Feb 17, 2020
Merged

azurerm_storage_account - add support for static website #5649

merged 10 commits into from
Feb 17, 2020

Conversation

aqche
Copy link
Contributor

@aqche aqche commented Feb 8, 2020

Fixes: #1903

Adds support for static web hosting to azurerm_storage_account.

=== RUN   TestAccAzureRMStorageAccount_blobAccountProperties
=== PAUSE TestAccAzureRMStorageAccount_blobAccountProperties
=== CONT  TestAccAzureRMStorageAccount_blobAccountProperties
--- PASS: TestAccAzureRMStorageAccount_blobAccountProperties (149.02s)
PASS
ok      github.com/terraform-providers/terraform-provider-azurerm/azurerm/internal/services/storage/tests       149.069s

Optional: true,
ValidateFunc: validation.StringIsNotEmpty,
},
"error_document_404_path": {
Copy link
Contributor

Choose a reason for hiding this comment

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

Why here a path postfix? In the azure cli it is 404-document and index-document. See https://docs.microsoft.com/de-de/azure/storage/blobs/storage-blob-static-website-how-to?tabs=azure-cli

Copy link
Contributor Author

@aqche aqche Feb 8, 2020

Choose a reason for hiding this comment

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

I named these arguments based on the names from giovanni.

It's also worth noting in Azure PowerShell, the input is called ErrorDocument404Path as well.

Any thoughts/preference from maintainers?

Copy link
Contributor

Choose a reason for hiding this comment

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

The Azure CLI tends to stray from the Azure API/Portal quite a bit to make the commands shorter - so I wouldn't use it as the source of truth here.

That said - I'd agree about making these consistent - perhaps that'd make the most sense as index_document and error_404_document (to allow for other errorcodes in the future)?

website/docs/r/storage_account.html.markdown Show resolved Hide resolved
website/docs/r/storage_account.html.markdown Show resolved Hide resolved
Copy link
Contributor

@tombuildsstuff tombuildsstuff left a comment

Choose a reason for hiding this comment

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

hey @aqche

Thanks for this PR - I've taken a look through and left some comments inline but this is looking fairly good to me 👍

Thanks!

Optional: true,
ValidateFunc: validation.StringIsNotEmpty,
},
"error_document_404_path": {
Copy link
Contributor

Choose a reason for hiding this comment

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

The Azure CLI tends to stray from the Azure API/Portal quite a bit to make the commands shorter - so I wouldn't use it as the source of truth here.

That said - I'd agree about making these consistent - perhaps that'd make the most sense as index_document and error_404_document (to allow for other errorcodes in the future)?

website/docs/r/storage_account.html.markdown Outdated Show resolved Hide resolved
aqche and others added 4 commits February 10, 2020 17:11
@aqche
Copy link
Contributor Author

aqche commented Feb 11, 2020

@tombuildsstuff thanks for the review, updated the code with your suggestions! Let me know what you think.

--- PASS: TestAccAzureRMStorageAccount_staticWebsiteProperties (148.88s)

@ghost ghost removed the waiting-response label Feb 11, 2020
@aqche
Copy link
Contributor Author

aqche commented Feb 11, 2020

Fixed up the tflint errors, looks like website-lint is failing from something unrelated to this PR.

edit: fixed after merging master in

Copy link
Contributor

@tombuildsstuff tombuildsstuff left a comment

Choose a reason for hiding this comment

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

hey @aqche

Thanks for pushing those changes / apologies for the delayed re-review here.

I've taken a look through and besides one minor thing this otherwise LGTM 👍

Thanks!

Co-Authored-By: Tom Harvey <tombuildsstuff@users.noreply.github.com>
@tombuildsstuff
Copy link
Contributor

Ignoring some known test failures (which'll be fixed via #5710) - the tests look good 👍

@tombuildsstuff tombuildsstuff merged commit 3926d81 into hashicorp:master Feb 17, 2020
tombuildsstuff added a commit that referenced this pull request Feb 17, 2020
@aqche aqche deleted the storage_account_static_website branch February 17, 2020 07:04
@ghost
Copy link

ghost commented Feb 24, 2020

This has been released in version 2.0.0 of the provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. As an example:

provider "azurerm" {
    version = "~> 2.0.0"
}
# ... other configuration ...

@ghost
Copy link

ghost commented Mar 28, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 hashibot-feedback@hashicorp.com. Thanks!

@ghost ghost locked and limited conversation to collaborators Mar 28, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add support for static website to azurerm_storage_account
3 participants