Last active
January 6, 2021 02:56
-
-
Save jhanley-com/335a9b949e67d9027590219216279811 to your computer and use it in GitHub Desktop.
Terraform Azure Service Principal - Part 2
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Test code for the question: https://stackoverflow.com/q/65525116/8016720 | |
# Provides configuration details for Terraform | |
terraform { | |
required_version = ">= 0.14.3, < 0.15.0" | |
required_providers { | |
azurerm = { | |
source = "hashicorp/azurerm" | |
version = "~>2.41" | |
} | |
} | |
} | |
# Provides configuration details for the Azure Terraform provider | |
provider "azurerm" { | |
# !!! Must include features even if empty | |
features {} | |
subscription_id = "" | |
client_id = "" | |
client_secret = "long-random-string" | |
tenant_id = "" | |
} | |
# Provides the Resource Group to logically contain resources | |
resource "azurerm_resource_group" "rg" { | |
name = "terraform-test-rg-4" | |
location = "westus2" | |
tags = { | |
environment = "dev" | |
source = "Terraform" | |
owner = "John Hanley" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment