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

azurerm_app_service_plan - Unable to configure imported ASP (says kind is "app") #1148

Closed
midacts opened this issue Apr 20, 2018 · 10 comments · Fixed by #1156
Closed

azurerm_app_service_plan - Unable to configure imported ASP (says kind is "app") #1148

midacts opened this issue Apr 20, 2018 · 10 comments · Fixed by #1156

Comments

@midacts
Copy link
Contributor

midacts commented Apr 20, 2018

Hi there,

Thank you for opening an issue. Please note that we try to keep the Terraform issue tracker reserved for bug reports and feature requests. For general usage questions, please see: https://www.terraform.io/community.html.

Terraform Version

Run terraform -v to show the version. If you are not running the latest version of Terraform, please upgrade because your issue may have already been fixed.

Terraform v0.11.7

  • provider.azurerm v1.3.2

Affected Resource(s)

Please list the resources as a list, for example:

  • app_service_plan

Terraform Configuration Files

resource "azurerm_app_service_plan" "ASP-1" {

	name                		= "ASP-1"
	location            		= "${azurerm_resource_group.ASE-1.location}"
	resource_group_name 		= "${azurerm_resource_group.ASE1.name}"
	
	sku {
		tier		= "Isolated"
		size		= "I1"
		capacity	= 0
	}

	properties {
		app_service_environment_id	= "/subscriptions/xxxxxx/resourceGroups/ASE-1/providers/Microsoft.Web/hostingEnvironments/ASE-1"
	}

}

Debug Output

Please provider a link to a GitHub Gist containing the complete debug output: https://www.terraform.io/docs/internals/debugging.html. Please do NOT paste the debug output in the issue; just paste a link to the Gist.

https://gist.github.com/Midacts/d0b9508407c3eeb91fe226969db5abf1

Panic Output

If Terraform produced a panic, please provide a link to a GitHub Gist containing the output of the crash.log.

No panic

Expected Behavior

What should have happened?

It should see the already existing ASP and not try to create a new one

Actual Behavior

What actually happened?

terraform apply says it will remove the existing ASP and create a new one instead of seeing the settings as being correct

Steps to Reproduce

Please list the steps required to reproduce the issue, for example:

  1. terraform apply

Important Factoids

Are there anything atypical about your accounts that we should know? For example: Running in EC2 Classic? Custom version of OpenStack? Tight ACLs?

Nothing special

References

Are there any other GitHub issues (open or closed) or Pull Requests that should be linked here? For example:

@tombuildsstuff
Copy link
Contributor

hey @midacts

Thanks for opening this issue :)

Taking a look into this, I can confirm based on this ARM Template that app is also a valid value for the kind field - however I can only find limited references to this field. Out of interest was this an existing resource that you've imported, or for a new one created via Terraform?

Thanks!

@midacts
Copy link
Contributor Author

midacts commented Apr 24, 2018 via email

@midacts
Copy link
Contributor Author

midacts commented Apr 24, 2018

Awesome.
Thanks for your help on this (and for knowing what was going on to troubleshoot).

As a side note, even though this is committed to master, how/when would I be able to see these changes reflected in my local Terraform instance?

@tombuildsstuff
Copy link
Contributor

@midacts apologies, I thought I'd posted a comment in here. This isn't released yet but will be as part of v1.4.0 in the near future - when that's released, you can update to the new version by using:

provider "azurerm" {
  version = "=1.4.0"
}

and re-running terraform init :)

@tombuildsstuff tombuildsstuff added this to the 1.4.0 milestone Apr 24, 2018
@midacts
Copy link
Contributor Author

midacts commented Apr 24, 2018

No problem.
Sounds good. Thanks again for the help.

@tombuildsstuff
Copy link
Contributor

hey @midacts

Just to let you know that v1.4.0 of the Azure Provider has been released which includes the fix for this :)

Thanks!

@midacts
Copy link
Contributor Author

midacts commented Apr 27, 2018

It worked!
I ran terraform init -upgrade and it upgraded the azurerm provider from 1.3.0 to 1.4.0.
Then when I ran terraform plan, it recognized the "app" kind.

Thanks for your help on this.

@Phydeauxman
Copy link

@midacts I ran the same thing in Cloud Shell and it is still telling me 1.3

@midacts
Copy link
Contributor Author

midacts commented Apr 30, 2018

@Phydeauxman
This probably isn't best practice, but I did it for testing. I renamed my .terraform directory and ran terraform init and it repulled in all the requirements I had including the azurerm provider plugin..

@ghost
Copy link

ghost commented Mar 31, 2020

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 Mar 31, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants