mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-06-30 13:10:47 +00:00
Merge pull request #862 from Hestia-Homes/main
Deploy fastapi with terraform: correctly attach sqs policy to fastapi app
This commit is contained in:
commit
d6830df40d
1 changed files with 7 additions and 1 deletions
|
|
@ -98,6 +98,7 @@ module "fastapi" {
|
||||||
############################################
|
############################################
|
||||||
# IAM policy attachments
|
# IAM policy attachments
|
||||||
############################################
|
############################################
|
||||||
|
# SQS
|
||||||
module "fastapi_sqs_policy" {
|
module "fastapi_sqs_policy" {
|
||||||
source = "../../modules/general_iam_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
|
role = module.fastapi.role_name
|
||||||
policy_arn = data.terraform_remote_state.shared.outputs.fast_api_s3_read_and_write_arn
|
policy_arn = data.terraform_remote_state.shared.outputs.fast_api_s3_read_and_write_arn
|
||||||
}
|
}
|
||||||
Loading…
Add table
Reference in a new issue