我如何将动态动作传递给AWS胶合触发Terraform中的资源?
我正在尝试在Terraform中创建一个触发器,该触发器将运行具有几组不同参数的胶合作业。这些参数之一是基于任意数量的JSON字典。
问题是,当我尝试使用动态块进行触发操作的动态块时,我会收到以下错误:
错误:动作不足
至少需要1个“动作”块。
据推测,因为AWS_GLUE_TRIGGER资源要求有一个动作块并使此动态阻止计划识别它吗? 这就是我的资源块的样子:
resource "aws_glue_trigger" "api_ingestion" {
name = "some trigger"
enabled = local.is_live_environment
dynamic "actions" {
for_each = fileset(path.module, "../queries/*.json")
content {
job_name = module.api_ingestion_job.job_name
arguments = {
"--json" = file(actions.value)
}
}
}
}
感谢您的任何帮助!
I'm trying to create a trigger in Terraform that will run a glue job with several different sets of parameters. One of those parameters is based on an arbitrary number of json dictionaries.
The problem is when I try to do this with a dynamic block for the actions in the trigger I get the following error:
Error: Insufficient actions blocks
At least 1 "actions" blocks are required.
Presumably, because the aws_glue_trigger resource requires there to be an actions block and making this dynamic prevents the plan from recognising it as such?
This is what my resource block looks like:
resource "aws_glue_trigger" "api_ingestion" {
name = "some trigger"
enabled = local.is_live_environment
dynamic "actions" {
for_each = fileset(path.module, "../queries/*.json")
content {
job_name = module.api_ingestion_job.job_name
arguments = {
"--json" = file(actions.value)
}
}
}
}
Thanks for any help!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论