Skip to content

Commit 4ac75a1

Browse files
authored
Merge pull request #350 from vmware/mshobha/fix-dp-doc
Fix data protection schema and documentation
2 parents 1f04cf2 + 17ce9eb commit 4ac75a1

File tree

10 files changed

+14
-86
lines changed

10 files changed

+14
-86
lines changed

Diff for: docs/data-sources/backup_schedule.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,13 @@ data "tanzu-mission-control_backup_schedule" "demo" {
3333

3434
### Required
3535

36-
- `scope` (Block List, Min: 1, Max: 1) Search scope block (see [below for nested schema](#nestedblock--scope))
3736
- `name` (String) The name of the backup schedule
37+
- `scope` (Block List, Min: 1, Max: 1) Search scope block (see [below for nested schema](#nestedblock--scope))
3838

3939
### Optional
4040

4141
- `include_total_count` (Boolean) Whether to include total count of backups.
42-
(Default: True)
42+
(Default: True)
4343
- `query` (String) Define a query for listing backups
4444
- `sort_by` (String) Sort backups by field.
4545

@@ -72,9 +72,9 @@ Required:
7272

7373
Read-Only:
7474

75-
- `name` (String)
7675
- `backup_scope` (String)
7776
- `meta` (List of Object) (see [below for nested schema](#nestedobjatt--schedules--meta))
77+
- `name` (String)
7878
- `scope` (List of Object) (see [below for nested schema](#nestedobjatt--schedules--scope))
7979
- `spec` (List of Object) (see [below for nested schema](#nestedobjatt--schedules--spec))
8080

Diff for: docs/resources/backup_schedule.md

+4-13
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ resource "tanzu-mission-control_backup_schedule" "sample-full" {
4040
}
4141
4242
template {
43-
backup_ttl = "2592000s"
43+
backup_ttl = "2592000s"
4444
excluded_namespaces = [
4545
"app-01",
4646
"app-02",
@@ -169,9 +169,9 @@ resource "tanzu-mission-control_backup_schedule" "sample-full" {
169169
170170
template {
171171
default_volumes_to_fs_backup = false
172-
include_cluster_resources = true
173-
backup_ttl = "604800s"
174-
storage_location = "TARGET_LOCATION_NAME"
172+
include_cluster_resources = true
173+
backup_ttl = "604800s"
174+
storage_location = "TARGET_LOCATION_NAME"
175175
176176
label_selector {
177177
match_expression {
@@ -221,7 +221,6 @@ Valid values are (FULL_CLUSTER, SET_NAMESPACES, LABEL_SELECTOR)
221221
Optional:
222222

223223
- `cluster` (Block List, Max: 1) Cluster scope block (see [below for nested schema](#nestedblock--scope--cluster))
224-
- `cluster_group` (Block List, Max: 1) Cluster group scope block (see [below for nested schema](#nestedblock--scope--cluster_group))
225224

226225
<a id="nestedblock--scope--cluster"></a>
227226
### Nested Schema for `scope.cluster`
@@ -233,14 +232,6 @@ Required:
233232
- `provisioner_name` (String) Cluster provisioner name
234233

235234

236-
<a id="nestedblock--scope--cluster_group"></a>
237-
### Nested Schema for `scope.cluster_group`
238-
239-
Required:
240-
241-
- `cluster_group_name` (String) Cluster group name
242-
243-
244235

245236
<a id="nestedblock--spec"></a>
246237
### Nested Schema for `spec`

Diff for: docs/resources/enable_data_protection.md

-9
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,6 @@ terraform import tanzu-mission-control_backup_schedule.demo_backup MANAGEMENT_CL
6767
Optional:
6868

6969
- `cluster` (Block List, Max: 1) Cluster scope block (see [below for nested schema](#nestedblock--scope--cluster))
70-
- `cluster_group` (Block List, Max: 1) Cluster group scope block (see [below for nested schema](#nestedblock--scope--cluster_group))
7170

7271
<a id="nestedblock--scope--cluster"></a>
7372
### Nested Schema for `scope.cluster`
@@ -79,14 +78,6 @@ Required:
7978
- `provisioner_name` (String) Cluster provisioner name
8079

8180

82-
<a id="nestedblock--scope--cluster_group"></a>
83-
### Nested Schema for `scope.cluster_group`
84-
85-
Required:
86-
87-
- `cluster_group_name` (String) Cluster group name
88-
89-
9081

9182
<a id="nestedblock--deletion_policy"></a>
9283
### Nested Schema for `deletion_policy`

Diff for: docs/resources/target_location.md

+6-6
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,11 @@ For more information regarding target location, see [Target Location][target-loc
2222

2323
```terraform
2424
resource "tanzu-mission-control_target_location" "demo_tmc_managed" {
25-
name = "TARGET_LOCATION_NAME"
25+
name = "TARGET_LOCATION_NAME"
2626
2727
spec {
2828
target_provider = "TARGET_PROVIDER_NAME"
29-
credential = {
29+
credential = {
3030
name = "CREDENTIAL_NAME"
3131
}
3232
@@ -58,11 +58,11 @@ resource "tanzu-mission-control_target_location" "demo_tmc_managed" {
5858

5959
```terraform
6060
resource "tanzu-mission-control_target_location" "demo_aws_self_provisioned" {
61-
name = "TARGET_LOCATION_NAME"
61+
name = "TARGET_LOCATION_NAME"
6262
6363
spec {
6464
target_provider = "AWS"
65-
credential = {
65+
credential = {
6666
name = "AWS_CREDENTIAL_NAME"
6767
}
6868
@@ -102,11 +102,11 @@ resource "tanzu-mission-control_target_location" "demo_aws_self_provisioned" {
102102

103103
```terraform
104104
resource "tanzu-mission-control_target_location" "demo_aws_self_provisioned" {
105-
name = "TARGET_LOCATION_NAME"
105+
name = "TARGET_LOCATION_NAME"
106106
107107
spec {
108108
target_provider = "AWS"
109-
credential = {
109+
credential = {
110110
name = "AWS_CREDENTIAL_NAME"
111111
}
112112

Diff for: internal/resources/cluster/backupschedule/converter_mapping.go

-3
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,6 @@ var (
2222
var tfModelResourceMap = &tfModelConverterHelper.BlockToStruct{
2323
NameKey: tfModelConverterHelper.BuildDefaultModelPath("fullName", "name"),
2424
ScopeKey: &tfModelConverterHelper.BlockToStruct{
25-
ClusterGroupScopeKey: &tfModelConverterHelper.BlockToStruct{
26-
ClusterGroupNameKey: tfModelConverterHelper.BuildDefaultModelPath("fullName", "clusterGroupName"),
27-
},
2825
ClusterScopeKey: &tfModelConverterHelper.BlockToStruct{
2926
ClusterNameKey: tfModelConverterHelper.BuildDefaultModelPath("fullName", "clusterName"),
3027
ManagementClusterNameKey: tfModelConverterHelper.BuildDefaultModelPath("fullName", "managementClusterName"),

Diff for: internal/resources/cluster/backupschedule/datasource_schema.go

-16
Original file line numberDiff line numberDiff line change
@@ -96,22 +96,6 @@ var searchScopeSchema = &schema.Schema{
9696
Required: true,
9797
Elem: &schema.Resource{
9898
Schema: map[string]*schema.Schema{
99-
ClusterGroupScopeKey: {
100-
Type: schema.TypeList,
101-
Optional: true,
102-
Description: "Cluster group scope block",
103-
MaxItems: 1,
104-
Elem: &schema.Resource{
105-
Schema: map[string]*schema.Schema{
106-
ClusterGroupNameKey: {
107-
Type: schema.TypeString,
108-
Description: "Cluster group name",
109-
Required: true,
110-
ForceNew: true,
111-
},
112-
},
113-
},
114-
},
11599
ClusterScopeKey: {
116100
Type: schema.TypeList,
117101
Optional: true,

Diff for: internal/resources/cluster/backupschedule/resource_schema.go

-16
Original file line numberDiff line numberDiff line change
@@ -104,22 +104,6 @@ var scopeSchema = &schema.Schema{
104104
Optional: false,
105105
Elem: &schema.Resource{
106106
Schema: map[string]*schema.Schema{
107-
ClusterGroupScopeKey: {
108-
Type: schema.TypeList,
109-
Optional: true,
110-
Description: "Cluster group scope block",
111-
MaxItems: 1,
112-
Elem: &schema.Resource{
113-
Schema: map[string]*schema.Schema{
114-
ClusterGroupNameKey: {
115-
Type: schema.TypeString,
116-
Description: "Cluster group name",
117-
Required: true,
118-
ForceNew: true,
119-
},
120-
},
121-
},
122-
},
123107
ClusterScopeKey: {
124108
Type: schema.TypeList,
125109
Optional: true,

Diff for: internal/resources/cluster/dataprotection/converter_mapping.go

-3
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,6 @@ var tfModelMap = &tfModelConverterHelper.BlockToStruct{
1818
ManagementClusterNameKey: tfModelConverterHelper.BuildDefaultModelPath("fullName", "managementClusterName"),
1919
ProvisionerNameKey: tfModelConverterHelper.BuildDefaultModelPath("fullName", "provisionerName"),
2020
},
21-
ClusterGroupScopeKey: &tfModelConverterHelper.BlockToStruct{
22-
ClusterGroupNameKey: tfModelConverterHelper.BuildDefaultModelPath("fullName", "clusterGroupName"),
23-
},
2421
},
2522
common.MetaKey: common.GetMetaConverterMap(tfModelConverterHelper.DefaultModelPathSeparator),
2623
SpecKey: &tfModelConverterHelper.BlockToStruct{

Diff for: internal/resources/cluster/dataprotection/schema.go

-16
Original file line numberDiff line numberDiff line change
@@ -49,22 +49,6 @@ var scopeSchema = &schema.Schema{
4949
Optional: false,
5050
Elem: &schema.Resource{
5151
Schema: map[string]*schema.Schema{
52-
ClusterGroupScopeKey: {
53-
Type: schema.TypeList,
54-
Optional: true,
55-
Description: "Cluster group scope block",
56-
MaxItems: 1,
57-
Elem: &schema.Resource{
58-
Schema: map[string]*schema.Schema{
59-
ClusterGroupNameKey: {
60-
Type: schema.TypeString,
61-
Description: "Cluster group name",
62-
Required: true,
63-
ForceNew: true,
64-
},
65-
},
66-
},
67-
},
6852
ClusterScopeKey: {
6953
Type: schema.TypeList,
7054
Optional: true,

Diff for: internal/resources/package/data_source_package.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ var packageSchema = map[string]*schema.Schema{
4040
},
4141
namespaceKey: {
4242
Type: schema.TypeString,
43-
Description: "Namespae of package.",
43+
Description: "Namespace of package.",
4444
Computed: true,
4545
},
4646
metadataNameKey: {

0 commit comments

Comments
 (0)