Skip to content

shamimice03/terraform-aws-ssm-parameter

Repository files navigation

Terraform module to store parameters on AWS SSM Parameter Store

Usage

module "parameters" {

  source = "shamimice03/ssm-parameter/aws"

  parameters = [
    {
      create      = true
      name        = "/webapp/db/username"
      type        = "String"
      description = "Parameter for webapp"
      value       = "admin"
      tags = {
        "Name" = "webapp-params"
      }
    },
    {
      create      = true
      name        = "/webapp/db/role"
      type        = "StringList"
      description = "Parameter for webapp"
      value       = "create,delete"
      tags = {
        "Name" = "webapp-params"
      }
    },
    {
      create      = false
      name        = "/webapp/db/password"
      type        = "SecureString"
      description = "Parameter for webapp"
      value       = "Password"
      key_alias   = "alias/aws/ssm"
      tags = {
        "Name" = "webapp-params"
      }
    },
  ]
}

Requirements

Name Version
terraform >= 1.3.0
aws >= 5.0.0

Providers

Name Version
aws 5.16.2

Modules

No modules.

Resources

Name Type
aws_ssm_parameter.this resource

Inputs

Name Description Type Default Required
parameters List of Parameters
list(object({
create = bool
name = string
description = optional(string)
type = string
value = string
key_alias = optional(string)
tags = optional(map(string))
}))
[
{
"create": true,
"description": null,
"key_alias": null,
"name": null,
"tags": null,
"type": null,
"value": null
}
]
no

Outputs

Name Description
parameter_names A list of parameter names extracted from the aws_ssm_parameter resources.
parameter_values A list of parameter values extracted from the aws_ssm_parameter resources. These values are treated as sensitive.
parameters A list of parameters extracted from the aws_ssm_parameter resources. These values are treated as sensitive.