Skip to content

Commit

Permalink
feat: add powervs directlink creation via cloud connection
Browse files Browse the repository at this point in the history
Signed-off-by: Paul Bastide <[email protected]>
  • Loading branch information
prb112 committed Oct 2, 2023
1 parent 1c61faf commit d14018d
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 0 deletions.
13 changes: 13 additions & 0 deletions modules/2_pvs_link/network.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
################################################################
# Copyright 2023 - IBM Corporation. All rights reserved
# SPDX-License-Identifier: Apache-2.0
################################################################

resource "ibm_pi_cloud_connection" "new_cloud_connection" {
pi_cloud_instance_id = var.powervs_service_instance_id
pi_cloud_connection_name = "mac-cloud-conn-${var.cluster_id}"
pi_cloud_connection_speed = 1000
pi_cloud_connection_global_routing = true
pi_cloud_connection_transit_enabled = true
# Dev Note: Preference for Transit Gateway.
}
4 changes: 4 additions & 0 deletions modules/2_pvs_link/outputs.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
################################################################
# Copyright 2023 - IBM Corporation. All rights reserved
# SPDX-License-Identifier: Apache-2.0
################################################################
7 changes: 7 additions & 0 deletions modules/2_pvs_link/variables.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
################################################################
# Copyright 2023 - IBM Corporation. All rights reserved
# SPDX-License-Identifier: Apache-2.0
################################################################

variable "powervs_service_instance_id" {}
variable "cluster_id" {}
15 changes: 15 additions & 0 deletions modules/2_pvs_link/versions.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
################################################################
# Copyright 2023 - IBM Corporation. All rights reserved
# SPDX-License-Identifier: Apache-2.0
################################################################

terraform {
required_providers {
ibm = {
source = "IBM-Cloud/ibm"
version = "~> 1.56.0"
configuration_aliases = [ibm]
}
}
required_version = ">= 1.5.0"
}

0 comments on commit d14018d

Please sign in to comment.