This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| virtualization:cloud:gcp [2021/05/27 20:44] – created jotasandoku | virtualization:cloud:gcp [2023/11/02 14:38] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 2: | Line 2: | ||
| \\ | \\ | ||
| + | * VPC peering | ||
| + | * Service Perimeter | ||
| + | * Cloud Router (~ vpc) | ||
| + | * Cloud Storage (~ S3) | ||
| * Compute Engine (~ ec2 ) | * Compute Engine (~ ec2 ) | ||
| * Cloud interconnect (~ direct connect ) | * Cloud interconnect (~ direct connect ) | ||
| - | * Cloud Router | + | * Persistent disk (Block storage service) |
| - | * Firebase Hosting (~ S3 ) | + | * Local SSD : (Ephemeral locally attached block storage) |
| + | * Firebase Hosting | ||
| + | |||
| + | Compute Engine:\\ | ||
| + | |||
| + | For ssh access, best thing is to enable ''' | ||
| + | * Best is to use linux from a ' | ||
| + | * IAM-Admin > Manage resources . Select your project, add member, role ' | ||
| + | * [[https:// | ||
| + | |||
| + | gcloud config set project < | ||
| + | gcloud compute os-login ssh-keys add --key=' | ||
| + | |||
| + | Shared VPC: | ||
| + | * We can have interconnects in different regions. GCP advertises prefixes via interconnects in different regions. So, if we lose all interconnects in one region, we, as a user can access gcp prefixes in that region via interconnects in other sides of the world. | ||
| + | |||
| + | |||
| + | ---- | ||
| + | |||
| + | |||
| + | TERRAFORM: | ||
| + | [[https:// | ||
| + | First install gcp sdk: | ||
| + | cd your-project | ||
| + | python3 -m venv env | ||
| + | source env/ | ||
| + | tar -xf google-cloud-sdk-352.0.0-linux-x86_64.tar.gz | ||
| + | ./ | ||
| + | deactivate | ||
| + | \\ | ||
| + | Now authenticate your project and it will generate a json file that will be used in the tf provider: | ||
| + | gcloud auth application-default login --project < | ||
| + | \\ | ||
| + | Now we define the provider.tf (+ terraform init, terraform plan) | ||
| + | provider " | ||
| + | credentials = "/ | ||
| + | project = " | ||
| + | region = " | ||
| + | } | ||
| + | |||
| + | |||