github.com/pulumi/pulumi-aws/sdk/v6@v6.32.0/go/aws/ecs/taskDefinition.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 ecs
     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  // Manages a revision of an ECS task definition to be used in `ecs.Service`.
    16  //
    17  // ## Example Usage
    18  //
    19  // ### Basic Example
    20  //
    21  // <!--Start PulumiCodeChooser -->
    22  // ```go
    23  // package main
    24  //
    25  // import (
    26  //
    27  //	"encoding/json"
    28  //
    29  //	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ecs"
    30  //	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    31  //
    32  // )
    33  //
    34  //	func main() {
    35  //		pulumi.Run(func(ctx *pulumi.Context) error {
    36  //			tmpJSON0, err := json.Marshal([]interface{}{
    37  //				map[string]interface{}{
    38  //					"name":      "first",
    39  //					"image":     "service-first",
    40  //					"cpu":       10,
    41  //					"memory":    512,
    42  //					"essential": true,
    43  //					"portMappings": []map[string]interface{}{
    44  //						map[string]interface{}{
    45  //							"containerPort": 80,
    46  //							"hostPort":      80,
    47  //						},
    48  //					},
    49  //				},
    50  //				map[string]interface{}{
    51  //					"name":      "second",
    52  //					"image":     "service-second",
    53  //					"cpu":       10,
    54  //					"memory":    256,
    55  //					"essential": true,
    56  //					"portMappings": []map[string]interface{}{
    57  //						map[string]interface{}{
    58  //							"containerPort": 443,
    59  //							"hostPort":      443,
    60  //						},
    61  //					},
    62  //				},
    63  //			})
    64  //			if err != nil {
    65  //				return err
    66  //			}
    67  //			json0 := string(tmpJSON0)
    68  //			_, err = ecs.NewTaskDefinition(ctx, "service", &ecs.TaskDefinitionArgs{
    69  //				Family:               pulumi.String("service"),
    70  //				ContainerDefinitions: pulumi.String(json0),
    71  //				Volumes: ecs.TaskDefinitionVolumeArray{
    72  //					&ecs.TaskDefinitionVolumeArgs{
    73  //						Name:     pulumi.String("service-storage"),
    74  //						HostPath: pulumi.String("/ecs/service-storage"),
    75  //					},
    76  //				},
    77  //				PlacementConstraints: ecs.TaskDefinitionPlacementConstraintArray{
    78  //					&ecs.TaskDefinitionPlacementConstraintArgs{
    79  //						Type:       pulumi.String("memberOf"),
    80  //						Expression: pulumi.String("attribute:ecs.availability-zone in [us-west-2a, us-west-2b]"),
    81  //					},
    82  //				},
    83  //			})
    84  //			if err != nil {
    85  //				return err
    86  //			}
    87  //			return nil
    88  //		})
    89  //	}
    90  //
    91  // ```
    92  // <!--End PulumiCodeChooser -->
    93  //
    94  // ### With AppMesh Proxy
    95  //
    96  // <!--Start PulumiCodeChooser -->
    97  // ```go
    98  // package main
    99  //
   100  // import (
   101  //
   102  //	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ecs"
   103  //	"github.com/pulumi/pulumi-std/sdk/go/std"
   104  //	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
   105  //
   106  // )
   107  //
   108  //	func main() {
   109  //		pulumi.Run(func(ctx *pulumi.Context) error {
   110  //			invokeFile, err := std.File(ctx, &std.FileArgs{
   111  //				Input: "task-definitions/service.json",
   112  //			}, nil)
   113  //			if err != nil {
   114  //				return err
   115  //			}
   116  //			_, err = ecs.NewTaskDefinition(ctx, "service", &ecs.TaskDefinitionArgs{
   117  //				Family:               pulumi.String("service"),
   118  //				ContainerDefinitions: invokeFile.Result,
   119  //				ProxyConfiguration: &ecs.TaskDefinitionProxyConfigurationArgs{
   120  //					Type:          pulumi.String("APPMESH"),
   121  //					ContainerName: pulumi.String("applicationContainerName"),
   122  //					Properties: pulumi.StringMap{
   123  //						"AppPorts":         pulumi.String("8080"),
   124  //						"EgressIgnoredIPs": pulumi.String("169.254.170.2,169.254.169.254"),
   125  //						"IgnoredUID":       pulumi.String("1337"),
   126  //						"ProxyEgressPort":  pulumi.String("15001"),
   127  //						"ProxyIngressPort": pulumi.String("15000"),
   128  //					},
   129  //				},
   130  //			})
   131  //			if err != nil {
   132  //				return err
   133  //			}
   134  //			return nil
   135  //		})
   136  //	}
   137  //
   138  // ```
   139  // <!--End PulumiCodeChooser -->
   140  //
   141  // ### Example Using `dockerVolumeConfiguration`
   142  //
   143  // <!--Start PulumiCodeChooser -->
   144  // ```go
   145  // package main
   146  //
   147  // import (
   148  //
   149  //	"fmt"
   150  //
   151  //	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ecs"
   152  //	"github.com/pulumi/pulumi-std/sdk/go/std"
   153  //	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
   154  //
   155  // )
   156  //
   157  //	func main() {
   158  //		pulumi.Run(func(ctx *pulumi.Context) error {
   159  //			invokeFile, err := std.File(ctx, &std.FileArgs{
   160  //				Input: "task-definitions/service.json",
   161  //			}, nil)
   162  //			if err != nil {
   163  //				return err
   164  //			}
   165  //			_, err = ecs.NewTaskDefinition(ctx, "service", &ecs.TaskDefinitionArgs{
   166  //				Family:               pulumi.String("service"),
   167  //				ContainerDefinitions: invokeFile.Result,
   168  //				Volumes: ecs.TaskDefinitionVolumeArray{
   169  //					&ecs.TaskDefinitionVolumeArgs{
   170  //						Name: pulumi.String("service-storage"),
   171  //						DockerVolumeConfiguration: &ecs.TaskDefinitionVolumeDockerVolumeConfigurationArgs{
   172  //							Scope:         pulumi.String("shared"),
   173  //							Autoprovision: pulumi.Bool(true),
   174  //							Driver:        pulumi.String("local"),
   175  //							DriverOpts: pulumi.StringMap{
   176  //								"type":   pulumi.String("nfs"),
   177  //								"device": pulumi.String(fmt.Sprintf("%v:/", fs.DnsName)),
   178  //								"o":      pulumi.String(fmt.Sprintf("addr=%v,rsize=1048576,wsize=1048576,hard,timeo=600,retrans=2,noresvport", fs.DnsName)),
   179  //							},
   180  //						},
   181  //					},
   182  //				},
   183  //			})
   184  //			if err != nil {
   185  //				return err
   186  //			}
   187  //			return nil
   188  //		})
   189  //	}
   190  //
   191  // ```
   192  // <!--End PulumiCodeChooser -->
   193  //
   194  // ### Example Using `efsVolumeConfiguration`
   195  //
   196  // <!--Start PulumiCodeChooser -->
   197  // ```go
   198  // package main
   199  //
   200  // import (
   201  //
   202  //	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ecs"
   203  //	"github.com/pulumi/pulumi-std/sdk/go/std"
   204  //	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
   205  //
   206  // )
   207  //
   208  //	func main() {
   209  //		pulumi.Run(func(ctx *pulumi.Context) error {
   210  //			invokeFile, err := std.File(ctx, &std.FileArgs{
   211  //				Input: "task-definitions/service.json",
   212  //			}, nil)
   213  //			if err != nil {
   214  //				return err
   215  //			}
   216  //			_, err = ecs.NewTaskDefinition(ctx, "service", &ecs.TaskDefinitionArgs{
   217  //				Family:               pulumi.String("service"),
   218  //				ContainerDefinitions: invokeFile.Result,
   219  //				Volumes: ecs.TaskDefinitionVolumeArray{
   220  //					&ecs.TaskDefinitionVolumeArgs{
   221  //						Name: pulumi.String("service-storage"),
   222  //						EfsVolumeConfiguration: &ecs.TaskDefinitionVolumeEfsVolumeConfigurationArgs{
   223  //							FileSystemId:          pulumi.Any(fs.Id),
   224  //							RootDirectory:         pulumi.String("/opt/data"),
   225  //							TransitEncryption:     pulumi.String("ENABLED"),
   226  //							TransitEncryptionPort: pulumi.Int(2999),
   227  //							AuthorizationConfig: &ecs.TaskDefinitionVolumeEfsVolumeConfigurationAuthorizationConfigArgs{
   228  //								AccessPointId: pulumi.Any(test.Id),
   229  //								Iam:           pulumi.String("ENABLED"),
   230  //							},
   231  //						},
   232  //					},
   233  //				},
   234  //			})
   235  //			if err != nil {
   236  //				return err
   237  //			}
   238  //			return nil
   239  //		})
   240  //	}
   241  //
   242  // ```
   243  // <!--End PulumiCodeChooser -->
   244  //
   245  // ### Example Using `fsxWindowsFileServerVolumeConfiguration`
   246  //
   247  // <!--Start PulumiCodeChooser -->
   248  // ```go
   249  // package main
   250  //
   251  // import (
   252  //
   253  //	"encoding/json"
   254  //
   255  //	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ecs"
   256  //	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/secretsmanager"
   257  //	"github.com/pulumi/pulumi-std/sdk/go/std"
   258  //	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
   259  //
   260  // )
   261  //
   262  //	func main() {
   263  //		pulumi.Run(func(ctx *pulumi.Context) error {
   264  //			tmpJSON0, err := json.Marshal(map[string]interface{}{
   265  //				"username": "admin",
   266  //				"password": testAwsDirectoryServiceDirectory.Password,
   267  //			})
   268  //			if err != nil {
   269  //				return err
   270  //			}
   271  //			json0 := string(tmpJSON0)
   272  //			test, err := secretsmanager.NewSecretVersion(ctx, "test", &secretsmanager.SecretVersionArgs{
   273  //				SecretId:     pulumi.Any(testAwsSecretsmanagerSecret.Id),
   274  //				SecretString: pulumi.String(json0),
   275  //			})
   276  //			if err != nil {
   277  //				return err
   278  //			}
   279  //			invokeFile, err := std.File(ctx, &std.FileArgs{
   280  //				Input: "task-definitions/service.json",
   281  //			}, nil)
   282  //			if err != nil {
   283  //				return err
   284  //			}
   285  //			_, err = ecs.NewTaskDefinition(ctx, "service", &ecs.TaskDefinitionArgs{
   286  //				Family:               pulumi.String("service"),
   287  //				ContainerDefinitions: invokeFile.Result,
   288  //				Volumes: ecs.TaskDefinitionVolumeArray{
   289  //					&ecs.TaskDefinitionVolumeArgs{
   290  //						Name: pulumi.String("service-storage"),
   291  //						FsxWindowsFileServerVolumeConfiguration: &ecs.TaskDefinitionVolumeFsxWindowsFileServerVolumeConfigurationArgs{
   292  //							FileSystemId:  pulumi.Any(testAwsFsxWindowsFileSystem.Id),
   293  //							RootDirectory: pulumi.String("\\data"),
   294  //							AuthorizationConfig: &ecs.TaskDefinitionVolumeFsxWindowsFileServerVolumeConfigurationAuthorizationConfigArgs{
   295  //								CredentialsParameter: test.Arn,
   296  //								Domain:               pulumi.Any(testAwsDirectoryServiceDirectory.Name),
   297  //							},
   298  //						},
   299  //					},
   300  //				},
   301  //			})
   302  //			if err != nil {
   303  //				return err
   304  //			}
   305  //			return nil
   306  //		})
   307  //	}
   308  //
   309  // ```
   310  // <!--End PulumiCodeChooser -->
   311  //
   312  // ### Example Using `containerDefinitions` and `inferenceAccelerator`
   313  //
   314  // <!--Start PulumiCodeChooser -->
   315  // ```go
   316  // package main
   317  //
   318  // import (
   319  //
   320  //	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ecs"
   321  //	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
   322  //
   323  // )
   324  //
   325  //	func main() {
   326  //		pulumi.Run(func(ctx *pulumi.Context) error {
   327  //			_, err := ecs.NewTaskDefinition(ctx, "test", &ecs.TaskDefinitionArgs{
   328  //				Family: pulumi.String("test"),
   329  //				ContainerDefinitions: pulumi.String(`[
   330  //	  {
   331  //	    "cpu": 10,
   332  //	    "command": ["sleep", "10"],
   333  //	    "entryPoint": ["/"],
   334  //	    "environment": [
   335  //	      {"name": "VARNAME", "value": "VARVAL"}
   336  //	    ],
   337  //	    "essential": true,
   338  //	    "image": "jenkins",
   339  //	    "memory": 128,
   340  //	    "name": "jenkins",
   341  //	    "portMappings": [
   342  //	      {
   343  //	        "containerPort": 80,
   344  //	        "hostPort": 8080
   345  //	      }
   346  //	    ],
   347  //	        "resourceRequirements":[
   348  //	            {
   349  //	                "type":"InferenceAccelerator",
   350  //	                "value":"device_1"
   351  //	            }
   352  //	        ]
   353  //	  }
   354  //
   355  // ]
   356  // `),
   357  //
   358  //				InferenceAccelerators: ecs.TaskDefinitionInferenceAcceleratorArray{
   359  //					&ecs.TaskDefinitionInferenceAcceleratorArgs{
   360  //						DeviceName: pulumi.String("device_1"),
   361  //						DeviceType: pulumi.String("eia1.medium"),
   362  //					},
   363  //				},
   364  //			})
   365  //			if err != nil {
   366  //				return err
   367  //			}
   368  //			return nil
   369  //		})
   370  //	}
   371  //
   372  // ```
   373  // <!--End PulumiCodeChooser -->
   374  //
   375  // ### Example Using `runtimePlatform` and `fargate`
   376  //
   377  // <!--Start PulumiCodeChooser -->
   378  // ```go
   379  // package main
   380  //
   381  // import (
   382  //
   383  //	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ecs"
   384  //	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
   385  //
   386  // )
   387  //
   388  //	func main() {
   389  //		pulumi.Run(func(ctx *pulumi.Context) error {
   390  //			_, err := ecs.NewTaskDefinition(ctx, "test", &ecs.TaskDefinitionArgs{
   391  //				Family: pulumi.String("test"),
   392  //				RequiresCompatibilities: pulumi.StringArray{
   393  //					pulumi.String("FARGATE"),
   394  //				},
   395  //				NetworkMode: pulumi.String("awsvpc"),
   396  //				Cpu:         pulumi.String("1024"),
   397  //				Memory:      pulumi.String("2048"),
   398  //				ContainerDefinitions: pulumi.String(`[
   399  //	  {
   400  //	    "name": "iis",
   401  //	    "image": "mcr.microsoft.com/windows/servercore/iis",
   402  //	    "cpu": 1024,
   403  //	    "memory": 2048,
   404  //	    "essential": true
   405  //	  }
   406  //
   407  // ]
   408  // `),
   409  //
   410  //				RuntimePlatform: &ecs.TaskDefinitionRuntimePlatformArgs{
   411  //					OperatingSystemFamily: pulumi.String("WINDOWS_SERVER_2019_CORE"),
   412  //					CpuArchitecture:       pulumi.String("X86_64"),
   413  //				},
   414  //			})
   415  //			if err != nil {
   416  //				return err
   417  //			}
   418  //			return nil
   419  //		})
   420  //	}
   421  //
   422  // ```
   423  // <!--End PulumiCodeChooser -->
   424  //
   425  // ## Import
   426  //
   427  // Using `pulumi import`, import ECS Task Definitions using their ARNs. For example:
   428  //
   429  // ```sh
   430  // $ pulumi import aws:ecs/taskDefinition:TaskDefinition example arn:aws:ecs:us-east-1:012345678910:task-definition/mytaskfamily:123
   431  // ```
   432  type TaskDefinition struct {
   433  	pulumi.CustomResourceState
   434  
   435  	// Full ARN of the Task Definition (including both `family` and `revision`).
   436  	Arn pulumi.StringOutput `pulumi:"arn"`
   437  	// ARN of the Task Definition with the trailing `revision` removed. This may be useful for situations where the latest task definition is always desired. If a revision isn't specified, the latest ACTIVE revision is used. See the [AWS documentation](https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_StartTask.html#ECS-StartTask-request-taskDefinition) for details.
   438  	ArnWithoutRevision pulumi.StringOutput `pulumi:"arnWithoutRevision"`
   439  	// A list of valid [container definitions](http://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_ContainerDefinition.html) provided as a single valid JSON document. Please note that you should only provide values that are part of the container definition document. For a detailed description of what parameters are available, see the [Task Definition Parameters](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_definition_parameters.html) section from the official [Developer Guide](https://docs.aws.amazon.com/AmazonECS/latest/developerguide).
   440  	ContainerDefinitions pulumi.StringOutput `pulumi:"containerDefinitions"`
   441  	// Number of cpu units used by the task. If the `requiresCompatibilities` is `FARGATE` this field is required.
   442  	Cpu pulumi.StringPtrOutput `pulumi:"cpu"`
   443  	// The amount of ephemeral storage to allocate for the task. This parameter is used to expand the total amount of ephemeral storage available, beyond the default amount, for tasks hosted on AWS Fargate. See Ephemeral Storage.
   444  	EphemeralStorage TaskDefinitionEphemeralStoragePtrOutput `pulumi:"ephemeralStorage"`
   445  	// ARN of the task execution role that the Amazon ECS container agent and the Docker daemon can assume.
   446  	ExecutionRoleArn pulumi.StringPtrOutput `pulumi:"executionRoleArn"`
   447  	// A unique name for your task definition.
   448  	//
   449  	// The following arguments are optional:
   450  	Family pulumi.StringOutput `pulumi:"family"`
   451  	// Configuration block(s) with Inference Accelerators settings. Detailed below.
   452  	InferenceAccelerators TaskDefinitionInferenceAcceleratorArrayOutput `pulumi:"inferenceAccelerators"`
   453  	// IPC resource namespace to be used for the containers in the task The valid values are `host`, `task`, and `none`.
   454  	IpcMode pulumi.StringPtrOutput `pulumi:"ipcMode"`
   455  	// Amount (in MiB) of memory used by the task. If the `requiresCompatibilities` is `FARGATE` this field is required.
   456  	Memory pulumi.StringPtrOutput `pulumi:"memory"`
   457  	// Docker networking mode to use for the containers in the task. Valid values are `none`, `bridge`, `awsvpc`, and `host`.
   458  	NetworkMode pulumi.StringOutput `pulumi:"networkMode"`
   459  	// Process namespace to use for the containers in the task. The valid values are `host` and `task`.
   460  	PidMode pulumi.StringPtrOutput `pulumi:"pidMode"`
   461  	// Configuration block for rules that are taken into consideration during task placement. Maximum number of `placementConstraints` is `10`. Detailed below.
   462  	PlacementConstraints TaskDefinitionPlacementConstraintArrayOutput `pulumi:"placementConstraints"`
   463  	// Configuration block for the App Mesh proxy. Detailed below.
   464  	ProxyConfiguration TaskDefinitionProxyConfigurationPtrOutput `pulumi:"proxyConfiguration"`
   465  	// Set of launch types required by the task. The valid values are `EC2` and `FARGATE`.
   466  	RequiresCompatibilities pulumi.StringArrayOutput `pulumi:"requiresCompatibilities"`
   467  	// Revision of the task in a particular family.
   468  	Revision pulumi.IntOutput `pulumi:"revision"`
   469  	// Configuration block for runtimePlatform that containers in your task may use.
   470  	RuntimePlatform TaskDefinitionRuntimePlatformPtrOutput `pulumi:"runtimePlatform"`
   471  	// Whether to retain the old revision when the resource is destroyed or replacement is necessary. Default is `false`.
   472  	SkipDestroy pulumi.BoolPtrOutput `pulumi:"skipDestroy"`
   473  	// 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.
   474  	Tags pulumi.StringMapOutput `pulumi:"tags"`
   475  	// Map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
   476  	//
   477  	// Deprecated: Please use `tags` instead.
   478  	TagsAll pulumi.StringMapOutput `pulumi:"tagsAll"`
   479  	// ARN of IAM role that allows your Amazon ECS container task to make calls to other AWS services.
   480  	TaskRoleArn pulumi.StringPtrOutput `pulumi:"taskRoleArn"`
   481  	// Whether should track latest task definition or the one created with the resource. Default is `false`.
   482  	TrackLatest pulumi.BoolPtrOutput `pulumi:"trackLatest"`
   483  	// Configuration block for volumes that containers in your task may use. Detailed below.
   484  	Volumes TaskDefinitionVolumeArrayOutput `pulumi:"volumes"`
   485  }
   486  
   487  // NewTaskDefinition registers a new resource with the given unique name, arguments, and options.
   488  func NewTaskDefinition(ctx *pulumi.Context,
   489  	name string, args *TaskDefinitionArgs, opts ...pulumi.ResourceOption) (*TaskDefinition, error) {
   490  	if args == nil {
   491  		return nil, errors.New("missing one or more required arguments")
   492  	}
   493  
   494  	if args.ContainerDefinitions == nil {
   495  		return nil, errors.New("invalid value for required argument 'ContainerDefinitions'")
   496  	}
   497  	if args.Family == nil {
   498  		return nil, errors.New("invalid value for required argument 'Family'")
   499  	}
   500  	opts = internal.PkgResourceDefaultOpts(opts)
   501  	var resource TaskDefinition
   502  	err := ctx.RegisterResource("aws:ecs/taskDefinition:TaskDefinition", name, args, &resource, opts...)
   503  	if err != nil {
   504  		return nil, err
   505  	}
   506  	return &resource, nil
   507  }
   508  
   509  // GetTaskDefinition gets an existing TaskDefinition resource's state with the given name, ID, and optional
   510  // state properties that are used to uniquely qualify the lookup (nil if not required).
   511  func GetTaskDefinition(ctx *pulumi.Context,
   512  	name string, id pulumi.IDInput, state *TaskDefinitionState, opts ...pulumi.ResourceOption) (*TaskDefinition, error) {
   513  	var resource TaskDefinition
   514  	err := ctx.ReadResource("aws:ecs/taskDefinition:TaskDefinition", name, id, state, &resource, opts...)
   515  	if err != nil {
   516  		return nil, err
   517  	}
   518  	return &resource, nil
   519  }
   520  
   521  // Input properties used for looking up and filtering TaskDefinition resources.
   522  type taskDefinitionState struct {
   523  	// Full ARN of the Task Definition (including both `family` and `revision`).
   524  	Arn *string `pulumi:"arn"`
   525  	// ARN of the Task Definition with the trailing `revision` removed. This may be useful for situations where the latest task definition is always desired. If a revision isn't specified, the latest ACTIVE revision is used. See the [AWS documentation](https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_StartTask.html#ECS-StartTask-request-taskDefinition) for details.
   526  	ArnWithoutRevision *string `pulumi:"arnWithoutRevision"`
   527  	// A list of valid [container definitions](http://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_ContainerDefinition.html) provided as a single valid JSON document. Please note that you should only provide values that are part of the container definition document. For a detailed description of what parameters are available, see the [Task Definition Parameters](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_definition_parameters.html) section from the official [Developer Guide](https://docs.aws.amazon.com/AmazonECS/latest/developerguide).
   528  	ContainerDefinitions *string `pulumi:"containerDefinitions"`
   529  	// Number of cpu units used by the task. If the `requiresCompatibilities` is `FARGATE` this field is required.
   530  	Cpu *string `pulumi:"cpu"`
   531  	// The amount of ephemeral storage to allocate for the task. This parameter is used to expand the total amount of ephemeral storage available, beyond the default amount, for tasks hosted on AWS Fargate. See Ephemeral Storage.
   532  	EphemeralStorage *TaskDefinitionEphemeralStorage `pulumi:"ephemeralStorage"`
   533  	// ARN of the task execution role that the Amazon ECS container agent and the Docker daemon can assume.
   534  	ExecutionRoleArn *string `pulumi:"executionRoleArn"`
   535  	// A unique name for your task definition.
   536  	//
   537  	// The following arguments are optional:
   538  	Family *string `pulumi:"family"`
   539  	// Configuration block(s) with Inference Accelerators settings. Detailed below.
   540  	InferenceAccelerators []TaskDefinitionInferenceAccelerator `pulumi:"inferenceAccelerators"`
   541  	// IPC resource namespace to be used for the containers in the task The valid values are `host`, `task`, and `none`.
   542  	IpcMode *string `pulumi:"ipcMode"`
   543  	// Amount (in MiB) of memory used by the task. If the `requiresCompatibilities` is `FARGATE` this field is required.
   544  	Memory *string `pulumi:"memory"`
   545  	// Docker networking mode to use for the containers in the task. Valid values are `none`, `bridge`, `awsvpc`, and `host`.
   546  	NetworkMode *string `pulumi:"networkMode"`
   547  	// Process namespace to use for the containers in the task. The valid values are `host` and `task`.
   548  	PidMode *string `pulumi:"pidMode"`
   549  	// Configuration block for rules that are taken into consideration during task placement. Maximum number of `placementConstraints` is `10`. Detailed below.
   550  	PlacementConstraints []TaskDefinitionPlacementConstraint `pulumi:"placementConstraints"`
   551  	// Configuration block for the App Mesh proxy. Detailed below.
   552  	ProxyConfiguration *TaskDefinitionProxyConfiguration `pulumi:"proxyConfiguration"`
   553  	// Set of launch types required by the task. The valid values are `EC2` and `FARGATE`.
   554  	RequiresCompatibilities []string `pulumi:"requiresCompatibilities"`
   555  	// Revision of the task in a particular family.
   556  	Revision *int `pulumi:"revision"`
   557  	// Configuration block for runtimePlatform that containers in your task may use.
   558  	RuntimePlatform *TaskDefinitionRuntimePlatform `pulumi:"runtimePlatform"`
   559  	// Whether to retain the old revision when the resource is destroyed or replacement is necessary. Default is `false`.
   560  	SkipDestroy *bool `pulumi:"skipDestroy"`
   561  	// 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.
   562  	Tags map[string]string `pulumi:"tags"`
   563  	// Map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
   564  	//
   565  	// Deprecated: Please use `tags` instead.
   566  	TagsAll map[string]string `pulumi:"tagsAll"`
   567  	// ARN of IAM role that allows your Amazon ECS container task to make calls to other AWS services.
   568  	TaskRoleArn *string `pulumi:"taskRoleArn"`
   569  	// Whether should track latest task definition or the one created with the resource. Default is `false`.
   570  	TrackLatest *bool `pulumi:"trackLatest"`
   571  	// Configuration block for volumes that containers in your task may use. Detailed below.
   572  	Volumes []TaskDefinitionVolume `pulumi:"volumes"`
   573  }
   574  
   575  type TaskDefinitionState struct {
   576  	// Full ARN of the Task Definition (including both `family` and `revision`).
   577  	Arn pulumi.StringPtrInput
   578  	// ARN of the Task Definition with the trailing `revision` removed. This may be useful for situations where the latest task definition is always desired. If a revision isn't specified, the latest ACTIVE revision is used. See the [AWS documentation](https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_StartTask.html#ECS-StartTask-request-taskDefinition) for details.
   579  	ArnWithoutRevision pulumi.StringPtrInput
   580  	// A list of valid [container definitions](http://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_ContainerDefinition.html) provided as a single valid JSON document. Please note that you should only provide values that are part of the container definition document. For a detailed description of what parameters are available, see the [Task Definition Parameters](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_definition_parameters.html) section from the official [Developer Guide](https://docs.aws.amazon.com/AmazonECS/latest/developerguide).
   581  	ContainerDefinitions pulumi.StringPtrInput
   582  	// Number of cpu units used by the task. If the `requiresCompatibilities` is `FARGATE` this field is required.
   583  	Cpu pulumi.StringPtrInput
   584  	// The amount of ephemeral storage to allocate for the task. This parameter is used to expand the total amount of ephemeral storage available, beyond the default amount, for tasks hosted on AWS Fargate. See Ephemeral Storage.
   585  	EphemeralStorage TaskDefinitionEphemeralStoragePtrInput
   586  	// ARN of the task execution role that the Amazon ECS container agent and the Docker daemon can assume.
   587  	ExecutionRoleArn pulumi.StringPtrInput
   588  	// A unique name for your task definition.
   589  	//
   590  	// The following arguments are optional:
   591  	Family pulumi.StringPtrInput
   592  	// Configuration block(s) with Inference Accelerators settings. Detailed below.
   593  	InferenceAccelerators TaskDefinitionInferenceAcceleratorArrayInput
   594  	// IPC resource namespace to be used for the containers in the task The valid values are `host`, `task`, and `none`.
   595  	IpcMode pulumi.StringPtrInput
   596  	// Amount (in MiB) of memory used by the task. If the `requiresCompatibilities` is `FARGATE` this field is required.
   597  	Memory pulumi.StringPtrInput
   598  	// Docker networking mode to use for the containers in the task. Valid values are `none`, `bridge`, `awsvpc`, and `host`.
   599  	NetworkMode pulumi.StringPtrInput
   600  	// Process namespace to use for the containers in the task. The valid values are `host` and `task`.
   601  	PidMode pulumi.StringPtrInput
   602  	// Configuration block for rules that are taken into consideration during task placement. Maximum number of `placementConstraints` is `10`. Detailed below.
   603  	PlacementConstraints TaskDefinitionPlacementConstraintArrayInput
   604  	// Configuration block for the App Mesh proxy. Detailed below.
   605  	ProxyConfiguration TaskDefinitionProxyConfigurationPtrInput
   606  	// Set of launch types required by the task. The valid values are `EC2` and `FARGATE`.
   607  	RequiresCompatibilities pulumi.StringArrayInput
   608  	// Revision of the task in a particular family.
   609  	Revision pulumi.IntPtrInput
   610  	// Configuration block for runtimePlatform that containers in your task may use.
   611  	RuntimePlatform TaskDefinitionRuntimePlatformPtrInput
   612  	// Whether to retain the old revision when the resource is destroyed or replacement is necessary. Default is `false`.
   613  	SkipDestroy pulumi.BoolPtrInput
   614  	// 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.
   615  	Tags pulumi.StringMapInput
   616  	// Map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
   617  	//
   618  	// Deprecated: Please use `tags` instead.
   619  	TagsAll pulumi.StringMapInput
   620  	// ARN of IAM role that allows your Amazon ECS container task to make calls to other AWS services.
   621  	TaskRoleArn pulumi.StringPtrInput
   622  	// Whether should track latest task definition or the one created with the resource. Default is `false`.
   623  	TrackLatest pulumi.BoolPtrInput
   624  	// Configuration block for volumes that containers in your task may use. Detailed below.
   625  	Volumes TaskDefinitionVolumeArrayInput
   626  }
   627  
   628  func (TaskDefinitionState) ElementType() reflect.Type {
   629  	return reflect.TypeOf((*taskDefinitionState)(nil)).Elem()
   630  }
   631  
   632  type taskDefinitionArgs struct {
   633  	// A list of valid [container definitions](http://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_ContainerDefinition.html) provided as a single valid JSON document. Please note that you should only provide values that are part of the container definition document. For a detailed description of what parameters are available, see the [Task Definition Parameters](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_definition_parameters.html) section from the official [Developer Guide](https://docs.aws.amazon.com/AmazonECS/latest/developerguide).
   634  	ContainerDefinitions string `pulumi:"containerDefinitions"`
   635  	// Number of cpu units used by the task. If the `requiresCompatibilities` is `FARGATE` this field is required.
   636  	Cpu *string `pulumi:"cpu"`
   637  	// The amount of ephemeral storage to allocate for the task. This parameter is used to expand the total amount of ephemeral storage available, beyond the default amount, for tasks hosted on AWS Fargate. See Ephemeral Storage.
   638  	EphemeralStorage *TaskDefinitionEphemeralStorage `pulumi:"ephemeralStorage"`
   639  	// ARN of the task execution role that the Amazon ECS container agent and the Docker daemon can assume.
   640  	ExecutionRoleArn *string `pulumi:"executionRoleArn"`
   641  	// A unique name for your task definition.
   642  	//
   643  	// The following arguments are optional:
   644  	Family string `pulumi:"family"`
   645  	// Configuration block(s) with Inference Accelerators settings. Detailed below.
   646  	InferenceAccelerators []TaskDefinitionInferenceAccelerator `pulumi:"inferenceAccelerators"`
   647  	// IPC resource namespace to be used for the containers in the task The valid values are `host`, `task`, and `none`.
   648  	IpcMode *string `pulumi:"ipcMode"`
   649  	// Amount (in MiB) of memory used by the task. If the `requiresCompatibilities` is `FARGATE` this field is required.
   650  	Memory *string `pulumi:"memory"`
   651  	// Docker networking mode to use for the containers in the task. Valid values are `none`, `bridge`, `awsvpc`, and `host`.
   652  	NetworkMode *string `pulumi:"networkMode"`
   653  	// Process namespace to use for the containers in the task. The valid values are `host` and `task`.
   654  	PidMode *string `pulumi:"pidMode"`
   655  	// Configuration block for rules that are taken into consideration during task placement. Maximum number of `placementConstraints` is `10`. Detailed below.
   656  	PlacementConstraints []TaskDefinitionPlacementConstraint `pulumi:"placementConstraints"`
   657  	// Configuration block for the App Mesh proxy. Detailed below.
   658  	ProxyConfiguration *TaskDefinitionProxyConfiguration `pulumi:"proxyConfiguration"`
   659  	// Set of launch types required by the task. The valid values are `EC2` and `FARGATE`.
   660  	RequiresCompatibilities []string `pulumi:"requiresCompatibilities"`
   661  	// Configuration block for runtimePlatform that containers in your task may use.
   662  	RuntimePlatform *TaskDefinitionRuntimePlatform `pulumi:"runtimePlatform"`
   663  	// Whether to retain the old revision when the resource is destroyed or replacement is necessary. Default is `false`.
   664  	SkipDestroy *bool `pulumi:"skipDestroy"`
   665  	// 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.
   666  	Tags map[string]string `pulumi:"tags"`
   667  	// ARN of IAM role that allows your Amazon ECS container task to make calls to other AWS services.
   668  	TaskRoleArn *string `pulumi:"taskRoleArn"`
   669  	// Whether should track latest task definition or the one created with the resource. Default is `false`.
   670  	TrackLatest *bool `pulumi:"trackLatest"`
   671  	// Configuration block for volumes that containers in your task may use. Detailed below.
   672  	Volumes []TaskDefinitionVolume `pulumi:"volumes"`
   673  }
   674  
   675  // The set of arguments for constructing a TaskDefinition resource.
   676  type TaskDefinitionArgs struct {
   677  	// A list of valid [container definitions](http://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_ContainerDefinition.html) provided as a single valid JSON document. Please note that you should only provide values that are part of the container definition document. For a detailed description of what parameters are available, see the [Task Definition Parameters](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_definition_parameters.html) section from the official [Developer Guide](https://docs.aws.amazon.com/AmazonECS/latest/developerguide).
   678  	ContainerDefinitions pulumi.StringInput
   679  	// Number of cpu units used by the task. If the `requiresCompatibilities` is `FARGATE` this field is required.
   680  	Cpu pulumi.StringPtrInput
   681  	// The amount of ephemeral storage to allocate for the task. This parameter is used to expand the total amount of ephemeral storage available, beyond the default amount, for tasks hosted on AWS Fargate. See Ephemeral Storage.
   682  	EphemeralStorage TaskDefinitionEphemeralStoragePtrInput
   683  	// ARN of the task execution role that the Amazon ECS container agent and the Docker daemon can assume.
   684  	ExecutionRoleArn pulumi.StringPtrInput
   685  	// A unique name for your task definition.
   686  	//
   687  	// The following arguments are optional:
   688  	Family pulumi.StringInput
   689  	// Configuration block(s) with Inference Accelerators settings. Detailed below.
   690  	InferenceAccelerators TaskDefinitionInferenceAcceleratorArrayInput
   691  	// IPC resource namespace to be used for the containers in the task The valid values are `host`, `task`, and `none`.
   692  	IpcMode pulumi.StringPtrInput
   693  	// Amount (in MiB) of memory used by the task. If the `requiresCompatibilities` is `FARGATE` this field is required.
   694  	Memory pulumi.StringPtrInput
   695  	// Docker networking mode to use for the containers in the task. Valid values are `none`, `bridge`, `awsvpc`, and `host`.
   696  	NetworkMode pulumi.StringPtrInput
   697  	// Process namespace to use for the containers in the task. The valid values are `host` and `task`.
   698  	PidMode pulumi.StringPtrInput
   699  	// Configuration block for rules that are taken into consideration during task placement. Maximum number of `placementConstraints` is `10`. Detailed below.
   700  	PlacementConstraints TaskDefinitionPlacementConstraintArrayInput
   701  	// Configuration block for the App Mesh proxy. Detailed below.
   702  	ProxyConfiguration TaskDefinitionProxyConfigurationPtrInput
   703  	// Set of launch types required by the task. The valid values are `EC2` and `FARGATE`.
   704  	RequiresCompatibilities pulumi.StringArrayInput
   705  	// Configuration block for runtimePlatform that containers in your task may use.
   706  	RuntimePlatform TaskDefinitionRuntimePlatformPtrInput
   707  	// Whether to retain the old revision when the resource is destroyed or replacement is necessary. Default is `false`.
   708  	SkipDestroy pulumi.BoolPtrInput
   709  	// 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.
   710  	Tags pulumi.StringMapInput
   711  	// ARN of IAM role that allows your Amazon ECS container task to make calls to other AWS services.
   712  	TaskRoleArn pulumi.StringPtrInput
   713  	// Whether should track latest task definition or the one created with the resource. Default is `false`.
   714  	TrackLatest pulumi.BoolPtrInput
   715  	// Configuration block for volumes that containers in your task may use. Detailed below.
   716  	Volumes TaskDefinitionVolumeArrayInput
   717  }
   718  
   719  func (TaskDefinitionArgs) ElementType() reflect.Type {
   720  	return reflect.TypeOf((*taskDefinitionArgs)(nil)).Elem()
   721  }
   722  
   723  type TaskDefinitionInput interface {
   724  	pulumi.Input
   725  
   726  	ToTaskDefinitionOutput() TaskDefinitionOutput
   727  	ToTaskDefinitionOutputWithContext(ctx context.Context) TaskDefinitionOutput
   728  }
   729  
   730  func (*TaskDefinition) ElementType() reflect.Type {
   731  	return reflect.TypeOf((**TaskDefinition)(nil)).Elem()
   732  }
   733  
   734  func (i *TaskDefinition) ToTaskDefinitionOutput() TaskDefinitionOutput {
   735  	return i.ToTaskDefinitionOutputWithContext(context.Background())
   736  }
   737  
   738  func (i *TaskDefinition) ToTaskDefinitionOutputWithContext(ctx context.Context) TaskDefinitionOutput {
   739  	return pulumi.ToOutputWithContext(ctx, i).(TaskDefinitionOutput)
   740  }
   741  
   742  // TaskDefinitionArrayInput is an input type that accepts TaskDefinitionArray and TaskDefinitionArrayOutput values.
   743  // You can construct a concrete instance of `TaskDefinitionArrayInput` via:
   744  //
   745  //	TaskDefinitionArray{ TaskDefinitionArgs{...} }
   746  type TaskDefinitionArrayInput interface {
   747  	pulumi.Input
   748  
   749  	ToTaskDefinitionArrayOutput() TaskDefinitionArrayOutput
   750  	ToTaskDefinitionArrayOutputWithContext(context.Context) TaskDefinitionArrayOutput
   751  }
   752  
   753  type TaskDefinitionArray []TaskDefinitionInput
   754  
   755  func (TaskDefinitionArray) ElementType() reflect.Type {
   756  	return reflect.TypeOf((*[]*TaskDefinition)(nil)).Elem()
   757  }
   758  
   759  func (i TaskDefinitionArray) ToTaskDefinitionArrayOutput() TaskDefinitionArrayOutput {
   760  	return i.ToTaskDefinitionArrayOutputWithContext(context.Background())
   761  }
   762  
   763  func (i TaskDefinitionArray) ToTaskDefinitionArrayOutputWithContext(ctx context.Context) TaskDefinitionArrayOutput {
   764  	return pulumi.ToOutputWithContext(ctx, i).(TaskDefinitionArrayOutput)
   765  }
   766  
   767  // TaskDefinitionMapInput is an input type that accepts TaskDefinitionMap and TaskDefinitionMapOutput values.
   768  // You can construct a concrete instance of `TaskDefinitionMapInput` via:
   769  //
   770  //	TaskDefinitionMap{ "key": TaskDefinitionArgs{...} }
   771  type TaskDefinitionMapInput interface {
   772  	pulumi.Input
   773  
   774  	ToTaskDefinitionMapOutput() TaskDefinitionMapOutput
   775  	ToTaskDefinitionMapOutputWithContext(context.Context) TaskDefinitionMapOutput
   776  }
   777  
   778  type TaskDefinitionMap map[string]TaskDefinitionInput
   779  
   780  func (TaskDefinitionMap) ElementType() reflect.Type {
   781  	return reflect.TypeOf((*map[string]*TaskDefinition)(nil)).Elem()
   782  }
   783  
   784  func (i TaskDefinitionMap) ToTaskDefinitionMapOutput() TaskDefinitionMapOutput {
   785  	return i.ToTaskDefinitionMapOutputWithContext(context.Background())
   786  }
   787  
   788  func (i TaskDefinitionMap) ToTaskDefinitionMapOutputWithContext(ctx context.Context) TaskDefinitionMapOutput {
   789  	return pulumi.ToOutputWithContext(ctx, i).(TaskDefinitionMapOutput)
   790  }
   791  
   792  type TaskDefinitionOutput struct{ *pulumi.OutputState }
   793  
   794  func (TaskDefinitionOutput) ElementType() reflect.Type {
   795  	return reflect.TypeOf((**TaskDefinition)(nil)).Elem()
   796  }
   797  
   798  func (o TaskDefinitionOutput) ToTaskDefinitionOutput() TaskDefinitionOutput {
   799  	return o
   800  }
   801  
   802  func (o TaskDefinitionOutput) ToTaskDefinitionOutputWithContext(ctx context.Context) TaskDefinitionOutput {
   803  	return o
   804  }
   805  
   806  // Full ARN of the Task Definition (including both `family` and `revision`).
   807  func (o TaskDefinitionOutput) Arn() pulumi.StringOutput {
   808  	return o.ApplyT(func(v *TaskDefinition) pulumi.StringOutput { return v.Arn }).(pulumi.StringOutput)
   809  }
   810  
   811  // ARN of the Task Definition with the trailing `revision` removed. This may be useful for situations where the latest task definition is always desired. If a revision isn't specified, the latest ACTIVE revision is used. See the [AWS documentation](https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_StartTask.html#ECS-StartTask-request-taskDefinition) for details.
   812  func (o TaskDefinitionOutput) ArnWithoutRevision() pulumi.StringOutput {
   813  	return o.ApplyT(func(v *TaskDefinition) pulumi.StringOutput { return v.ArnWithoutRevision }).(pulumi.StringOutput)
   814  }
   815  
   816  // A list of valid [container definitions](http://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_ContainerDefinition.html) provided as a single valid JSON document. Please note that you should only provide values that are part of the container definition document. For a detailed description of what parameters are available, see the [Task Definition Parameters](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_definition_parameters.html) section from the official [Developer Guide](https://docs.aws.amazon.com/AmazonECS/latest/developerguide).
   817  func (o TaskDefinitionOutput) ContainerDefinitions() pulumi.StringOutput {
   818  	return o.ApplyT(func(v *TaskDefinition) pulumi.StringOutput { return v.ContainerDefinitions }).(pulumi.StringOutput)
   819  }
   820  
   821  // Number of cpu units used by the task. If the `requiresCompatibilities` is `FARGATE` this field is required.
   822  func (o TaskDefinitionOutput) Cpu() pulumi.StringPtrOutput {
   823  	return o.ApplyT(func(v *TaskDefinition) pulumi.StringPtrOutput { return v.Cpu }).(pulumi.StringPtrOutput)
   824  }
   825  
   826  // The amount of ephemeral storage to allocate for the task. This parameter is used to expand the total amount of ephemeral storage available, beyond the default amount, for tasks hosted on AWS Fargate. See Ephemeral Storage.
   827  func (o TaskDefinitionOutput) EphemeralStorage() TaskDefinitionEphemeralStoragePtrOutput {
   828  	return o.ApplyT(func(v *TaskDefinition) TaskDefinitionEphemeralStoragePtrOutput { return v.EphemeralStorage }).(TaskDefinitionEphemeralStoragePtrOutput)
   829  }
   830  
   831  // ARN of the task execution role that the Amazon ECS container agent and the Docker daemon can assume.
   832  func (o TaskDefinitionOutput) ExecutionRoleArn() pulumi.StringPtrOutput {
   833  	return o.ApplyT(func(v *TaskDefinition) pulumi.StringPtrOutput { return v.ExecutionRoleArn }).(pulumi.StringPtrOutput)
   834  }
   835  
   836  // A unique name for your task definition.
   837  //
   838  // The following arguments are optional:
   839  func (o TaskDefinitionOutput) Family() pulumi.StringOutput {
   840  	return o.ApplyT(func(v *TaskDefinition) pulumi.StringOutput { return v.Family }).(pulumi.StringOutput)
   841  }
   842  
   843  // Configuration block(s) with Inference Accelerators settings. Detailed below.
   844  func (o TaskDefinitionOutput) InferenceAccelerators() TaskDefinitionInferenceAcceleratorArrayOutput {
   845  	return o.ApplyT(func(v *TaskDefinition) TaskDefinitionInferenceAcceleratorArrayOutput { return v.InferenceAccelerators }).(TaskDefinitionInferenceAcceleratorArrayOutput)
   846  }
   847  
   848  // IPC resource namespace to be used for the containers in the task The valid values are `host`, `task`, and `none`.
   849  func (o TaskDefinitionOutput) IpcMode() pulumi.StringPtrOutput {
   850  	return o.ApplyT(func(v *TaskDefinition) pulumi.StringPtrOutput { return v.IpcMode }).(pulumi.StringPtrOutput)
   851  }
   852  
   853  // Amount (in MiB) of memory used by the task. If the `requiresCompatibilities` is `FARGATE` this field is required.
   854  func (o TaskDefinitionOutput) Memory() pulumi.StringPtrOutput {
   855  	return o.ApplyT(func(v *TaskDefinition) pulumi.StringPtrOutput { return v.Memory }).(pulumi.StringPtrOutput)
   856  }
   857  
   858  // Docker networking mode to use for the containers in the task. Valid values are `none`, `bridge`, `awsvpc`, and `host`.
   859  func (o TaskDefinitionOutput) NetworkMode() pulumi.StringOutput {
   860  	return o.ApplyT(func(v *TaskDefinition) pulumi.StringOutput { return v.NetworkMode }).(pulumi.StringOutput)
   861  }
   862  
   863  // Process namespace to use for the containers in the task. The valid values are `host` and `task`.
   864  func (o TaskDefinitionOutput) PidMode() pulumi.StringPtrOutput {
   865  	return o.ApplyT(func(v *TaskDefinition) pulumi.StringPtrOutput { return v.PidMode }).(pulumi.StringPtrOutput)
   866  }
   867  
   868  // Configuration block for rules that are taken into consideration during task placement. Maximum number of `placementConstraints` is `10`. Detailed below.
   869  func (o TaskDefinitionOutput) PlacementConstraints() TaskDefinitionPlacementConstraintArrayOutput {
   870  	return o.ApplyT(func(v *TaskDefinition) TaskDefinitionPlacementConstraintArrayOutput { return v.PlacementConstraints }).(TaskDefinitionPlacementConstraintArrayOutput)
   871  }
   872  
   873  // Configuration block for the App Mesh proxy. Detailed below.
   874  func (o TaskDefinitionOutput) ProxyConfiguration() TaskDefinitionProxyConfigurationPtrOutput {
   875  	return o.ApplyT(func(v *TaskDefinition) TaskDefinitionProxyConfigurationPtrOutput { return v.ProxyConfiguration }).(TaskDefinitionProxyConfigurationPtrOutput)
   876  }
   877  
   878  // Set of launch types required by the task. The valid values are `EC2` and `FARGATE`.
   879  func (o TaskDefinitionOutput) RequiresCompatibilities() pulumi.StringArrayOutput {
   880  	return o.ApplyT(func(v *TaskDefinition) pulumi.StringArrayOutput { return v.RequiresCompatibilities }).(pulumi.StringArrayOutput)
   881  }
   882  
   883  // Revision of the task in a particular family.
   884  func (o TaskDefinitionOutput) Revision() pulumi.IntOutput {
   885  	return o.ApplyT(func(v *TaskDefinition) pulumi.IntOutput { return v.Revision }).(pulumi.IntOutput)
   886  }
   887  
   888  // Configuration block for runtimePlatform that containers in your task may use.
   889  func (o TaskDefinitionOutput) RuntimePlatform() TaskDefinitionRuntimePlatformPtrOutput {
   890  	return o.ApplyT(func(v *TaskDefinition) TaskDefinitionRuntimePlatformPtrOutput { return v.RuntimePlatform }).(TaskDefinitionRuntimePlatformPtrOutput)
   891  }
   892  
   893  // Whether to retain the old revision when the resource is destroyed or replacement is necessary. Default is `false`.
   894  func (o TaskDefinitionOutput) SkipDestroy() pulumi.BoolPtrOutput {
   895  	return o.ApplyT(func(v *TaskDefinition) pulumi.BoolPtrOutput { return v.SkipDestroy }).(pulumi.BoolPtrOutput)
   896  }
   897  
   898  // 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.
   899  func (o TaskDefinitionOutput) Tags() pulumi.StringMapOutput {
   900  	return o.ApplyT(func(v *TaskDefinition) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput)
   901  }
   902  
   903  // Map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
   904  //
   905  // Deprecated: Please use `tags` instead.
   906  func (o TaskDefinitionOutput) TagsAll() pulumi.StringMapOutput {
   907  	return o.ApplyT(func(v *TaskDefinition) pulumi.StringMapOutput { return v.TagsAll }).(pulumi.StringMapOutput)
   908  }
   909  
   910  // ARN of IAM role that allows your Amazon ECS container task to make calls to other AWS services.
   911  func (o TaskDefinitionOutput) TaskRoleArn() pulumi.StringPtrOutput {
   912  	return o.ApplyT(func(v *TaskDefinition) pulumi.StringPtrOutput { return v.TaskRoleArn }).(pulumi.StringPtrOutput)
   913  }
   914  
   915  // Whether should track latest task definition or the one created with the resource. Default is `false`.
   916  func (o TaskDefinitionOutput) TrackLatest() pulumi.BoolPtrOutput {
   917  	return o.ApplyT(func(v *TaskDefinition) pulumi.BoolPtrOutput { return v.TrackLatest }).(pulumi.BoolPtrOutput)
   918  }
   919  
   920  // Configuration block for volumes that containers in your task may use. Detailed below.
   921  func (o TaskDefinitionOutput) Volumes() TaskDefinitionVolumeArrayOutput {
   922  	return o.ApplyT(func(v *TaskDefinition) TaskDefinitionVolumeArrayOutput { return v.Volumes }).(TaskDefinitionVolumeArrayOutput)
   923  }
   924  
   925  type TaskDefinitionArrayOutput struct{ *pulumi.OutputState }
   926  
   927  func (TaskDefinitionArrayOutput) ElementType() reflect.Type {
   928  	return reflect.TypeOf((*[]*TaskDefinition)(nil)).Elem()
   929  }
   930  
   931  func (o TaskDefinitionArrayOutput) ToTaskDefinitionArrayOutput() TaskDefinitionArrayOutput {
   932  	return o
   933  }
   934  
   935  func (o TaskDefinitionArrayOutput) ToTaskDefinitionArrayOutputWithContext(ctx context.Context) TaskDefinitionArrayOutput {
   936  	return o
   937  }
   938  
   939  func (o TaskDefinitionArrayOutput) Index(i pulumi.IntInput) TaskDefinitionOutput {
   940  	return pulumi.All(o, i).ApplyT(func(vs []interface{}) *TaskDefinition {
   941  		return vs[0].([]*TaskDefinition)[vs[1].(int)]
   942  	}).(TaskDefinitionOutput)
   943  }
   944  
   945  type TaskDefinitionMapOutput struct{ *pulumi.OutputState }
   946  
   947  func (TaskDefinitionMapOutput) ElementType() reflect.Type {
   948  	return reflect.TypeOf((*map[string]*TaskDefinition)(nil)).Elem()
   949  }
   950  
   951  func (o TaskDefinitionMapOutput) ToTaskDefinitionMapOutput() TaskDefinitionMapOutput {
   952  	return o
   953  }
   954  
   955  func (o TaskDefinitionMapOutput) ToTaskDefinitionMapOutputWithContext(ctx context.Context) TaskDefinitionMapOutput {
   956  	return o
   957  }
   958  
   959  func (o TaskDefinitionMapOutput) MapIndex(k pulumi.StringInput) TaskDefinitionOutput {
   960  	return pulumi.All(o, k).ApplyT(func(vs []interface{}) *TaskDefinition {
   961  		return vs[0].(map[string]*TaskDefinition)[vs[1].(string)]
   962  	}).(TaskDefinitionOutput)
   963  }
   964  
   965  func init() {
   966  	pulumi.RegisterInputType(reflect.TypeOf((*TaskDefinitionInput)(nil)).Elem(), &TaskDefinition{})
   967  	pulumi.RegisterInputType(reflect.TypeOf((*TaskDefinitionArrayInput)(nil)).Elem(), TaskDefinitionArray{})
   968  	pulumi.RegisterInputType(reflect.TypeOf((*TaskDefinitionMapInput)(nil)).Elem(), TaskDefinitionMap{})
   969  	pulumi.RegisterOutputType(TaskDefinitionOutput{})
   970  	pulumi.RegisterOutputType(TaskDefinitionArrayOutput{})
   971  	pulumi.RegisterOutputType(TaskDefinitionMapOutput{})
   972  }