【发布时间】:2019-08-12 08:20:54
【问题描述】:
在aws_api_gateway_deployment 的 Terraform 文档中说:
注意:取决于您的休息中是否有 aws_api_gateway_integration api(这又取决于 aws_api_gateway_method)。为了避免比赛 您可能需要添加显式depends_on =的条件 [“aws_api_gateway_integration.name”]。
我的 aws_api_gateway_deployment 资源位于根模块中,但大部分 aws_api_gateway_integrations 是在子模块中创建的(这是我创建的本地模块)。
我的理解是不能从模块中导出资源。
文件夹结构为:
- main.tf <-- contains the aws_api_gateway_rest_api and aws_api_gateway_deployment and uses the service_func_lambda module multiple times
- modules/
- service_func_lambda/
- main.tf <-- contains the aws_api_gateway_integration and other bits such as aws_api_gateway_method and aws_api_gateway_resource
如何从调用根模块引用在模块内创建的aws_api_gateway_integration?
【问题讨论】:
标签: aws-api-gateway terraform terraform-provider-aws