Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pipeline deployment deletes using filter mlz- prior to testing deployment which causes issues as its too generic #466

Closed
shawngib opened this issue Oct 18, 2021 · 1 comment · Fixed by #437
Assignees
Labels
bug Something isn't working

Comments

@shawngib
Copy link
Member

Description

During Azure Devops deployment uses az cli to delete diagnostic settings and resource groups in pre-task to deployment as a way to solve for previous issues in deployments leaving orphaned resource blocking future deployments. While this is a temporary fix it impacts testing and should be more specific in nature. Cleanup should be after deployment and specific to name of deployment and result in failure if not completed.

current inline script:
'az group list -o table | grep ''mlz'' | awk ''{system("az group delete -y --no-wait -g "$1)}''

  • Different results in Bicep versus TF.
    -- TF runs destroy
    -- Bicep doesn't clean up after deployment

Steps to Reproduce

Steps to reproduce the behavior:

  1. Run pipeline manually or triggered

Expected behavior

  • Success should reflect deployments in Gov and Commercial for Bicep az deployment and terraform apply with no artifacts left behind in subscription
  • Cleanup script should be run (modify script to wait for results) filtering on the output resourcePrefix of deployments and pass or fail since clean up is also a requirement of good IaC.

Actual behavior

-- Bicep resources left behind, next deployment generically deletes anything with `,lz' in name prior to next

Screenshots

Additional context

Operating System:
Terraform Version:
Cloud (public, Azure Government, etc.):

@brooke-hamilton
Copy link
Contributor

Closing - the automation did not close the issue along with the PR completion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants