Skip to content

Commit

Permalink
minimum version to Terraform 0.13 and added support for flex shapes (#81
Browse files Browse the repository at this point in the history
)
  • Loading branch information
hyder authored Dec 18, 2020
1 parent bce5b83 commit a407ec7
Show file tree
Hide file tree
Showing 5 changed files with 118 additions and 75 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ All notable changes to this project are documented in this file.

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

== 2.0.0 (December 8, 2020)
* Set minimum version to Terraform 0.13 (#78)
* Use all Terraform 0.13 submodules (#80)
* Support for Flex shapes for bastion and operator

== 1.3.4 (November 3, 2020)
* Upgraded operator module to v1.0.15 to avoid name collision for dynamic group for operator (#76)

Expand Down
123 changes: 69 additions & 54 deletions docs/terraformoptions.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -32,27 +32,27 @@ Configuration Terraform Options:
|Values
|Default

|api_fingerprint
|`api_fingerprint`
|ssl fingerprint of api public key. *Required*
|
|None

|api_private_key_path
|`api_private_key_path`
|path to api private key. *Required*
|
|None

|region
|`region`
|Region where to provision the resources. {uri-oci-region}[List of regions]. *Required*
|
|None

|tenancy_ocid
|`tenancy_ocid`
|Tenancy id of the user. *Required*
|
|None

|user_ocid
|`user_ocid`
|User's id. *Required*
|
|None
Expand All @@ -68,21 +68,16 @@ Configuration Terraform Options:
|Values
|Default

|compartment_id
|`compartment_id`
|Compartment id where the VCN and other resources will be provisioned. *Required*
|
|None

|label_prefix
|`label_prefix`
|a string to be prepended to the name of resources. *Recommended*. Set to *"none"* if you dont want any prefix.
|
|

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

|===

=== OCI Networking
Expand All @@ -94,38 +89,38 @@ Configuration Terraform Options:
|Values
|Default

|internet_gateway_enabled
|`internet_gateway_enabled`
|Whether to create an internet gateway. *Required* for public subnets.
|true/false
|true

|nat_gateway_enabled
|`nat_gateway_enabled`
|Whether to create a NAT gateway. *Required* for private subnets.
|true/false
|true

|service_gateway_enabled
|`service_gateway_enabled`
|Whether to create a Service Gateway to use Oracle Services.
|true/false
|true

|tags
|`tags`
|The tags to apply on the VCN.
|map(any)
|null


|vcn_cidr
|`vcn_cidr`
|The VCN's CIDR block.
|
|10.0.0.0/16

|vcn_dns_label
|`vcn_dns_label`
|The internal DNS domain for resources created and prepended to "oraclevcn.com" which is the VCN-internal domain name. *Required*
|
|

|vcn_name.
|`vcn_name`
|The name of the VCN that will be appended to the label_prefix. *Recommended*
|
|
Expand All @@ -141,7 +136,7 @@ Configuration Terraform Options:
|Values
|Default

|availability_domains
|`availability_domains`
|The Availability Domain where to provision resources e.g. bastion host. This is specified in the form of a map.
|[source]
----
Expand All @@ -153,32 +148,42 @@ Configuration Terraform Options:
1
----

|bastion_access
|`bastion_access`
|CIDR block in the form of a string to which ssh access to the bastion must be restricted to. *_ANYWHERE_* is equivalent to 0.0.0.0/0 and allows ssh access from anywhere.
|XYZ.XYZ.XYZ.XYZ/YY
|ANYWHERE

|bastion_enabled
|`bastion_enabled`
|Whether to create the bastion host.
|true/false
|false

|bastion_image_id
|`bastion_image_id`
|Provide a custom image id for the bastion host or leave as Autonomous.
|imageid/Autonomous
|Autonomous

|bastion_shape
|The shape of bastion instance. *Required if bastion_enabled = true*
|
|

|bastion_upgrade
|`bastion_shape`
|The shape of bastion instance. This is now specified as a map and supports E3.Flex. If a non-Flex shape is specified, then the other parameters are ignored.
|e.g. `bastion_shape = {
shape="VM.Standard.E3.Flex",
ocpus=1,
memory=4,
boot_volume_size=50
}`
|`bastion_shape = {
shape="VM.Standard.E3.Flex",
ocpus=1,
memory=4,
boot_volume_size=50
}`

|`bastion_upgrade`
|Whether to upgrade the bastion host packages after provisioning. It's useful to set this to false during development/testing so the bastion is provisioned faster.
|true/false
|true

|newbits
|`newbits`
|The difference between the VCN's netmask and the desired subnets' masks specified in the form of a map. The values of the map are used as the newbits parameter in the {uri-terraform-cidrsubnet}[cidrsubnet] Terraform function to calculate each subnet's mask.
|[source]
----
Expand All @@ -190,7 +195,7 @@ Configuration Terraform Options:
13
----

|netnum
|`netnum`
|0-based index of the subnet when the VCN's CIDR is masked with the corresponding newbit value and specified in the form of a map. Used to define the boundaries of the subnet. The values of the map are used as the netnum parameter in the {uri-terraform-cidrsubnet}[cidrsubnet] Terraform function.
|[source]
----
Expand All @@ -202,38 +207,38 @@ Configuration Terraform Options:
32
----

|notification_enabled
|`notification_enabled`
|Whether to enable ONS notification for the bastion host.
|true/false
|false

|notification_endpoint
|`notification_endpoint`
|The subscription notification endpoint. Email address to be notified. *Required if notification_enabled = true* .
|
|

|notification_protocol
|`notification_protocol`
|The notification protocol used.
|
|EMAIL

|notification_topic
|`notification_topic`
|The name of the notification topic
|
|bastion

|ssh_private_key_path
|`ssh_private_key_path`
|path to ssh private key. This ssh key is used to authenticate and log into the bastion host. Must be the private key of the public key provided below. *Required* if bastion is enabled.

|
|None

|ssh_public_key_path
|`ssh_public_key_path`
|path to ssh public key. The ssh key is used when provisioning the bastion host. Must be the public key of the private key provided above. *Required* if bastion is enabled.
|
|None

|tags
|`tags`
|The tags to apply on the bastion resources.
|map(any)
|
Expand All @@ -244,7 +249,7 @@ tags = {
}
----

|timezone
|`timezone`
|The preferred timezone for the bastion host. {uri-timezones}[List of timezones]
|
|
Expand All @@ -260,52 +265,62 @@ tags = {
|Values
|Default

|operator_enabled
|`operator_enabled`
|Whether to create the operator host.
|true/false
|false

|operator_image_id
|`operator_image_id`
|Custom image id for the operator host
|image_id/Oracle. If the value is set to Oracle, an Oracle Platform image will be used instead.
|Oracle

|enable_instance_principal
|`enable_instance_principal`
|Whether to enable instance_principal on the operator server. Refer to {uri-instance-principal-note}[instance_principal][instance_principal]
|true/false
|false

|notification_enabled
|`notification_enabled`
|Whether to enable ONS notification for the operator host. *Do not enable for now*.
|true/false
|false

|notification_endpoint
|`notification_endpoint`
|The subscription notification endpoint. Email address to be notified. Only email is currently supported although ONS can also support Slack, Pagerduty among others.
|
|

|notification_protocol
|`notification_protocol`
|The notification protocol used.
|EMAIL
|EMAIL

|notification_topic
|`notification_topic`
|The name of the notification topic
|
|operator

|operator_package_upgrade
|`operator_package_upgrade`
|Whether to also upgrade the packages for the operator host.
|true/false
|true

|operator_shape
|The shape of operator instance.
|
|

|tags
|`operator_shape`
|The shape of operator instance. This is now specified as a map and supports E3.Flex. If a non-Flex shape is specified, then the other parameters are ignored.
|e.g. `operator_shape = {
shape="VM.Standard.E3.Flex",
ocpus=1,
memory=4,
boot_volume_size=50
}`
|`operator_shape = {
shape="VM.Standard.E3.Flex",
ocpus=1,
memory=4,
boot_volume_size=50
}`

|`tags`
|The tags to apply on the bastion resources.
|map(any)
|
Expand All @@ -316,7 +331,7 @@ tags = {
}
----

|operator_timezone
|`operator_timezone`
|The preferred timezone for the operator host. {uri-timezones}[List of timezones]
|
|Australia/Sydney
Expand Down
7 changes: 3 additions & 4 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

module "vcn" {
source = "oracle-terraform-modules/vcn/oci"
version = "2.0.0-RC1"
version = "2.0.0"

# provider parameters
region = var.oci_base_provider.region
Expand All @@ -24,7 +24,7 @@ module "vcn" {

module "bastion" {
source = "oracle-terraform-modules/bastion/oci"
version = "2.0.0-RC1"
version = "2.0.0"

# provider identity parameters
api_fingerprint = var.oci_base_provider.api_fingerprint
Expand Down Expand Up @@ -63,12 +63,11 @@ module "bastion" {

# tags
tags = var.oci_base_bastion.tags

}

module "operator" {
source = "oracle-terraform-modules/operator/oci"
version = "2.0.0-RC1"
version = "2.0.0"

# provider identity parameters
api_fingerprint = var.oci_base_provider.api_fingerprint
Expand Down
16 changes: 14 additions & 2 deletions terraform.tfvars.example
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,13 @@ oci_base_bastion = {
bastion_access = "ANYWHERE"
bastion_enabled = true
bastion_image_id = "Autonomous"
bastion_shape = "VM.Standard.E2.2"
bastion_shape = {
# shape = "VM.Standard.E2.2"
shape="VM.Standard.E3.Flex",
ocpus=1,
memory=4,
boot_volume_size=50
}
bastion_upgrade = true
netnum = 32
newbits = 13
Expand All @@ -61,7 +67,13 @@ oci_base_operator = {
availability_domain = 1
operator_enabled = true
operator_image_id = "Oracle"
operator_shape = "VM.Standard.E2.2"
operator_shape = {
# shape = "VM.Standard.E2.2"
shape="VM.Standard.E3.Flex",
ocpus=1,
memory=4,
boot_volume_size=50
}
operator_upgrade = false
enable_instance_principal = true
netnum = 33
Expand Down
Loading

0 comments on commit a407ec7

Please sign in to comment.