This document shows you how to prepare your environment to get started with
Parameter Manager.

## Enable the Parameter Manager API

To enable the Parameter Manager API, follow these steps:

<br />

## Configure Parameter Manager to use a regional endpoint

To create regional parameters, you must configure Parameter Manager to use
regional endpoints. Regional endpoints are request endpoints that only allow requests to
proceed if the affected resource exists in the location specified by the endpoint.
Using regional endpoints lets you run your workloads in a manner that complies
with [data residency](https://docs.cloud.google.com/assured-workloads/docs/data-residency.md.txt) and data sovereignty requirements.

Regional endpoints use the following format:

```bash
SERVICE_NAME.LOCATION.rep.googleapis.com
```

To use regional endpoints, you must update your configuration with the regional
endpoint address depending on how you access the Parameter Manager service.

### gcloud

To configure the Google Cloud CLI to use regional endpoints, complete the
following steps:

1. Make sure you're using the Google Cloud CLI 402.0.0 or newer.

2. Set the `api_endpoint_overrides/parametermanager` property to the regional endpoint you
   want to use:

   ```
   gcloud config set api_endpoint_overrides/parametermanager https://parametermanager.LOCATION.rep.googleapis.com/
   ```

   Replace <var translate="no">LOCATION</var> with the name of the supported Google Cloud location,
   such as `us-central1`.

### REST

To connect to the Parameter Manager service using the API, replace the
generic API endpoint URL (`https://secretmanager.googleapis.com/v1/`) with the
specific regional endpoint that you want to use. Regional endpoints use the
following format:

```
https://parametermanager.LOCATION.rep.googleapis.com/
```

Replace <var translate="no">LOCATION</var> with the name of the supported Google Cloud location,
such as `me-central2`.

To see which locations support regional endpoints, see
[Parameter Manager regional endpoint locations](https://docs.cloud.google.com/secret-manager/docs/locations.md.txt#parameter_manager_locations).

## Configure roles and permissions

Grant the Parameter Manager Admin role to the administrator to provide them with
the necessary permissions to work with Parameter Manager.

- To grant the required role, use the following command:

      gcloud projects add-iam-policy-binding PROJECT_ID \
          --member user:USER_IDENTIFIER \
          --role=roles/parametermanager.admin

  Replace the following:
  - <var translate="no">PROJECT_ID</var>: your project ID
  - <var translate="no">USER_IDENTIFIER</var>: the identifier you use to access Google Cloud and assign IAM roles. For example, `dana@example.com`. For more information, see [Identities for
    users](https://docs.cloud.google.com/iam/docs/user-identities).

## What's next

- Learn about [access control using Identity and Access Management (IAM) roles](https://docs.cloud.google.com/secret-manager/parameter-manager/docs/access-control.md.txt)