Skip to content

Commit 68d0ec3

Browse files
authored
Merge pull request #104 from hyder/91-admin-host
removed quotes for references, fixed issue #103
2 parents d318e59 + abeab76 commit 68d0ec3

File tree

18 files changed

+104
-62
lines changed

18 files changed

+104
-62
lines changed

CHANGELOG.adoc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ The format is based on {uri-changelog}[Keep a Changelog].
1111
* Helm upgraded to version 3.0.0 #100
1212
* incubator and jetstack helm repos removed as they can now be searched from helm hub #100
1313
* tiller disabled and option to enable it is removed #100
14+
* Fixed bug for empty tuple in data.oci_core_images.oracle_images when use_autonomous=true #103
15+
* Set minimum version of Terraform to 0.12.16
1416

1517
== v2.0.0-beta.1 (November 14, 2019)
1618
* Added admin host for operations instead of using the bastion server #91

main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl
33

44
terraform {
5-
required_version = ">= 0.12.8"
5+
required_version = ">= 0.12.16"
66
}
77

88
module "base" {

modules/auth/authtoken.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl
33

44
resource "oci_identity_auth_token" "ocirtoken" {
5-
provider = "oci.home"
5+
provider = oci.home
66
description = "ocir auth token"
77
user_id = var.ocir.user_id
88
count = var.ocir.create_auth_token == true ? 1 : 0

modules/base/admin/instance_principal.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ data "oci_identity_compartments" "compartments_id" {
2323
}
2424

2525
resource "oci_identity_dynamic_group" "admin_instance_principal" {
26-
provider = "oci.home"
26+
provider = oci.home
2727
compartment_id = var.oci_admin_identity.tenancy_id
2828
description = "dynamic group to allow instances to call services for 1 admin"
2929
matching_rule = "ALL {instance.id = '${join(",", data.oci_core_instance.admin.*.id)}'}"
@@ -32,7 +32,7 @@ resource "oci_identity_dynamic_group" "admin_instance_principal" {
3232
}
3333

3434
resource "oci_identity_policy" "admin_instance_principal" {
35-
provider = "oci.home"
35+
provider = oci.home
3636
compartment_id = var.oci_admin_identity.compartment_id
3737
description = "policy to allow admin host to call services"
3838
name = "${var.oci_admin_general.label_prefix}-admin_instance_principal"

modules/base/bastion/datasources.tf

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,20 +85,20 @@ data "oci_core_vnic_attachments" "bastion_vnics_attachments" {
8585
availability_domain = element(var.oci_bastion_infra.ad_names, (var.oci_bastion_infra.availability_domains - 1))
8686
compartment_id = var.oci_base_identity.compartment_id
8787
instance_id = oci_core_instance.bastion[0].id
88-
depends_on = ["oci_core_instance.bastion"]
88+
depends_on = [oci_core_instance.bastion]
8989
count = var.oci_bastion.bastion_enabled == true ? 1 : 0
9090
}
9191

9292
# Gets the OCID of the first (default) VNIC on the bastion instance
9393
data "oci_core_vnic" "bastion_vnic" {
9494
vnic_id = lookup(data.oci_core_vnic_attachments.bastion_vnics_attachments[0].vnic_attachments[0], "vnic_id")
95-
depends_on = ["oci_core_instance.bastion"]
95+
depends_on = [oci_core_instance.bastion]
9696
count = var.oci_bastion.bastion_enabled == true ? 1 : 0
9797
}
9898

9999
data "oci_core_instance" "bastion" {
100100
instance_id = oci_core_instance.bastion[0].id
101-
depends_on = ["oci_core_instance.bastion"]
101+
depends_on = [oci_core_instance.bastion]
102102
count = var.oci_bastion.bastion_enabled == true ? 1 : 0
103103
}
104104

modules/base/bastion/locals.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ locals {
99
anywhere = "0.0.0.0/0"
1010
ssh_port = 22
1111
tcp_protocol = 6
12-
autonomous_image_id = lookup(data.oci_core_app_catalog_subscriptions.autonomous_linux[0].app_catalog_subscriptions[0], "listing_resource_id")
13-
oracle_image_id = data.oci_core_images.oracle_images[0].images.0.id
12+
autonomous_image_id = var.oci_bastion.use_autonomous == true ? lookup(data.oci_core_app_catalog_subscriptions.autonomous_linux[0].app_catalog_subscriptions[0], "listing_resource_id") : null
13+
oracle_image_id = var.oci_bastion.use_autonomous == false ? data.oci_core_images.oracle_images[0].images.0.id : null
1414
bastion_image_id = var.oci_bastion.use_autonomous == true ? local.autonomous_image_id : (var.oci_bastion.bastion_image_id == "NONE" ? local.oracle_image_id : var.oci_bastion.bastion_image_id)
1515
}

modules/base/bastion/ons.tf

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,21 +38,21 @@ resource "oci_ons_subscription" "bastion_notification" {
3838
}
3939

4040
resource "oci_identity_dynamic_group" "bastion_notification" {
41-
provider = "oci.home"
41+
provider = oci.home
4242
compartment_id = var.oci_base_identity.tenancy_id
4343
description = "dynamic group to allow bastion to send notifications"
4444
matching_rule = "ALL {instance.id = '${join(",", data.oci_core_instance.bastion.*.id)}'}"
4545
name = "${var.oci_bastion_general.label_prefix}-bastion-notification"
46-
depends_on = ["oci_core_instance.bastion"]
46+
depends_on = [oci_core_instance.bastion]
4747
count = var.oci_bastion_notification.notification_enabled == true && var.oci_bastion.bastion_enabled == true ? 1 : 0
4848
}
4949

5050
resource "oci_identity_policy" "bastion_notification" {
51-
provider = "oci.home"
51+
provider = oci.home
5252
compartment_id = var.oci_base_identity.compartment_id
5353
description = "policy to allow bastion host to publish messages"
5454
name = "${var.oci_bastion_general.label_prefix}-bastion-notification"
5555
statements = ["Allow dynamic-group ${oci_identity_dynamic_group.bastion_notification[0].name} to use ons-topic in compartment id ${data.oci_identity_compartments.compartments_id.compartments.0.id} where request.permission='ONS_TOPIC_PUBLISH'"]
56-
depends_on = ["oci_core_instance.bastion"]
56+
depends_on = [oci_core_instance.bastion]
5757
count = var.oci_bastion.bastion_enabled == true && var.oci_bastion_notification.notification_enabled == true ? 1 : 0
5858
}

modules/base/vcn/servicegateway.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ data "oci_core_services" "all_oci_services" {
1313
resource "oci_core_service_gateway" "service_gateway" {
1414
compartment_id = var.oci_base_vcn.compartment_id
1515
display_name = "${var.oci_base_vcn.label_prefix}-sg-gw"
16-
depends_on = ["oci_core_nat_gateway.nat_gateway"]
16+
depends_on = [oci_core_nat_gateway.nat_gateway]
1717

1818
services {
1919
service_id = lookup(data.oci_core_services.all_oci_services[0].services[0], "id")

modules/oke/calico.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ resource null_resource "install_calico" {
2727
bastion_private_key = file(var.oke_ssh_keys.ssh_private_key_path)
2828
}
2929

30-
depends_on = ["null_resource.install_kubectl_admin", "null_resource.write_kubeconfig_on_admin"]
30+
depends_on = [null_resource.install_kubectl_admin, null_resource.write_kubeconfig_on_admin]
3131

3232
provisioner "file" {
3333
content = data.template_file.install_calico[0].rendered

modules/oke/datasources.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,5 @@ data "oci_containerengine_cluster_option" "k8s_cluster_option" {
1818
data "oci_containerengine_node_pools" "all_node_pools" {
1919
compartment_id = var.oke_identity.compartment_id
2020
cluster_id = oci_containerengine_cluster.k8s_cluster.id
21-
depends_on = ["oci_containerengine_node_pool.nodepools"]
21+
depends_on = [oci_containerengine_node_pool.nodepools]
2222
}

0 commit comments

Comments
 (0)