Skip to content

Commit

Permalink
upgraded bastion and base modules, allow public ssh key to be passed …
Browse files Browse the repository at this point in the history
…by variable (#65)
  • Loading branch information
hyder authored Aug 5, 2020
1 parent def779f commit 1c47ad5
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 16 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@ All notable changes to this project are documented in this file.

The format is based on {uri-changelog}[Keep a Changelog].

== 1.3.0 (August 5, 2020)
* Upgraded bastion module to 1.0.6 (#64)
* Upgraded operator module to 1.0.11 (#64)
* Allow public ssh key to be passed by variable instead of only file path (#63)
* Added a root_compartment_id to be used instead of tenancy_id

== 1.2.4 (July 22, 2020)
* Upgraded vcn module to 1.0.3
* Upgraded bastion module to 1.0.3
Expand Down
5 changes: 5 additions & 0 deletions docs/terraformoptions.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,11 @@ Configuration Terraform Options:
|
|

|root_compartment_id
|Tenancy id where the VCN and other resources will be provisioned. *Required*
|
|None

|===

=== OCI Networking
Expand Down
20 changes: 6 additions & 14 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -24,18 +24,14 @@ module "vcn" {

module "bastion" {
source = "oracle-terraform-modules/bastion/oci"
version = "1.0.3"
version = "1.0.6"

# provider identity parameters
api_fingerprint = var.oci_base_provider.api_fingerprint
api_private_key_path = var.oci_base_provider.api_private_key_path
region = var.oci_base_provider.region
tenancy_id = var.oci_base_provider.tenancy_id
user_id = var.oci_base_provider.user_id

# general oci parameters
compartment_id = var.oci_base_general.compartment_id
label_prefix = var.oci_base_general.label_prefix
root_compartment_id = var.oci_base_provider.tenancy_id

# network parameters

Expand All @@ -51,7 +47,7 @@ module "bastion" {
bastion_image_id = var.oci_base_bastion.bastion_image_id
bastion_shape = var.oci_base_bastion.bastion_shape
bastion_upgrade = var.oci_base_bastion.bastion_upgrade
ssh_public_key = ""
ssh_public_key = var.oci_base_bastion.ssh_public_key
ssh_public_key_path = var.oci_base_bastion.ssh_public_key_path
timezone = var.oci_base_bastion.timezone

Expand All @@ -68,18 +64,14 @@ module "bastion" {

module "operator" {
source = "oracle-terraform-modules/operator/oci"
version = "1.0.8"
version = "1.0.11"

# provider identity parameters
api_fingerprint = var.oci_base_provider.api_fingerprint
api_private_key_path = var.oci_base_provider.api_private_key_path
region = var.oci_base_provider.region
tenancy_id = var.oci_base_provider.tenancy_id
user_id = var.oci_base_provider.user_id

# general oci parameters
compartment_id = var.oci_base_general.compartment_id
label_prefix = var.oci_base_general.label_prefix
root_compartment_id = var.oci_base_provider.tenancy_id

# network parameters
availability_domain = var.oci_base_operator.availability_domain
Expand All @@ -94,7 +86,7 @@ module "operator" {
operator_instance_principal = var.oci_base_operator.enable_instance_principal
operator_shape = var.oci_base_operator.operator_shape
operator_upgrade = var.oci_base_operator.operator_upgrade
ssh_public_key = ""
ssh_public_key = var.oci_base_operator.ssh_public_key
ssh_public_key_path = var.oci_base_operator.ssh_public_key_path
timezone = var.oci_base_operator.timezone

Expand Down
3 changes: 3 additions & 0 deletions terraform.tfvars.example
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ oci_base_provider = {
oci_base_general = {
compartment_id = ""
label_prefix = "dev"
root_compartment_id = ""
}

# networking
Expand Down Expand Up @@ -46,6 +47,7 @@ oci_base_bastion = {
notification_protocol = "EMAIL"
notification_topic = "bastion"
ssh_private_key_path = ""
ssh_public_key = ""
ssh_public_key_path = ""
tags = {
department = "finace"
Expand All @@ -70,6 +72,7 @@ oci_base_operator = {
notification_protocol = "EMAIL"
notification_topic = "operator"
ssh_private_key_path = ""
ssh_public_key = ""
ssh_public_key_path = ""
tags = {
department = "finance"
Expand Down
9 changes: 7 additions & 2 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,9 @@ variable "oci_base_provider" {

variable "oci_base_general" {
type = object({
compartment_id = string
label_prefix = string
compartment_id = string
label_prefix = string
root_compartment_id = string
})
description = "general oci parameters"
}
Expand Down Expand Up @@ -65,6 +66,7 @@ variable "oci_base_bastion" {
notification_protocol = string
notification_topic = string
ssh_private_key_path = string
ssh_public_key = string
ssh_public_key_path = string
tags = map(any)
timezone = string
Expand All @@ -84,6 +86,7 @@ variable "oci_base_bastion" {
notification_protocol = "EMAIL"
notification_topic = "bastion"
ssh_private_key_path = ""
ssh_public_key = ""
ssh_public_key_path = ""
tags = {
role = "bastion"
Expand All @@ -109,6 +112,7 @@ variable "oci_base_operator" {
notification_protocol = string
notification_topic = string
ssh_private_key_path = string
ssh_public_key = string
ssh_public_key_path = string
tags = map(any)
timezone = string
Expand All @@ -128,6 +132,7 @@ variable "oci_base_operator" {
notification_protocol = "EMAIL"
notification_topic = "operator"
ssh_private_key_path = ""
ssh_public_key = ""
ssh_public_key_path = ""
tags = {
role = "operator"
Expand Down

0 comments on commit 1c47ad5

Please sign in to comment.