github.com/nathanielks/terraform@v0.6.1-0.20170509030759-13e1a62319dc/website/source/docs/providers/kubernetes/r/config_map.html.markdown (about) 1 --- 2 layout: "kubernetes" 3 page_title: "Kubernetes: kubernetes_config_map" 4 sidebar_current: "docs-kubernetes-resource-config-map" 5 description: |- 6 The resource provides mechanisms to inject containers with configuration data while keeping containers agnostic of Kubernetes. 7 --- 8 9 # kubernetes_config_map 10 11 The resource provides mechanisms to inject containers with configuration data while keeping containers agnostic of Kubernetes. 12 Config Map can be used to store fine-grained information like individual properties or coarse-grained information like entire config files or JSON blobs. 13 14 ## Example Usage 15 16 ```hcl 17 resource "kubernetes_config_map" "example" { 18 metadata { 19 name = "my-config" 20 } 21 22 data { 23 api_host = "myhost:443" 24 db_host = "dbhost:5432" 25 } 26 } 27 ``` 28 29 ## Argument Reference 30 31 The following arguments are supported: 32 33 * `data` - (Optional) A map of the configuration data. 34 * `metadata` - (Required) Standard config map's metadata. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/api-conventions.md#metadata 35 36 ## Nested Blocks 37 38 ### `metadata` 39 40 #### Arguments 41 42 * `annotations` - (Optional) An unstructured key value map stored with the config map that may be used to store arbitrary metadata. More info: http://kubernetes.io/docs/user-guide/annotations 43 * `generate_name` - (Optional) Prefix, used by the server, to generate a unique name ONLY IF the `name` field has not been provided. This value will also be combined with a unique suffix. Read more: https://github.com/kubernetes/community/blob/master/contributors/devel/api-conventions.md#idempotency 44 * `labels` - (Optional) Map of string keys and values that can be used to organize and categorize (scope and select) the config map. May match selectors of replication controllers and services. More info: http://kubernetes.io/docs/user-guide/labels 45 * `name` - (Optional) Name of the config map, must be unique. Cannot be updated. More info: http://kubernetes.io/docs/user-guide/identifiers#names 46 * `namespace` - (Optional) Namespace defines the space within which name of the config map must be unique. 47 48 #### Attributes 49 50 * `generation` - A sequence number representing a specific generation of the desired state. 51 * `resource_version` - An opaque value that represents the internal version of this config map that can be used by clients to determine when config map has changed. Read more: https://github.com/kubernetes/community/blob/master/contributors/devel/api-conventions.md#concurrency-control-and-consistency 52 * `self_link` - A URL representing this config map. 53 * `uid` - The unique in time and space value for this config map. More info: http://kubernetes.io/docs/user-guide/identifiers#uids 54 55 ## Import 56 57 Config Map can be imported using its name, e.g. 58 59 ``` 60 $ terraform import kubernetes_config_map.example my-config 61 ```