-
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
Add Placement parameter #378
Conversation
@amandahla run |
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.
Looks good to start. QA went well with one oddity, including import.
Please rebase this PR and resolve the conflicts. It also needs an acceptance test for this change in resource_machine_test.go
QA oddity. I haven't had a chance to dig. But how this happens isn't obvious:
With this plan part:
resource "juju_model" "testmodel" {
name = "machinetest"
}
resource "juju_machine" "my-machine-three" {
model = juju_model.testmodel.name
placement = ":failme"
}
I got:
juju_machine.my-machine-three: Creating...
╷
│ Error: Client Error
│
│ with juju_machine.my-machine-three,
│ on heather.tf line 39, in resource "juju_machine" "my-machine-three":
│ 39: resource "juju_machine" "my-machine-three" {
│
│ Unable to create machine, got error: invalid model name "model-uuid"
╵
@amandahla please do not use merge commits. It's preferable to use |
This error seems to come from here. Reading better now, from what I understood, I need to pass the model-uuid if there is no scope in the directive. Changed and testing now. |
Now the error makes more sense:
|
Fixed the merge/rebase mess. |
6a89040
to
0a9fbf8
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 for your contribution.
Description
The machine resource does not support creating machines in LXD/KVM like the following command does:
This PR adds a placement parameter to provide this option.
Fixes: #347
Type of change
Environment
Juju controller version:
Terraform version:
QA steps
Manual QA steps should be done to test this PR.
Expected
Additional notes
Approved schema in:
#381