-
Notifications
You must be signed in to change notification settings - Fork 0
/
variables.tf
150 lines (120 loc) · 3.75 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
/*
Last update : January, 2021
Author: [email protected]
Description: Define Terraform variables for the current configuration
*/
# Mandatory variables for oci provider
variable "tenancy_ocid" {
type = string
default = null
}
variable "user_ocid" {
type = string
default = null
}
variable "fingerprint" {
type = string
default = null
}
variable "private_key_path" {
type = string
default = null
}
variable "private_key" {
type = string
default = null
}
variable "region" {
type = string
default = null
}
# Configuration specific variables
## general oci parameters
variable "compartment_id" {
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 = "iacbox"
}
variable "instance_flex_memory_in_gbs" {
type = number
description = "(Updatable) The total amount of memory available to the instance, in gigabytes."
default = 6
}
variable "instance_flex_ocpus" {
type = number
description = "(Updatable) The total number of OCPUs available to the instance."
default = 1
}
variable "instance_state" {
type = string
description = "(Updatable) The target state for the instance. Could be set to RUNNING or STOPPED."
default = "STOPPED"
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.Standard.A1.Flex"
}
variable "source_ocid" {
description = "The OCID of an image or a boot volume to use, depending on the value of source_type."
type = string
default = null
}
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
}
variable "user_data" {
description = "Provide your own base64-encoded data to be used by Cloud-Init to run custom scripts or provide custom Cloud-Init configuration."
type = string
default = null
}
## networking parameters
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 = "RESERVED"
}
## storage parameters
variable "block_storage_sizes_in_gbs" {
description = "Sizes of volumes to create and attach to each instance."
type = list(string)
default = []
}