Skip to content
This repository was archived by the owner on Oct 31, 2019. It is now read-only.

Commit 047c046

Browse files
committed
Filter OL images by display name for NAT instance. Resolves #36.
1 parent a7469de commit 047c046

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

k8s-oci.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ module "vcn" {
3232
public_subnet_ssh_ingress = "${var.public_subnet_ssh_ingress}"
3333
public_subnet_http_ingress = "${var.public_subnet_http_ingress}"
3434
public_subnet_https_ingress = "${var.public_subnet_https_ingress}"
35+
nat_instance_oracle_linux_image_name = "${var.oracle_linux_image_name}"
3536
nat_instance_shape = "${var.natInstanceShape}"
3637
nat_instance_ad1_enabled = "${var.nat_instance_ad1_enabled}"
3738
nat_instance_ad2_enabled = "${var.nat_instance_ad2_enabled}"

network/vcn/datasources.tf

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,10 @@ data "oci_identity_availability_domains" "ADs" {
33
compartment_id = "${var.tenancy_ocid}"
44
}
55

6-
# Gets the OCID of the OS image to use for the NAT instance
6+
# Prevent oci_core_images image list from changing underneath us.
77
data "oci_core_images" "ImageOCID" {
8-
compartment_id = "${var.compartment_ocid}"
9-
operating_system = "Oracle Linux"
10-
operating_system_version = "${var.nat_instance_os_ver}"
8+
compartment_id = "${var.compartment_ocid}"
9+
display_name = "${var.nat_instance_oracle_linux_image_name}"
1110
}
1211

1312
# Gets a list of VNIC attachments on the NAT instance in AD 1

network/vcn/variables.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,8 +94,8 @@ variable "public_subnet_https_ingress" {
9494

9595
variable "nat_instance_ssh_public_key_openssh" {}
9696

97-
variable "nat_instance_os_ver" {
98-
default = "7.4"
97+
variable "nat_instance_oracle_linux_image_name" {
98+
default = "Oracle-Linux-7.4-2017.10.25-0"
9999
}
100100

101101
variable "nat_instance_shape" {

0 commit comments

Comments
 (0)