-
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add secrets-manager-secret-simple example (#5)
- Loading branch information
Showing
7 changed files
with
113 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
provider "aws" { | ||
region = "us-east-1" | ||
} | ||
|
||
|
||
################################################### | ||
# Secrets Manager Secret | ||
################################################### | ||
|
||
module "secret" { | ||
source = "../../modules/secrets-manager-secret" | ||
# source = "tedilabs/secret/aws//modules/secrets-manager-secret" | ||
# version = "~> 0.2.0" | ||
|
||
name = "app/secrets-manager-secret/simple" | ||
description = "Managed by Terraform." | ||
|
||
tags = { | ||
"project" = "terraform-aws-secret-examples" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
output "secret" { | ||
value = module.secret | ||
sensitive = true | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
terraform { | ||
required_version = "~> 1.1" | ||
|
||
required_providers { | ||
aws = { | ||
source = "hashicorp/aws" | ||
version = "~> 4.0" | ||
} | ||
} | ||
} |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
provider "aws" { | ||
region = "us-east-1" | ||
} | ||
|
||
|
||
################################################### | ||
# Secrets Manager Secret | ||
################################################### | ||
|
||
module "secret__text" { | ||
source = "../../modules/secrets-manager-secret" | ||
# source = "tedilabs/secret/aws//modules/secrets-manager-secret" | ||
# version = "~> 0.2.0" | ||
|
||
name = "app/secrets-manager-secret/value/text" | ||
description = "Managed by Terraform." | ||
|
||
type = "TEXT" | ||
value = "this_is_the_secret" | ||
|
||
tags = { | ||
"project" = "terraform-aws-secret-examples" | ||
} | ||
} | ||
|
||
module "secret__kv" { | ||
source = "../../modules/secrets-manager-secret" | ||
# source = "tedilabs/secret/aws//modules/secrets-manager-secret" | ||
# version = "~> 0.2.0" | ||
|
||
name = "app/secrets-manager-secret/value/kv" | ||
description = "Managed by Terraform." | ||
|
||
type = "KEY_VALUE" | ||
value = { | ||
a = "foo" | ||
b = "bar" | ||
c = "foobar" | ||
} | ||
|
||
tags = { | ||
"project" = "terraform-aws-secret-examples" | ||
} | ||
} | ||
|
||
module "secret__binary" { | ||
source = "../../modules/secrets-manager-secret" | ||
# source = "tedilabs/secret/aws//modules/secrets-manager-secret" | ||
# version = "~> 0.2.0" | ||
|
||
name = "app/secrets-manager-secret/value/binary" | ||
description = "Managed by Terraform." | ||
|
||
type = "BINARY" | ||
value = filebase64("${path.module}/files/binary") | ||
|
||
tags = { | ||
"project" = "terraform-aws-secret-examples" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
output "secret" { | ||
value = { | ||
text = module.secret__text | ||
kv = module.secret__kv | ||
binary = module.secret__binary | ||
} | ||
sensitive = true | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
terraform { | ||
required_version = "~> 1.1" | ||
|
||
required_providers { | ||
aws = { | ||
source = "hashicorp/aws" | ||
version = "~> 4.0" | ||
} | ||
} | ||
} |