Add inter module dependency in terraform

Please help in finding out a way to add dependency of module 1 to the subsequent module 2 .

I have create module 1 for active directory and then module 2 for SQL but before promoting Domain controller , my subsequent script goes for joining domain for SQL.

I want to add a dependency so that till module 1 is finished , module 2 should be fired.

I tried various ways -

  1. add dependency in module
    depends_on = [module.active-directory]
    Error - The name “depends_on” is reserved for use in a future version of Terraform.

  2. Added depends on a module 2 resource , here active-directory is the module name
    depends_on = [“active-directory.azurerm_virtual_machine_extension.create-active-directory-forest”]
    Error - References in depends_on must be to a whole object (resource, etc), not to an
    attribute of an object.

Do anyone has idea about how to add dependency of other module resource.

Any help is highly appretiated.