Skip to content

Commit 89da484

Browse files
authored
fix: update ExistingResourceInstances test (#248)
test: update `TestRunExistingResourcesInstancesSchematics` test to pass value for `existing_cloud_monitoring_crn`
1 parent 23746d1 commit 89da484

File tree

3 files changed

+19
-0
lines changed

3 files changed

+19
-0
lines changed

tests/pr_test.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -306,6 +306,8 @@ func TestRunExistingResourcesInstancesSchematics(t *testing.T) {
306306
{Name: "cloud_logs_existing_en_instances", Value: cloud_logs_existing_en_instances, DataType: "list(object)"},
307307
{Name: "cloud_logs_policies", Value: cloud_logs_policies, DataType: "list(object)"},
308308
{Name: "existing_cos_instance_crn", Value: terraform.Output(t, existingTerraformOptions, "cos_crn"), DataType: "string"},
309+
{Name: "existing_cloud_monitoring_crn", Value: terraform.Output(t, existingTerraformOptions, "cloud_monitoring_crn"), DataType: "string"},
310+
{Name: "cloud_monitoring_provision", Value: false, DataType: "bool"},
309311
}
310312

311313
err := options.RunSchematicTest()

tests/resources/existing-resources/main.tf

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,18 @@ module "cloud_log_buckets" {
5959
]
6060
}
6161

62+
63+
module "cloud_monitoring" {
64+
source = "terraform-ibm-modules/observability-instances/ibm//modules/cloud_monitoring"
65+
version = "3.4.0"
66+
region = var.region
67+
resource_group_id = module.resource_group.resource_group_id
68+
instance_name = "${var.prefix}-sysdig"
69+
plan = "lite"
70+
tags = var.resource_tags
71+
72+
}
73+
6274
##############################################################################
6375
# Event Notification
6476
##############################################################################

tests/resources/existing-resources/outputs.tf

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,3 +66,8 @@ output "en_crn_2" {
6666
description = "Event Notification CRN"
6767
value = module.event_notification_2.crn
6868
}
69+
70+
output "cloud_monitoring_crn" {
71+
description = "Cloud Monitoring CRN"
72+
value = module.cloud_monitoring.crn
73+
}

0 commit comments

Comments
 (0)