github.com/pulumi/pulumi-aws/sdk/v6@v6.32.0/go/aws/alb/loadBalancer.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 alb 5 6 import ( 7 "context" 8 "reflect" 9 10 "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/internal" 11 "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 12 ) 13 14 // Provides a Load Balancer resource. 15 // 16 // > **Note:** `alb.LoadBalancer` is known as `lb.LoadBalancer`. The functionality is identical. 17 // 18 // ## Example Usage 19 // 20 // ### Specifying Elastic IPs 21 // 22 // <!--Start PulumiCodeChooser --> 23 // ```go 24 // package main 25 // 26 // import ( 27 // 28 // "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/lb" 29 // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 30 // 31 // ) 32 // 33 // func main() { 34 // pulumi.Run(func(ctx *pulumi.Context) error { 35 // _, err := lb.NewLoadBalancer(ctx, "example", &lb.LoadBalancerArgs{ 36 // Name: pulumi.String("example"), 37 // LoadBalancerType: pulumi.String("network"), 38 // SubnetMappings: lb.LoadBalancerSubnetMappingArray{ 39 // &lb.LoadBalancerSubnetMappingArgs{ 40 // SubnetId: pulumi.Any(example1AwsSubnet.Id), 41 // AllocationId: pulumi.Any(example1.Id), 42 // }, 43 // &lb.LoadBalancerSubnetMappingArgs{ 44 // SubnetId: pulumi.Any(example2AwsSubnet.Id), 45 // AllocationId: pulumi.Any(example2.Id), 46 // }, 47 // }, 48 // }) 49 // if err != nil { 50 // return err 51 // } 52 // return nil 53 // }) 54 // } 55 // 56 // ``` 57 // <!--End PulumiCodeChooser --> 58 // 59 // ### Specifying private IP addresses for an internal-facing load balancer 60 // 61 // <!--Start PulumiCodeChooser --> 62 // ```go 63 // package main 64 // 65 // import ( 66 // 67 // "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/lb" 68 // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 69 // 70 // ) 71 // 72 // func main() { 73 // pulumi.Run(func(ctx *pulumi.Context) error { 74 // _, err := lb.NewLoadBalancer(ctx, "example", &lb.LoadBalancerArgs{ 75 // Name: pulumi.String("example"), 76 // LoadBalancerType: pulumi.String("network"), 77 // SubnetMappings: lb.LoadBalancerSubnetMappingArray{ 78 // &lb.LoadBalancerSubnetMappingArgs{ 79 // SubnetId: pulumi.Any(example1.Id), 80 // PrivateIpv4Address: pulumi.String("10.0.1.15"), 81 // }, 82 // &lb.LoadBalancerSubnetMappingArgs{ 83 // SubnetId: pulumi.Any(example2.Id), 84 // PrivateIpv4Address: pulumi.String("10.0.2.15"), 85 // }, 86 // }, 87 // }) 88 // if err != nil { 89 // return err 90 // } 91 // return nil 92 // }) 93 // } 94 // 95 // ``` 96 // <!--End PulumiCodeChooser --> 97 // 98 // ## Import 99 // 100 // Using `pulumi import`, import LBs using their ARN. For example: 101 // 102 // ```sh 103 // $ pulumi import aws:alb/loadBalancer:LoadBalancer bar arn:aws:elasticloadbalancing:us-west-2:123456789012:loadbalancer/app/my-load-balancer/50dc6c495c0c9188 104 // ``` 105 type LoadBalancer struct { 106 pulumi.CustomResourceState 107 108 // Access Logs block. See below. 109 AccessLogs LoadBalancerAccessLogsPtrOutput `pulumi:"accessLogs"` 110 // ARN of the load balancer (matches `id`). 111 Arn pulumi.StringOutput `pulumi:"arn"` 112 // ARN suffix for use with CloudWatch Metrics. 113 ArnSuffix pulumi.StringOutput `pulumi:"arnSuffix"` 114 // Client keep alive value in seconds. The valid range is 60-604800 seconds. The default is 3600 seconds. 115 ClientKeepAlive pulumi.IntPtrOutput `pulumi:"clientKeepAlive"` 116 // Connection Logs block. See below. Only valid for Load Balancers of type `application`. 117 ConnectionLogs LoadBalancerConnectionLogsPtrOutput `pulumi:"connectionLogs"` 118 // ID of the customer owned ipv4 pool to use for this load balancer. 119 CustomerOwnedIpv4Pool pulumi.StringPtrOutput `pulumi:"customerOwnedIpv4Pool"` 120 // How the load balancer handles requests that might pose a security risk to an application due to HTTP desync. Valid values are `monitor`, `defensive` (default), `strictest`. 121 DesyncMitigationMode pulumi.StringPtrOutput `pulumi:"desyncMitigationMode"` 122 // DNS name of the load balancer. 123 DnsName pulumi.StringOutput `pulumi:"dnsName"` 124 // How traffic is distributed among the load balancer Availability Zones. Possible values are `anyAvailabilityZone` (default), `availabilityZoneAffinity`, or `partialAvailabilityZoneAffinity`. See [Availability Zone DNS affinity](https://docs.aws.amazon.com/elasticloadbalancing/latest/network/network-load-balancers.html#zonal-dns-affinity) for additional details. Only valid for `network` type load balancers. 125 DnsRecordClientRoutingPolicy pulumi.StringPtrOutput `pulumi:"dnsRecordClientRoutingPolicy"` 126 // Whether HTTP headers with header fields that are not valid are removed by the load balancer (true) or routed to targets (false). The default is false. Elastic Load Balancing requires that message header names contain only alphanumeric characters and hyphens. Only valid for Load Balancers of type `application`. 127 DropInvalidHeaderFields pulumi.BoolPtrOutput `pulumi:"dropInvalidHeaderFields"` 128 // If true, cross-zone load balancing of the load balancer will be enabled. For `network` and `gateway` type load balancers, this feature is disabled by default (`false`). For `application` load balancer this feature is always enabled (`true`) and cannot be disabled. Defaults to `false`. 129 EnableCrossZoneLoadBalancing pulumi.BoolPtrOutput `pulumi:"enableCrossZoneLoadBalancing"` 130 // If true, deletion of the load balancer will be disabled via the AWS API. This will prevent this provider from deleting the load balancer. Defaults to `false`. 131 EnableDeletionProtection pulumi.BoolPtrOutput `pulumi:"enableDeletionProtection"` 132 // Whether HTTP/2 is enabled in `application` load balancers. Defaults to `true`. 133 EnableHttp2 pulumi.BoolPtrOutput `pulumi:"enableHttp2"` 134 // Whether the two headers (`x-amzn-tls-version` and `x-amzn-tls-cipher-suite`), which contain information about the negotiated TLS version and cipher suite, are added to the client request before sending it to the target. Only valid for Load Balancers of type `application`. Defaults to `false` 135 EnableTlsVersionAndCipherSuiteHeaders pulumi.BoolPtrOutput `pulumi:"enableTlsVersionAndCipherSuiteHeaders"` 136 // Whether to allow a WAF-enabled load balancer to route requests to targets if it is unable to forward the request to AWS WAF. Defaults to `false`. 137 EnableWafFailOpen pulumi.BoolPtrOutput `pulumi:"enableWafFailOpen"` 138 // Whether the X-Forwarded-For header should preserve the source port that the client used to connect to the load balancer in `application` load balancers. Defaults to `false`. 139 EnableXffClientPort pulumi.BoolPtrOutput `pulumi:"enableXffClientPort"` 140 // Whether inbound security group rules are enforced for traffic originating from a PrivateLink. Only valid for Load Balancers of type `network`. The possible values are `on` and `off`. 141 EnforceSecurityGroupInboundRulesOnPrivateLinkTraffic pulumi.StringOutput `pulumi:"enforceSecurityGroupInboundRulesOnPrivateLinkTraffic"` 142 // Time in seconds that the connection is allowed to be idle. Only valid for Load Balancers of type `application`. Default: 60. 143 IdleTimeout pulumi.IntPtrOutput `pulumi:"idleTimeout"` 144 // If true, the LB will be internal. Defaults to `false`. 145 Internal pulumi.BoolOutput `pulumi:"internal"` 146 // Type of IP addresses used by the subnets for your load balancer. The possible values are `ipv4` and `dualstack`. 147 IpAddressType pulumi.StringOutput `pulumi:"ipAddressType"` 148 // Type of load balancer to create. Possible values are `application`, `gateway`, or `network`. The default value is `application`. 149 LoadBalancerType pulumi.StringPtrOutput `pulumi:"loadBalancerType"` 150 // Name of the LB. This name must be unique within your AWS account, can have a maximum of 32 characters, must contain only alphanumeric characters or hyphens, and must not begin or end with a hyphen. If not specified, this provider will autogenerate a name beginning with `tf-lb`. 151 Name pulumi.StringOutput `pulumi:"name"` 152 // Creates a unique name beginning with the specified prefix. Conflicts with `name`. 153 NamePrefix pulumi.StringOutput `pulumi:"namePrefix"` 154 // Whether the Application Load Balancer should preserve the Host header in the HTTP request and send it to the target without any change. Defaults to `false`. 155 PreserveHostHeader pulumi.BoolPtrOutput `pulumi:"preserveHostHeader"` 156 // List of security group IDs to assign to the LB. Only valid for Load Balancers of type `application` or `network`. For load balancers of type `network` security groups cannot be added if none are currently present, and cannot all be removed once added. If either of these conditions are met, this will force a recreation of the resource. 157 SecurityGroups pulumi.StringArrayOutput `pulumi:"securityGroups"` 158 // Subnet mapping block. See below. For Load Balancers of type `network` subnet mappings can only be added. 159 SubnetMappings LoadBalancerSubnetMappingArrayOutput `pulumi:"subnetMappings"` 160 // List of subnet IDs to attach to the LB. For Load Balancers of type `network` subnets can only be added (see [Availability Zones](https://docs.aws.amazon.com/elasticloadbalancing/latest/network/network-load-balancers.html#availability-zones)), deleting a subnet for load balancers of type `network` will force a recreation of the resource. 161 Subnets pulumi.StringArrayOutput `pulumi:"subnets"` 162 // 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. 163 Tags pulumi.StringMapOutput `pulumi:"tags"` 164 // Map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. 165 // 166 // Deprecated: Please use `tags` instead. 167 TagsAll pulumi.StringMapOutput `pulumi:"tagsAll"` 168 VpcId pulumi.StringOutput `pulumi:"vpcId"` 169 // Determines how the load balancer modifies the `X-Forwarded-For` header in the HTTP request before sending the request to the target. The possible values are `append`, `preserve`, and `remove`. Only valid for Load Balancers of type `application`. The default is `append`. 170 XffHeaderProcessingMode pulumi.StringPtrOutput `pulumi:"xffHeaderProcessingMode"` 171 // Canonical hosted zone ID of the load balancer (to be used in a Route 53 Alias record). 172 ZoneId pulumi.StringOutput `pulumi:"zoneId"` 173 } 174 175 // NewLoadBalancer registers a new resource with the given unique name, arguments, and options. 176 func NewLoadBalancer(ctx *pulumi.Context, 177 name string, args *LoadBalancerArgs, opts ...pulumi.ResourceOption) (*LoadBalancer, error) { 178 if args == nil { 179 args = &LoadBalancerArgs{} 180 } 181 182 aliases := pulumi.Aliases([]pulumi.Alias{ 183 { 184 Type: pulumi.String("aws:applicationloadbalancing/loadBalancer:LoadBalancer"), 185 }, 186 }) 187 opts = append(opts, aliases) 188 opts = internal.PkgResourceDefaultOpts(opts) 189 var resource LoadBalancer 190 err := ctx.RegisterResource("aws:alb/loadBalancer:LoadBalancer", name, args, &resource, opts...) 191 if err != nil { 192 return nil, err 193 } 194 return &resource, nil 195 } 196 197 // GetLoadBalancer gets an existing LoadBalancer resource's state with the given name, ID, and optional 198 // state properties that are used to uniquely qualify the lookup (nil if not required). 199 func GetLoadBalancer(ctx *pulumi.Context, 200 name string, id pulumi.IDInput, state *LoadBalancerState, opts ...pulumi.ResourceOption) (*LoadBalancer, error) { 201 var resource LoadBalancer 202 err := ctx.ReadResource("aws:alb/loadBalancer:LoadBalancer", name, id, state, &resource, opts...) 203 if err != nil { 204 return nil, err 205 } 206 return &resource, nil 207 } 208 209 // Input properties used for looking up and filtering LoadBalancer resources. 210 type loadBalancerState struct { 211 // Access Logs block. See below. 212 AccessLogs *LoadBalancerAccessLogs `pulumi:"accessLogs"` 213 // ARN of the load balancer (matches `id`). 214 Arn *string `pulumi:"arn"` 215 // ARN suffix for use with CloudWatch Metrics. 216 ArnSuffix *string `pulumi:"arnSuffix"` 217 // Client keep alive value in seconds. The valid range is 60-604800 seconds. The default is 3600 seconds. 218 ClientKeepAlive *int `pulumi:"clientKeepAlive"` 219 // Connection Logs block. See below. Only valid for Load Balancers of type `application`. 220 ConnectionLogs *LoadBalancerConnectionLogs `pulumi:"connectionLogs"` 221 // ID of the customer owned ipv4 pool to use for this load balancer. 222 CustomerOwnedIpv4Pool *string `pulumi:"customerOwnedIpv4Pool"` 223 // How the load balancer handles requests that might pose a security risk to an application due to HTTP desync. Valid values are `monitor`, `defensive` (default), `strictest`. 224 DesyncMitigationMode *string `pulumi:"desyncMitigationMode"` 225 // DNS name of the load balancer. 226 DnsName *string `pulumi:"dnsName"` 227 // How traffic is distributed among the load balancer Availability Zones. Possible values are `anyAvailabilityZone` (default), `availabilityZoneAffinity`, or `partialAvailabilityZoneAffinity`. See [Availability Zone DNS affinity](https://docs.aws.amazon.com/elasticloadbalancing/latest/network/network-load-balancers.html#zonal-dns-affinity) for additional details. Only valid for `network` type load balancers. 228 DnsRecordClientRoutingPolicy *string `pulumi:"dnsRecordClientRoutingPolicy"` 229 // Whether HTTP headers with header fields that are not valid are removed by the load balancer (true) or routed to targets (false). The default is false. Elastic Load Balancing requires that message header names contain only alphanumeric characters and hyphens. Only valid for Load Balancers of type `application`. 230 DropInvalidHeaderFields *bool `pulumi:"dropInvalidHeaderFields"` 231 // If true, cross-zone load balancing of the load balancer will be enabled. For `network` and `gateway` type load balancers, this feature is disabled by default (`false`). For `application` load balancer this feature is always enabled (`true`) and cannot be disabled. Defaults to `false`. 232 EnableCrossZoneLoadBalancing *bool `pulumi:"enableCrossZoneLoadBalancing"` 233 // If true, deletion of the load balancer will be disabled via the AWS API. This will prevent this provider from deleting the load balancer. Defaults to `false`. 234 EnableDeletionProtection *bool `pulumi:"enableDeletionProtection"` 235 // Whether HTTP/2 is enabled in `application` load balancers. Defaults to `true`. 236 EnableHttp2 *bool `pulumi:"enableHttp2"` 237 // Whether the two headers (`x-amzn-tls-version` and `x-amzn-tls-cipher-suite`), which contain information about the negotiated TLS version and cipher suite, are added to the client request before sending it to the target. Only valid for Load Balancers of type `application`. Defaults to `false` 238 EnableTlsVersionAndCipherSuiteHeaders *bool `pulumi:"enableTlsVersionAndCipherSuiteHeaders"` 239 // Whether to allow a WAF-enabled load balancer to route requests to targets if it is unable to forward the request to AWS WAF. Defaults to `false`. 240 EnableWafFailOpen *bool `pulumi:"enableWafFailOpen"` 241 // Whether the X-Forwarded-For header should preserve the source port that the client used to connect to the load balancer in `application` load balancers. Defaults to `false`. 242 EnableXffClientPort *bool `pulumi:"enableXffClientPort"` 243 // Whether inbound security group rules are enforced for traffic originating from a PrivateLink. Only valid for Load Balancers of type `network`. The possible values are `on` and `off`. 244 EnforceSecurityGroupInboundRulesOnPrivateLinkTraffic *string `pulumi:"enforceSecurityGroupInboundRulesOnPrivateLinkTraffic"` 245 // Time in seconds that the connection is allowed to be idle. Only valid for Load Balancers of type `application`. Default: 60. 246 IdleTimeout *int `pulumi:"idleTimeout"` 247 // If true, the LB will be internal. Defaults to `false`. 248 Internal *bool `pulumi:"internal"` 249 // Type of IP addresses used by the subnets for your load balancer. The possible values are `ipv4` and `dualstack`. 250 IpAddressType *string `pulumi:"ipAddressType"` 251 // Type of load balancer to create. Possible values are `application`, `gateway`, or `network`. The default value is `application`. 252 LoadBalancerType *string `pulumi:"loadBalancerType"` 253 // Name of the LB. This name must be unique within your AWS account, can have a maximum of 32 characters, must contain only alphanumeric characters or hyphens, and must not begin or end with a hyphen. If not specified, this provider will autogenerate a name beginning with `tf-lb`. 254 Name *string `pulumi:"name"` 255 // Creates a unique name beginning with the specified prefix. Conflicts with `name`. 256 NamePrefix *string `pulumi:"namePrefix"` 257 // Whether the Application Load Balancer should preserve the Host header in the HTTP request and send it to the target without any change. Defaults to `false`. 258 PreserveHostHeader *bool `pulumi:"preserveHostHeader"` 259 // List of security group IDs to assign to the LB. Only valid for Load Balancers of type `application` or `network`. For load balancers of type `network` security groups cannot be added if none are currently present, and cannot all be removed once added. If either of these conditions are met, this will force a recreation of the resource. 260 SecurityGroups []string `pulumi:"securityGroups"` 261 // Subnet mapping block. See below. For Load Balancers of type `network` subnet mappings can only be added. 262 SubnetMappings []LoadBalancerSubnetMapping `pulumi:"subnetMappings"` 263 // List of subnet IDs to attach to the LB. For Load Balancers of type `network` subnets can only be added (see [Availability Zones](https://docs.aws.amazon.com/elasticloadbalancing/latest/network/network-load-balancers.html#availability-zones)), deleting a subnet for load balancers of type `network` will force a recreation of the resource. 264 Subnets []string `pulumi:"subnets"` 265 // 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. 266 Tags map[string]string `pulumi:"tags"` 267 // Map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. 268 // 269 // Deprecated: Please use `tags` instead. 270 TagsAll map[string]string `pulumi:"tagsAll"` 271 VpcId *string `pulumi:"vpcId"` 272 // Determines how the load balancer modifies the `X-Forwarded-For` header in the HTTP request before sending the request to the target. The possible values are `append`, `preserve`, and `remove`. Only valid for Load Balancers of type `application`. The default is `append`. 273 XffHeaderProcessingMode *string `pulumi:"xffHeaderProcessingMode"` 274 // Canonical hosted zone ID of the load balancer (to be used in a Route 53 Alias record). 275 ZoneId *string `pulumi:"zoneId"` 276 } 277 278 type LoadBalancerState struct { 279 // Access Logs block. See below. 280 AccessLogs LoadBalancerAccessLogsPtrInput 281 // ARN of the load balancer (matches `id`). 282 Arn pulumi.StringPtrInput 283 // ARN suffix for use with CloudWatch Metrics. 284 ArnSuffix pulumi.StringPtrInput 285 // Client keep alive value in seconds. The valid range is 60-604800 seconds. The default is 3600 seconds. 286 ClientKeepAlive pulumi.IntPtrInput 287 // Connection Logs block. See below. Only valid for Load Balancers of type `application`. 288 ConnectionLogs LoadBalancerConnectionLogsPtrInput 289 // ID of the customer owned ipv4 pool to use for this load balancer. 290 CustomerOwnedIpv4Pool pulumi.StringPtrInput 291 // How the load balancer handles requests that might pose a security risk to an application due to HTTP desync. Valid values are `monitor`, `defensive` (default), `strictest`. 292 DesyncMitigationMode pulumi.StringPtrInput 293 // DNS name of the load balancer. 294 DnsName pulumi.StringPtrInput 295 // How traffic is distributed among the load balancer Availability Zones. Possible values are `anyAvailabilityZone` (default), `availabilityZoneAffinity`, or `partialAvailabilityZoneAffinity`. See [Availability Zone DNS affinity](https://docs.aws.amazon.com/elasticloadbalancing/latest/network/network-load-balancers.html#zonal-dns-affinity) for additional details. Only valid for `network` type load balancers. 296 DnsRecordClientRoutingPolicy pulumi.StringPtrInput 297 // Whether HTTP headers with header fields that are not valid are removed by the load balancer (true) or routed to targets (false). The default is false. Elastic Load Balancing requires that message header names contain only alphanumeric characters and hyphens. Only valid for Load Balancers of type `application`. 298 DropInvalidHeaderFields pulumi.BoolPtrInput 299 // If true, cross-zone load balancing of the load balancer will be enabled. For `network` and `gateway` type load balancers, this feature is disabled by default (`false`). For `application` load balancer this feature is always enabled (`true`) and cannot be disabled. Defaults to `false`. 300 EnableCrossZoneLoadBalancing pulumi.BoolPtrInput 301 // If true, deletion of the load balancer will be disabled via the AWS API. This will prevent this provider from deleting the load balancer. Defaults to `false`. 302 EnableDeletionProtection pulumi.BoolPtrInput 303 // Whether HTTP/2 is enabled in `application` load balancers. Defaults to `true`. 304 EnableHttp2 pulumi.BoolPtrInput 305 // Whether the two headers (`x-amzn-tls-version` and `x-amzn-tls-cipher-suite`), which contain information about the negotiated TLS version and cipher suite, are added to the client request before sending it to the target. Only valid for Load Balancers of type `application`. Defaults to `false` 306 EnableTlsVersionAndCipherSuiteHeaders pulumi.BoolPtrInput 307 // Whether to allow a WAF-enabled load balancer to route requests to targets if it is unable to forward the request to AWS WAF. Defaults to `false`. 308 EnableWafFailOpen pulumi.BoolPtrInput 309 // Whether the X-Forwarded-For header should preserve the source port that the client used to connect to the load balancer in `application` load balancers. Defaults to `false`. 310 EnableXffClientPort pulumi.BoolPtrInput 311 // Whether inbound security group rules are enforced for traffic originating from a PrivateLink. Only valid for Load Balancers of type `network`. The possible values are `on` and `off`. 312 EnforceSecurityGroupInboundRulesOnPrivateLinkTraffic pulumi.StringPtrInput 313 // Time in seconds that the connection is allowed to be idle. Only valid for Load Balancers of type `application`. Default: 60. 314 IdleTimeout pulumi.IntPtrInput 315 // If true, the LB will be internal. Defaults to `false`. 316 Internal pulumi.BoolPtrInput 317 // Type of IP addresses used by the subnets for your load balancer. The possible values are `ipv4` and `dualstack`. 318 IpAddressType pulumi.StringPtrInput 319 // Type of load balancer to create. Possible values are `application`, `gateway`, or `network`. The default value is `application`. 320 LoadBalancerType pulumi.StringPtrInput 321 // Name of the LB. This name must be unique within your AWS account, can have a maximum of 32 characters, must contain only alphanumeric characters or hyphens, and must not begin or end with a hyphen. If not specified, this provider will autogenerate a name beginning with `tf-lb`. 322 Name pulumi.StringPtrInput 323 // Creates a unique name beginning with the specified prefix. Conflicts with `name`. 324 NamePrefix pulumi.StringPtrInput 325 // Whether the Application Load Balancer should preserve the Host header in the HTTP request and send it to the target without any change. Defaults to `false`. 326 PreserveHostHeader pulumi.BoolPtrInput 327 // List of security group IDs to assign to the LB. Only valid for Load Balancers of type `application` or `network`. For load balancers of type `network` security groups cannot be added if none are currently present, and cannot all be removed once added. If either of these conditions are met, this will force a recreation of the resource. 328 SecurityGroups pulumi.StringArrayInput 329 // Subnet mapping block. See below. For Load Balancers of type `network` subnet mappings can only be added. 330 SubnetMappings LoadBalancerSubnetMappingArrayInput 331 // List of subnet IDs to attach to the LB. For Load Balancers of type `network` subnets can only be added (see [Availability Zones](https://docs.aws.amazon.com/elasticloadbalancing/latest/network/network-load-balancers.html#availability-zones)), deleting a subnet for load balancers of type `network` will force a recreation of the resource. 332 Subnets pulumi.StringArrayInput 333 // 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. 334 Tags pulumi.StringMapInput 335 // Map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. 336 // 337 // Deprecated: Please use `tags` instead. 338 TagsAll pulumi.StringMapInput 339 VpcId pulumi.StringPtrInput 340 // Determines how the load balancer modifies the `X-Forwarded-For` header in the HTTP request before sending the request to the target. The possible values are `append`, `preserve`, and `remove`. Only valid for Load Balancers of type `application`. The default is `append`. 341 XffHeaderProcessingMode pulumi.StringPtrInput 342 // Canonical hosted zone ID of the load balancer (to be used in a Route 53 Alias record). 343 ZoneId pulumi.StringPtrInput 344 } 345 346 func (LoadBalancerState) ElementType() reflect.Type { 347 return reflect.TypeOf((*loadBalancerState)(nil)).Elem() 348 } 349 350 type loadBalancerArgs struct { 351 // Access Logs block. See below. 352 AccessLogs *LoadBalancerAccessLogs `pulumi:"accessLogs"` 353 // Client keep alive value in seconds. The valid range is 60-604800 seconds. The default is 3600 seconds. 354 ClientKeepAlive *int `pulumi:"clientKeepAlive"` 355 // Connection Logs block. See below. Only valid for Load Balancers of type `application`. 356 ConnectionLogs *LoadBalancerConnectionLogs `pulumi:"connectionLogs"` 357 // ID of the customer owned ipv4 pool to use for this load balancer. 358 CustomerOwnedIpv4Pool *string `pulumi:"customerOwnedIpv4Pool"` 359 // How the load balancer handles requests that might pose a security risk to an application due to HTTP desync. Valid values are `monitor`, `defensive` (default), `strictest`. 360 DesyncMitigationMode *string `pulumi:"desyncMitigationMode"` 361 // How traffic is distributed among the load balancer Availability Zones. Possible values are `anyAvailabilityZone` (default), `availabilityZoneAffinity`, or `partialAvailabilityZoneAffinity`. See [Availability Zone DNS affinity](https://docs.aws.amazon.com/elasticloadbalancing/latest/network/network-load-balancers.html#zonal-dns-affinity) for additional details. Only valid for `network` type load balancers. 362 DnsRecordClientRoutingPolicy *string `pulumi:"dnsRecordClientRoutingPolicy"` 363 // Whether HTTP headers with header fields that are not valid are removed by the load balancer (true) or routed to targets (false). The default is false. Elastic Load Balancing requires that message header names contain only alphanumeric characters and hyphens. Only valid for Load Balancers of type `application`. 364 DropInvalidHeaderFields *bool `pulumi:"dropInvalidHeaderFields"` 365 // If true, cross-zone load balancing of the load balancer will be enabled. For `network` and `gateway` type load balancers, this feature is disabled by default (`false`). For `application` load balancer this feature is always enabled (`true`) and cannot be disabled. Defaults to `false`. 366 EnableCrossZoneLoadBalancing *bool `pulumi:"enableCrossZoneLoadBalancing"` 367 // If true, deletion of the load balancer will be disabled via the AWS API. This will prevent this provider from deleting the load balancer. Defaults to `false`. 368 EnableDeletionProtection *bool `pulumi:"enableDeletionProtection"` 369 // Whether HTTP/2 is enabled in `application` load balancers. Defaults to `true`. 370 EnableHttp2 *bool `pulumi:"enableHttp2"` 371 // Whether the two headers (`x-amzn-tls-version` and `x-amzn-tls-cipher-suite`), which contain information about the negotiated TLS version and cipher suite, are added to the client request before sending it to the target. Only valid for Load Balancers of type `application`. Defaults to `false` 372 EnableTlsVersionAndCipherSuiteHeaders *bool `pulumi:"enableTlsVersionAndCipherSuiteHeaders"` 373 // Whether to allow a WAF-enabled load balancer to route requests to targets if it is unable to forward the request to AWS WAF. Defaults to `false`. 374 EnableWafFailOpen *bool `pulumi:"enableWafFailOpen"` 375 // Whether the X-Forwarded-For header should preserve the source port that the client used to connect to the load balancer in `application` load balancers. Defaults to `false`. 376 EnableXffClientPort *bool `pulumi:"enableXffClientPort"` 377 // Whether inbound security group rules are enforced for traffic originating from a PrivateLink. Only valid for Load Balancers of type `network`. The possible values are `on` and `off`. 378 EnforceSecurityGroupInboundRulesOnPrivateLinkTraffic *string `pulumi:"enforceSecurityGroupInboundRulesOnPrivateLinkTraffic"` 379 // Time in seconds that the connection is allowed to be idle. Only valid for Load Balancers of type `application`. Default: 60. 380 IdleTimeout *int `pulumi:"idleTimeout"` 381 // If true, the LB will be internal. Defaults to `false`. 382 Internal *bool `pulumi:"internal"` 383 // Type of IP addresses used by the subnets for your load balancer. The possible values are `ipv4` and `dualstack`. 384 IpAddressType *string `pulumi:"ipAddressType"` 385 // Type of load balancer to create. Possible values are `application`, `gateway`, or `network`. The default value is `application`. 386 LoadBalancerType *string `pulumi:"loadBalancerType"` 387 // Name of the LB. This name must be unique within your AWS account, can have a maximum of 32 characters, must contain only alphanumeric characters or hyphens, and must not begin or end with a hyphen. If not specified, this provider will autogenerate a name beginning with `tf-lb`. 388 Name *string `pulumi:"name"` 389 // Creates a unique name beginning with the specified prefix. Conflicts with `name`. 390 NamePrefix *string `pulumi:"namePrefix"` 391 // Whether the Application Load Balancer should preserve the Host header in the HTTP request and send it to the target without any change. Defaults to `false`. 392 PreserveHostHeader *bool `pulumi:"preserveHostHeader"` 393 // List of security group IDs to assign to the LB. Only valid for Load Balancers of type `application` or `network`. For load balancers of type `network` security groups cannot be added if none are currently present, and cannot all be removed once added. If either of these conditions are met, this will force a recreation of the resource. 394 SecurityGroups []string `pulumi:"securityGroups"` 395 // Subnet mapping block. See below. For Load Balancers of type `network` subnet mappings can only be added. 396 SubnetMappings []LoadBalancerSubnetMapping `pulumi:"subnetMappings"` 397 // List of subnet IDs to attach to the LB. For Load Balancers of type `network` subnets can only be added (see [Availability Zones](https://docs.aws.amazon.com/elasticloadbalancing/latest/network/network-load-balancers.html#availability-zones)), deleting a subnet for load balancers of type `network` will force a recreation of the resource. 398 Subnets []string `pulumi:"subnets"` 399 // 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. 400 Tags map[string]string `pulumi:"tags"` 401 // Determines how the load balancer modifies the `X-Forwarded-For` header in the HTTP request before sending the request to the target. The possible values are `append`, `preserve`, and `remove`. Only valid for Load Balancers of type `application`. The default is `append`. 402 XffHeaderProcessingMode *string `pulumi:"xffHeaderProcessingMode"` 403 } 404 405 // The set of arguments for constructing a LoadBalancer resource. 406 type LoadBalancerArgs struct { 407 // Access Logs block. See below. 408 AccessLogs LoadBalancerAccessLogsPtrInput 409 // Client keep alive value in seconds. The valid range is 60-604800 seconds. The default is 3600 seconds. 410 ClientKeepAlive pulumi.IntPtrInput 411 // Connection Logs block. See below. Only valid for Load Balancers of type `application`. 412 ConnectionLogs LoadBalancerConnectionLogsPtrInput 413 // ID of the customer owned ipv4 pool to use for this load balancer. 414 CustomerOwnedIpv4Pool pulumi.StringPtrInput 415 // How the load balancer handles requests that might pose a security risk to an application due to HTTP desync. Valid values are `monitor`, `defensive` (default), `strictest`. 416 DesyncMitigationMode pulumi.StringPtrInput 417 // How traffic is distributed among the load balancer Availability Zones. Possible values are `anyAvailabilityZone` (default), `availabilityZoneAffinity`, or `partialAvailabilityZoneAffinity`. See [Availability Zone DNS affinity](https://docs.aws.amazon.com/elasticloadbalancing/latest/network/network-load-balancers.html#zonal-dns-affinity) for additional details. Only valid for `network` type load balancers. 418 DnsRecordClientRoutingPolicy pulumi.StringPtrInput 419 // Whether HTTP headers with header fields that are not valid are removed by the load balancer (true) or routed to targets (false). The default is false. Elastic Load Balancing requires that message header names contain only alphanumeric characters and hyphens. Only valid for Load Balancers of type `application`. 420 DropInvalidHeaderFields pulumi.BoolPtrInput 421 // If true, cross-zone load balancing of the load balancer will be enabled. For `network` and `gateway` type load balancers, this feature is disabled by default (`false`). For `application` load balancer this feature is always enabled (`true`) and cannot be disabled. Defaults to `false`. 422 EnableCrossZoneLoadBalancing pulumi.BoolPtrInput 423 // If true, deletion of the load balancer will be disabled via the AWS API. This will prevent this provider from deleting the load balancer. Defaults to `false`. 424 EnableDeletionProtection pulumi.BoolPtrInput 425 // Whether HTTP/2 is enabled in `application` load balancers. Defaults to `true`. 426 EnableHttp2 pulumi.BoolPtrInput 427 // Whether the two headers (`x-amzn-tls-version` and `x-amzn-tls-cipher-suite`), which contain information about the negotiated TLS version and cipher suite, are added to the client request before sending it to the target. Only valid for Load Balancers of type `application`. Defaults to `false` 428 EnableTlsVersionAndCipherSuiteHeaders pulumi.BoolPtrInput 429 // Whether to allow a WAF-enabled load balancer to route requests to targets if it is unable to forward the request to AWS WAF. Defaults to `false`. 430 EnableWafFailOpen pulumi.BoolPtrInput 431 // Whether the X-Forwarded-For header should preserve the source port that the client used to connect to the load balancer in `application` load balancers. Defaults to `false`. 432 EnableXffClientPort pulumi.BoolPtrInput 433 // Whether inbound security group rules are enforced for traffic originating from a PrivateLink. Only valid for Load Balancers of type `network`. The possible values are `on` and `off`. 434 EnforceSecurityGroupInboundRulesOnPrivateLinkTraffic pulumi.StringPtrInput 435 // Time in seconds that the connection is allowed to be idle. Only valid for Load Balancers of type `application`. Default: 60. 436 IdleTimeout pulumi.IntPtrInput 437 // If true, the LB will be internal. Defaults to `false`. 438 Internal pulumi.BoolPtrInput 439 // Type of IP addresses used by the subnets for your load balancer. The possible values are `ipv4` and `dualstack`. 440 IpAddressType pulumi.StringPtrInput 441 // Type of load balancer to create. Possible values are `application`, `gateway`, or `network`. The default value is `application`. 442 LoadBalancerType pulumi.StringPtrInput 443 // Name of the LB. This name must be unique within your AWS account, can have a maximum of 32 characters, must contain only alphanumeric characters or hyphens, and must not begin or end with a hyphen. If not specified, this provider will autogenerate a name beginning with `tf-lb`. 444 Name pulumi.StringPtrInput 445 // Creates a unique name beginning with the specified prefix. Conflicts with `name`. 446 NamePrefix pulumi.StringPtrInput 447 // Whether the Application Load Balancer should preserve the Host header in the HTTP request and send it to the target without any change. Defaults to `false`. 448 PreserveHostHeader pulumi.BoolPtrInput 449 // List of security group IDs to assign to the LB. Only valid for Load Balancers of type `application` or `network`. For load balancers of type `network` security groups cannot be added if none are currently present, and cannot all be removed once added. If either of these conditions are met, this will force a recreation of the resource. 450 SecurityGroups pulumi.StringArrayInput 451 // Subnet mapping block. See below. For Load Balancers of type `network` subnet mappings can only be added. 452 SubnetMappings LoadBalancerSubnetMappingArrayInput 453 // List of subnet IDs to attach to the LB. For Load Balancers of type `network` subnets can only be added (see [Availability Zones](https://docs.aws.amazon.com/elasticloadbalancing/latest/network/network-load-balancers.html#availability-zones)), deleting a subnet for load balancers of type `network` will force a recreation of the resource. 454 Subnets pulumi.StringArrayInput 455 // 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. 456 Tags pulumi.StringMapInput 457 // Determines how the load balancer modifies the `X-Forwarded-For` header in the HTTP request before sending the request to the target. The possible values are `append`, `preserve`, and `remove`. Only valid for Load Balancers of type `application`. The default is `append`. 458 XffHeaderProcessingMode pulumi.StringPtrInput 459 } 460 461 func (LoadBalancerArgs) ElementType() reflect.Type { 462 return reflect.TypeOf((*loadBalancerArgs)(nil)).Elem() 463 } 464 465 type LoadBalancerInput interface { 466 pulumi.Input 467 468 ToLoadBalancerOutput() LoadBalancerOutput 469 ToLoadBalancerOutputWithContext(ctx context.Context) LoadBalancerOutput 470 } 471 472 func (*LoadBalancer) ElementType() reflect.Type { 473 return reflect.TypeOf((**LoadBalancer)(nil)).Elem() 474 } 475 476 func (i *LoadBalancer) ToLoadBalancerOutput() LoadBalancerOutput { 477 return i.ToLoadBalancerOutputWithContext(context.Background()) 478 } 479 480 func (i *LoadBalancer) ToLoadBalancerOutputWithContext(ctx context.Context) LoadBalancerOutput { 481 return pulumi.ToOutputWithContext(ctx, i).(LoadBalancerOutput) 482 } 483 484 // LoadBalancerArrayInput is an input type that accepts LoadBalancerArray and LoadBalancerArrayOutput values. 485 // You can construct a concrete instance of `LoadBalancerArrayInput` via: 486 // 487 // LoadBalancerArray{ LoadBalancerArgs{...} } 488 type LoadBalancerArrayInput interface { 489 pulumi.Input 490 491 ToLoadBalancerArrayOutput() LoadBalancerArrayOutput 492 ToLoadBalancerArrayOutputWithContext(context.Context) LoadBalancerArrayOutput 493 } 494 495 type LoadBalancerArray []LoadBalancerInput 496 497 func (LoadBalancerArray) ElementType() reflect.Type { 498 return reflect.TypeOf((*[]*LoadBalancer)(nil)).Elem() 499 } 500 501 func (i LoadBalancerArray) ToLoadBalancerArrayOutput() LoadBalancerArrayOutput { 502 return i.ToLoadBalancerArrayOutputWithContext(context.Background()) 503 } 504 505 func (i LoadBalancerArray) ToLoadBalancerArrayOutputWithContext(ctx context.Context) LoadBalancerArrayOutput { 506 return pulumi.ToOutputWithContext(ctx, i).(LoadBalancerArrayOutput) 507 } 508 509 // LoadBalancerMapInput is an input type that accepts LoadBalancerMap and LoadBalancerMapOutput values. 510 // You can construct a concrete instance of `LoadBalancerMapInput` via: 511 // 512 // LoadBalancerMap{ "key": LoadBalancerArgs{...} } 513 type LoadBalancerMapInput interface { 514 pulumi.Input 515 516 ToLoadBalancerMapOutput() LoadBalancerMapOutput 517 ToLoadBalancerMapOutputWithContext(context.Context) LoadBalancerMapOutput 518 } 519 520 type LoadBalancerMap map[string]LoadBalancerInput 521 522 func (LoadBalancerMap) ElementType() reflect.Type { 523 return reflect.TypeOf((*map[string]*LoadBalancer)(nil)).Elem() 524 } 525 526 func (i LoadBalancerMap) ToLoadBalancerMapOutput() LoadBalancerMapOutput { 527 return i.ToLoadBalancerMapOutputWithContext(context.Background()) 528 } 529 530 func (i LoadBalancerMap) ToLoadBalancerMapOutputWithContext(ctx context.Context) LoadBalancerMapOutput { 531 return pulumi.ToOutputWithContext(ctx, i).(LoadBalancerMapOutput) 532 } 533 534 type LoadBalancerOutput struct{ *pulumi.OutputState } 535 536 func (LoadBalancerOutput) ElementType() reflect.Type { 537 return reflect.TypeOf((**LoadBalancer)(nil)).Elem() 538 } 539 540 func (o LoadBalancerOutput) ToLoadBalancerOutput() LoadBalancerOutput { 541 return o 542 } 543 544 func (o LoadBalancerOutput) ToLoadBalancerOutputWithContext(ctx context.Context) LoadBalancerOutput { 545 return o 546 } 547 548 // Access Logs block. See below. 549 func (o LoadBalancerOutput) AccessLogs() LoadBalancerAccessLogsPtrOutput { 550 return o.ApplyT(func(v *LoadBalancer) LoadBalancerAccessLogsPtrOutput { return v.AccessLogs }).(LoadBalancerAccessLogsPtrOutput) 551 } 552 553 // ARN of the load balancer (matches `id`). 554 func (o LoadBalancerOutput) Arn() pulumi.StringOutput { 555 return o.ApplyT(func(v *LoadBalancer) pulumi.StringOutput { return v.Arn }).(pulumi.StringOutput) 556 } 557 558 // ARN suffix for use with CloudWatch Metrics. 559 func (o LoadBalancerOutput) ArnSuffix() pulumi.StringOutput { 560 return o.ApplyT(func(v *LoadBalancer) pulumi.StringOutput { return v.ArnSuffix }).(pulumi.StringOutput) 561 } 562 563 // Client keep alive value in seconds. The valid range is 60-604800 seconds. The default is 3600 seconds. 564 func (o LoadBalancerOutput) ClientKeepAlive() pulumi.IntPtrOutput { 565 return o.ApplyT(func(v *LoadBalancer) pulumi.IntPtrOutput { return v.ClientKeepAlive }).(pulumi.IntPtrOutput) 566 } 567 568 // Connection Logs block. See below. Only valid for Load Balancers of type `application`. 569 func (o LoadBalancerOutput) ConnectionLogs() LoadBalancerConnectionLogsPtrOutput { 570 return o.ApplyT(func(v *LoadBalancer) LoadBalancerConnectionLogsPtrOutput { return v.ConnectionLogs }).(LoadBalancerConnectionLogsPtrOutput) 571 } 572 573 // ID of the customer owned ipv4 pool to use for this load balancer. 574 func (o LoadBalancerOutput) CustomerOwnedIpv4Pool() pulumi.StringPtrOutput { 575 return o.ApplyT(func(v *LoadBalancer) pulumi.StringPtrOutput { return v.CustomerOwnedIpv4Pool }).(pulumi.StringPtrOutput) 576 } 577 578 // How the load balancer handles requests that might pose a security risk to an application due to HTTP desync. Valid values are `monitor`, `defensive` (default), `strictest`. 579 func (o LoadBalancerOutput) DesyncMitigationMode() pulumi.StringPtrOutput { 580 return o.ApplyT(func(v *LoadBalancer) pulumi.StringPtrOutput { return v.DesyncMitigationMode }).(pulumi.StringPtrOutput) 581 } 582 583 // DNS name of the load balancer. 584 func (o LoadBalancerOutput) DnsName() pulumi.StringOutput { 585 return o.ApplyT(func(v *LoadBalancer) pulumi.StringOutput { return v.DnsName }).(pulumi.StringOutput) 586 } 587 588 // How traffic is distributed among the load balancer Availability Zones. Possible values are `anyAvailabilityZone` (default), `availabilityZoneAffinity`, or `partialAvailabilityZoneAffinity`. See [Availability Zone DNS affinity](https://docs.aws.amazon.com/elasticloadbalancing/latest/network/network-load-balancers.html#zonal-dns-affinity) for additional details. Only valid for `network` type load balancers. 589 func (o LoadBalancerOutput) DnsRecordClientRoutingPolicy() pulumi.StringPtrOutput { 590 return o.ApplyT(func(v *LoadBalancer) pulumi.StringPtrOutput { return v.DnsRecordClientRoutingPolicy }).(pulumi.StringPtrOutput) 591 } 592 593 // Whether HTTP headers with header fields that are not valid are removed by the load balancer (true) or routed to targets (false). The default is false. Elastic Load Balancing requires that message header names contain only alphanumeric characters and hyphens. Only valid for Load Balancers of type `application`. 594 func (o LoadBalancerOutput) DropInvalidHeaderFields() pulumi.BoolPtrOutput { 595 return o.ApplyT(func(v *LoadBalancer) pulumi.BoolPtrOutput { return v.DropInvalidHeaderFields }).(pulumi.BoolPtrOutput) 596 } 597 598 // If true, cross-zone load balancing of the load balancer will be enabled. For `network` and `gateway` type load balancers, this feature is disabled by default (`false`). For `application` load balancer this feature is always enabled (`true`) and cannot be disabled. Defaults to `false`. 599 func (o LoadBalancerOutput) EnableCrossZoneLoadBalancing() pulumi.BoolPtrOutput { 600 return o.ApplyT(func(v *LoadBalancer) pulumi.BoolPtrOutput { return v.EnableCrossZoneLoadBalancing }).(pulumi.BoolPtrOutput) 601 } 602 603 // If true, deletion of the load balancer will be disabled via the AWS API. This will prevent this provider from deleting the load balancer. Defaults to `false`. 604 func (o LoadBalancerOutput) EnableDeletionProtection() pulumi.BoolPtrOutput { 605 return o.ApplyT(func(v *LoadBalancer) pulumi.BoolPtrOutput { return v.EnableDeletionProtection }).(pulumi.BoolPtrOutput) 606 } 607 608 // Whether HTTP/2 is enabled in `application` load balancers. Defaults to `true`. 609 func (o LoadBalancerOutput) EnableHttp2() pulumi.BoolPtrOutput { 610 return o.ApplyT(func(v *LoadBalancer) pulumi.BoolPtrOutput { return v.EnableHttp2 }).(pulumi.BoolPtrOutput) 611 } 612 613 // Whether the two headers (`x-amzn-tls-version` and `x-amzn-tls-cipher-suite`), which contain information about the negotiated TLS version and cipher suite, are added to the client request before sending it to the target. Only valid for Load Balancers of type `application`. Defaults to `false` 614 func (o LoadBalancerOutput) EnableTlsVersionAndCipherSuiteHeaders() pulumi.BoolPtrOutput { 615 return o.ApplyT(func(v *LoadBalancer) pulumi.BoolPtrOutput { return v.EnableTlsVersionAndCipherSuiteHeaders }).(pulumi.BoolPtrOutput) 616 } 617 618 // Whether to allow a WAF-enabled load balancer to route requests to targets if it is unable to forward the request to AWS WAF. Defaults to `false`. 619 func (o LoadBalancerOutput) EnableWafFailOpen() pulumi.BoolPtrOutput { 620 return o.ApplyT(func(v *LoadBalancer) pulumi.BoolPtrOutput { return v.EnableWafFailOpen }).(pulumi.BoolPtrOutput) 621 } 622 623 // Whether the X-Forwarded-For header should preserve the source port that the client used to connect to the load balancer in `application` load balancers. Defaults to `false`. 624 func (o LoadBalancerOutput) EnableXffClientPort() pulumi.BoolPtrOutput { 625 return o.ApplyT(func(v *LoadBalancer) pulumi.BoolPtrOutput { return v.EnableXffClientPort }).(pulumi.BoolPtrOutput) 626 } 627 628 // Whether inbound security group rules are enforced for traffic originating from a PrivateLink. Only valid for Load Balancers of type `network`. The possible values are `on` and `off`. 629 func (o LoadBalancerOutput) EnforceSecurityGroupInboundRulesOnPrivateLinkTraffic() pulumi.StringOutput { 630 return o.ApplyT(func(v *LoadBalancer) pulumi.StringOutput { 631 return v.EnforceSecurityGroupInboundRulesOnPrivateLinkTraffic 632 }).(pulumi.StringOutput) 633 } 634 635 // Time in seconds that the connection is allowed to be idle. Only valid for Load Balancers of type `application`. Default: 60. 636 func (o LoadBalancerOutput) IdleTimeout() pulumi.IntPtrOutput { 637 return o.ApplyT(func(v *LoadBalancer) pulumi.IntPtrOutput { return v.IdleTimeout }).(pulumi.IntPtrOutput) 638 } 639 640 // If true, the LB will be internal. Defaults to `false`. 641 func (o LoadBalancerOutput) Internal() pulumi.BoolOutput { 642 return o.ApplyT(func(v *LoadBalancer) pulumi.BoolOutput { return v.Internal }).(pulumi.BoolOutput) 643 } 644 645 // Type of IP addresses used by the subnets for your load balancer. The possible values are `ipv4` and `dualstack`. 646 func (o LoadBalancerOutput) IpAddressType() pulumi.StringOutput { 647 return o.ApplyT(func(v *LoadBalancer) pulumi.StringOutput { return v.IpAddressType }).(pulumi.StringOutput) 648 } 649 650 // Type of load balancer to create. Possible values are `application`, `gateway`, or `network`. The default value is `application`. 651 func (o LoadBalancerOutput) LoadBalancerType() pulumi.StringPtrOutput { 652 return o.ApplyT(func(v *LoadBalancer) pulumi.StringPtrOutput { return v.LoadBalancerType }).(pulumi.StringPtrOutput) 653 } 654 655 // Name of the LB. This name must be unique within your AWS account, can have a maximum of 32 characters, must contain only alphanumeric characters or hyphens, and must not begin or end with a hyphen. If not specified, this provider will autogenerate a name beginning with `tf-lb`. 656 func (o LoadBalancerOutput) Name() pulumi.StringOutput { 657 return o.ApplyT(func(v *LoadBalancer) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) 658 } 659 660 // Creates a unique name beginning with the specified prefix. Conflicts with `name`. 661 func (o LoadBalancerOutput) NamePrefix() pulumi.StringOutput { 662 return o.ApplyT(func(v *LoadBalancer) pulumi.StringOutput { return v.NamePrefix }).(pulumi.StringOutput) 663 } 664 665 // Whether the Application Load Balancer should preserve the Host header in the HTTP request and send it to the target without any change. Defaults to `false`. 666 func (o LoadBalancerOutput) PreserveHostHeader() pulumi.BoolPtrOutput { 667 return o.ApplyT(func(v *LoadBalancer) pulumi.BoolPtrOutput { return v.PreserveHostHeader }).(pulumi.BoolPtrOutput) 668 } 669 670 // List of security group IDs to assign to the LB. Only valid for Load Balancers of type `application` or `network`. For load balancers of type `network` security groups cannot be added if none are currently present, and cannot all be removed once added. If either of these conditions are met, this will force a recreation of the resource. 671 func (o LoadBalancerOutput) SecurityGroups() pulumi.StringArrayOutput { 672 return o.ApplyT(func(v *LoadBalancer) pulumi.StringArrayOutput { return v.SecurityGroups }).(pulumi.StringArrayOutput) 673 } 674 675 // Subnet mapping block. See below. For Load Balancers of type `network` subnet mappings can only be added. 676 func (o LoadBalancerOutput) SubnetMappings() LoadBalancerSubnetMappingArrayOutput { 677 return o.ApplyT(func(v *LoadBalancer) LoadBalancerSubnetMappingArrayOutput { return v.SubnetMappings }).(LoadBalancerSubnetMappingArrayOutput) 678 } 679 680 // List of subnet IDs to attach to the LB. For Load Balancers of type `network` subnets can only be added (see [Availability Zones](https://docs.aws.amazon.com/elasticloadbalancing/latest/network/network-load-balancers.html#availability-zones)), deleting a subnet for load balancers of type `network` will force a recreation of the resource. 681 func (o LoadBalancerOutput) Subnets() pulumi.StringArrayOutput { 682 return o.ApplyT(func(v *LoadBalancer) pulumi.StringArrayOutput { return v.Subnets }).(pulumi.StringArrayOutput) 683 } 684 685 // 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. 686 func (o LoadBalancerOutput) Tags() pulumi.StringMapOutput { 687 return o.ApplyT(func(v *LoadBalancer) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput) 688 } 689 690 // Map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. 691 // 692 // Deprecated: Please use `tags` instead. 693 func (o LoadBalancerOutput) TagsAll() pulumi.StringMapOutput { 694 return o.ApplyT(func(v *LoadBalancer) pulumi.StringMapOutput { return v.TagsAll }).(pulumi.StringMapOutput) 695 } 696 697 func (o LoadBalancerOutput) VpcId() pulumi.StringOutput { 698 return o.ApplyT(func(v *LoadBalancer) pulumi.StringOutput { return v.VpcId }).(pulumi.StringOutput) 699 } 700 701 // Determines how the load balancer modifies the `X-Forwarded-For` header in the HTTP request before sending the request to the target. The possible values are `append`, `preserve`, and `remove`. Only valid for Load Balancers of type `application`. The default is `append`. 702 func (o LoadBalancerOutput) XffHeaderProcessingMode() pulumi.StringPtrOutput { 703 return o.ApplyT(func(v *LoadBalancer) pulumi.StringPtrOutput { return v.XffHeaderProcessingMode }).(pulumi.StringPtrOutput) 704 } 705 706 // Canonical hosted zone ID of the load balancer (to be used in a Route 53 Alias record). 707 func (o LoadBalancerOutput) ZoneId() pulumi.StringOutput { 708 return o.ApplyT(func(v *LoadBalancer) pulumi.StringOutput { return v.ZoneId }).(pulumi.StringOutput) 709 } 710 711 type LoadBalancerArrayOutput struct{ *pulumi.OutputState } 712 713 func (LoadBalancerArrayOutput) ElementType() reflect.Type { 714 return reflect.TypeOf((*[]*LoadBalancer)(nil)).Elem() 715 } 716 717 func (o LoadBalancerArrayOutput) ToLoadBalancerArrayOutput() LoadBalancerArrayOutput { 718 return o 719 } 720 721 func (o LoadBalancerArrayOutput) ToLoadBalancerArrayOutputWithContext(ctx context.Context) LoadBalancerArrayOutput { 722 return o 723 } 724 725 func (o LoadBalancerArrayOutput) Index(i pulumi.IntInput) LoadBalancerOutput { 726 return pulumi.All(o, i).ApplyT(func(vs []interface{}) *LoadBalancer { 727 return vs[0].([]*LoadBalancer)[vs[1].(int)] 728 }).(LoadBalancerOutput) 729 } 730 731 type LoadBalancerMapOutput struct{ *pulumi.OutputState } 732 733 func (LoadBalancerMapOutput) ElementType() reflect.Type { 734 return reflect.TypeOf((*map[string]*LoadBalancer)(nil)).Elem() 735 } 736 737 func (o LoadBalancerMapOutput) ToLoadBalancerMapOutput() LoadBalancerMapOutput { 738 return o 739 } 740 741 func (o LoadBalancerMapOutput) ToLoadBalancerMapOutputWithContext(ctx context.Context) LoadBalancerMapOutput { 742 return o 743 } 744 745 func (o LoadBalancerMapOutput) MapIndex(k pulumi.StringInput) LoadBalancerOutput { 746 return pulumi.All(o, k).ApplyT(func(vs []interface{}) *LoadBalancer { 747 return vs[0].(map[string]*LoadBalancer)[vs[1].(string)] 748 }).(LoadBalancerOutput) 749 } 750 751 func init() { 752 pulumi.RegisterInputType(reflect.TypeOf((*LoadBalancerInput)(nil)).Elem(), &LoadBalancer{}) 753 pulumi.RegisterInputType(reflect.TypeOf((*LoadBalancerArrayInput)(nil)).Elem(), LoadBalancerArray{}) 754 pulumi.RegisterInputType(reflect.TypeOf((*LoadBalancerMapInput)(nil)).Elem(), LoadBalancerMap{}) 755 pulumi.RegisterOutputType(LoadBalancerOutput{}) 756 pulumi.RegisterOutputType(LoadBalancerArrayOutput{}) 757 pulumi.RegisterOutputType(LoadBalancerMapOutput{}) 758 }