Unable to run `terraform apply`
Opened this issue · 2 comments
Can you help? I am unable to get the first example in chapter 6 to work :(
C:\temp\Bootstrapping-Microservices\chapter-6\example-1\scripts>terraform apply
│ Warning: Version constraints inside provider configuration blocks are deprecated
│
│ on providers.tf line 4, in provider "azurerm":
│ 4: version = "1.38.0"
│
│ Terraform 0.13 and earlier allowed provider version constraints inside the provider configuration block, but that is
│ now deprecated and will be removed in a future version of Terraform. To silence this warning, move the provider
│ version constraint into the required_providers block.
╵
╷
│ Error: Error building AzureRM Client: Error populating Client ID from the Azure CLI: No Authorization Tokens were found - please ensure the Azure CLI is installed and then log-in with az login
.
│
│ with provider["registry.terraform.io/hashicorp/azurerm"],
│ on providers.tf line 3, in provider "azurerm":
│ 3: provider "azurerm" {
│
Steps are outlined here - https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/guides/azure_cli
Could the online version of the book be updated to reflect these new requirements, or perhaps the github source?
Changes to providers.tf
# Initialises Terraform providers and sets their version numbers.
terraform {
required_providers {
azurerm = {
source = "hashicorp/azurerm",
version = "=2.89.0"
}
}
}
provider "azurerm" {
features {}
subscription_id = "......."
}
@mrpmorris Just letting you know I've started working towards a 2nd edition of Bootstrapping Microservices so I'm going to take this feedback into account.
If you have other feedback please reach out to me on ashley@codecapers.com.au.