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

'ovh_vrack' creation : 'default-payment-mean' does not work for 'payment_mean' #376

Closed
guillaumedossantos opened this issue Feb 9, 2023 · 2 comments · Fixed by #390
Closed

Comments

@guillaumedossantos
Copy link

guillaumedossantos commented Feb 9, 2023

Hello

Terraform Version

Terraform v1.3.7
on darwin_amd64

Affected Resource(s)

Please list the resources as a list, for example:

  • ovh_vrack

Terraform Configuration Files

  ovh_subsidiary = "fr"
  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           = "${var.vrack_name}"
  payment_mean   = "${var.payment_mean}"
  description    = "${var.description}"

  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
  }
}
// Public cloud vrack name
variable vrack_name {
  type        = string
  default     = "vrack-terraform-test"
}

// Payment mean
variable payment_mean {
  type        = string
  default     = "default-payment-mean"
}

// vRack description
variable description {
  type        = string
  default     = "test vrack creation via terraform"
}

Debug Output

https://gist.github.com/guillaumedossantos/8aeb96028105e8b2ad3c20a6290ce0a3

Panic Output

https://gist.github.com/guillaumedossantos/ef763745ee6c499d966cfca0130fe37f

Expected Behavior

Vrack creation

Actual Behavior

TF crashes

Steps to Reproduce

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

  1. terraform apply

Important Factoids

My account has a 'Default payment method' = Yes of 'Payment type' : "SEPA Direct Debit"

Seems like OVH customers cannot create vRacks with Terraform with the current bug.
Thanks!

@guillaumedossantos
Copy link
Author

We were wondering if it could come from this : #229

But actually we meet the 2 conditions introduced in the fix for the linked issue :

You should have at least 3 public cloud projects currently (note that there is a 3 project limit by default, which can be raised by a support ticket)
You should have created a public cloud project during the last 3 months.

  • we have 6 public cloud projects (with actual resources in them)
  • the last one has been created start of December so it's been during the last 3 months

@yomovh
Copy link
Contributor

yomovh commented Feb 16, 2023

Thanks for your issue. You spotted a bug with the default-payment-mean related to an update in the API endpoints that have not been updated in the terraform provider.

In the mean time, I advice you to create manually the vrack (you can then create up to 4000 VLANs inside.
You can re use the vrack id as a variable to link it to your cloud project for instance using https://registry.terraform.io/providers/ovh/ovh/latest/docs/resources/vrack_cloudproject

@yomovh yomovh linked a pull request Feb 28, 2023 that will close this issue
2 tasks
@yomovh yomovh added Status: Coming Soon The feature will hit GA usually in less than 2 months and removed Status: Backlog The issue is understood labels Mar 2, 2023
@yomovh yomovh added Status: Released and removed Status: Coming Soon The feature will hit GA usually in less than 2 months labels Mar 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants