-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #35 from lgallard/feature/force_overwrite_replica_…
…secret Feature/force overwrite replica secret
- Loading branch information
Showing
6 changed files
with
115 additions
and
16 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
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
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,45 @@ | ||
# Plain text example | ||
``` | ||
module "secrets-manager-1" { | ||
#source = "lgallard/secrets-manager/aws" | ||
source = "../../" | ||
secrets = { | ||
secret-1 = { | ||
description = "My secret 1" | ||
recovery_window_in_days = 7 | ||
secret_string = "This is an example" | ||
policy = <<POLICY | ||
{ | ||
"Version": "2012-10-17", | ||
"Statement": [ | ||
{ | ||
"Sid": "EnableAllPermissions", | ||
"Effect": "Allow", | ||
"Principal": { | ||
"AWS": "*" | ||
}, | ||
"Action": "secretsmanager:GetSecretValue", | ||
"Resource": "*" | ||
} | ||
] | ||
} | ||
POLICY | ||
}, | ||
secret-2 = { | ||
description = "My secret 2" | ||
recovery_window_in_days = 7 | ||
secret_string = "This is another example" | ||
policy = null | ||
} | ||
} | ||
tags = { | ||
Owner = "DevOps team" | ||
Environment = "dev" | ||
Terraform = 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,39 @@ | ||
module "secrets-manager-6" { | ||
|
||
#source = "lgallard/secrets-manager/aws" | ||
source = "../../" | ||
|
||
secrets = { | ||
secret-plain = { | ||
description = "My plain text secret" | ||
recovery_window_in_days = 7 | ||
secret_string = "This is an example" | ||
replica_regions = { | ||
us-west-2 = "arn:aws:kms:us-west-2:1234567890:key/12345678-1234-1234-1234-123456789012" | ||
} | ||
force_overwrite_replica_secret = true | ||
}, | ||
secret-key-value = { | ||
description = "This is a key/value secret" | ||
secret_key_value = { | ||
username = "user" | ||
password = "topsecret" | ||
} | ||
replica_regions = { | ||
us-west-1 = "arn:aws:kms:us-west-1:1234567890:key/12345678-1234-1234-1234-123456789012" | ||
} | ||
force_overwrite_replica_secret = false | ||
tags = { | ||
app = "web" | ||
} | ||
recovery_window_in_days = 7 | ||
}, | ||
} | ||
|
||
tags = { | ||
Owner = "DevOps team" | ||
Environment = "dev" | ||
Terraform = 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,4 @@ | ||
provider "aws" { | ||
profile = "default" | ||
region = "us-east-1" | ||
} |
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
😀