forked from PraveenRacharla/Terraform-Examples
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvariables.tf
176 lines (127 loc) · 3.89 KB
/
variables.tf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
/*
These are variables to create basic environment in Oracle Cloud Infrastructure.
Depending on requirement variables can be modified. Following environment variable must be edited.
* ssh_public_key
For more detailed instructions review main.tf
Author: Simo Vilmunen 16/12/2018
*/
variable "tenancy_ocid" {}
variable "user_ocid" {}
variable "fingerprint" {}
variable "private_key_path" {}
variable "region" {}
# Variables to create compartments for Demo
variable "compartment_name" { default = "terraform-test-demo" }
variable "compartment_description" { default = "Compartment for demoing two instances creation" }
# Variables to create Tag Namespace
variable "tags" {
# type = "map"
default = {
"DemoTagNamespace.Environment" = "poc"
"DemoTagNamespace.Owner" = "Me"
}
}
variable "tag_names" { default = ["Environment", "Owner"] }
variable "tag_namespace_description" { default = "Tag namespace for all resources" }
variable "tag_namespace_name" { default = "DemoTagNamespace" }
variable "is_retired" { default = "false" }
variable "tag_description" { default = ["Environment purpose", "Owner for resource"] }
# IGW variables
variable "internet_gateway_enabled" { default = "true" }
variable "internet_gateway_display_name" { default = "MyIGW" }
variable "igw_route_table_rules_cidr_block" { default = "0.0.0.0/0" }
# VCN variables
variable "vcn_cidr_block" { default = "172.27.0.0/16" }
variable "vcn_display_name" { default = "MyVCN" }
variable "vcn_dns_label" { default = "demo" }
variable "route_table_display_name" {
default = "MyRouteTable"
}
variable "ad_number" {
default = "0"
}
variable "compartment_display_name" {
default = "terraform-test-demo"
}
variable "vcn_ingress_protocol" {
default = "all"
}
# Applications security list variables
variable "private_security_list_name" {
default = "MyPrivateSL"
}
variable "egress_destination" {
default = "0.0.0.0/0"
}
variable "egress_protocol" {
default = "all"
}
variable "ingress_source" {
default = "0.0.0.0/0"
}
variable "ingress_protocol" {
default = "6"
}
variable "ingress_stateless" {
default = false
}
# Subnet variables
variable "cidr_block_subnet" {
default = "172.27.0.0/24"
}
variable "display_name_subnet" {
default = "poc-subnet"
}
variable "dns_label_subnet" {
default = "poc"
}
variable "ingress_ports" {
description = "all the ports for security list"
default = [
{ minport = 22
maxport = 22
source_cidr = "0.0.0.0/0"
},
{ minport = 0
maxport = 0
source_cidr = "172.27.0.0/16"
}]
}
// INSTANCE VARIABLES
variable "operating_system" {
default = "Oracle Linux"
} // Name for the OS
variable "operating_system_version" {
default = "7.8"
} // OS Version
variable "image_id" {
default = "Oracle-Linux-7.8-2020.04.17-0"
} // OS Version
variable "shape_name" {
default = "VM.Standard2.1"
} // Shape what to be used. Smallest shape selected by default
variable "source_type" {
default = "image"
} // What type the image source is
variable "assign_public_ip" {
default = "true"
} // This is server in public subnet it will have a public IP
variable "instance_variables" {
description = "Map instance name to hostname"
default = {
"ForEach1" = "fe-1"
"ForEach2" = "fe-2"
}
}
variable "instance_create_vnic_details_hostname_label" {
default = "ForEach"
}
variable "is_monitoring_disabled" {
default = false
}
variable "ssh_public_key" {
default = "ssh-rsa AAAAB3NzaC1yc2EAAAABJQAAAQEAheXJmKWb/glASWQIqBGGUw5BHJ+aKYOCI+kdwX49Yl0R5uMKYnRmFadrxFrk0IOWjCMRpI+CZqnzZ2DKufI/ZqtAEQwWmxx+RanO7IME8Je2Vv3pz6he4HjzA+0JnREeaskoPqbyVDq9nPsNkfbH7FlkOC2wDjYJuhGZZpWe22OuKTkZrFjoMGm5IMGiSiChoyEuQOLpQ0LF9cUc2ADc8dq88qPtZtnqduPfaM8uMO0KSWDr4yRkQiU/f2i/gfr1LHblpWKVPOT9a6qKjLDPcIQXiOBMeJZfJUcAYWvk1U/G/O9UlZ/MuB2h2nW/Jhmgz3bhBNKWiAZrKAU0B428Ww== rsa-key-20200523"
}
variable "instance_create_vnic_details_skip_source_dest_check" {
default = false
}