An output only resource capable of running lots of Cloud Foundry cli commands.
Note: you must provide either username and password or client_id and client_secret.
api: Required. The address of the Cloud Controller in the Cloud Foundry deployment.username: Optional. The username used to authenticate.password: Optional. The password used to authenticate.origin: Optional. The identity provider to be used for authentication (only valid forusername&passwordauthentication)client_id: Optional. The client id used to authenticate.client_secret: Optional. The client secret used to authenticate.skip_cert_check: Optional. Check the validity of the CF SSL cert. Defaults tofalse.org: Optional. Sets the default organization to target (can be overridden in the params config).space: Optional. Sets the default space to target (can be overridden in the params config).cf_color: Optional. Set tofalseto not colorize cf output (can be overridden in the params config).cf_dial_timeout: Optional. Max wait time to establish a connection, including name resolution, in seconds (can be overridden in the params config).cf_trace: Optional. Set totrueto print cf API request diagnostics to stdout (can be overridden in the params config).
resource_types:
- name: cf-cli-resource
type: registry-image
source:
repository: nulldriver/cf-cli-resource
tag: latest
resources:
- name: cf-env
type: cf-cli-resource
source:
api: https://api.local.pcfdev.io
username: admin
password: admin
skip_cert_check: trueThis resource is capable of running single commands in separate put steps.
NOTE: A common practice is to use different logical names for each put step and reuse the same resource.
In this example were we use cf-create-org and cf-create-space to describe the put steps and use the same cf-env resource for both steps.
- put: cf-create-org
resource: cf-env
params:
command: create-org
org: myorg
- put: cf-create-space
resource: cf-env
params:
command: create-space
org: myorg
space: myspaceor they can be combined in a single put step:
- put: cf-create-org-and-space
resource: cf-env
params:
commands:
- command: create-org
org: myorg
- command: create-space
org: myorg
space: myspaceAnd, of course, if you have your org and space defined in the source config,
it gets even simpler:
- put: cf-create-org-and-space
resource: cf-env
params:
commands:
- command: create-org
- command: create-spaceThe standard way to authenticate the cf-cli-resource with a target Cloud Foundry environment is to either use username and password or client_id and client_secret, which will save a $CF_HOME/.cf/config.json file containing the API endpoint, and access token. For some pipeline workflows, it is necessary to authenticate using alternative methods and then supply the pre-configured config.json to the cf-cli-resource.
See examples/cf_home-auth/pipeline.yml for a full example
For example:
resources:
- name: cf-prod
type: cf-cli-resource
jobs:
- name: deploy
plan:
- get: my-repo
- task: authenticate
file: my-repo/some-script-that-authenticates-and-creates-a-cf-config-json.yml
- put: cf-prod
params:
cf_home: authenticate-task-output
commands:
- command: push
path: my-repo/myapp
manifest: my-repo/manifest.ymlThis resource supports file inputs. This allows the pipeline to parameterize and generate commands during pipeline execution.
command_file: Optional. Contains path to a YAML file that contains the same fields asparams; includingcommandorcommands. If used, this resource uses only the configuration listed in this file. All other configurations specified in theparamssection will be ignored. Thecommand_filefield (if exists) is ignored within the content of the file itself.
- task: configure
config:
platform: linux
image_resource:
type: docker-image
source:
repository: ubuntu
run:
path: bash
args:
- -excl
- |-
cat > cf_command/params.yml <<EOF
command: delete
app_name: app
delete_mapped_routes: true
EOF
outputs:
- name: cf_command
- put: cf-delete
resource: cf-env
params:
command: delete
command_file: cf_command/params.ymlRun cf command(s) on a Cloud Foundry installation.
Create an org
org: Optional. The organization to create (required if not set in the source config)
- put: cf-create-org
resource: cf-env
params:
command: create-org
org: myorgDelete an org
org: Optional. The organization to delete (required if not set in the source config)
- put: cf-delete-org
resource: cf-env
params:
command: delete-org
org: myorgCreate a space
org: Optional. The organization to target (required if not set in the source config)space: Optional. The space to create (required if not set in the source config)
- put: cf-create-space
resource: cf-env
params:
command: create-space
org: myorg
space: myspaceDelete a space
org: Optional. The organization to target (required if not set in the source config)space: Optional. The space to delete (required if not set in the source config)
- put: cf-delete-space
resource: cf-env
params:
command: delete-space
org: myorg
space: myspaceCreate a domain in an org for later use
org: Optional. The organization to create the domain in (required if not set in the source config)domain: Optional. The domain to add to the organization
- put: cf-create-domain
resource: cf-env
params:
command: create-domain
org: myorg
domain: example.comDelete a domain
org: Optional. The organization to target (required if not set in the source config)space: Optional. The space to target (required if not set in the source config)domain: Optional. The domain to delete
- put: cf-delete-domain
resource: cf-env
params:
command: delete-domain
domain: example.comCreate a url route in a space for later use
org: Optional. The organization to target (required if not set in the source config)space: Optional. The space to target (required if not set in the source config)other_space: Optional. The space for the route (if not set the source or params specifiedspacewill be used)domain: Required. Domain for the HTTP routehostname: Optional. Hostname for the HTTP route (required for shared domains)path: Optional. Path for the HTTP route
- put: cf-create-route
resource: cf-env
params:
command: create-route
domain: example.com
hostname: myhost
path: fooAdd a url route to an app
org: Optional. The organization to target (required if not set in the source config)space: Optional. The space to target (required if not set in the source config)app_name: Required. The application to map the route todomain: Required. The domain to map to the applicationhostname: Optional. Hostname for the HTTP route (required for shared domains)path: Optional. Path for the HTTP route
- put: cf-map-route
resource: cf-env
params:
command: map-route
app_name: myapp-ui
domain: example.com
hostname: myhost
path: fooRemove a url route from an app
org: Optional. The organization to target (required if not set in the source config)space: Optional. The space to target (required if not set in the source config)app_name: Required. The application to map the route todomain: Required. The domain to unmap from the applicationhostname: Optional. Hostname used to identify the HTTP routepath: Optional. Path used to identify the HTTP route
- put: cf-unmap-route
resource: cf-env
params:
command: unmap-route
app_name: myapp-ui
domain: example.com
hostname: myhost
path: fooDelete a route
org: Optional. The organization to target (required if not set in the source config)space: Optional. The space to target (required if not set in the source config)domain: Required. Domain used to identify the HTTP routehostname: Optional. Hostname used to identify the HTTP routepath: Optional. Path used to identify the HTTP route
- put: cf-delete-route
resource: cf-env
params:
command: delete-route
domain: example.com
hostname: myhost
path: fooCreate a new user
username: Required. The user to createpassword: Optional. The password (must specify eitherpasswordororigin)origin: Optional. The authentication origin (e.g. ldap, provider-alias) (must specify eitherpasswordororigin)
Create a user with credentials:
- put: prepare-env
resource: cf-env
params:
command: create-user
username: j.smith@example.com
password: S3cr3tCreate an LDAP user:
- put: prepare-env
resource: cf-env
params:
command: create-user
username: j.smith@example.com
origin: ldapBulk create users from a csv file
file: Required. The csv file containing the users
- put: prepare-env
resource: cf-env
params:
command: create-users-from-file
file: somepath/users.csvThe format of the bulk load file:
| Username | Password | Org | Space | OrgManager | BillingManager | OrgAuditor | SpaceManager | SpaceDeveloper | SpaceAuditor |
|---|---|---|---|---|---|---|---|---|---|
| user1 | S3cr3t | org1 | dev | x | x | x | x | x | x |
| user2 | org2 | dev | x | x | x | x | |||
| user3 | S3cr3t | org3 | dev | x | x | ||||
| user3 | S3cr3t | org3 | test | x | x |
Notes:
- The file must include the header row
- The file must be in comma separated value format
- You can specify the user more than once to assign multiple orgs/spaces
- If you omit the Org, no org or space roles will be assigned
- If you omit the Space, no space roles will be assigned
Delete a user
username: Required. The user to delete
- put: prepare-env
resource: cf-env
params:
command: delete-user
username: j.smith@example.comMake a user-provided service instance available to CF apps
org: Optional. The organization to target (required if not set in the source config)space: Optional. The space to target (required if not set in the source config)service_instance: Required. The name to give the service instance- Options: Only specify one.
credentials: Credentials, provided as YAML, inline json or in a file, to be exposed in the VCAP_SERVICES environment variable for bound applicationssyslog_drain_url: URL to which logs for bound applications will be streamedroute_service_url: URL to which requests for bound routes will be forwarded. Scheme for this URL must be https
- put: cf-create-user-provided-service
resource: cf-env
params:
commands:
# credentials as YAML
- command: create-user-provided-service
service_instance: my-db-mine
credentials:
username: admin
password: pa55woRD
# credentials as inline json
- command: create-user-provided-service
service_instance: my-db-mine
credentials: '{"username":"admin","password":"pa55woRD"}'
# credentials as json file
- command: create-user-provided-service
service_instance: another-db-mine
credentials: path/to/credentials.json
# syslog drain url
- command: create-user-provided-service
service_instance: my-drain-service
syslog_drain_url: syslog://example.com
# route service url
- command: create-user-provided-service
service_instance: my-route-service
route_service_url: https://example.comCreate a service instance
org: Optional. The organization to target (required if not set in the source config)space: Optional. The space to target (required if not set in the source config)service: Required. The marketplace service name to createplan: Required. The service plan name to createservice_instance: Required. The name to give the service instancebroker: Optional. Create a service instance from a particular broker. Required when service name is ambiguousconfiguration: Optional. Valid JSON object containing service-specific configuration parameters, provided either in-line or in a file. For a list of supported configuration parameters, see documentation for the particular service offering.tags: Optional. User provided tagstimeout: Optional. Max wait time for service creation, in seconds. Defaults to600(10 minutes)wait_for_service: Optional. Wait for the asynchronous service to start. Defaults tofalse.update_service: Optional. Update service instance if it already exists. Defaults tofalse.
- put: cf-create-service
resource: cf-env
params:
command: create-service
service: p-config-server
plan: standard
service_instance: my-config-server
configuration: '{"count":1}'
tags: "list, of, tags"
timeout: 300
wait_for_service: trueUpdate a service instance
org: Optional. The organization to target (required if not set in the source config)space: Optional. The space to target (required if not set in the source config)service_instance: Required. The name of the service instanceplan: Required. Change service plan for a service instanceconfiguration: Optional. Valid JSON object containing service-specific configuration parameters, provided either in-line or in a file. For a list of supported configuration parameters, see documentation for the particular service offering.tags: Optional. User provided tagstimeout: Optional. Max wait time for service update, in seconds. Defaults to600(10 minutes)wait_for_service: Optional. Wait for the asynchronous service to update. Defaults tofalse.
- put: cf-update-service
resource: cf-env
params:
command: update-service
service: p-config-server
plan: pro
service_instance: my-config-server
configuration: '{"count":2}'
tags: "list, of, tags"
timeout: 300
wait_for_service: trueDelete a service instance
org: Optional. The organization to target (required if not set in the source config)space: Optional. The space to target (required if not set in the source config)service_instance: Required. The service instance to deletewait_for_service: Optional. Wait for the service to delete. Defaults tofalse.
- put: cf-delete-service
resource: cf-env
params:
command: delete-service
service_instance: my-config-server
wait_for_service: trueShare a service instance with another space
org: Optional. The organization to target (required if not set in the source config)space: Optional. The space to target (required if not set in the source config)service_instance: Required. The name of the service instance to shareother_org: Optional. Org of the other space (Default: targeted org)other_space: Required. Space to share the service instance into
- put: cf-share-service
resource: cf-env
params:
command: share-service
service_instance: my-shared-service
other_org: other-org
other_space: other-spaceUnshare a shared service instance from a space
org: Optional. The organization to target (required if not set in the source config)space: Optional. The space to target (required if not set in the source config)service_instance: Required. The name of the service instance to unshareother_org: Optional. Org of the other space (Default: targeted org)other_space: Required. Space to unshare the service instance from
- put: cf-unshare-service
resource: cf-env
params:
command: unshare-service
service_instance: my-shared-service
other_org: other-org
other_space: other-spaceCreate a service key
org: Optional. The organization to target (required if not set in the source config)space: Optional. The space to target (required if not set in the source config)service_instance: Required. The name of the service instance for which the key is to be createdservice_key: Required. The name to give the service keyconfiguration: Optional. Valid JSON object containing service-specific configuration parameters, provided either in-line or in a file. For a list of supported configuration parameters, see documentation for the particular service offering.
- put: cf-create-service-key
resource: cf-env
params:
command: create-service-key
service_instance: my-db
service_key: my-db-service-keyDelete a service key
org: Optional. The organization to target (required if not set in the source config)space: Optional. The space to target (required if not set in the source config)service_instance: Required. The service instance that has the service keyservice_key: Required. The service key to delete
- put: cf-delete-service-key
resource: cf-env
params:
command: delete-service-key
service_instance: my-db
service_key: my-db-service-keyCreate/Update a service broker. If a service broker already exists, updates the existing service broker.
org: Optional. The organization to target (required ifspace_scoped: true)space: Optional. The space to target (required ifspace_scoped: true)service_broker: Required. The service broker name to createusername: Required. The service broker usernamepassword: Required. The service broker passwordurl: Required. The service broker urlspace_scoped: Optional. Make the broker's service plans only visible within the targeted space. Defaults tofalse.
- put: cf-create-service-broker
resource: cf-env
params:
command: create-service-broker
service_broker: some-service
username: admin
password: password
url: http://broker.name.com
space_scoped: trueDeletes a service broker
org: Optional. The organization to target (required if not set in the source config)space: Optional. The space to target (required if not set in the source config)service_broker: Required. The service broker name to delete
- put: cf-delete-service-broker
resource: cf-env
params:
command: delete-service-broker
service_broker: some-serviceWait for a service instance to start
org: Optional. The organization to target (required if not set in the source config)space: Optional. The space to target (required if not set in the source config)service_instance: Required. The service instance to wait fortimeout: Optional. Max wait time for service creation, in seconds. Defaults to600(10 minutes)
- put: cf-wait-for-service
resource: cf-env
params:
command: wait-for-service
service_instance: my-config-server
timeout: 300Enable access to a service or service plan for one or all orgs
service: Required. The marketplace service name to enablebroker: Optional. Enable access to a service from a particular service broker. Required when service name is ambiguousaccess_org: Optional. Enable access for a specified organizationplan: Optional. Enable access to a specified service plan
- put: cf-enable-service-access
resource: cf-env
params:
command: enable-service-access
service: some-service
broker: some-service-broker
access_org: myorg
plan: simpleDisable access to a service or service plan for one or all orgs
service: Required. The marketplace service name to disableaccess_org: Optional. Disable access for a specified organizationplan: Optional. Disable access to a specified service plan
- put: cf-disable-service-access
resource: cf-env
params:
command: disable-service-access
service: some-service
access_org: myorg
plan: simpleBind a service instance to an app
org: Optional. The organization to target (required if not set in the source config)space: Optional. The space to target (required if not set in the source config)app_name: Required. The application to bind to the serviceservice_instance: Required. The service instance to bind to the applicationconfiguration: Optional. Valid JSON object containing service-specific configuration parameters, provided either in-line or in a file. For a list of supported configuration parameters, see documentation for the particular service offering.
- put: cf-bind-service
resource: cf-env
params:
command: bind-service
app_name: myapp-ui
service_instance: mydb
configuration: '{"permissions":"read-only"}'Unbind a service instance from an app
org: Optional. The organization to target (required if not set in the source config)space: Optional. The space to target (required if not set in the source config)app_name: Required. The application to unbind from the service instanceservice_instance: Required. The service instance to unbind from the application
- put: cf-unbind-service
resource: cf-env
params:
command: unbind-service
app_name: myapp-ui
service_instance: mydbBind a service instance to an HTTP route
org: Optional. The organization to target (required if not set in the source config)space: Optional. The space to target (required if not set in the source config)domain: Required. The domain to bind the route toservice_instance: Required. The service instance to bind the route tohostname: Optional. Hostname used in combination withdomainto specify the route to bindpath: Optional. Path used in combination withhostnameanddomainto specify the route to bindconfiguration: Optional. Valid JSON object containing service-specific configuration parameters, provided either in-line or in a file. For a list of supported configuration parameters, see documentation for the particular service offering.
- put: cf-bind-route-service
resource: cf-env
params:
command: bind-route-service
domain: example.com
service_instance: mylogger
hostname: myhost
path: foo
configuration: '{"permissions":"read-only"}'Unbind a service instance from an HTTP route
org: Optional. The organization to target (required if not set in the source config)space: Optional. The space to target (required if not set in the source config)domain: Required. The domain to unbind the route fromservice_instance: Required. The service instance to unbind the route fromhostname: Optional. Hostname used in combination with DOMAIN to specify the route to unbindpath: Optional. Path used in combination with HOSTNAME and DOMAIN to specify the route to unbind
- put: cf-unbind-route-service
resource: cf-env
params:
command: unbind-route-service
domain: example.com
service_instance: mylogger
hostname: myhost
path: fooAllow use of a feature
feature_name: Required. Feature to enable
- put: cf-enable-feature-flag
resource: cf-env
params:
command: enable-feature-flag
feature_name: service_instance_sharingPrevent use of a feature
feature_name: Required. Feature to disable
- put: cf-disable-feature-flag
resource: cf-env
params:
command: disable-feature-flag
feature_name: service_instance_sharingPush a new app or sync changes to an existing app
NOTE: A manifest can be used to specify values for required parameters. Any parameters specified will override manifest values.
org: Optional. The organization to target (required if not set in the source config)space: Optional. The space to target (required if not set in the source config)app_name: Required. The name of the application (Optional if using amanifestthat specifies the application name)buildpack: Optional. Deprecated, please usebuildpacksinstead.buildpacks: Optional. List of custom buildpacks by name (e.g. my-buildpack) or Git URL (e.g. 'https://github.com/cloudfoundry/java-buildpack.git') or Git URL with a branch or tag (e.g. 'https://github.com/cloudfoundry/java-buildpack.git#v3.3.0' for 'v3.3.0' tag). To use built-in buildpacks only, specifydefaultor"null"(note the use of double quotes!)disk_quota: Optional. Disk limit (e.g. 256M, 1024M, 1G)docker_image: Optional. Docker-image to be used (e.g. user/docker-image-name)docker_username: Optional. This is used as the username to authenticate against a protected docker registrydocker_password: Optional. This should be the users password when authenticating against a protected docker registryenvironment_variables: Optional. Map of environment variables to pass to applicationinstances: Optional. Number of instancesmanifest: Optional. Path to manifest file, or valid application manifest yamlmemory: Optional. Memory limit (e.g. 256M, 1024M, 1G)no_start: Optional. Do not start an app after pushing. Defaults tofalse.path: Optional. Path to app directory or to a zip file of the contents of the app directorystack: Optional. Stack to use (a stack is a pre-built file system, including an operating system, that can run apps)startup_command: Optional. Startup command, set to"null"(note the use of double quotes!) to reset to default start commandvars: Optional. Map of variables to pass to manifestvars_files: Optional. List of variables files to pass to manifestshow_app_log: Optional. Outputs the app log after a failed startup, useful to debug issues when used together with theapp_nameoption.staging_timeout: Optional. Max wait time for buildpack staging, in minutesstartup_timeout: Optional. Max wait time for app instance startup, in minutes
domain: Optional. Domain to use instead of the default (e.g. apps.internal, subdomain.example.com)hostname: Optional. Hostname (e.g. my-subdomain)
NOTE: Enable these by specifying cf_cli_version: 7 in the resource source params.
strategy: Optional. Deployment strategy, either rolling or"null"(note the use of double quotes!).
- put: cf-push
resource: cf-env
params:
command: push
app_name: myapp-ui
memory: 1G
path: path/to/myapp-*.jar
buildpacks:
- java_buildpack
manifest: path/to/manifest.yml
vars:
instances: 3
vars_files:
- path/to/vars.yml
environment_variables:
key: value
key2: value2Example directly specifying the manifest as yaml:
- put: cf-push
resource: cf-env
params:
command: push
path: path/to/myapp-*.jar
manifest:
applications:
- name: myapp-ui
memory: 1G
buildpacks:
- java_buildpack
env:
key: value
key2: value2Deploy an application to a Cloud Foundry
Pushes an application to the Cloud Foundry detailed in the source configuration. A manifest that describes the application must be specified.
NOTE: This command is designed to function as a replacement for the Concourse cf-resource.
org: Optional. The organization to target (required if not set in the source config)space: Optional. The space to target (required if not set in the source config)manifest: Required. Path to a application manifest file.path: Optional. Path to the application to push. If this isn't set then it will be read from the manifest instead.current_app_name: Optional. This should be the name of the application that this will re-deploy over. If this is set the resource will perform a zero-downtime deploy.environment_variables: Optional. Environment variable key/value pairs to add to the manifest.vars: Optional. Map of variables to pass to manifestvars_files: Optional. List of variables files to pass to manifestdocker_image: Optional. Docker-image to be used (e.g. user/docker-image-name)docker_username: Optional. This is used as the username to authenticate against a protected docker registrydocker_password: Optional. This should be the users password when authenticating against a protected docker registryshow_app_log: Optional. Outputs the app log after a failed startup, useful to debug issues when used together with thecurrent_app_nameoption.no_start: Optional. Deploys the app but does not start it.stack: Optional. Stack to use (a stack is a pre-built file system, including an operating system, that can run apps)staging_timeout: Optional. Max wait time for buildpack staging, in minutesstartup_timeout: Optional. Max wait time for app instance startup, in minutes
- put: cf-zero-downtime-push
resource: cf-env
params:
command: zero-downtime-push
manifest: path/to/manifest.yml
path: path/to/myapp-*.jar
current_app_name: myapp-ui
environment_variables:
key: value
key2: value2
vars:
instances: 3
vars_files:
- path/to/vars.ymlSet an env variable for an app
org: Optional. The organization to target (required if not set in the source config)space: Optional. The space to target (required if not set in the source config)app_name: Required. The name of the applicationenvironment_variables: Required. Environment variable key/value pairs to set.
- put: cf-set-env
resource: cf-env
params:
command: set-env
app_name: myapp-ui
environment_variables:
JBP_CONFIG_OPEN_JDK_JRE: "{ jre: { version: 11.+ }, memory_calculator: { stack_threads: 25 } }"
SOME_OTHER_KEY: SOME_OTHER_VALUEStart an app
org: Optional. The organization to target (required if not set in the source config)space: Optional. The space to target (required if not set in the source config)app_name: Required. The name of the applicationstaging_timeout: Optional. Max wait time for buildpack staging, in minutesstartup_timeout: Optional. Max wait time for app instance startup, in minutes
- put: cf-start
resource: cf-env
params:
command: start
app_name: myapp-ui
staging_timeout: 15
startup_timeout: 5Stop an app
org: Optional. The organization to target (required if not set in the source config)space: Optional. The space to target (required if not set in the source config)app_name: Required. The name of the application
- put: cf-stop
resource: cf-env
params:
command: stop
app_name: myapp-uiStop all instances of the app, then start them again. This causes downtime.
org: Optional. The organization to target (required if not set in the source config)space: Optional. The space to target (required if not set in the source config)app_name: Required. The name of the applicationstaging_timeout: Optional. Max wait time for buildpack staging, in minutesstartup_timeout: Optional. Max wait time for app instance startup, in minutes
- put: cf-restart
resource: cf-env
params:
command: restart
app_name: myapp-ui
staging_timeout: 15
startup_timeout: 5Recreate the app's executable artifact using the latest pushed app files and the latest environment (variables, service bindings, buildpack, stack, etc.)
org: Optional. The organization to target (required if not set in the source config)space: Optional. The space to target (required if not set in the source config)app_name: Required. The name of the applicationstaging_timeout: Optional. Max wait time for buildpack staging, in minutesstartup_timeout: Optional. Max wait time for app instance startup, in minutes
- put: cf-restage
resource: cf-env
params:
command: restage
app_name: myapp-ui
staging_timeout: 15
startup_timeout: 5Delete an app
org: Optional. The organization to target (required if not set in the source config)space: Optional. The space to target (required if not set in the source config)app_name: Required. The name of the applicationdelete_mapped_routes: Optional. Delete any mapped routes. Defaults tofalse.
- put: cf-delete
resource: cf-env
params:
command: delete
app_name: myapp-ui
delete_mapped_routes: trueRename an app
org: Optional. The organization to target (required if not set in the source config)space: Optional. The space to target (required if not set in the source config)app_name: Required. The name of the applicationnew_app_name: Required. The new name of the application
- put: cf-rename
resource: cf-env
params:
command: rename
app_name: myapp-ui
new_app_name: my-new-app-uiCreate policy to allow direct network traffic from one app to another
org: Optional. The organization to target (required if not set in the source config)space: Optional. The space to target (required if not set in the source config)source_app: Required. The name of the source applicationdestination_app: Required. Name of app to connect toport: Optional. Port or range of ports for connection to destination app (Default: 8080)protocol: Optional. Protocol to connect apps with (Default: tcp)destination_org: Optional. The org of the destination app (Default: targeted org)destination_space: Optional. The space of the destination app (Default: targeted space)
- put: cf-add-network-policy
resource: cf-env
params:
command: add-network-policy
source_app: frontend
destination_app: backend
protocol: tcp
port: 8080Remove network traffic policy of an app
org: Optional. The organization to target (required if not set in the source config)space: Optional. The space to target (required if not set in the source config)source_app: Required. The name of the source applicationdestination_app: Required. Name of app to connect toport: Required. Port or range of ports that destination app is connected withprotocol: Required. Protocol that apps are connected withdestination_org: Optional. The org of the destination app (Default: targeted org)destination_space: Optional. The space of the destination app (Default: targeted space)
- put: cf-remove-network-policy
resource: cf-env
params:
command: remove-network-policy
source_app: frontend
destination_app: backend
protocol: tcp
port: 8080Create a buildpack
buildpack: Required. The name of the buildpackpath: Required. Path to buildpack zip file, url to a zip file, or a local directoryposition: Required. The order in which the buildpacks are checked during buildpack auto-detectionenabled: Optional. Set tofalseto disable the buildpack from being used for staging
- put: cf-create-buildpack
resource: cf-env
params:
command: create-buildpack
buildpack: java_buildpack_offline
path: https://github.com/cloudfoundry/java-buildpack/releases/download/v4.19.1/java-buildpack-v4.19.1.zip
position: 99Update a buildpack
buildpack: Required. The name of the buildpackpath: Optional. Path to buildpack zip file, url to a zip file, or a local directoryassign_stack: Optional. Assign a stack to a buildpack that does not have a stack associationposition: Optional. The order in which the buildpacks are checked during buildpack auto-detectionenabled: Optional. Set tofalseto disable the buildpack from being used for staginglocked: Optional. Set totrueto lock the buildpack to prevent updates
- put: cf-update-buildpack
resource: cf-env
params:
command: update-buildpack
buildpack: java_buildpack_offline
assign_stack: cflinuxfs3Delete a buildpack
buildpack: Required. The name of the buildpackstack: Optional. Specify stack to disambiguate buildpacks with the same name. Required when buildpack name is ambiguous
- put: cf-delete-buildpack
resource: cf-env
params:
command: delete-buildpack
buildpack: java_buildpack_offline
stack: cflinuxfs3Run a one-off task on an app
org: Optional. The organization to target (required if not set in the source config)space: Optional. The space to target (required if not set in the source config)app_name: Required. The name of the applicationtask_command: Required. The command to run for the tasktask_name: Optional. Name to give the task (generated if omitted)memory: Optional. Memory limit (e.g. 256M, 1024M, 1G)disk_quota: Optional. Disk limit (e.g. 256M, 1024M, 1G)
- put: cf-run-task
resource: cf-env
params:
command: run-task
app_name: myapp-ui
task_command: "bundle exec rake db:migrate"
task_name: migrate
memory: 256M
disk_quota: 1GChange or view the instance count, disk space limit, and memory limit for an app
org: Optional. The organization to target (required if not set in the source config)space: Optional. The space to target (required if not set in the source config)app_name: Required. The name of the applicationinstances: Optional. Number of instancesdisk_quota: Optional. Disk limit (e.g. 256M, 1024M, 1G)memory: Optional. Memory limit (e.g. 256M, 1024M, 1G)
- put: cf-scale
resource: cf-env
params:
command: scale
app_name: myapp-ui
instances: 3
disk_quota: 1G
memory: 2G