Azure / Azure/azure-cli

Implement Powershell commands Start-AzSpringCloudAppDeployment and Stop-AzSpringCloudAppDeployment

Open
#25,643 2 comments 0 reactions 0 assignees View on GitHub
customer-reported Service Attention Spring-Cloud
Dominant language
Python
Stars
4.6k
Forks
3.5k
Avg merge
3d 2h
Merged PRs (30d)
60

Description

**Related command**
Powershell Start-AzSpringCloudAppDeployment and Stop-AzSpringCloudAppDeployment

**Is your feature request related to a problem? Please describe.**
The current AZ CLI only allows you to delete a spring app deployment, rather than stopping it, but when one uses Infrastructure as Code, it is likely to conflict with the terraform state, resulting in clashes between app deployment and infrastructure deployment.

**Describe the solution you'd like**
Migarte the two PS commands

**Describe alternatives you've considered**
Although it is possible to mix and match AZ cli and PS, one receives warnings when doing so:

--------------------------------------------------------
Code:
- name: Start new deployment slot
uses: azure/powershell@v1
with:
inlineScript: |
Start-AzSpringCloudAppDeployment -AppName ${{ github.event.repository.name }}-${{ inputs.ENVIRONMENT }} -Name ${{ env.new_deployment_name }} -ResourceGroupName 'rg-spring-cloud' -ServiceName "ab-spring-apps-${{ inputs.SUBSCRIPTION_ENVIRONMENT }}"
azPSVersion: "latest"

---------------------------------------------------------

Execution:
Running Az PowerShell Script
/usr/bin/pwsh -NoLogo -NoProfile -NonInteractive -Command /home/runner/work/_temp/5e0cea5d-5a0a-4b45-800a-409f5d312cb0.ps1
WARNING: Start-AzSpringCloudAppDeployment_Start is not found. The most similar Azure PowerShell commands are:
Start-AzSpringCloudAppDeployment
Start-AzSpringCloudAppDeploymentJfr
WARNING: The intelligent recommendation feature is in preview. Help us improve it by sharing your experience: https://go.microsoft.com/fwlink/?linkid=2202[43](https://github.com/almbrand/spring-archetype-testenv1/actions/runs/4303445141/jobs/7503206415#step:11:44)6
Start-AzSpringCloudAppDeployment_Start: /home/runner/work/_temp/5e0cea5d-5a0a-4b[45](https://github.com/almbrand/spring-archetype-testenv1/actions/runs/4303445141/jobs/7503206415#step:11:46)-800a-409f5d312cb0.ps1:2
Line |
2 | Start-AzSpringCloudAppDeployment -AppName spring-archetype-testenv1-p …
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| 112404: Exit code 1: application error, please refer to
| https://aka.ms/exitcode

Script execution Complete

--------------------------------------------------------------

**Additional context**
![image](https://user-images.githubusercontent.com/17316535/222385726-d3668046-6ca5-408f-a366-e0f6406e24dc.png)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.