pulumi/tests/integration/stack_component/dotnet/Program.cs
Mikhail Shilkov 66de4a48b7
First-class Stack component for .NET (#3618)
First-class Stack component for .NET
2019-12-23 08:31:12 +01:00

30 lines
746 B
C#

// Copyright 2016-2019, Pulumi Corporation. All rights reserved.
using System.Collections.Generic;
using System.Threading.Tasks;
using Pulumi;
using Pulumi.Serialization;
class MyStack : Stack
{
[Output("abc")]
public Output<string> Abc { get; private set; }
[Output]
public Output<int> Foo { get; private set; }
// This should NOT be exported as stack output due to the missing attribute
public Output<string> Bar { get; private set; }
public MyStack()
{
this.Abc = Output.Create("ABC");
this.Foo = Output.Create(42);
this.Bar = Output.Create("this should not come to output");
}
}
class Program
{
static Task<int> Main(string[] args) => Deployment.RunAsync<MyStack>();
}