-
Notifications
You must be signed in to change notification settings - Fork 67
/
Copy pathvariables.tf
187 lines (155 loc) · 5.6 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
177
178
179
180
181
182
183
184
185
186
187
# Copyright (c) 2019, 2022 Oracle Corporation and/or affiliates. All rights reserved.
# Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl
# provider identity parameters
variable "region" {
# List of regions: https://docs.cloud.oracle.com/iaas/Content/General/Concepts/regions.htm#ServiceAvailabilityAcrossRegions
description = "the OCI region where resources will be created"
type = string
default = null
}
# general oci parameters
variable "compartment_id" {
description = "compartment id where to create all resources"
type = string
# no default value, asking user to explicitly set this variable's value. see codingconventions.adoc
}
variable "label_prefix" {
description = "a string that will be prepended to all resources"
type = string
default = "none"
}
variable "freeform_tags" {
description = "simple key-value pairs to tag the created resources using freeform OCI Free-form tags."
type = map(any)
default = {
terraformed = "Please do not edit manually"
module = "oracle-terraform-modules/vcn/oci"
}
}
variable "defined_tags" {
description = "predefined and scoped to a namespace to tag the resources created using defined tags."
type = map(string)
default = null
}
# vcn parameters
variable "create_internet_gateway" {
description = "whether to create the internet gateway in the vcn. If set to true, creates an Internet Gateway."
default = false
type = bool
}
variable "create_nat_gateway" {
description = "whether to create a nat gateway in the vcn. If set to true, creates a nat gateway."
default = false
type = bool
}
variable "create_service_gateway" {
description = "whether to create a service gateway. If set to true, creates a service gateway."
default = false
type = bool
}
variable "enable_ipv6" {
description = "Whether IPv6 is enabled for the VCN. If enabled, Oracle will assign the VCN a IPv6 /56 CIDR block."
type = bool
default = false
}
variable "lockdown_default_seclist" {
description = "whether to remove all default security rules from the VCN Default Security List"
default = true
type = bool
}
variable "nat_gateway_public_ip_id" {
description = "OCID of reserved IP address for NAT gateway. The reserved public IP address needs to be manually created."
default = "none"
type = string
}
variable "vcn_cidrs" {
description = "The list of IPv4 CIDR blocks the VCN will use."
default = ["10.0.0.0/16"]
type = list(string)
}
variable "vcn_dns_label" {
description = "A DNS label for the VCN, used in conjunction with the VNIC's hostname and subnet's DNS label to form a fully qualified domain name (FQDN) for each VNIC within this subnet. DNS resolution of hostnames in the VCN is disabled when null."
type = string
default = "vcnmodule"
validation {
condition = var.vcn_dns_label == null ? true : length(regexall("^[^0-9][a-zA-Z0-9_]{1,14}$", var.vcn_dns_label)) > 0
error_message = "DNS label must be unset to disable, or an alphanumeric string with length of 1 through 15 that begins with a letter."
}
}
variable "vcn_name" {
description = "user-friendly name of to use for the vcn to be appended to the label_prefix"
type = string
default = "vcn"
validation {
condition = length(var.vcn_name) > 0
error_message = "The vcn_name value cannot be an empty string."
}
}
# gateways parameters
variable "internet_gateway_display_name" {
description = "(Updatable) Name of Internet Gateway. Does not have to be unique."
type = string
default = "internet-gateway"
validation {
condition = length(var.internet_gateway_display_name) > 0
error_message = "The internet_gateway_display_name value cannot be an empty string."
}
}
variable "local_peering_gateways" {
description = "Map of Local Peering Gateways to attach to the VCN."
type = map(any)
default = null
}
variable "nat_gateway_display_name" {
description = "(Updatable) Name of NAT Gateway. Does not have to be unique."
type = string
default = "nat-gateway"
validation {
condition = length(var.nat_gateway_display_name) > 0
error_message = "The nat_gateway_display_name value cannot be an empty string."
}
}
variable "service_gateway_display_name" {
description = "(Updatable) Name of Service Gateway. Does not have to be unique."
type = string
default = "service-gateway"
validation {
condition = length(var.service_gateway_display_name) > 0
error_message = "The service_gateway_display_name value cannot be an empty string."
}
}
variable "internet_gateway_route_rules" {
description = "(Updatable) List of routing rules to add to Internet Gateway Route Table"
type = list(map(string))
default = null
}
variable "nat_gateway_route_rules" {
description = "(Updatable) list of routing rules to add to NAT Gateway Route Table"
type = list(map(string))
default = null
}
variable "attached_drg_id" {
description = "the ID of DRG attached to the VCN"
type = string
default = null
}
#subnets
variable "subnets" {
description = "Private or Public subnets in a VCN"
type = any
default = {}
}
variable "tenancy_id" {
description = "Tenancy OCID"
type = string
}
variable "enable_vcn_logging" {
type = bool
default = false
description = "Enable or Disable VCN logging"
}
variable "log_retention_duration" {
type = number
default = 30
description = "Log retention duration"
}