How can I retrieve OCI instance OCIDs?

Hi guys, working with OCI and I’m trying to get the instance OCIDS so that I can reference them in Instances are ceated from modules/A/ in and I need to reference OCIDs in modules/B/
I was thinking something like an but had no joy.