Skip to content
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

error fix & idempotency improvement in quickstart #11

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions examples/quickstart/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,14 @@ data "aws_ssm_parameter" "password" {
provider = aws.us-east-2
}

// A hashed variant of the password will be needed when seeding the initial
// administrative user.
// $ mkpasswd -m bcrypt PASSWORD
data "aws_ssm_parameter" "hashed-password" {
name = "/bowtie/admin/hashed-password"
provider = aws.us-east-2
}

// The cluster synchronization pass key is sensitive and should be handled with
// care.
data "aws_ssm_parameter" "sync-psk" {
Expand Down Expand Up @@ -60,7 +68,7 @@ module "bowtie_us_west_2" {

init-users = [{
email = var.bowtie_admin_email
hashed_password = format("$bcrypt%s", bcrypt(data.aws_ssm_parameter.password.value))
hashed_password = format("$bcrypt%s", data.aws_ssm_parameter.hashed-password.value)
}]

providers = { aws = aws.us-west-2 }
Expand Down Expand Up @@ -103,7 +111,7 @@ module "bowtie_us_east_2" {

init-users = [{
email = var.bowtie_admin_email
hashed_password = format("$bcrypt%s", bcrypt(data.aws_ssm_parameter.password.value))
hashed_password = format("$bcrypt%s", data.aws_ssm_parameter.hashed-password.value)
}]

providers = { aws = aws.us-east-2 }
Expand Down
2 changes: 1 addition & 1 deletion modules/aws_vpc/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -523,7 +523,7 @@ output "route_53_dns" {

output "public_dns" {
description = "key is the controller's short name, value is the associated dns name or NLB's dns name"
value = var.use_nlb_and_asg ? { for i, v in aws_lb.controller : local.flattened-instances[i].name => v.dns_name } : { for i, v in aws_instance.controller : local.flattened-instances[i] => v.public_dns }
value = var.use_nlb_and_asg ? { for i, v in aws_lb.controller : local.flattened-instances[i].name => v.dns_name } : { for i, v in aws_instance.controller : tostring(i) => v.public_dns }
}

output "nlb_to_instance_name" {
Expand Down