Terraform enables you to safely and predictably create, change, and improve infrastructure. It is a source-available tool that codifies APIs into declarative configuration files that can be shared amongst team members, treated as code, edited, reviewed, and versioned.
All of these resources has parameter "depends_on": [ "aws_api_gateway_rest_api.api_mobile" ]
management_api.tf.json
All of this resources has parameter "depends_on": [ "aws_api_gateway_rest_api.api_management" ]
So, I want to have the possibility to update only resources that depend on api_management.
I do not want to check the whole infrastructure and -target works only with one specific resource.
Now it so long if I have a lot of APIs and other resources.
Proposal
I think that it will be great if I could write:
terraform plan -out=terraform.tfplan -depends aws_api_gateway_rest_api.api_managementterraform apply terraform.tfplan
And
terraform plan -out=terraform.tfplan -depends aws_api_gateway_rest_api.api_mobileterraform apply terraform.tfplan
Current Terraform Version
Use-cases
Let's imagine we have a few API's
mobile_api.tf.json
All of these resources has parameter
"depends_on": [ "aws_api_gateway_rest_api.api_mobile" ]
management_api.tf.json
All of this resources has parameter
"depends_on": [ "aws_api_gateway_rest_api.api_management" ]
So, I want to have the possibility to update only resources that depend on api_management. I do not want to check the whole infrastructure and
-target
works only with one specific resource. Now it so long if I have a lot of APIs and other resources.Proposal
I think that it will be great if I could write:
terraform plan -out=terraform.tfplan -depends aws_api_gateway_rest_api.api_management
terraform apply terraform.tfplan
Andterraform plan -out=terraform.tfplan -depends aws_api_gateway_rest_api.api_mobile
terraform apply terraform.tfplan