Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/hazelops/terraform-aws-ssm-parameters

Consistent way to manage service SSM parameters.
https://github.com/hazelops/terraform-aws-ssm-parameters

devops terraform terraform-module

Last synced: 28 days ago
JSON representation

Consistent way to manage service SSM parameters.

Awesome Lists containing this project

README

        

# Terraform AWS SSM Parameters Module
[![Tests](https://github.com/automationd/atun/actions/workflows/tests.yml/badge.svg)](https://github.com/AutomationD/atun/actions/workflows/tests.yml)

The main goal of the module is to provide a consistent way to manage service SSM parameters. Suitable for use with [External Secrets](https://external-secrets.io/latest/).

This module manages parameters in AWS SSM Parameter Store.

This module is capable of taking strings as a values. If you need to store something in a different format, please convert it to a string.
Strings are stored as SecureString (Standard Tier) with maximum size `4 KB`.
See limitations on tiers in [Managing parameter Tiers](https://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-paramstore-su-create.html)

For proper usage, refer to the example in this guide and the [Examples](./examples) folder.

## Usage example:

```terraform
module "krabby" {
source = "hazelops/terraform-aws-ssm-parameters/aws"
name = "krabby"
env = "dev"

parameters = {
API_KEY = "api-XXXXXXXXXXXXXXXXXXXXX",
S3_BUCKET_ARN = "arn:aws:s3:::dev-krabby",
S3_BUCKET_NAME = "dev-krabby"
}
}
```
Parameters in above example will be stored into the following paths:
```text
/dev/krabby/API_KEY
/dev/krabby/S3_BUCKET_ARN
/dev/krabby/S3_BUCKET_NAME
```

## Requirements

| Name | Version |
|------|---------|
| [terraform](#requirement\_terraform) | >=1.2.0 |
| [aws](#requirement\_aws) | >=4.30.0 |

## Providers

| Name | Version |
|------|---------|
| [aws](#provider\_aws) | >=4.30.0 |

## Modules

No modules.

## Resources

| Name | Type |
|------|------|
| [aws_ssm_parameter.this](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/ssm_parameter) | resource |

## Inputs

| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| [env](#input\_env) | Environment name | `string` | n/a | yes |
| [name](#input\_name) | Name of the service | `string` | n/a | yes |
| [parameters](#input\_parameters) | Map of SSM ParameterStore parameters to store - by default, /$var.env/$var.name/* | `map(string)` | n/a | yes |

## Outputs

| Name | Description |
|------|-------------|
| [ssm\_parameter\_paths](#output\_ssm\_parameter\_paths) | A list of paths to created parameters |