Initialize terraform plan with auth details
This commit is contained in:
parent
10ec319c03
commit
e3f5954739
|
@ -0,0 +1,14 @@
|
|||
# 3rd Assignment
|
||||
|
||||
## Main Challanges
|
||||
|
||||
My main challange is the lack of experience with Azure envrionments.
|
||||
|
||||
However, the requiremetns were pretty straight forward, and so, I
|
||||
started with reviewing the tools available to work with terrafom and
|
||||
Azure.
|
||||
The tool that seems to be a good fit, is the [aztexport](https://github.com/Azure/aztfexport)
|
||||
utility, which exports an existing azure state into a collecton of
|
||||
terraform plan files.
|
||||
|
||||
This helped me with understanding the particulars of the environment.
|
|
@ -0,0 +1,24 @@
|
|||
terraform {
|
||||
required_providers {
|
||||
azurerm = {
|
||||
source = "hashicorp/azurerm"
|
||||
version = "~>2.0"
|
||||
}
|
||||
|
||||
random = {
|
||||
source = "hashicorp/random"
|
||||
version = "~>3.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
provider "azurerm" {
|
||||
features {}
|
||||
|
||||
subscription_id = "ced61991-09cf-4e19-a773-fa454609e1ed"
|
||||
tenant_id = "6b4b1b0d-23f1-4063-bbbd-b65e2984b893"
|
||||
# Client ID of SzTerraform service-prinicipal:
|
||||
# Azure Active Directory -> App registration -> SzTerraform
|
||||
client_id = "0de043f8-9006-4791-baa1-f48a60809c1c"
|
||||
client_secret = local.secret
|
||||
}
|
|
@ -0,0 +1,8 @@
|
|||
# Copy this file into local.init.tf (which is in .gitignore) as fill
|
||||
# in the secret's value
|
||||
|
||||
locals {
|
||||
# Secret for the SzTerraform service-prinicipal:
|
||||
# Azure Active Directory -> App registration -> SzTerraform -> Certificates & secrets
|
||||
secret = "<Secret>"
|
||||
}
|
Loading…
Reference in New Issue