mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-06-08 11:17:27 +00:00
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:
commit
5f3c9376c9
2 changed files with 26 additions and 0 deletions
|
|
@ -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
|
||||
}
|
||||
|
|
@ -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"
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue