forked from andif888/azure-playground
-
Notifications
You must be signed in to change notification settings - Fork 0
/
sample.env
210 lines (168 loc) · 8.67 KB
/
sample.env
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
# Environment file
# You need to source the environment if you intend to run build.sh and
# destroy.sh from your local machine
# rename sample.env to .env and source it using `source .env`
######################
# Mandatory Variables:
######################
# -------------
# Azure Details
# -------------
# Azure Tenant ID
export ARM_TENANT_ID="<your azure tenant id>"
# Azure Subscription ID
export ARM_SUBSCRIPTION_ID="<your azure subscription id>"
# Azure Service Principal App ID
export ARM_CLIENT_ID="<your azure client id>"
# Azure Service Principal App Secret Key
export ARM_CLIENT_SECRET="<your azure client secret>"
# Access Key for the the pre-existing Azure Storage Account
export ARM_ACCESS_KEY="<your storage account access key for terraform state files>"
# ----------------------------------------------------------
# Mandatory variables for pre-existing azure storage account
# ----------------------------------------------------------
# Name of an existing resource-group hosting a storage account for terraform state files
export TF_VAR_azure_bootstrap_resource_group_name="rg-playground-bootstrap"
# Name of an existing storage account to save terraform state files
export TF_VAR_azure_bootstrap_storage_account_name="stplaygroundbs"
# Name of an existing blob container to save terraform state files
export TF_VAR_azure_bootstrap_storage_account_container_name="terraformstates"
# -------------------------------------
# Mandatory variable for azure location
# -------------------------------------
# Azure Location where the resource should be deployed
export TF_VAR_azure_location="germanywestcentral"
#--------------------------------------------------------------------
# Mandatory variables for AD Accounts and local admin accounts on VMs
#--------------------------------------------------------------------
# Terraform creates a few infrastructure VMs and also a complete AD Domain Controller.
# Those VMs gets a local aministrator account. As well as
# a domain admininistrator account for the domain controller.
# These are sample values. Change it!
export TF_VAR_azure_vm_admin_username="a-robot"
export TF_VAR_azure_vm_admin_password="AutomationIsNoSecretStuff0815"
# -----------------------------------------
# Mandatory variable for environment prefix
# -----------------------------------------
# This prefix mainly used for prefixing azure resource names to get consistent
# naming of azure objects. It is also used as prefix for terraform state files.
# Please use a short prefix which must only contain letters and numbers,
# no spaces, dashes, underscores or any other special character.
export TF_VAR_environment_prefix="playground"
# -----------------------------------------------------
# Mandatory variable for externel revers proxy hostname
# -----------------------------------------------------
# Terraform creates an small linux VM acting as revers proxy.
# This VM gets a public IP address and a individual DNS hostname.
# The domain part is provide by azure and depends on the azure region.
# You can look up those domain parts for different Azure regions in
# ./terraform/_shared/shared_variables.tf
# If you deploy your infrastructure in Germany West Central then the domain part
# for example is .germanywestcentral.cloudapp.azure.com.
# Examples for other regions:
# West Europe .westeurope.cloudapp.azure.com
# North Europe .northeurope.cloudapp.azure.com
# East US .eastus.cloudapp.azure.com
#
# This VM also gets a public DNS hostname which you can define.
# The DNS hostname must be globally unique.
# For example if you choose "playground873637" for TF_VAR_reversproxy_dns_hostname
# and run it in Germany West Central then the resulting FQDN would be:
# playground873637.germanywestcentral.cloudapp.azure.com
#
# Checkout: ./docs/how_to_prepare_your_public_domain_name_with_dns_cname_records.md
export TF_VAR_reversproxy_dns_hostname="playground873637"
# You need a real domain at any domain hoster.
# For your real domain you simply need to create CNAME Wildcard DNS records.
# If your environment should be accessible for example at playground.microhouse.de,
# which is a domain you own and control, then you need to create the
# following 2 DNS records at your domain hosting provider.
# playground CNAME playground873637.germanywestcentral.cloudapp.azure.com
# *.playground CNAME playground873637.germanywestcentral.cloudapp.azure.com
#
# Checkout: ./docs/how_to_prepare_your_public_domain_name_with_dns_cname_records.md
export TF_VAR_public_hosting_domain="playground.microhouse.de"
# ----------------------------------------------
# Mandatory variable for Active Directory Domain
# ----------------------------------------------
# A domain controller will be automatically created.
# Active Directory Netbios name
export TF_VAR_ad_domain_netbios_name="playground"
# Active Directory DNS Name
export TF_VAR_ad_domain_name="playground.prianto.com"
# Active Directory Distinquished Name
export TF_VAR_ad_domain_dn_name="DC=playground,DC=prianto,DC=com"
# ----------------------------------------------------------
# Mandatory variable for a storage account to host vhd files
# ----------------------------------------------------------
# This storage account will be automatically created by terraform.
# The name will be used for a cheap storage account to host OS disks for small
# infrastructure VMs.
# The name of the storage account must be unique in Azure.
# Must be between 3 and 24 characters.
# - must start with a letter
# - may only contain letters and numbers
# - no space, dashes, underscores or any other special characters
export TF_VAR_azure_storage_account_name="stplaygroundvm"
# --------------------------------------------------------------
# Mandatory variable for a storage account for azure file shares
# --------------------------------------------------------------
# This storage account will be automatically created by terraform.
# The name will be used for a storage account to host azure file shares.
# Please be aware, the you only will be able to access azure file share as
# soon you have replicated your Active Directory Users and Groups using
# AzureConnect. AzureConnect will NOT be automatically installed and
# configured by this repo.
# The name of the storage account must be unique in Azure.
# Must be between 3 and 15 characters. (AD Join -> samAccountName -> max. 15 char.)
# - must start with a letter
# - may only contain letters and numbers
# - no space, dashes, underscores or any other special characters
export TF_VAR_azure_storage_shares_storage_account_name="stplaygroundfs"
# ------------------------------
# Mandatory variable for SSH key
# ------------------------------
# You need a private key file. This is used for OpenSSH inside the VMs.
# Example command to generate private key:
# ssh-keygen -f ~/.ssh/playground_id_rsa -t rsa -b 2048 -C "azure-plyg-demo"
# Make sure your private key does not exceed 2048 bytes (-b 2048).
# I ran into error in terraform when using -b 4096.
# You usually only need to adjust this variable if you intend to run the apply_* scripts
# locally.
# Checkout: ./docs/how_to_prepare_a_ssh_private_key.md
export TF_VAR_ssh_private_key_file=~/.ssh/playground_id_rsa
######################
# Optional Variables:
######################
# ----------------------------------------
# Optional variables for Windows VMs
#-----------------------------------------
# Default:
# export TF_VAR_azure_vm_windows_timezone="UTC"
# export TF_VAR_azure_vm_windows_user_language="en-US"
# Example: German:
# export TF_VAR_azure_vm_windows_timezone="W. Europe Standard Time"
# export TF_VAR_azure_vm_windows_user_language="de-DE"
# ----------------------------------------------
# Optional variables for Azure Networks and Tags
#-----------------------------------------------
# export TF_VAR_azure_resource_group_postfix="demo"
# export TF_VAR_azure_virtual_network_address_space="10.0.0.0/16"
# export TF_VAR_azure_virual_network_subnet_address_prefixes='["10.0.1.0/24"]'
# export TF_VAR_azure_virtual_network_subnet_names='["frontend"]'
# export TF_VAR_azure_tags='{owner = "you", credits = "andif888", donate = "beer"}'
# Optional Variable to enable multi-factor authentication in Guacamole
# export GUAC_MFA_ENABLED=true
# ----------------------------------------
# Optional variables for Azure VPN Gateway
#-----------------------------------------
# Only necessary if building VPN Gateway (gets not created by default)
# export TF_VAR_virtual_network_gateway_connection_shared_key="YourSecretKey"
# ------------------
# Nothing to do here
# ------------------
# Making credentials also available to Ansible
export AZURE_TENANT=$ARM_TENANT_ID
export AZURE_SUBSCRIPTION_ID=$ARM_SUBSCRIPTION_ID
export AZURE_CLIENT_ID=$ARM_CLIENT_ID
export AZURE_SECRET=$ARM_CLIENT_SECRET