1. Docs
  2. Pulumi CLI
  3. Commands
  4. pulumi stack init

pulumi stack init

    Create an empty stack with the given name, ready for updates

    Synopsis

    Create an empty stack with the given name, ready for updates

    This command creates an empty stack with the given name. It has no resources, but afterwards it can become the target of a deployment using the update command.

    To create a stack in an organization when logged in to the Pulumi Cloud, prefix the stack name with the organization name and a slash (e.g. ‘acmecorp/dev’)

    By default, a stack created using the pulumi.com backend will use the pulumi.com secrets provider and a stack created using the local or cloud object storage backend will use the passphrase secrets provider. A different secrets provider can be selected by passing the --secrets-provider flag.

    To use the passphrase secrets provider with the pulumi.com backend, use:

    • pulumi stack init --secrets-provider=passphrase

    To use a cloud secrets provider with any backend, use one of the following:

    • pulumi stack init --secrets-provider="awskms://alias/ExampleAlias?region=us-east-1"
    • pulumi stack init --secrets-provider="awskms://1234abcd-12ab-34cd-56ef-1234567890ab?region=us-east-1"
    • pulumi stack init --secrets-provider="azurekeyvault://mykeyvaultname.vault.azure.net/keys/mykeyname"
    • pulumi stack init --secrets-provider="gcpkms://projects/<p>/locations/<l>/keyRings/<r>/cryptoKeys/<k>"
    • pulumi stack init --secrets-provider="hashivault://mykey" A stack can be created based on the configuration of an existing stack by passing the --copy-config-from flag.
    • pulumi stack init --copy-config-from dev
    pulumi stack init [<org-name>/]<stack-name> [flags]
    

    Options

          --copy-config-from string   The name of the stack to copy existing config from
      -h, --help                      help for init
          --no-select                 Do not select the stack
          --secrets-provider string   The type of the provider that should be used to encrypt and decrypt secrets
                                      (possible choices: default, passphrase, awskms, azurekeyvault, gcpkms, hashivault)
      -s, --stack string              The name of the stack to create
          --teams stringArray         A list of team names that should have permission to read and update this stack, once created
    

    Options inherited from parent commands

          --color string                 Colorize output. Choices are: always, never, raw, auto (default "auto")
      -C, --cwd string                   Run pulumi as if it had been started in another directory
          --disable-integrity-checking   Disable integrity checking of checkpoint files
      -e, --emoji                        Enable emojis in the output
          --logflow                      Flow log settings to child processes (like plugins)
          --logtostderr                  Log to stderr instead of to files
          --memprofilerate int           Enable more precise (and expensive) memory allocation profiles by setting runtime.MemProfileRate
          --non-interactive              Disable interactive mode for all commands
          --profiling string             Emit CPU and memory profiles and an execution trace to '[filename].[pid].{cpu,mem,trace}', respectively
          --tracing file:                Emit tracing to the specified endpoint. Use the file: scheme to write tracing data to a local file
      -v, --verbose int                  Enable verbose logging (e.g., v=3); anything >3 is very verbose
    

    SEE ALSO

    Auto generated by spf13/cobra on 28-Mar-2024
      Pulumi AI - What cloud infrastructure would you like to build? Generate Program