This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| set -eEo pipefail | |
| set -x | |
| print_usage() { | |
| cat <<HELP_USAGE | |
| Usage: | |
| $0 [-p <project>] [-z <zone>] <vm_name> | |
| -p Project the VM belongs to |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| variable "project_id" { | |
| description = "The name of the Google Project ID where the keys will be stored. eg: 'my-project'" | |
| type = string | |
| } | |
| data "google_projects" "prj" { | |
| filter = "id:${var.project_id}" | |
| lifecycle { | |
| postcondition { | |
| condition = length(self.projects) == 1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| BUCKET=foo-bucket | |
| USER=name@domain.com | |
| gsutil iam get gs://$BUCKET | | |
| jq -r '.bindings | | |
| map(select(any( | |
| .members[]; contains("user:'$USER'"))) | |
| |.role)[]' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| apiVersion: v1 | |
| kind: Pod | |
| metadata: | |
| name: myapp | |
| labels: | |
| name: myapp | |
| spec: | |
| containers: | |
| - name: myapp | |
| image: &elasticsearch_image docker.io/bitnami/elasticsearch:8.3.3-debian-11-r5 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package main | |
| import ( | |
| "context" | |
| "fmt" | |
| "io" | |
| "log" | |
| "path/filepath" | |
| "sync" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package main | |
| import ( | |
| "errors" | |
| "fmt" | |
| ) | |
| // Node represents a node in the DAG. | |
| type Node struct { | |
| ID int |
OlderNewer