CompositionalIT / farmer

Repeatable Azure deployments with ARM templates - made easy!
https://compositionalit.github.io/farmer
MIT License
514 stars 156 forks source link

Add "supports https traffic only" property storage accounts #1108

Closed fahedmarakbi closed 4 weeks ago

fahedmarakbi commented 1 month ago

This PR closes #1107

The changes in this PR are as follows:

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:

Below is a minimal example configuration that includes the new features, which can be used to deploy to Azure:

storageAccount {
    name "mystorage123"
    supports_https_traffic_only
}
ninjarobot commented 1 month ago

I tested this out in codespaces to make sure it worked as expected and did not regress anything:

let deployment = 
    arm {
        location Location.EastUS
        add_resources [
            storageAccount {
                name "mystorage03489https"
                supports_https_traffic_only
            }
            storageAccount {
                name "mystorage123abchttp"
                supports_https_traffic_only Disabled
            }
            storageAccount {
                name "mystorage123abcdefault"
            }
        ]
    }
deployment |> Writer.quickWrite "sb-secure-transit"

With HTTPS required:

image

With HTTPS disabled:

image

Default (enables it as well):

image