-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmain.tf
More file actions
45 lines (36 loc) · 881 Bytes
/
main.tf
File metadata and controls
45 lines (36 loc) · 881 Bytes
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
terraform {
required_providers {
oci = {
source = "oracle/oci"
version = "4.96.0"
}
kubernetes = {
source = "hashicorp/kubernetes"
version = ">= 1.13.0"
}
k8s = {
source = "banzaicloud/k8s"
version = ">= 0.8.0"
}
}
}
# == Provider ==
provider "oci" {
region = var.region
tenancy_ocid = var.tenancy_ocid
user_ocid = var.user_ocid
private_key_path = var.user_rsa_path
fingerprint = var.user_rsa_fingerprint
}
provider "kubernetes" {
config_path = "${path.module}/generated/kubeconfig"
}
provider "k8s" {
config_path = "${path.module}/generated/kubeconfig"
}
# == Compartment ==
resource "oci_identity_compartment" "k8s" {
compartment_id = var.tenancy_ocid
description = "Compartment for Free Tier K8s Cluster"
name = "OracleManagedKubernetesCompartment"
}