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

Error 400: \"invalid expire" when creating vrack #331

Closed
arhue opened this issue Oct 26, 2022 · 1 comment · Fixed by #363
Closed

Error 400: \"invalid expire" when creating vrack #331

arhue opened this issue Oct 26, 2022 · 1 comment · Fixed by #363
Labels

Comments

@arhue
Copy link

arhue commented Oct 26, 2022

Terraform Version

Terraform v1.3.1
on linux_amd64

  • provider registry.terraform.io/ovh/ovh v0.22.0

Affected Resource(s)

Please list the resources as a list, for example:

  • ovh_order_cart
  • ovh_order_cart_product_plan
  • ovh_vrack

Terraform Configuration Files

  required_providers {
    ovh = {
      source = "ovh/ovh"
    }
  }
}

provider "ovh" {
  endpoint           = "ovh-ca"
  application_key    = "zzz"
  application_secret = "xxx"
  consumer_key       = "yyy"
}

data "ovh_order_cart" "mycart" {
  ovh_subsidiary = "ca"
  description    = "my vrack order cart"
}

data "ovh_order_cart_product_plan" "vrack" {
  cart_id        = data.ovh_order_cart.mycart.id
  price_capacity = "renew"
  product        = "vrack"
  plan_code      = "vrack"
}

resource "ovh_vrack" "vrack" {
  ovh_subsidiary = data.ovh_order_cart.mycart.ovh_subsidiary
  name           = "my vrack"
  payment_mean   = "fidelity"
  description    = "my vrack"

  plan {
    duration     = data.ovh_order_cart_product_plan.vrack.selected_price.0.duration
    plan_code    = data.ovh_order_cart_product_plan.vrack.plan_code
    pricing_mode = data.ovh_order_cart_product_plan.vrack.selected_price.0.pricing_mode
  }
}

Debug Output

https://gist.github.com/arhue/ae453613cb4b54dfa89f2b38f37ef02d

Panic Output

If Terraform produced a panic, please provide a link to a GitHub Gist containing the output of the crash.log.

Expected Behavior

terraform plan/apply should have run and I should have got a vrack provisioned

Actual Behavior

What actually happened?

arhue@VARUN-THINKPAD:~/git/ansible-terraform/terraform/ovh$ terraform plan
data.ovh_order_cart.mycart: Reading...
╷
│ Error: calling Post /order/cart with params &{CA 0xc0006acf60 0xc0006acfa0}:
│        "Error 400: \"invalid expire\""
│
│   with data.ovh_order_cart.mycart,
│   on vrack.tf line 1, in data "ovh_order_cart" "mycart":
│    1: data "ovh_order_cart" "mycart" {

Get following output

Steps to Reproduce

Please list the steps required to reproduce the issue, for example:

  1. Use example from wiki to provision vrack: https://registry.terraform.io/providers/ovh/ovh/latest/docs/resources/vrack
  2. Run terraform plan
@yomovh
Copy link
Contributor

yomovh commented Jan 19, 2023

Thanks for your issue, I reproduced it by updating my TZ to one America one.

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

Successfully merging a pull request may close this issue.

2 participants