github.com/koding/terraform@v0.6.4-0.20170608090606-5d7e0339779d/website/source/docs/providers/aws/r/ssm_parameter.html.markdown (about) 1 --- 2 layout: "aws" 3 page_title: "AWS: aws_ssm_parameter" 4 sidebar_current: "docs-aws-resource-ssm-parameter" 5 description: |- 6 Provides a SSM Parameter resource 7 --- 8 9 # aws\_ssm\_parameter 10 11 Provides an SSM Parameter resource. 12 13 ## Example Usage 14 15 To store a basic string parameter: 16 17 ```hcl 18 resource "aws_ssm_parameter" "foo" { 19 name = "foo" 20 type = "String" 21 value = "bar" 22 } 23 ``` 24 25 To store an encrypted string using the default SSM KMS key: 26 27 ```hcl 28 resource "aws_db_instance" "default" { 29 allocated_storage = 10 30 storage_type = "gp2" 31 engine = "mysql" 32 engine_version = "5.7.16" 33 instance_class = "db.t2.micro" 34 name = "mydb" 35 username = "foo" 36 password = "${var.database_master_password}" 37 db_subnet_group_name = "my_database_subnet_group" 38 parameter_group_name = "default.mysql5.7" 39 } 40 41 resource "aws_ssm_parameter" "secret" { 42 name = "${var.environment}/database/password/master" 43 type = "SecureString" 44 value = "${var.database_master_password}" 45 } 46 ``` 47 48 ~> **Note:** The unencrypted value of a SecureString will be stored in the raw state as plain-text. 49 [Read more about sensitive data in state](/docs/state/sensitive-data.html). 50 51 ## Argument Reference 52 53 The following arguments are supported: 54 55 * `name` - (Required) The name of the parameter. 56 * `type` - (Required) The type of the parameter. Valid types are `String`, `StringList` and `SecureString`. 57 * `value` - (Required) The value of the parameter. 58 * `key_id` - (Optional) The KMS key id or arn for encrypting a SecureString. 59 ## Attributes Reference 60 61 The following attributes are exported: 62 63 * `name` - (Required) The name of the parameter. 64 * `type` - (Required) The type of the parameter. Valid types are `String`, `StringList` and `SecureString`. 65 * `value` - (Required) The value of the parameter.