Skip to content

Latest commit

 

History

History
98 lines (66 loc) · 4.97 KB

README.md

File metadata and controls

98 lines (66 loc) · 4.97 KB

Terraform Trivadis LAB Host for OCI

Introduction

A reusable and extensible Terraform module that provisions a Trivadis LAB Host for Oracle Cloud Infrastructure

It creates the following resources:

  • A compute instance for a given VCN
  • Optional n-number of hosts for multiple VCNs. This is used to build several identical environments for a training and laboratory environment.

The module can be parametrized by the number of participants. This will then create n numbers of hosts.

Prerequisites

  • An OCI account
  • Install Terraform
  • Create a Terraform Configuration

HINT This terraform module does use count to create multiple identical resources. Due to this at least Terraform version 0.13.0+ is required.

Quickstart

The module is available in Terraform registry. You may either us it via registry or clone terraform-oci-tvdlab-compute from github.

Add the module to the main.tf with the mandatory parameter. Whereby the host_subnet does expect a list of subnet IDs where to create the hosts. Ideally create with the terraform module tvdlab-vcn.

module "tvdlab-compute" {
  source  = "Trivadis/tvdlab-compute/oci"
  version = ">= 1.0.0"

  # - Mandatory Parameters --------------------------------------------------
  tenancy_ocid          = var.tenancy_ocid
  region                = var.region
  compartment_id        = var.compartment_id
  ssh_public_key_path   = var.ssh_public_key_path
  host_subnet           = module.tvdlab-vcn.private_subnet_id
}

To create multiple hosts in different VCNs just specify the tvd_participants parameter. The following example will create 3 hosts in the provided subnets. It is expected that host_subnet contains 3 different subnets.

module "tvdlab-compute" {
  source  = "Trivadis/tvdlab-compute/oci"
  version = ">= 1.0.0"

  # - Mandatory Parameters --------------------------------------------------
  tenancy_ocid          = var.tenancy_ocid
  region                = var.region
  compartment_id        = var.compartment_id
  ssh_public_key_path   = var.ssh_public_key_path
  host_subnet           = module.tvdlab-vcn.private_subnet_id
  tvd_participants      = 3
}

The module can be customized by a couple of additional parameter. See variables for more information about customisation. The folder examples does contain an example files for main.tf, variables.tv and terraform.tfvars.

Related Documentation, Blog

Projects using this module

  • terraform-oci-tvdlab-base A reusable and extensible Terraform module that provisions a Trivadis LAB on Oracle Cloud Infrastructure.

Releases and Changelog

You find all releases and release information here.

Issues

Please file your bug reports, enhancement requests, questions and other support requests within Github's issue tracker.

How to Contribute

  1. Describe your idea by submitting an issue
  2. Fork this respository
  3. Create a branch, commit and publish your changes and enhancements
  4. Create a pull request

Acknowledgement

Code derived and adapted from oracle-terraform-modules/terraform-oci-vcn and Hashicorp's Terraform 0.12 examples.

License

Copyright (c) 2019, 2020 Trivadis AG and/or its associates. All rights reserved.

The Trivadis Terraform modules are licensed under the Apache License, Version 2.0. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.