-
-
Save TechWatching/a49e0f450600b3f5db17dcea8d2e4a7b to your computer and use it in GitHub Desktop.
Code to reproduce issue with state using azure provider in pulumi..
This file contains 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
using System.Collections.Generic; | |
using System.Threading.Tasks; | |
using Pulumi; | |
using Pulumi.Azure.AppInsights; | |
using Pulumi.Azure.Core; | |
using Pulumi.Azure.Storage; | |
class Program | |
{ | |
static Task<int> Main() | |
{ | |
return Deployment.RunAsync(() => { | |
// Create an Azure Resource Group | |
var resourceGroup = new ResourceGroup("testpulumi"); | |
var appInsights = new Insights("appInsights", new InsightsArgs | |
{ | |
ApplicationType = "web", | |
ResourceGroupName = resourceGroup.Name, | |
}); | |
var appInsightApiKey = new ApiKey("ai", new ApiKeyArgs | |
{ | |
ApplicationInsightsId = appInsights.Id, | |
ReadPermissions = "api" | |
}); | |
// Export the connection string for the storage account | |
return new Dictionary<string, object?> | |
{ | |
{ "AppInsightKey", appInsightApiKey.Key } | |
}; | |
}); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment