fresh-lifeguard-12682
10/23/2020, 10:17 PMPulumi.Azure.CosmosDB.GetAccountResult
? it looks like that only the MasterKey is in that object. However if I use Pulumi.Azure.CosmosDB.Account
there is a ConnectionStrings
property available. I cant use the last approach since I only have the Account
available in the stack that creates the Cosmos Account, I have another stack calling the GetAccountResult
which is the one that needs the Connection String.some-flower-64874
10/28/2020, 9:46 AMOutput<ImmutableArray<x>>
that I want to "map" to an InputList<y>
(where y is x.Id
) - there's a step here I'm failing to take (I think I want the opposite of all...). For extra credit in F#
🙂some-flower-64874
10/28/2020, 10:15 AMpublic static implicit operator InputList<T>(Output<IEnumerable<T>> values)
=> values.Apply(a => ImmutableArray.CreateRange(a));
asking the question got me closer...fresh-lifeguard-12682
10/29/2020, 5:24 PMazure:appservice:AppService (connectmga-location-cde):
error: transport is closingbored-activity-40468
10/31/2020, 2:50 PM(string)resource["kind"] == kind
does? Thanks.wet-noon-14291
11/08/2020, 11:58 PMApply
on a Name
for example and then run some kind there?fresh-lifeguard-12682
11/09/2020, 1:52 AMfresh-lifeguard-12682
11/09/2020, 2:17 AMvar webApiHybridConnection = new HybridConnection(
hybridConnectionName,
new Pulumi.Azure.AppService.HybridConnectionArgs
{
AppServiceName = appServiceName,
ResourceGroupName = resourceGroupName,
RelayId = "what goes here?",
Hostname = "",
Port = 443,
SendKeyName = $"{_nameSet.AppServiceName(new ServiceName(ServiceName))}-sk",
});
bored-activity-40468
11/10/2020, 8:05 PMwet-noon-14291
11/11/2020, 2:13 PMSystem.Collections.Generic.KeyNotFoundException: Required output 'Pulumi.Input`1[System.String]' does not exist on stack '<stack name>'it is super hard to debug this when the stacktrace is only referring to pulumi code and it doesn't say what key that is missing. The code also works when deploying to one environment, but fails for another. The config file should be close to identical...
early-sugar-1496
11/13/2020, 12:39 PMvar aksCluster = new AzureContainerService.ManagedCluster(
"test",
new AzureContainerService.ManagedClusterArgs{});
var kubeConfig = AzureContainerService.ListManagedClusterAdminCredentials.InvokeAsync(
new AzureContainerService.ListManagedClusterAdminCredentialsArgs
{
ResourceGroupName = resourceGroup.Name,
ResourceName = aksCluster.Name,
}).Result.Kubeconfigs;
Doesn't compile, with an error on both ResourceGroupName
and ResourceName
, Cannot convert source type 'Pulumi.Output<string>' to target type 'string'
I'm pretty sure I've got a misunderstanding of properly using outputs 🤔 thankspowerful-printer-57241
11/13/2020, 2:54 PMpulumi config set --secret databaseServerPassword "abcdef"
In a stack, we have
var databaseServerPassword = config.RequireSecret("databaseServerPassword");
...
var database = new Database(...); // This works fine
return new AppService(
resourcesPrefix,
new AppServiceArgs
{
Name = resourcesPrefix,
AppServicePlanId = appServicePlanId,
ResourceGroupName = resourceGroupName,
ConnectionStrings =
{
new AppServiceConnectionStringArgs
{
Name = "Database",
Type = "SQLAzure",
Value = Output.Tuple(database.ServerName, database.Name, databaseServerPassword).Apply(t =>
{
var (serverName, databaseName, databasePassword) = t;
return $"Data Source=tcp:{serverName}.<http://database.windows.net|database.windows.net>,1433;Initial Catalog={databaseName};User ID={databaseUsername}@{serverName};Password={databasePassword}";
})
}
}
}
);
The app service is created fine, but without the connection string. If we remove databaseServerPassword from Output.Tuple (and remove the corresponding variable from the connection string), it works fine.
Is there a problem in the way we work with secrets/output?breezy-salesmen-85534
11/19/2020, 8:05 AMdelightful-lizard-41466
11/22/2020, 4:18 PMcuddly-smartphone-15267
12/02/2020, 11:20 AMreduce
and apply
just confused me a lot.. the example is basically creating some dns records for a certificate validation
const exampleRecord: aws.route53.Record[];
for (const range of Object.entries(exampleCertificate.domainValidationOptions.apply(domainValidationOptions => domainValidationOptions.reduce((__obj, dvo) => { ...__obj, [dvo.domainName]: {
name: dvo.resourceRecordName,
record: dvo.resourceRecordValue,
type: dvo.resourceRecordType,
} }))).map(([k, v]) => {key: k, value: v})) {
exampleRecord.push(new aws.route53.Record(`exampleRecord-${range.key}`, {
allowOverwrite: true,
name: range.value.name,
records: [range.value.record],
ttl: 60,
type: range.value.type,
zoneId: exampleZone.then(exampleZone => exampleZone.zoneId),
}));
}
const exampleCertificateValidation = new aws.acm.CertificateValidation("exampleCertificateValidation", {
certificateArn: exampleCertificate.arn,
validationRecordFqdns: exampleRecord.apply(exampleRecord => exampleRecord.map(record => record.fqdn)),
});
anybody that is more familiar with typescript than me perhaps suggest how to port it to the equivalent c# code?late-salesmen-25375
12/02/2020, 9:38 PMpulumi up
output the IPv4 and the name of each server for the output which didn’t work when spinning up more than just the one.
I thought maybe I could create an Output class sort of like a Model and use that to build my output for the resource types I was building but that sort of didn’t work or . Maybe that is just unnecessary complexity but I thought it might make the project a little cleaner or have the output models in a separate project that could be reused across other projects and I just add a reference to that project. Maybe a NuGet type thing to import that would give you access to all the output information so you didn’t have to rewrite that code again?
Any examples of something like this or is this just going about it the wrong way? Or any examples of how others are doing it. I have a very small use case for what I am doing here but could see this being useful in larger build outs of infrastructure in the future. Again I am not a seasoned developer so sorry if someone of this sounds like WTH is this guy talking about. Thanks for any insight.tall-needle-56640
12/04/2020, 5:52 PMreadonly result: Promise<T>;
resolveResult!: (v: any) => void;
rejectResult!: (e: Error) => void;
constructor(program: () => Promise<T>) {
this.program = program;
this.result = new Promise<any>((resolve, reject) => {
this.resolveResult = resolve;
this.rejectResult = reject;
});
this.running = false;
}
bored-activity-40468
12/15/2020, 11:20 PMaws:region
to invalid and with 2.15.6 pulumi it says, invalid is an invalid aws region. Did that functionality change?chilly-hairdresser-56259
12/22/2020, 10:57 PMbitter-coat-39627
12/28/2020, 4:38 AMPulumi.<some-name>.yaml
files work. Right now, I'm doing an experiment and created three separate yaml files:
Pulumi.yaml
Pulumi.dev.yaml
Pulumi.prod.yaml
I added a specific variable to the Pulumi.dev.yaml
and Pulumi.prod.yaml
ones called app:environment
(setting the values to dev
and prod
, respectively) and then added this bit of code to my stack class so I can see the output:
var config = new Config();
var env = config.Require("app:environment");
Console.WriteLine(env);
Now, when I run pulumi up
for my dev
stack, it gives me the following error:
Missing Required configuration variable 'dotnettestservice:app:environment'
It looks like it's looking for it in Pulumi.yaml
, not Pulumi.<env>.yaml
.
I have dotnettestservice
defined under the name:
parameter in my Pulumi.yaml
, not in Pulumi.dev.yaml
, nor Pulumi.prod.yaml
. When I do a pulumi config get app:environment
, it gives me the correct value of dev
.
My question is, am I allowed to have different required parameters based on the stack? Do I have to have a separate name
parameter in each of these so it doesn't try to use the Pulumi.yaml
one?
Also, feel free to let me know if I'm not making sense and need to clarify anything (or if I'm going about this the completely wrong way) 😅 I appreciate any insight you might have ❤️loud-shampoo-49194
12/29/2020, 10:38 AMloud-shampoo-49194
12/30/2020, 10:48 AMchilly-hairdresser-56259
01/05/2021, 1:47 AMwitty-market-32785
01/06/2021, 2:16 PMbrainy-ocean-92780
01/06/2021, 9:20 PMbusy-dress-78329
01/13/2021, 2:22 AMtall-needle-56640
01/13/2021, 11:01 PMprivate static void FunctionDoesNotFinish(Output<string> someValue)
{
_ = someValue.Apply<string?>(async c =>
{
Console.WriteLine("Start");
for (int i = 0; i <= 1000; i++)
{
Console.WriteLine(i);
await Task.Delay(1);
}
Console.WriteLine("End");
return null;
});
}
And here is the output:
Diagnostics:
pulumi😛ulumi:Stack (AzureSqlAad-dev-asa2):
Start
0
1
2
3Numbers 4-100 never appear. I'm guessing
Output.Create
might be recommended, but I can't get that to work either.
private static void FunctionDoesNotFinish(Output<string> someValue)
{
_ = someValue.Apply<string?>(s => Output.Create<string?>(SomeMethod()));
}
private static async Task<string?> SomeMethod()
{
Console.WriteLine("Start");
for (int i = 0; i <= 1000; i++)
{
Console.WriteLine(i);
await Task.Delay(1);
}
Console.WriteLine("End");
return null;
}
NOTE: My actual code is just adding a user to the DB, so I don't actually care about the return value.
@tall-librarian-49374brainy-ocean-92780
01/22/2021, 8:21 PMexport { resourceGroup }
where resourceGroup was the result of a declaration.
In c# however I get an error stating that the type must be of Output<T>, so in this case Output<ResourceGroup>, but the result of declaring a ResourceGroup is not Output<ResourceGroup> it's ResourceGroup. Is there a way in c# to either convert this resource to the output version of itself? Or is it possible to have the pulumi application have outputs that are not of Output<T>?brainy-ocean-92780
01/22/2021, 8:22 PMbreezy-salesmen-85534
01/26/2021, 10:57 AMusing System.ComponentModel;
using System.Linq;
using System.Threading.Tasks;
using Pulumi.Azure.ContainerService;
using Vipps.Vce.Core;
using Xunit;
namespace Vipps.Vce.International.BlueGreen.Tests
{
public class BLueGreenStackTests
{
[Fact]
public async Task Test_BaseStack_Constructor_CreatesAKS()
{
var resources = await Testing.RunAsync<BlueGreenStack>(); <-- stacktrace covers this
var aks = resources.OfType<KubernetesCluster>().FirstOrDefault();
Assert.NotNull(aks);
Assert.Equal(name, await aks.Name.GetValueAsync());
}
}
}
This test crashes with a stacktrace where I am responsible for a single test line 😅 How do I approach this crash?breezy-salesmen-85534
01/26/2021, 10:57 AMusing System.ComponentModel;
using System.Linq;
using System.Threading.Tasks;
using Pulumi.Azure.ContainerService;
using Vipps.Vce.Core;
using Xunit;
namespace Vipps.Vce.International.BlueGreen.Tests
{
public class BLueGreenStackTests
{
[Fact]
public async Task Test_BaseStack_Constructor_CreatesAKS()
{
var resources = await Testing.RunAsync<BlueGreenStack>(); <-- stacktrace covers this
var aks = resources.OfType<KubernetesCluster>().FirstOrDefault();
Assert.NotNull(aks);
Assert.Equal(name, await aks.Name.GetValueAsync());
}
}
}
This test crashes with a stacktrace where I am responsible for a single test line 😅 How do I approach this crash?