back
terraform {
required_providers {
azurerm = ">= 2.54.0"
}
}
top
module "azurerm_batch_account" {
source = "./modules/azurerm/r/azurerm_batch_account"
# location - (required) is a type of string
location = null
# name - (required) is a type of string
name = null
# pool_allocation_mode - (optional) is a type of string
pool_allocation_mode = null
# resource_group_name - (required) is a type of string
resource_group_name = null
# storage_account_id - (optional) is a type of string
storage_account_id = null
# tags - (optional) is a type of map of string
tags = {}
key_vault_reference = [{
id = null
url = null
}]
timeouts = [{
create = null
delete = null
read = null
update = null
}]
}
top
variable "location" {
description = "(required)"
type = string
}
variable "name" {
description = "(required)"
type = string
}
variable "pool_allocation_mode" {
description = "(optional)"
type = string
default = null
}
variable "resource_group_name" {
description = "(required)"
type = string
}
variable "storage_account_id" {
description = "(optional)"
type = string
default = null
}
variable "tags" {
description = "(optional)"
type = map(string)
default = null
}
variable "key_vault_reference" {
description = "nested block: NestingList, min items: 0, max items: 1"
type = set(object(
{
id = string
url = string
}
))
default = []
}
variable "timeouts" {
description = "nested block: NestingSingle, min items: 0, max items: 0"
type = set(object(
{
create = string
delete = string
read = string
update = string
}
))
default = []
}
top
resource "azurerm_batch_account" "this" {
# location - (required) is a type of string
location = var.location
# name - (required) is a type of string
name = var.name
# pool_allocation_mode - (optional) is a type of string
pool_allocation_mode = var.pool_allocation_mode
# resource_group_name - (required) is a type of string
resource_group_name = var.resource_group_name
# storage_account_id - (optional) is a type of string
storage_account_id = var.storage_account_id
# tags - (optional) is a type of map of string
tags = var.tags
dynamic "key_vault_reference" {
for_each = var.key_vault_reference
content {
# id - (required) is a type of string
id = key_vault_reference.value["id"]
# url - (required) is a type of string
url = key_vault_reference.value["url"]
}
}
dynamic "timeouts" {
for_each = var.timeouts
content {
# create - (optional) is a type of string
create = timeouts.value["create"]
# delete - (optional) is a type of string
delete = timeouts.value["delete"]
# read - (optional) is a type of string
read = timeouts.value["read"]
# update - (optional) is a type of string
update = timeouts.value["update"]
}
}
}
top
output "account_endpoint" {
description = "returns a string"
value = azurerm_batch_account.this.account_endpoint
}
output "id" {
description = "returns a string"
value = azurerm_batch_account.this.id
}
output "primary_access_key" {
description = "returns a string"
value = azurerm_batch_account.this.primary_access_key
sensitive = true
}
output "secondary_access_key" {
description = "returns a string"
value = azurerm_batch_account.this.secondary_access_key
sensitive = true
}
output "storage_account_id" {
description = "returns a string"
value = azurerm_batch_account.this.storage_account_id
}
output "this" {
value = azurerm_batch_account.this
}
top