File tree 1 file changed +15
-12
lines changed
1 file changed +15
-12
lines changed Original file line number Diff line number Diff line change @@ -206,18 +206,21 @@ resource "aws_launch_template" "runner" {
206
206
)
207
207
}
208
208
209
- tag_specifications {
210
- resource_type = " spot-instances-request"
211
- tags = merge (
212
- local. tags ,
213
- {
214
- " Name" = format (" %s" , local. name_runner )
215
- },
216
- {
217
- " ghr:runner_name_prefix" = var.runner_name_prefix
218
- },
219
- var. runner_ec2_tags
220
- )
209
+ dynamic "tag_specifications" {
210
+ for_each = var. instance_target_capacity_type == " spot" ? 1 : 0
211
+ content {
212
+ resource_type = " spot-instances-request"
213
+ tags = merge (
214
+ local. tags ,
215
+ {
216
+ " Name" = format (" %s" , local. name_runner )
217
+ },
218
+ {
219
+ " ghr:runner_name_prefix" = var.runner_name_prefix
220
+ },
221
+ var. runner_ec2_tags
222
+ )
223
+ }
221
224
}
222
225
223
226
tag_specifications {
You can’t perform that action at this time.
0 commit comments