pulumi/pulumi · error

no open request was created for this environment; check that

Error message

no open request was created for this environment; check that an open approval rule applies to it

What it means

`pulumi env open-request` calls CreateEnvironmentOpenRequest, which returns the change request(s) needed to open a protected environment: one for the target environment and one per gated import. If the API returns an empty list, the CLI raises this error because nothing was actually created — typically meaning no open-approval rule covers the environment, so no request workflow exists for it.

Source

Thrown at pkg/cmd/esc/cli/env_open_request.go:68

			ref, _, err := envcmd.getExistingEnvRef(ctx, args)
			if err != nil {
				return err
			}

			resp, err := envcmd.esc.client.CreateEnvironmentOpenRequest(
				ctx,
				ref.orgName,
				ref.projectName,
				ref.envName,
				int(grantExpiration.Seconds()),
				int(accessDuration.Seconds()),
			)
			if err != nil {
				return err
			}
			if len(resp.ChangeRequests) == 0 {
				return errors.New("no open request was created for this environment; " +
					"check that an open approval rule applies to it")
			}

			var changeRequestDescription *string
			if reason != "" {
				changeRequestDescription = &reason
			}

			// An open request can span multiple change requests: one for the target environment
			// and one for each gated import. Submit them all up front so the output paths below
			// only differ in how they present the result.
			for i := range resp.ChangeRequests {
				if err := envcmd.esc.client.SubmitChangeRequest(
					ctx, ref.orgName, resp.ChangeRequests[i].ChangeRequestID, changeRequestDescription,
				); err != nil {
					return fmt.Errorf("submitting change request: %w", err)
				}
			}

View on GitHub (pinned to 793f7b2e16)

Solutions

  1. Verify an open/approval rule is configured for that environment (or its imports) in the Pulumi Cloud environment settings
  2. Confirm the environment reference `<org>/<project>/<env>` points at the intended protected environment
  3. If the environment is not gated, skip open-request and run `pulumi env open` directly

Example fix

// before
pulumi env open-request myorg/proj/dev   # dev has no approval rule
// after
pulumi env open myorg/proj/dev           # open directly, or configure an approval rule on dev first
Defensive patterns

Strategy: validation

Validate before calling

# Only call open-request for environments covered by an approval rule
pulumi env open-request "$ENV_REF" || \
  case "$?" in 0) ;; *) echo "check approval rules for $ENV_REF" >&2; exit $? ;; esac

Try / catch

out=$(pulumi env open-request "$ENV_REF" 2>&1) || {
  case "$out" in
    *"no open request was created"*) echo "$ENV_REF has no approval rule; using env open" >&2; pulumi env open "$ENV_REF" ;;
    *) printf '%s\n' "$out" >&2; exit 1 ;;
  esac
}

Prevention

When it happens

Trigger: Running `pulumi env open-request <org>/<project>/<env>` against an environment that is not protected by an approval/open rule, so the service has nothing to create and returns zero change requests.

Common situations: Targeting the wrong environment name or project, running against an environment whose approval policy was removed or never configured, or expecting a change-request flow in an org whose Pulumi Cloud plan/settings do not have environment approval rules enabled.

Related errors


AI-assisted analysis of pulumi/pulumi@793f7b2e16 (2026-08-31). Data as JSON: /api/errors/c8430f88592a7029. Report an issue: GitHub.