3 minute read
In our Terraform Repo example you will find an example description of how to deploy a single instance.
Before you fire your “terraform apply”, make sure that you change the following variables in variables.tf or create a *.tfvars and set the values for yourself:
Optional changes:
This example describes how an instance can be deployed with the help of cloud-init.
Before you fire your “terraform apply”, make sure that you change the following variables in variables.tf or create a *.tfvars and set the values for yourself:
Optional changes:
The example performs an update, installs an nginx web server, changes the title in the default page and performs a restart.
Further information on using cloud-init can be found in the examples in the official documentation.
cloud-init Documentation: Examples of the cloud configuration
In this example, we deploy a certain number of servers that are made accessible with a load balancer.
Before you fire your “terraform apply”, make sure that you change the following variables in variables.tf or create a *.tfvars and set the values for yourself:
Optional changes:
You can also change the variables via cli as in:
terraform plan -var "server_count=5"
terraform apply -var "server_count=5"
The example performs an update, installs an nginx web server, changes the title in the default page and adds the hostname and performs a restart. It will take a few moments until it is ready after terraform has reported a successful installation.
Further information on using cloud-init can be found in the examples in the official documentation.
cloud-init Documentation: Examples of the cloud configuration