github.com/pulumi/pulumi-aws/sdk/v6@v6.32.0/go/aws/batch/computeEnvironment.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 batch
     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  // Creates a AWS Batch compute environment. Compute environments contain the Amazon ECS container instances that are used to run containerized batch jobs.
    16  //
    17  // For information about AWS Batch, see [What is AWS Batch?](http://docs.aws.amazon.com/batch/latest/userguide/what-is-batch.html) .
    18  // For information about compute environment, see [Compute Environments](http://docs.aws.amazon.com/batch/latest/userguide/compute_environments.html) .
    19  //
    20  // > **Note:** To prevent a race condition during environment deletion, make sure to set `dependsOn` to the related `iam.RolePolicyAttachment`;
    21  // otherwise, the policy may be destroyed too soon and the compute environment will then get stuck in the `DELETING` state, see [Troubleshooting AWS Batch](http://docs.aws.amazon.com/batch/latest/userguide/troubleshooting.html) .
    22  //
    23  // ## Example Usage
    24  //
    25  // ### EC2 Type
    26  //
    27  // <!--Start PulumiCodeChooser -->
    28  // ```go
    29  // package main
    30  //
    31  // import (
    32  //
    33  //	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/batch"
    34  //	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2"
    35  //	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/iam"
    36  //	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    37  //
    38  // )
    39  //
    40  //	func main() {
    41  //		pulumi.Run(func(ctx *pulumi.Context) error {
    42  //			ec2AssumeRole, err := iam.GetPolicyDocument(ctx, &iam.GetPolicyDocumentArgs{
    43  //				Statements: []iam.GetPolicyDocumentStatement{
    44  //					{
    45  //						Effect: pulumi.StringRef("Allow"),
    46  //						Principals: []iam.GetPolicyDocumentStatementPrincipal{
    47  //							{
    48  //								Type: "Service",
    49  //								Identifiers: []string{
    50  //									"ec2.amazonaws.com",
    51  //								},
    52  //							},
    53  //						},
    54  //						Actions: []string{
    55  //							"sts:AssumeRole",
    56  //						},
    57  //					},
    58  //				},
    59  //			}, nil)
    60  //			if err != nil {
    61  //				return err
    62  //			}
    63  //			ecsInstanceRole, err := iam.NewRole(ctx, "ecs_instance_role", &iam.RoleArgs{
    64  //				Name:             pulumi.String("ecs_instance_role"),
    65  //				AssumeRolePolicy: pulumi.String(ec2AssumeRole.Json),
    66  //			})
    67  //			if err != nil {
    68  //				return err
    69  //			}
    70  //			_, err = iam.NewRolePolicyAttachment(ctx, "ecs_instance_role", &iam.RolePolicyAttachmentArgs{
    71  //				Role:      ecsInstanceRole.Name,
    72  //				PolicyArn: pulumi.String("arn:aws:iam::aws:policy/service-role/AmazonEC2ContainerServiceforEC2Role"),
    73  //			})
    74  //			if err != nil {
    75  //				return err
    76  //			}
    77  //			ecsInstanceRoleInstanceProfile, err := iam.NewInstanceProfile(ctx, "ecs_instance_role", &iam.InstanceProfileArgs{
    78  //				Name: pulumi.String("ecs_instance_role"),
    79  //				Role: ecsInstanceRole.Name,
    80  //			})
    81  //			if err != nil {
    82  //				return err
    83  //			}
    84  //			batchAssumeRole, err := iam.GetPolicyDocument(ctx, &iam.GetPolicyDocumentArgs{
    85  //				Statements: []iam.GetPolicyDocumentStatement{
    86  //					{
    87  //						Effect: pulumi.StringRef("Allow"),
    88  //						Principals: []iam.GetPolicyDocumentStatementPrincipal{
    89  //							{
    90  //								Type: "Service",
    91  //								Identifiers: []string{
    92  //									"batch.amazonaws.com",
    93  //								},
    94  //							},
    95  //						},
    96  //						Actions: []string{
    97  //							"sts:AssumeRole",
    98  //						},
    99  //					},
   100  //				},
   101  //			}, nil)
   102  //			if err != nil {
   103  //				return err
   104  //			}
   105  //			awsBatchServiceRole, err := iam.NewRole(ctx, "aws_batch_service_role", &iam.RoleArgs{
   106  //				Name:             pulumi.String("aws_batch_service_role"),
   107  //				AssumeRolePolicy: pulumi.String(batchAssumeRole.Json),
   108  //			})
   109  //			if err != nil {
   110  //				return err
   111  //			}
   112  //			awsBatchServiceRoleRolePolicyAttachment, err := iam.NewRolePolicyAttachment(ctx, "aws_batch_service_role", &iam.RolePolicyAttachmentArgs{
   113  //				Role:      awsBatchServiceRole.Name,
   114  //				PolicyArn: pulumi.String("arn:aws:iam::aws:policy/service-role/AWSBatchServiceRole"),
   115  //			})
   116  //			if err != nil {
   117  //				return err
   118  //			}
   119  //			sample, err := ec2.NewSecurityGroup(ctx, "sample", &ec2.SecurityGroupArgs{
   120  //				Name: pulumi.String("aws_batch_compute_environment_security_group"),
   121  //				Egress: ec2.SecurityGroupEgressArray{
   122  //					&ec2.SecurityGroupEgressArgs{
   123  //						FromPort: pulumi.Int(0),
   124  //						ToPort:   pulumi.Int(0),
   125  //						Protocol: pulumi.String("-1"),
   126  //						CidrBlocks: pulumi.StringArray{
   127  //							pulumi.String("0.0.0.0/0"),
   128  //						},
   129  //					},
   130  //				},
   131  //			})
   132  //			if err != nil {
   133  //				return err
   134  //			}
   135  //			sampleVpc, err := ec2.NewVpc(ctx, "sample", &ec2.VpcArgs{
   136  //				CidrBlock: pulumi.String("10.1.0.0/16"),
   137  //			})
   138  //			if err != nil {
   139  //				return err
   140  //			}
   141  //			sampleSubnet, err := ec2.NewSubnet(ctx, "sample", &ec2.SubnetArgs{
   142  //				VpcId:     sampleVpc.ID(),
   143  //				CidrBlock: pulumi.String("10.1.1.0/24"),
   144  //			})
   145  //			if err != nil {
   146  //				return err
   147  //			}
   148  //			samplePlacementGroup, err := ec2.NewPlacementGroup(ctx, "sample", &ec2.PlacementGroupArgs{
   149  //				Name:     pulumi.String("sample"),
   150  //				Strategy: pulumi.String(ec2.PlacementStrategyCluster),
   151  //			})
   152  //			if err != nil {
   153  //				return err
   154  //			}
   155  //			_, err = batch.NewComputeEnvironment(ctx, "sample", &batch.ComputeEnvironmentArgs{
   156  //				ComputeEnvironmentName: pulumi.String("sample"),
   157  //				ComputeResources: &batch.ComputeEnvironmentComputeResourcesArgs{
   158  //					InstanceRole: ecsInstanceRoleInstanceProfile.Arn,
   159  //					InstanceTypes: pulumi.StringArray{
   160  //						pulumi.String("c4.large"),
   161  //					},
   162  //					MaxVcpus:       pulumi.Int(16),
   163  //					MinVcpus:       pulumi.Int(0),
   164  //					PlacementGroup: samplePlacementGroup.Name,
   165  //					SecurityGroupIds: pulumi.StringArray{
   166  //						sample.ID(),
   167  //					},
   168  //					Subnets: pulumi.StringArray{
   169  //						sampleSubnet.ID(),
   170  //					},
   171  //					Type: pulumi.String("EC2"),
   172  //				},
   173  //				ServiceRole: awsBatchServiceRole.Arn,
   174  //				Type:        pulumi.String("MANAGED"),
   175  //			}, pulumi.DependsOn([]pulumi.Resource{
   176  //				awsBatchServiceRoleRolePolicyAttachment,
   177  //			}))
   178  //			if err != nil {
   179  //				return err
   180  //			}
   181  //			return nil
   182  //		})
   183  //	}
   184  //
   185  // ```
   186  // <!--End PulumiCodeChooser -->
   187  //
   188  // ### Fargate Type
   189  //
   190  // <!--Start PulumiCodeChooser -->
   191  // ```go
   192  // package main
   193  //
   194  // import (
   195  //
   196  //	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/batch"
   197  //	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
   198  //
   199  // )
   200  //
   201  //	func main() {
   202  //		pulumi.Run(func(ctx *pulumi.Context) error {
   203  //			_, err := batch.NewComputeEnvironment(ctx, "sample", &batch.ComputeEnvironmentArgs{
   204  //				ComputeEnvironmentName: pulumi.String("sample"),
   205  //				ComputeResources: &batch.ComputeEnvironmentComputeResourcesArgs{
   206  //					MaxVcpus: pulumi.Int(16),
   207  //					SecurityGroupIds: pulumi.StringArray{
   208  //						sampleAwsSecurityGroup.Id,
   209  //					},
   210  //					Subnets: pulumi.StringArray{
   211  //						sampleAwsSubnet.Id,
   212  //					},
   213  //					Type: pulumi.String("FARGATE"),
   214  //				},
   215  //				ServiceRole: pulumi.Any(awsBatchServiceRoleAwsIamRole.Arn),
   216  //				Type:        pulumi.String("MANAGED"),
   217  //			}, pulumi.DependsOn([]pulumi.Resource{
   218  //				awsBatchServiceRole,
   219  //			}))
   220  //			if err != nil {
   221  //				return err
   222  //			}
   223  //			return nil
   224  //		})
   225  //	}
   226  //
   227  // ```
   228  // <!--End PulumiCodeChooser -->
   229  //
   230  // ### Setting Update Policy
   231  //
   232  // <!--Start PulumiCodeChooser -->
   233  // ```go
   234  // package main
   235  //
   236  // import (
   237  //
   238  //	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/batch"
   239  //	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
   240  //
   241  // )
   242  //
   243  //	func main() {
   244  //		pulumi.Run(func(ctx *pulumi.Context) error {
   245  //			_, err := batch.NewComputeEnvironment(ctx, "sample", &batch.ComputeEnvironmentArgs{
   246  //				ComputeEnvironmentName: pulumi.String("sample"),
   247  //				ComputeResources: &batch.ComputeEnvironmentComputeResourcesArgs{
   248  //					AllocationStrategy: pulumi.String("BEST_FIT_PROGRESSIVE"),
   249  //					InstanceRole:       pulumi.Any(ecsInstance.Arn),
   250  //					InstanceTypes: pulumi.StringArray{
   251  //						pulumi.String("optimal"),
   252  //					},
   253  //					MaxVcpus: pulumi.Int(4),
   254  //					MinVcpus: pulumi.Int(0),
   255  //					SecurityGroupIds: pulumi.StringArray{
   256  //						sampleAwsSecurityGroup.Id,
   257  //					},
   258  //					Subnets: pulumi.StringArray{
   259  //						sampleAwsSubnet.Id,
   260  //					},
   261  //					Type: pulumi.String("EC2"),
   262  //				},
   263  //				UpdatePolicy: &batch.ComputeEnvironmentUpdatePolicyArgs{
   264  //					JobExecutionTimeoutMinutes: pulumi.Int(30),
   265  //					TerminateJobsOnUpdate:      pulumi.Bool(false),
   266  //				},
   267  //				Type: pulumi.String("MANAGED"),
   268  //			})
   269  //			if err != nil {
   270  //				return err
   271  //			}
   272  //			return nil
   273  //		})
   274  //	}
   275  //
   276  // ```
   277  // <!--End PulumiCodeChooser -->
   278  //
   279  // ## Import
   280  //
   281  // Using `pulumi import`, import AWS Batch compute using the `compute_environment_name`. For example:
   282  //
   283  // ```sh
   284  // $ pulumi import aws:batch/computeEnvironment:ComputeEnvironment sample sample
   285  // ```
   286  type ComputeEnvironment struct {
   287  	pulumi.CustomResourceState
   288  
   289  	// The Amazon Resource Name (ARN) of the compute environment.
   290  	Arn pulumi.StringOutput `pulumi:"arn"`
   291  	// The name for your compute environment. Up to 128 letters (uppercase and lowercase), numbers, and underscores are allowed. If omitted, the provider will assign a random, unique name.
   292  	ComputeEnvironmentName pulumi.StringOutput `pulumi:"computeEnvironmentName"`
   293  	// Creates a unique compute environment name beginning with the specified prefix. Conflicts with `computeEnvironmentName`.
   294  	ComputeEnvironmentNamePrefix pulumi.StringOutput `pulumi:"computeEnvironmentNamePrefix"`
   295  	// Details of the compute resources managed by the compute environment. This parameter is required for managed compute environments. See details below.
   296  	ComputeResources ComputeEnvironmentComputeResourcesPtrOutput `pulumi:"computeResources"`
   297  	// The Amazon Resource Name (ARN) of the underlying Amazon ECS cluster used by the compute environment.
   298  	EcsClusterArn pulumi.StringOutput `pulumi:"ecsClusterArn"`
   299  	// Details for the Amazon EKS cluster that supports the compute environment. See details below.
   300  	EksConfiguration ComputeEnvironmentEksConfigurationPtrOutput `pulumi:"eksConfiguration"`
   301  	// The full Amazon Resource Name (ARN) of the IAM role that allows AWS Batch to make calls to other AWS services on your behalf.
   302  	ServiceRole pulumi.StringOutput `pulumi:"serviceRole"`
   303  	// The state of the compute environment. If the state is `ENABLED`, then the compute environment accepts jobs from a queue and can scale out automatically based on queues. Valid items are `ENABLED` or `DISABLED`. Defaults to `ENABLED`.
   304  	State pulumi.StringPtrOutput `pulumi:"state"`
   305  	// The current status of the compute environment (for example, CREATING or VALID).
   306  	Status pulumi.StringOutput `pulumi:"status"`
   307  	// A short, human-readable string to provide additional details about the current status of the compute environment.
   308  	StatusReason pulumi.StringOutput `pulumi:"statusReason"`
   309  	// Key-value map of resource tags. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
   310  	Tags pulumi.StringMapOutput `pulumi:"tags"`
   311  	// A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
   312  	//
   313  	// Deprecated: Please use `tags` instead.
   314  	TagsAll pulumi.StringMapOutput `pulumi:"tagsAll"`
   315  	// The type of the compute environment. Valid items are `MANAGED` or `UNMANAGED`.
   316  	Type pulumi.StringOutput `pulumi:"type"`
   317  	// Specifies the infrastructure update policy for the compute environment. See details below.
   318  	UpdatePolicy ComputeEnvironmentUpdatePolicyPtrOutput `pulumi:"updatePolicy"`
   319  }
   320  
   321  // NewComputeEnvironment registers a new resource with the given unique name, arguments, and options.
   322  func NewComputeEnvironment(ctx *pulumi.Context,
   323  	name string, args *ComputeEnvironmentArgs, opts ...pulumi.ResourceOption) (*ComputeEnvironment, error) {
   324  	if args == nil {
   325  		return nil, errors.New("missing one or more required arguments")
   326  	}
   327  
   328  	if args.Type == nil {
   329  		return nil, errors.New("invalid value for required argument 'Type'")
   330  	}
   331  	opts = internal.PkgResourceDefaultOpts(opts)
   332  	var resource ComputeEnvironment
   333  	err := ctx.RegisterResource("aws:batch/computeEnvironment:ComputeEnvironment", name, args, &resource, opts...)
   334  	if err != nil {
   335  		return nil, err
   336  	}
   337  	return &resource, nil
   338  }
   339  
   340  // GetComputeEnvironment gets an existing ComputeEnvironment resource's state with the given name, ID, and optional
   341  // state properties that are used to uniquely qualify the lookup (nil if not required).
   342  func GetComputeEnvironment(ctx *pulumi.Context,
   343  	name string, id pulumi.IDInput, state *ComputeEnvironmentState, opts ...pulumi.ResourceOption) (*ComputeEnvironment, error) {
   344  	var resource ComputeEnvironment
   345  	err := ctx.ReadResource("aws:batch/computeEnvironment:ComputeEnvironment", name, id, state, &resource, opts...)
   346  	if err != nil {
   347  		return nil, err
   348  	}
   349  	return &resource, nil
   350  }
   351  
   352  // Input properties used for looking up and filtering ComputeEnvironment resources.
   353  type computeEnvironmentState struct {
   354  	// The Amazon Resource Name (ARN) of the compute environment.
   355  	Arn *string `pulumi:"arn"`
   356  	// The name for your compute environment. Up to 128 letters (uppercase and lowercase), numbers, and underscores are allowed. If omitted, the provider will assign a random, unique name.
   357  	ComputeEnvironmentName *string `pulumi:"computeEnvironmentName"`
   358  	// Creates a unique compute environment name beginning with the specified prefix. Conflicts with `computeEnvironmentName`.
   359  	ComputeEnvironmentNamePrefix *string `pulumi:"computeEnvironmentNamePrefix"`
   360  	// Details of the compute resources managed by the compute environment. This parameter is required for managed compute environments. See details below.
   361  	ComputeResources *ComputeEnvironmentComputeResources `pulumi:"computeResources"`
   362  	// The Amazon Resource Name (ARN) of the underlying Amazon ECS cluster used by the compute environment.
   363  	EcsClusterArn *string `pulumi:"ecsClusterArn"`
   364  	// Details for the Amazon EKS cluster that supports the compute environment. See details below.
   365  	EksConfiguration *ComputeEnvironmentEksConfiguration `pulumi:"eksConfiguration"`
   366  	// The full Amazon Resource Name (ARN) of the IAM role that allows AWS Batch to make calls to other AWS services on your behalf.
   367  	ServiceRole *string `pulumi:"serviceRole"`
   368  	// The state of the compute environment. If the state is `ENABLED`, then the compute environment accepts jobs from a queue and can scale out automatically based on queues. Valid items are `ENABLED` or `DISABLED`. Defaults to `ENABLED`.
   369  	State *string `pulumi:"state"`
   370  	// The current status of the compute environment (for example, CREATING or VALID).
   371  	Status *string `pulumi:"status"`
   372  	// A short, human-readable string to provide additional details about the current status of the compute environment.
   373  	StatusReason *string `pulumi:"statusReason"`
   374  	// Key-value map of resource tags. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
   375  	Tags map[string]string `pulumi:"tags"`
   376  	// A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
   377  	//
   378  	// Deprecated: Please use `tags` instead.
   379  	TagsAll map[string]string `pulumi:"tagsAll"`
   380  	// The type of the compute environment. Valid items are `MANAGED` or `UNMANAGED`.
   381  	Type *string `pulumi:"type"`
   382  	// Specifies the infrastructure update policy for the compute environment. See details below.
   383  	UpdatePolicy *ComputeEnvironmentUpdatePolicy `pulumi:"updatePolicy"`
   384  }
   385  
   386  type ComputeEnvironmentState struct {
   387  	// The Amazon Resource Name (ARN) of the compute environment.
   388  	Arn pulumi.StringPtrInput
   389  	// The name for your compute environment. Up to 128 letters (uppercase and lowercase), numbers, and underscores are allowed. If omitted, the provider will assign a random, unique name.
   390  	ComputeEnvironmentName pulumi.StringPtrInput
   391  	// Creates a unique compute environment name beginning with the specified prefix. Conflicts with `computeEnvironmentName`.
   392  	ComputeEnvironmentNamePrefix pulumi.StringPtrInput
   393  	// Details of the compute resources managed by the compute environment. This parameter is required for managed compute environments. See details below.
   394  	ComputeResources ComputeEnvironmentComputeResourcesPtrInput
   395  	// The Amazon Resource Name (ARN) of the underlying Amazon ECS cluster used by the compute environment.
   396  	EcsClusterArn pulumi.StringPtrInput
   397  	// Details for the Amazon EKS cluster that supports the compute environment. See details below.
   398  	EksConfiguration ComputeEnvironmentEksConfigurationPtrInput
   399  	// The full Amazon Resource Name (ARN) of the IAM role that allows AWS Batch to make calls to other AWS services on your behalf.
   400  	ServiceRole pulumi.StringPtrInput
   401  	// The state of the compute environment. If the state is `ENABLED`, then the compute environment accepts jobs from a queue and can scale out automatically based on queues. Valid items are `ENABLED` or `DISABLED`. Defaults to `ENABLED`.
   402  	State pulumi.StringPtrInput
   403  	// The current status of the compute environment (for example, CREATING or VALID).
   404  	Status pulumi.StringPtrInput
   405  	// A short, human-readable string to provide additional details about the current status of the compute environment.
   406  	StatusReason pulumi.StringPtrInput
   407  	// Key-value map of resource tags. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
   408  	Tags pulumi.StringMapInput
   409  	// A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
   410  	//
   411  	// Deprecated: Please use `tags` instead.
   412  	TagsAll pulumi.StringMapInput
   413  	// The type of the compute environment. Valid items are `MANAGED` or `UNMANAGED`.
   414  	Type pulumi.StringPtrInput
   415  	// Specifies the infrastructure update policy for the compute environment. See details below.
   416  	UpdatePolicy ComputeEnvironmentUpdatePolicyPtrInput
   417  }
   418  
   419  func (ComputeEnvironmentState) ElementType() reflect.Type {
   420  	return reflect.TypeOf((*computeEnvironmentState)(nil)).Elem()
   421  }
   422  
   423  type computeEnvironmentArgs struct {
   424  	// The name for your compute environment. Up to 128 letters (uppercase and lowercase), numbers, and underscores are allowed. If omitted, the provider will assign a random, unique name.
   425  	ComputeEnvironmentName *string `pulumi:"computeEnvironmentName"`
   426  	// Creates a unique compute environment name beginning with the specified prefix. Conflicts with `computeEnvironmentName`.
   427  	ComputeEnvironmentNamePrefix *string `pulumi:"computeEnvironmentNamePrefix"`
   428  	// Details of the compute resources managed by the compute environment. This parameter is required for managed compute environments. See details below.
   429  	ComputeResources *ComputeEnvironmentComputeResources `pulumi:"computeResources"`
   430  	// Details for the Amazon EKS cluster that supports the compute environment. See details below.
   431  	EksConfiguration *ComputeEnvironmentEksConfiguration `pulumi:"eksConfiguration"`
   432  	// The full Amazon Resource Name (ARN) of the IAM role that allows AWS Batch to make calls to other AWS services on your behalf.
   433  	ServiceRole *string `pulumi:"serviceRole"`
   434  	// The state of the compute environment. If the state is `ENABLED`, then the compute environment accepts jobs from a queue and can scale out automatically based on queues. Valid items are `ENABLED` or `DISABLED`. Defaults to `ENABLED`.
   435  	State *string `pulumi:"state"`
   436  	// Key-value map of resource tags. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
   437  	Tags map[string]string `pulumi:"tags"`
   438  	// The type of the compute environment. Valid items are `MANAGED` or `UNMANAGED`.
   439  	Type string `pulumi:"type"`
   440  	// Specifies the infrastructure update policy for the compute environment. See details below.
   441  	UpdatePolicy *ComputeEnvironmentUpdatePolicy `pulumi:"updatePolicy"`
   442  }
   443  
   444  // The set of arguments for constructing a ComputeEnvironment resource.
   445  type ComputeEnvironmentArgs struct {
   446  	// The name for your compute environment. Up to 128 letters (uppercase and lowercase), numbers, and underscores are allowed. If omitted, the provider will assign a random, unique name.
   447  	ComputeEnvironmentName pulumi.StringPtrInput
   448  	// Creates a unique compute environment name beginning with the specified prefix. Conflicts with `computeEnvironmentName`.
   449  	ComputeEnvironmentNamePrefix pulumi.StringPtrInput
   450  	// Details of the compute resources managed by the compute environment. This parameter is required for managed compute environments. See details below.
   451  	ComputeResources ComputeEnvironmentComputeResourcesPtrInput
   452  	// Details for the Amazon EKS cluster that supports the compute environment. See details below.
   453  	EksConfiguration ComputeEnvironmentEksConfigurationPtrInput
   454  	// The full Amazon Resource Name (ARN) of the IAM role that allows AWS Batch to make calls to other AWS services on your behalf.
   455  	ServiceRole pulumi.StringPtrInput
   456  	// The state of the compute environment. If the state is `ENABLED`, then the compute environment accepts jobs from a queue and can scale out automatically based on queues. Valid items are `ENABLED` or `DISABLED`. Defaults to `ENABLED`.
   457  	State pulumi.StringPtrInput
   458  	// Key-value map of resource tags. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
   459  	Tags pulumi.StringMapInput
   460  	// The type of the compute environment. Valid items are `MANAGED` or `UNMANAGED`.
   461  	Type pulumi.StringInput
   462  	// Specifies the infrastructure update policy for the compute environment. See details below.
   463  	UpdatePolicy ComputeEnvironmentUpdatePolicyPtrInput
   464  }
   465  
   466  func (ComputeEnvironmentArgs) ElementType() reflect.Type {
   467  	return reflect.TypeOf((*computeEnvironmentArgs)(nil)).Elem()
   468  }
   469  
   470  type ComputeEnvironmentInput interface {
   471  	pulumi.Input
   472  
   473  	ToComputeEnvironmentOutput() ComputeEnvironmentOutput
   474  	ToComputeEnvironmentOutputWithContext(ctx context.Context) ComputeEnvironmentOutput
   475  }
   476  
   477  func (*ComputeEnvironment) ElementType() reflect.Type {
   478  	return reflect.TypeOf((**ComputeEnvironment)(nil)).Elem()
   479  }
   480  
   481  func (i *ComputeEnvironment) ToComputeEnvironmentOutput() ComputeEnvironmentOutput {
   482  	return i.ToComputeEnvironmentOutputWithContext(context.Background())
   483  }
   484  
   485  func (i *ComputeEnvironment) ToComputeEnvironmentOutputWithContext(ctx context.Context) ComputeEnvironmentOutput {
   486  	return pulumi.ToOutputWithContext(ctx, i).(ComputeEnvironmentOutput)
   487  }
   488  
   489  // ComputeEnvironmentArrayInput is an input type that accepts ComputeEnvironmentArray and ComputeEnvironmentArrayOutput values.
   490  // You can construct a concrete instance of `ComputeEnvironmentArrayInput` via:
   491  //
   492  //	ComputeEnvironmentArray{ ComputeEnvironmentArgs{...} }
   493  type ComputeEnvironmentArrayInput interface {
   494  	pulumi.Input
   495  
   496  	ToComputeEnvironmentArrayOutput() ComputeEnvironmentArrayOutput
   497  	ToComputeEnvironmentArrayOutputWithContext(context.Context) ComputeEnvironmentArrayOutput
   498  }
   499  
   500  type ComputeEnvironmentArray []ComputeEnvironmentInput
   501  
   502  func (ComputeEnvironmentArray) ElementType() reflect.Type {
   503  	return reflect.TypeOf((*[]*ComputeEnvironment)(nil)).Elem()
   504  }
   505  
   506  func (i ComputeEnvironmentArray) ToComputeEnvironmentArrayOutput() ComputeEnvironmentArrayOutput {
   507  	return i.ToComputeEnvironmentArrayOutputWithContext(context.Background())
   508  }
   509  
   510  func (i ComputeEnvironmentArray) ToComputeEnvironmentArrayOutputWithContext(ctx context.Context) ComputeEnvironmentArrayOutput {
   511  	return pulumi.ToOutputWithContext(ctx, i).(ComputeEnvironmentArrayOutput)
   512  }
   513  
   514  // ComputeEnvironmentMapInput is an input type that accepts ComputeEnvironmentMap and ComputeEnvironmentMapOutput values.
   515  // You can construct a concrete instance of `ComputeEnvironmentMapInput` via:
   516  //
   517  //	ComputeEnvironmentMap{ "key": ComputeEnvironmentArgs{...} }
   518  type ComputeEnvironmentMapInput interface {
   519  	pulumi.Input
   520  
   521  	ToComputeEnvironmentMapOutput() ComputeEnvironmentMapOutput
   522  	ToComputeEnvironmentMapOutputWithContext(context.Context) ComputeEnvironmentMapOutput
   523  }
   524  
   525  type ComputeEnvironmentMap map[string]ComputeEnvironmentInput
   526  
   527  func (ComputeEnvironmentMap) ElementType() reflect.Type {
   528  	return reflect.TypeOf((*map[string]*ComputeEnvironment)(nil)).Elem()
   529  }
   530  
   531  func (i ComputeEnvironmentMap) ToComputeEnvironmentMapOutput() ComputeEnvironmentMapOutput {
   532  	return i.ToComputeEnvironmentMapOutputWithContext(context.Background())
   533  }
   534  
   535  func (i ComputeEnvironmentMap) ToComputeEnvironmentMapOutputWithContext(ctx context.Context) ComputeEnvironmentMapOutput {
   536  	return pulumi.ToOutputWithContext(ctx, i).(ComputeEnvironmentMapOutput)
   537  }
   538  
   539  type ComputeEnvironmentOutput struct{ *pulumi.OutputState }
   540  
   541  func (ComputeEnvironmentOutput) ElementType() reflect.Type {
   542  	return reflect.TypeOf((**ComputeEnvironment)(nil)).Elem()
   543  }
   544  
   545  func (o ComputeEnvironmentOutput) ToComputeEnvironmentOutput() ComputeEnvironmentOutput {
   546  	return o
   547  }
   548  
   549  func (o ComputeEnvironmentOutput) ToComputeEnvironmentOutputWithContext(ctx context.Context) ComputeEnvironmentOutput {
   550  	return o
   551  }
   552  
   553  // The Amazon Resource Name (ARN) of the compute environment.
   554  func (o ComputeEnvironmentOutput) Arn() pulumi.StringOutput {
   555  	return o.ApplyT(func(v *ComputeEnvironment) pulumi.StringOutput { return v.Arn }).(pulumi.StringOutput)
   556  }
   557  
   558  // The name for your compute environment. Up to 128 letters (uppercase and lowercase), numbers, and underscores are allowed. If omitted, the provider will assign a random, unique name.
   559  func (o ComputeEnvironmentOutput) ComputeEnvironmentName() pulumi.StringOutput {
   560  	return o.ApplyT(func(v *ComputeEnvironment) pulumi.StringOutput { return v.ComputeEnvironmentName }).(pulumi.StringOutput)
   561  }
   562  
   563  // Creates a unique compute environment name beginning with the specified prefix. Conflicts with `computeEnvironmentName`.
   564  func (o ComputeEnvironmentOutput) ComputeEnvironmentNamePrefix() pulumi.StringOutput {
   565  	return o.ApplyT(func(v *ComputeEnvironment) pulumi.StringOutput { return v.ComputeEnvironmentNamePrefix }).(pulumi.StringOutput)
   566  }
   567  
   568  // Details of the compute resources managed by the compute environment. This parameter is required for managed compute environments. See details below.
   569  func (o ComputeEnvironmentOutput) ComputeResources() ComputeEnvironmentComputeResourcesPtrOutput {
   570  	return o.ApplyT(func(v *ComputeEnvironment) ComputeEnvironmentComputeResourcesPtrOutput { return v.ComputeResources }).(ComputeEnvironmentComputeResourcesPtrOutput)
   571  }
   572  
   573  // The Amazon Resource Name (ARN) of the underlying Amazon ECS cluster used by the compute environment.
   574  func (o ComputeEnvironmentOutput) EcsClusterArn() pulumi.StringOutput {
   575  	return o.ApplyT(func(v *ComputeEnvironment) pulumi.StringOutput { return v.EcsClusterArn }).(pulumi.StringOutput)
   576  }
   577  
   578  // Details for the Amazon EKS cluster that supports the compute environment. See details below.
   579  func (o ComputeEnvironmentOutput) EksConfiguration() ComputeEnvironmentEksConfigurationPtrOutput {
   580  	return o.ApplyT(func(v *ComputeEnvironment) ComputeEnvironmentEksConfigurationPtrOutput { return v.EksConfiguration }).(ComputeEnvironmentEksConfigurationPtrOutput)
   581  }
   582  
   583  // The full Amazon Resource Name (ARN) of the IAM role that allows AWS Batch to make calls to other AWS services on your behalf.
   584  func (o ComputeEnvironmentOutput) ServiceRole() pulumi.StringOutput {
   585  	return o.ApplyT(func(v *ComputeEnvironment) pulumi.StringOutput { return v.ServiceRole }).(pulumi.StringOutput)
   586  }
   587  
   588  // The state of the compute environment. If the state is `ENABLED`, then the compute environment accepts jobs from a queue and can scale out automatically based on queues. Valid items are `ENABLED` or `DISABLED`. Defaults to `ENABLED`.
   589  func (o ComputeEnvironmentOutput) State() pulumi.StringPtrOutput {
   590  	return o.ApplyT(func(v *ComputeEnvironment) pulumi.StringPtrOutput { return v.State }).(pulumi.StringPtrOutput)
   591  }
   592  
   593  // The current status of the compute environment (for example, CREATING or VALID).
   594  func (o ComputeEnvironmentOutput) Status() pulumi.StringOutput {
   595  	return o.ApplyT(func(v *ComputeEnvironment) pulumi.StringOutput { return v.Status }).(pulumi.StringOutput)
   596  }
   597  
   598  // A short, human-readable string to provide additional details about the current status of the compute environment.
   599  func (o ComputeEnvironmentOutput) StatusReason() pulumi.StringOutput {
   600  	return o.ApplyT(func(v *ComputeEnvironment) pulumi.StringOutput { return v.StatusReason }).(pulumi.StringOutput)
   601  }
   602  
   603  // Key-value map of resource tags. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
   604  func (o ComputeEnvironmentOutput) Tags() pulumi.StringMapOutput {
   605  	return o.ApplyT(func(v *ComputeEnvironment) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput)
   606  }
   607  
   608  // A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
   609  //
   610  // Deprecated: Please use `tags` instead.
   611  func (o ComputeEnvironmentOutput) TagsAll() pulumi.StringMapOutput {
   612  	return o.ApplyT(func(v *ComputeEnvironment) pulumi.StringMapOutput { return v.TagsAll }).(pulumi.StringMapOutput)
   613  }
   614  
   615  // The type of the compute environment. Valid items are `MANAGED` or `UNMANAGED`.
   616  func (o ComputeEnvironmentOutput) Type() pulumi.StringOutput {
   617  	return o.ApplyT(func(v *ComputeEnvironment) pulumi.StringOutput { return v.Type }).(pulumi.StringOutput)
   618  }
   619  
   620  // Specifies the infrastructure update policy for the compute environment. See details below.
   621  func (o ComputeEnvironmentOutput) UpdatePolicy() ComputeEnvironmentUpdatePolicyPtrOutput {
   622  	return o.ApplyT(func(v *ComputeEnvironment) ComputeEnvironmentUpdatePolicyPtrOutput { return v.UpdatePolicy }).(ComputeEnvironmentUpdatePolicyPtrOutput)
   623  }
   624  
   625  type ComputeEnvironmentArrayOutput struct{ *pulumi.OutputState }
   626  
   627  func (ComputeEnvironmentArrayOutput) ElementType() reflect.Type {
   628  	return reflect.TypeOf((*[]*ComputeEnvironment)(nil)).Elem()
   629  }
   630  
   631  func (o ComputeEnvironmentArrayOutput) ToComputeEnvironmentArrayOutput() ComputeEnvironmentArrayOutput {
   632  	return o
   633  }
   634  
   635  func (o ComputeEnvironmentArrayOutput) ToComputeEnvironmentArrayOutputWithContext(ctx context.Context) ComputeEnvironmentArrayOutput {
   636  	return o
   637  }
   638  
   639  func (o ComputeEnvironmentArrayOutput) Index(i pulumi.IntInput) ComputeEnvironmentOutput {
   640  	return pulumi.All(o, i).ApplyT(func(vs []interface{}) *ComputeEnvironment {
   641  		return vs[0].([]*ComputeEnvironment)[vs[1].(int)]
   642  	}).(ComputeEnvironmentOutput)
   643  }
   644  
   645  type ComputeEnvironmentMapOutput struct{ *pulumi.OutputState }
   646  
   647  func (ComputeEnvironmentMapOutput) ElementType() reflect.Type {
   648  	return reflect.TypeOf((*map[string]*ComputeEnvironment)(nil)).Elem()
   649  }
   650  
   651  func (o ComputeEnvironmentMapOutput) ToComputeEnvironmentMapOutput() ComputeEnvironmentMapOutput {
   652  	return o
   653  }
   654  
   655  func (o ComputeEnvironmentMapOutput) ToComputeEnvironmentMapOutputWithContext(ctx context.Context) ComputeEnvironmentMapOutput {
   656  	return o
   657  }
   658  
   659  func (o ComputeEnvironmentMapOutput) MapIndex(k pulumi.StringInput) ComputeEnvironmentOutput {
   660  	return pulumi.All(o, k).ApplyT(func(vs []interface{}) *ComputeEnvironment {
   661  		return vs[0].(map[string]*ComputeEnvironment)[vs[1].(string)]
   662  	}).(ComputeEnvironmentOutput)
   663  }
   664  
   665  func init() {
   666  	pulumi.RegisterInputType(reflect.TypeOf((*ComputeEnvironmentInput)(nil)).Elem(), &ComputeEnvironment{})
   667  	pulumi.RegisterInputType(reflect.TypeOf((*ComputeEnvironmentArrayInput)(nil)).Elem(), ComputeEnvironmentArray{})
   668  	pulumi.RegisterInputType(reflect.TypeOf((*ComputeEnvironmentMapInput)(nil)).Elem(), ComputeEnvironmentMap{})
   669  	pulumi.RegisterOutputType(ComputeEnvironmentOutput{})
   670  	pulumi.RegisterOutputType(ComputeEnvironmentArrayOutput{})
   671  	pulumi.RegisterOutputType(ComputeEnvironmentMapOutput{})
   672  }