LogoLogo
Documentation and Guides
Documentation and Guides
  • ABOUT APONO
    • Why Choose Apono
    • Security and Architecture
    • Glossary
  • GETTING STARTED
    • How Apono Works
    • Getting started
    • Access Discovery
    • Integrating with Apono
  • CONNECTORS AND SECRETS
    • Apono Integration Secret
    • High Availability for Connectors
    • Installing a connector with Docker
    • Manage integrations
    • Manage connectors
    • S3 Storage
  • AWS ENVIRONMENT
    • AWS Overview
    • Apono Connector for AWS
      • Installing a connector on EKS Using Terraform
      • Updating a connector in AWS
      • Installing a connector on AWS ECS using Terraform
    • AWS Integrations
      • Integrate an AWS account or organization
        • Auto Discover AWS RDS Instances
        • AWS Best Practices
      • Amazon Redshift
      • RDS PostgreSQL
      • AWS RDS MySQL
      • Integrate with EKS
      • AWS Lambda Custom Integration
      • EC2 via Systems Manager Agent (SSM)
  • AZURE ENVIRONMENT
    • Apono Connector for Azure
      • Install an Azure connector on ACI using Azure CLI
      • Install an Azure connector on ACI using PowerShell
      • Install an Azure connector on ACI using Terraform
      • Updating a connector in Azure
    • Azure Integrations
      • Integrate with Azure Management Group or Subscription
        • Auto Discover Azure SQL Databases
      • Azure MySQL
      • Azure PostgreSQL
      • Integrate with AKS
  • GCP ENVIRONMENT
    • Apono Connector for GCP
      • Installing a GCP connector on Cloud Run using CLI
      • Installing a GCP connector on GKE using CLI (Helm)
      • Installing a GCP connector on GKE using Terraform
      • Updating a connector in Google Cloud
    • GCP Integrations
      • Integrate a GCP organization or project
      • CloudSQL - MySQL
      • CloudSQL - PostgreSQL
      • Google Cloud Functions
      • Integrate with GKE
      • AlloyDB
  • KUBERNETES ENVIRONMENT
    • Apono Connector for Kubernetes
      • Installing a connector on Kubernetes with AWS permissions
      • Updating a Kubernetes connector
    • Kubernetes Integrations
      • Integrate with Self-Managed Kubernetes
  • ADDITIONAL INTEGRATIONS
    • Databases and Data Repositories
      • Microsoft SQL Server
      • MongoDB
      • MongoDB Atlas
      • MongoDB Atlas Portal
      • MySQL
      • Oracle Database
      • PostgreSQL
      • RabbitMQ
      • Redis Cloud (Redislabs)
      • Snowflake
      • Vertica
      • MariaDB
    • Network Management
      • SSH Servers
      • RDP Servers
      • Windows Domain Controller
      • AWS EC2 SSH Servers
      • Azure VM SSH Servers
      • Installing the Apono HTTP Proxy
    • Development Tools
      • GitHub
      • Rancher
    • Identity Providers
      • Okta SCIM
      • Okta Groups
      • Okta SSO for Apono logins
      • Google Workspace (Gsuite)
      • Google Workspace (GSuite) Groups
      • Azure Active Directory (Microsoft Entra ID)
      • Azure Active Directory (Entra ID) Groups
      • Jumpcloud
      • JumpCloud Groups
      • OneLogin
      • OneLogin Group
      • LDAP Groups
      • The Manager Attribute in Access Flows
      • HiBob
      • Ping Identity SSO
    • Incident Response Integrations
      • Opsgenie
      • PagerDuty
      • VictorOps (Splunk On-Call)
      • Zenduty
    • ChatOps Integrations
      • Slack integration
      • Teams integration
      • Backstage Integration
    • Secret Management
      • 1Password
  • WEBHOOK INTEGRATIONS
    • Webhooks Overview
    • Anomaly Webhook
    • Audit Log Webhook
    • Request Webhook
      • Custom Webhooks
      • Communications and Notifications
        • Slack Outbound Webhooks
        • Teams
        • Outlook and Gmail (Using Azure Logic App)
      • ITSM
        • Freshdesk
        • Jira
        • ServiceNow
        • Zendesk
        • Freshservice
        • ServiceDesk Plus
      • Logs and SIEMs
        • Coralogix
        • Datadog
        • Logz.io
        • Grafana
        • New Relic
        • SolarWinds
        • Sumo Logic
        • Cortex
        • Logpoint
        • Splunk
        • Microsoft Sentinel
      • Orchestration and workflow builders
        • Okta Workflows
        • Torq
    • Integration Webhook
    • Webhook Payload References
      • Audit Log Webhook Payload Schema Reference
      • Webhook Payload Schema Reference
    • Manage webhooks
    • Troubleshoot a webhook
    • Manual Webhook
      • ITSM
        • PagerDuty
  • ACCESS FLOWS
    • Access Flows
      • What are Access Flows?
    • Create Access Flows
      • Self Serve Access Flows
      • Automatic Access Flows
      • Access Duration
    • Manage Access Flows
      • Right Sizing
    • Revoke Access
    • Dynamic Access Management
      • Resource and Integration Owners
    • Common Use Cases
      • Ensuring SLA
      • Protecting PII and Customer Data
      • Production Stability and Management
      • Break Glass Protocol
    • Create Bundles
    • Manage Bundles
  • ACCESS REQUESTS AND APPROVALS
    • Slack
      • Requesting Access with Slack
      • Approving Access with Slack
      • Reviewing historical requests with Slack
    • Teams
      • Requesting Access with Teams
      • Approving Access with Teams
    • CLI
      • Install and manage the Apono CLI
      • Requesting Access with CLI
    • Web Portal
      • Requesting Access with the Web Portal
      • Approving Access with the Web Portal
      • Reviewing historical requests with the Web Portal
    • Freshservice
    • Favorites
  • Inventory
    • Inventory Overview
    • Inventory
    • Access Scopes
    • Risk Scores
    • Apono Query Language
  • AUDITS AND REPORTS
    • Activity Overview
      • Activity
      • Create Reports
      • Manage Reports
    • Compliance: Audit and Reporting
    • Auditing Access in Apono
    • Admin Audit Log (Syslog)
  • HELP AND DEBUGGING
    • Integration Status Page
    • Troubleshooting Errors
  • ARCHITECTURE AND SECURITY
    • Anomaly Detection
    • Multi-factor Authentication
    • Credentials Rotation Policy
    • Periodic User Cleanup & Deletion
    • End-user Authentication
    • Personal API Tokens
  • User Administration
    • Role-Based Access Control (RBAC) Reference
    • Create Identities
    • Manage Identities
Powered by GitBook
On this page
  • Prerequisites
  • Install a connector
  • FAQ

Was this helpful?

Export as PDF
  1. GCP ENVIRONMENT
  2. Apono Connector for GCP

Installing a GCP connector on GKE using Terraform

Create a connector on Google Kubernetes Engine

PreviousInstalling a GCP connector on GKE using CLI (Helm)NextUpdating a connector in Google Cloud

Last updated 7 months ago

Was this helpful?

Connectors are secure on-premises components that link Apono to your resources:

  • No secrets are read, cached, or stored

  • No account admin privileges need to be granted to Apono

  • The connector contacts your secret store or key vault to sync data or provision access

Once set up, this connector will enable you to sync data from cloud applications and grant and revoke access permissions through Google Kubernetes Engine (GKE).


Prerequisites

Item
Description

Apono Token

Account-specific Apono authentication value Use the following steps to obtain your token:

  1. Click Cloud installation.

  2. Click Cloud installation > GCP > Install and Connect GCP Project > CLI (GKE).

  3. Copy the token listed on the page in step 1.

Google Cloud Command Line Interface (Google Cloud CLI)

Google Cloud Information

Information for your Google Cloud instance:

  • Google Cloud Region

  • GKE Cluster Name

  • GKE Cluster Region

  • Tag Key-Value Pairs (if used)

Optional:

  • Apono Connector ID

  • Service Account Name

  • Namespace

Owner Role


Install a connector

Use the following sections to install a connector for either your or .

Project

Follow these steps to install an Apono connector for a Google Project:

  1. In your shell environment, log in to Google Cloud with an account possessing Owner permissions.

gcloud auth application-default login
  1. At the shell prompt, set the environment variables.

export TF_VAR_PROJECT_ID="<GCP_PROJECT_ID>"
export TF_VAR_REGION="<GCP_REGION>"
export TF_VAR_NAME="<GKE_CLUSTER_NAME>"
export TF_VAR_LOCATION="<GCP_CLUSTER_REGION>"
export TF_VAR_APONO_TOKEN="<APONO_TOKEN>"
export TF_VAR_TAGS="<{tag1="value1"}>"
  1. (Optional) Set the following optional environment variables.

export TF_VAR_CONNECTOR_ID="<APONO_CONNECTOR_NAME>"
export TF_VAR_SERVICE_ACCOUNT_NAME="<GCP_SERVICE_ACCOUNT_NAME>"
export TF_VAR_NAMESPACE="<NAMESPACE>"
  1. In a new or existing Terraform (.tf) file, add the following provider and module information to create a connector.

provider "google" {
  project     = "{var.PROJECT_ID}"
  region      = "{var.REGION}"
}

data "google_client_config" "provider" {}

data "google_container_cluster" "gke" {
  name     = "{var.NAME}"
  location = "{var.LOCATION}"
}

provider "helm" {
  kubernetes{
    host  = "https://${data.google_container_cluster.gke.endpoint}"
    token = data.google_client_config.provider.access_token
    cluster_ca_certificate = base64decode(
      data.google_container_cluster.gke.master_auth[0].cluster_ca_certificate,)
    exec {
      api_version = "client.authentication.k8s.io/v1beta1"
      command     = "gke-gcloud-auth-plugin"
    }
  }
}

module "apono-connector" {
  source = "github.com/apono-io/terraform-modules//gcp/organization-wide-connector/gke/stacks/apono-connector"
  connectorId = "{var.CONNECTOR_ID}" //OPTIONAL
  aponoToken = "{var.APONO_TOKEN}"
  projectId = "{var.PROJECT_ID}"
  serviceAccountName = "{var.SERVICE_ACCOUNT_NAME}" //OPTIONAL
  namespace = "{var.NAMESPACE}" //OPTIONAL
  tags = "{var.TAGS}"
}
  1. At the Terraform CLI, download and install the provider plugin and module.

terraform init
  1. Apply the Terraform changes. The proposed changes and a confirmation prompt will be listed.

terraform apply
  1. Enter yes to confirm deploying the changes to your Google Project instance.

Organization

Follow these steps to install an Apono connector for a Google Organization:

  1. In your shell environment, log in to Google Cloud with an account possessing Organization Administrator permissions.

gcloud alpha auth application-default login
  1. At the shell prompt, set the environment variables.

export TF_VAR_PROJECT_ID="<GCP_PROJECT_ID>"
export TF_VAR_REGION="<GCP_REGION>"
export TF_VAR_NAME="<GKE_CLUSTER_NAME>"
export TF_VAR_LOCATION="<GCP_CLUSTER_REGION>"
export TF_VAR_APONO_TOKEN="<APONO_TOKEN>"
export TF_VAR_ORGANIZATION_ID="<GCP_ORGANIZATION_ID>"
export TF_VAR_TAGS="<{tag1="value1"}>"
  1. (Optional) Set the following optional environment variables.

export TF_VAR_CONNECTOR_ID="<APONO_CONNECTOR_NAME>"
export TF_VAR_SERVICE_ACCOUNT_NAME="<GCP_SERVICE_ACCOUNT_NAME>"
export TF_VAR_NAMESPACE="<NAMESPACE>"
  1. In a new or existing Terraform (.tf) file, add the following provider and module information to create a connector.

provider "google" {
  project     = "{var.PROJECT_ID}"
  region      = "{var.REGION}"
}

data "google_client_config" "provider" {}

data "google_container_cluster" "gke" {
  name     = "{var.NAME}"
  location = "{var.LOCATION}"
}

provider "helm" {
  kubernetes{
    host  = "https://${data.google_container_cluster.gke.endpoint}"
    token = data.google_client_config.provider.access_token
    cluster_ca_certificate = base64decode(
      data.google_container_cluster.gke.master_auth[0].cluster_ca_certificate,)
    exec {
      api_version = "client.authentication.k8s.io/v1beta1"
      command     = "gke-gcloud-auth-plugin"
    }
  }
}

module "apono-connector" {
  source = "github.com/apono-io/terraform-modules//gcp/organization-wide-connector/gke/stacks/apono-connector"
  connectorId = "{var.CONNECTOR_ID}" //OPTIONAL
  aponoToken = "{var.APONO_TOKEN}"
  projectId = "{var.PROJECT_ID}"
  organizationId = "{var.ORGANIZATION_ID}"
  serviceAccountName = "{var.SERVICE_ACCOUNT_NAME}" //OPTIONAL
  namespace = "{var.NAMESPACE}" //OPTIONAL
  tags = "{var.TAGS}"
}
  1. At the Terraform CLI, download and install the provider plugin and module.

terraform init
  1. Apply the Terraform changes. The proposed changes and a confirmation prompt will be listed.

terraform apply
  1. Enter yes to confirm deploying the changes to your Google Organization instance.


FAQ

Can the Apono Terraform module be pinned to a version?

Yes. You can append the version number to the source location with the ?ref=vX.X.X query string.

The following examples pin the version to 1.0.0 for a connector without permissions.

Pinned Version (Project)
provider "google" {
  project     = "{var.PROJECT_ID}"
  region      = "{var.REGION}"
}

data "google_client_config" "provider" {}

data "google_container_cluster" "gke" {
  name     = "{var.NAME}"
  location = "{var.LOCATION}"
}

provider "helm" {
  kubernetes{
    host  = "https://${data.google_container_cluster.gke.endpoint}"
    token = data.google_client_config.provider.access_token
    cluster_ca_certificate = base64decode(
      data.google_container_cluster.gke.master_auth[0].cluster_ca_certificate,)
    exec {
      api_version = "client.authentication.k8s.io/v1beta1"
      command     = "gke-gcloud-auth-plugin"
    }
  }
}

module "apono-connector" {
  source = "github.com/apono-io/terraform-modules//gcp/organization-wide-connector/gke/stacks/apono-connector?ref=v1.0.0"
  connectorId = "{var.CONNECTOR_ID}" //OPTIONAL
  aponoToken = "{var.APONO_TOKEN}"
  projectId = "{var.PROJECT_ID}"
  serviceAccountName = "{var.SERVICE_ACCOUNT_NAME}" //OPTIONAL
  namespace = "{var.NAMESPACE}" //OPTIONAL
  tags = "{var.TAGS}"
}
Pinned Version (Organization)
provider "google" {
  project     = "{var.PROJECT_ID}"
  region      = "{var.REGION}"
}

data "google_client_config" "provider" {}

data "google_container_cluster" "gke" {
  name     = "{var.NAME}"
  location = "{var.LOCATION}"
}

provider "helm" {
  kubernetes{
    host  = "https://${data.google_container_cluster.gke.endpoint}"
    token = data.google_client_config.provider.access_token
    cluster_ca_certificate = base64decode(
      data.google_container_cluster.gke.master_auth[0].cluster_ca_certificate,)
    exec {
      api_version = "client.authentication.k8s.io/v1beta1"
      command     = "gke-gcloud-auth-plugin"
    }
  }
}

module "apono-connector" {
  source = "github.com/apono-io/terraform-modules//gcp/organization-wide-connector/gke/stacks/apono-connector?ref=v1.0.0"
  connectorId = "{var.CONNECTOR_ID}" //OPTIONAL
  aponoToken = "{var.APONO_TOKEN}"
  projectId = "{var.PROJECT_ID}"
  organizationId = "{var.ORGANIZATION_ID}"
  serviceAccountName = "{var.SERVICE_ACCOUNT_NAME}" //OPTIONAL
  namespace = "{var.NAMESPACE}" //OPTIONAL
  tags = "{var.TAGS}"
}

On the page, click Install Connector. The Install Connector page appears.

used to manage Google Cloud resources

(Organization)

that provides Owner permissions for the project or organization

On the page, verify that the connector has been deployed.

On the page, verify that the connector has been deployed.

Connectors
Connectors
Google Project
Google Organization
Connectors
Command-line interface
Organization ID
Project ID
Google Cloud role