Out Plane
ip-profile

ip-profile assign

Restrict an application to a profile's networks.

writesrepeatable--dry-run

Attaches a profile to an application, so only the networks in it can reach that application.

It applies as soon as the request returns. Nothing needs deploying, which also means there is no build to wait behind if the rules are wrong.

Usage

outplane ip-profile assign <PROFILE> [flags]

Arguments

ArgumentTypeDescription
PROFILEstringProfile name or id. Required.

Flags

FlagTypeDescription
--appstringApplication name or id. Defaults to the linked app. A flag rather than an argument, because the profile is the argument.

The global flags apply as well.

Output

FieldTypeDescription
actionstringOne of assign, unassign.
profilestring
profileIdstring
appstring
appIdstring
rulesintHow many networks the application will answer.
changedboolFalse for a dry run, and false when it was already attached.

Examples

See what it would restrict, without restricting it

outplane ip-profile assign office --app checkout --dry-run --json
{
  "action": "assign",
  "app": "checkout",
  "changed": false,
  "profile": "office",
  "rules": 2
}

Restrict an application

outplane ip-profile assign office --app checkout

Read the result in a pipeline

outplane ip-profile assign office --app checkout --json --fields app,rules,changed

What to Know

  • Applies immediately. Unlike an environment variable or a port, this does not wait for a deployment: the application stops answering other addresses as soon as the request returns.
  • Idempotent. Attaching something already attached reports changed false and exits 0.
  • A profile with no rules makes the application reachable from nowhere. The request is not refused, and the result reports rules 0.
  • More than one profile can be attached to the same application. They add up: an address allowed by any attached profile gets through.

Errors

Beyond 0 for success, this command exits with:

ExitKindMeaning
2usageInvalid arguments, unknown flag, or client-side validation failure.
3authNot authenticated, token revoked or expired, or forbidden for this team.
5not_foundThe named resource does not exist, or is not visible to this credential.
8upstreamThe Out Plane API returned a server error.

The code on the error object is one of ipprofile.not_found, app.not_found, context.no_app, usage.missing_argument. Branch on that, or on the exit status. The message is prose and changes.

On this page