Skip to content

refresh

Update Kyku state to match the current state of cloud resources. This detects drift caused by manual changes or out-of-band modifications.

Terminal window
kyku refresh [options]
Flag Default Description
-e, --env <environment> default Environment workspace
-c, --config <path> ./infrastructure.ts Path to config file
-p, --passphrase <phrase> Passphrase for encrypted state
Terminal window
# Refresh default environment
kyku refresh
# Refresh production environment
kyku refresh --env=prod
  1. Loads the current state file
  2. For each resource, calls provider.readState() with the stored provider ID
  3. Updates the state with the current cloud config and outputs
  4. Does not create, modify, or destroy any resources

Use kyku plan after refresh to see if the config now differs from the updated state.