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

Documentation is not clear about azurerm provider definition for version 2.0.0 and features #5880

Closed
squasta opened this issue Feb 25, 2020 · 6 comments

Comments

@squasta
Copy link

squasta commented Feb 25, 2020

Hi, I spend few hours try to understand why a so simple code like the following was not working with the lastest azurerm provider :

variable "AzureRegion" {
  type    = string
}

variable "ResourceGroupName" {
  type    = string
}

# Azure Resource Group
resource "azurerm_resource_group" "Terra-RG-Stan1" {
  name     = var.ResourceGroupName
  location = var.AzureRegion
}

If I run terraform plan and then type the values of AzureRegion and ResourceGroupName, I get the following error message : Error: "features": required field is not set

Fixing the azurerm provider to a 1.x version using the following code, solve the issue :

provider "azurerm" {
version  = "=1.44.0"
} 

Try to change with version 2.0.0 doesn't solve the issue :

provider "azurerm" {
version  = "=2.0.0"
} 

Adding feature{} to provider block, solve the issue:

provider "azurerm" {
version  = "=2.0.0"
**features {}**
} 

So one thing to improve is probably to explain that now it s mandatory to define azurem provider block in terraform code in beginning of documentation https://www.terraform.io/docs/providers/azurerm/index.html and insist about required features {}

@ssrirama-aka
Copy link

@squasta The requirement for features {} block was described in the 2.0.0 release notes.

https://github.com/terraform-providers/terraform-provider-azurerm/releases/tag/v2.0.0

But I agree with you, this and other requirements must be rolled into the provider documentation. I suggest that, in addition to the Azure Provider landing page update, the features {} should be called out in the Azure Provider 2.0 Upgrade Guide (assuming this upgrade guide will be maintained for some period of time).

https://www.terraform.io/docs/providers/azurerm/guides/2.0-upgrade-guide.html

@TomArcherMsft
Copy link

@squasta Thank you for the feedback. I'm working with the engineering team on the best way to update the docs.

@jghal
Copy link

jghal commented Dec 11, 2020

I'm hitting the case where I'm not even using any azurerm plugin data or resources, just the state backend. And that is requiring me to fully declare a provider for the features {} requirement.

@bsimser
Copy link

bsimser commented Jan 28, 2021

Not sure if this is related but I'm just getting things setup and I'm tripping over the features section. I have my sample main.tf file like this:

terraform {
	required_providers {
		azure = {
			source = "hashicorp/azurerm"
			version = ">= 2.26"
		}
	}
}

provider "azurerm" {
	features {}
}

resource "azurerm_resource_group" "rg" {
	name = "myTFResourceGroup"
	location = "westus2"
}

Ran this with terraform init and that worked. Then I ran terraform plan and got this result:

Error: "features": required field is not set

I'm running

  • Terraform v0.14.5
  • azurerm v2.45.1

Not sure where to go from here.

@favoretti
Copy link
Collaborator

Since this issue has been reported a long time ago and relates to the version of provider we no longer support - I'm going to close it. Please open a new updated bug report on current versions of terraform and provider if this is still relevant. Thank you.

@github-actions
Copy link

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 have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 21, 2021
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

7 participants