Merge pull request #996 from Hestia-Homes/feature/pashub-to-ara

IAM role allowing hubspot etl to send message to pashub queue
This commit is contained in:
Daniel Roth 2026-04-17 15:58:58 +01:00 committed by GitHub
commit 5f3c9376c9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 26 additions and 0 deletions

View file

@ -55,4 +55,25 @@ module "hubspot_deal_etl" {
resource "aws_iam_role_policy_attachment" "lambda_s3_policy" {
role = module.hubspot_deal_etl.role_name
policy_arn = data.terraform_remote_state.shared.outputs.hubspot_etl_s3_read_and_write_arn
}
# Create and attach S3 send policy for PasHub Fetcher queue
module "hubspot_deal_etl_sqs_policy" {
source = "../../modules/general_iam_policy"
policy_name = "hubspot-deal-etl-sqs-send-${var.stage}"
policy_description = "Allow Hubspot ETL Lambda to send messages to PasHub Fetcher queue"
actions = [
"sqs:SendMessage"
]
resources = [
data.terraform_remote_state.pashub_to_ara.outputs.pashub_to_ara_queue_arn
]
}
resource "aws_iam_role_policy_attachment" "hubspot_deal_etl_sqs_send" {
role = module.lambda.role_name
policy_arn = module.hubspot_deal_etl_sqs_policy.policy_arn
}

View file

@ -2,3 +2,8 @@ output "pashub_to_ara_queue_url" {
value = module.lambda.queue_url
description = "URL of the PasHub to Ara SQS queue"
}
output "pashub_to_ara_queue_arn" {
value = module.lambda.queue_arn
description = "ARN of the PasHub to Ara SQS queue"
}