Skip to content
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

provide an option to use data source by systemid #154

Open
marosg42 opened this issue Feb 19, 2024 · 0 comments
Open

provide an option to use data source by systemid #154

marosg42 opened this issue Feb 19, 2024 · 0 comments
Labels
enhancement New feature or request triaged Triaged to be addressed in a given cycle

Comments

@marosg42
Copy link

As discussed with @skatsaounis something like this would be handy

resource "maas_tag" "foundation_nodes" {
  name = "foundation-nodes"
}

data "maas_machine" "machines" {
  for_each = maas_tag.foundation_nodes.machines
}

Currently it errors with

$ terraform import maas_tag.foundation_nodes foundation-nodes
maas_tag.foundation_nodes: Importing from ID "foundation-nodes"...
maas_tag.foundation_nodes: Import prepared!
  Prepared maas_tag for import
maas_tag.foundation_nodes: Refreshing state... [id=foundation-nodes]
╷
│ Error: Invalid combination of arguments
│ 
│   with data.maas_machine.machines["4f8b7c"],
│   on /home/ubuntu/project/generated/sunbeam/generated.tf line 24, in data "maas_machine" "machines":
│   24: data "maas_machine" "machines" {
│ 
│ "pxe_mac_address": one of `hostname,pxe_mac_address` must be specified
╵

╷
│ Error: Invalid combination of arguments
│ 
│   with data.maas_machine.machines["4f8b7c"],
│   on /home/ubuntu/project/generated/sunbeam/generated.tf line 24, in data "maas_machine" "machines":
│   24: data "maas_machine" "machines" {
│ 
│ "hostname": one of `hostname,pxe_mac_address` must be specified
╵
...
@skatsaounis skatsaounis added enhancement New feature or request triaged Triaged to be addressed in a given cycle labels Feb 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request triaged Triaged to be addressed in a given cycle
Projects
None yet
Development

No branches or pull requests

2 participants