Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

convert from provisioned_capacity to provisioned_vcpus #222

Merged
merged 5 commits into from
Aug 6, 2024

Conversation

andy-kimball
Copy link
Contributor

Rename the provisioned_capacity field to provisioned_vcpus and update all
tests and examples to use the vCPUs unit rather than request units by dividing
by 500. This is part of the overall migration to vCPUs for Cloud 2.0.

Commit checklist

  • Changelog
  • Doc gen (make generate)
  • Integration test(s)
  • Acceptance test(s)
  • Example(s)

Use new plan types. Remove support for spend limits. Add support for
provisioned clusters. Adjust to use *int64 for usage limit fields rather
than int64.
Previously, the TF provider raised an error when the primary attribute was
specified in multiple regions, even when false in all but one region, e.g.:

  regions = [
    {
      name    = "eu-west-1"
      primary = true
    },
    {
      name    = "eu-west2"
      primary = false
    },
    {
      name    = "ap-south-1"
      primary = false
    },
  ]

This PR fixes that by adding some custom validation logic rather than using
the built-in config validators.

Fixes: CC-27160
Make the "plan" attribute on the "cluster" resource writable so that it
can be set by users who intend to upgrade/downgrade the plan. Keep the
attribute as computed so that the system will set the value if it is not
provided by the user.

Release note: Support upgrade of plans via changes to the "plan" attribute
on the "cluster" resource.
Rename the `provisioned_capacity` field to `provisioned_vcpus` and update all
tests and examples to use the vCPUs unit rather than request units by dividing
by 500. This is part of the overall migration to vCPUs for Cloud 2.0.
@andy-kimball
Copy link
Contributor Author

Similar to the SDK PR, I will hard reset the cloud-20 branch to main and then apply this sequence of commits to that branch.

IMPORTANT: All but the last commit are older commits that are being reapplied to a new base. All of the older commits have already been reviewed. While I did need to make a few tweaks to those to get past some merge conflicts, there are no material changes. I'd advise only reviewing the last commit.

@andy-kimball
Copy link
Contributor Author

Also, I won't merge this PR until all of the required API changes are in production (it seems we're still pretty far behind in our rollouts).

Copy link
Contributor

@rgcase rgcase left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I only looked at the last commit but this seems fine. Will we cut a new version of the Cloud 2.0 TF provider for this?

@andy-kimball
Copy link
Contributor Author

andy-kimball commented Aug 1, 2024

I will hard reset the current version of the Cloud 2.0 TF provider to this commit. Only Private Preview customers have been using this by manually cloning and building this branch. They will need to switch any config they have to use provisioned_vcpus rather than provisioned_capacity.

@andy-kimball andy-kimball changed the base branch from main to cloud-20 August 6, 2024 02:22
@andy-kimball andy-kimball merged commit abae6e4 into cloud-20 Aug 6, 2024
4 checks passed
@andy-kimball andy-kimball deleted the andyk-cloud-20 branch August 6, 2024 02:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants