-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
Changing API Management SKU doesn't seem to work #10686
Comments
Provider version |
Hi @favoretti, you're right it's an older version of azurerm, so I tested it with one of the latest versions: TF 0.14.6 and azurerm 2.47. Actually the result now is much more disturbing: the resource gets destroyed! From the documentation and from experience, I know changing the tier from Standard to Developer should not destroy the resource at all. Destroying will replace the IP address, which is very inconvenient as it might be white listed in some firewall, or be used in scripts to do IP filtering on backend services. Steps:
Output (see
|
This potentially is correct behavior. I'll test whether SKU can be updated, but I'm afraid API isn't able to do that. In that case the only thing we can do is destroy and re-create. |
The documentation is quite clear about when a new IP address will be created: But I understand you're bound by the APIM management API to do this? |
Yeah, I hear you. I'll modify the resource to not to recreate and run some tests, will keep you posted. |
This has been released in version 2.50.0 of the provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. As an example: provider "azurerm" {
version = "~> 2.50.0"
}
# ... other configuration ... |
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 feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 [email protected]. Thanks! |
Community Note
Terraform (and AzureRM Provider) Version
Terraform 0.12.20
AzureRM 1.40
Affected Resource(s)
azurerm_api_management
Terraform Configuration Files
n/a
Expected Behaviour
SKU should be modified and have the updated SKU
Actual Behaviour
Output (after running the apply for the second time)-> see steps to reproduce):
Output says it modified the resource, but checking APIM in the portal it seems it didn't change the SKU.
Also, the modification took only 2 seconds, while it takes 30 minutes via the Azure portal.
It seems like no action was taken on the resource.
Steps to Reproduce
First create resource with 'Standard' SKU:
resource "azurerm_api_management" "apim" {
name = "test-apim"
location = "westeurope"
resource_group_name = "test-rg"
publisher_name = "[email protected]"
publisher_email = "[email protected]"
sku_name = "Standard_1"
}
Then update the resource to change the SKU to 'Developer':
resource "azurerm_api_management" "apim" {
name = "test-apim"
location = "westeurope"
resource_group_name = "test-rg"
publisher_name = "[email protected]"
publisher_email = "[email protected]"
sku_name = "Developer_1"
}
The text was updated successfully, but these errors were encountered: