in modular_sdk/services/impl/maestro_credentials_service.py [0:0]
def build(cls, tenant_service: Optional[TenantService] = None,
parent_service: Optional[ParentService] = None,
application_service: Optional[ApplicationService] = None,
environment_service: Optional[EnvironmentService] = None,
ssm_service: Optional[AbstractSSMClient] = None,
sts_service: Optional[StsService] = None
) -> 'MaestroCredentialsService':
"""
Allows to build the service specifying some services to override.
SSM Service is expected to be overriden because some applications
(like AWS_ROLE, AZURE_CREDENTIALS) have their secrets on Maestro
prod, and some applications (RABBITMQ) will probably have their
secrets on our prod. So we need different ssm clients
:return: MaestroCredentialsService.
By default, maestro ssm client is used.
"""
modular = Modular()
return cls(
tenant_service=tenant_service or modular.tenant_service(),
parent_service=parent_service or modular.parent_service(),
application_service=application_service or modular.application_service(),
environment_service=environment_service or modular.environment_service(),
ssm_service=ssm_service or modular.assume_role_ssm_service(),
sts_service=sts_service or modular.sts_service()
)