Closed julian7 closed 2 years ago
Hi @julian7 thanks for opening the issue! Since the certificate name you used could pass the validation on Azure end, the validation in the provider probably needs to be adjusted, I'll check that
Hi @julian7 I've opened #18694 to fix the validation. DevCA.cer
will be considered as a valid certificate name with the fix.
This functionality has been released in v3.26.0 of the Terraform Provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.
For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you!
@katbyte should this be v3.27.0 instead of v3.26.0 which was already released?
@katbyte apparently, there were a few PRs fell into the hole of not closing 3.26 milestone on time, and therefore there were a few changes to the release of 3.27.0 not reflected in the CHANGELOG.
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.
Is there an existing issue for this?
Community Note
Call us reckless, but we originally used file names to define IoT Hub DPS certificates:
However, when I tried to define them in Terraform, I'm getting an error during plan:
Error: "name" may only contain alphanumeric characters and dashes
.Looking into the provider, I found that the schema has
validate.IoTHubName
validator for both the IoT Hub's name, and for certificate name:https://github.com/hashicorp/terraform-provider-azurerm/blob/2e1650aa1cbe3dad37e8572289e0b0aaa8785494/internal/services/iothub/iothub_dps_certificate_resource.go#L43
Unfortunately, I couldn't find a good place in Azure docs for good limits for the "friendly name."
Terraform Version
1.2.8
AzureRM Provider Version
3.22.0
Affected Resource(s)/Data Source(s)
azurerm_iothub_dps_certificate
Terraform Configuration Files
Debug Output/Panic Output
Expected Behaviour
An IoT Hub DPS certificate is created
Actual Behaviour
2022-09-13T16:45:03.352+0200 [ERROR] vertex "azurerm_iothub_dps_certificate.root" error: "name" may only contain alphanumeric characters and dashes ╷ │ Error: "name" may only contain alphanumeric characters and dashes │ │ with azurerm_iothub_dps_certificate.root, │ on dps.tf line 2, in resource "azurerm_iothub_dps_certificate" "root": │ 2: name = "DevCA.cer" │ ╵
Steps to Reproduce
terraform plan
Important Factoids
No response
References
No response