This repository contains a set of lessons to help you to use Terraform using the IBM Cloud Provider. The first 5 lessons use a code "KubeCF" style, lesson 06 and 07 use an HPCaaS style using modules.
The following lessons are a step by step process that show you, progressively, how to create a VPC in Terraform and how to add Public Gateways, Subnets, SSH Keys, and VSI using "KubeCF" and "HPCaaS" code style. The code "HPCaaS" style comes from this repository.
- Lesson 01 - Create a Virtual Private Cloud
- Lesson 02 - Use of the Variables
- Lesson 03 - Add the Public Gateways to the VPC
- Lesson 04 - Add the Subnets to the VPC
- Lesson 05 - Simplify code
- Lesson 06 - Start using module in HPCaaS style
- Lesson 07 - Add a VSI to the VPC
Once you understand how modules works, it's easy to extend this code base looking at the HPCaaS code. Here few examples:
- Here an example on how to add a VPN Gateway. main.tf vpn.tf
- Here an example how to add a VPN Connection. main.tf vpn_connection.tf
- Here an example on how to add a Floating IP. main.tf floating_ip.tf
- Here an example of Login VSI. main.tf login_vsi.tf
Now it should be easy for you to understand how the HPCaaS code base works.