Skip to content

Commit 7144001

Browse files
authored
Merge pull request #651 from snigle/doc/cloudHDS
fix doc cloud hds #650
2 parents 8bbc864 + f3df766 commit 7144001

File tree

1 file changed

+54
-45
lines changed

1 file changed

+54
-45
lines changed

website/docs/r/cloud_project.html.markdown

+54-45
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
subcategory : "Account Management"
2+
subcategory: "Account Management"
33
---
44

55
# ovh_cloud_project
@@ -8,9 +8,9 @@ Orders a public cloud project.
88

99
## Important
1010

11-
-> __NOTE__ To order a product through Terraform, your account needs to have a default payment method defined. This can be done in the [OVHcloud Control Panel](https://www.ovh.com/manager/#/dedicated/billing/payment/method) or via API with the [/me/payment/method](https://api.ovh.com/console/#/me/payment/method~GET) endpoint.
11+
-> **NOTE** To order a product through Terraform, your account needs to have a default payment method defined. This can be done in the [OVHcloud Control Panel](https://www.ovh.com/manager/#/dedicated/billing/payment/method) or via API with the [/me/payment/method](https://api.ovh.com/console/#/me/payment/method~GET) endpoint.
1212

13-
~> __WARNING__ `BANK_ACCOUNT` is not supported anymore, please update your default payment method to `SEPA_DIRECT_DEBIT`
13+
~> **WARNING** `BANK_ACCOUNT` is not supported anymore, please update your default payment method to `SEPA_DIRECT_DEBIT`
1414

1515
## Example Usage
1616

@@ -26,9 +26,7 @@ data "ovh_order_cart_product_plan" "cloud" {
2626
price_capacity = "renew"
2727
product = "cloud"
2828
plan_code = "project.2018"
29-
hds_plan_code = "certification.hds.2018"
3029
# plan_code = "project" # when running in the US
31-
# hds_plan_code = "certification.hds" # when running in the US
3230
3331
}
3432
@@ -44,15 +42,26 @@ resource "ovh_cloud_project" "my_cloud_project" {
4442
}
4543
```
4644

47-
-> __WARNING__ Currently, the OVHcloud Terraform provider does not support deletion of a public cloud project in the US. Removal is possible by manually deleting the project and then manually removing the public cloud project from terraform state.
45+
-> **WARNING** Currently, the OVHcloud Terraform provider does not support deletion of a public cloud project in the US. Removal is possible by manually deleting the project and then manually removing the public cloud project from terraform state.
4846

4947
## HDS Certification
5048

51-
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 this configuration on the `ovh_cloud_project`.
49+
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`.
5250

5351
```hcl
52+
53+
data "ovh_order_cart_product_options_plan" "hds" {
54+
cart_id = data.ovh_order_cart.mycart.id
55+
price_capacity = "renew"
56+
product = "cloud"
57+
plan_code = "project.2018"
58+
options_plan_code = "certification.hds.2018"
59+
# plan_code = "project" # when running in the US
60+
# options_plan_code = "certification.hds" # when running in the US
61+
}
62+
5463
resource "ovh_cloud_project" "my_cloud_project" {
55-
64+
5665
ovh_subsidiary = data.ovh_order_cart.mycart.ovh_subsidiary
5766
description = "my cloud project"
5867
@@ -63,9 +72,9 @@ resource "ovh_cloud_project" "my_cloud_project" {
6372
}
6473
6574
plan_option {
66-
duration = data.ovh_order_cart_product_plan.cloud.selected_price.0.duration
67-
plan_code = data.ovh_order_cart_product_plan.cloud.hds_plan_code
68-
pricing_mode = data.ovh_order_cart_product_plan.cloud.selected_price.0.pricing_mode
75+
duration = data.ovh_order_cart_product_options_plan.hds.selected_price.0.duration
76+
plan_code = data.ovh_order_cart_product_options_plan.hds.options_plan_code
77+
pricing_mode = data.ovh_order_cart_product_options_plan.hds.selected_price.0.pricing_mode
6978
}
7079
7180
}
@@ -76,48 +85,48 @@ resource "ovh_cloud_project" "my_cloud_project" {
7685

7786
The following arguments are supported:
7887

79-
* `urn` - The URN of the cloud project
80-
* `description` - A description associated with the user.
81-
* `ovh_subsidiary` - (Required) OVHcloud Subsidiary. Country of OVHcloud legal entity you'll be billed by. List of supported subsidiaries available on API at [/1.0/me.json under `models.nichandle.OvhSubsidiaryEnum`](https://eu.api.ovh.com/1.0/me.json)
82-
* `plan` - (Required) Product Plan to order
83-
* `duration` - (Required) duration
84-
* `plan_code` - (Required) Plan code. This value must be adapted depending on your `OVH_ENDPOINT` value. It's `project.2018` for `ovh-{eu,ca}` and `project` when using `ovh-us`.
85-
* `pricing_mode` - (Required) Pricing model identifier
86-
* `catalog_name` - Catalog name
87-
* `configuration` - (Optional) Representation of a configuration item for personalizing product
88-
* `label` - (Required) Identifier of the resource
89-
* `value` - (Required) Path to the resource in API.OVH.COM
90-
* `plan_option` - (Optional) Product Plan to order
91-
* `duration` - (Required) duration
92-
* `plan_code` - (Required) Plan code
93-
* `pricing_mode` - (Required) Pricing model identifier
94-
* `catalog_name` - Catalog name
95-
* `configuration` - (Optional) Representation of a configuration item for personalizing product
96-
* `label` - (Required) Identifier of the resource
97-
* `value` - (Required) Path to the resource in API.OVH.COM
88+
- `urn` - The URN of the cloud project
89+
- `description` - A description associated with the user.
90+
- `ovh_subsidiary` - (Required) OVHcloud Subsidiary. Country of OVHcloud legal entity you'll be billed by. List of supported subsidiaries available on API at [/1.0/me.json under `models.nichandle.OvhSubsidiaryEnum`](https://eu.api.ovh.com/1.0/me.json)
91+
- `plan` - (Required) Product Plan to order
92+
- `duration` - (Required) duration
93+
- `plan_code` - (Required) Plan code. This value must be adapted depending on your `OVH_ENDPOINT` value. It's `project.2018` for `ovh-{eu,ca}` and `project` when using `ovh-us`.
94+
- `pricing_mode` - (Required) Pricing model identifier
95+
- `catalog_name` - Catalog name
96+
- `configuration` - (Optional) Representation of a configuration item for personalizing product
97+
- `label` - (Required) Identifier of the resource
98+
- `value` - (Required) Path to the resource in API.OVH.COM
99+
- `plan_option` - (Optional) Product Plan to order
100+
- `duration` - (Required) duration
101+
- `plan_code` - (Required) Plan code
102+
- `pricing_mode` - (Required) Pricing model identifier
103+
- `catalog_name` - Catalog name
104+
- `configuration` - (Optional) Representation of a configuration item for personalizing product
105+
- `label` - (Required) Identifier of the resource
106+
- `value` - (Required) Path to the resource in API.OVH.COM
98107

99108
## Attributes Reference
100109

101110
`id` is set to the order Id. In addition, the following attributes are exported:
102111

103-
* `access` - project access right for the identity that trigger the terraform script.
104-
* `description` - Project description
105-
* `order` - Details about the order that was used to create the public cloud project
106-
* `date` - date
107-
* `order_id` - order id, the same as the `id`
108-
* `expiration_date` - expiration date
109-
* `details` - Information about a Bill entry
110-
* `description` - description
111-
* `order_detail_id` - order detail id
112-
* `domain` - expiration date
113-
* `quantity` - quantity
114-
* `project_name` - openstack project name
115-
* `project_id` - openstack project id
116-
* `status` - project status
112+
- `access` - project access right for the identity that trigger the terraform script.
113+
- `description` - Project description
114+
- `order` - Details about the order that was used to create the public cloud project
115+
- `date` - date
116+
- `order_id` - order id, the same as the `id`
117+
- `expiration_date` - expiration date
118+
- `details` - Information about a Bill entry
119+
- `description` - description
120+
- `order_detail_id` - order detail id
121+
- `domain` - expiration date
122+
- `quantity` - quantity
123+
- `project_name` - openstack project name
124+
- `project_id` - openstack project id
125+
- `status` - project status
117126

118127
## Import
119128

120-
Cloud project can be imported using the `order_id` that can be retrieved in the [order page](https://www.ovh.com/manager/#/dedicated/billing/orders/orders) at the creation time of the Public Cloud project.
129+
Cloud project can be imported using the `order_id` that can be retrieved in the [order page](https://www.ovh.com/manager/#/dedicated/billing/orders/orders) at the creation time of the Public Cloud project.
121130

122131
```bash
123132
$ terraform import ovh_cloud_project.my_cloud_project order_id

0 commit comments

Comments
 (0)