in modular_sdk/services/impl/maestro_credentials_service.py [0:0]
def complete_credentials_dict(credentials: dict,
tenant: Tenant, **kwargs) -> dict:
_LOG.info('Going to fulfill the credentials')
if tenant.cloud == Cloud.AZURE:
_LOG.info('Tenant`s cloud is AZURE. Adding subscription id')
if not credentials.get(ENV_AZURE_SUBSCRIPTION_ID):
credentials[ENV_AZURE_SUBSCRIPTION_ID] = tenant.project
return credentials
elif tenant.cloud == Cloud.AWS:
_LOG.info('Tenant`s cloud is AWS. Proxying creds')
return credentials
elif tenant.cloud == Cloud.GOOGLE:
_LOG.info('Creds are requested for google tenant. '
'Adding project id')
credentials[ENV_CLOUDSDK_CORE_PROJECT] = tenant.project
_LOG.debug(f'Google credentials project_id: '
f'{credentials[ENV_CLOUDSDK_CORE_PROJECT]}')
return credentials
_LOG.info('Not known cloud. Proxying whatever was received')
return credentials