Skip to content

Commit

Permalink
[ami] Fix ami name having a plus sign (#370)
Browse files Browse the repository at this point in the history
Seems like its not supported and unfortunately I missed it on my local
testing

Signed-off-by: Itxaka <[email protected]>
  • Loading branch information
Itxaka authored Jul 5, 2021
1 parent 5cef25f commit 1c0464d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packer/images.json.pkr.hcl
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
source "amazon-ebs" "cos" {
access_key = var.aws_access_key
ami_name = "${var.name}-${var.cos_version}-${formatdate("DDMMYYYY", timestamp())}-${var.flavor}"
ami_description = "${var.name}-${var.cos_version}-${formatdate("DDMMYYYY", timestamp())}-${var.flavor}"
ami_name = "${var.name}-${replace(var.cos_version, "+", "-")}-${formatdate("DDMMYYYY", timestamp())}-${var.flavor}"
ami_description = "${var.name}-${replace(var.cos_version, "+", "-")}-${formatdate("DDMMYYYY", timestamp())}-${var.flavor}"
ami_groups = var.aws_ami_groups
instance_type = var.aws_instance_type
region = var.aws_region
Expand Down

0 comments on commit 1c0464d

Please sign in to comment.