Open
Description
Attempts to use codefresh_registry to declare Google registries ( GCR or GAR ) return error
{"status":500,"code":"1001","name":"INTERNAL_SERVER_ERROR","message":"Internal server error","context":{}}
Using the same google service account key in the codefresh interface works normally.
IMPORT
Import works at first, but when detecting spec gar or gcr it tries to recreate the resource, and again INTERNAL_SERVER_ERROR error occurs.
Note, importing without declaring the spec is accepted, which I find strange because it should always ask for the registry type.
Simplified terraform code of what is being used for those who want to recreate the error.
`
MAIN
resource "google_service_account" "project_service_account" {
account_id = "sa-${var.project_id}"
display_name = "Project - Default Service Account"
project = google_project.main.project_id
}
resource "google_service_account_key" "project_service_account_key" {
service_account_id = google_service_account.project_service_account.name
}
#Export service account key for sensitive variable
locals {
project_service_account_key = base64decode(google_service_account_key.project_service_account_key.private_key)
}
MODULE
resource "codefresh_registry" "gar-registry" {
name = "test-registry"
default = "true"
spec {
gar {
# BackLog ERROR: INTERNAL_SERVER_ERROR
keyfile = var.project_service_account_key
#domain = "gcr.io"
location = "us-east1"
#repository_prefix = var.application_name
}
}
}
`