-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #25 from Lance52259/br_output_reference_fix
chore(script): adjust the code style and output reference
- Loading branch information
Showing
4 changed files
with
62 additions
and
41 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,35 @@ | ||
output "vpc_id" { | ||
description = "The ID of the VPC resource" | ||
value = module.vpc_service.vpc_id | ||
description = "The ID of the VPC resource" | ||
|
||
value = module.vpc_service.vpc_id | ||
} | ||
|
||
output "vpc_cidr" { | ||
description = "The CIDR block of the VPC resource" | ||
value = module.vpc_service.vpc_cidr | ||
description = "The CIDR block of the VPC resource" | ||
|
||
value = module.vpc_service.vpc_cidr | ||
} | ||
|
||
output "subnet_cidrs" { | ||
description = "The CIDR list of the subnet resources to which the VPC resource belongs" | ||
value = module.vpc_service.subnet_cidrs | ||
description = "The CIDR list of the subnet resources to which the VPC resource belongs" | ||
|
||
value = module.vpc_service.subnet_cidrs | ||
} | ||
|
||
output "subnet_ids" { | ||
description = "The ID list of the subnet resources to which the VPC resource belongs" | ||
value = module.vpc_service.subnet_ids | ||
description = "The ID list of the subnet resources to which the VPC resource belongs" | ||
|
||
value = module.vpc_service.subnet_ids | ||
} | ||
|
||
output "security_group_id" { | ||
description = "The ID of the security group resource" | ||
value = module.vpc_service.security_group_id | ||
description = "The ID of the security group resource" | ||
|
||
value = module.vpc_service.security_group_id | ||
} | ||
|
||
output "security_group_rules" { | ||
description = "All rules to which the security group resource belongs" | ||
value = module.vpc_service.security_group_rules | ||
description = "All rules to which the security group resource belongs" | ||
|
||
value = module.vpc_service.security_group_rules | ||
} |
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 |
---|---|---|
@@ -1,9 +1,11 @@ | ||
output "security_group_id" { | ||
description = "The ID of the security group resource" | ||
value = module.vpc_service.security_group_id | ||
|
||
value = module.vpc_service.security_group_id | ||
} | ||
|
||
output "security_group_rules" { | ||
description = "All rules to which the security group resource belongs" | ||
value = module.vpc_service.security_group_rules | ||
description = "All rules to which the security group resource belongs" | ||
|
||
value = module.vpc_service.security_group_rules | ||
} |
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 |
---|---|---|
@@ -1,19 +1,23 @@ | ||
output "vpc_id" { | ||
description = "The ID of the VPC resource" | ||
value = module.vpc_service.vpc_id | ||
description = "The ID of the VPC resource" | ||
|
||
value = module.vpc_service.vpc_id | ||
} | ||
|
||
output "vpc_cidr" { | ||
description = "The CIDR block of the VPC resource" | ||
value = module.vpc_service.vpc_cidr | ||
description = "The CIDR block of the VPC resource" | ||
|
||
value = module.vpc_service.vpc_cidr | ||
} | ||
|
||
output "subnet_cidrs" { | ||
description = "The CIDR list of the subnet resources to which the VPC resource belongs" | ||
value = module.vpc_service.subnet_cidrs | ||
description = "The CIDR list of the subnet resources to which the VPC resource belongs" | ||
|
||
value = module.vpc_service.subnet_cidrs | ||
} | ||
|
||
output "subnet_ids" { | ||
description = "The ID list of the subnet resources to which the VPC resource belongs" | ||
value = module.vpc_service.subnet_ids | ||
description = "The ID list of the subnet resources to which the VPC resource belongs" | ||
|
||
value = module.vpc_service.subnet_ids | ||
} |
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 |
---|---|---|
@@ -1,44 +1,53 @@ | ||
output "vpc_id" { | ||
description = "The ID of the VPC resource" | ||
value = try(huaweicloud_vpc.this[0].id, "") | ||
description = "The ID of the VPC resource" | ||
|
||
value = try(huaweicloud_vpc.this[0].id, "") | ||
} | ||
|
||
output "vpc_cidr" { | ||
description = "The CIDR block of the VPC resource" | ||
value = try(huaweicloud_vpc.this[0].id, "") | ||
description = "The CIDR block of the VPC resource" | ||
|
||
value = try(huaweicloud_vpc.this[0].id, "") | ||
} | ||
|
||
output "subnet_cidrs" { | ||
description = "The CIDR list of the subnet resources to which the VPC resource belongs" | ||
value = try(huaweicloud_vpc_subnet.this[*].cidr, []) | ||
description = "The CIDR list of the subnet resources to which the VPC resource belongs" | ||
|
||
value = try(huaweicloud_vpc_subnet.this[*].cidr, []) | ||
} | ||
|
||
output "subnet_ids" { | ||
description = "The ID list of the subnet resources to which the VPC resource belongs" | ||
value = try(huaweicloud_vpc_subnet.this[*].id, []) | ||
description = "The ID list of the subnet resources to which the VPC resource belongs" | ||
|
||
value = try(huaweicloud_vpc_subnet.this[*].id, []) | ||
} | ||
|
||
output "security_group_id" { | ||
description = "The ID of the security group resource" | ||
value = try(huaweicloud_networking_secgroup.this[0].id, "") | ||
description = "The ID of the security group resource" | ||
|
||
value = try(huaweicloud_networking_secgroup.this[0].id, "") | ||
} | ||
|
||
output "security_group_rules" { | ||
description = "All rules to which the security group resource belongs" | ||
value = try(data.huaweicloud_networking_secgroup_rules.this[0].rules, null) | ||
description = "All rules to which the security group resource belongs" | ||
|
||
value = try(data.huaweicloud_networking_secgroup_rules.this[*].rules, []) | ||
} | ||
|
||
output "queried_vpc_ids" { | ||
description = "The ID list of the VPC resources for data-source query by resource name" | ||
value = [for v in flatten(data.huaweicloud_vpcs.this[*].vpcs): v.id if contains(var.query_vpc_names, v.name)] | ||
description = "The ID list of the VPC resources for data-source query by resource name" | ||
|
||
value = [for v in flatten(data.huaweicloud_vpcs.this[*].vpcs): v.id if contains(var.query_vpc_names, v.name)] | ||
} | ||
|
||
output "queried_subnet_ids" { | ||
description = "The ID list of the subnet resources for data-source query by resource name" | ||
value = [for v in flatten(data.huaweicloud_vpc_subnets.this[*].subnets): v.id if contains(var.query_subnet_names, v.name)] | ||
description = "The ID list of the subnet resources for data-source query by resource name" | ||
|
||
value = [for v in flatten(data.huaweicloud_vpc_subnets.this[*].subnets): v.id if contains(var.query_subnet_names, v.name)] | ||
} | ||
|
||
output "queried_security_group_ids" { | ||
description = "The ID list of the security group resources for data-source query by resource name" | ||
value = [for v in flatten(data.huaweicloud_networking_secgroups.this[*].security_groups): v.id if contains(var.query_security_group_names, v.name)] | ||
description = "The ID list of the security group resources for data-source query by resource name" | ||
|
||
value = [for v in flatten(data.huaweicloud_networking_secgroups.this[*].security_groups): v.id if contains(var.query_security_group_names, v.name)] | ||
} |