generated from cloudposse-terraform-components/template
-
-
Notifications
You must be signed in to change notification settings - Fork 0
feat: allow secrets manager option #22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
ce7f0cf
feat: allow secrets manager option
nitrocode 9333859
fix: reuse the same key as ssm in asm
nitrocode 3130d7e
fix: use password key
nitrocode 9aeb306
fix: asm output
nitrocode 1226a7f
fix: tostring(port)
nitrocode bda9119
fix: var description
nitrocode 4629302
fix: output description
nitrocode 27bb736
fix: add mysql_db_port
nitrocode c4a9c54
fix: use var.mysql_db_port
nitrocode 4671b6c
fix: use output for port
nitrocode ccd966a
fix: tf fmt
nitrocode 609d482
fix: use output
nitrocode b679d9c
fix: address feedback for vars
nitrocode 32d5069
Merge branch 'main' into asm
goruha File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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,26 @@ | ||
resource "aws_secretsmanager_secret" "default" { | ||
count = local.asm_enabled ? 1 : 0 | ||
|
||
name = local.mysql_admin_password_key | ||
description = format("%s admin creds", module.cluster.id) | ||
|
||
# policy = "{}" | ||
# kms_key_id = null # "aws/secretsmanager" | ||
# recovery_window_in_days = null # 30 | ||
|
||
tags = module.this.tags | ||
} | ||
|
||
resource "aws_secretsmanager_secret_version" "default" { | ||
count = local.asm_enabled ? 1 : 0 | ||
|
||
secret_id = one(aws_secretsmanager_secret.default[*].id) | ||
secret_string = jsonencode({ | ||
cluster_domain = local.cluster_domain | ||
db_host = module.aurora_mysql.master_host | ||
db_port = module.aurora_mysql.port | ||
cluster_name = module.aurora_mysql.cluster_identifier | ||
username = local.mysql_admin_user | ||
password = local.mysql_admin_password | ||
}) | ||
} |
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.