Skip to content

Instantly share code, notes, and snippets.

@jhanley-com
Last active Jan 6, 2021
Embed
What would you like to do?
Terraform Azure Service Principal - Part 2
# 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