Terraform cheatsheet

To apply a single resource

terraform apply -target=<resource_type>.<local_name>

eg:
terraform apply -target=google_sql_database_instance.instance

To get a single resource from the state file

terraform state show '<resource_type>.<local_name>'

eg:
terraform state show 'kubernetes_secret.cloudsqlproxy-SA'

To delete a single resource from the state file

terraform state rm '<resource_type>.<local_name>'

eg:
terraform state rm 'kubernetes_secret.cloudsqlproxy-SA'