terraform/website/source/docs/providers/kubernetes/r/config_map.html.markdown

2.8 KiB

layout page_title sidebar_current description
kubernetes Kubernetes: kubernetes_config_map docs-kubernetes-resource-config-map The resource provides mechanisms to inject containers with configuration data while keeping containers agnostic of Kubernetes.

kubernetes_config_map

The resource provides mechanisms to inject containers with configuration data while keeping containers agnostic of Kubernetes. Config Map can be used to store fine-grained information like individual properties or coarse-grained information like entire config files or JSON blobs.

Example Usage

resource "kubernetes_config_map" "example" {
  metadata {
    name = "my-config"
  }

  data {
    api_host = "myhost:443"
    db_host  = "dbhost:5432"
  }
}

Argument Reference

The following arguments are supported:

Nested Blocks

metadata

Arguments

Attributes

Import

Config Map can be imported using its name, e.g.

$ terraform import kubernetes_config_map.example my-config