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

vultr_ssh_keys - no way to get all keys and general usability #388

Open
baznikin opened this issue Aug 10, 2023 · 1 comment
Open

vultr_ssh_keys - no way to get all keys and general usability #388

baznikin opened this issue Aug 10, 2023 · 1 comment
Assignees
Labels

Comments

@baznikin
Copy link

baznikin commented Aug 10, 2023

Describe the bug
With vultr_ssh_keys no way to specify no filter {} or specify "empty" filter or specify "catch-all" filter, or poorly documented.

To Reproduce

I tried following variants:

# produce error "no results were found"
data "vultr_ssh_key" "vultr_ssh_keys" {
  filter {
    name = "empty"
    values = []
  }
}

data "vultr_ssh_key" "vultr_ssh_keys" {
  filter {
    name = "name"
    values = []
  }
}

data "vultr_ssh_key" "vultr_ssh_keys" {
  filter {
    name = "name"
    values = ["*"]
  }
}

data "vultr_ssh_key" "vultr_ssh_keys" {
  filter {
    name = "name"
    values = ["."]
  }
}

# produce error "name required", "value required"
data "vultr_ssh_key" "vultr_ssh_keys" {
  filter {  }
}


Additional info
Between values returned I see no key ID, so basically this data method is useless for usage with vultr_instance anyway... See digitalocean_ssh_keys as example of good realization.

Expected behavior
List of all existent keys returned. Returned values include key ID.

@baznikin baznikin added the bug label Aug 10, 2023
@baznikin baznikin changed the title [BUG] vultr_ssh_keys - no way to get all keys vultr_ssh_keys - no way to get all keys and general usability Aug 11, 2023
@optik-aper optik-aper self-assigned this Oct 18, 2023
@optik-aper
Copy link
Member

I agree that there should be a way for the filter to return all. I'll look into this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants