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

doc: Add an example of cloud project creation with a pre-existing vrack #771

Merged
merged 1 commit into from
Nov 13, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 21 additions & 3 deletions website/docs/r/cloud_project.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ resource "ovh_cloud_project" "my_cloud_project" {
If you want to add the certification HDS option at project creation (you must have a business support level on your account), you can add hds datasource and the plan_option configuration on the `ovh_cloud_project`.

```hcl

data "ovh_order_cart_product_options_plan" "hds" {
cart_id = data.ovh_order_cart.mycart.id
price_capacity = "renew"
Expand All @@ -60,7 +59,6 @@ data "ovh_order_cart_product_options_plan" "hds" {
}

resource "ovh_cloud_project" "my_cloud_project" {

ovh_subsidiary = data.ovh_order_cart.mycart.ovh_subsidiary
description = "my cloud project"

Expand All @@ -75,9 +73,29 @@ resource "ovh_cloud_project" "my_cloud_project" {
plan_code = data.ovh_order_cart_product_options_plan.hds.options_plan_code
pricing_mode = data.ovh_order_cart_product_options_plan.hds.selected_price.0.pricing_mode
}

}
```

## Associate an existing vRack to a new cloud project

You may want to associate an already-existing vRack to the cloud project at creation time.
To do so, you can use the following plan configuration:

```hcl
resource "ovh_cloud_project" "my_cloud_project" {
ovh_subsidiary = data.ovh_order_cart.mycart.ovh_subsidiary
description = "cloud project with pre-existing vrack"

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
configuration {
label = "vrack"
value = "pn-*******"
}
}
}
```

## Argument Reference
Expand Down