1. Packages
  2. Azure Classic
  3. API Docs
  4. storage
  5. ContainerImmutabilityPolicy

We recommend using Azure Native.

Azure v6.22.0 published on Tuesday, Apr 1, 2025 by Pulumi

azure.storage.ContainerImmutabilityPolicy

Explore with Pulumi AI

Manages an Immutability Policy for a Container within an Azure Storage Account.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";

const example = new azure.core.ResourceGroup("example", {
    name: "example-resources",
    location: "West Europe",
});
const exampleAccount = new azure.storage.Account("example", {
    name: "examplestoraccount",
    resourceGroupName: example.name,
    location: example.location,
    accountTier: "Standard",
    accountReplicationType: "LRS",
    tags: {
        environment: "staging",
    },
});
const exampleContainer = new azure.storage.Container("example", {
    name: "example",
    storageAccountName: exampleAccount.name,
    containerAccessType: "private",
});
const exampleContainerImmutabilityPolicy = new azure.storage.ContainerImmutabilityPolicy("example", {
    storageContainerResourceManagerId: exampleContainer.resourceManagerId,
    immutabilityPeriodInDays: 14,
    protectedAppendWritesAllEnabled: false,
    protectedAppendWritesEnabled: true,
});
Copy
import pulumi
import pulumi_azure as azure

example = azure.core.ResourceGroup("example",
    name="example-resources",
    location="West Europe")
example_account = azure.storage.Account("example",
    name="examplestoraccount",
    resource_group_name=example.name,
    location=example.location,
    account_tier="Standard",
    account_replication_type="LRS",
    tags={
        "environment": "staging",
    })
example_container = azure.storage.Container("example",
    name="example",
    storage_account_name=example_account.name,
    container_access_type="private")
example_container_immutability_policy = azure.storage.ContainerImmutabilityPolicy("example",
    storage_container_resource_manager_id=example_container.resource_manager_id,
    immutability_period_in_days=14,
    protected_append_writes_all_enabled=False,
    protected_append_writes_enabled=True)
Copy
package main

import (
	"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
	"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/storage"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
			Name:     pulumi.String("example-resources"),
			Location: pulumi.String("West Europe"),
		})
		if err != nil {
			return err
		}
		exampleAccount, err := storage.NewAccount(ctx, "example", &storage.AccountArgs{
			Name:                   pulumi.String("examplestoraccount"),
			ResourceGroupName:      example.Name,
			Location:               example.Location,
			AccountTier:            pulumi.String("Standard"),
			AccountReplicationType: pulumi.String("LRS"),
			Tags: pulumi.StringMap{
				"environment": pulumi.String("staging"),
			},
		})
		if err != nil {
			return err
		}
		exampleContainer, err := storage.NewContainer(ctx, "example", &storage.ContainerArgs{
			Name:                pulumi.String("example"),
			StorageAccountName:  exampleAccount.Name,
			ContainerAccessType: pulumi.String("private"),
		})
		if err != nil {
			return err
		}
		_, err = storage.NewContainerImmutabilityPolicy(ctx, "example", &storage.ContainerImmutabilityPolicyArgs{
			StorageContainerResourceManagerId: exampleContainer.ResourceManagerId,
			ImmutabilityPeriodInDays:          pulumi.Int(14),
			ProtectedAppendWritesAllEnabled:   pulumi.Bool(false),
			ProtectedAppendWritesEnabled:      pulumi.Bool(true),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Azure = Pulumi.Azure;

return await Deployment.RunAsync(() => 
{
    var example = new Azure.Core.ResourceGroup("example", new()
    {
        Name = "example-resources",
        Location = "West Europe",
    });

    var exampleAccount = new Azure.Storage.Account("example", new()
    {
        Name = "examplestoraccount",
        ResourceGroupName = example.Name,
        Location = example.Location,
        AccountTier = "Standard",
        AccountReplicationType = "LRS",
        Tags = 
        {
            { "environment", "staging" },
        },
    });

    var exampleContainer = new Azure.Storage.Container("example", new()
    {
        Name = "example",
        StorageAccountName = exampleAccount.Name,
        ContainerAccessType = "private",
    });

    var exampleContainerImmutabilityPolicy = new Azure.Storage.ContainerImmutabilityPolicy("example", new()
    {
        StorageContainerResourceManagerId = exampleContainer.ResourceManagerId,
        ImmutabilityPeriodInDays = 14,
        ProtectedAppendWritesAllEnabled = false,
        ProtectedAppendWritesEnabled = true,
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azure.core.ResourceGroup;
import com.pulumi.azure.core.ResourceGroupArgs;
import com.pulumi.azure.storage.Account;
import com.pulumi.azure.storage.AccountArgs;
import com.pulumi.azure.storage.Container;
import com.pulumi.azure.storage.ContainerArgs;
import com.pulumi.azure.storage.ContainerImmutabilityPolicy;
import com.pulumi.azure.storage.ContainerImmutabilityPolicyArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        var example = new ResourceGroup("example", ResourceGroupArgs.builder()
            .name("example-resources")
            .location("West Europe")
            .build());

        var exampleAccount = new Account("exampleAccount", AccountArgs.builder()
            .name("examplestoraccount")
            .resourceGroupName(example.name())
            .location(example.location())
            .accountTier("Standard")
            .accountReplicationType("LRS")
            .tags(Map.of("environment", "staging"))
            .build());

        var exampleContainer = new Container("exampleContainer", ContainerArgs.builder()
            .name("example")
            .storageAccountName(exampleAccount.name())
            .containerAccessType("private")
            .build());

        var exampleContainerImmutabilityPolicy = new ContainerImmutabilityPolicy("exampleContainerImmutabilityPolicy", ContainerImmutabilityPolicyArgs.builder()
            .storageContainerResourceManagerId(exampleContainer.resourceManagerId())
            .immutabilityPeriodInDays(14)
            .protectedAppendWritesAllEnabled(false)
            .protectedAppendWritesEnabled(true)
            .build());

    }
}
Copy
resources:
  example:
    type: azure:core:ResourceGroup
    properties:
      name: example-resources
      location: West Europe
  exampleAccount:
    type: azure:storage:Account
    name: example
    properties:
      name: examplestoraccount
      resourceGroupName: ${example.name}
      location: ${example.location}
      accountTier: Standard
      accountReplicationType: LRS
      tags:
        environment: staging
  exampleContainer:
    type: azure:storage:Container
    name: example
    properties:
      name: example
      storageAccountName: ${exampleAccount.name}
      containerAccessType: private
  exampleContainerImmutabilityPolicy:
    type: azure:storage:ContainerImmutabilityPolicy
    name: example
    properties:
      storageContainerResourceManagerId: ${exampleContainer.resourceManagerId}
      immutabilityPeriodInDays: 14
      protectedAppendWritesAllEnabled: false
      protectedAppendWritesEnabled: true
Copy

Create ContainerImmutabilityPolicy Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new ContainerImmutabilityPolicy(name: string, args: ContainerImmutabilityPolicyArgs, opts?: CustomResourceOptions);
@overload
def ContainerImmutabilityPolicy(resource_name: str,
                                args: ContainerImmutabilityPolicyArgs,
                                opts: Optional[ResourceOptions] = None)

@overload
def ContainerImmutabilityPolicy(resource_name: str,
                                opts: Optional[ResourceOptions] = None,
                                immutability_period_in_days: Optional[int] = None,
                                storage_container_resource_manager_id: Optional[str] = None,
                                locked: Optional[bool] = None,
                                protected_append_writes_all_enabled: Optional[bool] = None,
                                protected_append_writes_enabled: Optional[bool] = None)
func NewContainerImmutabilityPolicy(ctx *Context, name string, args ContainerImmutabilityPolicyArgs, opts ...ResourceOption) (*ContainerImmutabilityPolicy, error)
public ContainerImmutabilityPolicy(string name, ContainerImmutabilityPolicyArgs args, CustomResourceOptions? opts = null)
public ContainerImmutabilityPolicy(String name, ContainerImmutabilityPolicyArgs args)
public ContainerImmutabilityPolicy(String name, ContainerImmutabilityPolicyArgs args, CustomResourceOptions options)
type: azure:storage:ContainerImmutabilityPolicy
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. ContainerImmutabilityPolicyArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. ContainerImmutabilityPolicyArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. ContainerImmutabilityPolicyArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. ContainerImmutabilityPolicyArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. ContainerImmutabilityPolicyArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

Constructor example

The following reference example uses placeholder values for all input properties.

var containerImmutabilityPolicyResource = new Azure.Storage.ContainerImmutabilityPolicy("containerImmutabilityPolicyResource", new()
{
    ImmutabilityPeriodInDays = 0,
    StorageContainerResourceManagerId = "string",
    Locked = false,
    ProtectedAppendWritesAllEnabled = false,
    ProtectedAppendWritesEnabled = false,
});
Copy
example, err := storage.NewContainerImmutabilityPolicy(ctx, "containerImmutabilityPolicyResource", &storage.ContainerImmutabilityPolicyArgs{
	ImmutabilityPeriodInDays:          pulumi.Int(0),
	StorageContainerResourceManagerId: pulumi.String("string"),
	Locked:                            pulumi.Bool(false),
	ProtectedAppendWritesAllEnabled:   pulumi.Bool(false),
	ProtectedAppendWritesEnabled:      pulumi.Bool(false),
})
Copy
var containerImmutabilityPolicyResource = new ContainerImmutabilityPolicy("containerImmutabilityPolicyResource", ContainerImmutabilityPolicyArgs.builder()
    .immutabilityPeriodInDays(0)
    .storageContainerResourceManagerId("string")
    .locked(false)
    .protectedAppendWritesAllEnabled(false)
    .protectedAppendWritesEnabled(false)
    .build());
Copy
container_immutability_policy_resource = azure.storage.ContainerImmutabilityPolicy("containerImmutabilityPolicyResource",
    immutability_period_in_days=0,
    storage_container_resource_manager_id="string",
    locked=False,
    protected_append_writes_all_enabled=False,
    protected_append_writes_enabled=False)
Copy
const containerImmutabilityPolicyResource = new azure.storage.ContainerImmutabilityPolicy("containerImmutabilityPolicyResource", {
    immutabilityPeriodInDays: 0,
    storageContainerResourceManagerId: "string",
    locked: false,
    protectedAppendWritesAllEnabled: false,
    protectedAppendWritesEnabled: false,
});
Copy
type: azure:storage:ContainerImmutabilityPolicy
properties:
    immutabilityPeriodInDays: 0
    locked: false
    protectedAppendWritesAllEnabled: false
    protectedAppendWritesEnabled: false
    storageContainerResourceManagerId: string
Copy

ContainerImmutabilityPolicy Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The ContainerImmutabilityPolicy resource accepts the following input properties:

ImmutabilityPeriodInDays This property is required. int
The time interval in days that the data needs to be kept in a non-erasable and non-modifiable state.
StorageContainerResourceManagerId
This property is required.
Changes to this property will trigger replacement.
string
The Resource Manager ID of the Storage Container where this Immutability Policy should be applied. Changing this forces a new resource to be created.
Locked bool

Whether to lock this immutability policy. Cannot be set to false once the policy has been locked.

!> Locking an Immutability Policy Once an Immutability Policy has been locked, it cannot be unlocked. After locking, it will only be possible to increase the value for retention_period_in_days up to 5 times for the lifetime of the policy. No other properties will be updateable. Furthermore, the Storage Container and the Storage Account in which it resides will become protected by the policy. It will no longer be possible to delete the Storage Container or the Storage Account. Please refer to official documentation for more information.

ProtectedAppendWritesAllEnabled bool
Whether to allow protected append writes to block and append blobs to the container. Defaults to false. Cannot be set with protected_append_writes_enabled.
ProtectedAppendWritesEnabled bool
Whether to allow protected append writes to append blobs to the container. Defaults to false. Cannot be set with protected_append_writes_all_enabled.
ImmutabilityPeriodInDays This property is required. int
The time interval in days that the data needs to be kept in a non-erasable and non-modifiable state.
StorageContainerResourceManagerId
This property is required.
Changes to this property will trigger replacement.
string
The Resource Manager ID of the Storage Container where this Immutability Policy should be applied. Changing this forces a new resource to be created.
Locked bool

Whether to lock this immutability policy. Cannot be set to false once the policy has been locked.

!> Locking an Immutability Policy Once an Immutability Policy has been locked, it cannot be unlocked. After locking, it will only be possible to increase the value for retention_period_in_days up to 5 times for the lifetime of the policy. No other properties will be updateable. Furthermore, the Storage Container and the Storage Account in which it resides will become protected by the policy. It will no longer be possible to delete the Storage Container or the Storage Account. Please refer to official documentation for more information.

ProtectedAppendWritesAllEnabled bool
Whether to allow protected append writes to block and append blobs to the container. Defaults to false. Cannot be set with protected_append_writes_enabled.
ProtectedAppendWritesEnabled bool
Whether to allow protected append writes to append blobs to the container. Defaults to false. Cannot be set with protected_append_writes_all_enabled.
immutabilityPeriodInDays This property is required. Integer
The time interval in days that the data needs to be kept in a non-erasable and non-modifiable state.
storageContainerResourceManagerId
This property is required.
Changes to this property will trigger replacement.
String
The Resource Manager ID of the Storage Container where this Immutability Policy should be applied. Changing this forces a new resource to be created.
locked Boolean

Whether to lock this immutability policy. Cannot be set to false once the policy has been locked.

!> Locking an Immutability Policy Once an Immutability Policy has been locked, it cannot be unlocked. After locking, it will only be possible to increase the value for retention_period_in_days up to 5 times for the lifetime of the policy. No other properties will be updateable. Furthermore, the Storage Container and the Storage Account in which it resides will become protected by the policy. It will no longer be possible to delete the Storage Container or the Storage Account. Please refer to official documentation for more information.

protectedAppendWritesAllEnabled Boolean
Whether to allow protected append writes to block and append blobs to the container. Defaults to false. Cannot be set with protected_append_writes_enabled.
protectedAppendWritesEnabled Boolean
Whether to allow protected append writes to append blobs to the container. Defaults to false. Cannot be set with protected_append_writes_all_enabled.
immutabilityPeriodInDays This property is required. number
The time interval in days that the data needs to be kept in a non-erasable and non-modifiable state.
storageContainerResourceManagerId
This property is required.
Changes to this property will trigger replacement.
string
The Resource Manager ID of the Storage Container where this Immutability Policy should be applied. Changing this forces a new resource to be created.
locked boolean

Whether to lock this immutability policy. Cannot be set to false once the policy has been locked.

!> Locking an Immutability Policy Once an Immutability Policy has been locked, it cannot be unlocked. After locking, it will only be possible to increase the value for retention_period_in_days up to 5 times for the lifetime of the policy. No other properties will be updateable. Furthermore, the Storage Container and the Storage Account in which it resides will become protected by the policy. It will no longer be possible to delete the Storage Container or the Storage Account. Please refer to official documentation for more information.

protectedAppendWritesAllEnabled boolean
Whether to allow protected append writes to block and append blobs to the container. Defaults to false. Cannot be set with protected_append_writes_enabled.
protectedAppendWritesEnabled boolean
Whether to allow protected append writes to append blobs to the container. Defaults to false. Cannot be set with protected_append_writes_all_enabled.
immutability_period_in_days This property is required. int
The time interval in days that the data needs to be kept in a non-erasable and non-modifiable state.
storage_container_resource_manager_id
This property is required.
Changes to this property will trigger replacement.
str
The Resource Manager ID of the Storage Container where this Immutability Policy should be applied. Changing this forces a new resource to be created.
locked bool

Whether to lock this immutability policy. Cannot be set to false once the policy has been locked.

!> Locking an Immutability Policy Once an Immutability Policy has been locked, it cannot be unlocked. After locking, it will only be possible to increase the value for retention_period_in_days up to 5 times for the lifetime of the policy. No other properties will be updateable. Furthermore, the Storage Container and the Storage Account in which it resides will become protected by the policy. It will no longer be possible to delete the Storage Container or the Storage Account. Please refer to official documentation for more information.

protected_append_writes_all_enabled bool
Whether to allow protected append writes to block and append blobs to the container. Defaults to false. Cannot be set with protected_append_writes_enabled.
protected_append_writes_enabled bool
Whether to allow protected append writes to append blobs to the container. Defaults to false. Cannot be set with protected_append_writes_all_enabled.
immutabilityPeriodInDays This property is required. Number
The time interval in days that the data needs to be kept in a non-erasable and non-modifiable state.
storageContainerResourceManagerId
This property is required.
Changes to this property will trigger replacement.
String
The Resource Manager ID of the Storage Container where this Immutability Policy should be applied. Changing this forces a new resource to be created.
locked Boolean

Whether to lock this immutability policy. Cannot be set to false once the policy has been locked.

!> Locking an Immutability Policy Once an Immutability Policy has been locked, it cannot be unlocked. After locking, it will only be possible to increase the value for retention_period_in_days up to 5 times for the lifetime of the policy. No other properties will be updateable. Furthermore, the Storage Container and the Storage Account in which it resides will become protected by the policy. It will no longer be possible to delete the Storage Container or the Storage Account. Please refer to official documentation for more information.

protectedAppendWritesAllEnabled Boolean
Whether to allow protected append writes to block and append blobs to the container. Defaults to false. Cannot be set with protected_append_writes_enabled.
protectedAppendWritesEnabled Boolean
Whether to allow protected append writes to append blobs to the container. Defaults to false. Cannot be set with protected_append_writes_all_enabled.

Outputs

All input properties are implicitly available as output properties. Additionally, the ContainerImmutabilityPolicy resource produces the following output properties:

Id string
The provider-assigned unique ID for this managed resource.
Id string
The provider-assigned unique ID for this managed resource.
id String
The provider-assigned unique ID for this managed resource.
id string
The provider-assigned unique ID for this managed resource.
id str
The provider-assigned unique ID for this managed resource.
id String
The provider-assigned unique ID for this managed resource.

Look up Existing ContainerImmutabilityPolicy Resource

Get an existing ContainerImmutabilityPolicy resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: ContainerImmutabilityPolicyState, opts?: CustomResourceOptions): ContainerImmutabilityPolicy
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        immutability_period_in_days: Optional[int] = None,
        locked: Optional[bool] = None,
        protected_append_writes_all_enabled: Optional[bool] = None,
        protected_append_writes_enabled: Optional[bool] = None,
        storage_container_resource_manager_id: Optional[str] = None) -> ContainerImmutabilityPolicy
func GetContainerImmutabilityPolicy(ctx *Context, name string, id IDInput, state *ContainerImmutabilityPolicyState, opts ...ResourceOption) (*ContainerImmutabilityPolicy, error)
public static ContainerImmutabilityPolicy Get(string name, Input<string> id, ContainerImmutabilityPolicyState? state, CustomResourceOptions? opts = null)
public static ContainerImmutabilityPolicy get(String name, Output<String> id, ContainerImmutabilityPolicyState state, CustomResourceOptions options)
resources:  _:    type: azure:storage:ContainerImmutabilityPolicy    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
The following state arguments are supported:
ImmutabilityPeriodInDays int
The time interval in days that the data needs to be kept in a non-erasable and non-modifiable state.
Locked bool

Whether to lock this immutability policy. Cannot be set to false once the policy has been locked.

!> Locking an Immutability Policy Once an Immutability Policy has been locked, it cannot be unlocked. After locking, it will only be possible to increase the value for retention_period_in_days up to 5 times for the lifetime of the policy. No other properties will be updateable. Furthermore, the Storage Container and the Storage Account in which it resides will become protected by the policy. It will no longer be possible to delete the Storage Container or the Storage Account. Please refer to official documentation for more information.

ProtectedAppendWritesAllEnabled bool
Whether to allow protected append writes to block and append blobs to the container. Defaults to false. Cannot be set with protected_append_writes_enabled.
ProtectedAppendWritesEnabled bool
Whether to allow protected append writes to append blobs to the container. Defaults to false. Cannot be set with protected_append_writes_all_enabled.
StorageContainerResourceManagerId Changes to this property will trigger replacement. string
The Resource Manager ID of the Storage Container where this Immutability Policy should be applied. Changing this forces a new resource to be created.
ImmutabilityPeriodInDays int
The time interval in days that the data needs to be kept in a non-erasable and non-modifiable state.
Locked bool

Whether to lock this immutability policy. Cannot be set to false once the policy has been locked.

!> Locking an Immutability Policy Once an Immutability Policy has been locked, it cannot be unlocked. After locking, it will only be possible to increase the value for retention_period_in_days up to 5 times for the lifetime of the policy. No other properties will be updateable. Furthermore, the Storage Container and the Storage Account in which it resides will become protected by the policy. It will no longer be possible to delete the Storage Container or the Storage Account. Please refer to official documentation for more information.

ProtectedAppendWritesAllEnabled bool
Whether to allow protected append writes to block and append blobs to the container. Defaults to false. Cannot be set with protected_append_writes_enabled.
ProtectedAppendWritesEnabled bool
Whether to allow protected append writes to append blobs to the container. Defaults to false. Cannot be set with protected_append_writes_all_enabled.
StorageContainerResourceManagerId Changes to this property will trigger replacement. string
The Resource Manager ID of the Storage Container where this Immutability Policy should be applied. Changing this forces a new resource to be created.
immutabilityPeriodInDays Integer
The time interval in days that the data needs to be kept in a non-erasable and non-modifiable state.
locked Boolean

Whether to lock this immutability policy. Cannot be set to false once the policy has been locked.

!> Locking an Immutability Policy Once an Immutability Policy has been locked, it cannot be unlocked. After locking, it will only be possible to increase the value for retention_period_in_days up to 5 times for the lifetime of the policy. No other properties will be updateable. Furthermore, the Storage Container and the Storage Account in which it resides will become protected by the policy. It will no longer be possible to delete the Storage Container or the Storage Account. Please refer to official documentation for more information.

protectedAppendWritesAllEnabled Boolean
Whether to allow protected append writes to block and append blobs to the container. Defaults to false. Cannot be set with protected_append_writes_enabled.
protectedAppendWritesEnabled Boolean
Whether to allow protected append writes to append blobs to the container. Defaults to false. Cannot be set with protected_append_writes_all_enabled.
storageContainerResourceManagerId Changes to this property will trigger replacement. String
The Resource Manager ID of the Storage Container where this Immutability Policy should be applied. Changing this forces a new resource to be created.
immutabilityPeriodInDays number
The time interval in days that the data needs to be kept in a non-erasable and non-modifiable state.
locked boolean

Whether to lock this immutability policy. Cannot be set to false once the policy has been locked.

!> Locking an Immutability Policy Once an Immutability Policy has been locked, it cannot be unlocked. After locking, it will only be possible to increase the value for retention_period_in_days up to 5 times for the lifetime of the policy. No other properties will be updateable. Furthermore, the Storage Container and the Storage Account in which it resides will become protected by the policy. It will no longer be possible to delete the Storage Container or the Storage Account. Please refer to official documentation for more information.

protectedAppendWritesAllEnabled boolean
Whether to allow protected append writes to block and append blobs to the container. Defaults to false. Cannot be set with protected_append_writes_enabled.
protectedAppendWritesEnabled boolean
Whether to allow protected append writes to append blobs to the container. Defaults to false. Cannot be set with protected_append_writes_all_enabled.
storageContainerResourceManagerId Changes to this property will trigger replacement. string
The Resource Manager ID of the Storage Container where this Immutability Policy should be applied. Changing this forces a new resource to be created.
immutability_period_in_days int
The time interval in days that the data needs to be kept in a non-erasable and non-modifiable state.
locked bool

Whether to lock this immutability policy. Cannot be set to false once the policy has been locked.

!> Locking an Immutability Policy Once an Immutability Policy has been locked, it cannot be unlocked. After locking, it will only be possible to increase the value for retention_period_in_days up to 5 times for the lifetime of the policy. No other properties will be updateable. Furthermore, the Storage Container and the Storage Account in which it resides will become protected by the policy. It will no longer be possible to delete the Storage Container or the Storage Account. Please refer to official documentation for more information.

protected_append_writes_all_enabled bool
Whether to allow protected append writes to block and append blobs to the container. Defaults to false. Cannot be set with protected_append_writes_enabled.
protected_append_writes_enabled bool
Whether to allow protected append writes to append blobs to the container. Defaults to false. Cannot be set with protected_append_writes_all_enabled.
storage_container_resource_manager_id Changes to this property will trigger replacement. str
The Resource Manager ID of the Storage Container where this Immutability Policy should be applied. Changing this forces a new resource to be created.
immutabilityPeriodInDays Number
The time interval in days that the data needs to be kept in a non-erasable and non-modifiable state.
locked Boolean

Whether to lock this immutability policy. Cannot be set to false once the policy has been locked.

!> Locking an Immutability Policy Once an Immutability Policy has been locked, it cannot be unlocked. After locking, it will only be possible to increase the value for retention_period_in_days up to 5 times for the lifetime of the policy. No other properties will be updateable. Furthermore, the Storage Container and the Storage Account in which it resides will become protected by the policy. It will no longer be possible to delete the Storage Container or the Storage Account. Please refer to official documentation for more information.

protectedAppendWritesAllEnabled Boolean
Whether to allow protected append writes to block and append blobs to the container. Defaults to false. Cannot be set with protected_append_writes_enabled.
protectedAppendWritesEnabled Boolean
Whether to allow protected append writes to append blobs to the container. Defaults to false. Cannot be set with protected_append_writes_all_enabled.
storageContainerResourceManagerId Changes to this property will trigger replacement. String
The Resource Manager ID of the Storage Container where this Immutability Policy should be applied. Changing this forces a new resource to be created.

Import

Storage Container Immutability Policies can be imported using the resource id, e.g.

$ pulumi import azure:storage/containerImmutabilityPolicy:ContainerImmutabilityPolicy example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myresourcegroup/providers/Microsoft.Storage/storageAccounts/myaccount/blobServices/default/containers/mycontainer/immutabilityPolicies/default
Copy

To learn more about importing existing cloud resources, see Importing resources.

Package Details

Repository
Azure Classic pulumi/pulumi-azure
License
Apache-2.0
Notes
This Pulumi package is based on the azurerm Terraform Provider.