-
-
Notifications
You must be signed in to change notification settings - Fork 13
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
Visions of an incus made out of tofu. 🤔 #1
Merged
Merged
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
3d37839
ansible: Add dedicated gitignore
stgraber b1fef5c
terraform: Add dedicated gitignore
jarrodu d740fbc
terraform: Setup modules
jarrodu 7e5695a
terraform: Split version requirements to separate file
jarrodu a9c7898
terraform: Add lifecycle
jarrodu 2b05185
terraform: Move variables
jarrodu 6358069
terraform: Make use of variables
jarrodu 953e1ec
terraform: Use this as identifier
jarrodu ee05095
terraform: Rename the projects
jarrodu 5c95565
terraform: Formatting
jarrodu b634627
terraform: Make use of the project_name variable
stgraber File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1 @@ | ||
*.pyc | ||
|
||
ansible/data/* | ||
ansible/hosts.yaml | ||
|
||
*.tfstate | ||
*.tfstate.backup | ||
.terraform* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
data/* | ||
hosts.yaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
.terraform/ | ||
.terraform.lock.hcl | ||
terraform.tfstate | ||
terraform.tfstate.backup |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
variable "project_name" { | ||
type = string | ||
} | ||
|
||
variable "instance_names" { | ||
type = set(string) | ||
} | ||
|
||
variable "image" { | ||
type = string | ||
} | ||
|
||
variable "memory" { | ||
type = string | ||
} | ||
|
||
variable "storage_pool" { | ||
type = string | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
terraform { | ||
required_version = ">=1.5.7" | ||
required_providers { | ||
incus = { | ||
source = "lxc/incus" | ||
version = ">=0.1.1" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
module "baremetal" { | ||
source = "./baremetal-incus" | ||
|
||
project_name = "dev-incus-deploy" | ||
instance_names = ["server01", "server02", "server03", "server04", "server05"] | ||
image = "images:ubuntu/22.04" | ||
memory = "4GiB" | ||
storage_pool = "default" | ||
} | ||
|
||
module "services" { | ||
source = "./services" | ||
|
||
project_name = "dev-incus-deploy-services" | ||
instance_names = ["ceph-mds01", "ceph-mds02", "ceph-mds03", "ceph-mgr01", "ceph-mgr02", "ceph-mgr03", "ceph-rgw01", "ceph-rgw02", "ceph-rgw03"] | ||
image = "images:ubuntu/22.04" | ||
storage_pool = "default" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
variable "project_name" { | ||
type = string | ||
} | ||
|
||
variable "instance_names" { | ||
type = set(string) | ||
} | ||
|
||
variable "image" { | ||
type = string | ||
} | ||
|
||
variable "storage_pool" { | ||
type = string | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
terraform { | ||
required_version = ">=1.5.7" | ||
required_providers { | ||
incus = { | ||
source = "lxc/incus" | ||
version = ">=0.1.1" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
terraform { | ||
required_version = ">=1.5.7" | ||
required_providers { | ||
incus = { | ||
source = "lxc/incus" | ||
version = ">=0.1.1" | ||
} | ||
} | ||
} | ||
|
||
provider "incus" { | ||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
What does that do exactly?
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.
It prevents Tofu from turning on and off the instances when the state is controlled externally to Tofu.I prefer to do that with different tooling. In my case, I would use the Incus CLI.
The AWS, etc. providers offer the ability to control the on off state of instances, but it is opt in and discouraged.
Ideally the incus provider would work the same way. Then we would not need to disable it.
But what does it do exactly? It tells Tofu to ignore that part of the state file.