fixed variables and outputs
This commit is contained in:
parent
7021682746
commit
12d70832d2
|
@ -99,13 +99,19 @@ The above command will delete the associated resources so there will be no billa
|
||||||
|
|
||||||
| name | description | type | required | default |
|
| name | description | type | required | default |
|
||||||
|---|---|:---:|:---:|:---:|
|
|---|---|:---:|:---:|:---:|
|
||||||
| [consumer_project_id](variables.tf#L32) | The consumer project, in which the GCLB and Cloud Armor should be created. | <code>string</code> | ✓ | |
|
| [consumer_project_id](variables.tf#L17) | The consumer project, in which the GCLB and Cloud Armor should be created. | <code>string</code> | ✓ | |
|
||||||
| [prefix](variables.tf#L17) | Prefix used for resource names. | <code>string</code> | ✓ | |
|
| [prefix](variables.tf#L22) | Prefix used for resource names. | <code>string</code> | ✓ | |
|
||||||
| [producer_project_id](variables.tf#L37) | The producer project, in which the ILB, PSC Service Attachment and Cloud Run service should be created | <code>string</code> | ✓ | |
|
| [producer_project_id](variables.tf#L31) | The producer project, in which the ILB, PSC Service Attachment and Cloud Run service should be created | <code>string</code> | ✓ | |
|
||||||
| [project_create](variables.tf#L26) | Create project instead of using an existing one. | <code>bool</code> | | <code>false</code> |
|
| [project_create](variables.tf#L36) | Create project instead of using an existing one. | <code>bool</code> | | <code>false</code> |
|
||||||
| [region](variables.tf#L42) | The GCP region in which the resources should be deployed. | <code>string</code> | | <code>"europe-west1"</code> |
|
| [region](variables.tf#L42) | The GCP region in which the resources should be deployed. | <code>string</code> | | <code>"europe-west1"</code> |
|
||||||
| [zone](variables.tf#L48) | The GCP zone for the VM. | <code>string</code> | | <code>"europe-west1-b"</code> |
|
| [zone](variables.tf#L48) | The GCP zone for the VM. | <code>string</code> | | <code>"europe-west1-b"</code> |
|
||||||
|
|
||||||
|
## Outputs
|
||||||
|
|
||||||
|
| name | description | sensitive |
|
||||||
|
|---|---|:---:|
|
||||||
|
| [lb_ip](outputs.tf#L17) | Load balancer IP address. | |
|
||||||
|
|
||||||
<!-- END TFDOC -->
|
<!-- END TFDOC -->
|
||||||
## Test
|
## Test
|
||||||
|
|
||||||
|
|
|
@ -43,10 +43,6 @@ resource "google_compute_global_forwarding_rule" "default" {
|
||||||
port_range = "80"
|
port_range = "80"
|
||||||
}
|
}
|
||||||
|
|
||||||
output "lb_ip" {
|
|
||||||
value = google_compute_global_forwarding_rule.default.ip_address
|
|
||||||
}
|
|
||||||
|
|
||||||
resource "google_compute_target_http_proxy" "default" {
|
resource "google_compute_target_http_proxy" "default" {
|
||||||
project = module.consumer_project.project_id
|
project = module.consumer_project.project_id
|
||||||
name = "target-proxy"
|
name = "target-proxy"
|
||||||
|
|
|
@ -0,0 +1,20 @@
|
||||||
|
/**
|
||||||
|
* Copyright 2023 Google LLC
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
output "lb_ip" {
|
||||||
|
description = "Load balancer IP address."
|
||||||
|
value = google_compute_global_forwarding_rule.default.ip_address
|
||||||
|
}
|
|
@ -14,6 +14,11 @@
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
variable "consumer_project_id" {
|
||||||
|
description = "The consumer project, in which the GCLB and Cloud Armor should be created."
|
||||||
|
type = string
|
||||||
|
}
|
||||||
|
|
||||||
variable "prefix" {
|
variable "prefix" {
|
||||||
description = "Prefix used for resource names."
|
description = "Prefix used for resource names."
|
||||||
type = string
|
type = string
|
||||||
|
@ -23,22 +28,17 @@ variable "prefix" {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
variable "producer_project_id" {
|
||||||
|
description = "The producer project, in which the ILB, PSC Service Attachment and Cloud Run service should be created"
|
||||||
|
type = string
|
||||||
|
}
|
||||||
|
|
||||||
variable "project_create" {
|
variable "project_create" {
|
||||||
description = "Create project instead of using an existing one."
|
description = "Create project instead of using an existing one."
|
||||||
type = bool
|
type = bool
|
||||||
default = false
|
default = false
|
||||||
}
|
}
|
||||||
|
|
||||||
variable "consumer_project_id" {
|
|
||||||
description = "The consumer project, in which the GCLB and Cloud Armor should be created."
|
|
||||||
type = string
|
|
||||||
}
|
|
||||||
|
|
||||||
variable "producer_project_id" {
|
|
||||||
description = "The producer project, in which the ILB, PSC Service Attachment and Cloud Run service should be created"
|
|
||||||
type = string
|
|
||||||
}
|
|
||||||
|
|
||||||
variable "region" {
|
variable "region" {
|
||||||
description = "The GCP region in which the resources should be deployed."
|
description = "The GCP region in which the resources should be deployed."
|
||||||
type = string
|
type = string
|
||||||
|
|
Loading…
Reference in New Issue