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

azurerm_kusto_cluster name check is not correct #23686

Closed
1 task done
Shadikho opened this issue Oct 25, 2023 · 6 comments
Closed
1 task done

azurerm_kusto_cluster name check is not correct #23686

Shadikho opened this issue Oct 25, 2023 · 6 comments

Comments

@Shadikho
Copy link

Shadikho commented Oct 25, 2023

Is there an existing issue for this?

  • I have searched the existing issues

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment and review the contribution guide to help.

Terraform Version

1.5.5

AzureRM Provider Version

3.77.0

Affected Resource(s)/Data Source(s)

azurerm_kusto_cluster

Terraform Configuration Files

import {
  id = "id of the existing resource with "-" inside its name"
  to = azurerm_kusto_cluster.kusto_cluster
}

Debug Output/Panic Output

- Error: "name" must begin with a letter and may only contain alphanumeric characters: "project-nonprod-dx"

Expected Behaviour

The resource code is generated without an error

Actual Behaviour

The resource code is generated (when adding the -generate-config-out=file.tf in the plan command) but the command throws the following error:

Error: "name" must begin with a letter and may only contain alphanumeric characters: "project-nonprod-dx"

Steps to Reproduce

  1. Create an Azure data Explorer inside Azure Portal and use hyphen inside its name, like "test-kusto-2"
  2. Try to import this already existing resource to terraform using import block and generating the code.
  3. The error will happen

Important Factoids

No response

References

No response

@Shadikho
Copy link
Author

Hello all,

isn't there anyone who would like to comment on this issue or pay attention to it at all?! I would highly appreciate any information on whether there is a plan to fix this or not :)

@ezeeb
Copy link

ezeeb commented Nov 2, 2023

I have the same problem. The fix should be quite simple:
the regex in https://github.com/liuwuliuyun/terraform-provider-azurerm/blob/ca0d186d65af0de9291b161fb961854a038f3eb9/internal/services/kusto/validate/name.go#L50 simply needs an additional "-"

@Dirrbick
Copy link
Contributor

Dirrbick commented Nov 6, 2023

I had this same issue. Instead of waiting for them to notice, I went ahead and took it upon myself to make this change since it is open. I currently have a PR in place to fix this. Now to wait on the change to be approved. Here is the link to the PR for reference.

@tombuildsstuff tombuildsstuff added this to the v3.80.0 milestone Nov 7, 2023
@tombuildsstuff
Copy link
Contributor

Fixed via #23790 - thanks @Dirrbick :)

@Shadikho
Copy link
Author

Shadikho commented Nov 9, 2023

Thanks @Dirrbick.

Copy link

github-actions bot commented May 2, 2024

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 2, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants