Skip to content

Include tags for security controls when MicroHack is using Microsoft-sponsored external tenants. Also, add a small script to remove all soft-deleted resources to make redeployment easier.#41

Open
tkopacz wants to merge 6 commits intomicrosoft:mainfrom
tkopacz:main
Open

Conversation

@tkopacz
Copy link

@tkopacz tkopacz commented Feb 6, 2026

This pull request introduces several enhancements and utilities to streamline Azure resource management and data seeding for the project. The most significant changes include the addition of a comprehensive script to purge soft-deleted Azure resources, a new Python script for seeding Cosmos DB with sample data, and updates to deployment instructions for improved automation and troubleshooting.

Azure resource management improvements:

  • Added a new script purge-soft-deleted.sh to automate purging of soft-deleted Azure resources (Key Vaults, Cognitive Services, API Management, App Configuration) for a given resource group, improving environment cleanup and redeployment reliability.
  • Updated challenge-0/README.md to include instructions for running the purge script after redeployment, and enhanced the resource group creation command to add security-related tags. [1] [2]

Developer experience and environment setup:

  • Fixed the environment variable loading path in challenge-2/README.md to ensure the correct .env file is sourced when running the agent.

Infrastructure and local development:

  • Added Azurite database files (__azurite_db_queue__.json, __azurite_db_queue_extent__.json) to support local Azure Storage Queue emulation, aiding in development and testing scenarios. [1] [2]
    This pull request introduces improvements to the Azure deployment workflow, focusing on resource cleanup and deployment reliability. The main changes add a script to purge soft-deleted Azure resources, update deployment instructions to use this script, and enhance resource group tagging for compliance. Additionally, there are minor fixes to environment variable loading and the addition of local Azurite database files.

Deployment and resource management improvements:

  • Added a new script purge-soft-deleted.sh that automates purging of soft-deleted Azure resources (Key Vaults, Cognitive Services, API Management, App Configuration) for a given resource group, improving redeployment reliability.
  • Updated challenge-0/README.md to instruct users to run the new purge script after redeployment, ensuring clean state and avoiding resource name conflicts.
  • Enhanced the resource group creation command in challenge-0/README.md to include specific tags for security control and exemption, supporting compliance requirements.

Other changes:

  • Fixed the path for loading environment variables in challenge-2/README.md to correctly reference the .env file.
  • Added Azurite local database files (__azurite_db_queue__.json, __azurite_db_queue_extent__.json) to the repository, supporting local Azure Storage queue emulation. [1] [2]
    This pull request adds automation for purging soft-deleted Azure resources and updates deployment instructions to improve resource management and usability. The main focus is on making it easier to clean up resources during redeployment and ensuring environment variables are loaded from the correct location.

Resource management improvements:

  • Added a new script purge-soft-deleted.sh that can automatically purge soft-deleted Azure resources (Key Vaults, Cognitive Services, API Management, and App Configuration) in a specified resource group. This helps prevent issues when redeploying infrastructure.
  • Updated challenge-0/README.md to document the use of the new purge script after redeployment, making the workflow clearer for users.

Deployment and usability enhancements:

  • Modified the resource group creation command in challenge-0/README.md to include tags for security controls and exemptions, aligning with organizational requirements.
  • Fixed the path to the .env file in challenge-2/README.md to ensure environment variables are loaded correctly when running the agent.

Copy link
Collaborator

@pewill-msft pewill-msft left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the ideas. I would like to avoid adding things unless they are crucial for the participants to complete the exercises

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't see redeployment as an issue during the hacks since the participants typically use only one version of the deployed resources and there is no need to run multiple deployments. Adding this to the instructions can cause confusion.


# Create resource group
az group create --name $RESOURCE_GROUP --location $LOCATION
az group create --name $RESOURCE_GROUP --location $LOCATION --tags SecurityControl=Ignore SecurityExemption=StorageAccountKeyAccess
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would prefer not to have MSFT specific tags in the documentation

project.lock.json
project.fragment.lock.json
artifacts/
challenge-2/RepairPlanner/
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the RepairPlanner should be included in git since the hack participants might want to commit their changes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants