Skip to content

Commit

Permalink
Add support for tags (#51)
Browse files Browse the repository at this point in the history
* Add support for tags

* Executed 'terraform fmt'

* Updated README.md

Co-authored-by: actions-bot <58130806+actions-bot@users.noreply.github.com>
  • Loading branch information
almoore and actions-bot authored Oct 12, 2020
1 parent fec52dc commit 89f93d6
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ Available targets:
```
<!-- markdownlint-restore -->
<!-- markdownlint-disable -->
## Requirements

| Name | Version |
Expand Down Expand Up @@ -142,6 +143,7 @@ Available targets:
| public\_key | Content of the generated public key |
| public\_key\_filename | Public Key Filename |

<!-- markdownlint-restore -->



Expand Down
2 changes: 2 additions & 0 deletions docs/terraform.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
<!-- markdownlint-disable -->
## Requirements

| Name | Version |
Expand Down Expand Up @@ -44,3 +45,4 @@
| public\_key | Content of the generated public key |
| public\_key\_filename | Public Key Filename |

<!-- markdownlint-restore -->
2 changes: 2 additions & 0 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ resource "aws_key_pair" "imported" {
count = var.generate_ssh_key == false ? 1 : 0
key_name = module.label.id
public_key = file(local.public_key_filename)
tags = module.label.tags
}

resource "tls_private_key" "default" {
Expand All @@ -40,6 +41,7 @@ resource "aws_key_pair" "generated" {
depends_on = [tls_private_key.default]
key_name = module.label.id
public_key = tls_private_key.default[0].public_key_openssh
tags = module.label.tags
}

resource "local_file" "public_key_openssh" {
Expand Down

0 comments on commit 89f93d6

Please sign in to comment.