google_beyondcorp_app_connection

A BeyondCorp AppConnection resource represents a BeyondCorp protected AppConnection to a remote application. It creates all the necessary GCP components needed for creating a BeyondCorp protected AppConnection. Multiple connectors can be authorised for a single AppConnection.

To get more information about AppConnection, see:

Open in Cloud Shell

Example Usage - Beyondcorp App Connection Basic

resource "google_service_account" "service_account" {
  account_id   = "my-account"
  display_name = "Test Service Account"
}

resource "google_beyondcorp_app_connector" "app_connector" {
  name = "my-app-connector"
  principal_info {
    service_account {
     email = google_service_account.service_account.email
    }
  }
}

resource "google_beyondcorp_app_connection" "app_connection" {
  name = "my-app-connection"
  type = "TCP_PROXY"
  application_endpoint {
    host = "foo-host"
    port = 8080
  }
  connectors = [google_beyondcorp_app_connector.app_connector.id]
}
Open in Cloud Shell

Example Usage - Beyondcorp App Connection Full

resource "google_service_account" "service_account" {
  account_id   = "my-account"
  display_name = "Test Service Account"
}

resource "google_beyondcorp_app_gateway" "app_gateway" {
  name = "my-app-gateway"
  type = "TCP_PROXY"
  host_type = "GCP_REGIONAL_MIG"
}

resource "google_beyondcorp_app_connector" "app_connector" {
  name = "my-app-connector"
  principal_info {
    service_account {
     email = google_service_account.service_account.email
    }
  }
}

resource "google_beyondcorp_app_connection" "app_connection" {
  name = "my-app-connection"
  type = "TCP_PROXY"
  display_name = "some display name"
  application_endpoint {
    host = "foo-host"
    port = 8080
  }
  connectors = [google_beyondcorp_app_connector.app_connector.id]
  gateway {
    app_gateway = google_beyondcorp_app_gateway.app_gateway.id
  }
  labels = {
    foo = "bar"
    bar = "baz"
  }
}

Argument Reference

The following arguments are supported:

The application_endpoint block supports:


The gateway block supports:

Attributes Reference

In addition to the arguments listed above, the following computed attributes are exported:

Timeouts

This resource provides the following Timeouts configuration options:

Import

AppConnection can be imported using any of these accepted formats:

In Terraform v1.5.0 and later, use an import block to import AppConnection using one of the formats above. For example:

import {
  id = "projects/{{project}}/locations/{{region}}/appConnections/{{name}}"
  to = google_beyondcorp_app_connection.default
}

When using the terraform import command, AppConnection can be imported using one of the formats above. For example:

$ terraform import google_beyondcorp_app_connection.default projects/{{project}}/locations/{{region}}/appConnections/{{name}}
$ terraform import google_beyondcorp_app_connection.default {{project}}/{{region}}/{{name}}
$ terraform import google_beyondcorp_app_connection.default {{region}}/{{name}}
$ terraform import google_beyondcorp_app_connection.default {{name}}

User Project Overrides

This resource supports User Project Overrides.