-
Notifications
You must be signed in to change notification settings - Fork 2
/
variables.tf
38 lines (30 loc) · 1.42 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
##############################################################################
# Account Variables
##############################################################################
variable "ibmcloud_api_key" {
description = "The IBM Cloud platform API key needed to deploy IAM enabled resources."
type = string
sensitive = true
}
variable "region" {
description = "IBM Cloud region where the resources will be created."
type = string
}
variable "prefix" {
description = "A unique identifier for resources. Must begin with a lowercase letter and end with a lowerccase letter or number. This prefix will be prepended to any resources provisioned by this template. Prefixes must be 16 or fewer characters."
type = string
default = "lab"
validation {
error_message = "Prefix must begin with a lowercase letter and contain only lowercase letters, numbers, and - characters. Prefixes must end with a lowercase letter or number and be 16 or fewer characters."
condition = can(regex("^([a-z]|[a-z][-a-z0-9]*[a-z0-9])$", var.prefix)) && length(var.prefix) <= 16
}
}
variable "ssh_key" {
description = "Public SSH Key for VSI creation. Must be a valid SSH key that does not already exist in the deployment region."
type = string
}
variable "ssh_private_key" {
description = "Private SSH key (RSA format) that is paired with the public ssh key."
type = string
sensitive = true
}