# Create an app with configuration dependencies

In this quickstart, you set up an application with configuration dependencies
based on a sample application and then deploy parts of the app separately.

## Before you begin

1. Install [Git](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git). Git is required for copying samples to your machine.
2. Install the [Cloud Code plugin](https://docs.cloud.google.com/code/docs/vscode/install#installing) if you haven't already.

## Creating an application

1. Clone the Bank of Anthos repository:

   1. In the top menu bar, click **Terminal** \> **New Terminal**.
   2. Clone the Bank of Anthos repository:

          git clone https://github.com/GoogleCloudPlatform/bank-of-anthos.git

2. To open the workspace based on Bank of Anthos, in VS Code, click **File** \>
   **Open folder** and then navigate to the folder where the repository was
   cloned.

3. Double-click the `skaffold.yaml` file.

   1. The file contains multiple configurations, separated by YAML document
      separators (`---`). Each configuration can be deployed or referenced as a
      dependency separately.

          ---
          apiVersion: skaffold/v2beta18
          kind: Config

   2. Configurations with a name specified are known as *modules* .
      The following excerpt defines the `frontend` module.

          metadata:
          name: frontend # module defining frontend service

   3. Dependencies between configurations are specified using the `configs`
      tag. Required configurations must be deployed before the current
      configuration. The sample shows a dependency that's defined in the same
      file. The `configs` tag can also reference other `skaffold.yaml` files in
      the current project.

          requires:
          - configs: [db]

## Deploying modules

1. Open the Command Palette (`Ctrl`/`Cmd`+`Shift`+`P`) and then run **Cloud Code: Run on Kubernetes**.
2. Click **Select modules**.
3. Choose the modules that you want to deploy and then click **OK**.

   If you click **db** , the **db** config and the **setup** config that it
   requires are built.
4. When prompted, choose an image registry and then press `Enter`.

## Cleaning up

After you terminate your application, all Kubernetes resources deployed during
the run are deleted automatically.

To avoid incurring charges to your account for other resources used in this
quickstart, be sure to delete the cluster and project you created.

If you're using Google Cloud and would like to delete just your cluster, you
can do so by following these steps:

1. Click ![](https://docs.cloud.google.com/static/code/images/cloud-code-icon.svg) **Cloud Code** and then expand the **Kubernetes** explorer.
2. Hold the pointer over your cluster name and then click open_in_new **Open in Google Cloud console**.
3. Click **Delete** and then click **Delete**.

To delete your project (and associated resources, including any clusters):

1. Go to the Projects page in the Google Cloud console:

   [Go to the Projects page](https://console.cloud.google.com/project)
2. Select the project that you created for this quickstart and then click
   **Delete**.

3. Type the project ID to confirm and then click **Shut down**.

   This shuts down the project and schedules it for deletion.

## What's next

- Learn more about [modules](https://docs.cloud.google.com/code/docs/vscode/skaffold-modules).
- Learn about the language-specific [debugging support](https://docs.cloud.google.com/code/docs/vscode/debug) in Cloud Code.
- Customize your Cloud Code experience by configuring [settings](https://docs.cloud.google.com/code/docs/vscode/configuring-settings).