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

Enable static website for storage account #459

Closed
l3ender opened this issue Mar 16, 2021 · 5 comments · Fixed by #878
Closed

Enable static website for storage account #459

l3ender opened this issue Mar 16, 2021 · 5 comments · Fixed by #878
Labels
has_pr PR fixes have been made medium_priority Medium priority new_feature New feature requirments

Comments

@l3ender
Copy link
Contributor

l3ender commented Mar 16, 2021

SUMMARY

It doesn't appear there is a way to enable the "static website" feature of a storage account.

image

ISSUE TYPE
  • Feature Idea
COMPONENT NAME

plugins/modules/azure_rm_storageaccount.py

ADDITIONAL INFORMATION

The azure cli equivalent of this is az storage blob service-properties. It's non-intuitively named under storage "blob", but these appear to be settings specific for the storage "account".

@paultaiton
Copy link
Contributor

paultaiton commented Mar 19, 2021

I can't commit to this issue as I've already got a lot on my plate currently, however I had some relevant feedback.

The specific tunable is part of the az storage blob cli sub-command because in the Python SDK it is part of the azure-storage-blob package ( https://pypi.org/project/azure-storage-blob/ , https://docs.microsoft.com/en-us/azure/developer/python/sdk/storage/storage-blob-readme?view=storage-py-v12 ) and is part of the data plane, not the management plane. The Ansible module that corresponds to this kind of operation is azure_rm_storageblob . The storageblob module does not currently have the ability to tune containers for static websites, however it is definitely the place for it to be added.

@l3ender
Copy link
Contributor Author

l3ender commented Mar 19, 2021

Thanks for the detail, Paul. I plan to pick this up next week.

How would you suggest modifying azure_rm_storageblob for this feature? The module currently has blob container name as a required field, but modifying service properties can be done on a storage account with no containers.

@paultaiton
Copy link
Contributor

storageblob may not be the best place. It's definitely part of the same SDK package, but it may make sense to make a new module, something like azure_rm_storageaccount_staticwebsite that will instantiate it. I thought the property was container level, not account level.
It could be added to the storageaccount module, however that one is already REALLY complex, so I'd personally go for making a new one specific to staticwebsite. You can re-use the azure-storage-blob from module_utils.

@l3ender
Copy link
Contributor Author

l3ender commented Aug 8, 2021

I started looking at implementing this feature (more generically, supporting service properties for a storage account), but I ran into dependency troubles due to the azure-storage package being deprecated and replaced by separate/different components (see 0.37.0 release notes).

Due to this I'd like to wait until dependency packages have been updated (#130). After that I will pick this effort up.

cc @Fred-sun

@Fred-sun Fred-sun added medium_priority Medium priority new_feature New feature requirments work in In trying to solve, or in working with contributors labels Aug 25, 2021
@l3ender
Copy link
Contributor Author

l3ender commented Jun 11, 2022

I've raised #878 to add this feature.

@Fred-sun Fred-sun added has_pr PR fixes have been made and removed work in In trying to solve, or in working with contributors labels Jun 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
has_pr PR fixes have been made medium_priority Medium priority new_feature New feature requirments
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants