Skip to content

Commit 2d57110

Browse files
committed
update devcontainer configuration, enhance setup script, and upgrade OpenTelemetry package versions
1 parent 5511245 commit 2d57110

File tree

3 files changed

+16
-8
lines changed

3 files changed

+16
-8
lines changed

.devcontainer/dotnet/devcontainer.json

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,12 @@
33
{
44
"name": "C# (.NET)",
55
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
6-
"image": "mcr.microsoft.com/devcontainers/dotnet:1-8.0-bookworm",
6+
"image": "mcr.microsoft.com/devcontainers/dotnet:1-9.0-bookworm",
77
// Features to add to the dev container. More info: https://containers.dev/features.
88
"features": {
9-
"ghcr.io/devcontainers/features/azure-cli:1": {}
9+
"ghcr.io/devcontainers/features/azure-cli:1": {},
10+
"ghcr.io/devcontainers/features/docker-in-docker:2": {},
11+
"ghcr.io/devcontainers/features/powershell:1": {}
1012
},
1113
// Use 'forwardPorts' to make a list of ports inside the container available locally.
1214
"forwardPorts": [5000, 5001],
@@ -17,7 +19,8 @@
1719
},
1820
// Use 'postCreateCommand' to run commands after the container is created.
1921
// "postCreateCommand": "dotnet restore",
20-
"postStartCommand": "git config --global --add safe.directory ${containerWorkspaceFolder}",
22+
"postStartCommand": "git config --global --add safe.directory ${containerWorkspaceFolder} && dotnet dev-certs https --trust",
23+
"onCreateCommand": "dotnet new install Aspire.ProjectTemplates::9.1.0 --force",
2124
// Configure tool-specific properties.
2225
"customizations": {
2326
// Configure properties specific to VS Code.

08-console-keyvault/setup.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,9 @@ az group create --name ${rg} --location ${location}
88

99
az keyvault create --location ${location} --name ${kvName} --resource-group ${rg}
1010

11+
12+
# Assign the Key Vault Contributor role to the current user
13+
userId=$(az ad signed-in-user show --query id --output tsv)
14+
az role assignment create --assignee ${userId} --role "Key Vault Administrator" --scope /subscriptions/$(az account show --query id --output tsv)/resourceGroups/${rg}/providers/Microsoft.KeyVault/vaults/${kvName}
15+
1116
az keyvault secret set --name Message --vault-name ${kvName} --value "Hello from KV"

16-aspire/16-aspire.ServiceDefaults/16-aspire.ServiceDefaults.csproj

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@
1212

1313
<PackageReference Include="Microsoft.Extensions.Http.Resilience" Version="9.2.0" />
1414
<PackageReference Include="Microsoft.Extensions.ServiceDiscovery" Version="9.1.0" />
15-
<PackageReference Include="OpenTelemetry.Exporter.OpenTelemetryProtocol" Version="1.9.0" />
16-
<PackageReference Include="OpenTelemetry.Extensions.Hosting" Version="1.9.0" />
17-
<PackageReference Include="OpenTelemetry.Instrumentation.AspNetCore" Version="1.9.0" />
18-
<PackageReference Include="OpenTelemetry.Instrumentation.Http" Version="1.9.0" />
19-
<PackageReference Include="OpenTelemetry.Instrumentation.Runtime" Version="1.9.0" />
15+
<PackageReference Include="OpenTelemetry.Exporter.OpenTelemetryProtocol" Version="1.11.2" />
16+
<PackageReference Include="OpenTelemetry.Extensions.Hosting" Version="1.11.2" />
17+
<PackageReference Include="OpenTelemetry.Instrumentation.AspNetCore" Version="1.11.1" />
18+
<PackageReference Include="OpenTelemetry.Instrumentation.Http" Version="1.11.1" />
19+
<PackageReference Include="OpenTelemetry.Instrumentation.Runtime" Version="1.11.1" />
2020
</ItemGroup>
2121

2222
</Project>

0 commit comments

Comments
 (0)