pulumi_wasm_providers_gcp_mini::compute

Module router

source
Expand description

Represents a Router resource.

To get more information about Router, see:

§Example Usage

§Router Basic

use pulumi_wasm_rust::Output;
use pulumi_wasm_rust::{add_export, pulumi_main};
#[pulumi_main]
fn test_main() -> Result<(), Error> {
    let foobar = router::create(
        "foobar",
        RouterArgs::builder()
            .bgp(
                RouterBgp::builder()
                    .advertiseMode("CUSTOM")
                    .advertisedGroups(vec!["ALL_SUBNETS",])
                    .advertisedIpRanges(
                        vec![
                            RouterBgpAdvertisedIpRange::builder().range("1.2.3.4")
                            .build_struct(), RouterBgpAdvertisedIpRange::builder()
                            .range("6.7.0.0/16").build_struct(),
                        ],
                    )
                    .asn(64514)
                    .build_struct(),
            )
            .name("my-router")
            .network("${foobarNetwork.name}")
            .build_struct(),
    );
    let foobarNetwork = network::create(
        "foobarNetwork",
        NetworkArgs::builder()
            .auto_create_subnetworks(false)
            .name("my-network")
            .build_struct(),
    );
}

§Compute Router Encrypted Interconnect

resources:
  encrypted-interconnect-router:
    type: gcp:compute:Router
    properties:
      name: test-router
      network: ${network.name}
      encryptedInterconnectRouter: true
      bgp:
        asn: 64514
  network:
    type: gcp:compute:Network
    properties:
      name: test-network
      autoCreateSubnetworks: false

§Import

Router can be imported using any of these accepted formats:

  • projects/{{project}}/regions/{{region}}/routers/{{name}}

  • {{project}}/{{region}}/{{name}}

  • {{region}}/{{name}}

  • {{name}}

When using the pulumi import command, Router can be imported using one of the formats above. For example:

$ pulumi import gcp:compute/router:Router default projects/{{project}}/regions/{{region}}/routers/{{name}}
$ pulumi import gcp:compute/router:Router default {{project}}/{{region}}/{{name}}
$ pulumi import gcp:compute/router:Router default {{region}}/{{name}}
$ pulumi import gcp:compute/router:Router default {{name}}

Structs§

Functions§

  • Registers a new resource with the given unique name and arguments