|
| 1 | +############################################################################## |
| 2 | +# MAPPING OF AVAILABLE MULTI-TENANT VPE SERVICE ENDPOINTS |
| 3 | +############################################################################## |
| 4 | + |
| 5 | +locals { |
| 6 | + |
| 7 | + endpoint_prefix = var.service_endpoints == "private" ? "private." : "" |
| 8 | + |
| 9 | + service_to_endpoint_map = { |
| 10 | + account-management = "crn:v1:bluemix:public:account-management:global:::endpoint:${local.endpoint_prefix}accounts.cloud.ibm.com" |
| 11 | + billing = "crn:v1:bluemix:public:billing:global:::endpoint:${local.endpoint_prefix}billing.cloud.ibm.com" |
| 12 | + cloud-object-storage = "crn:v1:bluemix:public:cloud-object-storage:global:::endpoint:s3.direct.${var.region}.cloud-object-storage.appdomain.cloud" |
| 13 | + cloud-object-storage-config = "crn:v1:bluemix:public:cloud-object-storage:global:::endpoint:config.direct.cloud-object-storage.cloud.ibm.com" |
| 14 | + codeengine = "crn:v1:bluemix:public:codeengine:${var.region}:::endpoint:${local.endpoint_prefix}${var.region}.codeengine.cloud.ibm.com" |
| 15 | + container-registry = "crn:v1:bluemix:public:container-registry:${contains(keys(local.container_registry_region_domain_map), var.region) ? var.region : "us-east"}:::endpoint:${lookup(local.container_registry_region_domain_map, var.region, "icr.io")}" # default to global if not in mapping |
| 16 | + containers-kubernetes = "crn:v1:bluemix:public:containers-kubernetes:${var.region}:::endpoint:api.${var.region}.containers.cloud.ibm.com" |
| 17 | + context-based-restrictions = "crn:v1:bluemix:public:context-based-restrictions:global:::endpoint:${local.endpoint_prefix}cbr.cloud.ibm.com" |
| 18 | + directlink = "crn:v1:bluemix:public:directlink:global:::endpoint:${local.endpoint_prefix}directlink.cloud.ibm.com" |
| 19 | + dns-svcs = "crn:v1:bluemix:public:dns-svcs:global::::" |
| 20 | + enterprise = "crn:v1:bluemix:public:enterprise:global:::endpoint:${local.endpoint_prefix}enterprise.cloud.ibm.com" |
| 21 | + global-search-tagging = "crn:v1:bluemix:public:global-search-tagging:global:::endpoint:api.${local.endpoint_prefix}global-search-tagging.cloud.ibm.com" |
| 22 | + globalcatalog = "crn:v1:bluemix:public:globalcatalog:global:::endpoint:${local.endpoint_prefix}globalcatalog.cloud.ibm.com" |
| 23 | + hs-crypto = "crn:v1:bluemix:public:hs-crypto:${var.region}:::endpoint:api.${local.endpoint_prefix}${var.region}.hs-crypto.cloud.ibm.com" |
| 24 | + hs-crypto-cert-mgr = "crn:v1:bluemix:public:hs-crypto:${var.region}:::endpoint:cert-mgr.${local.endpoint_prefix}${var.region}.hs-crypto.cloud.ibm.com" |
| 25 | + hs-crypto-ep11 = "crn:v1:bluemix:public:hs-crypto:${var.region}:::endpoint:ep11.${local.endpoint_prefix}${var.region}.hs-crypto.cloud.ibm.com" |
| 26 | + hs-crypto-ep11-az1 = "crn:v1:bluemix:public:hs-crypto:${var.region}:::endpoint:ep11-az1.${local.endpoint_prefix}${var.region}.hs-crypto.cloud.ibm.com" |
| 27 | + hs-crypto-ep11-az2 = "crn:v1:bluemix:public:hs-crypto:${var.region}:::endpoint:ep11-az2.${local.endpoint_prefix}${var.region}.hs-crypto.cloud.ibm.com" |
| 28 | + hs-crypto-ep11-az3 = "crn:v1:bluemix:public:hs-crypto:${var.region}:::endpoint:ep11-az3.${local.endpoint_prefix}${var.region}.hs-crypto.cloud.ibm.com" |
| 29 | + hs-crypto-kmip = "crn:v1:bluemix:public:hs-crypto:${var.region}:::endpoint:kmip.${local.endpoint_prefix}${var.region}.hs-crypto.cloud.ibm.com" |
| 30 | + hs-crypto-tke = "crn:v1:bluemix:public:hs-crypto:${var.region}:::endpoint:tke.${local.endpoint_prefix}${var.region}.hs-crypto.cloud.ibm.com" |
| 31 | + hyperp-dbaas-mongodb = "crn:v1:bluemix:public:hyperp-dbaas-mongodb:${var.region}:::endpoint:dbaas900-mongodb.${local.endpoint_prefix}hyperp-dbaas.cloud.ibm.com" |
| 32 | + hyperp-dbaas-postgresql = "crn:v1:bluemix:public:hyperp-dbaas-postgresql:${var.region}:::endpoint:dbaas900-postgresql.${local.endpoint_prefix}hyperp-dbaas.cloud.ibm.com" |
| 33 | + iam-svcs = "crn:v1:bluemix:public:iam-svcs:global:::endpoint:${local.endpoint_prefix}iam.cloud.ibm.com" |
| 34 | + is = "crn:v1:bluemix:public:is:${var.region}:::endpoint:${var.region}.${local.endpoint_prefix}iaas.cloud.ibm.com" |
| 35 | + kms = "crn:v1:bluemix:public:kms:${var.region}:::endpoint:${local.endpoint_prefix}${var.region}.kms.cloud.ibm.com" |
| 36 | + messaging = "crn:v1:bluemix:public:messaging:global:::endpoint:${local.endpoint_prefix}messaging.cloud.ibm.com" |
| 37 | + resource-controller = "crn:v1:bluemix:public:resource-controller:global:::endpoint:${local.endpoint_prefix}resource-controller.cloud.ibm.com" |
| 38 | + support-center = "crn:v1:bluemix:public:support:global:::endpoint:private.support-center.cloud.ibm.com" |
| 39 | + transit = "crn:v1:bluemix:public:transit:global:::endpoint:${local.endpoint_prefix}transit.cloud.ibm.com" |
| 40 | + user-management = "crn:v1:bluemix:public:user-management:global:::endpoint:${local.endpoint_prefix}user-management.cloud.ibm.com" |
| 41 | + vmware = "crn:v1:bluemix:public:vmware:${var.region}:::endpoint:api.${local.endpoint_prefix}${var.region}.vmware.cloud.ibm.com" |
| 42 | + ntp = "ibm-ntp-server" |
| 43 | + } |
| 44 | + |
| 45 | + # CONTAINER-REGISTRY region-domain mappings |
| 46 | + # this cannot be pulled dynamically at this time, so hard-coding the region to registry domain mapping |
| 47 | + # Resource: https://cloud.ibm.com/docs/Registry?topic=Registry-registry_vpe&interface=ui#registry_vpe_endpoint_setup |
| 48 | + container_registry_region_domain_map = { |
| 49 | + "au-syd" = "au.icr.io" # ap-south |
| 50 | + "jp-osa" = "jp2.icr.io" # jp-osa |
| 51 | + "jp-tok" = "jp.icr.io" # ap-north |
| 52 | + "eu-de" = "de.icr.io" # eu-central |
| 53 | + "eu-gb" = "uk.icr.io" # uk-south |
| 54 | + "ca-tor" = "ca.icr.io" # ca-tor |
| 55 | + "br-sao" = "br.icr.io" # br-sao |
| 56 | + "us-south" = "us.icr.io" # us |
| 57 | + } |
| 58 | + |
| 59 | +} |
0 commit comments