Skip to content

Latest commit

 

History

History
139 lines (108 loc) · 2.51 KB

azurerm_storage_container.md

File metadata and controls

139 lines (108 loc) · 2.51 KB

azurerm_storage_container

back

Index

Terraform

terraform {
  required_providers {
    azurerm = ">= 2.54.0"
  }
}

top

Example Usage

module "azurerm_storage_container" {
  source = "./modules/azurerm/d/azurerm_storage_container"

  # metadata - (optional) is a type of map of string
  metadata = {}
  # name - (required) is a type of string
  name = null
  # storage_account_name - (required) is a type of string
  storage_account_name = null

  timeouts = [{
    read = null
  }]
}

top

Variables

variable "metadata" {
  description = "(optional)"
  type        = map(string)
  default     = null
}

variable "name" {
  description = "(required)"
  type        = string
}

variable "storage_account_name" {
  description = "(required)"
  type        = string
}

variable "timeouts" {
  description = "nested block: NestingSingle, min items: 0, max items: 0"
  type = set(object(
    {
      read = string
    }
  ))
  default = []
}

top

Datasource

data "azurerm_storage_container" "this" {
  # metadata - (optional) is a type of map of string
  metadata = var.metadata
  # name - (required) is a type of string
  name = var.name
  # storage_account_name - (required) is a type of string
  storage_account_name = var.storage_account_name

  dynamic "timeouts" {
    for_each = var.timeouts
    content {
      # read - (optional) is a type of string
      read = timeouts.value["read"]
    }
  }

}

top

Outputs

output "container_access_type" {
  description = "returns a string"
  value       = data.azurerm_storage_container.this.container_access_type
}

output "has_immutability_policy" {
  description = "returns a bool"
  value       = data.azurerm_storage_container.this.has_immutability_policy
}

output "has_legal_hold" {
  description = "returns a bool"
  value       = data.azurerm_storage_container.this.has_legal_hold
}

output "id" {
  description = "returns a string"
  value       = data.azurerm_storage_container.this.id
}

output "metadata" {
  description = "returns a map of string"
  value       = data.azurerm_storage_container.this.metadata
}

output "resource_manager_id" {
  description = "returns a string"
  value       = data.azurerm_storage_container.this.resource_manager_id
}

output "this" {
  value = azurerm_storage_container.this
}

top