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 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 the only supported value is Lifecycle.
enabled
Enable/Disable the rule. Defaults to true i.e Enabled.
definition subresource

The rule details. (Required)

action subresource

The action details for the policy rule. (Required)

base-blob
The policy action for the base blob. (Required)
snapshot
The policy action for snapshot.
filter subresource

The filter details for the policy rule.

blob-types set
Allowed blob types for the filter. Defaults to blockBlob. Valid values are blockBlob and appendBlob.
prefix-matches set
A set of prefixes for the blob objects to be filtered on.
upgrade-account-v2 Upgrade account to General Purpose Account Kind V2. Cannot be downgraded.
blob-public-access When set to true, allows blob public access, configured by individual containers.

Outputs

Attribute Description
id The ID of the Storage Account.