-
Notifications
You must be signed in to change notification settings - Fork 1
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
feat: wal storage #608
feat: wal storage #608
Conversation
a22bae6
to
2dde8e2
Compare
@@ -68,6 +68,12 @@ resource "biganimal_cluster" "ha_cluster" { | |||
size = "4 Gi" | |||
} | |||
|
|||
# wal_storage = { | |||
# volume_type = "gp3" | |||
# volume_properties = "gp3" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should we handle setting volume properties internally since it does not have properties like az
# volume_type = "azurepremiumstorage"
# volume_properties = "P1"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh for AWS/GCP? Possibly it could work but maybe we can do it in another PR as an enhancement so that they can remove volume_properties for AWS/GCP. As of right now I think I recall in the API(for BA anyways) the volume_properties have to match the volume_type otherwise it will throw an error
}, | ||
"size": schema.StringAttribute{ | ||
Description: "Size of the volume. It can be set to different values depending on your volume type and properties.", | ||
Required: true, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
size is actually a mandatory field. In the request if I just put P1 and leave size as nil it will return with this:
biganimal_cluster.single_node_cluster: Creating...
╷
│ Error: status: 400 - Bad Request
│
│ with biganimal_cluster.single_node_cluster,
│ on resource.tf line 21, in resource "biganimal_cluster" "single_node_cluster":
│ 21: resource "biganimal_cluster" "single_node_cluster" {
│
│ must have required property 'clusterType'
│ must NOT have additional properties
│ must NOT have additional properties
│ must NOT have additional properties
│ must NOT have additional properties
│ must NOT have additional properties
│ must NOT have additional properties
│ must NOT have additional properties
│ must NOT have additional properties
however if I put P1 and give a size of 7 Gi I get the error:
biganimal_cluster.single_node_cluster: Creating...
biganimal_pgd.pgd_cluster: Destruction complete after 5s
╷
│ Error: status: 400 - Bad Request
│
│ with biganimal_cluster.single_node_cluster,
│ on resource.tf line 21, in resource "biganimal_cluster" "single_node_cluster":
│ 21: resource "biganimal_cluster" "single_node_cluster" {
│
│ Value of storage size must be between 4 Gi and 4 Gi
I guess a future improvement would be to fetch the list of azurepremiumstorage volume properties and their sizes so size can be optional if they select azurepremiumstorage. But I think we can have that as an enhancement
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
volume_properties: P1
volume_type: P1
size: 4 (exact size associated with each volume_property)
so user need to fill above details, for it to work
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let provide link to volume storage ref in examples
ce87365
to
e5d52f9
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
No description provided.