Skip to main content

Activate Flexsave for Google Cloud

Sunset Announcement

DoiT no longer offers Flexsave for Google Cloud. Please take a moment to review the Flexsave for Google Cloud Sunset FAQ that we have prepared to address the most common questions you might have.

Caution

To take full advantage of Flexsave without losing the benefit of sustained use discounts (SUDs), we recommend that:

  • If you use general-purpose N1 and memory-optimized M1 machine types, activate Flexsave no later than the second week of the month.

  • If you use general-purpose N2/N2D and compute-optimized C2/C2D machine types, activate Flexsave no later than the third week of the month.

After getting your savings estimate, you can proceed to activate Flexsave for Google Cloud.

Subscribe via Google Cloud Marketplace

Follow the instructions to Subscribe via Google Cloud Marketplace. If successful, you'll be able to continue with the next step.

Activate Flexsave

To activate Flexsave:

  1. Select Set up Flexsave.

  2. Enable detailed usage cost data exports.

    1. Log in to the Google Cloud console, go to the Billing export page.

    2. At the prompt, select Go To Linked Billing Account, which should be your Cloud Billing account with the Flexsave subscription.

    3. On the BigQuery export tab, go to the Detailed usage cost and select Edit settings.

    4. From the Projects list, select a project to store the exported Cloud Billing data, which includes usage/cost data for all the Cloud projects paid for by the chosen Cloud Billing account.

    5. In the Dataset field, select the dataset that you set up to contain your exported Cloud Billing data.

    6. Save your configurations.

    If configured correctly, the Detailed usage cost will show Enabled.

    See also
  3. Choose the status of your Cloud Billing account: within your organization, or owned by a partner.

  4. Provide the location of your billing data.

  5. Open the Google Cloud Shell, copy the command code snippets and run them in sequence in the shell.

If your Cloud Billing account is within your own organization:

  1. Set the project property in the core section.

    gcloud config set project $PROJECT_ID
  2. Grant DoiT service account BigQuery Data Viewer role on the dataset that contains your billing data.

    bq show --format=prettyjson $DATASET_ID |
    jq '.access = .access + [{"role": "READER", "userByEmail": "$DoiT_service_account_email"}]' \
    >permissions.json

    bq update --source permissions.json $DATASET_ID
  3. Grant DoiT service account permission to attach projects with optimal CUDs to your Cloud Billing account.

    gcloud iam roles update doit_flexsave_role \
    --organization=$ORG_ID \
    --title="DoiT Flexsave Role" \
    --stage=GA \
    --add-permissions=billing.accounts.get,bigquery.jobs.create,billing.resourceAssociations.create

The command above updates the DoiT Flexsave Role, which was created when getting your savings estimate and is associated with the DoiT service account, to add the following permissions:

  • billing.accounts.get: Allows to fetch your billing account name.
  • bigquery.jobs.create: Allows to import your billing tables.
  • billing.resourceAssociations.create: Allows to attach projects to your billing account.

Select Activate Flexsave.

What's next

Once activated, Flexsave will start processing your information and building an optimization plan. The whole process may take up to 24 hours. You'll be notified by email when it is complete.

Interactive demo

Try out our interactive demo for a hands-on walk-through experience.