mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-06-08 11:17:27 +00:00
read policy ARN from shared stack state
This commit is contained in:
parent
1e1db67f3c
commit
658761933b
1 changed files with 8 additions and 5 deletions
|
|
@ -6,10 +6,13 @@ locals {
|
|||
db_credentials = jsondecode(data.aws_secretsmanager_secret_version.db_credentials.secret_string)
|
||||
}
|
||||
|
||||
module "shared" {
|
||||
source = "../../shared"
|
||||
stage = var.stage
|
||||
allowed_origins = var.allowed_origins
|
||||
data "terraform_remote_state" "shared" {
|
||||
backend = "s3"
|
||||
config = {
|
||||
bucket = "condition-etl-terraform-state"
|
||||
key = "shared/terraform.tfstate"
|
||||
region = "eu-west-2"
|
||||
}
|
||||
}
|
||||
|
||||
module "lambda" {
|
||||
|
|
@ -34,5 +37,5 @@ module "lambda" {
|
|||
|
||||
resource "aws_iam_role_policy_attachment" "attach_condition_etl_s3_read" {
|
||||
role = module.lambda.role.role_name
|
||||
policy_arn = module.shared.condition_etl_s3_read_arn
|
||||
policy_arn = data.terraform_remote_state.shared.outputs.condition_etl_s3_read_arn
|
||||
}
|
||||
Loading…
Add table
Reference in a new issue