Skip to content

Latest commit

 

History

History
98 lines (76 loc) · 1.84 KB

kubernetes_manifest.md

File metadata and controls

98 lines (76 loc) · 1.84 KB

kubernetes_manifest

back

Index

Terraform

terraform {
  required_providers {
    kubernetes-alpha = ">= 0.3.2"
  }
}

top

Example Usage

module "kubernetes_manifest" {
  source = "./modules/kubernetes-alpha/r/kubernetes_manifest"

  # manifest - (required) is a type of dynamic
  manifest = null
  # object - (optional) is a type of dynamic
  object = null
  # wait_for - (optional) is a type of object
  wait_for = {
    fields = {}
  }
}

top

Variables

variable "manifest" {
  description = "(required) - A Kubernetes manifest describing the desired state of the resource in HCL format."
  type        = any
}

variable "object" {
  description = "(optional) - The resulting resource state, as returned by the API server after applying the desired state from `manifest`."
  type        = any
  default     = null
}

variable "wait_for" {
  description = "(optional) - A map of attribute paths and desired patterns to be matched. After each apply the provider will wait for all attributes listed here to reach a value that matches the desired pattern."
  type = object(
    {
      fields = map(string)
    }
  )
  default = null
}

top

Resource

resource "kubernetes_manifest" "this" {
  # manifest - (required) is a type of dynamic
  manifest = var.manifest
  # object - (optional) is a type of dynamic
  object = var.object
  # wait_for - (optional) is a type of object
  wait_for = var.wait_for
}

top

Outputs

output "object" {
  description = "returns a dynamic"
  value       = kubernetes_manifest.this.object
}

output "this" {
  value = kubernetes_manifest.this
}

top