lxc / terraform-provider-incus

Incus provider for Terraform/OpenTofu
https://linuxcontainers.org/incus
Mozilla Public License 2.0
35 stars 8 forks source link

No "remote" resource #32

Closed antifob closed 5 months ago

antifob commented 5 months ago

Hi,

I was looking at this project referenced at [1] and noticed that there's no way to manage remotes. Something along the lines of

resource "incus_remote" "remote" {
  name = "myremote"
  url = "https://example.invalid/"
}

Regards

1: https://discuss.linuxcontainers.org/t/ansible-guidance-receiving-errors-when-using-lxd-container-plugin/18734

stgraber commented 5 months ago

Remotes aren't a server-side concept, it's just something that the incus command line tool implements as a way to interact with multiple servers.

adamcstephens commented 5 months ago

You can specify the remotes in the provider block: https://registry.terraform.io/providers/lxc/incus/latest/docs#specifying-multiple-remotes

Though ideally we'd refactor that at some point to have multiple incus provider blocks, as that's the more modern pattern with terraform.