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

pulumi stack rename

    Rename an existing stack

    Synopsis

    Rename an existing stack.

    Note: Because renaming a stack will change the value of getStack() inside a Pulumi program, if this name is used as part of a resource’s name, the next pulumi up will want to delete the old resource and create a new copy. For now, if you don’t want these changes to be applied, you should rename your stack back to its previous name. You can also rename the stack’s project by passing a fully-qualified stack name as well. For example: ‘robot-co/new-project-name/production’. However in order to update the stack again, you would also need to update the name field of Pulumi.yaml, so the project names match.

    pulumi stack rename <new-stack-name> [flags]
    

    Options

      -h, --help           help for rename
      -s, --stack string   The name of the stack to operate on. Defaults to the current stack
    

    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
      -Q, --fully-qualify-stack-names    Show fully-qualified stack names
          --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 13-Jun-2024
      Introducing Pulumi Copilot - Intelligent Cloud Management