Skip to content

Commit

Permalink
fixing issue
Browse files Browse the repository at this point in the history
  • Loading branch information
amanpruthi committed Jun 17, 2024
1 parent bf5c2c3 commit d7007af
Showing 1 changed file with 8 additions and 13 deletions.
21 changes: 8 additions & 13 deletions modules/private_link/main.tf
Original file line number Diff line number Diff line change
@@ -1,25 +1,20 @@
data "google_client_config" "current" {}

resource "null_resource" "default" {
provisioner "local-exec" {
command = "gcloud compute instances list"
}
}

# Module to manage gcloud
module "gcloud" {
source = "terraform-google-modules/gcloud/google"
version = "~> 3.4"
platform = "linux"
create_cmd_entrypoint = "gcloud"
create_cmd_body = "compute forwarding-rules list --format=json > lb_details.json"
}
# module "gcloud" {
# source = "terraform-google-modules/gcloud/google"
# version = "~> 3.4"
# platform = "linux"
# create_cmd_entrypoint = "gcloud"
# create_cmd_body = "compute forwarding-rules list --format=json > lb_details.json"
# }

# Fetch Load Balancer Details using gcloud module
resource "null_resource" "fetch_lb_details" {
provisioner "local-exec" {
command = <<EOT
ls -lrt
gcloud version
cat lb_details.json | jq -r '.[] | select(.name | test("${var.namespace}-internal")) | .name' > filtered_lb_names.txt
EOT
}
Expand Down

0 comments on commit d7007af

Please sign in to comment.