1. Docs
  2. Pulumi IaC
  3. Pulumi CLI
  4. Commands
  5. pulumi refresh

pulumi refresh

    Refresh the resources in a stack

    Synopsis

    Refresh the resources in a stack.

    This command compares the current stack’s resource state with the state known to exist in the actual cloud provider. Any such changes are adopted into the current stack. Note that if the program text isn’t updated accordingly, subsequent updates may still appear to be out of sync with respect to the cloud provider’s source of truth.

    The program to run is loaded from the project in the current directory. Use the -C or --cwd flag to use a different directory.

    pulumi refresh [flags]
    

    Options

          --clear-pending-creates                 Clear all pending creates, dropping them from the state
          --config-file string                    Use the configuration values in the specified file rather than detecting the file name
      -d, --debug                                 Print detailed debugging output during resource operations
          --diff                                  Display operation as a rich diff showing the overall change
          --expect-no-changes                     Return an error if any changes occur during this update
      -h, --help                                  help for refresh
          --import-pending-creates stringArray    A list of form [[URN ID]...] describing the provider IDs of pending creates
      -j, --json                                  Serialize the refresh diffs, operations, and overall output as JSON
      -m, --message string                        Optional message to associate with the update operation
      -p, --parallel int32                        Allow P resource operations to run in parallel at once (1 for no parallelism). (default 16)
          --preview-only                          Only show a preview of the refresh, but don't perform the refresh itself
          --show-replacement-steps                Show detailed resource replacement creates and deletes instead of a single step
          --show-sames                            Show resources that needn't be updated because they haven't changed, alongside those that do
          --skip-pending-creates                  Skip importing pending creates in interactive mode
      -f, --skip-preview                          Do not calculate a preview before performing the refresh
      -s, --stack string                          The name of the stack to operate on. Defaults to the current stack
          --suppress-outputs                      Suppress display of stack outputs (in case they contain sensitive values)
          --suppress-permalink string[="false"]   Suppress display of the state permalink
          --suppress-progress                     Suppress display of periodic progress dots
      -t, --target stringArray                    Specify a single resource URN to refresh. Multiple resource can be specified using: --target urn1 --target urn2
      -y, --yes                                   Automatically approve and perform the refresh after previewing it
    

    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 8-Oct-2024
      PulumiUP 2024. Watch On Demand.