generated from labd/terraform-provider-scaffolding-framework
-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #6 from labd/feat/subgraph
feat: added federated graph and federated subgraph resources
- Loading branch information
Showing
13 changed files
with
1,271 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
kind: Added | ||
body: added wundergraph_federated_graph and wundergraph_federated_subgraph resources | ||
time: 2024-07-29T08:33:40.812506446+02:00 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
--- | ||
# generated by https://github.com/hashicorp/terraform-plugin-docs | ||
page_title: "wundergraph_federated_graph Resource - terraform-provider-wundergraph" | ||
subcategory: "" | ||
description: |- | ||
Federated graph. | ||
--- | ||
|
||
# wundergraph_federated_graph (Resource) | ||
|
||
Federated graph. | ||
|
||
## Example Usage | ||
|
||
```terraform | ||
resource "wundergraph_federated_graph" "my-federated-graph" { | ||
name = "my.federated.graph" | ||
namespace = "default" | ||
routing_url = "https://my-federated-graph.com" | ||
label_matchers = [ | ||
{ | ||
key = "some" | ||
values = ["label"] | ||
} | ||
] | ||
} | ||
``` | ||
|
||
<!-- schema generated by tfplugindocs --> | ||
## Schema | ||
|
||
### Required | ||
|
||
- `name` (String) The name of the federated graph to create. It is usually in the format of <org>.<env> and is used to uniquely identify your federated graph. | ||
- `routing_url` (String) The routing url of your router. This is the url that the router will be accessible at. | ||
|
||
### Optional | ||
|
||
- `admission_webhook_secret` (String, Sensitive) The admission webhook secret is used to sign requests to the webhook url. | ||
- `admission_webhook_url` (String) The admission webhook url. This is the url that the controlplane will use to implement admission control for the federated graph. | ||
- `label_matchers` (Attributes List) The label matcher is used to select the subgraphs to federate. (see [below for nested schema](#nestedatt--label_matchers)) | ||
- `namespace` (String) The namespace name of the federated graph. | ||
|
||
### Read-Only | ||
|
||
- `id` (String) Identifier | ||
|
||
<a id="nestedatt--label_matchers"></a> | ||
### Nested Schema for `label_matchers` | ||
|
||
Required: | ||
|
||
- `key` (String) The key of the label matcher. | ||
- `values` (List of String) The key of the label matcher. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
--- | ||
# generated by https://github.com/hashicorp/terraform-plugin-docs | ||
page_title: "wundergraph_federated_subgraph Resource - terraform-provider-wundergraph" | ||
subcategory: "" | ||
description: |- | ||
federated subgraph resource. | ||
--- | ||
|
||
# wundergraph_federated_subgraph (Resource) | ||
|
||
federated subgraph resource. | ||
|
||
## Example Usage | ||
|
||
```terraform | ||
data "local_file" "schema" { | ||
filename = "${path.module}/my-subgraph.graphql" | ||
} | ||
resource "wundergraph_federated_subgraph" "my-subgraph" { | ||
name = "my.subgraph" | ||
namespace = "default" | ||
schema = data.local_file.schema.content | ||
routing_url = "https://my-subgraph.com" | ||
labels = { | ||
"some" = "label" | ||
} | ||
} | ||
``` | ||
|
||
<!-- schema generated by tfplugindocs --> | ||
## Schema | ||
|
||
### Required | ||
|
||
- `name` (String) The name of the subgraph to create. It is usually in the format of <org>.<service.name> and is used to uniquely identify your federated subgraph. | ||
- `schema` (String) The schema to upload to the subgraph. This should be the full schema in SDL format. | ||
|
||
### Optional | ||
|
||
- `is_event_driven_graph` (Boolean) Set whether the subgraph is an Event-Driven Graph (EDG). Errors will be returned for the inclusion of most other parameters if the subgraph is an Event-Driven Graph. | ||
- `is_feature_subgraph` (Boolean) Set whether the subgraph is a feature subgraph. | ||
- `labels` (Map of String) The labels to apply to the subgraph. | ||
- `namespace` (String) The namespace name of the subgraph. | ||
- `routing_url` (String) The routing URL of your subgraph. This is the url at which the subgraph will be accessible. Required unless the event-driven-graph flag is set. Returns an error if the event-driven-graph flag is set. | ||
- `subscription_protocol` (String) The protocol to use when subscribing to the subgraph. The supported protocols are ws, sse, and sse_post. | ||
- `subscription_url` (String) The protocol to use when subscribing to the subgraph. The supported protocols are ws, sse, and sse_post. Returns an error if the event-driven-graph flag is set. | ||
- `websocket_subprotocol` (String) The subprotocol to use when subscribing to the subgraph. The supported protocols are auto, graphql-ws, and graphql-transport-ws. Should be used only if the subscription protocol is ws. For more information see https://cosmo-docs.wundergraph.com/router/subscriptions/websocket-subprotocols. | ||
|
||
### Read-Only | ||
|
||
- `id` (String) Identifier |
11 changes: 11 additions & 0 deletions
11
examples/resources/wundergraph_federated_graph/resource.tf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
resource "wundergraph_federated_graph" "my-federated-graph" { | ||
name = "my.federated.graph" | ||
namespace = "default" | ||
routing_url = "https://my-federated-graph.com" | ||
label_matchers = [ | ||
{ | ||
key = "some" | ||
values = ["label"] | ||
} | ||
] | ||
} |
13 changes: 13 additions & 0 deletions
13
examples/resources/wundergraph_federated_subgraph/resource.tf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
data "local_file" "schema" { | ||
filename = "${path.module}/my-subgraph.graphql" | ||
} | ||
|
||
resource "wundergraph_federated_subgraph" "my-subgraph" { | ||
name = "my.subgraph" | ||
namespace = "default" | ||
schema = data.local_file.schema.content | ||
routing_url = "https://my-subgraph.com" | ||
labels = { | ||
"some" = "label" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.