github.com/pulumi/pulumi-aws/sdk/v6@v6.32.0/go/aws/ec2/vpcPeeringConnection.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 manage a VPC peering connection. 16 // 17 // > **NOTE on VPC Peering Connections and VPC Peering Connection Options:** This provider provides 18 // both a standalone VPC Peering Connection Options and a VPC Peering Connection 19 // resource with `accepter` and `requester` attributes. Do not manage options for the same VPC peering 20 // connection in both a VPC Peering Connection resource and a VPC Peering Connection Options resource. 21 // Doing so will cause a conflict of options and will overwrite the options. 22 // Using a VPC Peering Connection Options resource decouples management of the connection options from 23 // management of the VPC Peering Connection and allows options to be set correctly in cross-account scenarios. 24 // 25 // > **Note:** For cross-account (requester's AWS account differs from the accepter's AWS account) or inter-region 26 // VPC Peering Connections use the `ec2.VpcPeeringConnection` resource to manage the requester's side of the 27 // connection and use the `ec2.VpcPeeringConnectionAccepter` resource to manage the accepter's side of the connection. 28 // 29 // > **Note:** Creating multiple `ec2.VpcPeeringConnection` resources with the same `peerVpcId` and `vpcId` will not produce an error. Instead, AWS will return the connection `id` that already exists, resulting in multiple `ec2.VpcPeeringConnection` resources with the same `id`. 30 // 31 // ## Example Usage 32 // 33 // <!--Start PulumiCodeChooser --> 34 // ```go 35 // package main 36 // 37 // import ( 38 // 39 // "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2" 40 // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 41 // 42 // ) 43 // 44 // func main() { 45 // pulumi.Run(func(ctx *pulumi.Context) error { 46 // _, err := ec2.NewVpcPeeringConnection(ctx, "foo", &ec2.VpcPeeringConnectionArgs{ 47 // PeerOwnerId: pulumi.Any(peerOwnerId), 48 // PeerVpcId: pulumi.Any(bar.Id), 49 // VpcId: pulumi.Any(fooAwsVpc.Id), 50 // }) 51 // if err != nil { 52 // return err 53 // } 54 // return nil 55 // }) 56 // } 57 // 58 // ``` 59 // <!--End PulumiCodeChooser --> 60 // 61 // Basic usage with connection options: 62 // 63 // <!--Start PulumiCodeChooser --> 64 // ```go 65 // package main 66 // 67 // import ( 68 // 69 // "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2" 70 // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 71 // 72 // ) 73 // 74 // func main() { 75 // pulumi.Run(func(ctx *pulumi.Context) error { 76 // _, err := ec2.NewVpcPeeringConnection(ctx, "foo", &ec2.VpcPeeringConnectionArgs{ 77 // PeerOwnerId: pulumi.Any(peerOwnerId), 78 // PeerVpcId: pulumi.Any(bar.Id), 79 // VpcId: pulumi.Any(fooAwsVpc.Id), 80 // Accepter: &ec2.VpcPeeringConnectionAccepterTypeArgs{ 81 // AllowRemoteVpcDnsResolution: pulumi.Bool(true), 82 // }, 83 // Requester: &ec2.VpcPeeringConnectionRequesterArgs{ 84 // AllowRemoteVpcDnsResolution: pulumi.Bool(true), 85 // }, 86 // }) 87 // if err != nil { 88 // return err 89 // } 90 // return nil 91 // }) 92 // } 93 // 94 // ``` 95 // <!--End PulumiCodeChooser --> 96 // 97 // Basic usage with tags: 98 // 99 // <!--Start PulumiCodeChooser --> 100 // ```go 101 // package main 102 // 103 // import ( 104 // 105 // "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2" 106 // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 107 // 108 // ) 109 // 110 // func main() { 111 // pulumi.Run(func(ctx *pulumi.Context) error { 112 // fooVpc, err := ec2.NewVpc(ctx, "foo", &ec2.VpcArgs{ 113 // CidrBlock: pulumi.String("10.1.0.0/16"), 114 // }) 115 // if err != nil { 116 // return err 117 // } 118 // bar, err := ec2.NewVpc(ctx, "bar", &ec2.VpcArgs{ 119 // CidrBlock: pulumi.String("10.2.0.0/16"), 120 // }) 121 // if err != nil { 122 // return err 123 // } 124 // _, err = ec2.NewVpcPeeringConnection(ctx, "foo", &ec2.VpcPeeringConnectionArgs{ 125 // PeerOwnerId: pulumi.Any(peerOwnerId), 126 // PeerVpcId: bar.ID(), 127 // VpcId: fooVpc.ID(), 128 // AutoAccept: pulumi.Bool(true), 129 // Tags: pulumi.StringMap{ 130 // "Name": pulumi.String("VPC Peering between foo and bar"), 131 // }, 132 // }) 133 // if err != nil { 134 // return err 135 // } 136 // return nil 137 // }) 138 // } 139 // 140 // ``` 141 // <!--End PulumiCodeChooser --> 142 // 143 // Basic usage with region: 144 // 145 // <!--Start PulumiCodeChooser --> 146 // ```go 147 // package main 148 // 149 // import ( 150 // 151 // "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2" 152 // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 153 // 154 // ) 155 // 156 // func main() { 157 // pulumi.Run(func(ctx *pulumi.Context) error { 158 // fooVpc, err := ec2.NewVpc(ctx, "foo", &ec2.VpcArgs{ 159 // CidrBlock: pulumi.String("10.1.0.0/16"), 160 // }) 161 // if err != nil { 162 // return err 163 // } 164 // bar, err := ec2.NewVpc(ctx, "bar", &ec2.VpcArgs{ 165 // CidrBlock: pulumi.String("10.2.0.0/16"), 166 // }) 167 // if err != nil { 168 // return err 169 // } 170 // _, err = ec2.NewVpcPeeringConnection(ctx, "foo", &ec2.VpcPeeringConnectionArgs{ 171 // PeerOwnerId: pulumi.Any(peerOwnerId), 172 // PeerVpcId: bar.ID(), 173 // VpcId: fooVpc.ID(), 174 // PeerRegion: pulumi.String("us-east-1"), 175 // }) 176 // if err != nil { 177 // return err 178 // } 179 // return nil 180 // }) 181 // } 182 // 183 // ``` 184 // <!--End PulumiCodeChooser --> 185 // 186 // ## Notes 187 // 188 // If both VPCs are not in the same AWS account and region do not enable the `autoAccept` attribute. 189 // The accepter can manage its side of the connection using the `ec2.VpcPeeringConnectionAccepter` resource 190 // or accept the connection manually using the AWS Management Console, AWS CLI, through SDKs, etc. 191 // 192 // ## Import 193 // 194 // Using `pulumi import`, import VPC Peering resources using the VPC peering `id`. For example: 195 // 196 // ```sh 197 // $ pulumi import aws:ec2/vpcPeeringConnection:VpcPeeringConnection test_connection pcx-111aaa111 198 // ``` 199 type VpcPeeringConnection struct { 200 pulumi.CustomResourceState 201 202 // The status of the VPC Peering Connection request. 203 AcceptStatus pulumi.StringOutput `pulumi:"acceptStatus"` 204 // An optional configuration block that allows for [VPC Peering Connection](https://docs.aws.amazon.com/vpc/latest/peering/what-is-vpc-peering.html) options to be set for the VPC that accepts 205 // the peering connection (a maximum of one). 206 Accepter VpcPeeringConnectionAccepterTypeOutput `pulumi:"accepter"` 207 // Accept the peering (both VPCs need to be in the same AWS account and region). 208 AutoAccept pulumi.BoolPtrOutput `pulumi:"autoAccept"` 209 // The AWS account ID of the target peer VPC. 210 // Defaults to the account ID the [AWS provider][1] is currently connected to, so must be managed if connecting cross-account. 211 PeerOwnerId pulumi.StringOutput `pulumi:"peerOwnerId"` 212 // The region of the accepter VPC of the VPC Peering Connection. `autoAccept` must be `false`, 213 // and use the `ec2.VpcPeeringConnectionAccepter` to manage the accepter side. 214 PeerRegion pulumi.StringOutput `pulumi:"peerRegion"` 215 // The ID of the target VPC with which you are creating the VPC Peering Connection. 216 PeerVpcId pulumi.StringOutput `pulumi:"peerVpcId"` 217 // A optional configuration block that allows for [VPC Peering Connection](https://docs.aws.amazon.com/vpc/latest/peering/what-is-vpc-peering.html) options to be set for the VPC that requests 218 // the peering connection (a maximum of one). 219 Requester VpcPeeringConnectionRequesterOutput `pulumi:"requester"` 220 // A map of tags to assign to the resource. .If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 221 Tags pulumi.StringMapOutput `pulumi:"tags"` 222 // A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. 223 // 224 // Deprecated: Please use `tags` instead. 225 TagsAll pulumi.StringMapOutput `pulumi:"tagsAll"` 226 // The ID of the requester VPC. 227 VpcId pulumi.StringOutput `pulumi:"vpcId"` 228 } 229 230 // NewVpcPeeringConnection registers a new resource with the given unique name, arguments, and options. 231 func NewVpcPeeringConnection(ctx *pulumi.Context, 232 name string, args *VpcPeeringConnectionArgs, opts ...pulumi.ResourceOption) (*VpcPeeringConnection, error) { 233 if args == nil { 234 return nil, errors.New("missing one or more required arguments") 235 } 236 237 if args.PeerVpcId == nil { 238 return nil, errors.New("invalid value for required argument 'PeerVpcId'") 239 } 240 if args.VpcId == nil { 241 return nil, errors.New("invalid value for required argument 'VpcId'") 242 } 243 opts = internal.PkgResourceDefaultOpts(opts) 244 var resource VpcPeeringConnection 245 err := ctx.RegisterResource("aws:ec2/vpcPeeringConnection:VpcPeeringConnection", name, args, &resource, opts...) 246 if err != nil { 247 return nil, err 248 } 249 return &resource, nil 250 } 251 252 // GetVpcPeeringConnection gets an existing VpcPeeringConnection resource's state with the given name, ID, and optional 253 // state properties that are used to uniquely qualify the lookup (nil if not required). 254 func GetVpcPeeringConnection(ctx *pulumi.Context, 255 name string, id pulumi.IDInput, state *VpcPeeringConnectionState, opts ...pulumi.ResourceOption) (*VpcPeeringConnection, error) { 256 var resource VpcPeeringConnection 257 err := ctx.ReadResource("aws:ec2/vpcPeeringConnection:VpcPeeringConnection", name, id, state, &resource, opts...) 258 if err != nil { 259 return nil, err 260 } 261 return &resource, nil 262 } 263 264 // Input properties used for looking up and filtering VpcPeeringConnection resources. 265 type vpcPeeringConnectionState struct { 266 // The status of the VPC Peering Connection request. 267 AcceptStatus *string `pulumi:"acceptStatus"` 268 // An optional configuration block that allows for [VPC Peering Connection](https://docs.aws.amazon.com/vpc/latest/peering/what-is-vpc-peering.html) options to be set for the VPC that accepts 269 // the peering connection (a maximum of one). 270 Accepter *VpcPeeringConnectionAccepterType `pulumi:"accepter"` 271 // Accept the peering (both VPCs need to be in the same AWS account and region). 272 AutoAccept *bool `pulumi:"autoAccept"` 273 // The AWS account ID of the target peer VPC. 274 // Defaults to the account ID the [AWS provider][1] is currently connected to, so must be managed if connecting cross-account. 275 PeerOwnerId *string `pulumi:"peerOwnerId"` 276 // The region of the accepter VPC of the VPC Peering Connection. `autoAccept` must be `false`, 277 // and use the `ec2.VpcPeeringConnectionAccepter` to manage the accepter side. 278 PeerRegion *string `pulumi:"peerRegion"` 279 // The ID of the target VPC with which you are creating the VPC Peering Connection. 280 PeerVpcId *string `pulumi:"peerVpcId"` 281 // A optional configuration block that allows for [VPC Peering Connection](https://docs.aws.amazon.com/vpc/latest/peering/what-is-vpc-peering.html) options to be set for the VPC that requests 282 // the peering connection (a maximum of one). 283 Requester *VpcPeeringConnectionRequester `pulumi:"requester"` 284 // A map of tags to assign to the resource. .If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 285 Tags map[string]string `pulumi:"tags"` 286 // A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. 287 // 288 // Deprecated: Please use `tags` instead. 289 TagsAll map[string]string `pulumi:"tagsAll"` 290 // The ID of the requester VPC. 291 VpcId *string `pulumi:"vpcId"` 292 } 293 294 type VpcPeeringConnectionState struct { 295 // The status of the VPC Peering Connection request. 296 AcceptStatus pulumi.StringPtrInput 297 // An optional configuration block that allows for [VPC Peering Connection](https://docs.aws.amazon.com/vpc/latest/peering/what-is-vpc-peering.html) options to be set for the VPC that accepts 298 // the peering connection (a maximum of one). 299 Accepter VpcPeeringConnectionAccepterTypePtrInput 300 // Accept the peering (both VPCs need to be in the same AWS account and region). 301 AutoAccept pulumi.BoolPtrInput 302 // The AWS account ID of the target peer VPC. 303 // Defaults to the account ID the [AWS provider][1] is currently connected to, so must be managed if connecting cross-account. 304 PeerOwnerId pulumi.StringPtrInput 305 // The region of the accepter VPC of the VPC Peering Connection. `autoAccept` must be `false`, 306 // and use the `ec2.VpcPeeringConnectionAccepter` to manage the accepter side. 307 PeerRegion pulumi.StringPtrInput 308 // The ID of the target VPC with which you are creating the VPC Peering Connection. 309 PeerVpcId pulumi.StringPtrInput 310 // A optional configuration block that allows for [VPC Peering Connection](https://docs.aws.amazon.com/vpc/latest/peering/what-is-vpc-peering.html) options to be set for the VPC that requests 311 // the peering connection (a maximum of one). 312 Requester VpcPeeringConnectionRequesterPtrInput 313 // A map of tags to assign to the resource. .If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 314 Tags pulumi.StringMapInput 315 // A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. 316 // 317 // Deprecated: Please use `tags` instead. 318 TagsAll pulumi.StringMapInput 319 // The ID of the requester VPC. 320 VpcId pulumi.StringPtrInput 321 } 322 323 func (VpcPeeringConnectionState) ElementType() reflect.Type { 324 return reflect.TypeOf((*vpcPeeringConnectionState)(nil)).Elem() 325 } 326 327 type vpcPeeringConnectionArgs struct { 328 // An optional configuration block that allows for [VPC Peering Connection](https://docs.aws.amazon.com/vpc/latest/peering/what-is-vpc-peering.html) options to be set for the VPC that accepts 329 // the peering connection (a maximum of one). 330 Accepter *VpcPeeringConnectionAccepterType `pulumi:"accepter"` 331 // Accept the peering (both VPCs need to be in the same AWS account and region). 332 AutoAccept *bool `pulumi:"autoAccept"` 333 // The AWS account ID of the target peer VPC. 334 // Defaults to the account ID the [AWS provider][1] is currently connected to, so must be managed if connecting cross-account. 335 PeerOwnerId *string `pulumi:"peerOwnerId"` 336 // The region of the accepter VPC of the VPC Peering Connection. `autoAccept` must be `false`, 337 // and use the `ec2.VpcPeeringConnectionAccepter` to manage the accepter side. 338 PeerRegion *string `pulumi:"peerRegion"` 339 // The ID of the target VPC with which you are creating the VPC Peering Connection. 340 PeerVpcId string `pulumi:"peerVpcId"` 341 // A optional configuration block that allows for [VPC Peering Connection](https://docs.aws.amazon.com/vpc/latest/peering/what-is-vpc-peering.html) options to be set for the VPC that requests 342 // the peering connection (a maximum of one). 343 Requester *VpcPeeringConnectionRequester `pulumi:"requester"` 344 // A map of tags to assign to the resource. .If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 345 Tags map[string]string `pulumi:"tags"` 346 // The ID of the requester VPC. 347 VpcId string `pulumi:"vpcId"` 348 } 349 350 // The set of arguments for constructing a VpcPeeringConnection resource. 351 type VpcPeeringConnectionArgs struct { 352 // An optional configuration block that allows for [VPC Peering Connection](https://docs.aws.amazon.com/vpc/latest/peering/what-is-vpc-peering.html) options to be set for the VPC that accepts 353 // the peering connection (a maximum of one). 354 Accepter VpcPeeringConnectionAccepterTypePtrInput 355 // Accept the peering (both VPCs need to be in the same AWS account and region). 356 AutoAccept pulumi.BoolPtrInput 357 // The AWS account ID of the target peer VPC. 358 // Defaults to the account ID the [AWS provider][1] is currently connected to, so must be managed if connecting cross-account. 359 PeerOwnerId pulumi.StringPtrInput 360 // The region of the accepter VPC of the VPC Peering Connection. `autoAccept` must be `false`, 361 // and use the `ec2.VpcPeeringConnectionAccepter` to manage the accepter side. 362 PeerRegion pulumi.StringPtrInput 363 // The ID of the target VPC with which you are creating the VPC Peering Connection. 364 PeerVpcId pulumi.StringInput 365 // A optional configuration block that allows for [VPC Peering Connection](https://docs.aws.amazon.com/vpc/latest/peering/what-is-vpc-peering.html) options to be set for the VPC that requests 366 // the peering connection (a maximum of one). 367 Requester VpcPeeringConnectionRequesterPtrInput 368 // A map of tags to assign to the resource. .If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 369 Tags pulumi.StringMapInput 370 // The ID of the requester VPC. 371 VpcId pulumi.StringInput 372 } 373 374 func (VpcPeeringConnectionArgs) ElementType() reflect.Type { 375 return reflect.TypeOf((*vpcPeeringConnectionArgs)(nil)).Elem() 376 } 377 378 type VpcPeeringConnectionInput interface { 379 pulumi.Input 380 381 ToVpcPeeringConnectionOutput() VpcPeeringConnectionOutput 382 ToVpcPeeringConnectionOutputWithContext(ctx context.Context) VpcPeeringConnectionOutput 383 } 384 385 func (*VpcPeeringConnection) ElementType() reflect.Type { 386 return reflect.TypeOf((**VpcPeeringConnection)(nil)).Elem() 387 } 388 389 func (i *VpcPeeringConnection) ToVpcPeeringConnectionOutput() VpcPeeringConnectionOutput { 390 return i.ToVpcPeeringConnectionOutputWithContext(context.Background()) 391 } 392 393 func (i *VpcPeeringConnection) ToVpcPeeringConnectionOutputWithContext(ctx context.Context) VpcPeeringConnectionOutput { 394 return pulumi.ToOutputWithContext(ctx, i).(VpcPeeringConnectionOutput) 395 } 396 397 // VpcPeeringConnectionArrayInput is an input type that accepts VpcPeeringConnectionArray and VpcPeeringConnectionArrayOutput values. 398 // You can construct a concrete instance of `VpcPeeringConnectionArrayInput` via: 399 // 400 // VpcPeeringConnectionArray{ VpcPeeringConnectionArgs{...} } 401 type VpcPeeringConnectionArrayInput interface { 402 pulumi.Input 403 404 ToVpcPeeringConnectionArrayOutput() VpcPeeringConnectionArrayOutput 405 ToVpcPeeringConnectionArrayOutputWithContext(context.Context) VpcPeeringConnectionArrayOutput 406 } 407 408 type VpcPeeringConnectionArray []VpcPeeringConnectionInput 409 410 func (VpcPeeringConnectionArray) ElementType() reflect.Type { 411 return reflect.TypeOf((*[]*VpcPeeringConnection)(nil)).Elem() 412 } 413 414 func (i VpcPeeringConnectionArray) ToVpcPeeringConnectionArrayOutput() VpcPeeringConnectionArrayOutput { 415 return i.ToVpcPeeringConnectionArrayOutputWithContext(context.Background()) 416 } 417 418 func (i VpcPeeringConnectionArray) ToVpcPeeringConnectionArrayOutputWithContext(ctx context.Context) VpcPeeringConnectionArrayOutput { 419 return pulumi.ToOutputWithContext(ctx, i).(VpcPeeringConnectionArrayOutput) 420 } 421 422 // VpcPeeringConnectionMapInput is an input type that accepts VpcPeeringConnectionMap and VpcPeeringConnectionMapOutput values. 423 // You can construct a concrete instance of `VpcPeeringConnectionMapInput` via: 424 // 425 // VpcPeeringConnectionMap{ "key": VpcPeeringConnectionArgs{...} } 426 type VpcPeeringConnectionMapInput interface { 427 pulumi.Input 428 429 ToVpcPeeringConnectionMapOutput() VpcPeeringConnectionMapOutput 430 ToVpcPeeringConnectionMapOutputWithContext(context.Context) VpcPeeringConnectionMapOutput 431 } 432 433 type VpcPeeringConnectionMap map[string]VpcPeeringConnectionInput 434 435 func (VpcPeeringConnectionMap) ElementType() reflect.Type { 436 return reflect.TypeOf((*map[string]*VpcPeeringConnection)(nil)).Elem() 437 } 438 439 func (i VpcPeeringConnectionMap) ToVpcPeeringConnectionMapOutput() VpcPeeringConnectionMapOutput { 440 return i.ToVpcPeeringConnectionMapOutputWithContext(context.Background()) 441 } 442 443 func (i VpcPeeringConnectionMap) ToVpcPeeringConnectionMapOutputWithContext(ctx context.Context) VpcPeeringConnectionMapOutput { 444 return pulumi.ToOutputWithContext(ctx, i).(VpcPeeringConnectionMapOutput) 445 } 446 447 type VpcPeeringConnectionOutput struct{ *pulumi.OutputState } 448 449 func (VpcPeeringConnectionOutput) ElementType() reflect.Type { 450 return reflect.TypeOf((**VpcPeeringConnection)(nil)).Elem() 451 } 452 453 func (o VpcPeeringConnectionOutput) ToVpcPeeringConnectionOutput() VpcPeeringConnectionOutput { 454 return o 455 } 456 457 func (o VpcPeeringConnectionOutput) ToVpcPeeringConnectionOutputWithContext(ctx context.Context) VpcPeeringConnectionOutput { 458 return o 459 } 460 461 // The status of the VPC Peering Connection request. 462 func (o VpcPeeringConnectionOutput) AcceptStatus() pulumi.StringOutput { 463 return o.ApplyT(func(v *VpcPeeringConnection) pulumi.StringOutput { return v.AcceptStatus }).(pulumi.StringOutput) 464 } 465 466 // An optional configuration block that allows for [VPC Peering Connection](https://docs.aws.amazon.com/vpc/latest/peering/what-is-vpc-peering.html) options to be set for the VPC that accepts 467 // the peering connection (a maximum of one). 468 func (o VpcPeeringConnectionOutput) Accepter() VpcPeeringConnectionAccepterTypeOutput { 469 return o.ApplyT(func(v *VpcPeeringConnection) VpcPeeringConnectionAccepterTypeOutput { return v.Accepter }).(VpcPeeringConnectionAccepterTypeOutput) 470 } 471 472 // Accept the peering (both VPCs need to be in the same AWS account and region). 473 func (o VpcPeeringConnectionOutput) AutoAccept() pulumi.BoolPtrOutput { 474 return o.ApplyT(func(v *VpcPeeringConnection) pulumi.BoolPtrOutput { return v.AutoAccept }).(pulumi.BoolPtrOutput) 475 } 476 477 // The AWS account ID of the target peer VPC. 478 // Defaults to the account ID the [AWS provider][1] is currently connected to, so must be managed if connecting cross-account. 479 func (o VpcPeeringConnectionOutput) PeerOwnerId() pulumi.StringOutput { 480 return o.ApplyT(func(v *VpcPeeringConnection) pulumi.StringOutput { return v.PeerOwnerId }).(pulumi.StringOutput) 481 } 482 483 // The region of the accepter VPC of the VPC Peering Connection. `autoAccept` must be `false`, 484 // and use the `ec2.VpcPeeringConnectionAccepter` to manage the accepter side. 485 func (o VpcPeeringConnectionOutput) PeerRegion() pulumi.StringOutput { 486 return o.ApplyT(func(v *VpcPeeringConnection) pulumi.StringOutput { return v.PeerRegion }).(pulumi.StringOutput) 487 } 488 489 // The ID of the target VPC with which you are creating the VPC Peering Connection. 490 func (o VpcPeeringConnectionOutput) PeerVpcId() pulumi.StringOutput { 491 return o.ApplyT(func(v *VpcPeeringConnection) pulumi.StringOutput { return v.PeerVpcId }).(pulumi.StringOutput) 492 } 493 494 // A optional configuration block that allows for [VPC Peering Connection](https://docs.aws.amazon.com/vpc/latest/peering/what-is-vpc-peering.html) options to be set for the VPC that requests 495 // the peering connection (a maximum of one). 496 func (o VpcPeeringConnectionOutput) Requester() VpcPeeringConnectionRequesterOutput { 497 return o.ApplyT(func(v *VpcPeeringConnection) VpcPeeringConnectionRequesterOutput { return v.Requester }).(VpcPeeringConnectionRequesterOutput) 498 } 499 500 // A map of tags to assign to the resource. .If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 501 func (o VpcPeeringConnectionOutput) Tags() pulumi.StringMapOutput { 502 return o.ApplyT(func(v *VpcPeeringConnection) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput) 503 } 504 505 // A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. 506 // 507 // Deprecated: Please use `tags` instead. 508 func (o VpcPeeringConnectionOutput) TagsAll() pulumi.StringMapOutput { 509 return o.ApplyT(func(v *VpcPeeringConnection) pulumi.StringMapOutput { return v.TagsAll }).(pulumi.StringMapOutput) 510 } 511 512 // The ID of the requester VPC. 513 func (o VpcPeeringConnectionOutput) VpcId() pulumi.StringOutput { 514 return o.ApplyT(func(v *VpcPeeringConnection) pulumi.StringOutput { return v.VpcId }).(pulumi.StringOutput) 515 } 516 517 type VpcPeeringConnectionArrayOutput struct{ *pulumi.OutputState } 518 519 func (VpcPeeringConnectionArrayOutput) ElementType() reflect.Type { 520 return reflect.TypeOf((*[]*VpcPeeringConnection)(nil)).Elem() 521 } 522 523 func (o VpcPeeringConnectionArrayOutput) ToVpcPeeringConnectionArrayOutput() VpcPeeringConnectionArrayOutput { 524 return o 525 } 526 527 func (o VpcPeeringConnectionArrayOutput) ToVpcPeeringConnectionArrayOutputWithContext(ctx context.Context) VpcPeeringConnectionArrayOutput { 528 return o 529 } 530 531 func (o VpcPeeringConnectionArrayOutput) Index(i pulumi.IntInput) VpcPeeringConnectionOutput { 532 return pulumi.All(o, i).ApplyT(func(vs []interface{}) *VpcPeeringConnection { 533 return vs[0].([]*VpcPeeringConnection)[vs[1].(int)] 534 }).(VpcPeeringConnectionOutput) 535 } 536 537 type VpcPeeringConnectionMapOutput struct{ *pulumi.OutputState } 538 539 func (VpcPeeringConnectionMapOutput) ElementType() reflect.Type { 540 return reflect.TypeOf((*map[string]*VpcPeeringConnection)(nil)).Elem() 541 } 542 543 func (o VpcPeeringConnectionMapOutput) ToVpcPeeringConnectionMapOutput() VpcPeeringConnectionMapOutput { 544 return o 545 } 546 547 func (o VpcPeeringConnectionMapOutput) ToVpcPeeringConnectionMapOutputWithContext(ctx context.Context) VpcPeeringConnectionMapOutput { 548 return o 549 } 550 551 func (o VpcPeeringConnectionMapOutput) MapIndex(k pulumi.StringInput) VpcPeeringConnectionOutput { 552 return pulumi.All(o, k).ApplyT(func(vs []interface{}) *VpcPeeringConnection { 553 return vs[0].(map[string]*VpcPeeringConnection)[vs[1].(string)] 554 }).(VpcPeeringConnectionOutput) 555 } 556 557 func init() { 558 pulumi.RegisterInputType(reflect.TypeOf((*VpcPeeringConnectionInput)(nil)).Elem(), &VpcPeeringConnection{}) 559 pulumi.RegisterInputType(reflect.TypeOf((*VpcPeeringConnectionArrayInput)(nil)).Elem(), VpcPeeringConnectionArray{}) 560 pulumi.RegisterInputType(reflect.TypeOf((*VpcPeeringConnectionMapInput)(nil)).Elem(), VpcPeeringConnectionMap{}) 561 pulumi.RegisterOutputType(VpcPeeringConnectionOutput{}) 562 pulumi.RegisterOutputType(VpcPeeringConnectionArrayOutput{}) 563 pulumi.RegisterOutputType(VpcPeeringConnectionMapOutput{}) 564 }