-
Notifications
You must be signed in to change notification settings - Fork 160
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
Add support for Immutable Storage on container #1144
base: master
Are you sure you want to change the base?
Add support for Immutable Storage on container #1144
Conversation
de707a0
to
3c3a3d8
Compare
@ninjarobot do you have any remarks? |
You want to write at least one test confirmation the JSON that is emitted in the generate ARM template is correct i.e. checking fields etc. |
From an API design, what happens if you don't want to set any policies - do you need to provide a policy regardless (bear in mind computation expressions don't allow optional arguments AFAIK, and overloads must all have the same number of arguments)? I think perhaps creating a dedicated
would be a better way to go. |
Also can you make an issue first which clearly outlines what this PR is designed to solve - normally we create issues, get them approved, and then create a PR to resolve them (in that order :-)) |
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 great, thanks for adding this support for newer storage account functionality. I made a few minor suggestions you can take or leave as applicable.
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.
Before merging, we need to modify the API - the use of a CE in this regard isn't going to work, from what I can see, from a usability perspective.
@isaacabraham, actually it works fine as all the tests pass. I verified that it works both ways and allow that optional parameter to be specified and omitted |
That's good :-) Nonetheless, I think moving to a dedicated This PR still needs tests for the new code that's been created as well as the other points mentioned (including an issue / issues that reflect the actual changes that are being made here - it's not so much about upgrading the versions but about immutable blobs etc.). Happy to talk through with you the API choices and anything else that's needed. |
I thought about that but considered immutable policy as not so big change to introduce container CE. |
ae28dca
to
1949e2f
Compare
I've implemented tests. Let me know if I miss something |
@isaacabraham my idea was to add now and preserve in the future ability to specify immutability policy |
I think so, yes. If you look elsewhere in the Farmer API, you won't really much in the way of CEs being supplied as secondary arguments to a custom keyword, and I really would like to retain the pattern that we have. You can repurpose the CE you've already built to actually be the container one - just add in the extra name parameter. You can then add that as an overload for the top-level CE What do you think? Thanks for adding the tests. |
Microsoft.Storage/storageAccounts
to 2023-05-01
Implemented: * `ImmutableStorageWithVersioning` * `RequireInfrastructureEncryption`
6a01d5e
to
21088d9
Compare
@isaacabraham I've implemented |
21088d9
to
425eb8b
Compare
425eb8b
to
a2a85e5
Compare
@isaacabraham can you please review this again? |
Implemented:
ImmutableStorageWithVersioning
RequireInfrastructureEncryption
This PR closes #I have read the contributing guidelines and have completed the following:
If I haven't completed any of the tasks above, I include the reasons why here:
Which test would you recommend to modify or implement?
Below is a minimal example configuration that includes the new features, which can be used to deploy to Azure: