Skip to content

Latest commit

 

History

History

terraform-ibm-transit-gateway-action

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

IBM Cloud Transit Gateway action module

With the IBM Cloud® Transit Gateway action module, you can approve or reject connection requests for a cross-account VPCs connection that uses a transit gateway. This scenario expects one account to own the transit gateway and one of the VPCs and a different account to own the second VPC. That second account receives an approval request that must be approved before the connection can be established.

For more information, see adding a cross-account connection in the IBM Cloud Docs.

Usage

# provider for account B
provider "ibm" {
  ibmcloud_api_key = var.ibmcloud_api_key_ext # pragma: allowlist secret external account apikey
  region           = var.region_account_b
  alias            = "accountB"
}

module "tg_gateway_connection_crossaccounts_approve" {

  source  = "terraform-ibm-modules/transit-gateway/ibm//modules/terraform-ibm-transit-gateway-action"
  version = "latest" # Replace "latest" with a release version to lock into a specific release
  vpc_connection_ids = ["1f6df0af-c2b6-4f1a-97dd-29ed50a8e1f3"] // ID of the transit gateway connection resource
  transit_gw_id      = module.tg_gateway_connection.tg_id // ID of the transit gateway resource
  action             = "approve"
  providers = {
    ibm = ibm.accountB
  }
}

Examples

Requirements

Name Version
terraform >= 1.0.0
ibm >= 1.52.0, < 2.0.0

Modules

No modules.

Resources

Name Type
ibm_tg_connection_action.classic_tg_cross_connection_approval resource
ibm_tg_connection_action.vpc_tg_cross_connection_approval resource

Inputs

Name Description Type Default Required
action Action to peform on the list of cnnection ids. Allowed values are 'approve' or 'reject' string n/a yes
classic_connection_ids The list of classic connection IDs to perform the action for the account owner of ibmcloud_api_key list(string) [] no
transit_gw_id ID to the transit gateway where the cross-account connection is created string n/a yes
vpc_connection_ids The list of vpc connection IDs to perform the action for the account owner of ibmcloud_api_key list(string) [] no

Outputs

Name Description
classic_tg_crossaacount_approvals Result for classic crossaccount actions
vpc_tg_crossaacount_approvals Result for vpc crossaccount actions

Contributing

To set up your local development environment, see Local development setup in the project documentation.