Skip to content

Commit 6fa8075

Browse files
authoredNov 13, 2024
Merge pull request #771 from ovh/dev/aamstutz/cloud-with-vrack-example
doc: Add an example of cloud project creation with a pre-existing vrack
2 parents 5bbcd92 + 9986b62 commit 6fa8075

File tree

1 file changed

+21
-3
lines changed

1 file changed

+21
-3
lines changed
 

‎website/docs/r/cloud_project.html.markdown

+21-3
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@ resource "ovh_cloud_project" "my_cloud_project" {
4848
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`.
4949

5050
```hcl
51-
5251
data "ovh_order_cart_product_options_plan" "hds" {
5352
cart_id = data.ovh_order_cart.mycart.id
5453
price_capacity = "renew"
@@ -60,7 +59,6 @@ data "ovh_order_cart_product_options_plan" "hds" {
6059
}
6160
6261
resource "ovh_cloud_project" "my_cloud_project" {
63-
6462
ovh_subsidiary = data.ovh_order_cart.mycart.ovh_subsidiary
6563
description = "my cloud project"
6664
@@ -75,9 +73,29 @@ resource "ovh_cloud_project" "my_cloud_project" {
7573
plan_code = data.ovh_order_cart_product_options_plan.hds.options_plan_code
7674
pricing_mode = data.ovh_order_cart_product_options_plan.hds.selected_price.0.pricing_mode
7775
}
78-
7976
}
77+
```
78+
79+
## Associate an existing vRack to a new cloud project
80+
81+
You may want to associate an already-existing vRack to the cloud project at creation time.
82+
To do so, you can use the following plan configuration:
83+
84+
```hcl
85+
resource "ovh_cloud_project" "my_cloud_project" {
86+
ovh_subsidiary = data.ovh_order_cart.mycart.ovh_subsidiary
87+
description = "cloud project with pre-existing vrack"
8088
89+
plan {
90+
duration = data.ovh_order_cart_product_plan.cloud.selected_price.0.duration
91+
plan_code = data.ovh_order_cart_product_plan.cloud.plan_code
92+
pricing_mode = data.ovh_order_cart_product_plan.cloud.selected_price.0.pricing_mode
93+
configuration {
94+
label = "vrack"
95+
value = "pn-*******"
96+
}
97+
}
98+
}
8199
```
82100

83101
## Argument Reference

0 commit comments

Comments
 (0)
Please sign in to comment.