Skip to content

Commit

Permalink
feat: initial release
Browse files Browse the repository at this point in the history
Signed-off-by: Kevin Lefevre <[email protected]>
  • Loading branch information
ArchiFleKs committed Jan 26, 2022
1 parent 217c4a0 commit f1fcec1
Show file tree
Hide file tree
Showing 4 changed files with 55 additions and 2 deletions.
37 changes: 35 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,44 @@
# terraform-module-template
# terraform-aws-secretsmanager

Repository template for Particule's Terraform module.
Manage AWS Secrets

## Usage


### Examples

<!-- BEGINNING OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
## Requirements

| Name | Version |
|------|---------|
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 0.13 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | ~> 3.0 |

## Providers

| Name | Version |
|------|---------|
| <a name="provider_aws"></a> [aws](#provider\_aws) | ~> 3.0 |

## Modules

No modules.

## Resources

| Name | Type |
|------|------|
| [aws_secretsmanager_secret.this](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/secretsmanager_secret) | resource |
| [aws_secretsmanager_secret_version.this](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/secretsmanager_secret_version) | resource |

## Inputs

| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| <a name="input_secrets"></a> [secrets](#input\_secrets) | Define the module's input below | `any` | `{}` | no |

## Outputs

No outputs.
<!-- END OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
10 changes: 10 additions & 0 deletions main.tf
Original file line number Diff line number Diff line change
@@ -1 +1,11 @@
# Main module resources
resource "aws_secretsmanager_secret" "this" {
for_each = var.secrets
name = each.key
}

resource "aws_secretsmanager_secret_version" "this" {
for_each = var.secrets
secret_id = aws_secretsmanager_secret.this[each.key].id
secret_string = each.value.content
}
4 changes: 4 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
# Define the module's input below
variable "secrets" {
type = any
default = {}
}
6 changes: 6 additions & 0 deletions versions.tf
Original file line number Diff line number Diff line change
@@ -1 +1,7 @@
# Specify required provider versions below
terraform {
required_version = ">= 0.13"
required_providers {
aws = "~> 3.0"
}
}

0 comments on commit f1fcec1

Please sign in to comment.