@@ -72,6 +72,12 @@ func GetVertexAIIndexEndpointApiObject(d tpgresource.TerraformResourceData, conf
72
72
} else if v , ok := d .GetOkExists ("network" ); ! tpgresource .IsEmptyValue (reflect .ValueOf (networkProp )) && (ok || ! reflect .DeepEqual (v , networkProp )) {
73
73
obj ["network" ] = networkProp
74
74
}
75
+ privateServiceConnectConfigProp , err := expandVertexAIIndexEndpointPrivateServiceConnectConfig (d .Get ("private_service_connect_config" ), d , config )
76
+ if err != nil {
77
+ return nil , err
78
+ } else if v , ok := d .GetOkExists ("private_service_connect_config" ); ! tpgresource .IsEmptyValue (reflect .ValueOf (privateServiceConnectConfigProp )) && (ok || ! reflect .DeepEqual (v , privateServiceConnectConfigProp )) {
79
+ obj ["privateServiceConnectConfig" ] = privateServiceConnectConfigProp
80
+ }
75
81
publicEndpointEnabledProp , err := expandVertexAIIndexEndpointPublicEndpointEnabled (d .Get ("public_endpoint_enabled" ), d , config )
76
82
if err != nil {
77
83
return nil , err
@@ -100,6 +106,40 @@ func expandVertexAIIndexEndpointNetwork(v interface{}, d tpgresource.TerraformRe
100
106
return v , nil
101
107
}
102
108
109
+ func expandVertexAIIndexEndpointPrivateServiceConnectConfig (v interface {}, d tpgresource.TerraformResourceData , config * transport_tpg.Config ) (interface {}, error ) {
110
+ l := v .([]interface {})
111
+ if len (l ) == 0 || l [0 ] == nil {
112
+ return nil , nil
113
+ }
114
+ raw := l [0 ]
115
+ original := raw .(map [string ]interface {})
116
+ transformed := make (map [string ]interface {})
117
+
118
+ transformedEnablePrivateServiceConnect , err := expandVertexAIIndexEndpointPrivateServiceConnectConfigEnablePrivateServiceConnect (original ["enable_private_service_connect" ], d , config )
119
+ if err != nil {
120
+ return nil , err
121
+ } else if val := reflect .ValueOf (transformedEnablePrivateServiceConnect ); val .IsValid () && ! tpgresource .IsEmptyValue (val ) {
122
+ transformed ["enablePrivateServiceConnect" ] = transformedEnablePrivateServiceConnect
123
+ }
124
+
125
+ transformedProjectAllowlist , err := expandVertexAIIndexEndpointPrivateServiceConnectConfigProjectAllowlist (original ["project_allowlist" ], d , config )
126
+ if err != nil {
127
+ return nil , err
128
+ } else if val := reflect .ValueOf (transformedProjectAllowlist ); val .IsValid () && ! tpgresource .IsEmptyValue (val ) {
129
+ transformed ["projectAllowlist" ] = transformedProjectAllowlist
130
+ }
131
+
132
+ return transformed , nil
133
+ }
134
+
135
+ func expandVertexAIIndexEndpointPrivateServiceConnectConfigEnablePrivateServiceConnect (v interface {}, d tpgresource.TerraformResourceData , config * transport_tpg.Config ) (interface {}, error ) {
136
+ return v , nil
137
+ }
138
+
139
+ func expandVertexAIIndexEndpointPrivateServiceConnectConfigProjectAllowlist (v interface {}, d tpgresource.TerraformResourceData , config * transport_tpg.Config ) (interface {}, error ) {
140
+ return v , nil
141
+ }
142
+
103
143
func expandVertexAIIndexEndpointPublicEndpointEnabled (v interface {}, d tpgresource.TerraformResourceData , config * transport_tpg.Config ) (interface {}, error ) {
104
144
return v , nil
105
145
}
0 commit comments