Skip to content

Commit 65dbaa9

Browse files
committed
terraform/OCI: Add a shape family selector
I'd like to add bare metal shapes too, but they seem to be in a separate family in the OCI documentation. Reviewed-by: Luis Chamberlain <[email protected]> Reviewed-by: Chandan Babu R <[email protected]> Signed-off-by: Chuck Lever <[email protected]>
1 parent 68e73f6 commit 65dbaa9

File tree

2 files changed

+27
-0
lines changed

2 files changed

+27
-0
lines changed

terraform/oci/kconfigs/Kconfig.compute

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,26 @@
1+
choice
2+
prompt "OCI shape family"
3+
default TERRAFORM_OCI_SHAPE_FAMILY_FLEX
4+
help
5+
This option selects the class of virtual hardware (CPUs and
6+
memory) to provision for each target node. Most CPU
7+
architectures, including x86, run two threads per physical
8+
core, so one OCPU is the equal of two vCPUs for x86-based
9+
compute.
10+
11+
Which shapes are available is limited by your subscription
12+
and what hardware has been deployed in your selected region.
13+
14+
config TERRAFORM_OCI_SHAPE_FAMILY_FLEX
15+
bool "Flex shapes"
16+
help
17+
A flexible shape is a virtual machine that lets you
18+
customize the number of OCPUs and the amount of memory
19+
per instance. The network bandwidth and number of VNICs
20+
scale proportionately with the number of OCPUs.
21+
22+
endchoice
23+
124
source "terraform/oci/kconfigs/shapes/Kconfig.flex"
225

326
config TERRAFORM_OCI_OS_IMAGE_OCID

terraform/oci/kconfigs/shapes/Kconfig.flex

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
if TERRAFORM_OCI_SHAPE_FAMILY_FLEX
2+
13
choice
24
prompt "OCI shape"
35
default TERRAFORM_OCI_SHAPE_VM_STANDARD3_FLEX
@@ -98,3 +100,5 @@ config TERRAFORM_OCI_INSTANCE_FLEX_MEMORY_IN_GBS
98100
Memory per instance, in GiBs. The minimum value for this
99101
setting is a multiple of the number of OCPUS in each
100102
instance.
103+
104+
endif # TERRAFORM_OCI_SHAPE_FAMILY_FLEX

0 commit comments

Comments
 (0)