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

feat: wal storage #608

Merged
merged 5 commits into from
Nov 28, 2024
Merged

feat: wal storage #608

merged 5 commits into from
Nov 28, 2024

Conversation

wai-wong-edb
Copy link
Collaborator

No description provided.

@@ -68,6 +68,12 @@ resource "biganimal_cluster" "ha_cluster" {
size = "4 Gi"
}

# wal_storage = {
# volume_type = "gp3"
# volume_properties = "gp3"
Copy link
Collaborator

@edbamolvyavahare edbamolvyavahare Nov 13, 2024

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"

Copy link
Collaborator Author

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,
Copy link
Collaborator

@edbamolvyavahare edbamolvyavahare Nov 27, 2024

Choose a reason for hiding this comment

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

cannot be require=true in case of azurepremiumstorage
since each volumeproperty has size, iops and throughput predefined and associated with it.

Screenshot 2024-11-27 at 4 44 10 PM

Copy link
Collaborator Author

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

Copy link
Collaborator

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

Copy link
Collaborator

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

Copy link
Collaborator

@edbamolvyavahare edbamolvyavahare left a comment

Choose a reason for hiding this comment

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

LGTM

@wai-wong-edb wai-wong-edb merged commit 6504d0e into main Nov 28, 2024
7 checks passed
@wai-wong-edb wai-wong-edb deleted the ww-wal-storage branch November 28, 2024 10:29
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