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

Provider Returns Invalid Result Object After Apply for crusoe_instance_template #22

Open
purvish14 opened this issue Jun 6, 2024 · 1 comment

Comments

@purvish14
Copy link

Description

When creating a crusoe_instance_template resource using the Crusoe Cloud Terraform provider (version 0.5.18), Terraform encounters an error indicating that the provider returned an invalid result object after the apply operation. Specifically, the reservation_id field remains unknown, causing Terraform to report a bug in the provider.

Terraform Configuration

terraform {
  required_providers {
    crusoe = {
      source = "registry.terraform.io/crusoecloud/crusoe"
      version = "0.5.18"
    }
  }
}

resource "crusoe_instance_template" "my_template" {
  name = "my-new-template"
  type = "c1a.2x"
  location = var.location
  subnet = var.subnet_id
  image = "ubuntu22.04-nvidia-pcie-docker:latest"
  disks = [
      {
        size = "10GiB"
        type = "persistent-ssd"
      }
    ]
  ssh_key = var.ssh_pub_key
}

Error Message

crusoe_instance_template.my_template: Creating...
╷
│ Error: Provider returned invalid result object after apply
│ 
│ After the apply operation, the provider still indicated an unknown value for crusoe_instance_template.my_template.reservation_id. All values must be known after apply, so this
│ is always a bug in the provider and should be reported in the provider's own repository. Terraform will still save the other known object values in the state.
╵

Steps to Reproduce

  1. Define the crusoe_instance_template resource as shown in the Terraform configuration above.
  2. Run terraform apply.

Expected Behavior

The crusoe_instance_template resource should be created successfully, with all its attributes, including reservation_id, known after the apply operation.

Actual Behavior

The reservation_id attribute remains unknown after the apply operation, causing Terraform to report an error indicating a bug in the provider.

Environment

Terraform version: 1.8.4
Crusoe provider version: 0.5.18

Please investigate this issue and provide a fix or guidance on how to proceed. Thank you.

@iExalt
Copy link
Collaborator

iExalt commented Oct 28, 2024

Thanks for reporting this issue! v0.5.22 of the provider should have a fix for the unknown reservation_id.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants