provider/aws: `aws_ecs_container_definition` datasource parameter

changes to memory_reservation
This commit is contained in:
stack72 2016-08-25 18:10:08 +01:00
parent 7a852dacf2
commit 0087068a0e
No known key found for this signature in database
GPG Key ID: 8619A619B085CB16
3 changed files with 4 additions and 3 deletions

View File

@ -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))

View File

@ -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"),
),

View File

@ -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