问题
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