This commit is contained in:
Lorenzo Caggioni 2020-06-23 18:22:54 +02:00
parent 908371ab91
commit c4bbba4fbf
4 changed files with 10 additions and 8 deletions

View File

@ -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). 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 ```hcl
module "endpoint" { module "endpoint" {
source = "../../modules/endpoint" source = "../../modules/endpoint"
project_id = local.project_id project_id = "my-project"
service_name = local.service_name service_name = "my-project"
openapi_config = local.openapi_config openapi_config = "echo-api.endpoints.YOUR-PROJECT-ID.cloud.goog"
iam_roles = ["servicemanagement.serviceController"] iam_roles = ["servicemanagement.serviceController"]
iam_members = { iam_members = {
"servicemanagement.serviceController" = ["serviceAccount:PROJECT_NUMBER-compute@developer.gserviceaccount.com"] "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.
<!-- BEGIN TFDOC --> <!-- BEGIN TFDOC -->
## Variables ## Variables

View File

@ -43,4 +43,4 @@ resource "google_endpoints_service_iam_binding" "default" {
service_name = google_endpoints_service.default.service_name service_name = google_endpoints_service.default.service_name
role = "roles/${each.key}" role = "roles/${each.key}"
members = each.value members = each.value
} }

View File

@ -19,7 +19,7 @@ output "service_name" {
value = google_endpoints_service.default.service_name value = google_endpoints_service.default.service_name
} }
output "endpoint_service" { output "endpoints_service" {
description = "The Endpoint service resource." description = "The Endpoint service resource."
value = google_endpoints_service.default value = google_endpoints_service.default
} }
@ -27,4 +27,4 @@ output "endpoint_service" {
output "endpoints" { output "endpoints" {
description = "A list of Endpoint objects." description = "A list of Endpoint objects."
value = google_endpoints_service.default.endpoints value = google_endpoints_service.default.endpoints
} }

View File

@ -53,4 +53,4 @@ variable "protoc_output_base64" {
variable "service_name" { variable "service_name" {
description = "The name of the service. Usually of the form '$apiname.endpoints.$projectid.cloud.goog'." description = "The name of the service. Usually of the form '$apiname.endpoints.$projectid.cloud.goog'."
type = string type = string
} }