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

[Bug]: Missing resources cause provider to fail #121

Open
dmikalova opened this issue Jun 26, 2023 · 0 comments
Open

[Bug]: Missing resources cause provider to fail #121

dmikalova opened this issue Jun 26, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@dmikalova
Copy link

What happened?

After manually removing a resource from codefresh, a subsequent terraform run errors out bc the API respond that the resource no longer exists. The TF provider should instead handle this to mean that the resource no longer exists and then tries to recreate it.

TF error:

╷
│ Error: 500 Internal Server Error, {"status":500,"code":"1001","name":"INTERNAL_SERVER_ERROR","message":"Internal server error","context":{}}
│ 
│   with codefresh_registry.aws_ecr_prod_usw2,
│   on ecr.tf line 1, in resource "codefresh_registry" "aws_ecr_prod_usw2":
│    1: resource "codefresh_registry" "aws_ecr_prod_usw2" {
│ 
╵
[01H2TSVYBV0A9ZAWNQD8Q5TSHR] Unexpected exit code when planning changes: 1

Version

codefresh-io/codefresh v0.4.1

Relevant Terraform Configuration

# Apply this, delete the registry manually in codefresh, and then try to apply again
resource "codefresh_registry" "aws_ecr_prod_usw2" {
  default = true
  name    = "aws-ecr-prod-usw2"
  primary = true

  spec {
    ecr {
      access_key_id     = var.ecr_aws_access_key_id_prod_usw2
      region            = "us-west-2"
      secret_access_key = var.ecr_aws_secret_access_key_prod_usw2
    }
  }
}
@dmikalova dmikalova added the bug Something isn't working label Jun 26, 2023
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

1 participant