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

importing resource failure due to capitalization on azurerm_web_application_firewall_policy #16072

Open
Aeternax opened this issue Mar 25, 2022 · 2 comments
Labels

Comments

@Aeternax
Copy link

TF version: 1.1.7
azurerm version: 3.0.1 (also at least 2.99 and 2.85)

Command run:

terraform import azurerm_web_application_firewall_policy.firewall /subscriptions/....................../resourceGroups/XXXXXXXXXXXXXXXXXXXXX-RSG/providers/Microsoft.Network/applicationGatewayWebApplicationFirewallPolicies/yyyyyyyyyyyyyyy

Problem encountered:

Error: ID was missing the ApplicationGatewayWebApplicationFirewallPolicies element

│ with azurerm_web_application_firewall_policy.firewall,
│ on firewall.tf line 1, in resource "azurerm_web_application_firewall_policy" "firewall":
│ 1: resource "azurerm_web_application_firewall_policy" "firewall" {

Workaround:

Making capital A on ApplicationGatewayWebApplicationFirewallPolicies.
The azure portal returns the ID with a lowercase a.

On at least azurerm version 2.67 the import "succeeded" but will largely be empty.

@neil-yechenwei
Copy link
Contributor

thanks for raising this issue. Per the doc descirption, seems the section ApplicationGatewayWebApplicationFirewallPolicies is expected.

@wvannuffele4
Copy link

This is a bug in the Azure portal, not the AzureRM provider.
The resource JSON correctly lists the resource id with a capitalized A.

@rcskosir rcskosir added service/application-gateway upstream/microsoft Indicates that there's an upstream issue blocking this issue/PR labels Jun 12, 2023
@rcskosir rcskosir added category/casing/resource-id upstream/microsoft/blocking-api-issue This label is applicable when there is a bug on the Azure API that is blocking. and removed upstream/microsoft Indicates that there's an upstream issue blocking this issue/PR labels Mar 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants