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

azure_rm_storageblob doesn't allow to change the blob's access tier #1197

Closed
ppodgorsek opened this issue Jun 24, 2023 · 2 comments · Fixed by #1764
Closed

azure_rm_storageblob doesn't allow to change the blob's access tier #1197

ppodgorsek opened this issue Jun 24, 2023 · 2 comments · Fixed by #1764
Labels
has_pr PR fixes have been made medium_priority Medium priority new_feature New feature requirments question Further information is requested

Comments

@ppodgorsek
Copy link

SUMMARY

Currently, the azure_rm_storageblob module allows to upload a blob and that blob inherits the access tier of its container.

The Azure API allows to set a blob's access tier, it would therefore be useful to be able to set/override it on the blob itself too.
For example, a container could have a cool tier, while the blobs within it could be archived. (the containers cannot be assigned to the archive tier)

This would be useful in cases where blobs are used to back up data, such data is rarely read.

ISSUE TYPE
  • Feature Idea
COMPONENT NAME

azure_rm_storageblob

ADDITIONAL INFORMATION

Below is an example of how this could look like:

- name: Upload backup file to storage container
  azure_rm_storageblob:
    client_id: "{{ azure_client_id }}"
    secret: "{{ azure_client_secret }}"
    subscription_id: "{{ backup_subscription_id }}"
    tenant: "{{ azure_tenant }}"
    resource_group: "{{ backup_resource_group }}"
    storage_account_name: "{{ backup_storage_account }}"
    container: "{{ backup_storage_container }}"
    blob: "{{ backup_archive_file }}"
    src: "{{ backup_archive_file_path }}"
    content_type: 'application/gzip'
    access_tier: "archive"
  tags:
    - backup
    - storage
@Fred-sun
Copy link
Collaborator

Fred-sun commented Jul 7, 2023

@ppodgorsek The SDK that azure_rm_storageblob relies on does not support 'access_tier' and cannot be added for the time being. Thank you!

@Fred-sun Fred-sun added question Further information is requested medium_priority Medium priority new_feature New feature requirments hold The problem holds for a particular reason labels Jul 7, 2023
@ppodgorsek
Copy link
Author

ppodgorsek commented Jul 7, 2023

@Fred-sun Thank you for your answer. I have a question to better understand this issue. I would assume there is only one SDK provided by Azure, or are there multiple versions depending on programming languages?

Terraform has been supporting this for a long time already, but I find it kind of overkill to introduce Terraform for such a mundane task. See lines 252 to 262 in https://github.com/hashicorp/terraform-provider-azurerm/blob/main/internal/services/storage/storage_blob_resource.go

@Fred-sun Fred-sun added has_pr PR fixes have been made and removed hold The problem holds for a particular reason labels Nov 20, 2024
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 question Further information is requested
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants