Skip to content

Instantly share code, notes, and snippets.

type: object
properties:
type:
type: string
default: a
2021-08-20T15:58:28.856-0700 [DEBUG] provider.terraform-provider-kubernetes: POST /api/v1/namespaces/default/persistentvolumeclaims HTTP/1.1
2021-08-20T15:58:28.856-0700 [DEBUG] provider.terraform-provider-kubernetes: Host: 35.x.y.z
2021-08-20T15:58:28.856-0700 [DEBUG] provider.terraform-provider-kubernetes: User-Agent: HashiCorp/1.0 Terraform/1.0.5
2021-08-20T15:58:28.856-0700 [DEBUG] provider.terraform-provider-kubernetes: Content-Length: 274
2021-08-20T15:58:28.856-0700 [DEBUG] provider.terraform-provider-kubernetes: Accept: application/json, */*
2021-08-20T15:58:28.856-0700 [DEBUG] provider.terraform-provider-kubernetes: Authorization: Bearer XYZ
2021-08-20T15:58:28.856-0700 [DEBUG] provider.terraform-provider-kubernetes: Content-Type: application/json
2021-08-20T15:58:28.856-0700 [DEBUG] provider.terraform-provider-kubernetes: Accept-Encoding: gzip
2021-08-20T15:58:28.856-0700 [DEBUG] provider.terraform-provider-kubernetes:
2021-08-20T15:58:28.856-0700 [DEBUG] provider.terraform-provider-kubernetes: {
const dgraph = require('dgraph-js');
const clientStubs = [
new dgraph.DgraphClientStub('127.0.0.1:9080'),
];
const client = new dgraph.DgraphClient(...clientStubs);
const cleanup = async () => {
const txn = client.newTxn();
@dpkirchner
dpkirchner / gist:42f97f6d6df57fc552009743944fe779
Created June 25, 2021 19:27
execProviderConfig example
{
"execProviderConfig": {
"apiVersion": "client.authentication.k8s.io/v1beta1",
"args": [
"-c",
"import urllib.request, json, datetime; obj = json.loads(urllib.request.urlopen(urllib.request.Request(\"http://metadata.google.internal/computeMetadata/v1/instance/service-accounts/default/token\", headers={\"Metadata-Flavor\":\"Google\"})).read()); delta = datetime.timedelta(seconds=int(obj[\"expires_in\"])); out = {\"apiVersion\":\"client.authentication.k8s.io/v1beta1\",\"kind\":\"ExecCredential\",\"status\":{\"token\":obj[\"access_token\"],\"expirationTimestamp\":(delta + datetime.datetime.utcnow()).strftime(\"%Y-%m-%dT%H:%M:%SZ\")}}; print(json.dumps(out))"
],
"command": "/usr/bin/python3"
},
"tlsClientConfig": {
go: downloading github.com/grafana/loki v1.6.1
go: downloading github.com/prometheus/common v0.10.0
go: downloading gopkg.in/alecthomas/kingpin.v2 v2.2.6
go: downloading github.com/gorilla/websocket v1.4.0
go: downloading github.com/json-iterator/go v1.1.10
go: downloading github.com/cortexproject/cortex v1.2.1-0.20200803161316-7014ff11ed70
go: downloading github.com/fatih/color v1.9.0
go: downloading github.com/prometheus/client_golang v1.7.1
go: downloading github.com/prometheus/prometheus v1.8.2-0.20200727090838-6f296594a852
go: downloading github.com/weaveworks/common v0.0.0-20200625145055-4b1847531bc9
```
$ TF_LOG=trace terraform apply
2020/12/18 10:46:15 [INFO] Terraform version: 0.13.5
2020/12/18 10:46:15 [INFO] Go runtime version: go1.14.10
2020/12/18 10:46:15 [INFO] CLI args: []string{"/usr/local/bin/terraform", "apply"}
2020/12/18 10:46:15 [DEBUG] Attempting to open CLI config file: /Users/dpk/.terraformrc
2020/12/18 10:46:15 [DEBUG] File doesn't exist, but doesn't need to. Ignoring.
2020/12/18 10:46:15 [DEBUG] checking for credentials in "/Users/dpk/.terraform.d/plugins"
2020/12/18 10:46:15 [DEBUG] checking for credentials in "/Users/dpk/.terraform.d/plugins/darwin_amd64"
2020/12/18 10:46:15 [DEBUG] ignoring non-existing provider search directory terraform.d/plugins
@dpkirchner
dpkirchner / .dockerignore
Last active July 17, 2020 21:58
Relay Github webhook to a Google IAP-protected service
Dockerfile
node_modules
npm-debug.log
@dpkirchner
dpkirchner / misc.sh
Created June 3, 2020 22:00
dgraph, using groupby to report votes
node recreate.js
node vote.js -p 'What do?' -c 'Candidate A' -v 'Voter B'
node vote.js -p 'What do?' -c 'Candidate A' -v 'Voter D'
node vote.js -p 'What do?' -c 'Candidate C' -v 'Voter D'
node vote.js -p 'What do?' -c 'Candidate C' -v 'Voter E'
node vote.js -p 'What do?' -c 'Candidate C' -v 'Voter A'
node votes.js -p 'What do?'
# output:
# Candidate A: 1
node_modules
build
2019/08/05 12:23:27 [INFO] Terraform version: 0.12.6
2019/08/05 12:23:27 [INFO] Go runtime version: go1.12.4
2019/08/05 12:23:27 [INFO] CLI args: []string{"/Users/dpk/bin/terraform", "import", "google_compute_router_nat.nat-1", "nat-1"}
2019/08/05 12:23:27 [DEBUG] Attempting to open CLI config file: /Users/dpk/.terraformrc
2019/08/05 12:23:27 [DEBUG] File doesn't exist, but doesn't need to. Ignoring.
2019/08/05 12:23:27 [INFO] CLI command args: []string{"import", "google_compute_router_nat.nat-1", "nat-1"}
2019/08/05 12:23:27 [DEBUG] New state was assigned lineage "7cc156fb-a7dd-448a-5742-6fe585fa0f16"
2019/08/05 12:23:27 [TRACE] Meta.Backend: using default local state only (no backend configuration, and no existing initialized backend)
2019/08/05 12:23:27 [TRACE] Meta.Backend: instantiated backend of type <nil>
2019/08/05 12:23:27 [DEBUG] checking for provider in "."