-
Notifications
You must be signed in to change notification settings - Fork 43
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(storage): add storage support to application resource #494
feat(storage): add storage support to application resource #494
Conversation
d46ef9b
to
f45ec42
Compare
b143fb3
to
a96ec81
Compare
a96ec81
to
4c1b081
Compare
f19ed91
to
6031f4c
Compare
fc3a919
to
36007c5
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.
Here is my initial review. I haven't done QA yet. There is a conflict and perhaps some tests to fix as well.
d014bb8
to
af585a1
Compare
04cfe44
to
b635d36
Compare
8bbf18c
to
a8f18d8
Compare
feat(resource_application): update CRUD functions This commit updates the Create, Read, Update, and Delete (CRUD) functions in the `resource_application.go` file to support defining storage for application resource. It also includes changes in the corresponding test file `resource_application_test.go` to add additional test with storage. The changes aim to improve the functionality of working with storage for the application resource in the Juju Terraform provider. The changes include: - Improved error handling in the ReadApplicationWithRetryOnNotFound function. - Added error handling for application not found in `handleApplicationNotFoundError` function. - Added storage directives to Create and Read functions - Modifier retry process to read application changes, to be able to wait for storage creation Storage use comupeted struct that is used to stro information about storage into the terraform state. Storage_directives is a special struck that help to manupolate storage in application resource in terraform plan. test(application): add acceptance test for resource application storage feat: introduce storage_directives map instead storage set docs: modify placement example for resource_application to include storage
a8f18d8
to
c27e1ac
Compare
The test on 2.9 was failing because the Deploy arguments in legacyDeploy did not include storage constraints. Updated the test as well to ensure it works with 2.9 and 3.x by checking all values.
306648c
to
2f08994
Compare
It is no longer needed with the switch from using just storage to to using storage and storage_directives in the schema as we can write storage without impact to the plan supplied directives.
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.
I added 2 commits, one to enable storage for juju controllers not using DeployFromRepository and to remove the Private data usage.
Once the rest of these smaller comments are addressed, we should be good to land.
// trace storage constraints | ||
r.trace("create application storage constraints", map[string]interface{}{"storageConstraints": storageConstraints}) |
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.
delete me
2822231
to
63b56da
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! Thank you!
Description
This PR adds storage support for application resources.
Fixes: #198
Type of change
QA steps