Skip to content

Commit 01c57e4

Browse files
committed
Updated samples/terraform-code with EBS data
1 parent c0c0d93 commit 01c57e4

File tree

2 files changed

+199
-12
lines changed

2 files changed

+199
-12
lines changed

samples/terraform-code/main.tf

+32-5
Original file line numberDiff line numberDiff line change
@@ -120,11 +120,11 @@ resource "aws_ec2_fleet" "lt" {
120120
launch_template_id = aws_launch_template.lt.id
121121
version = aws_launch_template.lt.latest_version
122122
}
123-
// // For internal tests
124-
// launch_template_specification {
125-
// launch_template_id = element(aws_launch_template.lt.*.id, 0)
126-
// version = aws_launch_template.lt[0].latest_version
127-
// }
123+
// // For internal tests
124+
// launch_template_specification {
125+
// launch_template_id = element(aws_launch_template.lt.*.id, 0)
126+
// version = aws_launch_template.lt[0].latest_version
127+
// }
128128
}
129129

130130
target_capacity_specification {
@@ -148,6 +148,33 @@ resource "aws_launch_template" "lt" {
148148
elastic_inference_accelerator { // this is not part of EC2 pricing
149149
type = "eia1.medium"
150150
}
151+
152+
block_device_mappings { # "standard", "gp2", "io1", "sc1", or "st1". (Default: "gp2").
153+
device_name = "xvfs"
154+
155+
ebs {
156+
volume_size = 11
157+
}
158+
}
159+
160+
block_device_mappings { # "standard", "gp2", "io1", "sc1", or "st1". (Default: "gp2").
161+
device_name = "xvfa"
162+
163+
ebs {
164+
volume_size = 21
165+
volume_type = "sc1"
166+
}
167+
}
168+
169+
block_device_mappings { # "standard", "gp2", "io1", "sc1", or "st1". (Default: "gp2").
170+
device_name = "xvfb"
171+
172+
ebs {
173+
volume_size = 31
174+
volume_type = "io1"
175+
iops = 2001
176+
}
177+
}
151178
}
152179

153180
#########################################

samples/terraform-code/plan.json

+167-7
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"format_version": "0.1",
3-
"terraform_version": "0.12.24",
3+
"terraform_version": "0.12.25",
44
"planned_values": {
55
"root_module": {
66
"resources": [
@@ -336,7 +336,53 @@
336336
"provider_name": "aws",
337337
"schema_version": 0,
338338
"values": {
339-
"block_device_mappings": [],
339+
"block_device_mappings": [
340+
{
341+
"device_name": "xvfs",
342+
"ebs": [
343+
{
344+
"delete_on_termination": null,
345+
"encrypted": null,
346+
"kms_key_id": null,
347+
"snapshot_id": null,
348+
"volume_size": 11
349+
}
350+
],
351+
"no_device": null,
352+
"virtual_name": null
353+
},
354+
{
355+
"device_name": "xvfa",
356+
"ebs": [
357+
{
358+
"delete_on_termination": null,
359+
"encrypted": null,
360+
"kms_key_id": null,
361+
"snapshot_id": null,
362+
"volume_size": 21,
363+
"volume_type": "sc1"
364+
}
365+
],
366+
"no_device": null,
367+
"virtual_name": null
368+
},
369+
{
370+
"device_name": "xvfb",
371+
"ebs": [
372+
{
373+
"delete_on_termination": null,
374+
"encrypted": null,
375+
"iops": 2001,
376+
"kms_key_id": null,
377+
"snapshot_id": null,
378+
"volume_size": 31,
379+
"volume_type": "io1"
380+
}
381+
],
382+
"no_device": null,
383+
"virtual_name": null
384+
}
385+
],
340386
"capacity_reservation_specification": [],
341387
"cpu_options": [],
342388
"credit_specification": [],
@@ -1042,7 +1088,53 @@
10421088
],
10431089
"before": null,
10441090
"after": {
1045-
"block_device_mappings": [],
1091+
"block_device_mappings": [
1092+
{
1093+
"device_name": "xvfs",
1094+
"ebs": [
1095+
{
1096+
"delete_on_termination": null,
1097+
"encrypted": null,
1098+
"kms_key_id": null,
1099+
"snapshot_id": null,
1100+
"volume_size": 11
1101+
}
1102+
],
1103+
"no_device": null,
1104+
"virtual_name": null
1105+
},
1106+
{
1107+
"device_name": "xvfa",
1108+
"ebs": [
1109+
{
1110+
"delete_on_termination": null,
1111+
"encrypted": null,
1112+
"kms_key_id": null,
1113+
"snapshot_id": null,
1114+
"volume_size": 21,
1115+
"volume_type": "sc1"
1116+
}
1117+
],
1118+
"no_device": null,
1119+
"virtual_name": null
1120+
},
1121+
{
1122+
"device_name": "xvfb",
1123+
"ebs": [
1124+
{
1125+
"delete_on_termination": null,
1126+
"encrypted": null,
1127+
"iops": 2001,
1128+
"kms_key_id": null,
1129+
"snapshot_id": null,
1130+
"volume_size": 31,
1131+
"volume_type": "io1"
1132+
}
1133+
],
1134+
"no_device": null,
1135+
"virtual_name": null
1136+
}
1137+
],
10461138
"capacity_reservation_specification": [],
10471139
"cpu_options": [],
10481140
"credit_specification": [],
@@ -1084,7 +1176,28 @@
10841176
},
10851177
"after_unknown": {
10861178
"arn": true,
1087-
"block_device_mappings": [],
1179+
"block_device_mappings": [
1180+
{
1181+
"ebs": [
1182+
{
1183+
"iops": true,
1184+
"volume_type": true
1185+
}
1186+
]
1187+
},
1188+
{
1189+
"ebs": [
1190+
{
1191+
"iops": true
1192+
}
1193+
]
1194+
},
1195+
{
1196+
"ebs": [
1197+
{}
1198+
]
1199+
}
1200+
],
10881201
"capacity_reservation_specification": [],
10891202
"cpu_options": [],
10901203
"credit_specification": [],
@@ -1187,7 +1300,7 @@
11871300
],
11881301
"prior_state": {
11891302
"format_version": "0.1",
1190-
"terraform_version": "0.12.24",
1303+
"terraform_version": "0.12.25",
11911304
"values": {
11921305
"root_module": {
11931306
"resources": [
@@ -1290,7 +1403,7 @@
12901403
"group_names": [
12911404
"eu-west-1"
12921405
],
1293-
"id": "2020-05-17 13:15:51.632452 +0000 UTC",
1406+
"id": "2020-05-22 15:37:39.453089 +0000 UTC",
12941407
"names": [
12951408
"eu-west-1a",
12961409
"eu-west-1b",
@@ -1313,7 +1426,7 @@
13131426
"schema_version": 0,
13141427
"values": {
13151428
"current": null,
1316-
"description": "EU (Ireland)",
1429+
"description": "Europe (Ireland)",
13171430
"endpoint": "ec2.eu-west-1.amazonaws.com",
13181431
"id": "eu-west-1",
13191432
"name": "eu-west-1"
@@ -1720,6 +1833,53 @@
17201833
"name": "lt",
17211834
"provider_config_key": "aws",
17221835
"expressions": {
1836+
"block_device_mappings": [
1837+
{
1838+
"device_name": {
1839+
"constant_value": "xvfs"
1840+
},
1841+
"ebs": [
1842+
{
1843+
"volume_size": {
1844+
"constant_value": 11
1845+
}
1846+
}
1847+
]
1848+
},
1849+
{
1850+
"device_name": {
1851+
"constant_value": "xvfa"
1852+
},
1853+
"ebs": [
1854+
{
1855+
"volume_size": {
1856+
"constant_value": 21
1857+
},
1858+
"volume_type": {
1859+
"constant_value": "sc1"
1860+
}
1861+
}
1862+
]
1863+
},
1864+
{
1865+
"device_name": {
1866+
"constant_value": "xvfb"
1867+
},
1868+
"ebs": [
1869+
{
1870+
"iops": {
1871+
"constant_value": 2001
1872+
},
1873+
"volume_size": {
1874+
"constant_value": 31
1875+
},
1876+
"volume_type": {
1877+
"constant_value": "io1"
1878+
}
1879+
}
1880+
]
1881+
}
1882+
],
17231883
"elastic_gpu_specifications": [
17241884
{
17251885
"type": {

0 commit comments

Comments
 (0)