Closed ghost closed 6 years ago
hi @Puneet-Mathur
Thanks for opening this issue :)
The names used for Function Apps (as with certain other resources) need to be globally unique - you're seeing the error There was a conflict.
since a Function App already exists with that name, so it's not possible to create it. Would you be able to try again with a name that's more unique and see if that solves your issue here?
Since this is a question regarding Terraform Configuration rather than a bug in Terraform - I'm going to close this issue for the moment (however we'll continue responding π).
Thanks!
Hello Tom,
I just tried with a unique name for the function app but it is still throwing the same error.
Could you help me on this to make it work.
Thanks and Regards Puneet Mathur
From: Tom Harvey notifications@github.com Sent: Thursday, July 19, 2018 3:56 PM To: terraform-providers/terraform-provider-azurerm terraform-provider-azurerm@noreply.github.com Cc: Puneet Mathur pmathur@hypergrid.com; Mention mention@noreply.github.com Subject: Re: [terraform-providers/terraform-provider-azurerm] Azure Function App Deployment Failing (#1606)
hi @Puneet-Mathurhttps://github.com/Puneet-Mathur
Thanks for opening this issue :)
The names used for Function Apps (as with certain other resources) need to be globally unique - you're seeing the error There was a conflict. since a Function App already exists with that name, so it's not possible to create it. Would you be able to try again with a name that's more unique and see if that solves your issue here?
Since this is a question regarding Terraform Configuration rather than a bug in Terraform - I'm going to close this issue for the moment (however we'll continue responding π).
Thanks!
β You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/terraform-providers/terraform-provider-azurerm/issues/1606#issuecomment-406230415, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AcOewBF39Ikk2RA1KSToXsY5Qq7yOZGwks5uIF7LgaJpZM4VVYYS.
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 π hashibot-feedback@hashicorp.com. Thanks!
This issue was originally opened by @Puneet-Mathur as hashicorp/terraform#18479. It was migrated here as a result of the provider split. The original body of the issue is below.
Terraform Version
Terraform v0.11.7
Terraform Configuration Files
provider "azurerm" { } data "azurerm_storage_account" "storage_account" { name = "abc" resource_group_name = "abc"
} data "azurerm_resource_group" "group" { name = "abc"
} data "azurerm_app_service_plan" "Plan" {
name = "abc" resource_group_name = "${data.azurerm_resource_group.group.name}"
} output "Storage_Account" {
value = "${data.azurerm_storage_account.storage_account.primary_connection_string}" }
resource "azurerm_function_app" "App" {
name = "AppFuncCheck" location = "${data.azurerm_resource_group.group.location}" resource_group_name = "${data.azurerm_resource_group.group.name}" storage_connection_string = "${data.azurerm_storage_account.storage_account.primary_connection_string}" app_service_plan_id = "${data.azurerm_app_service_plan.Plan.id}"
}
Debug Output
data.azurerm_resource_group.group: Refreshing state... data.azurerm_storage_account.storage_account: Refreshing state... data.azurerm_app_service_plan.Plan: Refreshing state... azurerm_function_app.App: Creating... app_service_plan_id: "" => "/subscriptions/12347865979899069806/resourceGroups/abc/providers/Microsoft.Web/serverfarms/abc" client_affinity_enabled: "" => ""
connection_string.#: "" => ""
default_hostname: "" => ""
enabled: "" => "true"
https_only: "" => "false"
identity.#: "" => ""
location: "" => "westus"
name: "" => "ABC"
outbound_ip_addresses: "" => ""
resource_group_name: "" => "ABC"
site_config.#: "" => ""
storage_connection_string: "" => ""
tags.%: "" => ""
version: "" => "~1"
Error: Error applying plan:
1 error(s) occurred:
azurerm_function_app.App: 1 error(s) occurred:
azurerm_function_app.App: web.AppsClient#CreateOrUpdate: Failure sending request: StatusCode=0 -- Original Error: autorest/azure: Service returned an error. Status=400 Code="BadRequest" Message="There was a conflict. The remote server returned an error: (400) Bad Request." Details=[{"Message":"There was a conflict. The remote server returned an error: (400) Bad Request."},{"Code":"BadRequest"},{"ErrorEntity":{"Code":"BadRequest","ExtendedCode":"01020","Message":"There was a conflict. The remote server returned an error: (400) Bad Request.","MessageTemplate":"There was a conflict. {0}","Parameters":["The remote server returned an error: (400) Bad Request."]}}]
Crash Output
Expected Behavior
The terraform apply should start creating the Azure function App with the details provided but it is getting 400 error for one of the Azure APIs it is calling.
Actual Behavior
It is getting 400 error for one of the Azure APIs it is calling.
Steps to Reproduce
Additional Context
References