title | description | position | category |
---|---|---|---|
Plan commands |
Plan commands |
4 |
Build&Deploy |
The plan
commands are used to view the changes of Function Compute resources.
You can run plan -h
or plan --help
to obtain the help documentation.
Parameter | Abbreviation | Required in YAML mode | Description |
---|---|---|---|
plan-type | - | Yes | Views changes that are caused by deployment or deletion. By default, changes that are caused by deployment are viewed. |
sub-command | - | No | Views the changes of resources. If you set plan-type to deploy, you can set sub-command to service, function, trigger, or domain. If you set plan-type to remove, you can set sub-command to service, function, trigger, domain, version, alias, provision, ondemand, onDemand, or layer. |
The current command also supports some global parameters (such as
-a/--access
,--debug
, etc.). For details, please refer to Serverless Devs global parameters document
If a resource description file in YAML exists, you can run the s plan
command to view resource changes. The following results are returned:
~: Configuration modified -: Delete the configuration +: Add the configuration
The figure shows what is expected after deploy
is executed:
- Function description changed from 'This is default function description by fc-deploy component' to 'test update'
- Function memorySize changed from 256 to 512
- Removed the TESSDATA_PREFIX configuration for Function environmentVariables
- Function environmentVariables added test_add
If you use the plan commands, we recommend that you configure the system policy: AliyunFCReadOnlyAccess
.