Is there a way to rename a subnet in gcp? either in console or with terraform.
I rather not drop and recreate the subnet as there are other resources using the subnet.
According to Google docs, you can't change the subnet name once it is created.
Example:
Change subnet name = sn-env-north-01
to this = sn-dev-north-01
thanks.
Actually, you've already answered your question - it's not possible.
Accordingly to the documentation Using VPC networks section Working with subnets:
You cannot change the name or region of a subnet after you have created it. However, you can delete a subnet and replace it, as long as no resources are using it.
You can try to change this behaviour by filling a feature request at Google Public Issue Tracker.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With