-
Notifications
You must be signed in to change notification settings - Fork 3.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Build and Validate throw and error for valid ami_name #13157
Comments
Hi @dylanfoster thanks for reaching out and for providing the detailed issue. Looking at the configurations I see that you have a main source block Are "web" and "android" the builds you are referring to when you say "the build still runs and the ami is built"? Since you are you are including Given the configuration of your template setting an #build.android.pkr.hcl
build {
name = "android"
source "amazon-ebs.debian-docker-base" {
name = "android"
ami_name = "images/jenkins-agent-android"
ami_description = local.ami-description["android"]
tags = merge(
local.default-tags,
{
Name = "jenkins-agent-android"
"Android API Version" = "system-images;android-25;google_apis;armeabi-v7a"
"Android SDK Version" = "sdk-tools-linux-4333796"
}
)
}
source "amazon-ebs.debian-docker-base" {
name = "base" # Change this name to what you see fit
ami_name = "images/jenkins-agent-base"
ami_description = "base description"
.....
}
} Alternatively if the source block in sources.pkr.hcl is just meant to be a shared cofiguration that you reference in other build blocks you can just remove Please let use know if this suggested change resolves your issue. |
Thanks. Just removing the |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. |
Community Note
When filing a bug, please include the following headings if possible. Any
example text in this template can be deleted.
Overview of the Issue
Both
packer validate
andpacker build
are throwing an error for a valid ami_name. I'm using timestamp and format to build the ami_name but even with trimmed down string it still throws the error. More interestingly, the build still runs and the ami is built with the name specified. If I use-only
the error is not generated.I should note that I have my source and build blocks separated as it's building several different amis off of the same source, but other image configurations I have that only have a single build template do not generate this error
Reproduction Steps
Create a packer file to have your source definition
Create another packer file with your build definition.
Packer version
From
packer version
Simplified Packer Template
gist
Operating system and Environment details
OS, Architecture, and any other information you can provide about the
environment.
Log Fragments and crash.log files
The text was updated successfully, but these errors were encountered: