Advanced Terraform

This topics is for more advanced users looking to expand what terraform can do. The following examples assume that you have created an app credential and have installed terraform.

The following link is to a repo with some more examples of what terraform can do:

A brief overview of the code is below:

Nginx and Mariadb

This creates an ubuntu 22 server with nginx and mariadb installed and running, with a simple “Hello World!” webpage served as the index. This is a easy way to setup and have a baseline configuration for a web server.


Set your key_pair in

If would like the change the flavor of the instance you boot, add the following to

flavor_id = "ID of flavor here"

You can see the list of flavor with the following command.

openstack flavor list

R + Shiny server (Nginx proxy)

This creates an ubuntu 22 server with nginx, r and shiny server installed and configure the nginx server for SSL (using certbot) and reverse proxies back shiny to port 443 (https).

You can specify which version of shiny you want by editing shiny_version in ansible/main.yml once you have checked out the code above.


Set your key_pair in

Set your email address for certbot

Specify your domain_name if you would like. Otherwise a name will be generated for you.

If you would like to change your flavor, see above.

Kubernetes Cluster

This repo located below will setup a Kubernetes cluster with the amount of followers you specific.

Currently this is running on Ubuntu 20 and installs the latest version of kubernetes.


Editing k8.tfvars with your public key as well. If you would like to change the flavor or amount of followers in your cluster you can do so in k8.tfvars.