@@ -235,13 +235,24 @@ Format: 'projects/{{projectId}}/locations/{{location}}/backupVaults/{{backupVaul
235235 Optional : true ,
236236 Description : `Optional. Description of the replication.` ,
237237 },
238+ "hybrid_replication_type" : {
239+ Type : schema .TypeString ,
240+ Optional : true ,
241+ ValidateFunc : verify .ValidateEnum ([]string {"MIGRATION" , "CONTINUOUS_REPLICATION" , "ONPREM_REPLICATION" , "REVERSE_ONPREM_REPLICATION" , "" }),
242+ Description : `Optional. Type of the volume's hybrid replication. Possible values: ["MIGRATION", "CONTINUOUS_REPLICATION", "ONPREM_REPLICATION", "REVERSE_ONPREM_REPLICATION"]` ,
243+ },
238244 "labels" : {
239245 Type : schema .TypeMap ,
240246 Optional : true ,
241247 Description : `Optional. Labels to be added to the replication as the key value pairs.
242248An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }.` ,
243249 Elem : & schema.Schema {Type : schema .TypeString },
244250 },
251+ "large_volume_constituent_count" : {
252+ Type : schema .TypeInt ,
253+ Optional : true ,
254+ Description : `Optional. Constituent volume count for large volume.` ,
255+ },
245256 "peer_cluster_name" : {
246257 Type : schema .TypeString ,
247258 Optional : true ,
@@ -270,6 +281,12 @@ An object containing a list of "key": value pairs. Example: { "name": "wrench",
270281 Optional : true ,
271282 Description : `Required. Desired name for the replication of this volume.` ,
272283 },
284+ "replication_schedule" : {
285+ Type : schema .TypeString ,
286+ Optional : true ,
287+ ValidateFunc : verify .ValidateEnum ([]string {"EVERY_10_MINUTES" , "HOURLY" , "DAILY" , "" }),
288+ Description : `Optional. Replication Schedule for the replication created. Possible values: ["EVERY_10_MINUTES", "HOURLY", "DAILY"]` ,
289+ },
273290 },
274291 },
275292 },
@@ -2018,6 +2035,12 @@ func flattenNetappVolumeHybridReplicationParameters(v interface{}, d *schema.Res
20182035 flattenNetappVolumeHybridReplicationParametersDescription (original ["description" ], d , config )
20192036 transformed ["labels" ] =
20202037 flattenNetappVolumeHybridReplicationParametersLabels (original ["labels" ], d , config )
2038+ transformed ["replication_schedule" ] =
2039+ flattenNetappVolumeHybridReplicationParametersReplicationSchedule (original ["replicationSchedule" ], d , config )
2040+ transformed ["hybrid_replication_type" ] =
2041+ flattenNetappVolumeHybridReplicationParametersHybridReplicationType (original ["hybridReplicationType" ], d , config )
2042+ transformed ["large_volume_constituent_count" ] =
2043+ flattenNetappVolumeHybridReplicationParametersLargeVolumeConstituentCount (original ["largeVolumeConstituentCount" ], d , config )
20212044 return []interface {}{transformed }
20222045}
20232046func flattenNetappVolumeHybridReplicationParametersReplication (v interface {}, d * schema.ResourceData , config * transport_tpg.Config ) interface {} {
@@ -2052,6 +2075,31 @@ func flattenNetappVolumeHybridReplicationParametersLabels(v interface{}, d *sche
20522075 return v
20532076}
20542077
2078+ func flattenNetappVolumeHybridReplicationParametersReplicationSchedule (v interface {}, d * schema.ResourceData , config * transport_tpg.Config ) interface {} {
2079+ return v
2080+ }
2081+
2082+ func flattenNetappVolumeHybridReplicationParametersHybridReplicationType (v interface {}, d * schema.ResourceData , config * transport_tpg.Config ) interface {} {
2083+ return v
2084+ }
2085+
2086+ func flattenNetappVolumeHybridReplicationParametersLargeVolumeConstituentCount (v interface {}, d * schema.ResourceData , config * transport_tpg.Config ) interface {} {
2087+ // Handles the string fixed64 format
2088+ if strVal , ok := v .(string ); ok {
2089+ if intVal , err := tpgresource .StringToFixed64 (strVal ); err == nil {
2090+ return intVal
2091+ }
2092+ }
2093+
2094+ // number values are represented as float64
2095+ if floatVal , ok := v .(float64 ); ok {
2096+ intVal := int (floatVal )
2097+ return intVal
2098+ }
2099+
2100+ return v // let terraform core handle it otherwise
2101+ }
2102+
20552103func flattenNetappVolumeThroughputMibps (v interface {}, d * schema.ResourceData , config * transport_tpg.Config ) interface {} {
20562104 return v
20572105}
@@ -2772,6 +2820,27 @@ func expandNetappVolumeHybridReplicationParameters(v interface{}, d tpgresource.
27722820 transformed ["labels" ] = transformedLabels
27732821 }
27742822
2823+ transformedReplicationSchedule , err := expandNetappVolumeHybridReplicationParametersReplicationSchedule (original ["replication_schedule" ], d , config )
2824+ if err != nil {
2825+ return nil , err
2826+ } else if val := reflect .ValueOf (transformedReplicationSchedule ); val .IsValid () && ! tpgresource .IsEmptyValue (val ) {
2827+ transformed ["replicationSchedule" ] = transformedReplicationSchedule
2828+ }
2829+
2830+ transformedHybridReplicationType , err := expandNetappVolumeHybridReplicationParametersHybridReplicationType (original ["hybrid_replication_type" ], d , config )
2831+ if err != nil {
2832+ return nil , err
2833+ } else if val := reflect .ValueOf (transformedHybridReplicationType ); val .IsValid () && ! tpgresource .IsEmptyValue (val ) {
2834+ transformed ["hybridReplicationType" ] = transformedHybridReplicationType
2835+ }
2836+
2837+ transformedLargeVolumeConstituentCount , err := expandNetappVolumeHybridReplicationParametersLargeVolumeConstituentCount (original ["large_volume_constituent_count" ], d , config )
2838+ if err != nil {
2839+ return nil , err
2840+ } else if val := reflect .ValueOf (transformedLargeVolumeConstituentCount ); val .IsValid () && ! tpgresource .IsEmptyValue (val ) {
2841+ transformed ["largeVolumeConstituentCount" ] = transformedLargeVolumeConstituentCount
2842+ }
2843+
27752844 return transformed , nil
27762845}
27772846
@@ -2814,6 +2883,18 @@ func expandNetappVolumeHybridReplicationParametersLabels(v interface{}, d tpgres
28142883 return m , nil
28152884}
28162885
2886+ func expandNetappVolumeHybridReplicationParametersReplicationSchedule (v interface {}, d tpgresource.TerraformResourceData , config * transport_tpg.Config ) (interface {}, error ) {
2887+ return v , nil
2888+ }
2889+
2890+ func expandNetappVolumeHybridReplicationParametersHybridReplicationType (v interface {}, d tpgresource.TerraformResourceData , config * transport_tpg.Config ) (interface {}, error ) {
2891+ return v , nil
2892+ }
2893+
2894+ func expandNetappVolumeHybridReplicationParametersLargeVolumeConstituentCount (v interface {}, d tpgresource.TerraformResourceData , config * transport_tpg.Config ) (interface {}, error ) {
2895+ return v , nil
2896+ }
2897+
28172898func expandNetappVolumeThroughputMibps (v interface {}, d tpgresource.TerraformResourceData , config * transport_tpg.Config ) (interface {}, error ) {
28182899 return v , nil
28192900}
0 commit comments