-
Notifications
You must be signed in to change notification settings - Fork 69
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
fix: additional_disk space and service_integrations fields import (#1820) #1846
base: main
Are you sure you want to change the base?
Conversation
} else { | ||
if err := d.Set("disk_space", HumanReadableByteSize(diskSpace*units.MiB)); err != nil { | ||
return err | ||
} | ||
} | ||
} |
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.
nit:
if a := diskSpace - servicePlanParams.DiskSizeMBDefault; a > 0 {
...
} else if diskSpace > 0 {
...
}
internal/schemautil/service.go
Outdated
} | ||
return &results |
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.
nit:
var emails []aiven.ContactEmail
err = Remarshal(valuesInterface.(*schema.Set).List(), &emails)
readReplicaIntegrations = append(readReplicaIntegrations, integrationMap) | ||
} | ||
} | ||
return readReplicaIntegrations, nil |
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.
nit: This will swallow an unexpected integration type. I would set an enum validation for the integration_type
field, and then the "if" can be removed.
dcd341c
to
30cd706
Compare
97948e1
to
4b64d51
Compare
Previously additional_disk_space field would be ignored if disk_space was not set.
We don't seem to have it in the API and its set to the same value as `disk_space`.
4b64d51
to
39b861d
Compare
About this change—what it does
Fix #1820. Previously, we didn't handle
additional_disk_space
andservice_integrations
properly duringterraform import
. This changeset also fixes importingtech_emails
field of services.