Skip to content

Commit

Permalink
Fix api key auth
Browse files Browse the repository at this point in the history
  • Loading branch information
Rapha-Borges committed Jan 26, 2024
1 parent 0ddf621 commit 553c665
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion kubeconfig/kubeconfig.tf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
resource "null_resource" "create_kubeconfig" {
provisioner "local-exec" {
command = "oci ce cluster create-kubeconfig --cluster-id ${var.cluster_id} --file ~/.kube/config --token-version 2.0.0 --kube-endpoint PUBLIC_ENDPOINT"
command = "oci ce cluster create-kubeconfig --cluster-id ${var.cluster_id} --file ~/.kube/config --token-version 2.0.0 --kube-endpoint PUBLIC_ENDPOINT --profile ${var.oci_profile}"
}
}
3 changes: 3 additions & 0 deletions kubeconfig/variables.tf
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
variable "cluster_id" {
}

variable "oci_profile" {
}
3 changes: 2 additions & 1 deletion terrafile.tf
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,9 @@ module "loadbalancer" {

module "kubeconfig" {
source = "./kubeconfig"
cluster_id = module.cluster.cluster_id
depends_on = [ module.loadbalancer ]
cluster_id = module.cluster.cluster_id
oci_profile = var.oci_profile
}

output "public_ip" {
Expand Down
4 changes: 4 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -100,3 +100,7 @@ variable "tenancy_ocid" {
variable "user_ocid" {
type = string
}

variable "oci_profile" {
type = string
}

0 comments on commit 553c665

Please sign in to comment.