Skip to content

Conversation

wgrant
Copy link
Contributor

@wgrant wgrant commented Jul 23, 2025

what

Various cleanups and usability improvements made while iterating on #11:

  • Allow hyphens in the prefix.
  • Allow customising the resource group name.
  • Provide a default resource group location.
  • Allow Terraform to force-delete a non-empty resource group, since Application Insights creates other resources automatically.
  • Allow configuration of the subscription ID without setting ARM_SUBSCRIPTION_ID.
  • Create the app role assignment using an actual Terraform resource, not a subprocess call.
  • Fix Application Insights plan noise.
  • Fix DOS line endings.

Upgrades will need to terraform import azuread_app_role_assignment.stacklet_app_role_assignment /servicePrincipals/<SERVICE-PRINCIPAL-ID>/appRoleAssignedTo/<APP-ROLE-ASSIGNMENT-ID>. The service principal ID is the object_id field of azuread_service_principal.stacklet_sp[0], and you can find the role assignment ID with az rest --method GET --uri "https://graph.microsoft.com/v1.0/servicePrincipals/<SERVICE-PRINCIPAL-ID>/appRoleAssignedTo".

why

Iterating on changes was annoying. These changes were mostly originally from #11.

testing

On my test deployment.

Copy link

@fwereade fwereade left a comment

Choose a reason for hiding this comment

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

Thanks, this LGTM, but I'm weirded out by __init__.py showing up in the diff – what actually changed there?

@wgrant
Copy link
Contributor Author

wgrant commented Jul 23, 2025

You should avert your eyes; it used... DOS line endings.

@wgrant wgrant merged commit ca1c036 into main Jul 23, 2025
1 check passed
@wgrant wgrant deleted the wgrant/fix/cleanup branch July 23, 2025 21:11
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.

3 participants