Skip to content

Commit 918b0e1

Browse files
committed
updated tags
Signed-off-by: Ali Mukadam <[email protected]>
1 parent d8b1a89 commit 918b0e1

File tree

6 files changed

+13
-27
lines changed

6 files changed

+13
-27
lines changed

compute.tf

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@
44
resource "oci_core_instance" "bastion" {
55
availability_domain = element(local.ad_names, (var.availability_domain - 1))
66
compartment_id = var.compartment_id
7-
freeform_tags = var.tags.compute
8-
7+
freeform_tags = var.tags
98

109
create_vnic_details {
1110
assign_public_ip = true

docs/terraformoptions.adoc

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -211,12 +211,9 @@ Ensure you review the {uri-terraform-dependencies}[dependencies].
211211
|
212212
[source]
213213
----
214-
compute = {
215-
"environment" = "dev"
216-
"role" = "bastion"
217-
}
218-
network = {
219-
"environment" = "dev"
220-
"role" = "bastion"
214+
tags = {
215+
department = "finance"
216+
environment = "dev"
217+
role = "bastion"
221218
}
222219
----

security.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
resource "oci_core_security_list" "bastion" {
55
compartment_id = var.compartment_id
66
display_name = "${var.label_prefix}-bastion"
7-
freeform_tags = var.tags.network
7+
freeform_tags = var.tags
88

99
egress_security_rules {
1010
protocol = local.all_protocols

subnets.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ resource "oci_core_subnet" "bastion" {
66
compartment_id = var.compartment_id
77
display_name = "${var.label_prefix}-bastion"
88
dns_label = "bastion"
9-
freeform_tags = var.tags.network
9+
freeform_tags = var.tags
1010
prohibit_public_ip_on_vnic = false
1111
route_table_id = var.ig_route_id
1212
security_list_ids = [oci_core_security_list.bastion[0].id]

terraform.tfvars.example

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -56,12 +56,7 @@ notification_protocol = "EMAIL"
5656
notification_topic = "bastion"
5757

5858
tags = {
59-
compute = {
60-
"environment" = "dev"
61-
"role" = "bastion"
62-
}
63-
network = {
64-
"environment" = "dev"
65-
"role" = "bastion"
66-
}
59+
department = "finance"
60+
environment = "dev"
61+
role = "bastion"
6762
}

variables.tf

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -154,14 +154,9 @@ variable "notification_topic" {
154154
variable "tags" {
155155
description = "Freeform tags for bastion"
156156
default = {
157-
compute = {
158-
"environment" = "dev"
159-
"role" = "bastion"
160-
}
161-
network = {
162-
"environment" = "dev"
163-
"role" = "bastion"
164-
}
157+
department = "finance"
158+
environment = "dev"
159+
role = "bastion"
165160
}
166161
type = map(any)
167162
}

0 commit comments

Comments
 (0)