github.com/pulumi/pulumi-aws/sdk/v6@v6.32.0/go/aws/ec2/route.go (about) 1 // Code generated by the Pulumi Terraform Bridge (tfgen) Tool DO NOT EDIT. 2 // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** 3 4 package ec2 5 6 import ( 7 "context" 8 "reflect" 9 10 "errors" 11 "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/internal" 12 "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 13 ) 14 15 // Provides a resource to create a routing table entry (a route) in a VPC routing table. 16 // 17 // > **NOTE on Route Tables and Routes:** This provider currently provides both a standalone Route resource and a Route Table resource with routes defined in-line. At this time you cannot use a Route Table with in-line routes in conjunction with any Route resources. Doing so will cause a conflict of rule settings and will overwrite rules. 18 // 19 // > **NOTE on `gatewayId` attribute:** The AWS API is very forgiving with the resource ID passed in the `gatewayId` attribute. For example an `ec2.Route` resource can be created with an `ec2.NatGateway` or `ec2.EgressOnlyInternetGateway` ID specified for the `gatewayId` attribute. Specifying anything other than an `ec2.InternetGateway` or `ec2.VpnGateway` ID will lead to this provider reporting a permanent diff between your configuration and recorded state, as the AWS API returns the more-specific attribute. If you are experiencing constant diffs with an `ec2.Route` resource, the first thing to check is that the correct attribute is being specified. 20 // 21 // ## Example Usage 22 // 23 // <!--Start PulumiCodeChooser --> 24 // ```go 25 // package main 26 // 27 // import ( 28 // 29 // "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2" 30 // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 31 // 32 // ) 33 // 34 // func main() { 35 // pulumi.Run(func(ctx *pulumi.Context) error { 36 // _, err := ec2.NewRoute(ctx, "r", &ec2.RouteArgs{ 37 // RouteTableId: pulumi.Any(testing.Id), 38 // DestinationCidrBlock: pulumi.String("10.0.1.0/22"), 39 // VpcPeeringConnectionId: pulumi.String("pcx-45ff3dc1"), 40 // }) 41 // if err != nil { 42 // return err 43 // } 44 // return nil 45 // }) 46 // } 47 // 48 // ``` 49 // <!--End PulumiCodeChooser --> 50 // 51 // ## Example IPv6 Usage 52 // 53 // <!--Start PulumiCodeChooser --> 54 // ```go 55 // package main 56 // 57 // import ( 58 // 59 // "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2" 60 // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 61 // 62 // ) 63 // 64 // func main() { 65 // pulumi.Run(func(ctx *pulumi.Context) error { 66 // vpc, err := ec2.NewVpc(ctx, "vpc", &ec2.VpcArgs{ 67 // CidrBlock: pulumi.String("10.1.0.0/16"), 68 // AssignGeneratedIpv6CidrBlock: pulumi.Bool(true), 69 // }) 70 // if err != nil { 71 // return err 72 // } 73 // egress, err := ec2.NewEgressOnlyInternetGateway(ctx, "egress", &ec2.EgressOnlyInternetGatewayArgs{ 74 // VpcId: vpc.ID(), 75 // }) 76 // if err != nil { 77 // return err 78 // } 79 // _, err = ec2.NewRoute(ctx, "r", &ec2.RouteArgs{ 80 // RouteTableId: pulumi.String("rtb-4fbb3ac4"), 81 // DestinationIpv6CidrBlock: pulumi.String("::/0"), 82 // EgressOnlyGatewayId: egress.ID(), 83 // }) 84 // if err != nil { 85 // return err 86 // } 87 // return nil 88 // }) 89 // } 90 // 91 // ``` 92 // <!--End PulumiCodeChooser --> 93 // 94 // ## Import 95 // 96 // Import a route in route table `rtb-656C65616E6F72` with an IPv6 destination CIDR of `2620:0:2d0:200::8/125`: 97 // 98 // Import a route in route table `rtb-656C65616E6F72` with a managed prefix list destination of `pl-0570a1d2d725c16be`: 99 // 100 // __Using `pulumi import` to import__ individual routes using `ROUTETABLEID_DESTINATION`. Import [local routes](https://docs.aws.amazon.com/vpc/latest/userguide/VPC_Route_Tables.html#RouteTables) using the VPC's IPv4 or IPv6 CIDR blocks. For example: 101 // 102 // Import a route in route table `rtb-656C65616E6F72` with an IPv4 destination CIDR of `10.42.0.0/16`: 103 // 104 // ```sh 105 // $ pulumi import aws:ec2/route:Route my_route rtb-656C65616E6F72_10.42.0.0/16 106 // ``` 107 // Import a route in route table `rtb-656C65616E6F72` with an IPv6 destination CIDR of `2620:0:2d0:200::8/125`: 108 // 109 // ```sh 110 // $ pulumi import aws:ec2/route:Route my_route rtb-656C65616E6F72_2620:0:2d0:200::8/125 111 // ``` 112 // Import a route in route table `rtb-656C65616E6F72` with a managed prefix list destination of `pl-0570a1d2d725c16be`: 113 // 114 // ```sh 115 // $ pulumi import aws:ec2/route:Route my_route rtb-656C65616E6F72_pl-0570a1d2d725c16be 116 // ``` 117 type Route struct { 118 pulumi.CustomResourceState 119 120 // Identifier of a carrier gateway. This attribute can only be used when the VPC contains a subnet which is associated with a Wavelength Zone. 121 CarrierGatewayId pulumi.StringPtrOutput `pulumi:"carrierGatewayId"` 122 // The Amazon Resource Name (ARN) of a core network. 123 CoreNetworkArn pulumi.StringPtrOutput `pulumi:"coreNetworkArn"` 124 // The destination CIDR block. 125 DestinationCidrBlock pulumi.StringPtrOutput `pulumi:"destinationCidrBlock"` 126 // The destination IPv6 CIDR block. 127 DestinationIpv6CidrBlock pulumi.StringPtrOutput `pulumi:"destinationIpv6CidrBlock"` 128 // The ID of a managed prefix list destination. 129 // 130 // One of the following target arguments must be supplied: 131 DestinationPrefixListId pulumi.StringPtrOutput `pulumi:"destinationPrefixListId"` 132 // Identifier of a VPC Egress Only Internet Gateway. 133 EgressOnlyGatewayId pulumi.StringPtrOutput `pulumi:"egressOnlyGatewayId"` 134 // Identifier of a VPC internet gateway or a virtual private gateway. Specify `local` when updating a previously imported local route. 135 GatewayId pulumi.StringPtrOutput `pulumi:"gatewayId"` 136 // Identifier of an EC2 instance. 137 InstanceId pulumi.StringOutput `pulumi:"instanceId"` 138 // The AWS account ID of the owner of the EC2 instance. 139 InstanceOwnerId pulumi.StringOutput `pulumi:"instanceOwnerId"` 140 // Identifier of a Outpost local gateway. 141 LocalGatewayId pulumi.StringPtrOutput `pulumi:"localGatewayId"` 142 // Identifier of a VPC NAT gateway. 143 NatGatewayId pulumi.StringPtrOutput `pulumi:"natGatewayId"` 144 // Identifier of an EC2 network interface. 145 NetworkInterfaceId pulumi.StringOutput `pulumi:"networkInterfaceId"` 146 // How the route was created - `CreateRouteTable`, `CreateRoute` or `EnableVgwRoutePropagation`. 147 Origin pulumi.StringOutput `pulumi:"origin"` 148 // The ID of the routing table. 149 // 150 // One of the following destination arguments must be supplied: 151 RouteTableId pulumi.StringOutput `pulumi:"routeTableId"` 152 // The state of the route - `active` or `blackhole`. 153 State pulumi.StringOutput `pulumi:"state"` 154 // Identifier of an EC2 Transit Gateway. 155 TransitGatewayId pulumi.StringPtrOutput `pulumi:"transitGatewayId"` 156 // Identifier of a VPC Endpoint. 157 VpcEndpointId pulumi.StringPtrOutput `pulumi:"vpcEndpointId"` 158 // Identifier of a VPC peering connection. 159 // 160 // Note that the default route, mapping the VPC's CIDR block to "local", is created implicitly and cannot be specified. 161 VpcPeeringConnectionId pulumi.StringPtrOutput `pulumi:"vpcPeeringConnectionId"` 162 } 163 164 // NewRoute registers a new resource with the given unique name, arguments, and options. 165 func NewRoute(ctx *pulumi.Context, 166 name string, args *RouteArgs, opts ...pulumi.ResourceOption) (*Route, error) { 167 if args == nil { 168 return nil, errors.New("missing one or more required arguments") 169 } 170 171 if args.RouteTableId == nil { 172 return nil, errors.New("invalid value for required argument 'RouteTableId'") 173 } 174 opts = internal.PkgResourceDefaultOpts(opts) 175 var resource Route 176 err := ctx.RegisterResource("aws:ec2/route:Route", name, args, &resource, opts...) 177 if err != nil { 178 return nil, err 179 } 180 return &resource, nil 181 } 182 183 // GetRoute gets an existing Route resource's state with the given name, ID, and optional 184 // state properties that are used to uniquely qualify the lookup (nil if not required). 185 func GetRoute(ctx *pulumi.Context, 186 name string, id pulumi.IDInput, state *RouteState, opts ...pulumi.ResourceOption) (*Route, error) { 187 var resource Route 188 err := ctx.ReadResource("aws:ec2/route:Route", name, id, state, &resource, opts...) 189 if err != nil { 190 return nil, err 191 } 192 return &resource, nil 193 } 194 195 // Input properties used for looking up and filtering Route resources. 196 type routeState struct { 197 // Identifier of a carrier gateway. This attribute can only be used when the VPC contains a subnet which is associated with a Wavelength Zone. 198 CarrierGatewayId *string `pulumi:"carrierGatewayId"` 199 // The Amazon Resource Name (ARN) of a core network. 200 CoreNetworkArn *string `pulumi:"coreNetworkArn"` 201 // The destination CIDR block. 202 DestinationCidrBlock *string `pulumi:"destinationCidrBlock"` 203 // The destination IPv6 CIDR block. 204 DestinationIpv6CidrBlock *string `pulumi:"destinationIpv6CidrBlock"` 205 // The ID of a managed prefix list destination. 206 // 207 // One of the following target arguments must be supplied: 208 DestinationPrefixListId *string `pulumi:"destinationPrefixListId"` 209 // Identifier of a VPC Egress Only Internet Gateway. 210 EgressOnlyGatewayId *string `pulumi:"egressOnlyGatewayId"` 211 // Identifier of a VPC internet gateway or a virtual private gateway. Specify `local` when updating a previously imported local route. 212 GatewayId *string `pulumi:"gatewayId"` 213 // Identifier of an EC2 instance. 214 InstanceId *string `pulumi:"instanceId"` 215 // The AWS account ID of the owner of the EC2 instance. 216 InstanceOwnerId *string `pulumi:"instanceOwnerId"` 217 // Identifier of a Outpost local gateway. 218 LocalGatewayId *string `pulumi:"localGatewayId"` 219 // Identifier of a VPC NAT gateway. 220 NatGatewayId *string `pulumi:"natGatewayId"` 221 // Identifier of an EC2 network interface. 222 NetworkInterfaceId *string `pulumi:"networkInterfaceId"` 223 // How the route was created - `CreateRouteTable`, `CreateRoute` or `EnableVgwRoutePropagation`. 224 Origin *string `pulumi:"origin"` 225 // The ID of the routing table. 226 // 227 // One of the following destination arguments must be supplied: 228 RouteTableId *string `pulumi:"routeTableId"` 229 // The state of the route - `active` or `blackhole`. 230 State *string `pulumi:"state"` 231 // Identifier of an EC2 Transit Gateway. 232 TransitGatewayId *string `pulumi:"transitGatewayId"` 233 // Identifier of a VPC Endpoint. 234 VpcEndpointId *string `pulumi:"vpcEndpointId"` 235 // Identifier of a VPC peering connection. 236 // 237 // Note that the default route, mapping the VPC's CIDR block to "local", is created implicitly and cannot be specified. 238 VpcPeeringConnectionId *string `pulumi:"vpcPeeringConnectionId"` 239 } 240 241 type RouteState struct { 242 // Identifier of a carrier gateway. This attribute can only be used when the VPC contains a subnet which is associated with a Wavelength Zone. 243 CarrierGatewayId pulumi.StringPtrInput 244 // The Amazon Resource Name (ARN) of a core network. 245 CoreNetworkArn pulumi.StringPtrInput 246 // The destination CIDR block. 247 DestinationCidrBlock pulumi.StringPtrInput 248 // The destination IPv6 CIDR block. 249 DestinationIpv6CidrBlock pulumi.StringPtrInput 250 // The ID of a managed prefix list destination. 251 // 252 // One of the following target arguments must be supplied: 253 DestinationPrefixListId pulumi.StringPtrInput 254 // Identifier of a VPC Egress Only Internet Gateway. 255 EgressOnlyGatewayId pulumi.StringPtrInput 256 // Identifier of a VPC internet gateway or a virtual private gateway. Specify `local` when updating a previously imported local route. 257 GatewayId pulumi.StringPtrInput 258 // Identifier of an EC2 instance. 259 InstanceId pulumi.StringPtrInput 260 // The AWS account ID of the owner of the EC2 instance. 261 InstanceOwnerId pulumi.StringPtrInput 262 // Identifier of a Outpost local gateway. 263 LocalGatewayId pulumi.StringPtrInput 264 // Identifier of a VPC NAT gateway. 265 NatGatewayId pulumi.StringPtrInput 266 // Identifier of an EC2 network interface. 267 NetworkInterfaceId pulumi.StringPtrInput 268 // How the route was created - `CreateRouteTable`, `CreateRoute` or `EnableVgwRoutePropagation`. 269 Origin pulumi.StringPtrInput 270 // The ID of the routing table. 271 // 272 // One of the following destination arguments must be supplied: 273 RouteTableId pulumi.StringPtrInput 274 // The state of the route - `active` or `blackhole`. 275 State pulumi.StringPtrInput 276 // Identifier of an EC2 Transit Gateway. 277 TransitGatewayId pulumi.StringPtrInput 278 // Identifier of a VPC Endpoint. 279 VpcEndpointId pulumi.StringPtrInput 280 // Identifier of a VPC peering connection. 281 // 282 // Note that the default route, mapping the VPC's CIDR block to "local", is created implicitly and cannot be specified. 283 VpcPeeringConnectionId pulumi.StringPtrInput 284 } 285 286 func (RouteState) ElementType() reflect.Type { 287 return reflect.TypeOf((*routeState)(nil)).Elem() 288 } 289 290 type routeArgs struct { 291 // Identifier of a carrier gateway. This attribute can only be used when the VPC contains a subnet which is associated with a Wavelength Zone. 292 CarrierGatewayId *string `pulumi:"carrierGatewayId"` 293 // The Amazon Resource Name (ARN) of a core network. 294 CoreNetworkArn *string `pulumi:"coreNetworkArn"` 295 // The destination CIDR block. 296 DestinationCidrBlock *string `pulumi:"destinationCidrBlock"` 297 // The destination IPv6 CIDR block. 298 DestinationIpv6CidrBlock *string `pulumi:"destinationIpv6CidrBlock"` 299 // The ID of a managed prefix list destination. 300 // 301 // One of the following target arguments must be supplied: 302 DestinationPrefixListId *string `pulumi:"destinationPrefixListId"` 303 // Identifier of a VPC Egress Only Internet Gateway. 304 EgressOnlyGatewayId *string `pulumi:"egressOnlyGatewayId"` 305 // Identifier of a VPC internet gateway or a virtual private gateway. Specify `local` when updating a previously imported local route. 306 GatewayId *string `pulumi:"gatewayId"` 307 // Identifier of a Outpost local gateway. 308 LocalGatewayId *string `pulumi:"localGatewayId"` 309 // Identifier of a VPC NAT gateway. 310 NatGatewayId *string `pulumi:"natGatewayId"` 311 // Identifier of an EC2 network interface. 312 NetworkInterfaceId *string `pulumi:"networkInterfaceId"` 313 // The ID of the routing table. 314 // 315 // One of the following destination arguments must be supplied: 316 RouteTableId string `pulumi:"routeTableId"` 317 // Identifier of an EC2 Transit Gateway. 318 TransitGatewayId *string `pulumi:"transitGatewayId"` 319 // Identifier of a VPC Endpoint. 320 VpcEndpointId *string `pulumi:"vpcEndpointId"` 321 // Identifier of a VPC peering connection. 322 // 323 // Note that the default route, mapping the VPC's CIDR block to "local", is created implicitly and cannot be specified. 324 VpcPeeringConnectionId *string `pulumi:"vpcPeeringConnectionId"` 325 } 326 327 // The set of arguments for constructing a Route resource. 328 type RouteArgs struct { 329 // Identifier of a carrier gateway. This attribute can only be used when the VPC contains a subnet which is associated with a Wavelength Zone. 330 CarrierGatewayId pulumi.StringPtrInput 331 // The Amazon Resource Name (ARN) of a core network. 332 CoreNetworkArn pulumi.StringPtrInput 333 // The destination CIDR block. 334 DestinationCidrBlock pulumi.StringPtrInput 335 // The destination IPv6 CIDR block. 336 DestinationIpv6CidrBlock pulumi.StringPtrInput 337 // The ID of a managed prefix list destination. 338 // 339 // One of the following target arguments must be supplied: 340 DestinationPrefixListId pulumi.StringPtrInput 341 // Identifier of a VPC Egress Only Internet Gateway. 342 EgressOnlyGatewayId pulumi.StringPtrInput 343 // Identifier of a VPC internet gateway or a virtual private gateway. Specify `local` when updating a previously imported local route. 344 GatewayId pulumi.StringPtrInput 345 // Identifier of a Outpost local gateway. 346 LocalGatewayId pulumi.StringPtrInput 347 // Identifier of a VPC NAT gateway. 348 NatGatewayId pulumi.StringPtrInput 349 // Identifier of an EC2 network interface. 350 NetworkInterfaceId pulumi.StringPtrInput 351 // The ID of the routing table. 352 // 353 // One of the following destination arguments must be supplied: 354 RouteTableId pulumi.StringInput 355 // Identifier of an EC2 Transit Gateway. 356 TransitGatewayId pulumi.StringPtrInput 357 // Identifier of a VPC Endpoint. 358 VpcEndpointId pulumi.StringPtrInput 359 // Identifier of a VPC peering connection. 360 // 361 // Note that the default route, mapping the VPC's CIDR block to "local", is created implicitly and cannot be specified. 362 VpcPeeringConnectionId pulumi.StringPtrInput 363 } 364 365 func (RouteArgs) ElementType() reflect.Type { 366 return reflect.TypeOf((*routeArgs)(nil)).Elem() 367 } 368 369 type RouteInput interface { 370 pulumi.Input 371 372 ToRouteOutput() RouteOutput 373 ToRouteOutputWithContext(ctx context.Context) RouteOutput 374 } 375 376 func (*Route) ElementType() reflect.Type { 377 return reflect.TypeOf((**Route)(nil)).Elem() 378 } 379 380 func (i *Route) ToRouteOutput() RouteOutput { 381 return i.ToRouteOutputWithContext(context.Background()) 382 } 383 384 func (i *Route) ToRouteOutputWithContext(ctx context.Context) RouteOutput { 385 return pulumi.ToOutputWithContext(ctx, i).(RouteOutput) 386 } 387 388 // RouteArrayInput is an input type that accepts RouteArray and RouteArrayOutput values. 389 // You can construct a concrete instance of `RouteArrayInput` via: 390 // 391 // RouteArray{ RouteArgs{...} } 392 type RouteArrayInput interface { 393 pulumi.Input 394 395 ToRouteArrayOutput() RouteArrayOutput 396 ToRouteArrayOutputWithContext(context.Context) RouteArrayOutput 397 } 398 399 type RouteArray []RouteInput 400 401 func (RouteArray) ElementType() reflect.Type { 402 return reflect.TypeOf((*[]*Route)(nil)).Elem() 403 } 404 405 func (i RouteArray) ToRouteArrayOutput() RouteArrayOutput { 406 return i.ToRouteArrayOutputWithContext(context.Background()) 407 } 408 409 func (i RouteArray) ToRouteArrayOutputWithContext(ctx context.Context) RouteArrayOutput { 410 return pulumi.ToOutputWithContext(ctx, i).(RouteArrayOutput) 411 } 412 413 // RouteMapInput is an input type that accepts RouteMap and RouteMapOutput values. 414 // You can construct a concrete instance of `RouteMapInput` via: 415 // 416 // RouteMap{ "key": RouteArgs{...} } 417 type RouteMapInput interface { 418 pulumi.Input 419 420 ToRouteMapOutput() RouteMapOutput 421 ToRouteMapOutputWithContext(context.Context) RouteMapOutput 422 } 423 424 type RouteMap map[string]RouteInput 425 426 func (RouteMap) ElementType() reflect.Type { 427 return reflect.TypeOf((*map[string]*Route)(nil)).Elem() 428 } 429 430 func (i RouteMap) ToRouteMapOutput() RouteMapOutput { 431 return i.ToRouteMapOutputWithContext(context.Background()) 432 } 433 434 func (i RouteMap) ToRouteMapOutputWithContext(ctx context.Context) RouteMapOutput { 435 return pulumi.ToOutputWithContext(ctx, i).(RouteMapOutput) 436 } 437 438 type RouteOutput struct{ *pulumi.OutputState } 439 440 func (RouteOutput) ElementType() reflect.Type { 441 return reflect.TypeOf((**Route)(nil)).Elem() 442 } 443 444 func (o RouteOutput) ToRouteOutput() RouteOutput { 445 return o 446 } 447 448 func (o RouteOutput) ToRouteOutputWithContext(ctx context.Context) RouteOutput { 449 return o 450 } 451 452 // Identifier of a carrier gateway. This attribute can only be used when the VPC contains a subnet which is associated with a Wavelength Zone. 453 func (o RouteOutput) CarrierGatewayId() pulumi.StringPtrOutput { 454 return o.ApplyT(func(v *Route) pulumi.StringPtrOutput { return v.CarrierGatewayId }).(pulumi.StringPtrOutput) 455 } 456 457 // The Amazon Resource Name (ARN) of a core network. 458 func (o RouteOutput) CoreNetworkArn() pulumi.StringPtrOutput { 459 return o.ApplyT(func(v *Route) pulumi.StringPtrOutput { return v.CoreNetworkArn }).(pulumi.StringPtrOutput) 460 } 461 462 // The destination CIDR block. 463 func (o RouteOutput) DestinationCidrBlock() pulumi.StringPtrOutput { 464 return o.ApplyT(func(v *Route) pulumi.StringPtrOutput { return v.DestinationCidrBlock }).(pulumi.StringPtrOutput) 465 } 466 467 // The destination IPv6 CIDR block. 468 func (o RouteOutput) DestinationIpv6CidrBlock() pulumi.StringPtrOutput { 469 return o.ApplyT(func(v *Route) pulumi.StringPtrOutput { return v.DestinationIpv6CidrBlock }).(pulumi.StringPtrOutput) 470 } 471 472 // The ID of a managed prefix list destination. 473 // 474 // One of the following target arguments must be supplied: 475 func (o RouteOutput) DestinationPrefixListId() pulumi.StringPtrOutput { 476 return o.ApplyT(func(v *Route) pulumi.StringPtrOutput { return v.DestinationPrefixListId }).(pulumi.StringPtrOutput) 477 } 478 479 // Identifier of a VPC Egress Only Internet Gateway. 480 func (o RouteOutput) EgressOnlyGatewayId() pulumi.StringPtrOutput { 481 return o.ApplyT(func(v *Route) pulumi.StringPtrOutput { return v.EgressOnlyGatewayId }).(pulumi.StringPtrOutput) 482 } 483 484 // Identifier of a VPC internet gateway or a virtual private gateway. Specify `local` when updating a previously imported local route. 485 func (o RouteOutput) GatewayId() pulumi.StringPtrOutput { 486 return o.ApplyT(func(v *Route) pulumi.StringPtrOutput { return v.GatewayId }).(pulumi.StringPtrOutput) 487 } 488 489 // Identifier of an EC2 instance. 490 func (o RouteOutput) InstanceId() pulumi.StringOutput { 491 return o.ApplyT(func(v *Route) pulumi.StringOutput { return v.InstanceId }).(pulumi.StringOutput) 492 } 493 494 // The AWS account ID of the owner of the EC2 instance. 495 func (o RouteOutput) InstanceOwnerId() pulumi.StringOutput { 496 return o.ApplyT(func(v *Route) pulumi.StringOutput { return v.InstanceOwnerId }).(pulumi.StringOutput) 497 } 498 499 // Identifier of a Outpost local gateway. 500 func (o RouteOutput) LocalGatewayId() pulumi.StringPtrOutput { 501 return o.ApplyT(func(v *Route) pulumi.StringPtrOutput { return v.LocalGatewayId }).(pulumi.StringPtrOutput) 502 } 503 504 // Identifier of a VPC NAT gateway. 505 func (o RouteOutput) NatGatewayId() pulumi.StringPtrOutput { 506 return o.ApplyT(func(v *Route) pulumi.StringPtrOutput { return v.NatGatewayId }).(pulumi.StringPtrOutput) 507 } 508 509 // Identifier of an EC2 network interface. 510 func (o RouteOutput) NetworkInterfaceId() pulumi.StringOutput { 511 return o.ApplyT(func(v *Route) pulumi.StringOutput { return v.NetworkInterfaceId }).(pulumi.StringOutput) 512 } 513 514 // How the route was created - `CreateRouteTable`, `CreateRoute` or `EnableVgwRoutePropagation`. 515 func (o RouteOutput) Origin() pulumi.StringOutput { 516 return o.ApplyT(func(v *Route) pulumi.StringOutput { return v.Origin }).(pulumi.StringOutput) 517 } 518 519 // The ID of the routing table. 520 // 521 // One of the following destination arguments must be supplied: 522 func (o RouteOutput) RouteTableId() pulumi.StringOutput { 523 return o.ApplyT(func(v *Route) pulumi.StringOutput { return v.RouteTableId }).(pulumi.StringOutput) 524 } 525 526 // The state of the route - `active` or `blackhole`. 527 func (o RouteOutput) State() pulumi.StringOutput { 528 return o.ApplyT(func(v *Route) pulumi.StringOutput { return v.State }).(pulumi.StringOutput) 529 } 530 531 // Identifier of an EC2 Transit Gateway. 532 func (o RouteOutput) TransitGatewayId() pulumi.StringPtrOutput { 533 return o.ApplyT(func(v *Route) pulumi.StringPtrOutput { return v.TransitGatewayId }).(pulumi.StringPtrOutput) 534 } 535 536 // Identifier of a VPC Endpoint. 537 func (o RouteOutput) VpcEndpointId() pulumi.StringPtrOutput { 538 return o.ApplyT(func(v *Route) pulumi.StringPtrOutput { return v.VpcEndpointId }).(pulumi.StringPtrOutput) 539 } 540 541 // Identifier of a VPC peering connection. 542 // 543 // Note that the default route, mapping the VPC's CIDR block to "local", is created implicitly and cannot be specified. 544 func (o RouteOutput) VpcPeeringConnectionId() pulumi.StringPtrOutput { 545 return o.ApplyT(func(v *Route) pulumi.StringPtrOutput { return v.VpcPeeringConnectionId }).(pulumi.StringPtrOutput) 546 } 547 548 type RouteArrayOutput struct{ *pulumi.OutputState } 549 550 func (RouteArrayOutput) ElementType() reflect.Type { 551 return reflect.TypeOf((*[]*Route)(nil)).Elem() 552 } 553 554 func (o RouteArrayOutput) ToRouteArrayOutput() RouteArrayOutput { 555 return o 556 } 557 558 func (o RouteArrayOutput) ToRouteArrayOutputWithContext(ctx context.Context) RouteArrayOutput { 559 return o 560 } 561 562 func (o RouteArrayOutput) Index(i pulumi.IntInput) RouteOutput { 563 return pulumi.All(o, i).ApplyT(func(vs []interface{}) *Route { 564 return vs[0].([]*Route)[vs[1].(int)] 565 }).(RouteOutput) 566 } 567 568 type RouteMapOutput struct{ *pulumi.OutputState } 569 570 func (RouteMapOutput) ElementType() reflect.Type { 571 return reflect.TypeOf((*map[string]*Route)(nil)).Elem() 572 } 573 574 func (o RouteMapOutput) ToRouteMapOutput() RouteMapOutput { 575 return o 576 } 577 578 func (o RouteMapOutput) ToRouteMapOutputWithContext(ctx context.Context) RouteMapOutput { 579 return o 580 } 581 582 func (o RouteMapOutput) MapIndex(k pulumi.StringInput) RouteOutput { 583 return pulumi.All(o, k).ApplyT(func(vs []interface{}) *Route { 584 return vs[0].(map[string]*Route)[vs[1].(string)] 585 }).(RouteOutput) 586 } 587 588 func init() { 589 pulumi.RegisterInputType(reflect.TypeOf((*RouteInput)(nil)).Elem(), &Route{}) 590 pulumi.RegisterInputType(reflect.TypeOf((*RouteArrayInput)(nil)).Elem(), RouteArray{}) 591 pulumi.RegisterInputType(reflect.TypeOf((*RouteMapInput)(nil)).Elem(), RouteMap{}) 592 pulumi.RegisterOutputType(RouteOutput{}) 593 pulumi.RegisterOutputType(RouteArrayOutput{}) 594 pulumi.RegisterOutputType(RouteMapOutput{}) 595 }