We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
There should be one block to import the schema file based on context
There is no option to import the schema into the graphQL Api with a file based on context
Terraform 1.11.0 Azurerm : 4.20.0
GraphQL API
data "azurerm_resource_group" "apimResourceGroup" { name = "${var.apimResourceGroup}" }
data "azurerm_api_management" "apim" { name = "${var.apim_name}" resource_group_name = data.azurerm_resource_group.apimResourceGroup.name }
resource "azurerm_api_management_api" "graphql_api" { name = "customer_bss" api_management_name = data.azurerm_api_management.apim.name resource_group_name = data.azurerm_resource_group.apimResourceGroup.name revision = "1" display_name = "customer_bss" path = "graphql" protocols = ["https"] subscription_required = false service_url = "url path " api_type = "graphql" depends_on = [data.azurerm_api_management.apim] }
resource "null_resource" "import_graphql_api" { provisioner "local-exec" { command = <<EOT az login --service-principal --username "${var.client_id}" --password "${var.client_secret}" --tenant "${var.tenant_id}" && az apim api import --path "graphql" --resource-group "rg-ne-np-apimgmt-01" --service-name "tt-apim-core-gw-sit" --api-id "customer_bss" --api-type "graphql" --specification-format "GraphQL" --specification-path "../schema.gql" --service-url "url path " EOT
environment = { ARM_CLIENT_ID = var.client_id ARM_CLIENT_SECRET = var.client_secret ARM_TENANT_ID = var.tenant_id ARM_SUBSCRIPTION_ID = var.subscription_id }
}
depends_on = [azurerm_api_management_api.graphql_api] }
/resource "azurerm_api_management_api_schema" "graphql_schema" { api_name = azurerm_api_management_api.graphql_api.name api_management_name = data.azurerm_api_management.apim.name resource_group_name = data.azurerm_resource_group.apimResourceGroup.name schema_id = "graphql" content_type = "application/vnd.ms-azure-apim.graphql.schema" value = file("../schema.gql") depends_on = [azurerm_api_management_api.graphql_api,data.azurerm_api_management.apim] }/
The text was updated successfully, but these errors were encountered:
anyone have any views for the above Query
Sorry, something went wrong.
No branches or pull requests
Expected Behavior
There should be one block to import the schema file based on context
Actual Behavior
There is no option to import the schema into the graphQL Api with a file based on context
Terraform Version
Terraform 1.11.0
Azurerm : 4.20.0
Affected Resource(s)
GraphQL API
Terraform Configuration Files
Steps to Reproduce
data "azurerm_resource_group" "apimResourceGroup" {
name = "${var.apimResourceGroup}"
}
data "azurerm_api_management" "apim" {
name = "${var.apim_name}"
resource_group_name = data.azurerm_resource_group.apimResourceGroup.name
}
resource "azurerm_api_management_api" "graphql_api" {
name = "customer_bss"
api_management_name = data.azurerm_api_management.apim.name
resource_group_name = data.azurerm_resource_group.apimResourceGroup.name
revision = "1"
display_name = "customer_bss"
path = "graphql"
protocols = ["https"]
subscription_required = false
service_url = "url path "
api_type = "graphql"
depends_on = [data.azurerm_api_management.apim]
}
resource "null_resource" "import_graphql_api" {
provisioner "local-exec" {
command = <<EOT
az login --service-principal --username "${var.client_id}" --password "${var.client_secret}" --tenant "${var.tenant_id}" &&
az apim api import --path "graphql" --resource-group "rg-ne-np-apimgmt-01" --service-name "tt-apim-core-gw-sit" --api-id "customer_bss" --api-type "graphql" --specification-format "GraphQL" --specification-path "../schema.gql" --service-url "url path "
EOT
}
depends_on = [azurerm_api_management_api.graphql_api]
}
/resource "azurerm_api_management_api_schema" "graphql_schema" {
api_name = azurerm_api_management_api.graphql_api.name
api_management_name = data.azurerm_api_management.apim.name
resource_group_name = data.azurerm_resource_group.apimResourceGroup.name
schema_id = "graphql"
content_type = "application/vnd.ms-azure-apim.graphql.schema"
value = file("../schema.gql")
depends_on = [azurerm_api_management_api.graphql_api,data.azurerm_api_management.apim]
}/
Debug Output
Panic Output
Code of Conduct
The text was updated successfully, but these errors were encountered: