Skip to content

Latest commit

 

History

History
98 lines (74 loc) · 1.87 KB

null_data_source.md

File metadata and controls

98 lines (74 loc) · 1.87 KB

null_data_source

back

Index

Terraform

terraform {
  required_providers {
    null = ">= 3.1.0"
  }
}

top

Example Usage

module "null_data_source" {
  source = "./modules/null/d/null_data_source"

  # has_computed_default - (optional) is a type of string
  has_computed_default = null
  # inputs - (optional) is a type of map of string
  inputs = {}
}

top

Variables

variable "has_computed_default" {
  description = "(optional) - If set, its literal value will be stored and returned. If not, its value defaults to `\"default\"`. This argument exists primarily for testing and has little practical use."
  type        = string
  default     = null
}

variable "inputs" {
  description = "(optional) - A map of arbitrary strings that is copied into the `outputs` attribute, and accessible directly for interpolation."
  type        = map(string)
  default     = null
}

top

Datasource

data "null_data_source" "this" {
  # has_computed_default - (optional) is a type of string
  has_computed_default = var.has_computed_default
  # inputs - (optional) is a type of map of string
  inputs = var.inputs
}

top

Outputs

output "has_computed_default" {
  description = "returns a string"
  value       = data.null_data_source.this.has_computed_default
}

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

output "outputs" {
  description = "returns a map of string"
  value       = data.null_data_source.this.outputs
}

output "random" {
  description = "returns a string"
  value       = data.null_data_source.this.random
}

output "this" {
  value = null_data_source.this
}

top