generated from terraform-ibm-modules/terraform-ibm-module-template
-
Notifications
You must be signed in to change notification settings - Fork 2
/
provider.tf
32 lines (29 loc) · 1.07 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
# IBM provider used to provision IBM Cloud resources
provider "ibm" {
ibmcloud_api_key = var.ibmcloud_api_key
region = var.region
}
# Init cluster config for helm and kubernetes providers
data "ibm_container_cluster_config" "cluster_config" {
cluster_name_id = module.ocp_all_inclusive.cluster_id
resource_group_id = module.ocp_all_inclusive.resource_group_id
config_dir = "${path.module}/kubeconfig"
}
# Helm provider used to deploy cluster-proxy and observability agents
provider "helm" {
kubernetes {
host = data.ibm_container_cluster_config.cluster_config.host
token = data.ibm_container_cluster_config.cluster_config.token
}
# IBM Cloud credentials are required to authenticate to the helm repo
registry {
url = "oci://icr.io/ibm/observe/logs-agent-helm"
username = "iamapikey"
password = var.ibmcloud_api_key
}
}
# Kubernetes provider used to create kube namespace(s)
provider "kubernetes" {
host = data.ibm_container_cluster_config.cluster_config.host
token = data.ibm_container_cluster_config.cluster_config.token
}