Skip to content
This repository has been archived by the owner on Jun 5, 2024. It is now read-only.

Latest commit

 

History

History
40 lines (29 loc) · 1.7 KB

File metadata and controls

40 lines (29 loc) · 1.7 KB

Deploy Cloud Load Balancer to Front End Private Network Only VSI's

This example will deploy a set of 3 webserver instances and then front them with an IBM Cloud Load Balancer. The webserver instances have security groups attached that allow all outbound traffic but only allow inbound HTTP access and SSH access from the IBM Cloud Private network.

This code is written to work with Terraform 0.13 and above. If you would like to work with multiple versions of Terraform on the same machine take a look at tfswitch.

To use this code

Step 1: Clone repo

$ git clone https://github.com/greyhoundforty/IBMCloud-Terraform-Examples.git
$ cd LBaaSVSI

Step 2: Update example .tfvars file You will need to update the terraform.tfvars.example and then rename it so that Terraform picks up the variables. The file has comments for each item that you need to provide. When done updating the file rename it:

$ cp terraform.tfvars.example terraform.tfvars

Step 3: Initialize Terraform The version.tf file will automatically download the most up to date version of the IBM Cloud Terraform Provider when you initialize the directory.

$ terraform init

Step 4: Create Terraform plan If the terraform init command completed without error you are now ready to create a plan for your deployment.

$ terraform plan -out default.tfplan

Step 5: Apply generated plan If our plan generated successfully we can now deploy our resources using the apply command.

$ terraform apply default.tfplan