Skip to content

Commit 1c47ad5

Browse files
authored
upgraded bastion and base modules, allow public ssh key to be passed by variable (#65)
1 parent def779f commit 1c47ad5

File tree

5 files changed

+27
-16
lines changed

5 files changed

+27
-16
lines changed

CHANGELOG.adoc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,12 @@ All notable changes to this project are documented in this file.
77

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

10+
== 1.3.0 (August 5, 2020)
11+
* Upgraded bastion module to 1.0.6 (#64)
12+
* Upgraded operator module to 1.0.11 (#64)
13+
* Allow public ssh key to be passed by variable instead of only file path (#63)
14+
* Added a root_compartment_id to be used instead of tenancy_id
15+
1016
== 1.2.4 (July 22, 2020)
1117
* Upgraded vcn module to 1.0.3
1218
* Upgraded bastion module to 1.0.3

docs/terraformoptions.adoc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,11 @@ Configuration Terraform Options:
7878
|
7979
|
8080

81+
|root_compartment_id
82+
|Tenancy id where the VCN and other resources will be provisioned. *Required*
83+
|
84+
|None
85+
8186
|===
8287

8388
=== OCI Networking

main.tf

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -24,18 +24,14 @@ module "vcn" {
2424

2525
module "bastion" {
2626
source = "oracle-terraform-modules/bastion/oci"
27-
version = "1.0.3"
27+
version = "1.0.6"
2828

29-
# provider identity parameters
30-
api_fingerprint = var.oci_base_provider.api_fingerprint
31-
api_private_key_path = var.oci_base_provider.api_private_key_path
3229
region = var.oci_base_provider.region
33-
tenancy_id = var.oci_base_provider.tenancy_id
34-
user_id = var.oci_base_provider.user_id
3530

3631
# general oci parameters
3732
compartment_id = var.oci_base_general.compartment_id
3833
label_prefix = var.oci_base_general.label_prefix
34+
root_compartment_id = var.oci_base_provider.tenancy_id
3935

4036
# network parameters
4137

@@ -51,7 +47,7 @@ module "bastion" {
5147
bastion_image_id = var.oci_base_bastion.bastion_image_id
5248
bastion_shape = var.oci_base_bastion.bastion_shape
5349
bastion_upgrade = var.oci_base_bastion.bastion_upgrade
54-
ssh_public_key = ""
50+
ssh_public_key = var.oci_base_bastion.ssh_public_key
5551
ssh_public_key_path = var.oci_base_bastion.ssh_public_key_path
5652
timezone = var.oci_base_bastion.timezone
5753

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

6965
module "operator" {
7066
source = "oracle-terraform-modules/operator/oci"
71-
version = "1.0.8"
67+
version = "1.0.11"
7268

73-
# provider identity parameters
74-
api_fingerprint = var.oci_base_provider.api_fingerprint
75-
api_private_key_path = var.oci_base_provider.api_private_key_path
7669
region = var.oci_base_provider.region
77-
tenancy_id = var.oci_base_provider.tenancy_id
78-
user_id = var.oci_base_provider.user_id
7970

8071
# general oci parameters
8172
compartment_id = var.oci_base_general.compartment_id
8273
label_prefix = var.oci_base_general.label_prefix
74+
root_compartment_id = var.oci_base_provider.tenancy_id
8375

8476
# network parameters
8577
availability_domain = var.oci_base_operator.availability_domain
@@ -94,7 +86,7 @@ module "operator" {
9486
operator_instance_principal = var.oci_base_operator.enable_instance_principal
9587
operator_shape = var.oci_base_operator.operator_shape
9688
operator_upgrade = var.oci_base_operator.operator_upgrade
97-
ssh_public_key = ""
89+
ssh_public_key = var.oci_base_operator.ssh_public_key
9890
ssh_public_key_path = var.oci_base_operator.ssh_public_key_path
9991
timezone = var.oci_base_operator.timezone
10092

terraform.tfvars.example

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ oci_base_provider = {
1313
oci_base_general = {
1414
compartment_id = ""
1515
label_prefix = "dev"
16+
root_compartment_id = ""
1617
}
1718

1819
# networking
@@ -46,6 +47,7 @@ oci_base_bastion = {
4647
notification_protocol = "EMAIL"
4748
notification_topic = "bastion"
4849
ssh_private_key_path = ""
50+
ssh_public_key = ""
4951
ssh_public_key_path = ""
5052
tags = {
5153
department = "finace"
@@ -70,6 +72,7 @@ oci_base_operator = {
7072
notification_protocol = "EMAIL"
7173
notification_topic = "operator"
7274
ssh_private_key_path = ""
75+
ssh_public_key = ""
7376
ssh_public_key_path = ""
7477
tags = {
7578
department = "finance"

variables.tf

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,9 @@ variable "oci_base_provider" {
1818

1919
variable "oci_base_general" {
2020
type = object({
21-
compartment_id = string
22-
label_prefix = string
21+
compartment_id = string
22+
label_prefix = string
23+
root_compartment_id = string
2324
})
2425
description = "general oci parameters"
2526
}
@@ -65,6 +66,7 @@ variable "oci_base_bastion" {
6566
notification_protocol = string
6667
notification_topic = string
6768
ssh_private_key_path = string
69+
ssh_public_key = string
6870
ssh_public_key_path = string
6971
tags = map(any)
7072
timezone = string
@@ -84,6 +86,7 @@ variable "oci_base_bastion" {
8486
notification_protocol = "EMAIL"
8587
notification_topic = "bastion"
8688
ssh_private_key_path = ""
89+
ssh_public_key = ""
8790
ssh_public_key_path = ""
8891
tags = {
8992
role = "bastion"
@@ -109,6 +112,7 @@ variable "oci_base_operator" {
109112
notification_protocol = string
110113
notification_topic = string
111114
ssh_private_key_path = string
115+
ssh_public_key = string
112116
ssh_public_key_path = string
113117
tags = map(any)
114118
timezone = string
@@ -128,6 +132,7 @@ variable "oci_base_operator" {
128132
notification_protocol = "EMAIL"
129133
notification_topic = "operator"
130134
ssh_private_key_path = ""
135+
ssh_public_key = ""
131136
ssh_public_key_path = ""
132137
tags = {
133138
role = "operator"

0 commit comments

Comments
 (0)