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

Providers Docs wrong instructions #95

Open
Jean-Baptiste-Lasselle opened this issue Nov 19, 2023 · 0 comments
Open

Providers Docs wrong instructions #95

Jean-Baptiste-Lasselle opened this issue Nov 19, 2023 · 0 comments

Comments

@Jean-Baptiste-Lasselle
Copy link

Jean-Baptiste-Lasselle commented Nov 19, 2023

Hello, thank you so much for this original provider,

To contribute, I found an error in the usage docs.

The provider declaration should be (providers.tf) :

# https://github.com/sullivtr/terraform-provider-graphql/issues/95
terraform {
  required_providers {
    graphql = {
      source  = "sullivtr/graphql"
      # version = "~> 1.0"
      # configuration_aliases = [ mycloud.alternate ]
    }
  }
}

provider "graphql" {
  url = "http://localhost:3000/graphql"
  headers = {
    "header1" = "header1-value"
    "header2" = "header2-value"
  }
  # oauth2_login_query = "mutation loginAPI($apiKey: String!) {loginAPI(apiKey: $apiKey) {accessToken}}"
  # oauth2_login_query_variables = {
  #   "apiKey" = "5555-44-33-99"
  # }
  # oauth2_login_query_value_attribute = "loginAPI.accessToken"
}

After terraform init you get :

image

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

No branches or pull requests

1 participant