Skip to content

Latest commit

 

History

History
116 lines (91 loc) · 2 KB

File metadata and controls

116 lines (91 loc) · 2 KB

azurerm_postgresql_server_key

back

Index

Terraform

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

top

Example Usage

module "azurerm_postgresql_server_key" {
  source = "./modules/azurerm/r/azurerm_postgresql_server_key"

  # key_vault_key_id - (required) is a type of string
  key_vault_key_id = null
  # server_id - (required) is a type of string
  server_id = null

  timeouts = [{
    create = null
    delete = null
    read   = null
    update = null
  }]
}

top

Variables

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

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

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

resource "azurerm_postgresql_server_key" "this" {
  # key_vault_key_id - (required) is a type of string
  key_vault_key_id = var.key_vault_key_id
  # server_id - (required) is a type of string
  server_id = var.server_id

  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

Outputs

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

output "this" {
  value = azurerm_postgresql_server_key.this
}

top