Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

INTERNAL_SERVER_ERROR codefresh_registry using GCR or GAR #81

Open
brunotorrente opened this issue May 1, 2022 · 0 comments
Open

INTERNAL_SERVER_ERROR codefresh_registry using GCR or GAR #81

brunotorrente opened this issue May 1, 2022 · 0 comments
Labels
bug Something isn't working

Comments

@brunotorrente
Copy link

brunotorrente commented May 1, 2022

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
          }
      }
  }

`

@korenyoni korenyoni added the bug Something isn't working label Sep 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants