Skip to content

Default route table + CIDR in module outputs #8

@jbphilippe-orange

Description

@jbphilippe-orange

Hi,

I would like to add new outputs in this module, for default route table ID, Name, and CIDR of the VPC.
_ Not mandatory, but it could be useful , to use these outputs with another resources _

In main.tf , we could add this :

data "flexibleengine_vpc_route_table" "default" {
  vpc_id = flexibleengine_vpc_v1.vpc[0].id

  depends_on = [flexibleengine_vpc_v1.vpc, flexibleengine_vpc_subnet_v1.vpc_subnets]
}

Then in outputs.tf :

output "default_rtb_id" {
  description = "id of the VPC route table (default)"
  value          = data.flexibleengine_vpc_route_table.default.id
}

output "default_rtb_name" {
  description = "Name of the VPC route table (default)"
  value          = data.flexibleengine_vpc_route_table.default.name
}

output "vpc_cidr" {
  description = "CIDR of the created VPC"
  value          = var.vpc_cidr
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions