Skip to content

Commit d9bc9a5

Browse files
committed
updated tags
Signed-off-by: Ali Mukadam <[email protected]>
1 parent 8b765dc commit d9bc9a5

File tree

6 files changed

+16
-27
lines changed

6 files changed

+16
-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" "operator" {
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 = false

docs/terraformoptions.adoc

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -206,12 +206,9 @@ Ensure you review the {uri-terraform-dependencies}[dependencies].
206206
|
207207
[source]
208208
----
209-
compute = {
210-
"environment" = "dev"
211-
"role" = "operator"
212-
}
213-
network = {
214-
"environment" = "dev"
215-
"role" = "operator"
209+
tags = {
210+
department = "finance"
211+
environment = "dev"
212+
role = "bastion"
216213
}
217214
----

security.tf

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,15 @@
44
resource "oci_core_security_list" "operator" {
55
compartment_id = var.compartment_id
66
display_name = "${var.label_prefix}-operator"
7+
freeform_tags = var.tags
78

89
egress_security_rules {
910
protocol = local.all_protocols
1011
destination = local.anywhere
1112
}
1213

14+
15+
1316
ingress_security_rules {
1417
# allow ssh
1518
protocol = local.tcp_protocol

subnets.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ resource "oci_core_subnet" "operator" {
66
compartment_id = var.compartment_id
77
display_name = "${var.label_prefix}-operator"
88
dns_label = "operator"
9+
freeform_tags = var.tags
910
prohibit_public_ip_on_vnic = true
1011
route_table_id = var.nat_route_id
1112
security_list_ids = [oci_core_security_list.operator[0].id]
1213
vcn_id = var.vcn_id
13-
freeform_tags = var.tags.network
1414

1515
count = var.operator_enabled == true ? 1 : 0
1616
}

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 = "operator"
5757

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

variables.tf

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -152,16 +152,11 @@ variable "notification_topic" {
152152

153153
# tagging
154154
variable "tags" {
155-
description = "Freeform tags for operator"
155+
description = "Freeform tags for bastion"
156156
default = {
157-
compute = {
158-
"environment" = "dev"
159-
"role" = "operator"
160-
}
161-
network = {
162-
"environment" = "dev"
163-
"role" = "operator"
164-
}
157+
department = "finance"
158+
environment = "dev"
159+
role = "bastion"
165160
}
166161
type = map(any)
167162
}

0 commit comments

Comments
 (0)