terraform-provider-ovh: Creating "ovh_cloud_project" using v0.16.0 fails
Hello,
while trying to create a new Terraform module to manage an ovh_cloud_project
resource, we ran into an issue:
Terraform Version
Terraform v1.0.5 on darwin_amd64
- provider registry.terraform.io/hashicorp/helm v2.3.0
- provider registry.terraform.io/hashicorp/kubernetes v2.6.1
- provider registry.terraform.io/hashicorp/local v2.1.0
- provider registry.terraform.io/ovh/ovh v0.16.0
- provider registry.terraform.io/terraform-provider-openstack/openstack v1.44.0
Affected Resource(s)
- ovh_cloud_project
Terraform Configuration Files
data "ovh_order_cart" "cart" {
ovh_subsidiary = "fr"
description = "Use the French OVH cart by default"
}
data "ovh_order_cart_product_plan" "cloud" {
cart_id = data.ovh_order_cart.cart.id
price_capacity = "renew"
product = "cloud"
plan_code = "project.2018"
}
resource "ovh_cloud_project" "cloud" {
ovh_subsidiary = data.ovh_order_cart.cart.ovh_subsidiary
description = var.project_description
payment_mean = "fidelity"
plan {
duration = data.ovh_order_cart_product_plan.cloud.selected_price.0.duration
plan_code = data.ovh_order_cart_product_plan.cloud.plan_code
pricing_mode = data.ovh_order_cart_product_plan.cloud.selected_price.0.pricing_mode
}
}
Debug Output
module.ovh_cloud.ovh_cloud_project.cloud: Creating...
│ Error: Could not order cloud project: "calling Post /order/cart/cf35f36c-xxxx-xxxx-xxxx-1cc4885e14fd/checkout:\n\t \"Error 400: \\\"Found eligibility issues: challengePaymentMethod\\\"\""
│
│ with module.ovh_cloud.ovh_cloud_project.cloud,
│ on main.tf line 1, in resource "ovh_cloud_project" "cloud":
│ 1: resource "ovh_cloud_project" "cloud" {
Expected Behavior
A new cloud project should be created.
Actual Behavior
Terraform does not create a new cloud project and aborts with the above error message.
Steps to Reproduce
Please list the steps required to reproduce the issue, for example:
terraform apply
Important Factoids
The above code is very similar to the documentation for the resource ovh_cloud_project and yet the above error is returned. We have added a valid payment method and manually creating a cloud project works. We can also use the manually created cloud project’s ID in other Terraform code without issue.
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Reactions: 3
- Comments: 16
Hi @loeken and thanks for the heads up. I am not responsible for that par t but will make sure my colleagues clear this asap
Thanks for you input. We could identify the bug and this behaviour will be corrected soon.
We had a look and it seems this behaviour is triggered by a protection system : If your paiement mean has not been used by humans for a long period, we need you to perform a manuel action in the manager - like ordering one project manually. This is to prevent customer which account would be hijacked and prevent any bad surprise.
After this manual one you should be able to order project via API again for a long period of time. But the fact that 4 of you raise the issue make me wonder if we do not have false positive/ a bug raising this special behaviour with no reason.
@cambierr @loeken @elthariel @dbourcet would you mind DMing me the OVHcloud account (nichandle in the form xxx-ovh ) on Twitter : https://twitter.com/crazyman so that we have a look. If you are not confortable with this, you can also open a OVHcloud support ticket and explicitely ask support to escalate this to me (Maxime Hurtrel), including a link to this discussion.
I confirm this should ne be considered as not a feature request (I confirm that the feature is working for most users) but a bug report.