Skip to content

Commit 3e42604

Browse files
feat(cci): update cci pvc (#6751)
1 parent 2bf23a1 commit 3e42604

File tree

4 files changed

+293
-146
lines changed

4 files changed

+293
-146
lines changed
Lines changed: 123 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,123 @@
1+
---
2+
subcategory: "Cloud Container Instance (CCI)"
3+
layout: "huaweicloud"
4+
page_title: "HuaweiCloud: huaweicloud_cciv2_persistent_volume_claim"
5+
description: |-
6+
Manages a CCI persistent volume claim resource within HuaweiCloud.
7+
---
8+
9+
# huaweicloud_cciv2_persistent_volume_claim
10+
11+
Manages a CCI persistent volume claim resource within HuaweiCloud.
12+
13+
## Example Usage
14+
15+
```hcl
16+
resource "kubernetes_persistent_volume_claim" "my-pvc" {
17+
name = "my-pvc-obs"
18+
namespace = "default"
19+
20+
annotations = {
21+
"everest.io/obs-volume-type" = "STANDARD"
22+
"csi.storage.k8s.io/fstype" = "s3fs"
23+
"everest.io/enterprise-project-id" = "0"
24+
}
25+
26+
access_modes = ["ReadWriteMany"]
27+
resources {
28+
requests = {
29+
storage = "1Gi"
30+
}
31+
}
32+
storage_class_name = "csi-obs"
33+
34+
volume_mode = "Filesystem"
35+
}
36+
37+
```
38+
39+
## Argument Reference
40+
41+
The following arguments are supported:
42+
43+
* `region` - (Optional, String, ForceNew) Specifies the region in which to create the resource.
44+
If omitted, the provider-level region will be used.
45+
Changing this creates a new resource.
46+
47+
* `name` - (Required, String, NonUpdatable) The name of the persistent volume claim in the namespace.
48+
49+
* `namespace` - (Required, String, NonUpdatable) The name of the namespace.
50+
51+
* `annotations` - (Optional, Map, NonUpdatable) Specifies the annotations of the persistent volume claim.
52+
53+
* `labels` - (Optional, Map, NonUpdatable) Specifies the labels of the persistent volume claim.
54+
55+
* `access_modes` - (Optional, List, NonUpdatable) Specifies the access_modes of the persistent volume claim.
56+
57+
* `resources` - (Optional, List, NonUpdatable) Specifies the access_modes of the persistent volume claim.
58+
The [resources](#resources) structure is documented below.
59+
60+
* `selector` - (Optional, List) Specifies the selector of the persistent volume claim.
61+
The [selector](#selector) structure is documented below.
62+
63+
* `storage_class_name` - (Optional, String, NonUpdatable) Specifies the storage class name of the persistent volume claim.
64+
65+
* `volume_mode` - (Optional, String, NonUpdatable) Specifies the volume mode of the persistent volume claim.
66+
67+
* `valume_name` - (Optional, String, NonUpdatable) Specifies the valume name of the persistent volume claim.
68+
69+
<a name="resources"></a>
70+
The `resources` block supports:
71+
72+
* `limits` - (Optional, Map, NonUpdatable) Specifies the limits expressions of the resources.
73+
74+
* `requests` - (Optional, Map, NonUpdatable) Specifies the requests labels of the resources.
75+
76+
<a name="selector"></a>
77+
The `selector` block supports:
78+
79+
* `match_expressions` - (Optional, List) Specifies the match expressions of the selector.
80+
The [match_expressions](#match_expressions) structure is documented below.
81+
82+
* `match_labels` - (Optional, Map) Specifies the match labels of the selector.
83+
84+
<a name="match_expressions"></a>
85+
The `match_expressions` block supports:
86+
87+
* `key` - (Optional, String) Specifies the key of the match expressions.
88+
89+
* `operator` - (Optional, String) Specifies the operator of the match expressions.
90+
91+
* `values` - (Optional, List) Specifies the values of the match expressions.
92+
93+
## Attribute Reference
94+
95+
In addition to all arguments above, the following attributes are exported:
96+
97+
* `id` - The resource ID.
98+
99+
* `annotations` - The annotations of the persistent volume claim.
100+
101+
* `api_version` - The API version of the persistent volume claim.
102+
103+
* `creation_timestamp` - The creation timestamp of the persistent volume claim.
104+
105+
* `finalizers` - The finalizers of the persistent volume claim.
106+
107+
* `kind` - The kind of the persistent volume claim.
108+
109+
* `labels` - The labels of the persistent volume claim.
110+
111+
* `resource_version` - The resource version of the persistent volume claim.
112+
113+
* `status` - The status of the persistent volume claim.
114+
115+
* `uid` - The uid of the persistent volume claim.
116+
117+
## Import
118+
119+
The persistent volume claim can be imported using `namespace` and `name`, e.g.
120+
121+
```bash
122+
$ terraform import huaweicloud_cciv2_persistent_volume_claim.test <namespace/name>
123+
```

docs/incubating/cciv2_pvc.md

Lines changed: 0 additions & 69 deletions
This file was deleted.

huaweicloud/provider.go

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1634,19 +1634,20 @@ func Provider() *schema.Provider {
16341634
"huaweicloud_cts_data_tracker": cts.ResourceCTSDataTracker(),
16351635
"huaweicloud_cts_notification": cts.ResourceCTSNotification(),
16361636

1637-
"huaweicloud_cci_namespace": cci.ResourceCciNamespace(),
1638-
"huaweicloud_cci_network": cci.ResourceCciNetworkV1(),
1639-
"huaweicloud_cci_pvc": cci.ResourcePersistentVolumeClaimV1(),
1640-
"huaweicloud_cciv2_namespace": cci.ResourceNamespace(),
1641-
"huaweicloud_cciv2_network": cci.ResourceV2Network(),
1642-
"huaweicloud_cciv2_config_map": cci.ResourceV2ConfigMap(),
1643-
"huaweicloud_cciv2_secret": cci.ResourceV2Secret(),
1644-
"huaweicloud_cciv2_service": cci.ResourceV2Service(),
1645-
"huaweicloud_cciv2_deployment": cci.ResourceV2Deployment(),
1646-
"huaweicloud_cciv2_persistent_volume": cci.ResourceV2PersistentVolume(),
1647-
"huaweicloud_cciv2_image_snapshot": cci.ResourceV2ImageSnapshot(),
1648-
"huaweicloud_cciv2_pvc": cci.ResourceV2PersistentVolumeClaim(),
1649-
"huaweicloud_cciv2_pod": cci.ResourceV2Pod(),
1637+
"huaweicloud_cci_namespace": cci.ResourceCciNamespace(),
1638+
"huaweicloud_cci_network": cci.ResourceCciNetworkV1(),
1639+
"huaweicloud_cci_pvc": cci.ResourcePersistentVolumeClaimV1(),
1640+
"huaweicloud_cciv2_namespace": cci.ResourceNamespace(),
1641+
"huaweicloud_cciv2_network": cci.ResourceV2Network(),
1642+
"huaweicloud_cciv2_config_map": cci.ResourceV2ConfigMap(),
1643+
"huaweicloud_cciv2_secret": cci.ResourceV2Secret(),
1644+
"huaweicloud_cciv2_service": cci.ResourceV2Service(),
1645+
"huaweicloud_cciv2_deployment": cci.ResourceV2Deployment(),
1646+
"huaweicloud_cciv2_persistent_volume": cci.ResourceV2PersistentVolume(),
1647+
"huaweicloud_cciv2_image_snapshot": cci.ResourceV2ImageSnapshot(),
1648+
"huaweicloud_cciv2_pvc": cci.ResourceV2PersistentVolumeClaim(),
1649+
"huaweicloud_cciv2_pod": cci.ResourceV2Pod(),
1650+
"huaweicloud_cciv2_persistent_volume_claim": cci.ResourceV2PersistentVolumeClaim(),
16501651

16511652
"huaweicloud_ccm_certificate": ccm.ResourceCCMCertificate(),
16521653
"huaweicloud_ccm_certificate_apply": ccm.ResourceCertificateApply(),

0 commit comments

Comments
 (0)