Add null resources which will trigger identitystore group and user data source refresh. This allows to create SSO users and groups in the same state file as terraform-aws-sso module resources and without adding depends_on argument at the module level. (check with_dependencies example). When using null resource instead of depends_on, it will only recreate account assignments, when aa new SSO group is added. It will NOT re-create all module resources, after a new AWS Account is added.
Breaking Changes
When updating the module version, it will re-create all account assignments on the first terraform apply as it creates null_resources, so can disconnect the sessions and require re-authentication.
Description
Add null resources which will trigger identitystore group and user data source refresh. This allows to create SSO users and groups in the same state file as
terraform-aws-sso
module resources and without addingdepends_on
argument at the module level. (checkwith_dependencies
example). When usingnull
resource instead ofdepends_on
, it will only recreate account assignments, when aa new SSO group is added. It will NOT re-create all module resources, after a new AWS Account is added.Breaking Changes
When updating the module version, it will re-create all account assignments on the first terraform apply as it creates null_resources, so can disconnect the sessions and require re-authentication.
Testing
Tested manually.