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

Upgrade Api Management Version from 2020-12-01 to 2021-01-01-preview #12566

Closed
wants to merge 33 commits into from

Conversation

yupwei68
Copy link
Contributor

@yupwei68 yupwei68 commented Jul 13, 2021

To fix #12125 to support PublicIPAddress to allow setting zone in api management service in vnet

yupwei68 added 28 commits May 26, 2021 14:23
@jackofallops jackofallops added this to the v2.69.0 milestone Jul 15, 2021
@manicminer manicminer self-assigned this Jul 15, 2021
Copy link
Collaborator

@katbyte katbyte left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

build in TC fails:

[16:39:50]	[Step 4/5] api_management_api_release.go:8:2: cannot find package "." in:
[16:39:50]	[Step 4/5] 	/opt/teamcity-agent/work/a73be106926a7472/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2020-12-01/apimanagement

@yupwei68
Copy link
Contributor Author

Hi kt, I've updated the PR with the latest upstream change. Except one sample in api_operation is not returned, (I'm checking with service team), all other tests have passed. I'll track that one.

@yupwei68
Copy link
Contributor Author

Temporarily closed for the blocker of api_operation

@github-actions
Copy link

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

@amkctc
Copy link

amkctc commented Aug 11, 2021

Hi! Do You plan to resume working on this issue? Currently if you create APIM via terraform and manually assign availability zones with internal vnet - it completely breaks terraform workspace - because terraform unable to read the APIM state.
Thank You in advance!

azurerm_api_management.apimaz: Refreshing state... [id=/subscriptions/.../resourceGroups/test-sandbox-apimaztest-cc-rg/providers/Microsoft.ApiManagement/service/test-sandbox-apimaz-cc-apim]
|
│ Error: making Read request on API Management Service "test-sandbox-apimaz-cc-apim" (Resource Group "test-sandbox-apimaztest-cc-rg"):
 apimanagement.ServiceClient#Get: Failure responding to request: StatusCode=400 -- Original Error: autorest/azure: Service returned an error. Status=400 Code="" 
Message="The service is configured to allow management requests only with the following api-version values: 2021-01-01-preview, 2021-04-01-preview"
│
│   with azurerm_api_management.apimaz,
│   on main.tf line 106, in resource "azurerm_api_management" "apimaz":
│  106: resource "azurerm_api_management" "apimaz" {
│

@tombuildsstuff
Copy link
Contributor

@JeffreyRichter that seems like an API bug, where a resource is modified on one API Version but can't be retrieved on an older one?

@JeffreyRichter
Copy link

If you're saying that just modifying a resource with a new api-version value makes the resource completely ungettable with an old api-version value, then that is a breaking change and is not allowed by Azure's versioning policies. However, we occasionally DO allow an exception to this, but it requires that the service team fully document this behavior so that customers completely understand that updating a resource with a new api-version means that it will be inaccessible to a client using an old api-version so that customers are consciously and explicitly opting into this behavior on their schedule.

I'm guess that this documentation was done here, or you would have been expecting this behavior rather than being surprised by it. If so, then this change is against Azure's policies. Plus, I would have been notified of this break and I don't recall hearing about this one and so it likely is a violation of Azure's versioning policies. I'll contact some people closer to this issue. Thanks for bringing this to my attention.

@dmedeiros204
Copy link

Interesting enough I was able to set the public IP, and the AV Zone through a combination of Terraform and ARM but never lost terraform functionality after

  "properties": {
        "publicIpAddressId": "[parameters('publicIpAddressId')]",
        "virtualNetworkConfiguration": {
          "subnetResourceId": "[parameters('SubnetResourceId')]"
        },
        "virtualNetworkType": "Internal",
        "publisherEmail": "[email protected]",
        "publisherName": "MyTest"
      },
      "zones": ["1"]

Tf to implement

resource "azurerm_template_deployment" "pip" {
  name                = "pip_setup"
  resource_group_name = "myRG"

  template_body = file("${path.module}/apim_zones.json")

  parameters = {
    "publicIpAddressId" = "mypipid"
    "SubnetResourceId"  = azurerm_subnet.secondary.id
  }

  deployment_mode = "Incremental"
  
}

@yupwei68
Copy link
Contributor Author

I'll tracking this problem with service team.

@github-actions
Copy link

I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active contributions.
If you have found a problem that seems related to this change, 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 Sep 11, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants