Hi all,
I’ve been trying to use TFC in order to store the state remotely and get rid of local modules, files and runs on my team’s laptops. I’ve configured the TFC backend (after creating an account, organisation and workspace, of course):
terraform {
backend "remote" {
organization = "my_org"
workspaces {
name = "my_workspace"
}
}
}
I’ve followed the TFC instructions, generated credentials for TFC and created a local file at $HOME/.terraformrc :
credentials "app.terraform.io" {
token = "#############################################"
}
My Terraform file is the simplest Azure environment:
provider "azurerm" {
version = ">=1.38.0"
alias = "alias"
subscription_id = "#########################"
}
resource "azurerm_resource_group" "test_resource_group" {
location = "westeurope"
name = "test_resource_group"
}
I was thinking that when I’ll run terraform plan
or terraform apply
it’ll link me to TFC which will run those commands. To my surprise, I saw azurerm plugin being downloaded to my laptop and Terraform state created locally.
What am I doing wrong here?