Skip to content

Commit 063951d

Browse files
authored
removed instance_principal check (#49)
Signed-off-by: Ali Mukadam <[email protected]>
1 parent d2c6afa commit 063951d

File tree

5 files changed

+5
-37
lines changed

5 files changed

+5
-37
lines changed

CHANGELOG.adoc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ All notable changes to this project are documented in this file.
77

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

10+
== 1.1.4 (May 5, 2020)
11+
* Removed instance_principal check (#48)
12+
1013
== 1.1.3 (April 7, 2020)
1114
* Added a file (ip.finish) on admin host to allow solution stacks to detect when the instance_principal for admin host is ready (#46)
1215

locals.tf

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@ locals {
6161
admin_shape = var.oci_base_admin.admin_shape
6262
admin_upgrade = var.oci_base_admin.admin_upgrade
6363
enable_instance_principal = var.oci_base_admin.enable_instance_principal
64-
ssh_private_key_path = var.oci_base_admin.ssh_private_key_path
6564
ssh_public_key_path = var.oci_base_admin.ssh_public_key_path
6665
timezone = var.oci_base_admin.timezone
6766
}

main.tf

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,5 @@ module "admin" {
2424
oci_admin_network = local.oci_admin_network
2525
oci_admin = local.oci_admin
2626
oci_admin_notification = local.oci_admin_notification
27-
oci_admin_bastion = local.oci_admin_bastion
2827
tagging = local.tagging
2928
}

modules/admin/instance_principal.tf

Lines changed: 1 addition & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -42,28 +42,4 @@ resource "oci_identity_policy" "admin_instance_principal" {
4242
statements = ["Allow dynamic-group ${oci_identity_dynamic_group.admin_instance_principal[0].name} to manage all-resources in compartment id ${data.oci_identity_compartments.compartments_id.compartments.0.id}"]
4343

4444
count = var.oci_admin.admin_enabled == true && var.oci_admin.enable_instance_principal == true ? 1 : 0
45-
}
46-
47-
resource null_resource "instance_principal_complete" {
48-
connection {
49-
host = oci_core_instance.admin[0].private_ip
50-
private_key = file(var.oci_admin.ssh_private_key_path)
51-
timeout = "40m"
52-
type = "ssh"
53-
user = "opc"
54-
55-
bastion_host = var.oci_admin_bastion.bastion_ip
56-
bastion_user = "opc"
57-
bastion_private_key = file(var.oci_admin_bastion.ssh_private_key_path)
58-
}
59-
60-
depends_on = [oci_identity_dynamic_group.admin_instance_principal, oci_identity_policy.admin_instance_principal]
61-
62-
provisioner "remote-exec" {
63-
inline = [
64-
"touch $HOME/ip.finish",
65-
]
66-
}
67-
68-
count = var.oci_admin.admin_enabled == true && var.oci_admin.enable_instance_principal == true ? 1 : 0
69-
}
45+
}

modules/admin/variables.tf

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ variable "oci_admin" {
3232
admin_upgrade = bool
3333
admin_enabled = bool
3434
enable_instance_principal = bool
35-
ssh_private_key_path = string
3635
ssh_public_key_path = string
3736
timezone = string
3837
})
@@ -68,12 +67,4 @@ variable "tagging" {
6867
computetag = map(any)
6968
networktag = map(any)
7069
})
71-
}
72-
73-
# bastion
74-
variable "oci_admin_bastion" {
75-
type = object({
76-
bastion_ip = string
77-
ssh_private_key_path = string
78-
})
79-
}
70+
}

0 commit comments

Comments
 (0)