forked from pkrishn1-pk/vnf-vpc-f5
-
Notifications
You must be signed in to change notification settings - Fork 0
/
provider.tf
68 lines (60 loc) · 3.05 KB
/
provider.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
##############################################################################
# Variable block - See each variable description
##############################################################################
locals {
api_key = "${var.ibmcloud_endpoint == "cloud.ibm.com" ? var.ibmcloud_svc_api_key : var.ibmcloud_svc_api_key_test}"
}
##############################################################################
# ibmcloud_svc_api_key - Cloud Service apikey hosting the F5-BIGIP
# image in COS. This variable is not shown to user.
# The value for this variable is enter at offering
# onbaording time.
##############################################################################
variable "ibmcloud_svc_api_key" {
default = ""
type = "string"
description = "The APIKey of the IBM Cloud service account that is hosting the F5-BIGIP qcow2 image file. This should be a the API Key of a Service ID in the account"
}
##############################################################################
# ibmcloud_svc_api_key_test - Cloud Service apikey hosting the F5-BIGIP
# image in COS in test.cloud.ibm.com. This variable is not shown to user.
# The value for this variable is enter at offering
# onbaording time.
##############################################################################
variable "ibmcloud_svc_api_key_test" {
default = ""
type = "string"
description = "The APIKey of the IBM Cloud test service account that is hosting the F5-BIGIP qcow2 image file. This should be a the API Key of a Service ID in the account"
}
variable "region" {
default = "us-south"
description = "The VPC Region that you want your VPC, networks and the F5 virtual server to be provisioned in. To list available regions, run `ibmcloud is regions`."
}
variable "generation" {
default = 2
description = "The VPC Generation to target. Valid values are 2 or 1."
}
variable "resource_group" {
default = "Default"
description = "The resource group to use. If unspecified, the account's default resource group is used."
}
##############################################################################
# Provider block - Default using logged user creds
##############################################################################
provider "ibm" {
# ibmcloud_api_key = "${var.ibmcloud_api_key}"
generation = "${var.generation}"
region = "${var.region}"
resource_group = "${var.resource_group}"
ibmcloud_timeout = 300
}
##############################################################################
# Provider block - Alias initialized tointeract with VNFSVC account
##############################################################################
provider "ibm" {
alias = "vfnsvc"
ibmcloud_api_key = "${local.api_key}"
generation = "${var.generation}"
region = "${var.region}"
ibmcloud_timeout = 300
}