Commit 4d822543 authored by Adam Robinson's avatar Adam Robinson
Browse files

install datalab cli

parent 831387a1
......@@ -57,14 +57,22 @@ resource "google_logging_metric" "set_iam_permissions_change" {
}
}
//fix this later
# module "project_audit_logs" {
# source = "./modules/google_hipaa_project_auditing"
# destination_project_id = var.project_type == "audit" ? google_project.hipaa_project.project_id : var.audit_project_id
# source_project_id = google_project.hipaa_project.project_id
# owners_group_email = var.owners_group_email
# auditor_group_email = var.auditor_group_email
# dependencies = [ null_resource.external_dependencies.id ]
# }
resource "null_resource" "install_datalab_cli" {
triggers = {
run_time = timestamp()
}
provisioner "local-exec" {
command = <<EOH
if [ `uname` != "Darwin" ]; then
echo "deb [signed-by=/usr/share/keyrings/cloud.google.gpg] http://packages.cloud.google.com/apt cloud-sdk main" | sudo tee -a /etc/apt/sources.list.d/google-cloud-sdk.list
curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key --keyring /usr/share/keyrings/cloud.google.gpg add -
sudo apt-get --assume-yes update && sudo apt-get --assume-yes install google-cloud-sdk google-cloud-sdk-datalab jq
echo $GOOGLE_CLOUD_KEYFILE_JSON > ~/key.json
gcloud auth activate-service-account --key-file ~/key.json
rm ~/key.json
fi
EOH
}
}
resource "null_resource" "dummy_import_resource" {}
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment