Skip to content

Commit 72d2048

Browse files
authored
feat: dynamically generate the OCIR url using the region name (#454)
1 parent 385cee6 commit 72d2048

File tree

4 files changed

+1
-44
lines changed

4 files changed

+1
-44
lines changed

main.tf

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,6 @@ module "extensions" {
289289

290290
# ocir parameters
291291
email_address = var.email_address
292-
ocir_urls = var.ocir_urls
293292
secret_id = var.secret_id
294293
secret_name = var.secret_name
295294
secret_namespace = var.secret_namespace

modules/extensions/templates.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ locals {
7474
region = var.region
7575

7676
email_address = var.email_address
77-
region_registry = var.ocir_urls[var.region]
77+
region_registry = join("",[var.region,".ocir.io"])
7878
secret_id = var.secret_id
7979
secret_name = var.secret_name
8080
secret_namespace = var.secret_namespace

modules/extensions/variables.tf

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -65,10 +65,6 @@ variable "kms_dynamic_group_id" {}
6565
# ocir
6666
variable "email_address" {}
6767

68-
variable "ocir_urls" {
69-
type = map(any)
70-
}
71-
7268
variable "secret_id" {}
7369

7470
variable "secret_name" {}

variables.tf

Lines changed: 0 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -656,44 +656,6 @@ variable "email_address" {
656656
type = string
657657
}
658658

659-
variable "ocir_urls" {
660-
# Region and region codes: https://docs.cloud.oracle.com/iaas/Content/General/Concepts/regions.htm#ServiceAvailabilityAcrossRegions
661-
description = "The urls of ocir in the respective regions."
662-
default = {
663-
af-johannesburg-1 = "jnb.ocir.io"
664-
ap-melbourne-1 = "mel.ocir.io"
665-
ap-hyderabad-1 = "hyd.ocir.io"
666-
ap-mumbai-1 = "bom.ocir.io"
667-
ap-osaka-1 = "kix.ocir.io"
668-
ap-singapore-1 = "sin.ocir.io"
669-
ap-seoul-1 = "icn.ocir.io"
670-
ap-chuncheon-1 = "yny.ocir.io"
671-
ap-sydney-1 = "syd.ocir.io"
672-
ap-tokyo-1 = "nrt.ocir.io"
673-
ca-montreal-1 = "yul.ocir.io"
674-
ca-toronto-1 = "yyz.ocir.io"
675-
eu-amsterdam-1 = "ams.ocir.io"
676-
eu-frankfurt-1 = "fra.ocir.io"
677-
eu-marseille-1 = "mrs.ocir.io"
678-
eu-milan-1 = "lin.ocir.io"
679-
eu-stockholm-1 = "arn.ocir.io"
680-
eu-zurich-1 = "zrh.ocir.io"
681-
il-jerusalem-1 = "mtz.ocir.io"
682-
me-abudhabi-1 = "auh.ocir.io"
683-
me-dubai-1 = "dxb.ocir.io"
684-
me-jeddah-1 = "jed.ocir.io"
685-
sa-santiago-1 = "scl.ocir.io"
686-
sa-saopaulo-1 = "gru.ocir.io"
687-
sa-vinhedo-1 = "vcp.ocir.io"
688-
uk-london-1 = "lhr.ocir.io"
689-
uk-cardiff-1 = "cwl.ocir.io"
690-
us-ashburn-1 = "iad.ocir.io"
691-
us-phoenix-1 = "phx.ocir.io"
692-
us-sanjose-1 = "sjc.ocir.io"
693-
}
694-
type = map(string)
695-
}
696-
697659
variable "secret_id" {
698660
description = "The OCID of the Secret on OCI Vault which holds the authentication token."
699661
type = string

0 commit comments

Comments
 (0)