Skip to content

Latest commit

 

History

History
91 lines (69 loc) · 1.33 KB

ns1_datasource.md

File metadata and controls

91 lines (69 loc) · 1.33 KB

ns1_datasource

back

Index

Terraform

terraform {
  required_providers {
    ns1 = ">= 1.9.4"
  }
}

top

Example Usage

module "ns1_datasource" {
  source = "./modules/ns1/r/ns1_datasource"

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

top

Variables

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

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

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

top

Resource

resource "ns1_datasource" "this" {
  # config - (optional) is a type of map of string
  config = var.config
  # name - (required) is a type of string
  name = var.name
  # sourcetype - (required) is a type of string
  sourcetype = var.sourcetype
}

top

Outputs

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

output "this" {
  value = ns1_datasource.this
}

top