Skip to content
Go to file

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time

BOSH Deployment Resource

A resource that will deploy releases and stemcells using the BOSH CLI v2.

Differences from original BOSH Deployment Resource

The original BOSH Deployment Resource uses the Ruby CLI and does not support newer BOSH features.

Breaking Changes

  • This resource requires that the target director's SSL certificate is trusted. If the director's certificate is not already trusted by normal root authorities, a custom CA certificate must be provided.

Adding to your pipeline

To use the BOSH Deployment Resource, you must declare it in your pipeline as a resource type:

- name: bosh-deployment
  type: docker-image
    repository: cloudfoundry/bosh-deployment-resource

Source Configuration

  • deployment: Required. The name of the deployment.

  • target: Optional. The address of the BOSH director which will be used for the deployment. If omitted, source_file must be specified via out parameters, as documented below.

  • client: Required. The username or UAA client ID for the BOSH director.

  • client_secret: Required. The password or UAA client secret for the BOSH director.

  • ca_cert: Optional. CA certificate used to validate SSL connections to Director and UAA. If omitted, the director's certificate must be already trusted.

  • jumpbox_url: Optional. The URL, including port, of the jumpbox. If set, jumpbox_ssh_key must also be set. If omitted, the BOSH director will be dialed directly.

  • jumpbox_ssh_key: Optional. The private key of the jumpbox. If set, jumpbox_url must also be set.

  • jumpbox_username: Optional. The username for the jumpbox. If not set, will default to jumpbox.

  • skip_check: Optional Setting this will avoid failing checks when using this resource in dynamic configuration. If not set, will default to false.

  • vars_store: Optional. Configuration for a persisted variables store. Currently only the Google Cloud Storage (GCS) provider is supported. json_key must be the the JSON key for your service account. Example:

    provider: gcs
      bucket: my-bucket
      file_name: path/to/vars-store.yml
      json_key: "{\"type\": \"service_account\"}"


- name: staging
  type: bosh-deployment
    deployment: staging-deployment-name
    client: admin
    client_secret: admin
    ca_cert: "-----BEGIN CERTIFICATE-----\n-----END CERTIFICATE-----"

Dynamic Source Configuration

Sometimes source configuration cannot be known ahead of time, such as when a BOSH director is created as part of your pipeline. In these scenarios, it is helpful to be able to have a dynamic source configuration. In addition to the normal parameters for put, the following parameters can be provided to redefine the source:

  • source_file: Optional. Path to a file containing a YAML or JSON source config. This allows the target to be determined at runtime, e.g. by acquiring a BOSH lite instance using the Pool resource. The content of the source_file should have the same structure as the source configuration for the resource itself. The source_file will be merged into the exist source configuration.


  • target must ONLY be configured via the source_file otherwise the implicit get will fail after the put.
  • This is only supported for a put.


- put: staging
    source_file: path/to/sourcefile

Sample source file:

    "target": "",
    "client_secret": "generated-secret",
    "vars_store": {
        "config": {
            "bucket": "my-bucket"


in: Download information about a BOSH deployment

This will download the deployment manifest. It will place two files in the target directory:

  • manifest.yml: The deployment manifest
  • target: The hostname for the director

Note: Only the most recent version is fetchable


  • compiled_releases: Optional. List of compiled releases to download and optionally specified jobs. Deployment can only have one stemcell.
- get: staging
    - name: release-one
    - name: release-two
      - job-one
      - job-two

out: Deploy or Delete a BOSH deployment (defaults to deploy)

This will upload any given stemcells and releases, lock them down in the deployment manifest and then deploy.


  • manifest: Required. Path to a BOSH deployment manifest file.

  • stemcells: Optional. An array of globs that should point to where the stemcells used in the deployment can be found. Stemcell entries in the manifest with version 'latest' will be updated to the actual provided stemcell versions.

  • bosh_io_stemcell_type: Optional. Allowed values: regular or light. When specified will download stemcells from based on: the director CPI, the os and version from the stemcells section in the deployment manifest.

  • releases: Optional. An array of globs that should point to where the releases used in the deployment can be found. Release entries in the manifest with version 'latest' will be updated to the actual provided release versions.

  • vars: Optional. A collection of variables to be set in the deployment manifest.

  • vars_files: Optional. A collection of vars files to be interpolated into the deployment manifest.

  • var_files: Optional. A collection of variables to be set by the contents of the file configured.

  • ops_files: Optional. A collection of ops files to be applied over the deployment manifest.

  • cleanup: Optional. An boolean that specifies if a bosh cleanup should be run after deployment. Defaults to false.

  • no_redact: Optional. Removes redacted from Bosh output. Defaults to false.

  • dry_run: Optional. Shows the deployment diff without running a deploy. Defaults to false.

  • fix: Optional. Recreate an instance with an unresponsive agent instead of erroring. Defaults to false.

  • max_in_flight: Optional. A number of max in flight option.

  • recreate: Optional. Recreate all VMs in deployment. Defaults to false.

  • skip_drain: Optional. A collection of instance group names to skip running drain scripts for. Defaults to empty.

  • source_file: Optional. Path to a file containing a BOSH director address. This allows the target to be determined at runtime, e.g. by acquiring a BOSH lite instance using the Pool resource.

    If both source_file and target are specified, source_file takes precedence.

  • delete.enabled: Optional. Deletes the configured deployment instead of doing a deploy.

  • delete.force: Optional. Defaults to false. Asks bosh to ignore errors when deleting the configured deployment.

# Deploy
- put: staging
    manifest: path/to/manifest.yml
    - path/to/stemcells-*
    - path/to/releases-*
      enable_ssl: true
      domains: ["", ""]
        port: 25

# Delete
- put: staging
      enabled: true
      force: true


No description, website, or topics provided.




No packages published


You can’t perform that action at this time.