> For the complete documentation index, see [llms.txt](https://docs.octoxlabs.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.octoxlabs.com/adapters/v/vmware-tanzu.md).

# VMware Tanzu

VMware Tanzu Application Service runs on Cloud Foundry. OctoXLabs reads the service instances from the Cloud Controller API. It finds the UAA identity server address on its own from the API root.

## Use cases

* List the service instances in your Tanzu foundation.

```
Adapters = vmware-tanzu
```

## Before you begin

### Network

| Source              | Destination                                                | Port             | Protocol |
| ------------------- | ---------------------------------------------------------- | ---------------- | -------- |
| OctoXLabs connector | Cloud Foundry API host (for example `api.sys.example.com`) | 443              | HTTPS    |
| OctoXLabs connector | UAA host (found from the API root)                         | 443              | HTTPS    |
| OctoXLabs connector | HTTP proxy (optional)                                      | Set in **Proxy** | HTTP     |

### Required permissions

| Scope or role                                                                                  | Permission | Needed for        |
| ---------------------------------------------------------------------------------------------- | ---------- | ----------------- |
| UAA client authority `cloud_controller.admin_read_only` (or `cloud_controller.global_auditor`) | Read       | Service instances |

UAA takes permissions from the `authorities` field of the client, not from `scope`. A client created with scope gets a token, but data requests come back empty.

## Create credentials in VMware Tanzu

{% stepper %}
{% step %}

### Install the UAA CLI

Run `gem install cf-uaac`.
{% endstep %}

{% step %}

### Point it at UAA

Run `uaac target https://uaa.sys.example.com` with your own UAA address.
{% endstep %}

{% step %}

### Sign in as the UAA admin client

Run `uaac token client get admin -s UAA_ADMIN_CLIENT_SECRET`. In Ops Manager the secret is under **Tanzu Application Service > Credentials > Uaa Admin Client Credentials**.
{% endstep %}

{% step %}

### Create a read only client

Run the command below. The client ID is `octoxlabs-connector` and the client secret is the value you pass to `-s`.

```
uaac client add octoxlabs-connector \
  --authorities cloud_controller.admin_read_only \
  --authorized_grant_types client_credentials \
  -s YOUR_CLIENT_SECRET
```

{% endstep %}
{% endstepper %}

## Connection parameters

| Parameter      | Required | Type    | Default | Description                                                                                                                               |
| -------------- | -------- | ------- | ------- | ----------------------------------------------------------------------------------------------------------------------------------------- |
| Domain         | Yes      | Text    |         | Host name of the Cloud Foundry API. No scheme, no path, no trailing slash. Run `cf api` to find it. Do not use the `uaa` or `login` host. |
| Client ID      | Yes      | Text    |         | UAA client name.                                                                                                                          |
| Client Secret  | Yes      | Text    |         | UAA client secret.                                                                                                                        |
| Fetch Services | No       | Boolean | True    | Collect service instances.                                                                                                                |
| Per Page       | No       | Integer | 100     | Instances per request. The frontend instructions state min 1 and max 5000.                                                                |
| Proxy          | No       | Text    |         | Proxy in `host:port` format.                                                                                                              |
| Timeout        | No       | Integer | 30      | Seconds to wait for API responses.                                                                                                        |

## Troubleshooting

| Error message                | Cause                         | Fix                                              |
| ---------------------------- | ----------------------------- | ------------------------------------------------ |
| UAA endpoint is missing from | The API root has no UAA link. | Check that Domain is the Cloud Foundry API host. |

## Change history

{% hint style="info" %}
Available starting from version 6.7.2.
{% endhint %}
