hashicorp / terraform-provider-azurerm

Terraform provider for Azure Resource Manager
https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs
Mozilla Public License 2.0
4.58k stars 4.62k forks source link

Error setting Sign Up settings for Api Management: "Representation was empty." #16797

Closed alexwieseawe closed 2 years ago

alexwieseawe commented 2 years ago

Is there an existing issue for this?

Community Note

Terraform Version

1.1.4

AzureRM Provider Version

3.6.0

Affected Resource(s)/Data Source(s)

azurerm_api_management

Terraform Configuration Files

resource "azurerm_api_management" "example" {
  name                = "example-apim"
  location            = azurerm_resource_group.example.location
  resource_group_name = azurerm_resource_group.example.name
  publisher_name      = "My Company"
  publisher_email     = "company@terraform.io"

  sku_name = "Developer_1"
}

Debug Output/Panic Output

│ Error:  setting Sign Up settings for Api Management: (Service Name "12558544-01" / Resource Group "b51920e4-ec2a-4cd1-a0e8-04227876a28d"): apimanagement.SignUpSettingsClient#CreateOrUpdate: Failure responding to request: StatusCode=400 -- Original Error: autorest/azure: Service returned an error. Status=400 Code="ValidationError" Message="Representation was empty."
│ 
│   with module.apim-ptn.module.apim.azurerm_api_management.apim,
│   on .terraform/modules/apim-ptn.apim/main.tf line 2, in resource "azurerm_api_management" "apim":
│    2: resource "azurerm_api_management" "apim" {
│ 
╵

Expected Behaviour

Deployment succeeds without error

Actual Behaviour

In v3.6.0 the Error Service returned an error. Status=400 Code="ValidationError" Message="Representation was empty." is returned

Steps to Reproduce

  1. terraform init
  2. terraform apply

Important Factoids

No response

References

No response

alexwieseawe commented 2 years ago

Issue disappeared after running terraform apply again. It appears to be a timing issue.

mybayern1974 commented 2 years ago

@alexwieseawe thank you for opening this issue. Would you be ok if we close this issue by noticing you mentioned there are no more blockings?

github-actions[bot] commented 2 years ago

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.