-
Notifications
You must be signed in to change notification settings - Fork 905
Description
Describe the need
Hello!
In Terraform version 1.14 the terraform query command was introduced. This command executes list operations against existing infrastructure and displays the results. The command can optionally generate configuration for importing results into Terraform.
Currently this does not work for GitHub resources defined in the provider presumably because list resources are not supported.
Example import.tfquery.hcl file
list "github_membership" "org_owner" {
provider = github
config {
username = "one-cool-user"
role = "admin"
}
}
terraform query command output
terraform query
╷
│ Error: Invalid list resource
│
│ on import.tfquery.hcl line 1, in list "github_membership" "org_owner":
│ 1: list "github_membership" "org_owner" {
│
│ The provider integrations/github does not support list resource "github_membership".
Is there a plan to implement this functionality? Currently, users will need to use the terraform import command repeatedly. Potentially for thousands of resources if they're trying to import a large GitHub ecosystem to Terraform.
Reference HashiCorp documentation: https://developer.hashicorp.com/terraform/language/v1.14.x/import/bulk
Thanks for the great work!
Sam
SDK Version
No response
API Version
No response
Relevant log output
### Example import.tfquery.hcl file
list "github_membership" "org_owner" {
provider = github
config {
username = "one-cool-user"
role = "admin"
}
}
### `terraform query` command output
terraform query
╷
│ Error: Invalid list resource
│
│ on import.tfquery.hcl line 1, in list "github_membership" "org_owner":
│ 1: list "github_membership" "org_owner" {
│
│ The provider integrations/github does not support list resource "github_membership".Code of Conduct
- I agree to follow this project's Code of Conduct
Metadata
Metadata
Assignees
Labels
Type
Projects
Status