All Questions
Tagged with terraform google-cloud-platform
41
questions
0
votes
0
answers
26
views
Setting Up Proper Routing for SQL Instance in Different GCP VPCs without Public Exposure or Gateway VM
I'm facing a networking challenge with Google Cloud VPCs and peering, and I'm hoping to get some guidance on how to resolve it. Here's my setup:
I have two VPCs in Google Cloud:
VPC "bastion"...
0
votes
0
answers
453
views
SSH Keys not propagating correctly from instance metadata to authorized_keys: missing keys, user discrepancy, and duplicate key
I want to add eight public keys via instance metadata to avoid adding them manually (i.e.: ssh to VMs, pasting the keys to .ssh/authorized_keys, etc.).
I added the keys in Terraform (four distinct ...
0
votes
1
answer
999
views
How to correctly pass firewall rules to the google-terraform-network module?
I want to create a network using the google-terraform-network module. Additionally, I want to pass the firewall rules I made as a parameter to the module so that the created network contains these two ...
0
votes
1
answer
575
views
Can't set up the GCP's external load balancer to work correctly with Terraform
Using Terraform, I want to build an infrastructure that consists of an external load balancer (LB) and a MIG with 3 VMs. Each VM within the MIG should run a server that listens on 80. Furthermore, I ...
0
votes
1
answer
2k
views
What permissions to set in service account for project creation?
When I configure google cloud cli with my credentials, it is able to create a new project and create resources inside it.
But, for automation purpose in a pipeline, not able to use with my credentials ...
0
votes
1
answer
916
views
Unable to connect GCP SQL Instance from GKE cluster
I have created a vpc-native cluster and I am trying to connect from a pod inside the cluster to a postgres SQL instance with a private IP.
I am testing using a basic telnet 5432 command.
The ...
0
votes
1
answer
586
views
Separating DNS records into multiple zones for the same domain
I thought it would be a good idea to setup MX records in one zone, while using another zone managed by Terraform (using GCP) to deal with A records and CNAMES for the web server I'm setting up. Both ...
1
vote
1
answer
1k
views
Create ingress firewall rule for GKE API
For testing purposes I want to make the GKE API endpoint publicly available.
However, I can't seem to be able to create a firewall rule to allow this.
I receive the error "source_ranges": ...
0
votes
2
answers
10k
views
terraform apply error alreadyExists on untouched resources
I am starting a new terraform project, following the official guide:
https://learn.hashicorp.com/tutorials/terraform/gke?in=terraform/kubernetes&utm_source=WEBSITE&utm_medium=WEB_IO&...
0
votes
0
answers
413
views
Values from `.tfvars` not getting loaded
I am new to terraform and building my first terraform script to launch instances in GCP. Values from terraform.tfvars are not being loaded and only default values from variables.tf are being loaded. ...
2
votes
1
answer
2k
views
Terraform on gcloud: serviceaccounts is forbidden: User "system:anonymous" cannot create resource "serviceaccounts"
I am trying to write terraform code for bootstrapping a GKE cluster (with RBAC) on Google Cloud.
The GKE cluster successfully created, but I want to create a service account as wel which I can reuse ...
0
votes
0
answers
489
views
Cannot connect to a Postgres SQL instance from inside a pod within a GKE
I am new to Terraform and Google Cloud.
I am trying to create a K8 cluster where pods inside the cluster could communicate with a Postgres server I have within the same VPC.
However, when I try to ...
3
votes
2
answers
4k
views
Google Cloud Compute Engine persistent disk snapshot schedule not working
i created a VM with terraform on GCP and also a persistent disk separately with the google_compute_disk , google_compute_resource_policy, google_compute_disk_resource_policy_attachment resources to ...
2
votes
1
answer
3k
views
Set PubSub Subscription Expiration to Never Expire via Terraform
When creating a PubSub subscription manually you have the option of setting the expiration as "Never expire". Example:
I am attempting to manage my cloud infrastructure through Terraform. ...
0
votes
2
answers
7k
views
use metadata_startup_script in google cloud template in terraform
when I want to use metadata_startup_script in template if I use commands in one line it works fine but in pass one line or even if I want to use some html it does not work fine and I face error (...