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

add check for correct tier configuration #7

Open
RinkiyaKeDad opened this issue Feb 3, 2025 · 0 comments
Open

add check for correct tier configuration #7

RinkiyaKeDad opened this issue Feb 3, 2025 · 0 comments

Comments

@RinkiyaKeDad
Copy link

Adding some checks for the supported tier configuration could be helpful for users. For example the "dev" performance_tier is only supported on 3GB or lower so this should fail:

resource "dfcloud_datastore" "cache" {
  name = "frontend-cache"

  location = {
    region   = "us-east-1"
    provider = "aws"
  }
 
  tier = {
    max_memory_bytes = 30000000000
    performance_tier = "enhanced"
    replicas         = 1
  }
}

But the error message shown when applying this isn't very clear on what the use might be doing wrong:

│ Error: Error Creating Datastore
│ 
│   with dfcloud_datastore.cache,
│   on main.tf line 13, in resource "dfcloud_datastore" "cache":
│   13: resource "dfcloud_datastore" "cache" {
│ 
│ bad status: 403: datastore configuration not permitted

Similarly certiain sizes like 30Gb aren't supported. We could check for those as well.

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

No branches or pull requests

1 participant