oracle / terraform-provider-oci

Terraform Oracle Cloud Infrastructure provider
https://www.terraform.io/docs/providers/oci/
Mozilla Public License 2.0
759 stars 674 forks source link

Cannot export attribute of oci_database_cloud_database_management #1732

Open pkrikorian opened 1 year ago

pkrikorian commented 1 year ago

Hello I got a issue when I tried to export some attributes of oci_database_cloud_database_management. I follow the attribute exported documentation: https://registry.terraform.io/providers/oracle/oci/latest/docs/resources/database_cloud_database_management#attributes-reference

Community Note

Terraform Version and Provider Version

Terraform v1.3.6
on linux_amd64
+ provider registry.terraform.io/hashicorp/oci v4.102.0
+ provider registry.terraform.io/oracle/oci v4.102.0

Affected Resource(s)

oci_database_cloud_database_management

Terraform Configuration Files

main.tf:

resource "oci_database_cloud_database_management" "db_managenement" {
  database_id          = data.oci_database_databases.databases.databases[0].id
  management_type      = "ADVANCED"
  private_end_point_id = oci_database_management_db_management_private_endpoint.db_management_private_endpoint.id
  service_name         = "${data.oci_database_databases.databases.databases[0].db_unique_name}.${oci_database_db_system.export_dbrandom.domain}"
  credentialdetails {
    user_name          = "dbsnmp"
    password_secret_id = var.db_dbsnmp_password
  }
  enable_management = true

  timeouts {
    create = "5m"
    update = "5m"
    delete = "5m"
  }
}

output.tf

output "connection_strings" {
  value = oci_database_cloud_database_management.db_managenement.connection_strings
}

Debug Output

β”‚ Error: Unsupported attribute
β”‚ 
β”‚   on modules/database/output.tf line 20, in output "connection_strings":
β”‚   20:   value = oci_database_cloud_database_management.db_managenement.connection_strings
β”‚ 
β”‚ This object has no argument, nested block, or exported attribute named "connection_strings".

Panic Output

Expected Behavior

Actual Behavior

Steps to Reproduce

  1. terraform apply

Important Factoids

References

ravinitp commented 1 year ago

Thank you for reporting the issue. We observed the affected resources are not provided in the description or it's incorrect. We request you to add it in issue description as mentioned in below format. Example: affected_resources = oci_core_instance , oci_core_instances

If it's not related to any particular resource then mention affected resource as terraform. Example: affected_resources = terraform

As this works through automation, request you to follow exact syntax.