File tree Expand file tree Collapse file tree 4 files changed +71
-5
lines changed Expand file tree Collapse file tree 4 files changed +71
-5
lines changed Original file line number Diff line number Diff line change 1+ # Simple Cloud Router
2+
3+ This example configures a Cloud Router and a NAT gateway with default values
4+ inside of a project.
5+
6+ <!-- BEGINNING OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
7+ ## Inputs
8+
9+ | Name | Description | Type | Default | Required |
10+ | ------| -------------| ------| ---------| :--------:|
11+ | project\_ id | The project ID to host the Cloud Router in | ` any ` | n/a | yes |
12+
13+ ## Outputs
14+
15+ | Name | Description |
16+ | ------| -------------|
17+ | router\_ name | The name of the created router |
18+ | router\_ region | The region of the created router |
19+
20+ <!-- END OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
21+
22+
Original file line number Diff line number Diff line change @@ -19,14 +19,14 @@ provider "google" {
1919}
2020
2121module "cloud_router" {
22- source = " ../../ "
23-
24- name = " example-router "
25- project = " example-project "
22+ source = " terraform-google-modules/cloud-router/google "
23+ version = " ~> 0.4 "
24+ project = var . project_id # Replace this with your project ID in quotes
25+ name = " my-cloud-router "
2626 network = " default"
2727 region = " us-central1"
2828
2929 nats = [{
30- name = " example -nat"
30+ name = " my -nat-gateway "
3131 }]
3232}
Original file line number Diff line number Diff line change 1+ /* *
2+ * Copyright 2020 Google LLC
3+ *
4+ * Licensed under the Apache License, Version 2.0 (the "License");
5+ * you may not use this file except in compliance with the License.
6+ * You may obtain a copy of the License at
7+ *
8+ * http://www.apache.org/licenses/LICENSE-2.0
9+ *
10+ * Unless required by applicable law or agreed to in writing, software
11+ * distributed under the License is distributed on an "AS IS" BASIS,
12+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+ * See the License for the specific language governing permissions and
14+ * limitations under the License.
15+ */
16+
17+ output "router_name" {
18+ value = module. cloud_router . router . name
19+ description = " The name of the created router"
20+ }
21+
22+ output "router_region" {
23+ value = module. cloud_router . router . region
24+ description = " The region of the created router"
25+ }
Original file line number Diff line number Diff line change 1+ /* *
2+ * Copyright 2019 Google LLC
3+ *
4+ * Licensed under the Apache License, Version 2.0 (the "License");
5+ * you may not use this file except in compliance with the License.
6+ * You may obtain a copy of the License at
7+ *
8+ * http://www.apache.org/licenses/LICENSE-2.0
9+ *
10+ * Unless required by applicable law or agreed to in writing, software
11+ * distributed under the License is distributed on an "AS IS" BASIS,
12+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+ * See the License for the specific language governing permissions and
14+ * limitations under the License.
15+ */
16+
17+ variable "project_id" {
18+ description = " The project ID to host the Cloud Router in"
19+ }
You can’t perform that action at this time.
0 commit comments