Terraform import AWS Batch job definition from another project

偶尔善良 提交于 2020-06-17 09:41:44

问题


I have multiple projects, each with their own Terraform to manage the AWS infrastructure specific to that project. Infrastructure that's shared (a VPC for example): I import into the projects that need it.

I want to glue together a number of different tasks from across different services using step functions, but some of them are Batch jobs. This means I need to specify the job definition ARN in the step function.

I can import a job definition but if I later update the project that manages that task definition, the revision will change while the step function will continue to point at the old job definition revision.

At this point I might as well hard-code the job ARN into the step function and just have to remember to update it in the future.

I had the same problem with ECS task definitions, but this was elegantly solved here: Terraform import ECS task definition from another project as we could pull in the ECS task definition as a data source. This isn't possible for Batch job definitions.

Anyone know a way around this?

来源:https://stackoverflow.com/questions/61958180/terraform-import-aws-batch-job-definition-from-another-project

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!