Skip to content

Latest commit

 

History

7 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DoubleCloud GCP Bring Your Own Cloud terraform module

Terraform module which creates GCP resources to bring them into DoubleCloud.

Usage

module "byoc" {
  source = "doublecloud/doublecloud-byoc/gcp"

  project_id           = var.gcp_project_id
  project_name         = var.gcp_project_name
  create_project       = true
  billing_account      = var.gcp_billing_account
  activate_google_apis = true
  folder_id            = var.gcp_folder_id

  network_name    = "doublecloud"
  region          = var.region
  subnetwork_name = "dc-${var.region}"
  ipv4_cidr       = "192.168.42.0/24"

  role_id                      = "dc-byoc"
  role_title                   = "DoubleCloud BYOC"
  service_account_id           = "dc-byoc"
  service_account_display_name = "DoubleCloud BYOC"
}

resource "doublecloud_network" "gcp" {
  project_id = var.project_id
  name = "my-aws-network"
  region_id  = module.byoc.region_id
  cloud_type = "gcp"
  gcp = {
    network_name = module.byoc.network_name
    subnetwork_name = module.byoc.subnetwork_name
    project_name   = module.byoc.project_name
    service_account_email = module.byoc.service_account_email
  }
}

Requirements

Name Version
terraform >= 1.2.6
google >= 4.44.1
time >= 0.9.1

Providers

Name Version
google >= 4.44.1
time >= 0.9.1

Modules

No modules.

Resources

Name Type
google_compute_network.doublecloud resource
google_compute_subnetwork.byoc resource
google_project.project resource
google_project_iam_custom_role.byoc resource
google_project_iam_member.byoc resource
google_project_service.apis resource
google_service_account.byoc resource
google_service_account_iam_policy.byoc resource
time_sleep.avoid_gcp_race resource
google_iam_policy.access_control data source

Inputs

Name Description Type Default Required
activate_google_apis Activate Google APIs or not bool true no
billing_account Billing account where new project should be attached string "" no
create_project Create new project for DoubleCloud bool true no
double_cloud_control_plane_service_account_email leave as default string "controlplane@byoa-doublecloud.iam.gserviceaccount.com" no
folder_id Folder ID where new project should be created string null no
ipv4_cidr Valid IPv4 CIDR block for VPC string "10.10.0.0/16" no
network_name Network name where create resources string n/a yes
project_id Project ID where to create resources string n/a yes
project_name Display name for a new project string "" no
region Region where create resources string n/a yes
role_id The camel case role ID to create string n/a yes
role_title A human-readable title for the role string n/a yes
service_account_display_name Display name for service account string n/a yes
service_account_id Service account ID string n/a yes
subnetwork_name Subnetwork name where create resources string n/a yes

Outputs

Name Description
network_name Name of the created Network. DoubleCloud resources will be created in this Network.
project_name GCP project ID where resources will be created.
region_id GCP Region where resources will be created.
service_account_email Email of the Service Account that has permissions to create resources in the project.
subnetwork_name Name of the created Subnetwork. DoubleCloud resources will be created in this Subnetwork.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

7 watching

Forks

Releases

Packages

Contributors

Languages