azure::storage-account

Creates a storage account

Example

azure::storage-account file-storage-account-example
    resource-group: $(azure::resource-group file-resource-group)
    name: "storageaccount"

    cors-rule
        allowed-headers: ["*"]
        allowed-methods: ["PUT"]
        allowed-origins: ["*"]
        exposed-headers: ["*"]
        max-age: 6
        type: "table"
    end

    lifecycle
    rule
        name: "rule1"
        enabled: false
        definition
            action
                base-blob
                    delete-days: 1
                    tier-to-archive-days: 1
                    tier-to-cool-days: 1
                end

                snapshot
                    delete-days: 1
                end
            end

            filter
                prefix-matches: [
                    container/box1
                ]
            end
        end
    end

    tags: {
        Name: "storageaccount"
    }
end

Attributes

Attribute Description
cors-rule set subresource

The cors rules associated with the Storage Account.

allowed-headers set
A list of the allowed headers. (Required)
allowed-methods set
A list of the allowed methods. (Required)
allowed-origins set
A list of the allowed origins. (Required)
exposed-headers set
A list of the exposed headers.
max-age
A maximum age, in seconds. (Required)
type
Specifies which service the rule belongs to. Valid values are blob, file, queue or table. (Required)
resource-group The Resource Group under which the Storage Account would reside. (Required)
name The name of the Storage Account. (Required)
tags map The tags for the Storage Account.
lifecycle subresource

The lifecycle associated with the Storage Account. Only supported when ‘upgrade-account-v2’ set to ``true.

name
The name of the lifecycle policy. Currently only supported value is DefaultManagementPolicy. Defaults to DefaultManagementPolicy. Currently the only supported value is DefaultManagementPolicy.
rule set subresource

A set of rules for the lifecycle policy. (Required)

name
Name of the rule. (Required)
type
Type of rule. Currently only supported value is Lifecycle. Defaults to Lifecycle.
enabled
Enable/Disable the rule. Defaults to true i.e Enabled.
definition
The rule details. (Required)
upgrade-account-v2 Upgrade account to General Purpose Account Kind V2. Cannot be downgraded.

Outputs

Attribute Description
id The ID of the Storage Account.