Skip to content

Commit a9c205c

Browse files
committed
clean up module and remove tag dependencies
1 parent d41d704 commit a9c205c

File tree

7 files changed

+76
-24
lines changed

7 files changed

+76
-24
lines changed

.github/workflows/check.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: check
2+
on: [push, pull_request]
3+
4+
jobs:
5+
build:
6+
runs-on: macOS-latest
7+
steps:
8+
- uses: actions/checkout@v1
9+
10+
- name: Install prereq
11+
run: |
12+
brew install docker tfenv tflint
13+
tfenv install
14+
15+
- name: tf fmt
16+
run: |
17+
terraform fmt
18+
- name: tflint
19+
run: |
20+
tflint

.pre-commit-config.yaml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
repos:
3+
- repo: git://github.com/antonbabenko/pre-commit-terraform
4+
rev: v1.19.0
5+
hooks:
6+
- id: terraform_fmt
7+
- id: terraform_tflint
8+
- id: terraform_docs
9+
- repo: https://github.com/pre-commit/pre-commit-hooks
10+
rev: v2.3.0
11+
hooks:
12+
- id: end-of-file-fixer
13+
- id: trailing-whitespace
14+
- id: no-commit-to-branch

.terraform-version

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
0.12.13

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2019 Rhythmic Technologies, Inc.
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,18 @@
1-
# terraform-secretsmanager-keypair
1+
# terraform-aws-secretsmanager-keypair
2+
3+
[![](https://github.com/rhythmictech/terraform-aws-secretsmanager-keypair/workflows/check/badge.svg)](https://github.com/rhythmictech/terraform-aws-secretsmanager-keypair/actions)
4+
5+
Generates and stores an EC2 Keypair in Secrets Manager
6+
7+
<!-- BEGINNING OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
8+
## Inputs
9+
10+
| Name | Description | Type | Default | Required |
11+
|------|-------------|:----:|:-----:|:-----:|
12+
13+
## Outputs
14+
15+
| Name | Description |
16+
|------|-------------|
17+
18+
<!-- END OF PRE-COMMIT-TERRAFORM DOCS HOOK -->

main.tf

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,7 @@ resource "aws_secretsmanager_secret" "secret_key" {
1515
description = var.description
1616

1717
tags = merge(
18-
local.common_tags,
19-
var.additional_tags,
18+
var.tags,
2019
map(
2120
"Name", "${var.name_prefix}-key"
2221
)

variables.tf

Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,9 @@
11

2-
locals {
3-
common_tags = {
4-
env = var.env
5-
owner = var.owner
6-
namespace = var.namespace
7-
}
8-
}
9-
10-
variable "additional_tags" {
2+
variable "tags" {
113
type = map(string)
124
default = {}
135
}
146

15-
variable "env" {
16-
type = string
17-
}
18-
19-
variable "namespace" {
20-
type = string
21-
}
22-
23-
variable "owner" {
24-
type = string
25-
}
26-
277
variable "name_prefix" {
288
type = string
299
}

0 commit comments

Comments
 (0)