upjet
upjet copied to clipboard
Usage of dots in metadata.name errors at Terraform level
What happened?
We are getting errors from Terraform if the metadata.name contains dots, e.g. example.com, since we use the same to name the terraform resource name which does not accept dots in the name.
Note users would see this during runtime.
How can we reproduce it?
Create an upjet generated MR with name dots inside.
Possible Fixes
Not use metadata.name in cases where it would break. We need to be careful with the upgrade process.
https://github.com/upbound/provider-azure/issues/71
Hello! this blocks usage of subdomains in the record name, which are obviously separated by the dots. I was planning to migrate from the Terraform resource azurerm_private_dns_a_record to Crossplane PrivateDNSARecord. This fails with error:
observe failed: cannot run refresh: refresh failed: Invalid resource name: A name must start with a letter or underscore and may contain only letters, digits, underscores, and dashes
@PowerSurj, you can use external-name annotation to mitigate the problem:
metadata:
name: example
annotations:
crossplane.io/external-name: subdomain.example.com