Skip to content

Commit d66285a

Browse files
authored
fix(oci): update Docker image path and newrelic_endpoint validation (#2942)
1 parent 69d58cc commit d66285a

File tree

3 files changed

+12
-6
lines changed

3 files changed

+12
-6
lines changed

examples/modules/cloud-integrations/oci/metrics-integration/main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ resource "oci_functions_function" "metrics_function" {
2525
memory_in_mbs = "128"
2626
defined_tags = {}
2727
freeform_tags = local.freeform_tags
28-
image = "${var.region}.ocir.io/idms1yfytybe/public-newrelic-repo:${var.image_version}"
28+
image = "${var.region}.ocir.io/${var.image_bucket}/newrelic-metrics-integration/oci-metrics-forwarder:${var.image_version}"
2929
}
3030

3131
resource "oci_sch_service_connector" "service_connector" {

examples/modules/cloud-integrations/oci/metrics-integration/variables.tf

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,11 @@ variable "region" {
2121

2222
variable "newrelic_endpoint" {
2323
type = string
24-
default = "newrelic-metric-api"
24+
default = "US"
2525
description = "The endpoint to hit for sending the metrics. Varies by region [US|EU]"
2626
validation {
27-
condition = contains(["newrelic-staging-metric-api", "newrelic-metric-api", "newrelic-eu-metric-api"], var.newrelic_endpoint)
28-
error_message = "Valid values for var: newrelic_endpoint are (newrelic-staging-metric-api, newrelic-staging-vortex-metric-api, newrelic-metric-api, newrelic-eu-metric-api)."
27+
condition = contains(["US", "EU"], var.newrelic_endpoint)
28+
error_message = "Valid values for var: newrelic_endpoint are (US, EU)."
2929
}
3030
}
3131

@@ -72,4 +72,10 @@ variable "image_version" {
7272
type = string
7373
description = "The version of the Docker image for the New Relic function for the region."
7474
default = "latest"
75-
}
75+
}
76+
77+
variable "image_bucket" {
78+
type = string
79+
description = "The name of the bucket where the Docker image for the New Relic function is stored."
80+
default = "idptojlonu4e"
81+
}

website/docs/guides/cloud_integrations_guide.html.markdown

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@ module "oci_metrics_integration" {
249249
private_key = "USER_PVT_KEY"
250250
251251
# Endpoint selection (validated internally)
252-
newrelic_endpoint = "newrelic-metric-api" # or newrelic-eu-metric-api
252+
newrelic_endpoint = "US" # or EU
253253
254254
# Networking
255255
create_vcn = true

0 commit comments

Comments
 (0)