mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-06-08 11:17:27 +00:00
correctly attach sqs policy to fastapi app
This commit is contained in:
parent
48a98d52d4
commit
7835a7e982
1 changed files with 7 additions and 1 deletions
|
|
@ -98,6 +98,7 @@ module "fastapi" {
|
|||
############################################
|
||||
# IAM policy attachments
|
||||
############################################
|
||||
# SQS
|
||||
module "fastapi_sqs_policy" {
|
||||
source = "../../modules/general_iam_policy"
|
||||
|
||||
|
|
@ -121,8 +122,13 @@ module "fastapi_sqs_policy" {
|
|||
}
|
||||
}
|
||||
|
||||
resource "aws_iam_role_policy_attachment" "fastapi_sqs_send" {
|
||||
role = module.fastapi.role_name
|
||||
policy_arn = module.fastapi_sqs_policy.policy_arn
|
||||
}
|
||||
|
||||
resource "aws_iam_role_policy_attachment" "fastapi_sqs_read_and_write" {
|
||||
# S3
|
||||
resource "aws_iam_role_policy_attachment" "fastapi_s3_read_and_write" {
|
||||
role = module.fastapi.role_name
|
||||
policy_arn = data.terraform_remote_state.shared.outputs.fast_api_s3_read_and_write_arn
|
||||
}
|
||||
Loading…
Add table
Reference in a new issue