terraform-provider-azurerm icon indicating copy to clipboard operation
terraform-provider-azurerm copied to clipboard

“staticCommunicationServices”: expected the segment “CommunicationServices” to be “communicationServices”

Open Shurbeski opened this issue 3 years ago • 1 comments

Is there an existing issue for this?

  • [X] I have searched the existing issues

Community Note

  • Please vote on this issue by adding a :thumbsup: 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.2.3

AzureRM Provider Version

3.12.0

Affected Resource(s)/Data Source(s)

azurerm_communication_service

Terraform Configuration Files

const communicationService = new CommunicationService(scope, `${id} communication service`, {
    name: `${id}-communication`,
    resourceGroupName: rg.name,
    dataLocation: "United States",
  });

Debug Output/Panic Output

[2022-07-06T17:40:01.917] [ERROR] default - ╷
│ Error: parsing "/subscriptions/**/resourceGroups/**rg/providers/Microsoft.Communication/CommunicationServices/-communcation": parsing segment "staticCommunicationServices": expected the segment "CommunicationServices" to be "communicationServices"
│ 
│   with azurerm_communication_service.**communicationservice,
│   on cdk.tf.json line 4401, in resource.azurerm_communication_service.**communicationservice:
│ 4401:       }

Expected Behaviour

Because of the reason the Communication Service is deployed 5 months ago and we haven't done any changes there, the expected behavior is to continue deploying new and changed resources and not get stuck with this error:

Actual Behaviour

We are using CDKTF, once we execute the command cdktf yarn deploy we are getting the following error

[2022-07-06T17:40:01.917] [ERROR] default - ╷
│ Error: parsing "/subscriptions/**/resourceGroups/**rg/providers/Microsoft.Communication/CommunicationServices/-communcation": parsing segment "staticCommunicationServices": expected the segment "CommunicationServices" to be "communicationServices"
│ 
│   with azurerm_communication_service.**communicationservice,
│   on cdk.tf.json line 4401, in resource.azurerm_communication_service.**communicationservice:
│ 4401:       }

Steps to Reproduce

cdktf deploy

Important Factoids

No response

References

No response

Shurbeski avatar Jul 06 '22 15:07 Shurbeski

Communication Service was initially introduced with the id segment CommunicationServices https://github.com/hashicorp/terraform-provider-azurerm/blob/1b6330b3d0645f4b66747771e2df55493c519397/internal/services/communication/parse/communication_service.go#L36 however it seems wrong compared to the segment name communicationServices in swagger definition.

Segment was updated by https://github.com/hashicorp/terraform-provider-azurerm/commit/1572cfefbcbd8add88821d59a0f77fbb005f94fc. It is the ideal segment but seems to be breaking the resource created before the change, due to the segment validation.

@tombuildsstuff in order not to break the old resource, shall we parse this ID case insensitively currently, and parse it case sensitively in 4.0?

myc2h6o avatar Jul 27 '22 08:07 myc2h6o

This functionality has been released in v3.27.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!

github-actions[bot] avatar Oct 14 '22 01:10 github-actions[bot]

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[bot] avatar Nov 13 '22 02:11 github-actions[bot]