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_function_app_function does not allow underscore in name but Azure does #22294

Closed
1 task done
niven01 opened this issue Jun 27, 2023 · 2 comments · Fixed by #22519
Closed
1 task done

azurerm_function_app_function does not allow underscore in name but Azure does #22294

niven01 opened this issue Jun 27, 2023 · 2 comments · Fixed by #22519
Labels

Comments

@niven01
Copy link

niven01 commented Jun 27, 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

Terraform Version

1.5.0

AzureRM Provider Version

3.62.1

Affected Resource(s)/Data Source(s)

azurerm_function_app_function

Terraform Configuration Files

resource "azurerm_function_app_function" "my_function" {
  name            = "Funtion_name"
  config_json     = "{\"bindings\":[{\"authLevel\":\"function\",\"methods\":[\"get\"],\"name\":\"req\",\"type\":\"httpTrigger\"}],\"configurationSource\":\"attributes\",\"disabled\":false,\"entryPoint\":\"my.entrypoit.Function_name\",\"generatedBy\":\"Microsoft.NET.Sdk.Functions.Generator-4.1.1\",\"scriptFile\":\"../bin/ABC.APIs.PMIS.EMPX.dll\"}"
  function_app_id = "/subscriptions/xxxxxxx-xxxxxxx-xxxxxxxxx-xxxxxx/resourceGroups/my-resource-group/providers/Microsoft.Web/sites/myfunctionapp"

}

Debug Output/Panic Output

Error: "name" must start with a letter, may only contain alphanumeric characters and dashes and up to 128 characters in length

Expected Behaviour

I am importing an existing resource into Terraform. The name has been set in the portal with an underscore.

When running a Terraform Validate I'm expecting my code to pass with

Success! The configuration is valid.

Actual Behaviour

Error: "name" must start with a letter, may only contain alphanumeric characters and dashes and up to 128 characters in length

│ with azurerm_function_app_function.my_function,
│ on RG_abp-ais-pmis-empx-uks-rg01.tf line 73, in resource "azurerm_function_app_function" "my_function":
│ 73: name = "Function_name"

Steps to Reproduce

  • Create code in Terraform for the existing resource
  • run: terraform validate

Important Factoids

No response

References

No response

@xiaxyi
Copy link
Contributor

xiaxyi commented Jul 14, 2023

Thanks @niven01 for raising this issue, the fix is included in the mentioned pr and you can track it for a progress.

Copy link

github-actions bot commented May 9, 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 9, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
4 participants