Skip to content

Commit

Permalink
Simplify example
Browse files Browse the repository at this point in the history
  • Loading branch information
stemaMSFT committed Aug 3, 2023
1 parent 6d6e1a7 commit 42b7a75
Show file tree
Hide file tree
Showing 4 changed files with 64 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@

archive/.terraform/terraform.tfstate
archive/.terraform.lock.hcl
archive/.terraform/providers/registry.terraform.io/azure/azapi/1.6.0/windows_amd64/terraform-provider-azapi_v1.6.0.exe
archive/.terraform/providers/registry.terraform.io/hashicorp/azurerm/3.58.0/windows_amd64/terraform-provider-azurerm_v3.58.0_x5.exe
archive/.terraform/providers/registry.terraform.io/hashicorp/random/3.5.1/windows_amd64/terraform-provider-random_v3.5.1_x5.exe
Empty file added archive/main-generic.tf
Empty file.
29 changes: 29 additions & 0 deletions archive/main.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
resource "azurerm_resource_group" "qs101" {
name = "rg-qs101"
location = "westus2"
}
# Provision a Lab Service Account and a Lab that are in public preview
resource "azapi_resource" "qs101-account" {
type = "Microsoft.LabServices/labaccounts@2018-10-15"
name = "qs101LabAccount"
parent_id = azurerm_resource_group.qs101.id

body = jsonencode({
properties = {
enabledRegionSelection = false
}
})
}

resource "azapi_resource" "qs101-lab" {
type = "Microsoft.LabServices/labaccounts/labs@2018-10-15"
name = "qs101Lab"
parent_id = azapi_resource.qs101-account.id

body = jsonencode({
properties = {
maxUsersInLab = 10
userAccessMode = "Restricted"
}
})
}
29 changes: 29 additions & 0 deletions archive/providers.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
terraform {
required_providers {
azapi = {
source = "azure/azapi"
}

azurerm = {
source = "hashicorp/azurerm"
}

random = {
source = "hashicorp/random"
}
}
backend "azurerm" {
resource_group_name = "tfstate"
storage_account_name = "tfstate8q1ou"
container_name = "tfstate"
key = "terraform.tfstate"
}
}

provider "azapi" {
}

provider "azurerm" {
features {}
}

0 comments on commit 42b7a75

Please sign in to comment.