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

Updating azurerm_iothub_dps fails #20587

Closed
1 task done
lukipro opened this issue Feb 21, 2023 · 3 comments · Fixed by #20632
Closed
1 task done

Updating azurerm_iothub_dps fails #20587

lukipro opened this issue Feb 21, 2023 · 3 comments · Fixed by #20632

Comments

@lukipro
Copy link

lukipro commented Feb 21, 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.3.6

AzureRM Provider Version

3.44.1

Affected Resource(s)/Data Source(s)

azurerm_iothub_dps

Terraform Configuration Files

resource "azurerm_iothub_dps" "dps" {
  name                = "provs-${module.common.resource_suffix}"
  resource_group_name = module.common.resource_group_name
  location            = var.azure_region
  linked_hub {
    location                = azurerm_iothub.iothub.location
    connection_string       = data.azurerm_iothub_shared_access_policy.iothubowner.primary_connection_string
    apply_allocation_policy = true
  }

  sku {
    name     = var.dps_sku
    capacity = var.dps_capacity
  }

  tags = module.common.tags
}

Debug Output/Panic Output

╷
│ Error: creating/updating IoT Device Provisioning Service Provisioning Service (Subscription: "xxxxxxxxxxxxxxxxx"
│ Resource Group Name: "rg-platform-prd-westeurope"
│ Provisioning Service Name: "provs-platform-prd-westeurope"): performing CreateOrUpdate: iotdpsresource.IotDpsResourceClient#CreateOrUpdate: Failure sending request: StatusCode=0 -- Original Error: Code="Failed" Message="The async operation failed." InnerError={"unmarshalError":"json: cannot unmarshal number into Go struct field serviceErrorInternal.code of type string"} AdditionalInfo=[{"code":400303,"httpStatusCode":"BadRequest","message":"The EnableDataResidency property may not be updated after initial IotDps creation. If you contact a support representative please include this correlation identifier: 48380527-ece0-4efd-a7ff-6a91929543f7, timestamp: 2023-02-20 13:21:15Z, errorcode: IH400303."}]
│ 
│   with azurerm_iothub_dps.dps,
│   on iothub.tf line 113, in resource "azurerm_iothub_dps" "dps":
│  113: resource "azurerm_iothub_dps" "dps" {
│ 
╵

Expected Behaviour

DPS gets updated.

Actual Behaviour

Error is thrown.

Steps to Reproduce

  1. Create a DPS resource with Terraform.
  2. Change a tag.
  3. Try to run terraform apply.

Important Factoids

No response

References

No response

@lukipro lukipro added the bug label Feb 21, 2023
@github-actions github-actions bot removed the bug label Feb 21, 2023
@myc2h6o
Copy link
Contributor

myc2h6o commented Feb 23, 2023

Hi @lukipro thanks for reporting this! It looks like a bug when adding the support for data_residency_enabled #18151, I'll add a fix soon.

@github-actions
Copy link

This functionality has been released in v3.45.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
Copy link

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 Mar 27, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
4 participants