#gcp (2023-10)

Google Cloud Platform

2023-10-21

kallan.gerard avatar
kallan.gerard

Has anyone used GCP Certificate Manager Managed Certificates with Cloud CDN successfully? I suspect they’re only compatible with Media CDN.

2023-10-30

Dhamodharan avatar
Dhamodharan

hi All, I am trying to create GCP service account using terraform, i could create it, but i wanted to download the private_key JSON file aswell, i tried to create it using output resource in terraform, but it seems like the format is different, It is not like the same as the one which we creating in the web console. Can someone help me the procedure to get the key in JSON format same as its creating in manual way..

jonjitsu avatar
jonjitsu
resource "google_service_account" "reader" {
  account_id   = "tif-reader-${random_id.id.hex}"
  display_name = "TestInfra service account"
}

resource "google_service_account_key" "reader_key" {
  service_account_id = google_service_account.reader.name
  public_key_type    = "TYPE_X509_PEM_FILE"
}

resource "local_sensitive_file" "service_account_key" {
  content  = base64decode(google_service_account_key.reader_key.private_key)
  filename = "${path.module}/service-account-key-${random_id.id.hex}.json"
}
Dhamodharan avatar
Dhamodharan

hi @jonjitsu thanks a lot for the code, its perfectly working for my use case.

1
    keyboard_arrow_up