Skip to content

Commit c3829cf

Browse files
authored
fix: burstable instances example variable declaration (#92)
PR #89 introduce a new variable to support burstable isntances. The example instances_flex_shape is updated to demonstrate this feature usage but the module calls a variable ta do not exist in the configuration.
1 parent 7f075af commit c3829cf

File tree

4 files changed

+24
-11
lines changed

4 files changed

+24
-11
lines changed

examples/instances_fixed_shape/main.tf

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ provider "oci" {
1919

2020
# * This module will create a shape-based Compute Instance. OCPU and memory values are defined by the provided value for shape.
2121
module "instance_nonflex" {
22+
# source = "git::https://github.com/oracle-terraform-modules/terraform-oci-compute-instance" ## use this to test directly from Github HEAD
2223
source = "oracle-terraform-modules/compute-instance/oci"
2324
# general oci parameters
2425
compartment_ocid = var.compartment_ocid
@@ -32,17 +33,7 @@ module "instance_nonflex" {
3233
shape = var.shape
3334
source_ocid = var.source_ocid
3435
source_type = var.source_type
35-
cloud_agent_plugins = {
36-
autonomous_linux = "ENABLED"
37-
bastion = "ENABLED"
38-
vulnerability_scanning = "ENABLED"
39-
osms = "ENABLED"
40-
management = "DISABLED"
41-
custom_logs = "ENABLED"
42-
run_command = "ENABLED"
43-
monitoring = "ENABLED"
44-
block_volume_mgmt = "DISABLED"
45-
}
36+
cloud_agent_plugins = var.cloud_agent_plugins
4637
# operating system parameters
4738
ssh_public_keys = var.ssh_public_keys
4839
# networking parameters

examples/instances_fixed_shape/variables.tf

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,21 @@ variable "shape" {
102102
default = "VM.Standard2.1"
103103
}
104104

105+
variable "cloud_agent_plugins" {
106+
description = "Whether each Oracle Cloud Agent plugins should be ENABLED or DISABLED."
107+
type = map(string)
108+
default = {
109+
autonomous_linux = "ENABLED"
110+
bastion = "ENABLED"
111+
block_volume_mgmt = "DISABLED"
112+
custom_logs = "ENABLED"
113+
management = "DISABLED"
114+
monitoring = "ENABLED"
115+
osms = "ENABLED"
116+
run_command = "ENABLED"
117+
vulnerability_scanning = "ENABLED"
118+
}
119+
}
105120
variable "source_ocid" {
106121
description = "The OCID of an image or a boot volume to use, depending on the value of source_type."
107122
type = string

examples/instances_flex_shape/main.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ provider "oci" {
2020
# * This module will create a Flex Compute Instance, using default values: 1 OCPU, 16 GB memory.
2121
# * `instance_flex_memory_in_gbs` and `instance_flex_ocpus` are not provided: default values will be applied.
2222
module "instance_flex" {
23+
# source = "git::https://github.com/oracle-terraform-modules/terraform-oci-compute-instance" ## use this to test directly from Github HEAD
2324
source = "oracle-terraform-modules/compute-instance/oci"
2425
# general oci parameters
2526
compartment_ocid = var.compartment_ocid

examples/instances_flex_shape/variables.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,12 @@ variable "shape" {
102102
default = "VM.Standard.E3.Flex"
103103
}
104104

105+
variable "baseline_ocpu_utilization" {
106+
description = "(Updatable) The baseline OCPU utilization for a subcore burstable VM instance"
107+
type = string
108+
default = "BASELINE_1_1"
109+
}
110+
105111
variable "source_ocid" {
106112
description = "The OCID of an image or a boot volume to use, depending on the value of source_type."
107113
type = string

0 commit comments

Comments
 (0)