salmon-egg-38815
05/24/2021, 5:09 PMenough-garden-22763
05/25/2021, 4:11 PMTask
and Task<T>
, and correspondingly do we want to model something similar to value-less Task
in the Output<T>
layer? I am going for Output<Object>
carrying a null
to correspond to “value-less” task. I really like how F# does it with unit
type but that seems to not to be in .NET stdlib.bumpy-motorcycle-53357
05/25/2021, 4:42 PMworried-city-86458
05/27/2021, 11:49 PMawait
an Output<T>
rather than use Output<T>.Apply
, how should I do that? Any examples?boundless-monkey-2042
06/02/2021, 8:20 PMmysterious-australia-14256
06/09/2021, 11:20 AMmysterious-australia-14256
06/09/2021, 12:10 PMSku = new AzureNative.ServiceBus.Inputs.SBSkuArgs
{
Name = "Standard",
Tier = "Standard",
},
The error I get is of the type
Cannot implicitly convert type 'string' to 'Pulumi.Input<Pulumi.AzureNative.ServiceBus.SkuName>'
Can someone let me know what I am missing?
Thanks
Alanworried-city-86458
06/14/2021, 12:51 AMpowerful-football-81694
06/14/2021, 7:44 PMpulumi stack output SomeOutput --stack DaRosenberg/OrgFlow/stackName
I’ve tried referencing the Pulumi
package and using a StackReference.GetValueAsync()
call, but that only gives me:
System.InvalidOperationException : Trying to acquire Deployment.Instance before 'Run' was called.
What’s the right way? Do I need to use the Automation API for things like this?colossal-vr-62639
06/23/2021, 5:51 AMreturn new Dictionary<string, object?>()
{
{
"subnets-public",
new[] {componentOne.PublicSubnet0.Apply(x => x.Id), componentOne.PublicSubnet1.Apply(x => x.Id)}
},
};
and then in some other project, read the outputs from the stack...
var subnets = stack.GetOutput("subnets-public")
fast-cpu-35756
06/24/2021, 5:23 PMScheduledAction
in AWS:
var scheduledScaleOutAction = new ScheduledAction($"{name}-scheduled-scale-out", new ScheduledActionArgs
{
Schedule = "cron(0 00 23 ? * * *)",
ServiceNamespace = appScaleTarget.ServiceNamespace,
ScalableDimension = appScaleTarget.ScalableDimension,
ResourceId = appScaleTarget.ResourceId,
ScalableTargetAction = new ScheduledActionScalableTargetActionArgs
{
MinCapacity = 3,
MaxCapacity = 9,
},
});
I’m getting the following error:
Diagnostics:
pulumi:pulumi:Stack (IdP-Production):
error: Running program '/Users/alibazzi/Documents/GitHub/*******.IaC.dll' failed with an unhandled exception:
System.InvalidOperationException: Expected System.Double but got System.String deserializing Pulumi.Aws.AppAutoScaling.Outputs.ScheduledActionScalableTargetAction(maxCapacity)
at Pulumi.Serialization.Converter.ConvertObject(String context, Object val, Type targetType)
at Pulumi.Serialization.Converter.ConvertValue(String context, Value value, Type targetType, ImmutableHashSet`1 resources)
at Pulumi.Deployment.CompleteResourceAsync(Resource resource, Boolean remote, Func`2 newDependency, ResourceArgs args, ResourceOptions options, ImmutableDictionary`2 completionSources)
at Pulumi.Deployment.Runner.<>c__DisplayClass9_0.<<WhileRunningAsync>g__HandleCompletion|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at Pulumi.Deployment.Runner.WhileRunningAsync()
mysterious-australia-14256
06/25/2021, 2:20 PMPulumi.Config config = new Pulumi.Config();
var mySettings = config.RequireObject<MyModel>("Key");
MyModel contains several properties and I've recently tried to add a new one with a type of Pulumi.Input<string>?. Since adding that if I try to run the code I get an error saying
The JSON value could not be converted to Pulumi.Input`1[System.String]
Is this possible at all?mysterious-australia-14256
06/25/2021, 4:02 PMboundless-monkey-2042
06/25/2021, 5:28 PMenough-butcher-66045
06/30/2021, 10:13 AMpulumi import
output into C#
This is what pulumi gives me...
var slack_webhook = new AzureNative.Web.WebAppFunction("slack-webhook", new AzureNative.Web.WebAppFunctionArgs
{
Config =
{
{ "bindings",
{
{
{ "authLevel", "function" },
{ "direction", "in" },
{ "methods",
{
"get",
"post",
} },
{ "name", "req" },
{ "type", "httpTrigger" },
},
{
{ "direction", "out" },
{ "name", "res" },
{ "type", "http" },
},
} },
},
This is what I've mapped the Config to:
Config = new {
Bindings = new object[]
{
new
{
AuthLevel = "function",
Direction = "in",
Name = "req",
Type = "httpTrigger"
},
new
{
Direction = "out",
Name = "res",
Type = "http"
}
}
},
I have no syntax errors in the IDE, but when I try running it I get:
System.InvalidOperationException: <>f__AnonymousType0`1[[System.Object[], System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=asdasd]] is not a supported argument type.
resource:slack-webhook[azure-native:web:WebAppFunction].config.id
at Pulumi.Serialization.Serializer.SerializeAsync(String ctx, Object prop, Boolean keepResources)
at Pulumi.Serialization.Serializer.SerializeAsync(String ctx, Object prop, Boolean keepResources)
at Pulumi.Serialization.Serializer.SerializeAsync(String ctx, Object prop, Boolean keepResources)
at Pulumi.Deployment.SerializeFilteredPropertiesAsync(String label, IDictionary`2 args, Predicate`1 acceptKey, Boolean keepResources)
at Pulumi.Deployment.PrepareResourceAsync(String label, Resource res, Boolean custom, Boolean remote, ResourceArgs args, ResourceOptions options)
at Pulumi.Deployment.RegisterResourceAsync(Resource resource, Boolean remote, Func`2 newDependency, ResourceArgs args, ResourceOptions options)
at Pulumi.Deployment.ReadOrRegisterResourceAsync(Resource resource, Boolean remote, Func`2 newDependency, ResourceArgs args, ResourceOptions options)
at Pulumi.Deployment.CompleteResourceAsync(Resource resource, Boolean remote, Func`2 newDependency, ResourceArgs args, ResourceOptions options, ImmutableDictionary`2 completionSources)
at Pulumi.Deployment.Runner.<>c__DisplayClass9_0.<<WhileRunningAsync>g__HandleCompletion|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at Pulumi.Deployment.Runner.WhileRunningAsync()
I'm wondering what should I use instead?
This is what the WebAppFunctionArgs type hint looks like (this is for azure native)
Thanksenough-butcher-66045
06/30/2021, 10:37 AMerror: Code="BadRequest" Message="Encountered an error (InternalServerError) from host runtime." Details=[{"Message":"Encountered an error (InternalServerError) from host runtime."},{"Code":"BadRequest"},{"ErrorEntity":{"Code":"
BadRequest","Message":"Encountered an error (InternalServerError) from host runtime."}}]
enough-butcher-66045
06/30/2021, 10:37 AMConfig = new Dictionary<string, Dictionary<string, string>[]>
{
{
"Bindings", new[]
{
new Dictionary<string, string>
{
{"AuthLevel", "function"},
{"Direction", "in"},
{"Name", "req"},
{"Type", "httpTrigger"},
},
new Dictionary<string, string>
{
{"Direction", "out"},
{"Name", "res"},
{"Type", "http"}
}
}
},
},
that's how the config looksenough-butcher-66045
06/30/2021, 10:44 AMConfig = new Dictionary<string, Dictionary<string, string>[]>
{
{
"bindings", new[]
{
new Dictionary<string, string>
{
{"authLevel", "function"},
{"direction", "in"},
{"name", "req"},
{"type", "httpTrigger"},
},
new Dictionary<string, string>
{
{"direction", "out"},
{"name", "res"},
{"type", "http"}
}
}
},
},
worried-city-86458
07/01/2021, 8:56 PMboundless-monkey-2042
07/02/2021, 5:58 AM{
"dev": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/spoke-dev-rg-00000/providers/Microsoft.Network/virtualNetworks/spoke-dev-vnet-00000000/subnets/development"
}
breezy-salesmen-85534
07/02/2021, 1:30 PMnice-scientist-89715
07/06/2021, 4:19 PM* ClientException: Environment variable name cannot be null or blank.
Seems to stem from the ContainerDefinitions
https://gist.github.com/urothis/197e866016a47d7f9db8e03596d2ef5b
Probably related to doing
{"environment", new[] { new Dictionary<string, object> {
{"PG_ENDPOINT", "potato"},
{"PG_READ_ENDPOINT", "banana"},
{"ASPNETCORE_URLS", "test"}
}}
},
Improperly.colossal-vr-62639
07/08/2021, 6:33 AMPath
property of sorts (e.g. https://www.pulumi.com/docs/reference/pkg/aws/apigatewayv2/apimapping/) whereby I can configure/specify the path as illustrated in the AWS Console for API Mappings...sticky-jordan-27156
07/17/2021, 12:39 PMRun pulumi/actions@v3
with:
command: up
stack-name: main
work-dir: ./infrastructure
comment-on-pr: false
github-token: ***
parallel: 2147483647
target-dependents: false
refresh: false
upsert: false
edit-pr-comment: true
env:
DOTNET_ROOT: /home/runner/.dotnet
ARM_SUBSCRIPTION_ID: ***
ARM_CLIENT_ID: ***
ARM_CLIENT_SECRET: ***
ARM_TENANT_ID: ***
PULUMI_ACCESS_TOKEN: ***
Configured range: ^3
Matched version: v3.7.0
Install destination is /home/runner/.pulumi
Successfully deleted pre-existing /home/runner/.pulumi/bin
/usr/bin/tar xz --warning=no-unknown-keyword --overwrite -C /home/runner/.pulumi -f /home/runner/work/_temp/b8f38ed6-cbc6-46f5-91a3-80f973240b88
pulumi up on main
Updating (main)
View Live: <https://app.pulumi.com/nojaf/fantomas-tools/main/updates/782>
pulumi:pulumi:Stack fantomas-tools-main running 'dotnet build -nologo .'
pulumi:pulumi:Stack fantomas-tools-main Determining projects to restore...
pulumi:pulumi:Stack fantomas-tools-main /home/runner/.dotnet/sdk/5.0.202/NuGet.targets(131,5): error : Access to the path '/home/runner/work/fantomas-tools/fantomas-tools/infrastructure/obj/1923872f-f258-4991-ba9e-d6d99ee380f4.tmp' is denied. [/home/runner/work/fantomas-tools/fantomas-tools/infrastructure/infrastructure.fsproj]
pulumi:pulumi:Stack fantomas-tools-main
pulumi:pulumi:Stack fantomas-tools-main
pulumi:pulumi:Stack fantomas-tools-main Determining projects to restore...
pulumi:pulumi:Stack fantomas-tools-main /home/runner/.dotnet/sdk/5.0.202/NuGet.targets(131,5): error : Access to the path '/home/runner/work/fantomas-tools/fantomas-tools/infrastructure/obj/1923872f-f258-4991-ba9e-d6d99ee380f4.tmp' is denied. [/home/runner/work/fantomas-tools/fantomas-tools/infrastructure/infrastructure.fsproj]
pulumi:pulumi:Stack fantomas-tools-main /home/runner/.dotnet/sdk/5.0.202/NuGet.targets(131,5): error : Permission denied [/home/runner/work/fantomas-tools/fantomas-tools/infrastructure/infrastructure.fsproj]
pulumi:pulumi:Stack fantomas-tools-main Build FAILED.
pulumi:pulumi:Stack fantomas-tools-main /home/runner/.dotnet/sdk/5.0.202/NuGet.targets(131,5): error : Access to the path '/home/runner/work/fantomas-tools/fantomas-tools/infrastructure/obj/1923872f-f258-4991-ba9e-d6d99ee380f4.tmp' is denied. [/home/runner/work/fantomas-tools/fantomas-tools/infrastructure/infrastructure.fsproj]
pulumi:pulumi:Stack fantomas-tools-main /home/runner/.dotnet/sdk/5.0.202/NuGet.targets(131,5): error : Permission denied [/home/runner/work/fantomas-tools/fantomas-tools/infrastructure/infrastructure.fsproj]
pulumi:pulumi:Stack fantomas-tools-main 0 Warning(s)
pulumi:pulumi:Stack fantomas-tools-main 1 Error(s)
pulumi:pulumi:Stack fantomas-tools-main Time Elapsed 00:00:06.55
pulumi:pulumi:Stack fantomas-tools-main 9 messages
Diagnostics:
pulumi:pulumi:Stack (fantomas-tools-main):
Determining projects to restore...
/home/runner/.dotnet/sdk/5.0.202/NuGet.targets(131,5): error : Access to the path '/home/runner/work/fantomas-tools/fantomas-tools/infrastructure/obj/1923872f-f258-4991-ba9e-d6d99ee380f4.tmp' is denied. [/home/runner/work/fantomas-tools/fantomas-tools/infrastructure/infrastructure.fsproj]
/home/runner/.dotnet/sdk/5.0.202/NuGet.targets(131,5): error : Permission denied [/home/runner/work/fantomas-tools/fantomas-tools/infrastructure/infrastructure.fsproj]
Build FAILED.
/home/runner/.dotnet/sdk/5.0.202/NuGet.targets(131,5): error : Access to the path '/home/runner/work/fantomas-tools/fantomas-tools/infrastructure/obj/1923872f-f258-4991-ba9e-d6d99ee380f4.tmp' is denied. [/home/runner/work/fantomas-tools/fantomas-tools/infrastructure/infrastructure.fsproj]
/home/runner/.dotnet/sdk/5.0.202/NuGet.targets(131,5): error : Permission denied [/home/runner/work/fantomas-tools/fantomas-tools/infrastructure/infrastructure.fsproj]
0 Warning(s)
1 Error(s)
Time Elapsed 00:00:06.55
Error: code: 255
I'm getting file access errors, any ideas if I missed a setting somewhere?
I'm very puzzled why this suddenly is a problem. Full link: https://github.com/fsprojects/fantomas-tools/runs/3092987675?check_suite_focus=true
Is anyone doing something similar by any chance?sticky-jordan-27156
07/18/2021, 11:23 AMmammoth-toothbrush-9728
07/19/2021, 7:09 AMStorageAccount
object, and wish to pass its connection string on to my web app, but as opposed to the older Azure package, theres no PrimaryConnectionString
property in the StorageAccount
object anymore. I also couldn't see the Keys for the storage account in order to create the connection string manually. Can anyone guide me ?mysterious-australia-14256
07/23/2021, 9:26 AM[Output]
public Output<Pulumi.AzureNative.OperationalInsights.Workspace> LogAnalyticsWorkspace { get; set; }
That seems to go out OK with the results something like
Outputs:
+ LogAnalyticsWorkspace: {
+ URN: "urn:pulumi:<stackname>::<projectname>::azure-native:resources:ResourceGroup$azure-native:operationalinsights:Workspace::<workspacename>"
+ ID : "/subscriptions/<subscriptionid>/resourcegroups/<resourcegroupname>/providers/microsoft.operationalinsights/workspaces/<workspacename>"
+ PackageVersion: ""
}
However when I try create a stack reference in the second project with the following code I get an error
var coreStackReference = new StackReference("coreStackReference", new StackReferenceArgs
{
Name = "<stackname>",
});
The error is
invocation of pulumi:pulumi:getResource returned an error: unknown resource urn:pulumi:<stackname>::<projectname>::azure-native:resources:ResourceGroup$azure-native:operationalinsights:Workspace::<workspacename>
Is it incorrect to try and pass objects in this way? I don't seem to get the errors when just passing strings so do I need to just pass IDs rather than objects and then rehydrate them somehow?little-cartoon-10569
07/26/2021, 5:23 AMApply(v => v.ToString())
. None of the other languages have that. Is it neccessary? If it is, why?boundless-monkey-2042
07/29/2021, 2:50 PMvar wwwroot = new Storage.Blob("wwwroot", new Storage.BlobArgs
{
ResourceGroupName = resourceGroup.Name,
AccountName = storageAccount.Name,
ContainerName = staticWebsite.ContainerName,
Source = new FileArchive(".\\wwwroot.zip"),
ContentType = "Folder",
});
rhythmic-vegetable-87369
08/04/2021, 1:33 AM