@@ -154,6 +154,7 @@ module.exports = {
154154 sandbox : container . sandbox ,
155155 health_check : adaptHealthCheckToAPI ( container . healthCheck ) ,
156156 scaling_option : adaptScalingOptionToAPI ( container . scalingOption ) ,
157+ private_network_id : container . privateNetworkId ,
157158 } ;
158159
159160 // checking if there is custom_domains set on container creation.
@@ -177,6 +178,13 @@ module.exports = {
177178 } ,
178179
179180 async updateSingleContainer ( container , foundContainer ) {
181+ let privateNetworkId = container . privateNetworkId ;
182+ const hasToDeletePrivateNetwork =
183+ foundContainer . private_network_id && ! container . privateNetworkId ;
184+ if ( hasToDeletePrivateNetwork ) {
185+ privateNetworkId = "" ;
186+ }
187+
180188 const params = {
181189 redeploy : false ,
182190 environment_variables : container . env ,
@@ -201,6 +209,7 @@ module.exports = {
201209 sandbox : container . sandbox ,
202210 health_check : adaptHealthCheckToAPI ( container . healthCheck ) ,
203211 scaling_option : adaptScalingOptionToAPI ( container . scalingOption ) ,
212+ private_network_id : privateNetworkId ,
204213 } ;
205214
206215 // note about maxConcurrency deprecation
0 commit comments