-
Notifications
You must be signed in to change notification settings - Fork 7
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
profile "default" cannot be tracked #58
Comments
With the changes from #63 it would be possible to do the following after we have released a new version of the provider: terraform {
required_providers {
incus = {
source = "lxc/incus"
}
}
required_version = ">= 1.8"
}
provider "incus" {}
resource "incus_project" "project" {
name = "myproject"
config = {
"features.profiles" = true
}
}
data "incus_profile" "default" {
name = "default"
project = incus_project.project.name
}
resource "incus_profile" "project_default" {
name = "project_default"
project = incus_project.project.name
device {
type = "disk"
name = "root"
properties = {
pool = "default"
path = "/"
}
}
}
resource "incus_instance" "d1" {
profiles = [data.incus_profile.default.name, incus_profile.project_default.name]
image = "images:debian/12"
name = "d1"
} Alternatively, you could use the following workaround already:
|
I am closing this topic due to the merging of #63 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
returns the next error
The error is expected because incus always creates a default profile.
Of course, we can change the name of the profile and working without the default profile but in this case we cannot track the "default" dynamically created.
Import would not work because the profile is not known before the project creation.
I can remind that other providers (aws) uses data source with the default.
Would data for default profile (like data profile_default) fix the problem?
The text was updated successfully, but these errors were encountered: