'Implements interface.'

def add_config(self, options, script):

    if (not options.azure_account_credentials):
        return
    account_params = [options.azure_account_name, '--client-id', options.azure_account_client_id, '--default-key-vault', options.azure_account_default_key_vault, '--default-resource-group', options.azure_account_default_resource_group, '--subscription-id', options.azure_account_subscription_id, '--tenant-id', options.azure_account_tenant_id]
    if options.azure_account_object_id:
        account_params.extend(['--object-id', options.azure_account_object_id])
    if options.azure_account_packer_resource_group:
        account_params.extend(['--packer-resource-group', options.azure_account_packer_resource_group])
    if options.azure_account_packer_storage_account:
        account_params.extend(['--packer-storage-account', options.azure_account_packer_storage_account])
    script.append('hal    -q    --log=info    config    provider    azure    enable')
    script.append('hal    -q    --log=info    config    provider    azure    account    add    {params}    --app-key    <    {creds}'.format(params='    '.join(account_params), creds=os.path.basename(options.azure_account_credentials)))
