Skip to content

Commit

Permalink
changes to make it cross-regional
Browse files Browse the repository at this point in the history
  • Loading branch information
pkrishn1-pk committed Apr 23, 2020
1 parent 870c9e5 commit bbbedbe
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 10 deletions.
2 changes: 1 addition & 1 deletion image.tf
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ resource "random_uuid" "test" { }

resource "ibm_is_image" "f5_custom_image" {
depends_on = ["data.external.authorize_policy_for_image", "random_uuid.test"]
href = "cos://us-south/vnf-f5-bucket/BIGIP-15.0.1-0.0.11.qcow2"
href = "${lookup(var.vnf_cos_image_url_map, data.ibm_is_region.region.name)}"
name = "${var.vnf_vpc_image_name}-${substr(random_uuid.test.result,0,8)}"
operating_system = "centos-7-amd64"
resource_group = "${data.ibm_resource_group.rg.id}"
Expand Down
10 changes: 1 addition & 9 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ variable "vnf_cos_instance_id" {
# The value for this variable is enter at offering
# onbaording time.This variable is hidden from the user.
##############################################################################
variable "vnf_cos_image_url" {
variable "vnf_cos_image_url_map" {
default = ""
description = "The COS image object SQL URL for F5-BIGIP qcow2 image."
}
Expand Down Expand Up @@ -65,12 +65,4 @@ variable "vnf_profile" {
variable "ibmcloud_endpoint" {
default = "cloud.ibm.com"
description = "The IBM Cloud environmental variable 'cloud.ibm.com' or 'test.cloud.ibm.com'"
}

variable "cos_image_url_region_mapping" {
description = "mapping for cross-region replication"
default = {
"us-south" = "cos://us-south/vnf-f5-bucket/BIGIP-15.0.1-0.0.11.qcow2",
"eu-de" = "cos://eu-de/vnf-f5-frankfurt-bucket/BIGIP-15.0.1-0.0.11.qcow2"
}
}

0 comments on commit bbbedbe

Please sign in to comment.