这是一个为RDS事件创建sns主题的模块
module "rds_event_sns" {
source = "../../../../common/sns/topic"
name = "${var.lambda_filename}-rds-event"
}
这是main.tf
中的common/sns/topic
的内容
terraform {
required_version = "0.11.7"
}
variable "name" {}
variable "publishers" {
type = "list"
}
resource "aws_sns_topic" "topic_simple" {
name = "canva-${var.queue_prefix}${var.name}"
}
我希望如何在sns主题上设置lambda_failure_feedback_role_arn
和lambda_failure_feedback_role_arn
。资源topic_simple
似乎不接受这些属性。
是否可以仅将这些属性传递给topic_simple
而无需更改common/sns/topic
?例如
module "rds_event_sns" {
source = "../../../../common/sns/topic"
name = "${var.lambda_filename}-rds-event"
lambda_failure_feedback_role_arn: "arn:aws:iam::147857925614:role/SNSFailureFeedback"
lambda_success_feedback_role_arn: "arn:aws:iam::147857925614:role/SNSSuccessFeedback"
}
如果不是terraform的工作原理,那么有什么好的选择?