Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Usage of dots in metadata.name errors at Terraform level #143

Open
turkenh opened this issue Nov 28, 2022 · 3 comments
Open

Usage of dots in metadata.name errors at Terraform level #143

turkenh opened this issue Nov 28, 2022 · 3 comments
Labels
bug Something isn't working configuration v2
Milestone

Comments

@turkenh
Copy link
Member

turkenh commented Nov 28, 2022

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.

@turkenh turkenh added the bug Something isn't working label Nov 28, 2022
@turkenh turkenh changed the title Usage of dots in metadata.name errors Usage of dots in metadata.name errors at Terraform level Nov 28, 2022
@tomasfreund
Copy link

@PowerSurj
Copy link

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

@ytsarev
Copy link
Member

ytsarev commented Sep 7, 2023

@PowerSurj, you can use external-name annotation to mitigate the problem:

metadata:
  name: example
  annotations:
    crossplane.io/external-name: subdomain.example.com

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working configuration v2
Projects
None yet
Development

No branches or pull requests

6 participants