github.com/pulumi/pulumi-aws/sdk/v6@v6.32.0/go/aws/ec2/vpcEndpoint.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 VPC Endpoint resource. 16 // 17 // > **NOTE on VPC Endpoints and VPC Endpoint Associations:** The provider provides both standalone VPC Endpoint Associations for 18 // Route Tables - (an association between a VPC endpoint and a single `routeTableId`), 19 // Security Groups - (an association between a VPC endpoint and a single `securityGroupId`), 20 // and Subnets - (an association between a VPC endpoint and a single `subnetId`) and 21 // a VPC Endpoint resource with `routeTableIds` and `subnetIds` attributes. 22 // Do not use the same resource ID in both a VPC Endpoint resource and a VPC Endpoint Association resource. 23 // Doing so will cause a conflict of associations and will overwrite the association. 24 // 25 // ## Example Usage 26 // 27 // ### Basic 28 // 29 // <!--Start PulumiCodeChooser --> 30 // ```go 31 // package main 32 // 33 // import ( 34 // 35 // "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2" 36 // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 37 // 38 // ) 39 // 40 // func main() { 41 // pulumi.Run(func(ctx *pulumi.Context) error { 42 // _, err := ec2.NewVpcEndpoint(ctx, "s3", &ec2.VpcEndpointArgs{ 43 // VpcId: pulumi.Any(main.Id), 44 // ServiceName: pulumi.String("com.amazonaws.us-west-2.s3"), 45 // }) 46 // if err != nil { 47 // return err 48 // } 49 // return nil 50 // }) 51 // } 52 // 53 // ``` 54 // <!--End PulumiCodeChooser --> 55 // 56 // ### Basic w/ Tags 57 // 58 // <!--Start PulumiCodeChooser --> 59 // ```go 60 // package main 61 // 62 // import ( 63 // 64 // "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2" 65 // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 66 // 67 // ) 68 // 69 // func main() { 70 // pulumi.Run(func(ctx *pulumi.Context) error { 71 // _, err := ec2.NewVpcEndpoint(ctx, "s3", &ec2.VpcEndpointArgs{ 72 // VpcId: pulumi.Any(main.Id), 73 // ServiceName: pulumi.String("com.amazonaws.us-west-2.s3"), 74 // Tags: pulumi.StringMap{ 75 // "Environment": pulumi.String("test"), 76 // }, 77 // }) 78 // if err != nil { 79 // return err 80 // } 81 // return nil 82 // }) 83 // } 84 // 85 // ``` 86 // <!--End PulumiCodeChooser --> 87 // 88 // ### Interface Endpoint Type 89 // 90 // <!--Start PulumiCodeChooser --> 91 // ```go 92 // package main 93 // 94 // import ( 95 // 96 // "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2" 97 // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 98 // 99 // ) 100 // 101 // func main() { 102 // pulumi.Run(func(ctx *pulumi.Context) error { 103 // _, err := ec2.NewVpcEndpoint(ctx, "ec2", &ec2.VpcEndpointArgs{ 104 // VpcId: pulumi.Any(main.Id), 105 // ServiceName: pulumi.String("com.amazonaws.us-west-2.ec2"), 106 // VpcEndpointType: pulumi.String("Interface"), 107 // SecurityGroupIds: pulumi.StringArray{ 108 // sg1.Id, 109 // }, 110 // PrivateDnsEnabled: pulumi.Bool(true), 111 // }) 112 // if err != nil { 113 // return err 114 // } 115 // return nil 116 // }) 117 // } 118 // 119 // ``` 120 // <!--End PulumiCodeChooser --> 121 // 122 // ### Gateway Load Balancer Endpoint Type 123 // 124 // <!--Start PulumiCodeChooser --> 125 // ```go 126 // package main 127 // 128 // import ( 129 // 130 // "github.com/pulumi/pulumi-aws/sdk/v6/go/aws" 131 // "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2" 132 // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 133 // 134 // ) 135 // 136 // func main() { 137 // pulumi.Run(func(ctx *pulumi.Context) error { 138 // current, err := aws.GetCallerIdentity(ctx, nil, nil) 139 // if err != nil { 140 // return err 141 // } 142 // example, err := ec2.NewVpcEndpointService(ctx, "example", &ec2.VpcEndpointServiceArgs{ 143 // AcceptanceRequired: pulumi.Bool(false), 144 // AllowedPrincipals: pulumi.StringArray{ 145 // pulumi.String(current.Arn), 146 // }, 147 // GatewayLoadBalancerArns: pulumi.StringArray{ 148 // exampleAwsLb.Arn, 149 // }, 150 // }) 151 // if err != nil { 152 // return err 153 // } 154 // _, err = ec2.NewVpcEndpoint(ctx, "example", &ec2.VpcEndpointArgs{ 155 // ServiceName: example.ServiceName, 156 // SubnetIds: pulumi.StringArray{ 157 // exampleAwsSubnet.Id, 158 // }, 159 // VpcEndpointType: example.ServiceType, 160 // VpcId: pulumi.Any(exampleAwsVpc.Id), 161 // }) 162 // if err != nil { 163 // return err 164 // } 165 // return nil 166 // }) 167 // } 168 // 169 // ``` 170 // <!--End PulumiCodeChooser --> 171 // 172 // ## Import 173 // 174 // Using `pulumi import`, import VPC Endpoints using the VPC endpoint `id`. For example: 175 // 176 // ```sh 177 // $ pulumi import aws:ec2/vpcEndpoint:VpcEndpoint endpoint1 vpce-3ecf2a57 178 // ``` 179 type VpcEndpoint struct { 180 pulumi.CustomResourceState 181 182 // The Amazon Resource Name (ARN) of the VPC endpoint. 183 Arn pulumi.StringOutput `pulumi:"arn"` 184 // Accept the VPC endpoint (the VPC endpoint and service need to be in the same AWS account). 185 AutoAccept pulumi.BoolPtrOutput `pulumi:"autoAccept"` 186 // The list of CIDR blocks for the exposed AWS service. Applicable for endpoints of type `Gateway`. 187 CidrBlocks pulumi.StringArrayOutput `pulumi:"cidrBlocks"` 188 // The DNS entries for the VPC Endpoint. Applicable for endpoints of type `Interface`. DNS blocks are documented below. 189 DnsEntries VpcEndpointDnsEntryArrayOutput `pulumi:"dnsEntries"` 190 // The DNS options for the endpoint. See dnsOptions below. 191 DnsOptions VpcEndpointDnsOptionsOutput `pulumi:"dnsOptions"` 192 // The IP address type for the endpoint. Valid values are `ipv4`, `dualstack`, and `ipv6`. 193 IpAddressType pulumi.StringOutput `pulumi:"ipAddressType"` 194 // One or more network interfaces for the VPC Endpoint. Applicable for endpoints of type `Interface`. 195 NetworkInterfaceIds pulumi.StringArrayOutput `pulumi:"networkInterfaceIds"` 196 // The ID of the AWS account that owns the VPC endpoint. 197 OwnerId pulumi.StringOutput `pulumi:"ownerId"` 198 // A policy to attach to the endpoint that controls access to the service. This is a JSON formatted string. Defaults to full access. All `Gateway` and some `Interface` endpoints support policies - see the [relevant AWS documentation](https://docs.aws.amazon.com/vpc/latest/userguide/vpc-endpoints-access.html) for more details. 199 Policy pulumi.StringOutput `pulumi:"policy"` 200 // The prefix list ID of the exposed AWS service. Applicable for endpoints of type `Gateway`. 201 PrefixListId pulumi.StringOutput `pulumi:"prefixListId"` 202 // Whether or not to associate a private hosted zone with the specified VPC. Applicable for endpoints of type `Interface`. Most users will want this enabled to allow services within the VPC to automatically use the endpoint. 203 // Defaults to `false`. 204 PrivateDnsEnabled pulumi.BoolPtrOutput `pulumi:"privateDnsEnabled"` 205 // Whether or not the VPC Endpoint is being managed by its service - `true` or `false`. 206 RequesterManaged pulumi.BoolOutput `pulumi:"requesterManaged"` 207 // One or more route table IDs. Applicable for endpoints of type `Gateway`. 208 RouteTableIds pulumi.StringArrayOutput `pulumi:"routeTableIds"` 209 // The ID of one or more security groups to associate with the network interface. Applicable for endpoints of type `Interface`. 210 // If no security groups are specified, the VPC's [default security group](https://docs.aws.amazon.com/vpc/latest/userguide/VPC_SecurityGroups.html#DefaultSecurityGroup) is associated with the endpoint. 211 SecurityGroupIds pulumi.StringArrayOutput `pulumi:"securityGroupIds"` 212 // The service name. For AWS services the service name is usually in the form `com.amazonaws.<region>.<service>` (the SageMaker Notebook service is an exception to this rule, the service name is in the form `aws.sagemaker.<region>.notebook`). 213 ServiceName pulumi.StringOutput `pulumi:"serviceName"` 214 // The state of the VPC endpoint. 215 State pulumi.StringOutput `pulumi:"state"` 216 // The ID of one or more subnets in which to create a network interface for the endpoint. Applicable for endpoints of type `GatewayLoadBalancer` and `Interface`. Interface type endpoints cannot function without being assigned to a subnet. 217 SubnetIds pulumi.StringArrayOutput `pulumi:"subnetIds"` 218 // 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. 219 Tags pulumi.StringMapOutput `pulumi:"tags"` 220 // A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. 221 // 222 // Deprecated: Please use `tags` instead. 223 TagsAll pulumi.StringMapOutput `pulumi:"tagsAll"` 224 // The VPC endpoint type, `Gateway`, `GatewayLoadBalancer`, or `Interface`. Defaults to `Gateway`. 225 VpcEndpointType pulumi.StringPtrOutput `pulumi:"vpcEndpointType"` 226 // The ID of the VPC in which the endpoint will be used. 227 VpcId pulumi.StringOutput `pulumi:"vpcId"` 228 } 229 230 // NewVpcEndpoint registers a new resource with the given unique name, arguments, and options. 231 func NewVpcEndpoint(ctx *pulumi.Context, 232 name string, args *VpcEndpointArgs, opts ...pulumi.ResourceOption) (*VpcEndpoint, error) { 233 if args == nil { 234 return nil, errors.New("missing one or more required arguments") 235 } 236 237 if args.ServiceName == nil { 238 return nil, errors.New("invalid value for required argument 'ServiceName'") 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 VpcEndpoint 245 err := ctx.RegisterResource("aws:ec2/vpcEndpoint:VpcEndpoint", name, args, &resource, opts...) 246 if err != nil { 247 return nil, err 248 } 249 return &resource, nil 250 } 251 252 // GetVpcEndpoint gets an existing VpcEndpoint 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 GetVpcEndpoint(ctx *pulumi.Context, 255 name string, id pulumi.IDInput, state *VpcEndpointState, opts ...pulumi.ResourceOption) (*VpcEndpoint, error) { 256 var resource VpcEndpoint 257 err := ctx.ReadResource("aws:ec2/vpcEndpoint:VpcEndpoint", 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 VpcEndpoint resources. 265 type vpcEndpointState struct { 266 // The Amazon Resource Name (ARN) of the VPC endpoint. 267 Arn *string `pulumi:"arn"` 268 // Accept the VPC endpoint (the VPC endpoint and service need to be in the same AWS account). 269 AutoAccept *bool `pulumi:"autoAccept"` 270 // The list of CIDR blocks for the exposed AWS service. Applicable for endpoints of type `Gateway`. 271 CidrBlocks []string `pulumi:"cidrBlocks"` 272 // The DNS entries for the VPC Endpoint. Applicable for endpoints of type `Interface`. DNS blocks are documented below. 273 DnsEntries []VpcEndpointDnsEntry `pulumi:"dnsEntries"` 274 // The DNS options for the endpoint. See dnsOptions below. 275 DnsOptions *VpcEndpointDnsOptions `pulumi:"dnsOptions"` 276 // The IP address type for the endpoint. Valid values are `ipv4`, `dualstack`, and `ipv6`. 277 IpAddressType *string `pulumi:"ipAddressType"` 278 // One or more network interfaces for the VPC Endpoint. Applicable for endpoints of type `Interface`. 279 NetworkInterfaceIds []string `pulumi:"networkInterfaceIds"` 280 // The ID of the AWS account that owns the VPC endpoint. 281 OwnerId *string `pulumi:"ownerId"` 282 // A policy to attach to the endpoint that controls access to the service. This is a JSON formatted string. Defaults to full access. All `Gateway` and some `Interface` endpoints support policies - see the [relevant AWS documentation](https://docs.aws.amazon.com/vpc/latest/userguide/vpc-endpoints-access.html) for more details. 283 Policy *string `pulumi:"policy"` 284 // The prefix list ID of the exposed AWS service. Applicable for endpoints of type `Gateway`. 285 PrefixListId *string `pulumi:"prefixListId"` 286 // Whether or not to associate a private hosted zone with the specified VPC. Applicable for endpoints of type `Interface`. Most users will want this enabled to allow services within the VPC to automatically use the endpoint. 287 // Defaults to `false`. 288 PrivateDnsEnabled *bool `pulumi:"privateDnsEnabled"` 289 // Whether or not the VPC Endpoint is being managed by its service - `true` or `false`. 290 RequesterManaged *bool `pulumi:"requesterManaged"` 291 // One or more route table IDs. Applicable for endpoints of type `Gateway`. 292 RouteTableIds []string `pulumi:"routeTableIds"` 293 // The ID of one or more security groups to associate with the network interface. Applicable for endpoints of type `Interface`. 294 // If no security groups are specified, the VPC's [default security group](https://docs.aws.amazon.com/vpc/latest/userguide/VPC_SecurityGroups.html#DefaultSecurityGroup) is associated with the endpoint. 295 SecurityGroupIds []string `pulumi:"securityGroupIds"` 296 // The service name. For AWS services the service name is usually in the form `com.amazonaws.<region>.<service>` (the SageMaker Notebook service is an exception to this rule, the service name is in the form `aws.sagemaker.<region>.notebook`). 297 ServiceName *string `pulumi:"serviceName"` 298 // The state of the VPC endpoint. 299 State *string `pulumi:"state"` 300 // The ID of one or more subnets in which to create a network interface for the endpoint. Applicable for endpoints of type `GatewayLoadBalancer` and `Interface`. Interface type endpoints cannot function without being assigned to a subnet. 301 SubnetIds []string `pulumi:"subnetIds"` 302 // 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. 303 Tags map[string]string `pulumi:"tags"` 304 // A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. 305 // 306 // Deprecated: Please use `tags` instead. 307 TagsAll map[string]string `pulumi:"tagsAll"` 308 // The VPC endpoint type, `Gateway`, `GatewayLoadBalancer`, or `Interface`. Defaults to `Gateway`. 309 VpcEndpointType *string `pulumi:"vpcEndpointType"` 310 // The ID of the VPC in which the endpoint will be used. 311 VpcId *string `pulumi:"vpcId"` 312 } 313 314 type VpcEndpointState struct { 315 // The Amazon Resource Name (ARN) of the VPC endpoint. 316 Arn pulumi.StringPtrInput 317 // Accept the VPC endpoint (the VPC endpoint and service need to be in the same AWS account). 318 AutoAccept pulumi.BoolPtrInput 319 // The list of CIDR blocks for the exposed AWS service. Applicable for endpoints of type `Gateway`. 320 CidrBlocks pulumi.StringArrayInput 321 // The DNS entries for the VPC Endpoint. Applicable for endpoints of type `Interface`. DNS blocks are documented below. 322 DnsEntries VpcEndpointDnsEntryArrayInput 323 // The DNS options for the endpoint. See dnsOptions below. 324 DnsOptions VpcEndpointDnsOptionsPtrInput 325 // The IP address type for the endpoint. Valid values are `ipv4`, `dualstack`, and `ipv6`. 326 IpAddressType pulumi.StringPtrInput 327 // One or more network interfaces for the VPC Endpoint. Applicable for endpoints of type `Interface`. 328 NetworkInterfaceIds pulumi.StringArrayInput 329 // The ID of the AWS account that owns the VPC endpoint. 330 OwnerId pulumi.StringPtrInput 331 // A policy to attach to the endpoint that controls access to the service. This is a JSON formatted string. Defaults to full access. All `Gateway` and some `Interface` endpoints support policies - see the [relevant AWS documentation](https://docs.aws.amazon.com/vpc/latest/userguide/vpc-endpoints-access.html) for more details. 332 Policy pulumi.StringPtrInput 333 // The prefix list ID of the exposed AWS service. Applicable for endpoints of type `Gateway`. 334 PrefixListId pulumi.StringPtrInput 335 // Whether or not to associate a private hosted zone with the specified VPC. Applicable for endpoints of type `Interface`. Most users will want this enabled to allow services within the VPC to automatically use the endpoint. 336 // Defaults to `false`. 337 PrivateDnsEnabled pulumi.BoolPtrInput 338 // Whether or not the VPC Endpoint is being managed by its service - `true` or `false`. 339 RequesterManaged pulumi.BoolPtrInput 340 // One or more route table IDs. Applicable for endpoints of type `Gateway`. 341 RouteTableIds pulumi.StringArrayInput 342 // The ID of one or more security groups to associate with the network interface. Applicable for endpoints of type `Interface`. 343 // If no security groups are specified, the VPC's [default security group](https://docs.aws.amazon.com/vpc/latest/userguide/VPC_SecurityGroups.html#DefaultSecurityGroup) is associated with the endpoint. 344 SecurityGroupIds pulumi.StringArrayInput 345 // The service name. For AWS services the service name is usually in the form `com.amazonaws.<region>.<service>` (the SageMaker Notebook service is an exception to this rule, the service name is in the form `aws.sagemaker.<region>.notebook`). 346 ServiceName pulumi.StringPtrInput 347 // The state of the VPC endpoint. 348 State pulumi.StringPtrInput 349 // The ID of one or more subnets in which to create a network interface for the endpoint. Applicable for endpoints of type `GatewayLoadBalancer` and `Interface`. Interface type endpoints cannot function without being assigned to a subnet. 350 SubnetIds pulumi.StringArrayInput 351 // 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. 352 Tags pulumi.StringMapInput 353 // A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. 354 // 355 // Deprecated: Please use `tags` instead. 356 TagsAll pulumi.StringMapInput 357 // The VPC endpoint type, `Gateway`, `GatewayLoadBalancer`, or `Interface`. Defaults to `Gateway`. 358 VpcEndpointType pulumi.StringPtrInput 359 // The ID of the VPC in which the endpoint will be used. 360 VpcId pulumi.StringPtrInput 361 } 362 363 func (VpcEndpointState) ElementType() reflect.Type { 364 return reflect.TypeOf((*vpcEndpointState)(nil)).Elem() 365 } 366 367 type vpcEndpointArgs struct { 368 // Accept the VPC endpoint (the VPC endpoint and service need to be in the same AWS account). 369 AutoAccept *bool `pulumi:"autoAccept"` 370 // The DNS options for the endpoint. See dnsOptions below. 371 DnsOptions *VpcEndpointDnsOptions `pulumi:"dnsOptions"` 372 // The IP address type for the endpoint. Valid values are `ipv4`, `dualstack`, and `ipv6`. 373 IpAddressType *string `pulumi:"ipAddressType"` 374 // A policy to attach to the endpoint that controls access to the service. This is a JSON formatted string. Defaults to full access. All `Gateway` and some `Interface` endpoints support policies - see the [relevant AWS documentation](https://docs.aws.amazon.com/vpc/latest/userguide/vpc-endpoints-access.html) for more details. 375 Policy *string `pulumi:"policy"` 376 // Whether or not to associate a private hosted zone with the specified VPC. Applicable for endpoints of type `Interface`. Most users will want this enabled to allow services within the VPC to automatically use the endpoint. 377 // Defaults to `false`. 378 PrivateDnsEnabled *bool `pulumi:"privateDnsEnabled"` 379 // One or more route table IDs. Applicable for endpoints of type `Gateway`. 380 RouteTableIds []string `pulumi:"routeTableIds"` 381 // The ID of one or more security groups to associate with the network interface. Applicable for endpoints of type `Interface`. 382 // If no security groups are specified, the VPC's [default security group](https://docs.aws.amazon.com/vpc/latest/userguide/VPC_SecurityGroups.html#DefaultSecurityGroup) is associated with the endpoint. 383 SecurityGroupIds []string `pulumi:"securityGroupIds"` 384 // The service name. For AWS services the service name is usually in the form `com.amazonaws.<region>.<service>` (the SageMaker Notebook service is an exception to this rule, the service name is in the form `aws.sagemaker.<region>.notebook`). 385 ServiceName string `pulumi:"serviceName"` 386 // The ID of one or more subnets in which to create a network interface for the endpoint. Applicable for endpoints of type `GatewayLoadBalancer` and `Interface`. Interface type endpoints cannot function without being assigned to a subnet. 387 SubnetIds []string `pulumi:"subnetIds"` 388 // 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. 389 Tags map[string]string `pulumi:"tags"` 390 // The VPC endpoint type, `Gateway`, `GatewayLoadBalancer`, or `Interface`. Defaults to `Gateway`. 391 VpcEndpointType *string `pulumi:"vpcEndpointType"` 392 // The ID of the VPC in which the endpoint will be used. 393 VpcId string `pulumi:"vpcId"` 394 } 395 396 // The set of arguments for constructing a VpcEndpoint resource. 397 type VpcEndpointArgs struct { 398 // Accept the VPC endpoint (the VPC endpoint and service need to be in the same AWS account). 399 AutoAccept pulumi.BoolPtrInput 400 // The DNS options for the endpoint. See dnsOptions below. 401 DnsOptions VpcEndpointDnsOptionsPtrInput 402 // The IP address type for the endpoint. Valid values are `ipv4`, `dualstack`, and `ipv6`. 403 IpAddressType pulumi.StringPtrInput 404 // A policy to attach to the endpoint that controls access to the service. This is a JSON formatted string. Defaults to full access. All `Gateway` and some `Interface` endpoints support policies - see the [relevant AWS documentation](https://docs.aws.amazon.com/vpc/latest/userguide/vpc-endpoints-access.html) for more details. 405 Policy pulumi.StringPtrInput 406 // Whether or not to associate a private hosted zone with the specified VPC. Applicable for endpoints of type `Interface`. Most users will want this enabled to allow services within the VPC to automatically use the endpoint. 407 // Defaults to `false`. 408 PrivateDnsEnabled pulumi.BoolPtrInput 409 // One or more route table IDs. Applicable for endpoints of type `Gateway`. 410 RouteTableIds pulumi.StringArrayInput 411 // The ID of one or more security groups to associate with the network interface. Applicable for endpoints of type `Interface`. 412 // If no security groups are specified, the VPC's [default security group](https://docs.aws.amazon.com/vpc/latest/userguide/VPC_SecurityGroups.html#DefaultSecurityGroup) is associated with the endpoint. 413 SecurityGroupIds pulumi.StringArrayInput 414 // The service name. For AWS services the service name is usually in the form `com.amazonaws.<region>.<service>` (the SageMaker Notebook service is an exception to this rule, the service name is in the form `aws.sagemaker.<region>.notebook`). 415 ServiceName pulumi.StringInput 416 // The ID of one or more subnets in which to create a network interface for the endpoint. Applicable for endpoints of type `GatewayLoadBalancer` and `Interface`. Interface type endpoints cannot function without being assigned to a subnet. 417 SubnetIds pulumi.StringArrayInput 418 // 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. 419 Tags pulumi.StringMapInput 420 // The VPC endpoint type, `Gateway`, `GatewayLoadBalancer`, or `Interface`. Defaults to `Gateway`. 421 VpcEndpointType pulumi.StringPtrInput 422 // The ID of the VPC in which the endpoint will be used. 423 VpcId pulumi.StringInput 424 } 425 426 func (VpcEndpointArgs) ElementType() reflect.Type { 427 return reflect.TypeOf((*vpcEndpointArgs)(nil)).Elem() 428 } 429 430 type VpcEndpointInput interface { 431 pulumi.Input 432 433 ToVpcEndpointOutput() VpcEndpointOutput 434 ToVpcEndpointOutputWithContext(ctx context.Context) VpcEndpointOutput 435 } 436 437 func (*VpcEndpoint) ElementType() reflect.Type { 438 return reflect.TypeOf((**VpcEndpoint)(nil)).Elem() 439 } 440 441 func (i *VpcEndpoint) ToVpcEndpointOutput() VpcEndpointOutput { 442 return i.ToVpcEndpointOutputWithContext(context.Background()) 443 } 444 445 func (i *VpcEndpoint) ToVpcEndpointOutputWithContext(ctx context.Context) VpcEndpointOutput { 446 return pulumi.ToOutputWithContext(ctx, i).(VpcEndpointOutput) 447 } 448 449 // VpcEndpointArrayInput is an input type that accepts VpcEndpointArray and VpcEndpointArrayOutput values. 450 // You can construct a concrete instance of `VpcEndpointArrayInput` via: 451 // 452 // VpcEndpointArray{ VpcEndpointArgs{...} } 453 type VpcEndpointArrayInput interface { 454 pulumi.Input 455 456 ToVpcEndpointArrayOutput() VpcEndpointArrayOutput 457 ToVpcEndpointArrayOutputWithContext(context.Context) VpcEndpointArrayOutput 458 } 459 460 type VpcEndpointArray []VpcEndpointInput 461 462 func (VpcEndpointArray) ElementType() reflect.Type { 463 return reflect.TypeOf((*[]*VpcEndpoint)(nil)).Elem() 464 } 465 466 func (i VpcEndpointArray) ToVpcEndpointArrayOutput() VpcEndpointArrayOutput { 467 return i.ToVpcEndpointArrayOutputWithContext(context.Background()) 468 } 469 470 func (i VpcEndpointArray) ToVpcEndpointArrayOutputWithContext(ctx context.Context) VpcEndpointArrayOutput { 471 return pulumi.ToOutputWithContext(ctx, i).(VpcEndpointArrayOutput) 472 } 473 474 // VpcEndpointMapInput is an input type that accepts VpcEndpointMap and VpcEndpointMapOutput values. 475 // You can construct a concrete instance of `VpcEndpointMapInput` via: 476 // 477 // VpcEndpointMap{ "key": VpcEndpointArgs{...} } 478 type VpcEndpointMapInput interface { 479 pulumi.Input 480 481 ToVpcEndpointMapOutput() VpcEndpointMapOutput 482 ToVpcEndpointMapOutputWithContext(context.Context) VpcEndpointMapOutput 483 } 484 485 type VpcEndpointMap map[string]VpcEndpointInput 486 487 func (VpcEndpointMap) ElementType() reflect.Type { 488 return reflect.TypeOf((*map[string]*VpcEndpoint)(nil)).Elem() 489 } 490 491 func (i VpcEndpointMap) ToVpcEndpointMapOutput() VpcEndpointMapOutput { 492 return i.ToVpcEndpointMapOutputWithContext(context.Background()) 493 } 494 495 func (i VpcEndpointMap) ToVpcEndpointMapOutputWithContext(ctx context.Context) VpcEndpointMapOutput { 496 return pulumi.ToOutputWithContext(ctx, i).(VpcEndpointMapOutput) 497 } 498 499 type VpcEndpointOutput struct{ *pulumi.OutputState } 500 501 func (VpcEndpointOutput) ElementType() reflect.Type { 502 return reflect.TypeOf((**VpcEndpoint)(nil)).Elem() 503 } 504 505 func (o VpcEndpointOutput) ToVpcEndpointOutput() VpcEndpointOutput { 506 return o 507 } 508 509 func (o VpcEndpointOutput) ToVpcEndpointOutputWithContext(ctx context.Context) VpcEndpointOutput { 510 return o 511 } 512 513 // The Amazon Resource Name (ARN) of the VPC endpoint. 514 func (o VpcEndpointOutput) Arn() pulumi.StringOutput { 515 return o.ApplyT(func(v *VpcEndpoint) pulumi.StringOutput { return v.Arn }).(pulumi.StringOutput) 516 } 517 518 // Accept the VPC endpoint (the VPC endpoint and service need to be in the same AWS account). 519 func (o VpcEndpointOutput) AutoAccept() pulumi.BoolPtrOutput { 520 return o.ApplyT(func(v *VpcEndpoint) pulumi.BoolPtrOutput { return v.AutoAccept }).(pulumi.BoolPtrOutput) 521 } 522 523 // The list of CIDR blocks for the exposed AWS service. Applicable for endpoints of type `Gateway`. 524 func (o VpcEndpointOutput) CidrBlocks() pulumi.StringArrayOutput { 525 return o.ApplyT(func(v *VpcEndpoint) pulumi.StringArrayOutput { return v.CidrBlocks }).(pulumi.StringArrayOutput) 526 } 527 528 // The DNS entries for the VPC Endpoint. Applicable for endpoints of type `Interface`. DNS blocks are documented below. 529 func (o VpcEndpointOutput) DnsEntries() VpcEndpointDnsEntryArrayOutput { 530 return o.ApplyT(func(v *VpcEndpoint) VpcEndpointDnsEntryArrayOutput { return v.DnsEntries }).(VpcEndpointDnsEntryArrayOutput) 531 } 532 533 // The DNS options for the endpoint. See dnsOptions below. 534 func (o VpcEndpointOutput) DnsOptions() VpcEndpointDnsOptionsOutput { 535 return o.ApplyT(func(v *VpcEndpoint) VpcEndpointDnsOptionsOutput { return v.DnsOptions }).(VpcEndpointDnsOptionsOutput) 536 } 537 538 // The IP address type for the endpoint. Valid values are `ipv4`, `dualstack`, and `ipv6`. 539 func (o VpcEndpointOutput) IpAddressType() pulumi.StringOutput { 540 return o.ApplyT(func(v *VpcEndpoint) pulumi.StringOutput { return v.IpAddressType }).(pulumi.StringOutput) 541 } 542 543 // One or more network interfaces for the VPC Endpoint. Applicable for endpoints of type `Interface`. 544 func (o VpcEndpointOutput) NetworkInterfaceIds() pulumi.StringArrayOutput { 545 return o.ApplyT(func(v *VpcEndpoint) pulumi.StringArrayOutput { return v.NetworkInterfaceIds }).(pulumi.StringArrayOutput) 546 } 547 548 // The ID of the AWS account that owns the VPC endpoint. 549 func (o VpcEndpointOutput) OwnerId() pulumi.StringOutput { 550 return o.ApplyT(func(v *VpcEndpoint) pulumi.StringOutput { return v.OwnerId }).(pulumi.StringOutput) 551 } 552 553 // A policy to attach to the endpoint that controls access to the service. This is a JSON formatted string. Defaults to full access. All `Gateway` and some `Interface` endpoints support policies - see the [relevant AWS documentation](https://docs.aws.amazon.com/vpc/latest/userguide/vpc-endpoints-access.html) for more details. 554 func (o VpcEndpointOutput) Policy() pulumi.StringOutput { 555 return o.ApplyT(func(v *VpcEndpoint) pulumi.StringOutput { return v.Policy }).(pulumi.StringOutput) 556 } 557 558 // The prefix list ID of the exposed AWS service. Applicable for endpoints of type `Gateway`. 559 func (o VpcEndpointOutput) PrefixListId() pulumi.StringOutput { 560 return o.ApplyT(func(v *VpcEndpoint) pulumi.StringOutput { return v.PrefixListId }).(pulumi.StringOutput) 561 } 562 563 // Whether or not to associate a private hosted zone with the specified VPC. Applicable for endpoints of type `Interface`. Most users will want this enabled to allow services within the VPC to automatically use the endpoint. 564 // Defaults to `false`. 565 func (o VpcEndpointOutput) PrivateDnsEnabled() pulumi.BoolPtrOutput { 566 return o.ApplyT(func(v *VpcEndpoint) pulumi.BoolPtrOutput { return v.PrivateDnsEnabled }).(pulumi.BoolPtrOutput) 567 } 568 569 // Whether or not the VPC Endpoint is being managed by its service - `true` or `false`. 570 func (o VpcEndpointOutput) RequesterManaged() pulumi.BoolOutput { 571 return o.ApplyT(func(v *VpcEndpoint) pulumi.BoolOutput { return v.RequesterManaged }).(pulumi.BoolOutput) 572 } 573 574 // One or more route table IDs. Applicable for endpoints of type `Gateway`. 575 func (o VpcEndpointOutput) RouteTableIds() pulumi.StringArrayOutput { 576 return o.ApplyT(func(v *VpcEndpoint) pulumi.StringArrayOutput { return v.RouteTableIds }).(pulumi.StringArrayOutput) 577 } 578 579 // The ID of one or more security groups to associate with the network interface. Applicable for endpoints of type `Interface`. 580 // If no security groups are specified, the VPC's [default security group](https://docs.aws.amazon.com/vpc/latest/userguide/VPC_SecurityGroups.html#DefaultSecurityGroup) is associated with the endpoint. 581 func (o VpcEndpointOutput) SecurityGroupIds() pulumi.StringArrayOutput { 582 return o.ApplyT(func(v *VpcEndpoint) pulumi.StringArrayOutput { return v.SecurityGroupIds }).(pulumi.StringArrayOutput) 583 } 584 585 // The service name. For AWS services the service name is usually in the form `com.amazonaws.<region>.<service>` (the SageMaker Notebook service is an exception to this rule, the service name is in the form `aws.sagemaker.<region>.notebook`). 586 func (o VpcEndpointOutput) ServiceName() pulumi.StringOutput { 587 return o.ApplyT(func(v *VpcEndpoint) pulumi.StringOutput { return v.ServiceName }).(pulumi.StringOutput) 588 } 589 590 // The state of the VPC endpoint. 591 func (o VpcEndpointOutput) State() pulumi.StringOutput { 592 return o.ApplyT(func(v *VpcEndpoint) pulumi.StringOutput { return v.State }).(pulumi.StringOutput) 593 } 594 595 // The ID of one or more subnets in which to create a network interface for the endpoint. Applicable for endpoints of type `GatewayLoadBalancer` and `Interface`. Interface type endpoints cannot function without being assigned to a subnet. 596 func (o VpcEndpointOutput) SubnetIds() pulumi.StringArrayOutput { 597 return o.ApplyT(func(v *VpcEndpoint) pulumi.StringArrayOutput { return v.SubnetIds }).(pulumi.StringArrayOutput) 598 } 599 600 // 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. 601 func (o VpcEndpointOutput) Tags() pulumi.StringMapOutput { 602 return o.ApplyT(func(v *VpcEndpoint) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput) 603 } 604 605 // A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. 606 // 607 // Deprecated: Please use `tags` instead. 608 func (o VpcEndpointOutput) TagsAll() pulumi.StringMapOutput { 609 return o.ApplyT(func(v *VpcEndpoint) pulumi.StringMapOutput { return v.TagsAll }).(pulumi.StringMapOutput) 610 } 611 612 // The VPC endpoint type, `Gateway`, `GatewayLoadBalancer`, or `Interface`. Defaults to `Gateway`. 613 func (o VpcEndpointOutput) VpcEndpointType() pulumi.StringPtrOutput { 614 return o.ApplyT(func(v *VpcEndpoint) pulumi.StringPtrOutput { return v.VpcEndpointType }).(pulumi.StringPtrOutput) 615 } 616 617 // The ID of the VPC in which the endpoint will be used. 618 func (o VpcEndpointOutput) VpcId() pulumi.StringOutput { 619 return o.ApplyT(func(v *VpcEndpoint) pulumi.StringOutput { return v.VpcId }).(pulumi.StringOutput) 620 } 621 622 type VpcEndpointArrayOutput struct{ *pulumi.OutputState } 623 624 func (VpcEndpointArrayOutput) ElementType() reflect.Type { 625 return reflect.TypeOf((*[]*VpcEndpoint)(nil)).Elem() 626 } 627 628 func (o VpcEndpointArrayOutput) ToVpcEndpointArrayOutput() VpcEndpointArrayOutput { 629 return o 630 } 631 632 func (o VpcEndpointArrayOutput) ToVpcEndpointArrayOutputWithContext(ctx context.Context) VpcEndpointArrayOutput { 633 return o 634 } 635 636 func (o VpcEndpointArrayOutput) Index(i pulumi.IntInput) VpcEndpointOutput { 637 return pulumi.All(o, i).ApplyT(func(vs []interface{}) *VpcEndpoint { 638 return vs[0].([]*VpcEndpoint)[vs[1].(int)] 639 }).(VpcEndpointOutput) 640 } 641 642 type VpcEndpointMapOutput struct{ *pulumi.OutputState } 643 644 func (VpcEndpointMapOutput) ElementType() reflect.Type { 645 return reflect.TypeOf((*map[string]*VpcEndpoint)(nil)).Elem() 646 } 647 648 func (o VpcEndpointMapOutput) ToVpcEndpointMapOutput() VpcEndpointMapOutput { 649 return o 650 } 651 652 func (o VpcEndpointMapOutput) ToVpcEndpointMapOutputWithContext(ctx context.Context) VpcEndpointMapOutput { 653 return o 654 } 655 656 func (o VpcEndpointMapOutput) MapIndex(k pulumi.StringInput) VpcEndpointOutput { 657 return pulumi.All(o, k).ApplyT(func(vs []interface{}) *VpcEndpoint { 658 return vs[0].(map[string]*VpcEndpoint)[vs[1].(string)] 659 }).(VpcEndpointOutput) 660 } 661 662 func init() { 663 pulumi.RegisterInputType(reflect.TypeOf((*VpcEndpointInput)(nil)).Elem(), &VpcEndpoint{}) 664 pulumi.RegisterInputType(reflect.TypeOf((*VpcEndpointArrayInput)(nil)).Elem(), VpcEndpointArray{}) 665 pulumi.RegisterInputType(reflect.TypeOf((*VpcEndpointMapInput)(nil)).Elem(), VpcEndpointMap{}) 666 pulumi.RegisterOutputType(VpcEndpointOutput{}) 667 pulumi.RegisterOutputType(VpcEndpointArrayOutput{}) 668 pulumi.RegisterOutputType(VpcEndpointMapOutput{}) 669 }