Skip to content

Instantly share code, notes, and snippets.

View JasperWoo's full-sized avatar

Jasper Wu JasperWoo

View GitHub Profile
@JasperWoo
JasperWoo / gist:c945a6856e0148e0744c4bd826fa3ca9
Created August 8, 2019 22:17
Commands showing terraform import beta resource failing with id not found, while gcloud finds the resource
Debug output:
`TF_LOG=TRACE terraform import -provider=google-beta google_compute_health_check.default packer-service-health-check`
google_compute_health_check.default: Importing from ID "packer-service-health-check"...
google_compute_health_check.default: Import prepared!
Prepared google_compute_health_check for import
google_compute_health_check.default: Refreshing state... [id=packer-service-health-check]
Error: Cannot import non-existent remote object
@JasperWoo
JasperWoo / gist:9fa485c111910ba2efa8bc4ebff59c63
Created June 27, 2019 18:45
Logs from `PACKER_LOG=1 packer build template.json`
2019/06/25 21:16:08 packer: 2019/06/25 21:16:08 [INFO] Instantiating GCE client...
==> googlecompute: Using existing SSH private key
==> googlecompute: Error getting source image for instance creation: Get https://www.googleapis.com/compute/v1/projects/centos-cloud/global/images/family/centos-7?alt=json&prettyPrint=false: oauth2: cannot fetch token: Post https://accounts.google.com/o/oauth2/token: dial tcp: lookup accounts.google.com on 169.254.169.254:53: no such host
2019/06/25 21:16:08 ui error: ==> googlecompute: Error getting source image for instance creation: Get https://www.googleapis.com/compute/v1/projects/centos-cloud/global/images/family/centos-7?alt=json&prettyPrint=false: oauth2: cannot fetch token: Post https://accounts.google.com/o/oauth2/token: dial tcp: lookup accounts.google.com on 169.254.169.254:53: no such host
Build 'googlecompute' errored: Error getting source image for instance creation: Get https://www.googleapis.com/compute/v1/projects/centos-cloud/global/images/family/centos-7?alt=
@JasperWoo
JasperWoo / gist:254fe6173f911f1705df74b4766668e1
Created June 27, 2019 18:45
Logs from `PACKER_LOG=1 packer build template.json`
2019/06/25 21:16:08 packer: 2019/06/25 21:16:08 [INFO] Instantiating GCE client...
==> googlecompute: Using existing SSH private key
==> googlecompute: Error getting source image for instance creation: Get https://www.googleapis.com/compute/v1/projects/centos-cloud/global/images/family/centos-7?alt=json&prettyPrint=false: oauth2: cannot fetch token: Post https://accounts.google.com/o/oauth2/token: dial tcp: lookup accounts.google.com on 169.254.169.254:53: no such host
2019/06/25 21:16:08 ui error: ==> googlecompute: Error getting source image for instance creation: Get https://www.googleapis.com/compute/v1/projects/centos-cloud/global/images/family/centos-7?alt=json&prettyPrint=false: oauth2: cannot fetch token: Post https://accounts.google.com/o/oauth2/token: dial tcp: lookup accounts.google.com on 169.254.169.254:53: no such host
Build 'googlecompute' errored: Error getting source image for instance creation: Get https://www.googleapis.com/compute/v1/projects/centos-cloud/global/images/family/centos-7?alt=
1. 10.128.7.231 is internal IP address as we disabled external IP address.
```
$ ssh -vvvv -i .creds/gcp-instance-key [email protected]
OpenSSH_7.9p1, LibreSSL 2.7.3
debug1: Reading configuration data /Users/peijun.wu/.ssh/config
debug1: /Users/peijun.wu/.ssh/config line 1: Applying options for *
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 48: Applying options for *
debug2: resolve_canonicalize: hostname 10.128.7.231 is address
debug2: ssh_connect_direct
@JasperWoo
JasperWoo / docker-help.md
Created August 18, 2018 13:30 — forked from bradtraversy/docker-help.md
Docker Commands, Help & Tips

Docker Commands, Help & Tips

Show commands & management commands

$ docker

Docker version info

@JasperWoo
JasperWoo / installing_cassandra.md
Created March 6, 2018 20:52 — forked from hkhamm/installing_cassandra.md
Installing Cassandra on Mac OS X

Installing Cassandra on Mac OS X

Install Homebrew

Homebrew is a great little package manager for OS X. If you haven't already, installing it is pretty easy:

ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"
@JasperWoo
JasperWoo / installing_cassandra.md
Created March 6, 2018 20:52 — forked from hkhamm/installing_cassandra.md
Installing Cassandra on Mac OS X

Installing Cassandra on Mac OS X

Install Homebrew

Homebrew is a great little package manager for OS X. If you haven't already, installing it is pretty easy:

ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"