/terraform-azure-storage

Highly opinionated Terraform Storage management for Azure storage accounts

Primary LanguageHCLMIT LicenseMIT

Terraform storage management (for Azure)

Introduction

This module manages Azure storage

Usage

Instantiate the module by calling it from Terraform like this:

module "storage" {
  source = "dodevops/storage/azure"
  version = "<version>"
}

Requirements

No requirements.

Providers

The following providers are used by this module:

  • azurerm

Modules

No modules.

Resources

The following resources are used by this module:

Required Inputs

The following input variables are required:

location

Description: Azure location to use

Type: string

project

Description: Three letter project key

Type: string

resource_group

Description: Azure Resource Group to use

Type: string

stage

Description: Stage for this ip

Type: string

Optional Inputs

The following input variables are optional (have default values):

additional_containers

Description: Additional containers to create:

  • suffix: Suffix to add to the container name
  • access_type: Maps to container_access_type

Type:

list(object({
    suffix      = string,
    access_type = string
  }))

Default: []

allow_blob_public_access

Description: Allow public access of the storage account, for example for a static website - will create $web storage container

Type: bool

Default: false

replication_type

Description: Replication Type to use (LRS, GRS, RAGRS, ZRS)

Type: string

Default: "LRS"

static_website_error_404_document

Description: Error document for code 404 if public access is allowed, example: 404.html

Type: string

Default: ""

static_website_index_document

Description: Index document if public access is allowed, example: index.html

Type: string

Default: ""

suffix

Description: Additional name suffix

Type: string

Default: ""

tier

Description: Account tier to use (Standard/Premium)

Type: string

Default: "Standard"

Outputs

The following outputs are exported:

access_key

Description: n/a

blob_connection_string

Description: n/a

blob_host

Description: n/a

connection_string

Description: n/a

containers

Description: n/a

static_host

Description: n/a

Development

Use terraform-docs to generate the API documentation by running

terraform fmt .
terraform-docs .