Run with rds takes a long time to run terraform and wait. To avoid this issue, run the specific resource in terraform.
To run Terraform for a specific resource, you can use the -target option followed by the name of the resource you want to apply changes to.
For example, let's say you have the following Terraform configuration:
resource "aws_instance" "example" {
ami = "ami-0c55b159cbfafe1f0"
instance_type = "t2.micro"
}
To apply changes only to the aws_instance.example resource, you can run the following command:
terraform apply -target=aws_instance.example
This will apply changes only to the specified resource and not to any other resources defined in the Terraform configuration. Keep in mind that using -target can cause problems if the resource you are targeting has dependencies on other resources that haven't been created yet or have been modified since the last Terraform apply.
Comments (0)