diff --git a/examples/full_resource_inputs/outputs.tf b/examples/full_resource_inputs/outputs.tf index b9f01b3..556d52d 100644 --- a/examples/full_resource_inputs/outputs.tf +++ b/examples/full_resource_inputs/outputs.tf @@ -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 } diff --git a/examples/simple_security_group_rules/outputs.tf b/examples/simple_security_group_rules/outputs.tf index d6f2e30..2b07ba2 100644 --- a/examples/simple_security_group_rules/outputs.tf +++ b/examples/simple_security_group_rules/outputs.tf @@ -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 } diff --git a/examples/simple_vpc_subnets/outputs.tf b/examples/simple_vpc_subnets/outputs.tf index 374993d..1ed5734 100644 --- a/examples/simple_vpc_subnets/outputs.tf +++ b/examples/simple_vpc_subnets/outputs.tf @@ -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 } diff --git a/outputs.tf b/outputs.tf index 04dc24e..154c05c 100644 --- a/outputs.tf +++ b/outputs.tf @@ -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)] }