-
Notifications
You must be signed in to change notification settings - Fork 45
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
Implement endpoint bindings for applications (#400) #418
Conversation
1da73fc
to
1b01c51
Compare
Force push is adding |
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.
Thank you for the PR, it'll be a nice addition to the provider functionality.
Here are my initial comments. I haven't had the chance to run initial QA yet. Over all looks good.
I've updated the GitHub action tests, so that the 2.9 tests will work for lxd now. Please rebase as described here: https://github.com/juju/terraform-provider-juju?tab=readme-ov-file#staying-in-sync
Add the attributes `endpoint_bindings` to the application resource. This endpoint is a set nested attribute. Usage: ```tf endpoint_bindings = [ { "space" = "my_space1", }, { "endpoint" = "my_endpoint" "space" = "my_space2" } ] ```
Fix typos, newlines and unused return. Fix docs not regenerated when going from nested list attribute to nested set attribute.
392610d
to
725cb6a
Compare
Force push is rebasing on main + adding a new commit on top of the previous ones |
725cb6a
to
bc44232
Compare
Add notice to remove validation in client side until bug lp#2055868 is resolved. Use model's default space to compare what's a default or not from an application.
While testing for import state, I've had multiple times the failure:
|
@gboutry the placement issue you've seen in test is a known issue. there is also one with ordering of the placement values I might have a fix for. |
Make sure case where default space is not defined, alpha is used as default space.
When endpoint_bindings definition is removed from an application, interpret it as intent and go back to default space.
@gboutry I've been locally running QA on this change and found a small nit. With an application configured in a plan as such resource "juju_application" "application_two" {
model = data.juju_model.testmodel.name
charm {
name = "ubuntu"
}
endpoint_bindings = [
]
} The first run of
However there is no change to make. Looks good other than this. |
Thanks for your review @hmlanigan, I fixed this issue. I ran manual QA steps + whole acceptance test suite on this new commit. |
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. I'm sure many people will be happy with this update. Thank you!
Description
The goal is to enable binding endpoints to specific spaces. This features will used in sunbeam when deploying with MAAS.
Fixes: #400
Type of change
<What type of a change is this? Please keep one or more relevant lines from below and delete the others.>
Environment
Juju controller version: 3.4
Terraform version: 1.6
QA steps
Manual QA steps should be done to test this PR.
management
andpublic
associated to the modelAdditional notes
<Please add relevant notes & information, links to mattermost chats, other related issues/PRs, anything to help understand and QA the PR.>
Some tests were added, with a note about changing space setup when #336 is implemented.
Current integration tests have been updated to add 2 lxd bridges as support for the tests.
Tests need
TEST_PUBLIC_BR
andTEST_MANAGEMENT_BR
containing the cidrs to be run, otherwise, they are skipped.On behavior:
Specifying a space without an endpoint will make the space the default space (in term of bindings, not touching model configs)
Constraints are in QA/tests to make sure LXD brings the instance with right networking configuration.