@@ -172,13 +172,17 @@ def _verify_infrastructure_specific(self, rg_name: str) -> bool:
172172 # PUBLIC METHODS
173173 # ------------------------------
174174
175- def deploy_infrastructure (self ) -> 'utils.Output' :
175+ def deploy_infrastructure (self , is_update : bool = False ) -> 'utils.Output' :
176176 """
177177 Deploy the infrastructure using the defined Bicep parameters.
178178 This method should be implemented in subclasses to handle specific deployment logic.
179+
180+ Args:
181+ is_update (bool): Whether this is an update to existing infrastructure or a new deployment.
179182 """
180183
181- print (f'\n 🚀 Creating infrastructure...\n ' )
184+ action_verb = "Updating" if is_update else "Creating"
185+ print (f'\n 🚀 { action_verb } infrastructure...\n ' )
182186 print (f' Infrastructure : { self .infra .value } ' )
183187 print (f' Index : { self .index } ' )
184188 print (f' Resource group : { self .rg_name } ' )
@@ -487,14 +491,18 @@ def _verify_apim_connectivity(self, apim_gateway_url: str) -> bool:
487491 print (' ℹ️ Continuing deployment - this may be expected during infrastructure setup' )
488492 return True # Continue anyway
489493
490- def deploy_infrastructure (self ) -> Output :
494+ def deploy_infrastructure (self , is_update : bool = False ) -> Output :
491495 """
492496 Deploy the AFD-APIM-PE infrastructure with the required multi-step process.
493497
498+ Args:
499+ is_update (bool): Whether this is an update to existing infrastructure or a new deployment.
500+
494501 Returns:
495502 utils.Output: The deployment result.
496503 """
497- print ('\n 🚀 Starting AFD-APIM-PE infrastructure deployment...\n ' )
504+ action_verb = "Updating" if is_update else "Starting"
505+ print (f'\n 🚀 { action_verb } AFD-APIM-PE infrastructure deployment...\n ' )
498506 print (' This deployment requires multiple steps:\n ' )
499507 print (' 1. Initial deployment with public access enabled' )
500508 print (' 2. Approve private link connections' )
@@ -503,7 +511,7 @@ def deploy_infrastructure(self) -> Output:
503511 print (' 5. Final verification\n ' )
504512
505513 # Step 1 & 2: Initial deployment using base class method
506- output = super ().deploy_infrastructure ()
514+ output = super ().deploy_infrastructure (is_update )
507515
508516 if not output .success :
509517 print ('❌ Initial deployment failed!' )
0 commit comments