A reusable and extensible Terraform module that provisions a Trivadis LAB Bastion Host on Oracle Cloud Infrastructure
A reusable and extensible Terraform module that provisions a Trivadis LAB Bastion Host for Oracle Cloud Infrastructure
It creates the following resources:
The module can be parametrized by the number of participants. This will then create n numbers of bastion hosts.
HINT This terraform module does use count
to create multiple identical resources. Due to this at least Terraform version 0.13.0+ is required.
The module is available in Terraform registry. You may either us it via registry or clone terraform-oci-tvdlab-bastion from github.
Add the module to the main.tf
with the mandatory parameter. Whereby the bastion_subnet
does expect a list of subnet IDs where to create the bastion hosts. Ideally create with the terraform module tvdlab-vcn.
module "tvdlab-bastion" {
source = "Trivadis/tvdlab-bastion/oci"
version = ">= 1.1.0"
# - Mandatory Parameters --------------------------------------------------
tenancy_ocid = var.tenancy_ocid
compartment_id = var.compartment_id
ssh_public_key = var.ssh_public_key
bastion_subnet = module.tvdlab-vcn.public_subnet_id
}
To create multiple bastion hosts in different VCNs just specify the numberOf_labs
parameter. The following example will create 3 bastion hosts in the provided subnets. It is expected that bastion_subnet
contains 3 different subnets.
module "tvdlab-bastion" {
source = "Trivadis/tvdlab-bastion/oci"
version = "1.0.0"
# - Mandatory Parameters --------------------------------------------------
tenancy_ocid = var.tenancy_ocid
compartment_id = var.compartment_id
ssh_public_key = var.ssh_public_key
bastion_subnet = module.tvdlab-vcn.public_subnet_id
numberOf_labs = 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.tf and terraform.tfvars.
You find all releases and release information here.
Please file your bug reports, enhancement requests, questions and other support requests within Github’s issue tracker.
Code derived and adapted from oracle-terraform-modules/terraform-oci-vcn and Hashicorp’s Terraform 0.12 examples.
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.