able-train-72108
09/21/2022, 8:01 PMNote the use of the `Ready()` method; depending on the Chart resource directly will
// not work.
)
The problem is that I don't find the Ready function in the helm c# api, browsing here; https://github.com/pulumi/pulumi-kubernetes/blob/master/sdk/dotnet/Helm/V3/Chart.cs I cannot find the word ready in the page. I looked at go, python and nodejs sdk and they all have a ready member and it is set to something in the constructor. Is it a limitation of c# or a bug?late-lizard-19909
09/22/2022, 6:10 PMsticky-jordan-27156
09/23/2022, 8:13 AMlet _policy =
let args =
Iam.RolePolicyArgs (
Policy =
input
"""
{
"Version": "2012-10-17",
"Statement": [{
"Effect": "Allow",
"Action": [
"logs:CreateLogGroup",
"logs:CreateLogStream",
"logs:PutLogEvents"
],
"Resource": "arn:aws:logs:*:*:*"
}]
}
""",
Role = io lambdaRole.Id
)
Iam.RolePolicy ($"{loweredProjectName}-log-policy", args)
Leads to
aws:iam:RolePolicy (autograph-log-policy):
error: aws:iam/rolePolicy:RolePolicy resource 'project-log-policy' has a problem: "policy" contains an invalid JSON policy. Examine values at 'RolePolicy.Policy'.
I'm not sure why. Any ideas?sparse-intern-71089
09/23/2022, 7:35 PMdamp-honey-93158
09/30/2022, 1:40 PMdazzling-gigabyte-42983
10/31/2022, 1:03 PMbland-xylophone-56721
10/31/2022, 5:01 PM// PREVIEW CHANGES
var output = stack.PreviewAsync(new PreviewOptions
{
Color = "always",
OnStandardOutput = Console.WriteLine,
}).Result;
All this tells me in the output.ChangeSummary
is that 10 resources will be created. How can programatically see before & after for comparison? Thanks!miniature-leather-70472
11/02/2022, 10:12 AMripe-russia-4239
11/03/2022, 11:03 AMnew Pulumi.Config()
? I'm trying a few approaches, currently injecting the Pulumi.Config
instance via the Stack's constructor, but I can't work out how to populate the config object in my tests with sample values. The class is sealed and implements no interfaces, so it's not possible to mock it either (as far as I can tell)rhythmic-crowd-40243
11/07/2022, 2:02 AM"logWorkspaces": {
"eastus2": "app-logs-eastus2-law16df9848",
"central": "...",
...
}
This my attempt to try and extract the output.
var logWorkspaceReference = coreStackReference
.RequireOutput(App.Infra.Core.OutputNames.LogWorkspace);
var x = logWorkspaceReference.Apply(o => JsonSerializer
.Deserialize<Dictionary<string, object>>(o.ToString()));
var workspace = Pulumi.AzureNative.OperationalInsights.GetWorkspace.Invoke(
new GetWorkspaceInvokeArgs
{
ResourceGroupName = resourceGroup.Location,
WorkspaceName = x.Apply(url => (string) url["eastus2"])
});
But deserialization is failing…
an unhandled exception:
System.Text.Json.JsonException: 'S' is an invalid start of a value. Path: $ | LineNumber: 0 | BytePositionInLine: 0.
at void System.Text.Json.ThrowHelper.ReThrowWithPath(ref ReadStack state, JsonReaderException ex)
I don’t think I’m understanding outputs correctly. But before I spend anymore time on this, can this be done?ripe-russia-4239
11/10/2022, 10:23 AMListNamespaceKeys
Function, like so:
public Output<string> CreateConnectionString(string applicationName, params Union<string, AccessRights>[] accessRights)
{
var authorisationRule = new NamespaceAuthorizationRule(applicationName, new NamespaceAuthorizationRuleArgs
{
AuthorizationRuleName = applicationName,
Rights = accessRights,
NamespaceName = _eventHubNamespace.Name,
ResourceGroupName = ResourceGroupName
}, CustomResourceOptions);
return ListNamespaceKeys.Invoke(new ListNamespaceKeysInvokeArgs
{
AuthorizationRuleName = authorisationRule.Name,
NamespaceName = _eventHubNamespace.Name,
ResourceGroupName = ResourceGroupName
}, _invokeOptions).Apply(o => Output.CreateSecret(o.PrimaryConnectionString));
}
The Functions pass through IMocks.CallAsync()
, but the ListNamespaceKeysResult
type is sealed and the constructor private, and neither anonymous types nor a copy of the Result
type can be serialised by Pulumi. I feel like I'm missing something here, and the documentation isn't filling in the gap 😕
(For the purposes of the tests, I don't much care about the precise value of the PrimaryConnectionString
property--i.e., whether or not it's a valid connection string--and certainly don't care about the values of any of the other properties.)bored-activity-40468
11/10/2022, 8:49 PMProviders
is passed to a ComponentResource
will InvokeOptions
inherit the provider if its parent is set?bright-flag-46266
11/14/2022, 2:23 PMusers:
- user: foo
pass: bar
my C# configuration for doing this looks like the following
"users", new Dictionary<string, object>()
{
{"user", "foo"},
{"pass", "bar"}
}
but I am getting the following error from the pod
Expected users field to be an array, got map[pass:0xc000074e10 user:0xc000074e60]
how do I specify an array of values to a helm chart?
I have looked at the documentation for Helm Releases but it didn't help much https://www.pulumi.com/registry/packages/kubernetes/api-docs/helm/v3/release/#releaseancient-psychiatrist-43185
11/15/2022, 2:24 PMEventSubscription
with `DeliveryWithResourceIdentityArgs`for Azure provider.
Usings:
using Pulumi.AzureNative.EventGrid.V20220615;
using Pulumi.AzureNative.EventGrid.V20220615.Inputs;
Code:
var eventSubscription = new EventSubscription($"eventsub",
new EventSubscriptionArgs
{
EventDeliverySchema = EventDeliverySchema.EventGridSchema,
DeliveryWithResourceIdentity = new DeliveryWithResourceIdentityArgs
{
Destination = new ServiceBusQueueEventSubscriptionDestinationArgs
{
EndpointType = "ServiceBusQueue",
ResourceId = "nameofeventsub"
},
Identity = new EventSubscriptionIdentityArgs
{
Type = EventSubscriptionIdentityType.UserAssigned,
UserAssignedIdentity = "???"
}
},
[...]
Our problem is to determine in what format UserAssignedIdentity
should be passed. We tried id of the managed identity or client id with no success.
Error message:
resource partially created but read failed autorest/azure: Service returned an error. Status=404 Code="ResourceNotFound" Message="Event subscription doesn't exist.": Code="Internal error" Message="The operation failed due to an internal server error. The initial state of the impacted resources (if any) are restored. Please try again in few minutes. If error still persists, report 386223c4-3350-4378-9b5f-4f3e0d1a5e98:11/15/2022 2:00:16 PM (UTC) to our forums for assistance or raise a support ticket ."
Does anyone have an idea what should be passed in UserAssignedIdentity
?billowy-tiger-6272
11/23/2022, 2:50 PMvar resourceGroup = new ResourceGroup("resourceGroup");
, but this will generate a resource group with a random name, and that if you want to give a fixed name you need to specify it in the ResourceGroupArgs
class... But then we end up having like 2 instances of the resource "name"... How is this supposed to be handled correctly? I'd like to reduce code duplication (mainly if I'm interpolating the resources names based on the environment and such, but having to do twice for every resource looks kind of weird... Perhaps I'm misusing it... 🤔damp-honey-93158
11/24/2022, 12:03 PMorange-airplane-72526
12/05/2022, 2:48 PMvar program = PulumiFn.Create<MyStack>();
var stackArgs = new InlineProgramArgs("test", "a", program);
var stack = await LocalWorkspace.CreateOrSelectStackAsync(stackArgs);
await stack.SetConfigAsync("aws:region", new ConfigValue("eu-central-1"));
await stack.UpAsync();
little-library-54601
12/06/2022, 2:24 PMDiagnostics:
199 pulumi:pulumi:Stack (grv-api-resources-grv-api-dev):
200 You must install or update .NET to run this application.
201 App: /home/runner/work/GeneralRV-API/GeneralRV-API/Devops/azure-environment/pulumi/grv-api-resources/bin/Debug/netcoreapp3.1/grv-api-resources
202 Architecture: x64
203 Framework: '<http://Microsoft.NETCore.App|Microsoft.NETCore.App>', version '3.1.0' (x64)
204 .NET location: /usr/share/dotnet
205 The following frameworks were found:
206 6.0.11 at [/usr/share/dotnet/shared/Microsoft.NETCore.App]
207 7.0.0 at [/usr/share/dotnet/shared/Microsoft.NETCore.App]
Nothing about the action's dependence on .net core has changed since last week when it worked. I'll be looking into it shortly, but I thought someone here might be able to short-circuit my need to research. Is it possibly something as straightforward as a "uses" step within the job to explicitly reference a version of .net core?sticky-jordan-27156
12/07/2022, 6:35 PMpulumi:pulumi:Stack Telplin.Deploy-telplin Unhandled exception. System.AggregateException: One or more errors occurred. (The input does not contain any JSON tokens. Expected the input to start with a valid JSON token, when isFinalBlock is true. LineNumber: 0 | BytePositionInLine: 0.)
pulumi:pulumi:Stack Telplin.Deploy-telplin ---> System.Text.Json.JsonReaderException: The input does not contain any JSON tokens. Expected the input to start with a valid JSON token, when isFinalBlock is true. LineNumber: 0 | BytePositionInLine: 0.
pulumi:pulumi:Stack Telplin.Deploy-telplin at System.Text.Json.ThrowHelper.ThrowJsonReaderException(Utf8JsonReader& json, ExceptionResource resource, Byte nextByte, ReadOnlySpan`1 bytes)
pulumi:pulumi:Stack Telplin.Deploy-telplin at System.Text.Json.Utf8JsonReader.Read()
pulumi:pulumi:Stack Telplin.Deploy-telplin at System.Text.Json.JsonDocument.Parse(ReadOnlySpan`1 utf8JsonSpan, JsonReaderOptions readerOptions, MetadataDb& database, StackRowStack& stack)
pulumi:pulumi:Stack Telplin.Deploy-telplin at System.Text.Json.JsonDocument.Parse(ReadOnlyMemory`1 utf8Json, JsonReaderOptions readerOptions, Byte[] extraRentedArrayPoolBytes, PooledByteBufferWriter extraPooledByteBufferWriter)
pulumi:pulumi:Stack Telplin.Deploy-telplin at System.Text.Json.JsonDocument.Parse(ReadOnlyMemory`1 json, JsonDocumentOptions options)
pulumi:pulumi:Stack Telplin.Deploy-telplin at Pulumi.Deployment.ParseConfig()
pulumi:pulumi:Stack Telplin.Deploy-telplin at Pulumi.Deployment..ctor(RunnerOptions runnerOptions)
pulumi:pulumi:Stack Telplin.Deploy-telplin at Pulumi.Deployment.<>c.<RunAsync>b__108_0()
pulumi:pulumi:Stack Telplin.Deploy-telplin at Pulumi.Deployment.CreateRunnerAndRunAsync(Func`1 deploymentFactory, Func`2 runAsync)
I'm quite confused why this is happening, does this ring a bell for anyone?breezy-rocket-79823
12/08/2022, 10:09 AMconst alb = new awsx.lb.NetworkLoadBalancer("web-traffic");
const httpListener = alb.createListener("http-listener", { ... });
const target = alb.createTargetGroup("web-target", { ... });
I can't seem to find these methods when using C#. Are they located in static classes or are they just not there?adorable-house-55616
12/09/2022, 4:11 PMwitty-vegetable-61961
12/15/2022, 11:01 PMred-australia-25342
12/16/2022, 8:07 PMpulumi import azure:iot/ioTHub:IoTHub hub1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Devices/iotHubs/hub1
and replacing the subscription id, resource group name, and iot hub logical name and identifier. Am I missing something?
Is the iotHubs a placeholder for another id?freezing-ability-2805
12/16/2022, 10:18 PMmillions-journalist-34868
12/18/2022, 7:24 PMwhite-architect-1595
12/27/2022, 3:44 PMwhite-architect-1595
01/04/2023, 3:04 PMvar standardLogicApp = new Pulumi.AzureNative.Web.WebApp($"Instanda-{sn}-logic-", new()
{
Kind = "functionapp,workflowapp",
ResourceGroupName = resourceGroup.Name,
Location = resourceGroup.Location,
ServerFarmId = appServicePlace.Id,
SiteConfig = new SiteConfigArgs
{
AppSettings = new[]{
new NameValuePairArgs
{
Name = "FUNCTIONS_EXTENSION_VERSION",
Value = "~4"
},
new NameValuePairArgs
{
Name = "FUNCTIONS_WORKER_RUNTIME",
Value = "node"
},
new NameValuePairArgs
{
Name = "WEBSITE_NODE_DEFAULT_VERSION",
Value = "~14"
},
new NameValuePairArgs
{
Name = "WEBSITE_CONTENTSHARE",
Value = Output.Format($"{workflowfolder}")
},
new NameValuePairArgs
{
Name = "AzureWebJobsStorage",
Value = Output.Format($"DefaultEndpointsProtocol=https;AccountName={storageAccount.Name};AccountKey={primaryStorageKey};EndpointSuffix=<http://core.windows.net|core.windows.net>"),
},
new NameValuePairArgs
{
Name = "WEBSITE_CONTENTAZUREFILECONNECTIONSTRING",
Value = Output.Format($"DefaultEndpointsProtocol=https;AccountName={storageAccount.Name};AccountKey={primaryStorageKey};EndpointSuffix=<http://core.windows.net|core.windows.net>"),
},
new NameValuePairArgs
{
Name = "AzureFunctionsJobHost__extensionBundle__id",
Value = "Microsoft.Azure.Functions.ExtensionBundle.Workflows",
},
new NameValuePairArgs
{
Name = "AzureFunctionsJobHost__extensionBundle__version",
Value = "[1.*, 2.0.0)",
},
new NameValuePairArgs
{
Name = "APP_KIND",
Value = "workflowapp",
},
},
},
});
white-architect-1595
01/04/2023, 3:05 PMswift-island-2275
01/06/2023, 3:45 PMGetClientConfig
and GetClientToken
together with correct SDK to get it working. However, it seems that the token returned from GetClienToken
has different audience. When I run the code, I get an error:
{
"error": {
"code": "Unauthorized",
"message": "AKV10022: Invalid audience. Expected <https://vault.azure.net>, found: <https://management.azure.com/>."
}
}
I understand the message, however I am wondering how to get a token with correct audience. Any suggestions ?lively-pizza-96645
01/10/2023, 7:18 PMlively-pizza-96645
01/10/2023, 7:18 PMstocky-restaurant-98004
01/10/2023, 11:40 PMdependsOn
to the last thing to be provisioned. https://www.pulumi.com/registry/packages/command/api-docs/local/command/lively-pizza-96645
01/11/2023, 2:40 AMstocky-restaurant-98004
01/11/2023, 3:13 AMlively-pizza-96645
01/11/2023, 3:15 AMstocky-restaurant-98004
01/11/2023, 3:15 AMpulumi stack output kubeconfig --show-secrets > kubeconfig.yaml
lively-pizza-96645
01/11/2023, 3:16 AMstocky-restaurant-98004
01/11/2023, 3:18 AMvar creds = AzureNative.ContainerService.ListManagedClusterUserCredentials.Invoke(new() {
ResourceGroupName = resourceGroup.Name,
ResourceName = managedCluster.Name,
});
var encoded = creds.Apply(result => result.Kubeconfigs[0]!.Value);
var decoded = encoded.Apply(enc => {
var bytes = Convert.FromBase64String(enc);
return Encoding.UTF8.GetString(bytes);
});
var provider = new Provider("k8s", new ProviderArgs {
KubeConfig = decoded
});
// create K8s resources here
lively-pizza-96645
01/11/2023, 3:19 AMstocky-restaurant-98004
01/11/2023, 3:20 AMpulumi up
lively-pizza-96645
01/11/2023, 3:21 AMstocky-restaurant-98004
01/11/2023, 3:22 AMpulumi up
does not create a file, but you could do something like pulumi up -y && touch .make/pulumiup
or just use .PHONY
and run pulumi up
every time.lively-pizza-96645
01/11/2023, 3:23 AMstocky-restaurant-98004
01/11/2023, 4:35 PMOutput<string[]>
or Output<string>[]
. I believe the former is preferred.bored-activity-40468
01/11/2023, 5:25 PM