From c4bbba4fbf18a7651ba2ea6fca5f00f47f3ce89b Mon Sep 17 00:00:00 2001 From: Lorenzo Caggioni Date: Tue, 23 Jun 2020 18:22:54 +0200 Subject: [PATCH] Fixes --- modules/endpoint/README.md | 10 ++++++---- modules/endpoint/main.tf | 2 +- modules/endpoint/outputs.tf | 4 ++-- modules/endpoint/variables.tf | 2 +- 4 files changed, 10 insertions(+), 8 deletions(-) diff --git a/modules/endpoint/README.md b/modules/endpoint/README.md index 0d7bcfed..ce0a2711 100644 --- a/modules/endpoint/README.md +++ b/modules/endpoint/README.md @@ -1,4 +1,4 @@ -# Google Cloud Data Fusion Module +# Google Cloud Endpoints This module allows simple management of ['Google Cloud Endpoints'](https://cloud.google.com/endpoints/) services. It supports creating ['OpenAPI'](https://cloud.google.com/endpoints/docs/openapi) or ['gRPC'](https://cloud.google.com/endpoints/docs/grpc/about-grpc). @@ -9,9 +9,9 @@ This module allows simple management of ['Google Cloud Endpoints'](https://cloud ```hcl module "endpoint" { source = "../../modules/endpoint" - project_id = local.project_id - service_name = local.service_name - openapi_config = local.openapi_config + project_id = "my-project" + service_name = "my-project" + openapi_config = "echo-api.endpoints.YOUR-PROJECT-ID.cloud.goog" iam_roles = ["servicemanagement.serviceController"] iam_members = { "servicemanagement.serviceController" = ["serviceAccount:PROJECT_NUMBER-compute@developer.gserviceaccount.com"] @@ -19,6 +19,8 @@ module "endpoint" { } ``` +[Here](https://github.com/GoogleCloudPlatform/python-docs-samples/blob/master/endpoints/getting-started/openapi.yaml) you can find an example of a openapi.yaml file. + ## Variables diff --git a/modules/endpoint/main.tf b/modules/endpoint/main.tf index dbe26a07..6bb96670 100644 --- a/modules/endpoint/main.tf +++ b/modules/endpoint/main.tf @@ -43,4 +43,4 @@ resource "google_endpoints_service_iam_binding" "default" { service_name = google_endpoints_service.default.service_name role = "roles/${each.key}" members = each.value -} \ No newline at end of file +} diff --git a/modules/endpoint/outputs.tf b/modules/endpoint/outputs.tf index 4c7df9e5..e4da1de6 100644 --- a/modules/endpoint/outputs.tf +++ b/modules/endpoint/outputs.tf @@ -19,7 +19,7 @@ output "service_name" { value = google_endpoints_service.default.service_name } -output "endpoint_service" { +output "endpoints_service" { description = "The Endpoint service resource." value = google_endpoints_service.default } @@ -27,4 +27,4 @@ output "endpoint_service" { output "endpoints" { description = "A list of Endpoint objects." value = google_endpoints_service.default.endpoints -} \ No newline at end of file +} diff --git a/modules/endpoint/variables.tf b/modules/endpoint/variables.tf index 20d3fa53..93a534ba 100644 --- a/modules/endpoint/variables.tf +++ b/modules/endpoint/variables.tf @@ -53,4 +53,4 @@ variable "protoc_output_base64" { variable "service_name" { description = "The name of the service. Usually of the form '$apiname.endpoints.$projectid.cloud.goog'." type = string -} \ No newline at end of file +}