diff --git a/builtin/providers/aws/data_source_aws_ecs_container_definition.go b/builtin/providers/aws/data_source_aws_ecs_container_definition.go index df72f80e6..412019ac9 100644 --- a/builtin/providers/aws/data_source_aws_ecs_container_definition.go +++ b/builtin/providers/aws/data_source_aws_ecs_container_definition.go @@ -41,7 +41,7 @@ func dataSourceAwsEcsContainerDefinition() *schema.Resource { Type: schema.TypeInt, Computed: true, }, - "memoryReservation": &schema.Schema{ + "memory_reservation": &schema.Schema{ Type: schema.TypeInt, Computed: true, }, @@ -88,7 +88,7 @@ func dataSourceAwsEcsContainerDefinitionRead(d *schema.ResourceData, meta interf } d.Set("cpu", aws.Int64Value(def.Cpu)) d.Set("memory", aws.Int64Value(def.Memory)) - d.Set("memoryReservation", aws.Int64Value(def.MemoryReservation)) + d.Set("memory_reservation", aws.Int64Value(def.MemoryReservation)) d.Set("disable_networking", aws.BoolValue(def.DisableNetworking)) d.Set("docker_labels", aws.StringValueMap(def.DockerLabels)) diff --git a/builtin/providers/aws/data_source_aws_ecs_container_definition_test.go b/builtin/providers/aws/data_source_aws_ecs_container_definition_test.go index 271b5b835..0786d85f4 100644 --- a/builtin/providers/aws/data_source_aws_ecs_container_definition_test.go +++ b/builtin/providers/aws/data_source_aws_ecs_container_definition_test.go @@ -17,7 +17,7 @@ func TestAccAWSEcsDataSource_ecsContainerDefinition(t *testing.T) { resource.TestCheckResourceAttr("data.aws_ecs_container_definition.mongo", "image", "mongo:latest"), resource.TestCheckResourceAttr("data.aws_ecs_container_definition.mongo", "image_digest", "latest"), resource.TestCheckResourceAttr("data.aws_ecs_container_definition.mongo", "memory", "128"), - resource.TestCheckResourceAttr("data.aws_ecs_container_definition.mongo", "memoryReservation", "64"), + resource.TestCheckResourceAttr("data.aws_ecs_container_definition.mongo", "memory_reservation", "64"), resource.TestCheckResourceAttr("data.aws_ecs_container_definition.mongo", "cpu", "128"), resource.TestCheckResourceAttr("data.aws_ecs_container_definition.mongo", "environment.SECRET", "KEY"), ), diff --git a/website/source/docs/providers/aws/d/ecs_container_definition.html.markdown b/website/source/docs/providers/aws/d/ecs_container_definition.html.markdown index 6badc81dd..5f8dac6df 100644 --- a/website/source/docs/providers/aws/d/ecs_container_definition.html.markdown +++ b/website/source/docs/providers/aws/d/ecs_container_definition.html.markdown @@ -35,6 +35,7 @@ The following attributes are exported: * `image_digest` - The digest of the docker image in use * `cpu` - The CPU limit for this container definition * `memory` - The memory limit for this container definition +* `memory_reservation` - The soft limit (in MiB) of memory to reserve for the container. When system memory is under contention, Docker attempts to keep the container memory to this soft limit * `environment` - The environment in use * `disable_networking` - Indicator if networking is disabled * `docker_labels` - Set docker labels