I have two git repositories.
Repository A contains my terraform infrastructure (DynamoDB tables, iam_roles, iam_role_policies, api_gateway_rest_api, aws_api_gateway_method, aws_api_gateway_resources)
Repository B is my lambda repository (lambda code, terraform files for aws_api_gateway_integration and aws_lambda_permission)
According to the terraform documentation for api_gateway_deployment:
When the REST API configuration involves other Terraform resources (aws_api_gateway_integration resource, etc.), the dependency setup can be done with implicit resource references in the triggers argument or explicit resource references using the resource depends_on meta-argument. The triggers argument should be preferred over depends_on, since depends_on can only capture dependency ordering and will not cause the resource to recreate (redeploy the REST API) with upstream configuration changes.
How can I deploy Repository A then Repository B when Repository A’s aws_api_gateway_deployment resource requires infra from Repository B?
It specifically needs the aws_api_gateway_integration