github.com/pulumi/pulumi-aws/sdk/v6@v6.32.0/go/aws/opsworks/haproxyLayer.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 opsworks
     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 an OpsWorks haproxy layer resource.
    16  //
    17  // ## Example Usage
    18  //
    19  // <!--Start PulumiCodeChooser -->
    20  // ```go
    21  // package main
    22  //
    23  // import (
    24  //
    25  //	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/opsworks"
    26  //	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    27  //
    28  // )
    29  //
    30  //	func main() {
    31  //		pulumi.Run(func(ctx *pulumi.Context) error {
    32  //			_, err := opsworks.NewHaproxyLayer(ctx, "lb", &opsworks.HaproxyLayerArgs{
    33  //				StackId:       pulumi.Any(main.Id),
    34  //				StatsPassword: pulumi.String("foobarbaz"),
    35  //			})
    36  //			if err != nil {
    37  //				return err
    38  //			}
    39  //			return nil
    40  //		})
    41  //	}
    42  //
    43  // ```
    44  // <!--End PulumiCodeChooser -->
    45  type HaproxyLayer struct {
    46  	pulumi.CustomResourceState
    47  
    48  	// The Amazon Resource Name(ARN) of the layer.
    49  	Arn pulumi.StringOutput `pulumi:"arn"`
    50  	// Whether to automatically assign an elastic IP address to the layer's instances.
    51  	AutoAssignElasticIps pulumi.BoolPtrOutput `pulumi:"autoAssignElasticIps"`
    52  	// For stacks belonging to a VPC, whether to automatically assign a public IP address to each of the layer's instances.
    53  	AutoAssignPublicIps pulumi.BoolPtrOutput `pulumi:"autoAssignPublicIps"`
    54  	// Whether to enable auto-healing for the layer.
    55  	AutoHealing             pulumi.BoolPtrOutput                         `pulumi:"autoHealing"`
    56  	CloudwatchConfiguration HaproxyLayerCloudwatchConfigurationPtrOutput `pulumi:"cloudwatchConfiguration"`
    57  	CustomConfigureRecipes  pulumi.StringArrayOutput                     `pulumi:"customConfigureRecipes"`
    58  	CustomDeployRecipes     pulumi.StringArrayOutput                     `pulumi:"customDeployRecipes"`
    59  	// The ARN of an IAM profile that will be used for the layer's instances.
    60  	CustomInstanceProfileArn pulumi.StringPtrOutput `pulumi:"customInstanceProfileArn"`
    61  	// Custom JSON attributes to apply to the layer.
    62  	CustomJson pulumi.StringPtrOutput `pulumi:"customJson"`
    63  	// Ids for a set of security groups to apply to the layer's instances.
    64  	CustomSecurityGroupIds pulumi.StringArrayOutput `pulumi:"customSecurityGroupIds"`
    65  	CustomSetupRecipes     pulumi.StringArrayOutput `pulumi:"customSetupRecipes"`
    66  	CustomShutdownRecipes  pulumi.StringArrayOutput `pulumi:"customShutdownRecipes"`
    67  	CustomUndeployRecipes  pulumi.StringArrayOutput `pulumi:"customUndeployRecipes"`
    68  	// Whether to enable Elastic Load Balancing connection draining.
    69  	DrainElbOnShutdown pulumi.BoolPtrOutput `pulumi:"drainElbOnShutdown"`
    70  	// `ebsVolume` blocks, as described below, will each create an EBS volume and connect it to the layer's instances.
    71  	EbsVolumes HaproxyLayerEbsVolumeArrayOutput `pulumi:"ebsVolumes"`
    72  	// Name of an Elastic Load Balancer to attach to this layer
    73  	ElasticLoadBalancer pulumi.StringPtrOutput `pulumi:"elasticLoadBalancer"`
    74  	// HTTP method to use for instance healthchecks. Defaults to "OPTIONS".
    75  	HealthcheckMethod pulumi.StringPtrOutput `pulumi:"healthcheckMethod"`
    76  	// URL path to use for instance healthchecks. Defaults to "/".
    77  	HealthcheckUrl pulumi.StringPtrOutput `pulumi:"healthcheckUrl"`
    78  	// Whether to install OS and package updates on each instance when it boots.
    79  	InstallUpdatesOnBoot pulumi.BoolPtrOutput `pulumi:"installUpdatesOnBoot"`
    80  	// The time, in seconds, that OpsWorks will wait for Chef to complete after triggering the Shutdown event.
    81  	InstanceShutdownTimeout pulumi.IntPtrOutput                    `pulumi:"instanceShutdownTimeout"`
    82  	LoadBasedAutoScaling    HaproxyLayerLoadBasedAutoScalingOutput `pulumi:"loadBasedAutoScaling"`
    83  	// A human-readable name for the layer.
    84  	Name pulumi.StringOutput `pulumi:"name"`
    85  	// ID of the stack the layer will belong to.
    86  	StackId pulumi.StringOutput `pulumi:"stackId"`
    87  	// Whether to enable HAProxy stats.
    88  	StatsEnabled pulumi.BoolPtrOutput `pulumi:"statsEnabled"`
    89  	// The password to use for HAProxy stats.
    90  	StatsPassword pulumi.StringOutput `pulumi:"statsPassword"`
    91  	// The HAProxy stats URL. Defaults to "/haproxy?stats".
    92  	StatsUrl pulumi.StringPtrOutput `pulumi:"statsUrl"`
    93  	// The username for HAProxy stats. Defaults to "opsworks".
    94  	StatsUser pulumi.StringPtrOutput `pulumi:"statsUser"`
    95  	// Names of a set of system packages to install on the layer's instances.
    96  	SystemPackages pulumi.StringArrayOutput `pulumi:"systemPackages"`
    97  	// 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.
    98  	//
    99  	// The following extra optional arguments, all lists of Chef recipe names, allow
   100  	// custom Chef recipes to be applied to layer instances at the five different
   101  	// lifecycle events, if custom cookbooks are enabled on the layer's stack:
   102  	Tags pulumi.StringMapOutput `pulumi:"tags"`
   103  	// A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
   104  	//
   105  	// Deprecated: Please use `tags` instead.
   106  	TagsAll pulumi.StringMapOutput `pulumi:"tagsAll"`
   107  	// Whether to use EBS-optimized instances.
   108  	UseEbsOptimizedInstances pulumi.BoolPtrOutput `pulumi:"useEbsOptimizedInstances"`
   109  }
   110  
   111  // NewHaproxyLayer registers a new resource with the given unique name, arguments, and options.
   112  func NewHaproxyLayer(ctx *pulumi.Context,
   113  	name string, args *HaproxyLayerArgs, opts ...pulumi.ResourceOption) (*HaproxyLayer, error) {
   114  	if args == nil {
   115  		return nil, errors.New("missing one or more required arguments")
   116  	}
   117  
   118  	if args.StackId == nil {
   119  		return nil, errors.New("invalid value for required argument 'StackId'")
   120  	}
   121  	if args.StatsPassword == nil {
   122  		return nil, errors.New("invalid value for required argument 'StatsPassword'")
   123  	}
   124  	opts = internal.PkgResourceDefaultOpts(opts)
   125  	var resource HaproxyLayer
   126  	err := ctx.RegisterResource("aws:opsworks/haproxyLayer:HaproxyLayer", name, args, &resource, opts...)
   127  	if err != nil {
   128  		return nil, err
   129  	}
   130  	return &resource, nil
   131  }
   132  
   133  // GetHaproxyLayer gets an existing HaproxyLayer resource's state with the given name, ID, and optional
   134  // state properties that are used to uniquely qualify the lookup (nil if not required).
   135  func GetHaproxyLayer(ctx *pulumi.Context,
   136  	name string, id pulumi.IDInput, state *HaproxyLayerState, opts ...pulumi.ResourceOption) (*HaproxyLayer, error) {
   137  	var resource HaproxyLayer
   138  	err := ctx.ReadResource("aws:opsworks/haproxyLayer:HaproxyLayer", name, id, state, &resource, opts...)
   139  	if err != nil {
   140  		return nil, err
   141  	}
   142  	return &resource, nil
   143  }
   144  
   145  // Input properties used for looking up and filtering HaproxyLayer resources.
   146  type haproxyLayerState struct {
   147  	// The Amazon Resource Name(ARN) of the layer.
   148  	Arn *string `pulumi:"arn"`
   149  	// Whether to automatically assign an elastic IP address to the layer's instances.
   150  	AutoAssignElasticIps *bool `pulumi:"autoAssignElasticIps"`
   151  	// For stacks belonging to a VPC, whether to automatically assign a public IP address to each of the layer's instances.
   152  	AutoAssignPublicIps *bool `pulumi:"autoAssignPublicIps"`
   153  	// Whether to enable auto-healing for the layer.
   154  	AutoHealing             *bool                                `pulumi:"autoHealing"`
   155  	CloudwatchConfiguration *HaproxyLayerCloudwatchConfiguration `pulumi:"cloudwatchConfiguration"`
   156  	CustomConfigureRecipes  []string                             `pulumi:"customConfigureRecipes"`
   157  	CustomDeployRecipes     []string                             `pulumi:"customDeployRecipes"`
   158  	// The ARN of an IAM profile that will be used for the layer's instances.
   159  	CustomInstanceProfileArn *string `pulumi:"customInstanceProfileArn"`
   160  	// Custom JSON attributes to apply to the layer.
   161  	CustomJson *string `pulumi:"customJson"`
   162  	// Ids for a set of security groups to apply to the layer's instances.
   163  	CustomSecurityGroupIds []string `pulumi:"customSecurityGroupIds"`
   164  	CustomSetupRecipes     []string `pulumi:"customSetupRecipes"`
   165  	CustomShutdownRecipes  []string `pulumi:"customShutdownRecipes"`
   166  	CustomUndeployRecipes  []string `pulumi:"customUndeployRecipes"`
   167  	// Whether to enable Elastic Load Balancing connection draining.
   168  	DrainElbOnShutdown *bool `pulumi:"drainElbOnShutdown"`
   169  	// `ebsVolume` blocks, as described below, will each create an EBS volume and connect it to the layer's instances.
   170  	EbsVolumes []HaproxyLayerEbsVolume `pulumi:"ebsVolumes"`
   171  	// Name of an Elastic Load Balancer to attach to this layer
   172  	ElasticLoadBalancer *string `pulumi:"elasticLoadBalancer"`
   173  	// HTTP method to use for instance healthchecks. Defaults to "OPTIONS".
   174  	HealthcheckMethod *string `pulumi:"healthcheckMethod"`
   175  	// URL path to use for instance healthchecks. Defaults to "/".
   176  	HealthcheckUrl *string `pulumi:"healthcheckUrl"`
   177  	// Whether to install OS and package updates on each instance when it boots.
   178  	InstallUpdatesOnBoot *bool `pulumi:"installUpdatesOnBoot"`
   179  	// The time, in seconds, that OpsWorks will wait for Chef to complete after triggering the Shutdown event.
   180  	InstanceShutdownTimeout *int                              `pulumi:"instanceShutdownTimeout"`
   181  	LoadBasedAutoScaling    *HaproxyLayerLoadBasedAutoScaling `pulumi:"loadBasedAutoScaling"`
   182  	// A human-readable name for the layer.
   183  	Name *string `pulumi:"name"`
   184  	// ID of the stack the layer will belong to.
   185  	StackId *string `pulumi:"stackId"`
   186  	// Whether to enable HAProxy stats.
   187  	StatsEnabled *bool `pulumi:"statsEnabled"`
   188  	// The password to use for HAProxy stats.
   189  	StatsPassword *string `pulumi:"statsPassword"`
   190  	// The HAProxy stats URL. Defaults to "/haproxy?stats".
   191  	StatsUrl *string `pulumi:"statsUrl"`
   192  	// The username for HAProxy stats. Defaults to "opsworks".
   193  	StatsUser *string `pulumi:"statsUser"`
   194  	// Names of a set of system packages to install on the layer's instances.
   195  	SystemPackages []string `pulumi:"systemPackages"`
   196  	// 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.
   197  	//
   198  	// The following extra optional arguments, all lists of Chef recipe names, allow
   199  	// custom Chef recipes to be applied to layer instances at the five different
   200  	// lifecycle events, if custom cookbooks are enabled on the layer's stack:
   201  	Tags map[string]string `pulumi:"tags"`
   202  	// A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
   203  	//
   204  	// Deprecated: Please use `tags` instead.
   205  	TagsAll map[string]string `pulumi:"tagsAll"`
   206  	// Whether to use EBS-optimized instances.
   207  	UseEbsOptimizedInstances *bool `pulumi:"useEbsOptimizedInstances"`
   208  }
   209  
   210  type HaproxyLayerState struct {
   211  	// The Amazon Resource Name(ARN) of the layer.
   212  	Arn pulumi.StringPtrInput
   213  	// Whether to automatically assign an elastic IP address to the layer's instances.
   214  	AutoAssignElasticIps pulumi.BoolPtrInput
   215  	// For stacks belonging to a VPC, whether to automatically assign a public IP address to each of the layer's instances.
   216  	AutoAssignPublicIps pulumi.BoolPtrInput
   217  	// Whether to enable auto-healing for the layer.
   218  	AutoHealing             pulumi.BoolPtrInput
   219  	CloudwatchConfiguration HaproxyLayerCloudwatchConfigurationPtrInput
   220  	CustomConfigureRecipes  pulumi.StringArrayInput
   221  	CustomDeployRecipes     pulumi.StringArrayInput
   222  	// The ARN of an IAM profile that will be used for the layer's instances.
   223  	CustomInstanceProfileArn pulumi.StringPtrInput
   224  	// Custom JSON attributes to apply to the layer.
   225  	CustomJson pulumi.StringPtrInput
   226  	// Ids for a set of security groups to apply to the layer's instances.
   227  	CustomSecurityGroupIds pulumi.StringArrayInput
   228  	CustomSetupRecipes     pulumi.StringArrayInput
   229  	CustomShutdownRecipes  pulumi.StringArrayInput
   230  	CustomUndeployRecipes  pulumi.StringArrayInput
   231  	// Whether to enable Elastic Load Balancing connection draining.
   232  	DrainElbOnShutdown pulumi.BoolPtrInput
   233  	// `ebsVolume` blocks, as described below, will each create an EBS volume and connect it to the layer's instances.
   234  	EbsVolumes HaproxyLayerEbsVolumeArrayInput
   235  	// Name of an Elastic Load Balancer to attach to this layer
   236  	ElasticLoadBalancer pulumi.StringPtrInput
   237  	// HTTP method to use for instance healthchecks. Defaults to "OPTIONS".
   238  	HealthcheckMethod pulumi.StringPtrInput
   239  	// URL path to use for instance healthchecks. Defaults to "/".
   240  	HealthcheckUrl pulumi.StringPtrInput
   241  	// Whether to install OS and package updates on each instance when it boots.
   242  	InstallUpdatesOnBoot pulumi.BoolPtrInput
   243  	// The time, in seconds, that OpsWorks will wait for Chef to complete after triggering the Shutdown event.
   244  	InstanceShutdownTimeout pulumi.IntPtrInput
   245  	LoadBasedAutoScaling    HaproxyLayerLoadBasedAutoScalingPtrInput
   246  	// A human-readable name for the layer.
   247  	Name pulumi.StringPtrInput
   248  	// ID of the stack the layer will belong to.
   249  	StackId pulumi.StringPtrInput
   250  	// Whether to enable HAProxy stats.
   251  	StatsEnabled pulumi.BoolPtrInput
   252  	// The password to use for HAProxy stats.
   253  	StatsPassword pulumi.StringPtrInput
   254  	// The HAProxy stats URL. Defaults to "/haproxy?stats".
   255  	StatsUrl pulumi.StringPtrInput
   256  	// The username for HAProxy stats. Defaults to "opsworks".
   257  	StatsUser pulumi.StringPtrInput
   258  	// Names of a set of system packages to install on the layer's instances.
   259  	SystemPackages pulumi.StringArrayInput
   260  	// 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.
   261  	//
   262  	// The following extra optional arguments, all lists of Chef recipe names, allow
   263  	// custom Chef recipes to be applied to layer instances at the five different
   264  	// lifecycle events, if custom cookbooks are enabled on the layer's stack:
   265  	Tags pulumi.StringMapInput
   266  	// A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
   267  	//
   268  	// Deprecated: Please use `tags` instead.
   269  	TagsAll pulumi.StringMapInput
   270  	// Whether to use EBS-optimized instances.
   271  	UseEbsOptimizedInstances pulumi.BoolPtrInput
   272  }
   273  
   274  func (HaproxyLayerState) ElementType() reflect.Type {
   275  	return reflect.TypeOf((*haproxyLayerState)(nil)).Elem()
   276  }
   277  
   278  type haproxyLayerArgs struct {
   279  	// Whether to automatically assign an elastic IP address to the layer's instances.
   280  	AutoAssignElasticIps *bool `pulumi:"autoAssignElasticIps"`
   281  	// For stacks belonging to a VPC, whether to automatically assign a public IP address to each of the layer's instances.
   282  	AutoAssignPublicIps *bool `pulumi:"autoAssignPublicIps"`
   283  	// Whether to enable auto-healing for the layer.
   284  	AutoHealing             *bool                                `pulumi:"autoHealing"`
   285  	CloudwatchConfiguration *HaproxyLayerCloudwatchConfiguration `pulumi:"cloudwatchConfiguration"`
   286  	CustomConfigureRecipes  []string                             `pulumi:"customConfigureRecipes"`
   287  	CustomDeployRecipes     []string                             `pulumi:"customDeployRecipes"`
   288  	// The ARN of an IAM profile that will be used for the layer's instances.
   289  	CustomInstanceProfileArn *string `pulumi:"customInstanceProfileArn"`
   290  	// Custom JSON attributes to apply to the layer.
   291  	CustomJson *string `pulumi:"customJson"`
   292  	// Ids for a set of security groups to apply to the layer's instances.
   293  	CustomSecurityGroupIds []string `pulumi:"customSecurityGroupIds"`
   294  	CustomSetupRecipes     []string `pulumi:"customSetupRecipes"`
   295  	CustomShutdownRecipes  []string `pulumi:"customShutdownRecipes"`
   296  	CustomUndeployRecipes  []string `pulumi:"customUndeployRecipes"`
   297  	// Whether to enable Elastic Load Balancing connection draining.
   298  	DrainElbOnShutdown *bool `pulumi:"drainElbOnShutdown"`
   299  	// `ebsVolume` blocks, as described below, will each create an EBS volume and connect it to the layer's instances.
   300  	EbsVolumes []HaproxyLayerEbsVolume `pulumi:"ebsVolumes"`
   301  	// Name of an Elastic Load Balancer to attach to this layer
   302  	ElasticLoadBalancer *string `pulumi:"elasticLoadBalancer"`
   303  	// HTTP method to use for instance healthchecks. Defaults to "OPTIONS".
   304  	HealthcheckMethod *string `pulumi:"healthcheckMethod"`
   305  	// URL path to use for instance healthchecks. Defaults to "/".
   306  	HealthcheckUrl *string `pulumi:"healthcheckUrl"`
   307  	// Whether to install OS and package updates on each instance when it boots.
   308  	InstallUpdatesOnBoot *bool `pulumi:"installUpdatesOnBoot"`
   309  	// The time, in seconds, that OpsWorks will wait for Chef to complete after triggering the Shutdown event.
   310  	InstanceShutdownTimeout *int                              `pulumi:"instanceShutdownTimeout"`
   311  	LoadBasedAutoScaling    *HaproxyLayerLoadBasedAutoScaling `pulumi:"loadBasedAutoScaling"`
   312  	// A human-readable name for the layer.
   313  	Name *string `pulumi:"name"`
   314  	// ID of the stack the layer will belong to.
   315  	StackId string `pulumi:"stackId"`
   316  	// Whether to enable HAProxy stats.
   317  	StatsEnabled *bool `pulumi:"statsEnabled"`
   318  	// The password to use for HAProxy stats.
   319  	StatsPassword string `pulumi:"statsPassword"`
   320  	// The HAProxy stats URL. Defaults to "/haproxy?stats".
   321  	StatsUrl *string `pulumi:"statsUrl"`
   322  	// The username for HAProxy stats. Defaults to "opsworks".
   323  	StatsUser *string `pulumi:"statsUser"`
   324  	// Names of a set of system packages to install on the layer's instances.
   325  	SystemPackages []string `pulumi:"systemPackages"`
   326  	// 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.
   327  	//
   328  	// The following extra optional arguments, all lists of Chef recipe names, allow
   329  	// custom Chef recipes to be applied to layer instances at the five different
   330  	// lifecycle events, if custom cookbooks are enabled on the layer's stack:
   331  	Tags map[string]string `pulumi:"tags"`
   332  	// Whether to use EBS-optimized instances.
   333  	UseEbsOptimizedInstances *bool `pulumi:"useEbsOptimizedInstances"`
   334  }
   335  
   336  // The set of arguments for constructing a HaproxyLayer resource.
   337  type HaproxyLayerArgs struct {
   338  	// Whether to automatically assign an elastic IP address to the layer's instances.
   339  	AutoAssignElasticIps pulumi.BoolPtrInput
   340  	// For stacks belonging to a VPC, whether to automatically assign a public IP address to each of the layer's instances.
   341  	AutoAssignPublicIps pulumi.BoolPtrInput
   342  	// Whether to enable auto-healing for the layer.
   343  	AutoHealing             pulumi.BoolPtrInput
   344  	CloudwatchConfiguration HaproxyLayerCloudwatchConfigurationPtrInput
   345  	CustomConfigureRecipes  pulumi.StringArrayInput
   346  	CustomDeployRecipes     pulumi.StringArrayInput
   347  	// The ARN of an IAM profile that will be used for the layer's instances.
   348  	CustomInstanceProfileArn pulumi.StringPtrInput
   349  	// Custom JSON attributes to apply to the layer.
   350  	CustomJson pulumi.StringPtrInput
   351  	// Ids for a set of security groups to apply to the layer's instances.
   352  	CustomSecurityGroupIds pulumi.StringArrayInput
   353  	CustomSetupRecipes     pulumi.StringArrayInput
   354  	CustomShutdownRecipes  pulumi.StringArrayInput
   355  	CustomUndeployRecipes  pulumi.StringArrayInput
   356  	// Whether to enable Elastic Load Balancing connection draining.
   357  	DrainElbOnShutdown pulumi.BoolPtrInput
   358  	// `ebsVolume` blocks, as described below, will each create an EBS volume and connect it to the layer's instances.
   359  	EbsVolumes HaproxyLayerEbsVolumeArrayInput
   360  	// Name of an Elastic Load Balancer to attach to this layer
   361  	ElasticLoadBalancer pulumi.StringPtrInput
   362  	// HTTP method to use for instance healthchecks. Defaults to "OPTIONS".
   363  	HealthcheckMethod pulumi.StringPtrInput
   364  	// URL path to use for instance healthchecks. Defaults to "/".
   365  	HealthcheckUrl pulumi.StringPtrInput
   366  	// Whether to install OS and package updates on each instance when it boots.
   367  	InstallUpdatesOnBoot pulumi.BoolPtrInput
   368  	// The time, in seconds, that OpsWorks will wait for Chef to complete after triggering the Shutdown event.
   369  	InstanceShutdownTimeout pulumi.IntPtrInput
   370  	LoadBasedAutoScaling    HaproxyLayerLoadBasedAutoScalingPtrInput
   371  	// A human-readable name for the layer.
   372  	Name pulumi.StringPtrInput
   373  	// ID of the stack the layer will belong to.
   374  	StackId pulumi.StringInput
   375  	// Whether to enable HAProxy stats.
   376  	StatsEnabled pulumi.BoolPtrInput
   377  	// The password to use for HAProxy stats.
   378  	StatsPassword pulumi.StringInput
   379  	// The HAProxy stats URL. Defaults to "/haproxy?stats".
   380  	StatsUrl pulumi.StringPtrInput
   381  	// The username for HAProxy stats. Defaults to "opsworks".
   382  	StatsUser pulumi.StringPtrInput
   383  	// Names of a set of system packages to install on the layer's instances.
   384  	SystemPackages pulumi.StringArrayInput
   385  	// 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.
   386  	//
   387  	// The following extra optional arguments, all lists of Chef recipe names, allow
   388  	// custom Chef recipes to be applied to layer instances at the five different
   389  	// lifecycle events, if custom cookbooks are enabled on the layer's stack:
   390  	Tags pulumi.StringMapInput
   391  	// Whether to use EBS-optimized instances.
   392  	UseEbsOptimizedInstances pulumi.BoolPtrInput
   393  }
   394  
   395  func (HaproxyLayerArgs) ElementType() reflect.Type {
   396  	return reflect.TypeOf((*haproxyLayerArgs)(nil)).Elem()
   397  }
   398  
   399  type HaproxyLayerInput interface {
   400  	pulumi.Input
   401  
   402  	ToHaproxyLayerOutput() HaproxyLayerOutput
   403  	ToHaproxyLayerOutputWithContext(ctx context.Context) HaproxyLayerOutput
   404  }
   405  
   406  func (*HaproxyLayer) ElementType() reflect.Type {
   407  	return reflect.TypeOf((**HaproxyLayer)(nil)).Elem()
   408  }
   409  
   410  func (i *HaproxyLayer) ToHaproxyLayerOutput() HaproxyLayerOutput {
   411  	return i.ToHaproxyLayerOutputWithContext(context.Background())
   412  }
   413  
   414  func (i *HaproxyLayer) ToHaproxyLayerOutputWithContext(ctx context.Context) HaproxyLayerOutput {
   415  	return pulumi.ToOutputWithContext(ctx, i).(HaproxyLayerOutput)
   416  }
   417  
   418  // HaproxyLayerArrayInput is an input type that accepts HaproxyLayerArray and HaproxyLayerArrayOutput values.
   419  // You can construct a concrete instance of `HaproxyLayerArrayInput` via:
   420  //
   421  //	HaproxyLayerArray{ HaproxyLayerArgs{...} }
   422  type HaproxyLayerArrayInput interface {
   423  	pulumi.Input
   424  
   425  	ToHaproxyLayerArrayOutput() HaproxyLayerArrayOutput
   426  	ToHaproxyLayerArrayOutputWithContext(context.Context) HaproxyLayerArrayOutput
   427  }
   428  
   429  type HaproxyLayerArray []HaproxyLayerInput
   430  
   431  func (HaproxyLayerArray) ElementType() reflect.Type {
   432  	return reflect.TypeOf((*[]*HaproxyLayer)(nil)).Elem()
   433  }
   434  
   435  func (i HaproxyLayerArray) ToHaproxyLayerArrayOutput() HaproxyLayerArrayOutput {
   436  	return i.ToHaproxyLayerArrayOutputWithContext(context.Background())
   437  }
   438  
   439  func (i HaproxyLayerArray) ToHaproxyLayerArrayOutputWithContext(ctx context.Context) HaproxyLayerArrayOutput {
   440  	return pulumi.ToOutputWithContext(ctx, i).(HaproxyLayerArrayOutput)
   441  }
   442  
   443  // HaproxyLayerMapInput is an input type that accepts HaproxyLayerMap and HaproxyLayerMapOutput values.
   444  // You can construct a concrete instance of `HaproxyLayerMapInput` via:
   445  //
   446  //	HaproxyLayerMap{ "key": HaproxyLayerArgs{...} }
   447  type HaproxyLayerMapInput interface {
   448  	pulumi.Input
   449  
   450  	ToHaproxyLayerMapOutput() HaproxyLayerMapOutput
   451  	ToHaproxyLayerMapOutputWithContext(context.Context) HaproxyLayerMapOutput
   452  }
   453  
   454  type HaproxyLayerMap map[string]HaproxyLayerInput
   455  
   456  func (HaproxyLayerMap) ElementType() reflect.Type {
   457  	return reflect.TypeOf((*map[string]*HaproxyLayer)(nil)).Elem()
   458  }
   459  
   460  func (i HaproxyLayerMap) ToHaproxyLayerMapOutput() HaproxyLayerMapOutput {
   461  	return i.ToHaproxyLayerMapOutputWithContext(context.Background())
   462  }
   463  
   464  func (i HaproxyLayerMap) ToHaproxyLayerMapOutputWithContext(ctx context.Context) HaproxyLayerMapOutput {
   465  	return pulumi.ToOutputWithContext(ctx, i).(HaproxyLayerMapOutput)
   466  }
   467  
   468  type HaproxyLayerOutput struct{ *pulumi.OutputState }
   469  
   470  func (HaproxyLayerOutput) ElementType() reflect.Type {
   471  	return reflect.TypeOf((**HaproxyLayer)(nil)).Elem()
   472  }
   473  
   474  func (o HaproxyLayerOutput) ToHaproxyLayerOutput() HaproxyLayerOutput {
   475  	return o
   476  }
   477  
   478  func (o HaproxyLayerOutput) ToHaproxyLayerOutputWithContext(ctx context.Context) HaproxyLayerOutput {
   479  	return o
   480  }
   481  
   482  // The Amazon Resource Name(ARN) of the layer.
   483  func (o HaproxyLayerOutput) Arn() pulumi.StringOutput {
   484  	return o.ApplyT(func(v *HaproxyLayer) pulumi.StringOutput { return v.Arn }).(pulumi.StringOutput)
   485  }
   486  
   487  // Whether to automatically assign an elastic IP address to the layer's instances.
   488  func (o HaproxyLayerOutput) AutoAssignElasticIps() pulumi.BoolPtrOutput {
   489  	return o.ApplyT(func(v *HaproxyLayer) pulumi.BoolPtrOutput { return v.AutoAssignElasticIps }).(pulumi.BoolPtrOutput)
   490  }
   491  
   492  // For stacks belonging to a VPC, whether to automatically assign a public IP address to each of the layer's instances.
   493  func (o HaproxyLayerOutput) AutoAssignPublicIps() pulumi.BoolPtrOutput {
   494  	return o.ApplyT(func(v *HaproxyLayer) pulumi.BoolPtrOutput { return v.AutoAssignPublicIps }).(pulumi.BoolPtrOutput)
   495  }
   496  
   497  // Whether to enable auto-healing for the layer.
   498  func (o HaproxyLayerOutput) AutoHealing() pulumi.BoolPtrOutput {
   499  	return o.ApplyT(func(v *HaproxyLayer) pulumi.BoolPtrOutput { return v.AutoHealing }).(pulumi.BoolPtrOutput)
   500  }
   501  
   502  func (o HaproxyLayerOutput) CloudwatchConfiguration() HaproxyLayerCloudwatchConfigurationPtrOutput {
   503  	return o.ApplyT(func(v *HaproxyLayer) HaproxyLayerCloudwatchConfigurationPtrOutput { return v.CloudwatchConfiguration }).(HaproxyLayerCloudwatchConfigurationPtrOutput)
   504  }
   505  
   506  func (o HaproxyLayerOutput) CustomConfigureRecipes() pulumi.StringArrayOutput {
   507  	return o.ApplyT(func(v *HaproxyLayer) pulumi.StringArrayOutput { return v.CustomConfigureRecipes }).(pulumi.StringArrayOutput)
   508  }
   509  
   510  func (o HaproxyLayerOutput) CustomDeployRecipes() pulumi.StringArrayOutput {
   511  	return o.ApplyT(func(v *HaproxyLayer) pulumi.StringArrayOutput { return v.CustomDeployRecipes }).(pulumi.StringArrayOutput)
   512  }
   513  
   514  // The ARN of an IAM profile that will be used for the layer's instances.
   515  func (o HaproxyLayerOutput) CustomInstanceProfileArn() pulumi.StringPtrOutput {
   516  	return o.ApplyT(func(v *HaproxyLayer) pulumi.StringPtrOutput { return v.CustomInstanceProfileArn }).(pulumi.StringPtrOutput)
   517  }
   518  
   519  // Custom JSON attributes to apply to the layer.
   520  func (o HaproxyLayerOutput) CustomJson() pulumi.StringPtrOutput {
   521  	return o.ApplyT(func(v *HaproxyLayer) pulumi.StringPtrOutput { return v.CustomJson }).(pulumi.StringPtrOutput)
   522  }
   523  
   524  // Ids for a set of security groups to apply to the layer's instances.
   525  func (o HaproxyLayerOutput) CustomSecurityGroupIds() pulumi.StringArrayOutput {
   526  	return o.ApplyT(func(v *HaproxyLayer) pulumi.StringArrayOutput { return v.CustomSecurityGroupIds }).(pulumi.StringArrayOutput)
   527  }
   528  
   529  func (o HaproxyLayerOutput) CustomSetupRecipes() pulumi.StringArrayOutput {
   530  	return o.ApplyT(func(v *HaproxyLayer) pulumi.StringArrayOutput { return v.CustomSetupRecipes }).(pulumi.StringArrayOutput)
   531  }
   532  
   533  func (o HaproxyLayerOutput) CustomShutdownRecipes() pulumi.StringArrayOutput {
   534  	return o.ApplyT(func(v *HaproxyLayer) pulumi.StringArrayOutput { return v.CustomShutdownRecipes }).(pulumi.StringArrayOutput)
   535  }
   536  
   537  func (o HaproxyLayerOutput) CustomUndeployRecipes() pulumi.StringArrayOutput {
   538  	return o.ApplyT(func(v *HaproxyLayer) pulumi.StringArrayOutput { return v.CustomUndeployRecipes }).(pulumi.StringArrayOutput)
   539  }
   540  
   541  // Whether to enable Elastic Load Balancing connection draining.
   542  func (o HaproxyLayerOutput) DrainElbOnShutdown() pulumi.BoolPtrOutput {
   543  	return o.ApplyT(func(v *HaproxyLayer) pulumi.BoolPtrOutput { return v.DrainElbOnShutdown }).(pulumi.BoolPtrOutput)
   544  }
   545  
   546  // `ebsVolume` blocks, as described below, will each create an EBS volume and connect it to the layer's instances.
   547  func (o HaproxyLayerOutput) EbsVolumes() HaproxyLayerEbsVolumeArrayOutput {
   548  	return o.ApplyT(func(v *HaproxyLayer) HaproxyLayerEbsVolumeArrayOutput { return v.EbsVolumes }).(HaproxyLayerEbsVolumeArrayOutput)
   549  }
   550  
   551  // Name of an Elastic Load Balancer to attach to this layer
   552  func (o HaproxyLayerOutput) ElasticLoadBalancer() pulumi.StringPtrOutput {
   553  	return o.ApplyT(func(v *HaproxyLayer) pulumi.StringPtrOutput { return v.ElasticLoadBalancer }).(pulumi.StringPtrOutput)
   554  }
   555  
   556  // HTTP method to use for instance healthchecks. Defaults to "OPTIONS".
   557  func (o HaproxyLayerOutput) HealthcheckMethod() pulumi.StringPtrOutput {
   558  	return o.ApplyT(func(v *HaproxyLayer) pulumi.StringPtrOutput { return v.HealthcheckMethod }).(pulumi.StringPtrOutput)
   559  }
   560  
   561  // URL path to use for instance healthchecks. Defaults to "/".
   562  func (o HaproxyLayerOutput) HealthcheckUrl() pulumi.StringPtrOutput {
   563  	return o.ApplyT(func(v *HaproxyLayer) pulumi.StringPtrOutput { return v.HealthcheckUrl }).(pulumi.StringPtrOutput)
   564  }
   565  
   566  // Whether to install OS and package updates on each instance when it boots.
   567  func (o HaproxyLayerOutput) InstallUpdatesOnBoot() pulumi.BoolPtrOutput {
   568  	return o.ApplyT(func(v *HaproxyLayer) pulumi.BoolPtrOutput { return v.InstallUpdatesOnBoot }).(pulumi.BoolPtrOutput)
   569  }
   570  
   571  // The time, in seconds, that OpsWorks will wait for Chef to complete after triggering the Shutdown event.
   572  func (o HaproxyLayerOutput) InstanceShutdownTimeout() pulumi.IntPtrOutput {
   573  	return o.ApplyT(func(v *HaproxyLayer) pulumi.IntPtrOutput { return v.InstanceShutdownTimeout }).(pulumi.IntPtrOutput)
   574  }
   575  
   576  func (o HaproxyLayerOutput) LoadBasedAutoScaling() HaproxyLayerLoadBasedAutoScalingOutput {
   577  	return o.ApplyT(func(v *HaproxyLayer) HaproxyLayerLoadBasedAutoScalingOutput { return v.LoadBasedAutoScaling }).(HaproxyLayerLoadBasedAutoScalingOutput)
   578  }
   579  
   580  // A human-readable name for the layer.
   581  func (o HaproxyLayerOutput) Name() pulumi.StringOutput {
   582  	return o.ApplyT(func(v *HaproxyLayer) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
   583  }
   584  
   585  // ID of the stack the layer will belong to.
   586  func (o HaproxyLayerOutput) StackId() pulumi.StringOutput {
   587  	return o.ApplyT(func(v *HaproxyLayer) pulumi.StringOutput { return v.StackId }).(pulumi.StringOutput)
   588  }
   589  
   590  // Whether to enable HAProxy stats.
   591  func (o HaproxyLayerOutput) StatsEnabled() pulumi.BoolPtrOutput {
   592  	return o.ApplyT(func(v *HaproxyLayer) pulumi.BoolPtrOutput { return v.StatsEnabled }).(pulumi.BoolPtrOutput)
   593  }
   594  
   595  // The password to use for HAProxy stats.
   596  func (o HaproxyLayerOutput) StatsPassword() pulumi.StringOutput {
   597  	return o.ApplyT(func(v *HaproxyLayer) pulumi.StringOutput { return v.StatsPassword }).(pulumi.StringOutput)
   598  }
   599  
   600  // The HAProxy stats URL. Defaults to "/haproxy?stats".
   601  func (o HaproxyLayerOutput) StatsUrl() pulumi.StringPtrOutput {
   602  	return o.ApplyT(func(v *HaproxyLayer) pulumi.StringPtrOutput { return v.StatsUrl }).(pulumi.StringPtrOutput)
   603  }
   604  
   605  // The username for HAProxy stats. Defaults to "opsworks".
   606  func (o HaproxyLayerOutput) StatsUser() pulumi.StringPtrOutput {
   607  	return o.ApplyT(func(v *HaproxyLayer) pulumi.StringPtrOutput { return v.StatsUser }).(pulumi.StringPtrOutput)
   608  }
   609  
   610  // Names of a set of system packages to install on the layer's instances.
   611  func (o HaproxyLayerOutput) SystemPackages() pulumi.StringArrayOutput {
   612  	return o.ApplyT(func(v *HaproxyLayer) pulumi.StringArrayOutput { return v.SystemPackages }).(pulumi.StringArrayOutput)
   613  }
   614  
   615  // 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.
   616  //
   617  // The following extra optional arguments, all lists of Chef recipe names, allow
   618  // custom Chef recipes to be applied to layer instances at the five different
   619  // lifecycle events, if custom cookbooks are enabled on the layer's stack:
   620  func (o HaproxyLayerOutput) Tags() pulumi.StringMapOutput {
   621  	return o.ApplyT(func(v *HaproxyLayer) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput)
   622  }
   623  
   624  // A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
   625  //
   626  // Deprecated: Please use `tags` instead.
   627  func (o HaproxyLayerOutput) TagsAll() pulumi.StringMapOutput {
   628  	return o.ApplyT(func(v *HaproxyLayer) pulumi.StringMapOutput { return v.TagsAll }).(pulumi.StringMapOutput)
   629  }
   630  
   631  // Whether to use EBS-optimized instances.
   632  func (o HaproxyLayerOutput) UseEbsOptimizedInstances() pulumi.BoolPtrOutput {
   633  	return o.ApplyT(func(v *HaproxyLayer) pulumi.BoolPtrOutput { return v.UseEbsOptimizedInstances }).(pulumi.BoolPtrOutput)
   634  }
   635  
   636  type HaproxyLayerArrayOutput struct{ *pulumi.OutputState }
   637  
   638  func (HaproxyLayerArrayOutput) ElementType() reflect.Type {
   639  	return reflect.TypeOf((*[]*HaproxyLayer)(nil)).Elem()
   640  }
   641  
   642  func (o HaproxyLayerArrayOutput) ToHaproxyLayerArrayOutput() HaproxyLayerArrayOutput {
   643  	return o
   644  }
   645  
   646  func (o HaproxyLayerArrayOutput) ToHaproxyLayerArrayOutputWithContext(ctx context.Context) HaproxyLayerArrayOutput {
   647  	return o
   648  }
   649  
   650  func (o HaproxyLayerArrayOutput) Index(i pulumi.IntInput) HaproxyLayerOutput {
   651  	return pulumi.All(o, i).ApplyT(func(vs []interface{}) *HaproxyLayer {
   652  		return vs[0].([]*HaproxyLayer)[vs[1].(int)]
   653  	}).(HaproxyLayerOutput)
   654  }
   655  
   656  type HaproxyLayerMapOutput struct{ *pulumi.OutputState }
   657  
   658  func (HaproxyLayerMapOutput) ElementType() reflect.Type {
   659  	return reflect.TypeOf((*map[string]*HaproxyLayer)(nil)).Elem()
   660  }
   661  
   662  func (o HaproxyLayerMapOutput) ToHaproxyLayerMapOutput() HaproxyLayerMapOutput {
   663  	return o
   664  }
   665  
   666  func (o HaproxyLayerMapOutput) ToHaproxyLayerMapOutputWithContext(ctx context.Context) HaproxyLayerMapOutput {
   667  	return o
   668  }
   669  
   670  func (o HaproxyLayerMapOutput) MapIndex(k pulumi.StringInput) HaproxyLayerOutput {
   671  	return pulumi.All(o, k).ApplyT(func(vs []interface{}) *HaproxyLayer {
   672  		return vs[0].(map[string]*HaproxyLayer)[vs[1].(string)]
   673  	}).(HaproxyLayerOutput)
   674  }
   675  
   676  func init() {
   677  	pulumi.RegisterInputType(reflect.TypeOf((*HaproxyLayerInput)(nil)).Elem(), &HaproxyLayer{})
   678  	pulumi.RegisterInputType(reflect.TypeOf((*HaproxyLayerArrayInput)(nil)).Elem(), HaproxyLayerArray{})
   679  	pulumi.RegisterInputType(reflect.TypeOf((*HaproxyLayerMapInput)(nil)).Elem(), HaproxyLayerMap{})
   680  	pulumi.RegisterOutputType(HaproxyLayerOutput{})
   681  	pulumi.RegisterOutputType(HaproxyLayerArrayOutput{})
   682  	pulumi.RegisterOutputType(HaproxyLayerMapOutput{})
   683  }