Skip to content

Instantly share code, notes, and snippets.

@x-yuri
x-yuri / Cloud SQL and private IPs (Incorrect Service Networking config for instance: PROJECT_ID:test-sql:SERVICE_NETWORKING_NOT_ENABLED).md
Created April 19, 2024 11:38
Cloud SQL and private IPs (Incorrect Service Networking config for instance: PROJECT_ID:test-sql:SERVICE_NETWORKING_NOT_ENABLED)

Cloud SQL and private IPs (Incorrect Service Networking config for instance: PROJECT_ID:test-sql:SERVICE_NETWORKING_NOT_ENABLED)

main.tf:

provider "google" {
  project = "PROJECT_ID"
}
@x-yuri
x-yuri / google_sql_user and type = "CLOUD_IAM_SERVICE_ACCOUNT".md
Last active April 19, 2024 09:36
google_sql_user and type = "CLOUD_IAM_SERVICE_ACCOUNT"

google_sql_user and type = "CLOUD_IAM_SERVICE_ACCOUNT"

main.tf:

provider "google" {
  project = "PROJECT_ID"
}

resource "google_sql_database_instance" "test-sql" {
@x-yuri
x-yuri / GKE and Cloud SQL.md
Last active April 18, 2024 03:32
GKE and Cloud SQL

GKE and Cloud SQL

main.tf:

provider "google" {
  project = "PROJECT_ID"
}

data "google_project" "project" {}
@x-yuri
x-yuri / .md
Last active April 14, 2024 12:50
GCP: replacing the main network interface with a bridge

GCP: replacing the main network interface with a bridge

The terraform file and the first commands can be found here.

# ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
@x-yuri
x-yuri / GKE: endpoint publicity.md
Last active March 31, 2024 20:58
GKE: endpoint publicity
@x-yuri
x-yuri / terraform creates VMs without an account.md
Last active April 1, 2024 13:35
terraform creates VMs without an account

terraform creates VMs without an account

main.tf:

provider "google" {
  project = "PROJECT_ID"
}

resource "google_compute_instance" "test-ce" {
@x-yuri
x-yuri / GCE: OS Login access permissions.md
Last active March 29, 2024 14:35
GCE: OS Login access permissions

GCE: OS Login access permissions

main.tf:

provider "google" {
  project = "PROJECT_ID"
}

data "google_project" "project" {}
@x-yuri
x-yuri / GCE: metadata-managed access permissions.md
Last active March 29, 2024 14:35
GCE: metadata-managed access permissions

GCE: metadata-managed access permissions

main.tf:

provider "google" {
  project = "PROJECT_ID"
}

data "google_project" "project" {}
@x-yuri
x-yuri / GCE: make `gcloud compute ssh` use instance metadata.md
Last active March 28, 2024 01:22
GCE: make `gcloud compute ssh` use instance metadata

GCE: make gcloud compute ssh use instance metadata

main.tf:

provider "google" {
  project = "PROJECT_ID"
}

resource "google_compute_instance" "test-ce" {
@x-yuri
x-yuri / GCE: IAP.md
Last active March 29, 2024 14:41
GCE: IAP

GCE: IAP

main.tf:

provider "google" {
  project = "PROJECT_ID"
}

resource "google_compute_instance" "test-ce" {