Error: 400-InvalidParameter, Invalid OCID

Hi

I request your help in resolving below error :

Error: 400-InvalidParameter, Invalid OCID: ‘module.ons.topic_id’

$ cat main.tf
module “ons” {
source = “./modules/ons”
}
module “monitoring” {
source = “./modules/monitoring”
depends_on = [module.ons]
}

$ cd modules/ons

$ ls
main.tf outputs.tf provider.tf vars.tf versions.tf

$ cat main.tf
resource “oci_ons_notification_topic” “export_TestDB-Topic” {
compartment_id = var.compartment_ocid
defined_tags = {
“Oracle-Tags.CreatedBy” = “oxxxxxx”
“Oracle-Tags.CreatedOn” = “”
}
description = “Topic to test”
freeform_tags = {
}
name = “TestDB-Topic”
}

$ cat outputs.tf
output “topic_id” {
value = oci_ons_notification_topic.export_TestDB-Topic.topic_id
}

$ cd modules/monitoring

$ cat main.tf
resource oci_monitoring_alarm export_High-IOPS {
body = “Detected IOPS on”
compartment_id = var.compartment_ocid
defined_tags = {
“Oracle-Tags.CreatedBy” = “oracleidentitycloudservice/dharmin.mandalia@oracle.com”
“Oracle-Tags.CreatedOn” = “2022-09-06T08:59:29.724Z”
}
destinations = [“module.ons.topic_id”]
}

when I run terraform apply , I get below error :

Error: 400-InvalidParameter, Invalid OCID: ‘module.ons.topic_id’
│ Suggestion: Please update the parameter(s) in the Terraform config as per error message Invalid OCID: ‘module.ons.topic_id’
│ Documentation: Terraform Registry
│ API Reference: Oracle Cloud Infrastructure API Reference and Endpoints
│ Request Target: POST
│ Provider version: 4.96.0, released on 2022-10-05. This provider is 2 Update(s) behind to current.
│ Service: Monitoring Alarm
│ Operation Name: CreateAlarm

Regards
Dharmin