Skip to content

Commit b928851

Browse files
Adds trial_config field to Storage Intelligence Resources. (#13525) (#22236)
[upstream:e6e0f08e40bef644d5e75a41c14045bb0d52e24f] Signed-off-by: Modular Magician <[email protected]>
1 parent 17bc29f commit b928851

10 files changed

+145
-0
lines changed

.changelog/13525.txt

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
```release-note:enhancement
2+
storagecontrol: added to `trial_config` field to `google_storage_control_project_intelligence_config` resource
3+
```
4+
5+
```release-note:enhancement
6+
storagecontrol: added to `trial_config` field to `google_storage_control_folder_intelligence_config` resource
7+
```
8+
```release-note:enhancement
9+
storagecontrol: added to `trial_config` field to `google_storage_control_organization_intelligence_config` resource
10+
```

google/services/storagecontrol/resource_storage_control_folder_intelligence_config.go

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,20 @@ func ResourceStorageControlFolderIntelligenceConfig() *schema.Resource {
177177
},
178178
},
179179
},
180+
"trial_config": {
181+
Type: schema.TypeList,
182+
Computed: true,
183+
Description: `The trial configuration of the Storage Intelligence resource.`,
184+
Elem: &schema.Resource{
185+
Schema: map[string]*schema.Schema{
186+
"expire_time": {
187+
Type: schema.TypeString,
188+
Computed: true,
189+
Description: `The time at which the trial expires.`,
190+
},
191+
},
192+
},
193+
},
180194
"update_time": {
181195
Type: schema.TypeString,
182196
Computed: true,
@@ -303,6 +317,9 @@ func resourceStorageControlFolderIntelligenceConfigRead(d *schema.ResourceData,
303317
if err := d.Set("effective_intelligence_config", flattenStorageControlFolderIntelligenceConfigEffectiveIntelligenceConfig(res["effectiveIntelligenceConfig"], d, config)); err != nil {
304318
return fmt.Errorf("Error reading FolderIntelligenceConfig: %s", err)
305319
}
320+
if err := d.Set("trial_config", flattenStorageControlFolderIntelligenceConfigTrialConfig(res["trialConfig"], d, config)); err != nil {
321+
return fmt.Errorf("Error reading FolderIntelligenceConfig: %s", err)
322+
}
306323

307324
return nil
308325
}
@@ -528,6 +545,23 @@ func flattenStorageControlFolderIntelligenceConfigEffectiveIntelligenceConfigEff
528545
return v
529546
}
530547

548+
func flattenStorageControlFolderIntelligenceConfigTrialConfig(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} {
549+
if v == nil {
550+
return nil
551+
}
552+
original := v.(map[string]interface{})
553+
if len(original) == 0 {
554+
return nil
555+
}
556+
transformed := make(map[string]interface{})
557+
transformed["expire_time"] =
558+
flattenStorageControlFolderIntelligenceConfigTrialConfigExpireTime(original["expireTime"], d, config)
559+
return []interface{}{transformed}
560+
}
561+
func flattenStorageControlFolderIntelligenceConfigTrialConfigExpireTime(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} {
562+
return v
563+
}
564+
531565
func expandStorageControlFolderIntelligenceConfigEditionConfig(v interface{}, d tpgresource.TerraformResourceData, config *transport_tpg.Config) (interface{}, error) {
532566
return v, nil
533567
}

google/services/storagecontrol/resource_storage_control_folder_intelligence_config_generated_meta.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,5 @@ fields:
1414
- field: 'filter.included_cloud_storage_locations.locations'
1515
- field: 'name'
1616
provider_only: true
17+
- field: 'trial_config.expire_time'
1718
- field: 'update_time'

google/services/storagecontrol/resource_storage_control_organization_intelligence_config.go

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,20 @@ func ResourceStorageControlOrganizationIntelligenceConfig() *schema.Resource {
177177
},
178178
},
179179
},
180+
"trial_config": {
181+
Type: schema.TypeList,
182+
Computed: true,
183+
Description: `The trial configuration of the Storage Intelligence resource.`,
184+
Elem: &schema.Resource{
185+
Schema: map[string]*schema.Schema{
186+
"expire_time": {
187+
Type: schema.TypeString,
188+
Computed: true,
189+
Description: `The time at which the trial expires.`,
190+
},
191+
},
192+
},
193+
},
180194
"update_time": {
181195
Type: schema.TypeString,
182196
Computed: true,
@@ -303,6 +317,9 @@ func resourceStorageControlOrganizationIntelligenceConfigRead(d *schema.Resource
303317
if err := d.Set("effective_intelligence_config", flattenStorageControlOrganizationIntelligenceConfigEffectiveIntelligenceConfig(res["effectiveIntelligenceConfig"], d, config)); err != nil {
304318
return fmt.Errorf("Error reading OrganizationIntelligenceConfig: %s", err)
305319
}
320+
if err := d.Set("trial_config", flattenStorageControlOrganizationIntelligenceConfigTrialConfig(res["trialConfig"], d, config)); err != nil {
321+
return fmt.Errorf("Error reading OrganizationIntelligenceConfig: %s", err)
322+
}
306323

307324
return nil
308325
}
@@ -528,6 +545,23 @@ func flattenStorageControlOrganizationIntelligenceConfigEffectiveIntelligenceCon
528545
return v
529546
}
530547

548+
func flattenStorageControlOrganizationIntelligenceConfigTrialConfig(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} {
549+
if v == nil {
550+
return nil
551+
}
552+
original := v.(map[string]interface{})
553+
if len(original) == 0 {
554+
return nil
555+
}
556+
transformed := make(map[string]interface{})
557+
transformed["expire_time"] =
558+
flattenStorageControlOrganizationIntelligenceConfigTrialConfigExpireTime(original["expireTime"], d, config)
559+
return []interface{}{transformed}
560+
}
561+
func flattenStorageControlOrganizationIntelligenceConfigTrialConfigExpireTime(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} {
562+
return v
563+
}
564+
531565
func expandStorageControlOrganizationIntelligenceConfigEditionConfig(v interface{}, d tpgresource.TerraformResourceData, config *transport_tpg.Config) (interface{}, error) {
532566
return v, nil
533567
}

google/services/storagecontrol/resource_storage_control_organization_intelligence_config_generated_meta.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,5 @@ fields:
1414
- field: 'filter.included_cloud_storage_locations.locations'
1515
- field: 'name'
1616
provider_only: true
17+
- field: 'trial_config.expire_time'
1718
- field: 'update_time'

google/services/storagecontrol/resource_storage_control_project_intelligence_config.go

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -274,6 +274,20 @@ func ResourceStorageControlProjectIntelligenceConfig() *schema.Resource {
274274
},
275275
},
276276
},
277+
"trial_config": {
278+
Type: schema.TypeList,
279+
Computed: true,
280+
Description: `The trial configuration of the Storage Intelligence resource.`,
281+
Elem: &schema.Resource{
282+
Schema: map[string]*schema.Schema{
283+
"expire_time": {
284+
Type: schema.TypeString,
285+
Computed: true,
286+
Description: `The time at which the trial expires.`,
287+
},
288+
},
289+
},
290+
},
277291
"update_time": {
278292
Type: schema.TypeString,
279293
Computed: true,
@@ -400,6 +414,9 @@ func resourceStorageControlProjectIntelligenceConfigRead(d *schema.ResourceData,
400414
if err := d.Set("effective_intelligence_config", flattenStorageControlProjectIntelligenceConfigEffectiveIntelligenceConfig(res["effectiveIntelligenceConfig"], d, config)); err != nil {
401415
return fmt.Errorf("Error reading ProjectIntelligenceConfig: %s", err)
402416
}
417+
if err := d.Set("trial_config", flattenStorageControlProjectIntelligenceConfigTrialConfig(res["trialConfig"], d, config)); err != nil {
418+
return fmt.Errorf("Error reading ProjectIntelligenceConfig: %s", err)
419+
}
403420

404421
return nil
405422
}
@@ -625,6 +642,23 @@ func flattenStorageControlProjectIntelligenceConfigEffectiveIntelligenceConfigEf
625642
return v
626643
}
627644

645+
func flattenStorageControlProjectIntelligenceConfigTrialConfig(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} {
646+
if v == nil {
647+
return nil
648+
}
649+
original := v.(map[string]interface{})
650+
if len(original) == 0 {
651+
return nil
652+
}
653+
transformed := make(map[string]interface{})
654+
transformed["expire_time"] =
655+
flattenStorageControlProjectIntelligenceConfigTrialConfigExpireTime(original["expireTime"], d, config)
656+
return []interface{}{transformed}
657+
}
658+
func flattenStorageControlProjectIntelligenceConfigTrialConfigExpireTime(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} {
659+
return v
660+
}
661+
628662
func expandStorageControlProjectIntelligenceConfigEditionConfig(v interface{}, d tpgresource.TerraformResourceData, config *transport_tpg.Config) (interface{}, error) {
629663
return v, nil
630664
}

google/services/storagecontrol/resource_storage_control_project_intelligence_config_generated_meta.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,5 @@ fields:
1414
- field: 'filter.included_cloud_storage_locations.locations'
1515
- field: 'name'
1616
provider_only: true
17+
- field: 'trial_config.expire_time'
1718
- field: 'update_time'

website/docs/r/storage_control_folder_intelligence_config.html.markdown

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,10 @@ In addition to the arguments listed above, the following computed attributes are
131131
The Intelligence config that is effective for the resource.
132132
Structure is [documented below](#nested_effective_intelligence_config).
133133

134+
* `trial_config` -
135+
The trial configuration of the Storage Intelligence resource.
136+
Structure is [documented below](#nested_trial_config).
137+
134138

135139
<a name="nested_effective_intelligence_config"></a>The `effective_intelligence_config` block contains:
136140

@@ -142,6 +146,12 @@ In addition to the arguments listed above, the following computed attributes are
142146
(Output)
143147
The `StorageIntelligence` edition that is applicable for the resource.
144148

149+
<a name="nested_trial_config"></a>The `trial_config` block contains:
150+
151+
* `expire_time` -
152+
(Output)
153+
The time at which the trial expires.
154+
145155
## Timeouts
146156

147157
This resource provides the following

website/docs/r/storage_control_organization_intelligence_config.html.markdown

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,10 @@ In addition to the arguments listed above, the following computed attributes are
131131
The Intelligence config that is effective for the resource.
132132
Structure is [documented below](#nested_effective_intelligence_config).
133133

134+
* `trial_config` -
135+
The trial configuration of the Storage Intelligence resource.
136+
Structure is [documented below](#nested_trial_config).
137+
134138

135139
<a name="nested_effective_intelligence_config"></a>The `effective_intelligence_config` block contains:
136140

@@ -142,6 +146,12 @@ In addition to the arguments listed above, the following computed attributes are
142146
(Output)
143147
The `StorageIntelligence` edition that is applicable for the resource.
144148

149+
<a name="nested_trial_config"></a>The `trial_config` block contains:
150+
151+
* `expire_time` -
152+
(Output)
153+
The time at which the trial expires.
154+
145155
## Timeouts
146156

147157
This resource provides the following

website/docs/r/storage_control_project_intelligence_config.html.markdown

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,10 @@ In addition to the arguments listed above, the following computed attributes are
128128
The Intelligence config that is effective for the resource.
129129
Structure is [documented below](#nested_effective_intelligence_config).
130130

131+
* `trial_config` -
132+
The trial configuration of the Storage Intelligence resource.
133+
Structure is [documented below](#nested_trial_config).
134+
131135

132136
<a name="nested_effective_intelligence_config"></a>The `effective_intelligence_config` block contains:
133137

@@ -139,6 +143,12 @@ In addition to the arguments listed above, the following computed attributes are
139143
(Output)
140144
The `StorageIntelligence` edition that is applicable for the resource.
141145

146+
<a name="nested_trial_config"></a>The `trial_config` block contains:
147+
148+
* `expire_time` -
149+
(Output)
150+
The time at which the trial expires.
151+
142152
## Timeouts
143153

144154
This resource provides the following

0 commit comments

Comments
 (0)