-
Notifications
You must be signed in to change notification settings - Fork 5
[DO NOT MERGE] Working Branch for Cleanup #294
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
Closed
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
576db7a
fix: streamline .NET package restoration in postCreate.sh
mattdot 0becca5
feat: add resource group management and diagnostics for deployment sc…
mattdot 0202f11
feat: add RESOURCE_TAGS to Azure environment configuration
mattdot c2403d5
fix: correct formatting of local variables in main.naming.tf
mattdot d93145f
chore: update azd and Terraform versions in workflows and configurati…
mawasile 17a2528
feat: add setup for .NET SDK version 9.0.x in CI workflow
mawasile ba5d87b
fix: remove redundant setup for .NET SDK version 8.0.x in CI workflow
mawasile 370768b
feat: update .NET SDK setup to version 9.0.x and specify installation…
mawasile f2a1e9b
feat: install .NET SDK 9.0.x using custom script for self-hosted runners
mawasile 7a117f4
fix: remove Node.js setup from CI workflows
mawasile ae0534d
feat: add Node.js setup to CI workflows for improved compatibility
mawasile 3307485
feat: add RESOURCE_TAGS environment variable setup in azd commands
mawasile 65963a2
feat: add RESOURCE_TAGS environment variable to azd down command
mawasile a56ef05
Merge branch 'main' into cleanup
mattdot File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,67 +1,67 @@ | ||
| { | ||
| "name": "Azure Developer CLI", | ||
| "image": "mcr.microsoft.com/devcontainers/go:1.4.1-bullseye", | ||
| "features": { | ||
| // terraform and az (required for auth) are installed by default | ||
| // See https://containers.dev/features for list of features | ||
| "ghcr.io/devcontainers/features/python:1" : {}, | ||
| "ghcr.io/devcontainers/features/powershell:1": {}, | ||
| "ghcr.io/devcontainers/features/azure-cli:1": {}, | ||
| "ghcr.io/devcontainers/features/github-cli:1": {}, | ||
| "ghcr.io/devcontainers/features/docker-in-docker:2": {}, | ||
| "ghcr.io/devcontainers/features/terraform:1": { | ||
| "installTFsec": true | ||
| }, | ||
| "ghcr.io/devcontainers/features/dotnet:2": { | ||
| "version": "9.0" | ||
| }, | ||
| "ghcr.io/azure/azure-dev/azd:latest": { | ||
| "version": "1.20.0" | ||
| }, | ||
| "./features/dev-tools": {} | ||
| }, | ||
| "customizations": { | ||
| "vscode": { | ||
| "extensions": [ | ||
| "GitHub.vscode-github-actions", | ||
| "hashicorp.terraform", | ||
| "ms-azuretools.azure-dev", | ||
| "ms-azuretools.vscode-docker", | ||
| "GitHub.copilot", | ||
| "GitHub.copilot-chat", | ||
| "ms-vscode.makefile-tools", | ||
| "DavidAnson.vscode-markdownlint", | ||
| "golang.go", | ||
| "ms-azuretools.vscode-azureterraform", | ||
| "terraform-linters.tflint-vscode", | ||
| "ms-vscode.azurecli", | ||
| "bierner.markdown-mermaid", | ||
| "ms-dotnettools.csharp", | ||
| "ms-dotnettools.vscode-dotnet-runtime" | ||
|
|
||
| // Include other VSCode extensions if needed. Right click on an extension inside VSCode | ||
| // to add directly to devcontainer.json, or copy the extension ID | ||
| ], | ||
| "settings": { | ||
| "terraform.languageServer.enable":true, | ||
| "tflint.enable": true, | ||
| "tflint.validateOnSave": true | ||
| } | ||
| } | ||
| }, | ||
| "forwardPorts": [ | ||
| // Forward ports if needed for local development | ||
| ], | ||
| "containerEnv": { | ||
| "POWER_PLATFORM_USE_CLI": "true", | ||
| "DOTNET_CLI_TELEMETRY_OPTOUT": "1" | ||
| }, | ||
| "remoteEnv": { | ||
| "PATH": "${containerEnv:PATH}:/home/vscode/.local/bin" | ||
| }, | ||
| "postCreateCommand": "sh .devcontainer/postCreate.sh", | ||
| "remoteUser": "vscode", | ||
| "hostRequirements": { | ||
| "memory": "8gb" | ||
| } | ||
| } | ||
| { | ||
| "name": "Azure Developer CLI", | ||
| "image": "mcr.microsoft.com/devcontainers/go:1.4.1-bullseye", | ||
| "features": { | ||
| // terraform and az (required for auth) are installed by default | ||
| // See https://containers.dev/features for list of features | ||
| "ghcr.io/devcontainers/features/python:1" : {}, | ||
| "ghcr.io/devcontainers/features/powershell:1": {}, | ||
| "ghcr.io/devcontainers/features/azure-cli:1": {}, | ||
| "ghcr.io/devcontainers/features/github-cli:1": {}, | ||
| "ghcr.io/devcontainers/features/docker-in-docker:2": {}, | ||
| "ghcr.io/devcontainers/features/terraform:1": { | ||
| "installTFsec": true | ||
| }, | ||
| "ghcr.io/devcontainers/features/dotnet:2": { | ||
| "version": "9.0" | ||
| }, | ||
| "ghcr.io/azure/azure-dev/azd:latest": { | ||
| "version": "1.20.0" | ||
| }, | ||
| "./features/dev-tools": {} | ||
| }, | ||
| "customizations": { | ||
| "vscode": { | ||
| "extensions": [ | ||
| "GitHub.vscode-github-actions", | ||
| "hashicorp.terraform", | ||
| "ms-azuretools.azure-dev", | ||
| "ms-azuretools.vscode-docker", | ||
| "GitHub.copilot", | ||
| "GitHub.copilot-chat", | ||
| "ms-vscode.makefile-tools", | ||
| "DavidAnson.vscode-markdownlint", | ||
| "golang.go", | ||
| "ms-azuretools.vscode-azureterraform", | ||
| "terraform-linters.tflint-vscode", | ||
| "ms-vscode.azurecli", | ||
| "bierner.markdown-mermaid", | ||
| "ms-dotnettools.csharp", | ||
| "ms-dotnettools.vscode-dotnet-runtime" | ||
| // Include other VSCode extensions if needed. Right click on an extension inside VSCode | ||
| // to add directly to devcontainer.json, or copy the extension ID | ||
| ], | ||
| "settings": { | ||
| "terraform.languageServer.enable":true, | ||
| "tflint.enable": true, | ||
| "tflint.validateOnSave": true | ||
| } | ||
| } | ||
| }, | ||
| "forwardPorts": [ | ||
| // Forward ports if needed for local development | ||
| ], | ||
| "containerEnv": { | ||
| "POWER_PLATFORM_USE_CLI": "true", | ||
| "DOTNET_CLI_TELEMETRY_OPTOUT": "1" | ||
| }, | ||
| "remoteEnv": { | ||
| "PATH": "${containerEnv:PATH}:/home/vscode/.local/bin" | ||
| }, | ||
| "postCreateCommand": "sh .devcontainer/postCreate.sh", | ||
| "remoteUser": "vscode", | ||
| "hostRequirements": { | ||
| "memory": "8gb" | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -48,6 +48,109 @@ resource "azurerm_storage_account" "deployment_container" { | |
| ] | ||
| } | ||
|
|
||
| # Enable diagnostic logging for deployment container storage account | ||
|
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. might centralize all the diagnostic settings. think we should keep these but maybe in their own file. and enable for some other resources. |
||
| resource "azapi_resource" "deployment_container_diagnostics" { | ||
| count = var.include_log_analytics ? 1 : 0 | ||
|
|
||
| type = "Microsoft.Insights/diagnosticSettings@2021-05-01-preview" | ||
| name = "deployment-container-diagnostics" | ||
| parent_id = azurerm_storage_account.deployment_container.id | ||
|
|
||
| body = { | ||
| properties = { | ||
| workspaceId = azurerm_log_analytics_workspace.monitoring[0].id | ||
| metrics = [ | ||
| { | ||
| category = "Transaction" | ||
| enabled = true | ||
| }, | ||
| { | ||
| category = "Capacity" | ||
| enabled = true | ||
| } | ||
| ] | ||
| } | ||
| } | ||
| } | ||
|
|
||
| # Enable diagnostic logging for blob service | ||
| resource "azapi_resource" "deployment_container_blob_diagnostics" { | ||
| count = var.include_log_analytics ? 1 : 0 | ||
|
|
||
| type = "Microsoft.Insights/diagnosticSettings@2021-05-01-preview" | ||
| name = "deployment-container-blob-diagnostics" | ||
| parent_id = "${azurerm_storage_account.deployment_container.id}/blobServices/default" | ||
|
|
||
| body = { | ||
| properties = { | ||
| workspaceId = azurerm_log_analytics_workspace.monitoring[0].id | ||
| logs = [ | ||
| { | ||
| category = "StorageRead" | ||
| enabled = true | ||
| }, | ||
| { | ||
| category = "StorageWrite" | ||
| enabled = true | ||
| }, | ||
| { | ||
| category = "StorageDelete" | ||
| enabled = true | ||
| } | ||
| ] | ||
| metrics = [ | ||
| { | ||
| category = "Transaction" | ||
| enabled = true | ||
| }, | ||
| { | ||
| category = "Capacity" | ||
| enabled = true | ||
| } | ||
| ] | ||
| } | ||
| } | ||
| } | ||
|
|
||
| # Enable diagnostic logging for file service (used by Deployment Scripts) | ||
| resource "azapi_resource" "deployment_container_file_diagnostics" { | ||
| count = var.include_log_analytics ? 1 : 0 | ||
|
|
||
| type = "Microsoft.Insights/diagnosticSettings@2021-05-01-preview" | ||
| name = "deployment-container-file-diagnostics" | ||
| parent_id = "${azurerm_storage_account.deployment_container.id}/fileServices/default" | ||
|
|
||
| body = { | ||
| properties = { | ||
| workspaceId = azurerm_log_analytics_workspace.monitoring[0].id | ||
| logs = [ | ||
| { | ||
| category = "StorageRead" | ||
| enabled = true | ||
| }, | ||
| { | ||
| category = "StorageWrite" | ||
| enabled = true | ||
| }, | ||
| { | ||
| category = "StorageDelete" | ||
| enabled = true | ||
| } | ||
| ] | ||
| metrics = [ | ||
| { | ||
| category = "Transaction" | ||
| enabled = true | ||
| }, | ||
| { | ||
| category = "Capacity" | ||
| enabled = true | ||
| } | ||
| ] | ||
| } | ||
| } | ||
| } | ||
|
|
||
| # Force recreation of Python scripts on each deployment | ||
| resource "terraform_data" "force_script_update" { | ||
| input = local.deployment_timestamp | ||
|
|
||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know if this is actually needed. Was an attempt before we found the issue with storage account. Will likely remove.