Skip to content

Latest commit

 

History

History
102 lines (78 loc) · 1.71 KB

digitalocean_database_user.md

File metadata and controls

102 lines (78 loc) · 1.71 KB

digitalocean_database_user

back

Index

Terraform

terraform {
  required_providers {
    digitalocean = ">= 2.7.0"
  }
}

top

Example Usage

module "digitalocean_database_user" {
  source = "./modules/digitalocean/r/digitalocean_database_user"

  # cluster_id - (required) is a type of string
  cluster_id = null
  # mysql_auth_plugin - (optional) is a type of string
  mysql_auth_plugin = null
  # name - (required) is a type of string
  name = null
}

top

Variables

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

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

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

top

Resource

resource "digitalocean_database_user" "this" {
  # cluster_id - (required) is a type of string
  cluster_id = var.cluster_id
  # mysql_auth_plugin - (optional) is a type of string
  mysql_auth_plugin = var.mysql_auth_plugin
  # name - (required) is a type of string
  name = var.name
}

top

Outputs

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

output "password" {
  description = "returns a string"
  value       = digitalocean_database_user.this.password
  sensitive   = true
}

output "role" {
  description = "returns a string"
  value       = digitalocean_database_user.this.role
}

output "this" {
  value = digitalocean_database_user.this
}

top