-
Notifications
You must be signed in to change notification settings - Fork 73
Expand file tree
/
Copy pathvariables.tf
More file actions
166 lines (138 loc) · 5.24 KB
/
variables.tf
File metadata and controls
166 lines (138 loc) · 5.24 KB
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
# Copyright (c) 2019, 2021, Oracle Corporation and/or affiliates.
# Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl
# provider identity parameters
variable "fingerprint" {
description = "fingerprint of oci api private key"
type = string
# no default value, asking user to explicitly set this variable's value. see codingconventions.adoc
}
variable "private_key_path" {
description = "path to oci api private key used"
type = string
# no default value, asking user to explicitly set this variable's value. see codingconventions.adoc
}
variable "region" {
description = "the oci region where resources will be created"
type = string
# no default value, asking user to explicitly set this variable's value. see codingconventions.adoc
# List of regions: https://docs.cloud.oracle.com/iaas/Content/General/Concepts/regions.htm#ServiceAvailabilityAcrossRegions
}
variable "tenancy_ocid" {
description = "tenancy ocid where to create the sources"
type = string
# no default value, asking user to explicitly set this variable's value. see codingconventions.adoc
}
variable "user_ocid" {
description = "ocid of user that terraform will use to create the resources"
type = string
# no default value, asking user to explicitly set this variable's value. see codingconventions.adoc
}
# general oci parameters
variable "compartment_ocid" {
description = "compartment ocid where to create all resources"
type = string
# no default value, asking user to explicitly set this variable's value. see codingconventions.adoc
}
variable "freeform_tags" {
description = "simple key-value pairs to tag the resources created using freeform tags."
type = map(string)
default = null
}
variable "defined_tags" {
description = "predefined and scoped to a namespace to tag the resources created using defined tags."
type = map(string)
default = null
}
# compute instance parameters
variable "instance_ad_number" {
description = "The availability domain number of the instance. If none is provided, it will start with AD-1 and continue in round-robin."
type = number
default = 1
}
variable "instance_count" {
description = "Number of identical instances to launch from a single module."
type = number
default = 1
}
variable "instance_display_name" {
description = "(Updatable) A user-friendly name for the instance. Does not have to be unique, and it's changeable."
type = string
default = "module_instance_nonflex"
}
variable "instance_flex_memory_in_gbs" {
type = number
description = "(Updatable) The total amount of memory available to the instance, in gigabytes."
default = null
}
variable "instance_flex_ocpus" {
type = number
description = "(Updatable) The total number of OCPUs available to the instance."
default = null
}
variable "instance_state" {
type = string
description = "(Updatable) The target state for the instance. Could be set to RUNNING or STOPPED."
default = "RUNNING"
validation {
condition = contains(["RUNNING", "STOPPED"], var.instance_state)
error_message = "Accepted values are RUNNING or STOPPED."
}
}
variable "shape" {
description = "The shape of an instance."
type = string
default = "VM.Standard2.1"
}
variable "cloud_agent_plugins" {
description = "Whether each Oracle Cloud Agent plugins should be ENABLED or DISABLED."
type = map(string)
default = {
autonomous_linux = "ENABLED"
bastion = "ENABLED"
block_volume_mgmt = "DISABLED"
custom_logs = "ENABLED"
management = "DISABLED"
monitoring = "ENABLED"
osms = "ENABLED"
run_command = "ENABLED"
vulnerability_scanning = "ENABLED"
java_management_service = "DISABLED"
}
}
variable "source_ocid" {
description = "The OCID of an image or a boot volume to use, depending on the value of source_type."
type = string
}
variable "source_type" {
description = "The source type for the instance."
type = string
default = "image"
}
# operating system parameters
variable "ssh_public_keys" {
description = "Public SSH keys to be included in the ~/.ssh/authorized_keys file for the default user on the instance. To provide multiple keys, see docs/instance_ssh_keys.adoc."
type = string
default = null
}
# networking parameters
variable "assign_public_ip" {
description = "Whether the VNIC should be assigned a public IP address."
type = bool
default = false
}
variable "public_ip" {
description = "Whether to create a Public IP to attach to primary vnic and which lifetime. Valid values are NONE, RESERVED or EPHEMERAL."
type = string
default = "NONE"
}
# storage parameters
variable "boot_volume_backup_policy" {
description = "Choose between default backup policies : gold, silver, bronze. Use disabled to affect no backup policy on the Boot Volume."
type = string
default = "disabled"
}
variable "block_storage_sizes_in_gbs" {
description = "Sizes of volumes to create and attach to each instance."
type = list(string)
default = [50]
}