Skip to content

Commit

Permalink
Fix terraform fmt issues
Browse files Browse the repository at this point in the history
  • Loading branch information
q2w committed Aug 9, 2024
1 parent e563917 commit c2ceaec
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 28 deletions.
2 changes: 1 addition & 1 deletion modules/vpc-serverless-connector-beta/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ module "serverless-connector" {
| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| project\_id | Project in which the vpc connector will be deployed. | `string` | n/a | yes |
| vpc\_connectors | List of VPC serverless connectors. | <pre>list(object({<br> name = string,<br> region = string,<br> network = optional(string, null),<br> subnet_name = optional(string, null),<br> ip_cidr_range = optional(string, null),<br> host_project_name = optional(string, null),<br> machine_type = optional(string, null),<br> min_instances = optional(number, null),<br> max_instances = optional(number, null),<br> max_throughput = optional(number, null)<br> }))</pre> | `[]` | no |
| vpc\_connectors | List of VPC serverless connectors. | <pre>list(object({<br> name = string,<br> region = string,<br> network = optional(string, null),<br> subnet_name = optional(string, null),<br> ip_cidr_range = optional(string, null),<br> host_project_id = optional(string, null),<br> machine_type = optional(string, null),<br> min_instances = optional(number, null),<br> max_instances = optional(number, null),<br> max_throughput = optional(number, null)<br> }))</pre> | `[]` | no |

## Outputs

Expand Down
14 changes: 7 additions & 7 deletions modules/vpc-serverless-connector-beta/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,17 @@ resource "google_vpc_access_connector" "connector_beta" {
name = each.value.name
project = var.project_id
region = each.value.region
ip_cidr_range = lookup(each.value, "ip_cidr_range", null)
network = lookup(each.value, "network", null)
ip_cidr_range = each.value.ip_cidr_range
network = each.value.network
dynamic "subnet" {
for_each = each.value.subnet_name == null ? [] : [each.value]
content {
name = each.value.subnet_name
project_id = lookup(each.value, "host_project_id", null)
project_id = each.value.host_project_id
}
}
machine_type = lookup(each.value, "machine_type", null)
min_instances = lookup(each.value, "min_instances", null)
max_instances = lookup(each.value, "max_instances", null)
max_throughput = lookup(each.value, "max_throughput", null)
machine_type = each.value.machine_type
min_instances = each.value.min_instances
max_instances = each.value.max_instances
max_throughput = each.value.max_throughput
}
20 changes: 10 additions & 10 deletions modules/vpc-serverless-connector-beta/metadata.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -96,16 +96,16 @@ spec:
description: List of VPC serverless connectors.
varType: |-
list(object({
name = string,
region = string,
network = optional(string, null),
subnet_name = optional(string, null),
ip_cidr_range = optional(string, null),
host_project_name = optional(string, null),
machine_type = optional(string, null),
min_instances = optional(number, null),
max_instances = optional(number, null),
max_throughput = optional(number, null)
name = string,
region = string,
network = optional(string, null),
subnet_name = optional(string, null),
ip_cidr_range = optional(string, null),
host_project_id = optional(string, null),
machine_type = optional(string, null),
min_instances = optional(number, null),
max_instances = optional(number, null),
max_throughput = optional(number, null)
}))
defaultValue: []
outputs:
Expand Down
20 changes: 10 additions & 10 deletions modules/vpc-serverless-connector-beta/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,16 @@ variable "project_id" {

variable "vpc_connectors" {
type = list(object({
name = string,
region = string,
network = optional(string, null),
subnet_name = optional(string, null),
ip_cidr_range = optional(string, null),
host_project_name = optional(string, null),
machine_type = optional(string, null),
min_instances = optional(number, null),
max_instances = optional(number, null),
max_throughput = optional(number, null)
name = string,
region = string,
network = optional(string, null),
subnet_name = optional(string, null),
ip_cidr_range = optional(string, null),
host_project_id = optional(string, null),
machine_type = optional(string, null),
min_instances = optional(number, null),
max_instances = optional(number, null),
max_throughput = optional(number, null)
}))
default = []
description = "List of VPC serverless connectors."
Expand Down

0 comments on commit c2ceaec

Please sign in to comment.