## Terraform Commands
This basic compute demo will consist of the orchestration of blank Basic_A1 Azure instances into Microsoft Azure.
- It is assumed that this demo is being ran from a UNIX based machine
- A Microsoft Azure account -Sign up here-
- Azure API authentication credentials for your account stored locally. Download them here
- This repository cloned locally (install Git here)
- Terraform installed (install it here)
- cd into
{location_of_this_repo}/azure/environments/{environment_you_wish_to_build}/compute
- open
terraform.tfvars
and enter a value for variablesssh_username
,ssh_password
,storage_name
* and save - run command
export AZURE_PUBLISH_SETTINGS=$(cat {path_to_the_publish_settings_downloaded_in_prereqs})
- run command
terraform get
- run command
terraform plan -var-file=./terraform.tfvars
- run command
terraform apply -state=./terraform.tfstate -var-file=./terraform.tfvars
To destroy the infrastructure you have built, run command terraform destroy -state=./terraform.tfstate -var-file=./terraform.tfvars
The storage_name
variable is the name of the storage service to attach to the instance, it is blob storage service in Azure that serves as the backend to the instance. To build a storage using this make a module declaration within an environment for the storage_service
module at ./modules/compute/storage/storage_service
and pass the appropriate variables in the terraform.tfvars
file of the specified environment. It's important to note that each storage service requires a unique name.