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

Error on App Service creation #4197

Closed
adamgd opened this issue Aug 30, 2019 · 2 comments
Closed

Error on App Service creation #4197

adamgd opened this issue Aug 30, 2019 · 2 comments

Comments

@adamgd
Copy link

adamgd commented Aug 30, 2019

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Terraform (and AzureRM Provider) Version

Affected Resource(s)

  • azurerm_1.33.1

Terraform Configuration Files

#NB - this config is copied verbatim from https://www.terraform.io/docs/providers/azurerm/r/app_service.html

resource "azurerm_resource_group" "test" {
  name     = "example-resources"
  location = "West Europe"
}

resource "azurerm_app_service_plan" "test" {
  name                = "example-appserviceplan"
  location            = "${azurerm_resource_group.test.location}"
  resource_group_name = "${azurerm_resource_group.test.name}"

  sku {
    tier = "Standard"
    size = "S1"
  }
}

resource "azurerm_app_service" "test" {
  name                = "example-app-service"
  location            = "${azurerm_resource_group.test.location}"
  resource_group_name = "${azurerm_resource_group.test.name}"
  app_service_plan_id = "${azurerm_app_service_plan.test.id}"

  site_config {
    dotnet_framework_version = "v4.0"
    scm_type                 = "LocalGit"
  }

  app_settings = {
    "SOME_KEY" = "some-value"
  }

  connection_string {
    name  = "Database"
    type  = "SQLServer"
    value = "Server=some-server.mydomain.com;Integrated Security=SSPI"
  }
}

Expected Behavior

App Service should be created

Actual Behavior

Error: The name "example-app-service" used for the App Service needs to be globally unique and isn't available: Hostname 'example-app-service' already exists. Please select a different name.

  on test.tf line 24, in resource "azurerm_app_service" "test":
  24: resource "azurerm_app_service" "test" {

Steps to Reproduce

  1. terraform apply

Important Factoids

None

References

@tombuildsstuff
Copy link
Contributor

hi @adamgd

Thanks for opening this issue.

The name for an App Service needs to be globally unique - unfortunately in this case the name example-app-service is taken; if you switch this to another name this should work for you. Can you take a look and see if that works for you?

Since this is a question rather than a bug in the Azure Provider I'm going to close this issue for the moment - but please let us know if that doesn't work for you and we'll take another look.

Thanks!

@ghost
Copy link

ghost commented Sep 29, 2019

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!

@ghost ghost locked and limited conversation to collaborators Sep 29, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants