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

Data Source: azurerm_storage_management_policy add supports for the tier_to_archive_after_days_since_last_tier_change_greater_than #18898

Merged
merged 1 commit into from
Oct 21, 2022

Conversation

magodo
Copy link
Collaborator

@magodo magodo commented Oct 21, 2022

The flatten function is used in both the resouce and the data source, which means the newly added properties in resource would also need to be added in the data source, otherwise would get following panic:

panic: Invalid address to set: []string{"rule", "0", "actions", "0", "snapshot", "0", "tier_to_archive_after_days_since_last_tier_change_greater_than"}

Test

💤  TF_ACC=1 go test -v -timeout=20h ./internal/services/storage -run='TestAccDataSourceStorageManagementPolicy_'
=== RUN   TestAccDataSourceStorageManagementPolicy_basic
=== PAUSE TestAccDataSourceStorageManagementPolicy_basic
=== RUN   TestAccDataSourceStorageManagementPolicy_blobTypes
=== PAUSE TestAccDataSourceStorageManagementPolicy_blobTypes
=== CONT  TestAccDataSourceStorageManagementPolicy_basic
=== CONT  TestAccDataSourceStorageManagementPolicy_blobTypes
--- PASS: TestAccDataSourceStorageManagementPolicy_basic (86.64s)
--- PASS: TestAccDataSourceStorageManagementPolicy_blobTypes (94.56s)
PASS
ok      github.com/hashicorp/terraform-provider-azurerm/internal/services/storage       94.572s

… `tier_to_archive_after_days_since_last_tier_change_greater_than`
Copy link
Member

@stephybun stephybun 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 this @magodo LGTM 🧇

@stephybun stephybun merged commit 779963d into hashicorp:main Oct 21, 2022
@github-actions github-actions bot added this to the v3.28.0 milestone Oct 21, 2022
stephybun added a commit that referenced this pull request Oct 21, 2022
@github-actions
Copy link

This functionality has been released in v3.28.0 of the Terraform Provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you!

@github-actions
Copy link

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 contributions.
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 Nov 25, 2022
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.

None yet

2 participants