2023-03-08 13:21:34 +00:00
|
|
|
using System.Collections.Generic;
|
2023-03-24 09:40:18 +00:00
|
|
|
using System.Linq;
|
2023-03-08 13:21:34 +00:00
|
|
|
using Pulumi;
|
|
|
|
|
|
|
|
return await Deployment.RunAsync(() =>
|
|
|
|
{
|
|
|
|
var simpleComponent = new Components.SimpleComponent("simpleComponent");
|
|
|
|
|
2023-12-14 15:43:27 +00:00
|
|
|
var multipleSimpleComponents = new List<Components.SimpleComponent>();
|
|
|
|
for (var rangeIndex = 0; rangeIndex < 10; rangeIndex++)
|
|
|
|
{
|
|
|
|
var range = new { Value = rangeIndex };
|
|
|
|
multipleSimpleComponents.Add(new Components.SimpleComponent($"multipleSimpleComponents-{range.Value}"));
|
|
|
|
}
|
2023-07-27 13:15:27 +00:00
|
|
|
var anotherComponent = new Components.AnotherComponent("anotherComponent");
|
|
|
|
|
2023-03-08 13:21:34 +00:00
|
|
|
var exampleComponent = new Components.ExampleComponent("exampleComponent", new()
|
|
|
|
{
|
|
|
|
Input = "doggo",
|
2023-03-20 19:56:24 +00:00
|
|
|
IpAddress = new[]
|
|
|
|
{
|
|
|
|
127,
|
|
|
|
0,
|
|
|
|
0,
|
|
|
|
1,
|
|
|
|
},
|
|
|
|
CidrBlocks =
|
|
|
|
{
|
|
|
|
{ "one", "uno" },
|
|
|
|
{ "two", "dos" },
|
|
|
|
},
|
2023-03-23 22:25:21 +00:00
|
|
|
GithubApp = new Components.ExampleComponentArgs.GithubAppArgs
|
|
|
|
{
|
|
|
|
Id = "example id",
|
|
|
|
KeyBase64 = "base64 encoded key",
|
|
|
|
WebhookSecret = "very important secret",
|
|
|
|
},
|
|
|
|
Servers = new[]
|
|
|
|
{
|
|
|
|
new Components.ExampleComponentArgs.ServersArgs
|
|
|
|
{
|
|
|
|
Name = "First",
|
|
|
|
},
|
|
|
|
new Components.ExampleComponentArgs.ServersArgs
|
|
|
|
{
|
|
|
|
Name = "Second",
|
|
|
|
},
|
|
|
|
},
|
|
|
|
DeploymentZones =
|
|
|
|
{
|
|
|
|
{ "first", new Components.ExampleComponentArgs.DeploymentZonesArgs
|
|
|
|
{
|
|
|
|
Zone = "First zone",
|
|
|
|
} },
|
|
|
|
{ "second", new Components.ExampleComponentArgs.DeploymentZonesArgs
|
|
|
|
{
|
|
|
|
Zone = "Second zone",
|
|
|
|
} },
|
|
|
|
},
|
2023-03-08 13:21:34 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
return new Dictionary<string, object?>
|
|
|
|
{
|
|
|
|
["result"] = exampleComponent.Result,
|
|
|
|
};
|
|
|
|
});
|
|
|
|
|