File tree Expand file tree Collapse file tree
src/Aws/Task/CloudFormation Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -191,10 +191,12 @@ public function main()
191191 // update
192192 $ cloudFormation ->updateStack ($ stackProperties );
193193 } catch (CloudFormationException $ e ) {
194- if ($ this ->getUpdateOnConflict ()) {
195- $ cloudFormation ->createStack ($ stackProperties );
196- } else {
197- throw new \BuildException ('Stack ' . $ this ->getName () . ' already exists! ' );
194+ if ($ e ->getMessage () != 'No updates are to be performed. ' ) {
195+ if ($ this ->getUpdateOnConflict ()) {
196+ $ cloudFormation ->createStack ($ stackProperties );
197+ } else {
198+ throw new \BuildException ('Stack ' . $ this ->getName () . ' already exists! ' );
199+ }
198200 }
199201 }
200202
@@ -211,7 +213,8 @@ protected function stackIsReady()
211213 ->describeStacks ([
212214 'StackName ' => $ this ->getName ()
213215 ]);
214- switch ($ stack ['Stack ' ]['StackStatus ' ]) {
216+
217+ switch ($ stack ['Stacks ' ][0 ]['StackStatus ' ]) {
215218 case 'CREATE_COMPLETE ' :
216219 case 'UPDATE_COMPLETE ' :
217220 case 'UPDATE_COMPLETE_CLEANUP_IN_PROGRESS ' :
@@ -221,7 +224,7 @@ protected function stackIsReady()
221224 case 'CREATE_IN_PROGRESS ' :
222225 return false ;
223226 default :
224- throw new \BuildException ('Failed to run stack ' . $ this ->getName () . ' ( ' . $ stack ['Stack ' ]['StackStatus ' ] . ') ! ' );
227+ throw new \BuildException ('Failed to run stack ' . $ this ->getName () . ' ( ' . $ stack ['Stacks ' ][ 0 ]['StackStatus ' ] . ') ! ' );
225228 }
226229 } catch (CloudFormationException $ e ) {
227230 return false ;
@@ -245,4 +248,4 @@ protected function validate() {
245248
246249 }
247250
248- }
251+ }
You can’t perform that action at this time.
0 commit comments