The Azure AD provider has an azuread_group data source you could use as input
The Opsgenie provider has an opsgenie_team resource you could use to sync
It would be good if Atlassian would let you drive OpsGenie groups off Atlassian Access. They've had more than four years to do it since the acquisition and haven't, though.