Aws sg and instance creation

Thank you for the reply.
They are different modules.

Can I use “depends_on” to solve this or any other way so it will run in the same terraform apply command ??