Skip to content

Instantly share code, notes, and snippets.

View weeyin83's full-sized avatar

Sarah Lean weeyin83

View GitHub Profile
##
# Locals
##
locals {
resource_group_name = "${var.naming_prefix}-${random_integer.sa_num.result}"
storage_account_name = "${lower(var.naming_prefix)}${random_integer.sa_num.result}"
service_principal_name = "${var.naming_prefix}-${random_integer.sa_num.result}"
}
##
##
# Terraform Configuration
##
terraform {
required_version = ">=1.6.0"
required_providers {
azurerm = {
source = "hashicorp/azurerm"
##
# Variables
##
variable "location" {
type = string
default = "northeurope"
}
az provider register --namespace 'Microsoft.HybridCompute'
az provider register --namespace 'Microsoft.GuestConfiguration'
az provider register --namespace 'Microsoft.HybridConnectivity'
az provider register --namespace 'Microsoft.AzureArcData'
azcmagent config clear proxy.url
azcmagent config set proxy.url "http://proxyserveraddress:port"
Get-Content C:\ProgramData\AzureConnectedMachineAgent\Log\himds.log -Tail 5
azcmagent show
azcmagent connect --location "westeurope" --resource-group "arclab" --subscription-id "0000000a-0000-000a-a000-00000000000a" --tenant-id "0000000a-0000-000a-a000-00000000000a" --service-principal-id "0000000a-0000-000a-a000-00000000000a" --service-principal-secret "replacewithyoursecret"
azcmagent connect --location "westeurope" --resource-group "arclab" --subscription-id "0000000a-0000-000a-a000-00000000000a"