Skip to content
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

ebssurrogate builder missing deprecate_at argument #478

Closed
lorengordon opened this issue Apr 19, 2024 · 3 comments · Fixed by #482
Closed

ebssurrogate builder missing deprecate_at argument #478

lorengordon opened this issue Apr 19, 2024 · 3 comments · Fixed by #482

Comments

@lorengordon
Copy link
Contributor

Overview of the Issue

The amazon-ebssurrogate builder is missing the deprecate_at argument.

Reproduction Steps

Attempt to use the argument deprecate_at in a template with the ebssurrogate builder.

Plugin and Packer version

❯ packer plugins installed
/home/x/.config/packer/plugins/github.com/hashicorp/amazon/packer-plugin-amazon_v1.3.2_x5.0_linux_amd64

Simplified Packer Buildfile

Just copying from the docs example, and adding the deprecate_at input...

source "amazon-ebssurrogate" "basic-example" {
  region = "us-east-1"
  ssh_username = "ubuntu"
  instance_type = "t2.medium"
  source_ami = "ami-40d28157"
  ami_name = "packer-test-ami"
  ami_virtualization_type = "paravirtual"

  deprecate_at = timeadd(timestamp(), "8760h")
  
  launch_block_device_mappings {
      volume_type = "gp2"
      device_name = "/dev/xvdf"
      delete_on_termination = false
      volume_size = 10
  }

  ami_root_device {
    source_device_name = "/dev/xvdf"
    device_name = "/dev/xvda"
    delete_on_termination = true
    volume_size = 16
    volume_type = "gp2"
  }
}

build {
  sources = ["sources.amazon-ebssurrogate.basic-example"]

  provisioner "shell" {
      inline = ["..."]
  }
}

Log Fragments and crash.log files

❯ packer build build.pkr.hcl
Error: Unsupported argument

  on build.pkr.hcl line 9:
  (source code not available)

An argument named "deprecate_at" is not expected here.
@lbajolet-hashicorp
Copy link
Contributor

Hey @lorengordon,

Thanks for reporting this! The deprecate_ami attribute should have been common from the get-go, not sure why it wasn't in the first place, but if you are willing to, might I ask you to test it quickly from the PR I opened?
I have pushed an acceptance test so it should be verified for ebs/ebssurrogate, but it cannot hurt to test on a real config if you are available for this :)

Thanks again!

@lorengordon
Copy link
Contributor Author

Hey @lorengordon,

Thanks for reporting this! The deprecate_ami attribute should have been common from the get-go, not sure why it wasn't in the first place, but if you are willing to, might I ask you to test it quickly from the PR I opened?
I have pushed an acceptance test so it should be verified for ebs/ebssurrogate, but it cannot hurt to test on a real config if you are available for this :)

Thanks again!

On vacation until next week, so can't try just yet. But will try as soon as I can! Thanks @lbajolet-hashicorp !

@lbajolet-hashicorp
Copy link
Contributor

Thank you for the quick update, no rush, enjoy your vacation! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants