Skip to content

add check for correct tier configuration #7

@RinkiyaKeDad

Description

@RinkiyaKeDad

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions