Skip to content

Commit

Permalink
Retrieve secrets via data source
Browse files Browse the repository at this point in the history
  • Loading branch information
Stephen James committed Sep 28, 2023
1 parent 0f603ff commit ace5f30
Showing 1 changed file with 60 additions and 0 deletions.
60 changes: 60 additions & 0 deletions data.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
data "aws_secretsmanager_secret" "dev_assume_role_arn" {
name = "${module.label.id}__dev_assume_role_arn"
}

data "aws_secretsmanager_secret_version" "dev_assume_role_arn" {
secret_id = data.aws_secretsmanager_secret.dev_assume_role_arn.id
}


data "aws_secretsmanager_secret" "pre_production_assume_role_arn" {
name = "${module.label.id}__pre_production_assume_role_arn"
}

data "aws_secretsmanager_secret_version" "pre_production_assume_role_arn" {
secret_id = data.aws_secretsmanager_secret.pre_production_assume_role_arn.id
}

data "aws_secretsmanager_secret" "production_assume_role_arn" {
name = "${module.label.id}__production_assume_role_arn"
}

data "aws_secretsmanager_secret_version" "production_assume_role_arn" {
secret_id = data.aws_secretsmanager_secret.production_assume_role_arn.id
}


data "aws_secretsmanager_secret" "production_kinesis_destination_arn" {
name = "${module.label.id}__production_kinesis_destination_arn"
}

data "aws_secretsmanager_secret_version" "production_kinesis_destination_arn" {
secret_id = data.aws_secretsmanager_secret.production_kinesis_destination_arn.id
}


data "aws_secretsmanager_secret" "pre_production_kinesis_destination_arn" {
name = "${module.label.id}__pre_production_kinesis_destination_arn"
}

data "aws_secretsmanager_secret_version" "pre_production_kinesis_destination_arn" {
secret_id = data.aws_secretsmanager_secret.pre_production_kinesis_destination_arn.id
}


data "aws_secretsmanager_secret" "development_kinesis_destination_arn" {
name = "${module.label.id}__development_kinesis_destination_arn"
}

data "aws_secretsmanager_secret_version" "development_kinesis_destination_arn" {
secret_id = data.aws_secretsmanager_secret.development_kinesis_destination_arn.id
}


data "aws_secretsmanager_secret" "production_account_id" {
name = "${module.label.id}__production_account_id"
}

data "aws_secretsmanager_secret_version" "production_account_id" {
secret_id = data.aws_secretsmanager_secret.production_account_id.id
}

0 comments on commit ace5f30

Please sign in to comment.