Skip to content
Snippets Groups Projects
Forked from rc / Terraform Openstack
424 commits behind the upstream repository.
Ryan Randles Jones's avatar
Ryan Randles Jones authored
51676ff9

Terraform Openstack

Right now, this will create:

dmznet and dmzsubnet

borderrouter that connects dmznet to bright-external-flat-externalnet

a floating ip address, and an instance coming off of dmznet

clusternet off of dmznet instance

clustersubnet

Make a new directory for Terraform:

$mkdir terraform-first-instance

Install Terraform:

$brew install terraform

Unzip the file and make a path to your new directory:

$export TERRAFORM_DIR="$(pwd)/terraform-first-instance"

$cp $HOME/Downloads/terraform_0.6.16_linux_amd64/terraform $TERRAFORM_DIR

Download RC File from Openstack(V3) and save it in your terraform-first-instance directory.

Clone this repo into your terraform-first-instance directory:

$git clone https://gitlab.rc.uab.edu/rrand11/terraform-openstack.git

Source the rc file and initialize terraform:

$source OPENRCFILENAME

$cd terraform-openstack

$terraform init

Write Terraform Plan to your terraform-first-instance directory and run that plan:

$terraform plan -out $HOME/terraform-first-instance/terraform-plan.tf

#terraform plan -out writes the plan to a file and then terraform apply runs that plan

$terraform apply "$HOME/terraform-first-instance/terraform-plan.tf"

Destroy Terraform Instance:

$terraform destroy