-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9f15702
commit 384990e
Showing
22 changed files
with
261 additions
and
14 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
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
21 changes: 21 additions & 0 deletions
21
src/mapping/google/resource/apigateway/google_api_gateway_api.json
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,21 @@ | ||
[ | ||
{ | ||
"apply": [ | ||
"apigateway.apis.create", | ||
"apigateway.apis.delete", | ||
"apigateway.apis.update", | ||
"apigateway.apis.get", | ||
"apigateway.operations.get" | ||
], | ||
"attributes": { | ||
"tags": [] | ||
}, | ||
"destroy": [ | ||
"apigateway.apis.delete" | ||
], | ||
"modify": [ | ||
"apigateway.apis.update" | ||
], | ||
"plan": [] | ||
} | ||
] |
20 changes: 20 additions & 0 deletions
20
src/mapping/google/resource/apigateway/google_api_gateway_api_config.json
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,20 @@ | ||
[ | ||
{ | ||
"apply": [ | ||
"apigateway.apiconfigs.get", | ||
"apigateway.apiconfigs.create", | ||
"apigateway.apiconfigs.delete", | ||
"apigateway.apiconfigs.update" | ||
], | ||
"attributes": { | ||
"tags": [] | ||
}, | ||
"destroy": [ | ||
"apigateway.apiconfigs.delete" | ||
], | ||
"modify": [ | ||
"apigateway.apiconfigs.update" | ||
], | ||
"plan": [] | ||
} | ||
] |
14 changes: 14 additions & 0 deletions
14
src/mapping/google/resource/apigateway/google_api_gateway_api_config_iam.json
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,14 @@ | ||
[ | ||
{ | ||
"apply": [ | ||
"apigateway.apiconfigs.getIamPolicy", | ||
"apigateway.apiconfigs.setIamPolicy" | ||
], | ||
"attributes": { | ||
"tags": [] | ||
}, | ||
"destroy": [], | ||
"modify": [], | ||
"plan": [] | ||
} | ||
] |
14 changes: 14 additions & 0 deletions
14
src/mapping/google/resource/apigateway/google_api_gateway_api_iam.json
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,14 @@ | ||
[ | ||
{ | ||
"apply": [ | ||
"apigateway.apis.setIamPolicy", | ||
"apigateway.apis.getIamPolicy" | ||
], | ||
"attributes": { | ||
"tags": [] | ||
}, | ||
"destroy": [], | ||
"modify": [], | ||
"plan": [] | ||
} | ||
] |
20 changes: 20 additions & 0 deletions
20
src/mapping/google/resource/apigateway/google_api_gateway_gateway.json
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,20 @@ | ||
[ | ||
{ | ||
"apply": [ | ||
"apigateway.gateways.create", | ||
"apigateway.gateways.delete", | ||
"apigateway.gateways.update", | ||
"apigateway.gateways.get" | ||
], | ||
"attributes": { | ||
"tags": [] | ||
}, | ||
"destroy": [ | ||
"apigateway.gateways.delete" | ||
], | ||
"modify": [ | ||
"apigateway.gateways.update" | ||
], | ||
"plan": [] | ||
} | ||
] |
14 changes: 14 additions & 0 deletions
14
src/mapping/google/resource/apigateway/google_api_gateway_gateway_iam.json
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,14 @@ | ||
[ | ||
{ | ||
"apply": [ | ||
"apigateway.gateways.setIamPolicy", | ||
"apigateway.gateways.getIamPolicy" | ||
], | ||
"attributes": { | ||
"tags": [] | ||
}, | ||
"destroy": [], | ||
"modify": [], | ||
"plan": [] | ||
} | ||
] |
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,4 @@ | ||
resource "google_api_gateway_api" "pike" { | ||
provider = google-beta | ||
api_id = "pike" | ||
} |
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 @@ | ||
resource "google_api_gateway_api_config" "pike" { | ||
provider = google-beta | ||
api = google_api_gateway_api.pike.api_id | ||
openapi_documents { | ||
document { | ||
path = "spec.yaml" | ||
contents = filebase64("spec2.0.yaml") | ||
} | ||
} | ||
lifecycle { | ||
create_before_destroy = true | ||
} | ||
} |
9 changes: 9 additions & 0 deletions
9
terraform/google/backup/google_api_gateway_api_config_iam_binding.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,9 @@ | ||
resource "google_api_gateway_api_config_iam_binding" "pike" { | ||
provider = google-beta | ||
api = google_api_gateway_api_config.pike.api | ||
api_config = google_api_gateway_api_config.pike.api_config_id | ||
role = "roles/apigateway.viewer" | ||
members = [ | ||
"user:crwoolfenden@gmail.com", | ||
] | ||
} |
7 changes: 7 additions & 0 deletions
7
terraform/google/backup/google_api_gateway_api_config_iam_member.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,7 @@ | ||
resource "google_api_gateway_api_config_iam_member" "pike" { | ||
provider = google-beta | ||
api = google_api_gateway_api_config.pike.api | ||
api_config = google_api_gateway_api_config.pike.api_config_id | ||
role = "roles/apigateway.viewer" | ||
member = "user:crwoolfenden@gmail.com" | ||
} |
6 changes: 6 additions & 0 deletions
6
terraform/google/backup/google_api_gateway_api_config_iam_policy.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,6 @@ | ||
resource "google_api_gateway_api_config_iam_policy" "pike" { | ||
provider = google-beta | ||
policy_data = data.google_iam_policy.admin.policy_data | ||
api = google_api_gateway_api_config.pike.api | ||
api_config = google_api_gateway_api_config.pike.api_config_id | ||
} |
8 changes: 8 additions & 0 deletions
8
terraform/google/backup/google_api_gateway_api_iam_binding.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,8 @@ | ||
resource "google_api_gateway_api_iam_binding" "pike" { | ||
provider = google-beta | ||
api = google_api_gateway_api.pike.api_id | ||
role = "roles/apigateway.viewer" | ||
members = [ | ||
"user:crwoolfenden@gmail.com", | ||
] | ||
} |
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,6 @@ | ||
resource "google_api_gateway_api_iam_member" "pike" { | ||
provider = google-beta | ||
api = google_api_gateway_api.pike.api_id | ||
role = "roles/apigateway.viewer" | ||
member = "user:crwoolfenden@gmail.com" | ||
} |
15 changes: 15 additions & 0 deletions
15
terraform/google/backup/google_api_gateway_api_iam_policy.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,15 @@ | ||
resource "google_api_gateway_api_iam_policy" "pike" { | ||
provider = google-beta | ||
policy_data = data.google_iam_policy.admin2.policy_data | ||
api = google_api_gateway_api.pike.api_id | ||
} | ||
|
||
data "google_iam_policy" "admin2" { | ||
provider = google-beta | ||
binding { | ||
role = "roles/apigateway.viewer" | ||
members = [ | ||
"user:crwoolfenden@gmail.com", | ||
] | ||
} | ||
} |
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,5 @@ | ||
resource "google_api_gateway_gateway" "pike" { | ||
provider = google-beta | ||
api_config = google_api_gateway_api_config.pike.id | ||
gateway_id = "pike" | ||
} |
8 changes: 8 additions & 0 deletions
8
terraform/google/backup/google_api_gateway_gateway_iam_binding.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,8 @@ | ||
resource "google_api_gateway_gateway_iam_binding" "pike" { | ||
provider = google-beta | ||
gateway = google_api_gateway_gateway.pike.id | ||
role = "roles/apigateway.viewer" | ||
members = [ | ||
"user:crwoolfenden@gmail.com", | ||
] | ||
} |
7 changes: 7 additions & 0 deletions
7
terraform/google/backup/google_api_gateway_gateway_iam_member.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,7 @@ | ||
resource "google_api_gateway_gateway_iam_member" "pike" { | ||
provider = google-beta | ||
gateway = google_api_gateway_gateway.pike.id | ||
role = "roles/apigateway.viewer" | ||
member = "user:crwoolfenden@gmail.com" | ||
|
||
} |
15 changes: 15 additions & 0 deletions
15
terraform/google/backup/google_api_gateway_gateway_iam_policy.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,15 @@ | ||
resource "google_api_gateway_gateway_iam_policy" "pike" { | ||
provider = google-beta | ||
gateway = google_api_gateway_gateway.pike.id | ||
policy_data = data.google_iam_policy.admin.policy_data | ||
} | ||
|
||
data "google_iam_policy" "admin" { | ||
provider = google-beta | ||
binding { | ||
role = "roles/apigateway.viewer" | ||
members = [ | ||
"user:crwoolfenden@gmail.com", | ||
] | ||
} | ||
} |
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,24 @@ | ||
# openapi2-functions.yaml | ||
swagger: '2.0' | ||
info: | ||
title: test | ||
description: Sample API on API Gateway with a Google Cloud Functions backend | ||
version: 1.0.0 | ||
schemes: | ||
- https | ||
produces: | ||
- application/json | ||
#prefix after the static gateway URL. It tells the Gateway which function to call | ||
paths: | ||
/hello: | ||
post: | ||
summary: Greet a user | ||
operationId: hello | ||
#actual address of the cloud function where the request is supposed to be forwarded | ||
x-google-backend: | ||
address: https://GCP_REGION-PROJECT_ID.cloudfunctions.net/hello | ||
responses: | ||
'200': | ||
description: A successful response | ||
schema: | ||
type: string |