-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
support for change_feed
, versioning_enabled,
default_service_version , and
last_access_time_enabled within the
blob_properties` block
#11301
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hi @yupwei68
Thanks for this PR.
I've taken a look through here and left some comments inline, if we can fix those up then we should be able to take another look - but in particular if we can fix up the descriptions to be clearer that'd be great.
Thanks!
"2008-10-27", | ||
"2009-04-14", | ||
"2009-07-17", | ||
"2009-09-19", | ||
"2011-08-28", | ||
"2012-02-12", | ||
"2013-08-15", | ||
"2014-02-14", | ||
"2015-02-21", | ||
"2015-04-05", | ||
"2015-07-08", | ||
"2015-12-11", | ||
"2016-05-31", | ||
"2017-04-17", | ||
"2017-07-29", | ||
"2017-11-09", | ||
"2018-03-28", | ||
"2018-11-09", | ||
"2019-02-02", | ||
"2019-07-07", | ||
"2019-12-12", | ||
"2020-02-10", | ||
"2020-04-08", | ||
"2020-06-12", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks like at least one of these doesn't exist? https://docs.microsoft.com/en-us/rest/api/storageservices/previous-azure-storage-service-versions
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The "2008-10-27" and "2020-06-12" are supported, but not list in the list. I've tested these two.
"name": { | ||
Type: schema.TypeString, | ||
Optional: true, | ||
Default: "AccessTimeTracking", | ||
ValidateFunc: validation.StringInSlice([]string{"AccessTimeTracking"}, false), | ||
}, | ||
"granularity_in_days": { | ||
Type: schema.TypeInt, | ||
Optional: true, | ||
Default: 1, | ||
ValidateFunc: validation.IntInSlice([]int{1}), | ||
}, | ||
"blob_type": { | ||
Type: schema.TypeList, | ||
Optional: true, | ||
Computed: true, | ||
Elem: &schema.Schema{ | ||
Type: schema.TypeString, | ||
ValidateFunc: validation.StringInSlice([]string{"blockBlob"}, false), | ||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
a few things here:
granularity_in_days
andblob_type
can't be set, so should be computed-only- there's a single possible value for
name
andblob_type
- so these likely shouldn't be exposed
as such this block could likely be removed in place of a single field for last_access_time_tracking_policy_enabled
- unless there's plans by the service team to add other functionality here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. The service plans to support the granularity_in_days
and blob_type
in the future. I just thought that it may be hard to covert last_access_time_tracking_policy
from bool to list in the future.
Currently azurerm_management_policy
is dependent on the last_access_time_tracking_policy
.
But I will change it into bool now.
"retention_in_days": { | ||
Type: schema.TypeInt, | ||
Optional: true, | ||
ValidateFunc: validation.IntBetween(1, 146000), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
146000/365 = 400
This is 400 years worth of changes.. is there a realistic maximum value from the service team here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. It's 400 years.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minimum value is 1 day and maximum value is 146000 days (400 years).
Hi Tom, thanks for your comments. Changes have been pushed. Tests have all passed. Please continue reviewing. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @yupwei68 - aside from one comment on a property name this looks good to me
…form-provider-azurerm into wyp-storage-blobproperties2
Hi kt, thanks for your comments. Tests have passed. The CI has failed for linter broken. Please continue reviewing. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@yupwei68 - ci needs to be fix but otherwise looks goof
…raform-provider-azurerm into wyp-storage-blobproperties2
azurerm_storage_account
blob_properties
enhancement azurerm_storage_account
support for change_feed
, versioning_enabled,
default_service_version , and
last_access_time_enabled within the
blob_properties` block
This has been released in version 2.57.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.57.0"
}
# ... other configuration ... |
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. |
Extends #9277
Fix:
#8268
#7722
#6627
=== RUN TestAccStorageAccount_blobProperties
=== PAUSE TestAccStorageAccount_blobProperties
=== CONT TestAccStorageAccount_blobProperties
--- PASS: TestAccStorageAccount_blobProperties (274.03s)
Since
restore_policy
has some update problem, it'll be enhanced when the fix is released.retentionDays
inChangeFeed
is only supported in canary regions now, all regions will be supported soon.