Skip to content

Commit 61c1574

Browse files
committed
Reword CHANGELOG and add test.
1 parent a9682ef commit 61c1574

File tree

2 files changed

+30
-3
lines changed

2 files changed

+30
-3
lines changed

CHANGELOG.md

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
## Unreleased
22

3-
* Name and tag cluster worker EBS volumes (Resolves #94)
4-
53
BACKWARDS INCOMPATIBILITIES / NOTES:
64

75
* The `cluster_desired_capacity` is now ignored after the first `apply` of the
@@ -16,7 +14,10 @@ IMPROVEMENTS:
1614
users of this module to require that IMDSv2 be used by containers in the
1715
cluster. By default, IMDSv2 is not required in this version of the module but
1816
a future major release of the module may enforce IMDSv2 usage.
19-
17+
* The EBS volumes attached to container instances are now tagged with
18+
`Component`, `DeploymentIdentifier`, `Name` and `ClusterName` tags by default,
19+
as well as with any tags passed in the `tags` var when provided (resolves
20+
#94).
2021

2122
## 6.0.0 (February 22th 2023)
2223

spec/unit/launch_template_spec.rb

+26
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,12 @@
99
let(:dep_id) do
1010
var(role: :root, name: 'deployment_identifier')
1111
end
12+
let(:cluster_name) do
13+
'default'
14+
end
15+
let(:tags) do
16+
var(role: :root, name: 'tags')
17+
end
1218
let(:region) do
1319
var(role: :root, name: 'region')
1420
end
@@ -161,6 +167,26 @@
161167
end
162168
end
163169

170+
describe 'tag specifications' do
171+
it 'sets default and provided tags on volumes' do
172+
expect(@plan)
173+
.to(include_resource_creation(type: 'aws_launch_template')
174+
.with_attribute_value(
175+
[:tag_specifications, 0],
176+
{
177+
resource_type: 'volume',
178+
tags: {
179+
'Component' => component,
180+
'DeploymentIdentifier' => dep_id,
181+
'Name' =>
182+
"cluster-worker-#{component}-#{dep_id}-#{cluster_name}",
183+
'ClusterName' => cluster_name
184+
}.merge(tags)
185+
}
186+
))
187+
end
188+
end
189+
164190
context 'when root block device path is specified' do
165191
device_path = '/custom/path'
166192

0 commit comments

Comments
 (0)