diff --git a/.gitignore b/.gitignore index 805e66f..83a87b3 100644 --- a/.gitignore +++ b/.gitignore @@ -25,8 +25,10 @@ website/node_modules *.test *.iml +.vscode/ test/.terraform.lock.hcl website/vendor +test/*.tfplan # Test exclusions !command/test-fixtures/**/*.tfstate diff --git a/docs/data-sources/graphql.md b/docs/data-sources/graphql.md new file mode 100644 index 0000000..ba58111 --- /dev/null +++ b/docs/data-sources/graphql.md @@ -0,0 +1,27 @@ +--- +# generated by https://github.com/hashicorp/terraform-plugin-docs +page_title: "nautobot_graphql Data Source - terraform-provider-nautobot" +subcategory: "" +description: |- + Provide an interface to make GraphQL calls to Nautobot as a flexible data source. +--- + +# nautobot_graphql (Data Source) + +Provide an interface to make GraphQL calls to Nautobot as a flexible data source. + + + + +## Schema + +### Required + +- `query` (String) The GraphQL query that will be sent to Nautobot. + +### Read-Only + +- `data` (String) The data returned by the GraphQL query. +- `id` (String) The ID of this resource. + + diff --git a/examples/data-sources/nautobot_data_source/data-source.tf b/examples/data-sources/nautobot_data_source/data-source.tf index f71d4fb..f2f6650 100644 --- a/examples/data-sources/nautobot_data_source/data-source.tf +++ b/examples/data-sources/nautobot_data_source/data-source.tf @@ -1 +1,11 @@ -data "nautobot_manufacturers" "all" {} \ No newline at end of file +data "nautobot_manufacturers" "all" {} + +data "nautobot_graphql" "vms" { + query = < manufacturer if manufacturer.name == var.manufacturer_name } -} \ No newline at end of file +} +data "nautobot_graphql" "nodes" { + query = <