Skip to content

Commit

Permalink
fix: update ExistingResourceInstances test (#248)
Browse files Browse the repository at this point in the history
test: update `TestRunExistingResourcesInstancesSchematics` test to pass value for `existing_cloud_monitoring_crn`
  • Loading branch information
aatreyee2506 authored Jan 29, 2025
1 parent 23746d1 commit 89da484
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tests/pr_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -306,6 +306,8 @@ func TestRunExistingResourcesInstancesSchematics(t *testing.T) {
{Name: "cloud_logs_existing_en_instances", Value: cloud_logs_existing_en_instances, DataType: "list(object)"},
{Name: "cloud_logs_policies", Value: cloud_logs_policies, DataType: "list(object)"},
{Name: "existing_cos_instance_crn", Value: terraform.Output(t, existingTerraformOptions, "cos_crn"), DataType: "string"},
{Name: "existing_cloud_monitoring_crn", Value: terraform.Output(t, existingTerraformOptions, "cloud_monitoring_crn"), DataType: "string"},
{Name: "cloud_monitoring_provision", Value: false, DataType: "bool"},
}

err := options.RunSchematicTest()
Expand Down
12 changes: 12 additions & 0 deletions tests/resources/existing-resources/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,18 @@ module "cloud_log_buckets" {
]
}


module "cloud_monitoring" {
source = "terraform-ibm-modules/observability-instances/ibm//modules/cloud_monitoring"
version = "3.4.0"
region = var.region
resource_group_id = module.resource_group.resource_group_id
instance_name = "${var.prefix}-sysdig"
plan = "lite"
tags = var.resource_tags

}

##############################################################################
# Event Notification
##############################################################################
Expand Down
5 changes: 5 additions & 0 deletions tests/resources/existing-resources/outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -66,3 +66,8 @@ output "en_crn_2" {
description = "Event Notification CRN"
value = module.event_notification_2.crn
}

output "cloud_monitoring_crn" {
description = "Cloud Monitoring CRN"
value = module.cloud_monitoring.crn
}

0 comments on commit 89da484

Please sign in to comment.