Beispiel #1
0
        private static async Task <WorkspaceStack> CreateStackHelperAsync(
            LocalProgramArgs args,
            Func <string, Workspace, CancellationToken, Task <WorkspaceStack> > initFunc,
            CancellationToken cancellationToken)
        {
            var ws = new LocalWorkspace(
                new LocalPulumiCmd(),
                args,
                cancellationToken);
            await ws._readyTask.ConfigureAwait(false);

            return(await initFunc(args.StackName, ws, cancellationToken).ConfigureAwait(false));
        }
Beispiel #2
0
 /// <summary>
 /// Creates or selects an existing Stack with a <see cref="LocalWorkspace"/> utilizing the local Pulumi CLI program
 /// from the specified <see cref="LocalWorkspaceOptions.WorkDir"/>. This is a way to create drivers
 /// on top of pre-existing Pulumi programs. This Workspace will pick up any available Settings
 /// files(Pulumi.yaml, Pulumi.{stack}.yaml).
 /// </summary>
 /// <param name="args">
 ///     A set of arguments to initialize a Stack with a pre-configured Pulumi CLI program that
 ///     already exists on disk, as well as any additional customizations to be applied to the
 ///     workspace.
 /// </param>
 /// <param name="cancellationToken">A cancellation token.</param>
 public static Task <WorkspaceStack> CreateOrSelectStackAsync(LocalProgramArgs args, CancellationToken cancellationToken)
 => CreateStackHelperAsync(args, WorkspaceStack.CreateOrSelectAsync, cancellationToken);
Beispiel #3
0
 /// <summary>
 /// Creates or selects an existing Stack with a <see cref="LocalWorkspace"/> utilizing the local Pulumi CLI program
 /// from the specified <see cref="LocalWorkspaceOptions.WorkDir"/>. This is a way to create drivers
 /// on top of pre-existing Pulumi programs. This Workspace will pick up any available Settings
 /// files(Pulumi.yaml, Pulumi.{stack}.yaml).
 /// </summary>
 /// <param name="args">
 ///     A set of arguments to initialize a Stack with a pre-configured Pulumi CLI program that
 ///     already exists on disk, as well as any additional customizations to be applied to the
 ///     workspace.
 /// </param>
 public static Task <WorkspaceStack> CreateOrSelectStackAsync(LocalProgramArgs args)
 => CreateOrSelectStackAsync(args, default);