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

Fix Tags; Add Firewall ID, User Data; Other MISC Updates #223

Merged
merged 3 commits into from
Apr 24, 2024

Conversation

zliang-akamai
Copy link
Member

@zliang-akamai zliang-akamai commented Apr 23, 2024

📝 Description

Multiple updates bundled:

  • Error checking that checks an always-nil err has been removed.
  • Many interface{} were replaced with any.
  • Add support for firewall_id and user_data of metadata attribute.
  • instance_tags and its validation regular expression have been fixed.

Closes #221
Closes #220

✔️ How to Test

Automated Testing

make test

Manual Testing

  • Save this in a file called test.pkr.hcl.
source "linode" "example" {
  image             = "linode/ubuntu22.04"
  instance_type     = "g6-nanode-1"
  region            = "us-mia"
  ssh_username      = "root"
  instance_tags     = ["abc", "foo=bar"]
  firewall_id       = 12345 // use your firewall ID here
  metadata {
    user_data = base64encode(<<EOF
#cloud-config

write_files:
  - path: /root/helloworld.txt
    content: |
      Hello, world!
    owner: 'root:root'
    permissions: '0644'
EOF
)
  }
}

build {
  sources = ["source.linode.example"]
}
  • go build
  • packer build .

@zliang-akamai zliang-akamai changed the title Fix tags; misc updates (see PR for details) Fix Tags and MISC Updates Apr 23, 2024
@zliang-akamai zliang-akamai force-pushed the zhiwei/tags branch 2 times, most recently from 3b2614e to 35c3769 Compare April 23, 2024 00:13
@zliang-akamai zliang-akamai changed the title Fix Tags and MISC Updates Fix Tags; Add Firewall ID, User Data; Other MISC Updates Apr 23, 2024
@zliang-akamai zliang-akamai marked this pull request as ready for review April 23, 2024 00:34
@zliang-akamai zliang-akamai requested a review from a team as a code owner April 23, 2024 00:34
@zliang-akamai zliang-akamai requested review from jriddle-linode and ykim-akamai and removed request for a team April 23, 2024 00:34
@lgarber-akamai lgarber-akamai self-requested a review April 23, 2024 15:39
Copy link
Contributor

@lgarber-akamai lgarber-akamai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thank you for addressing this!

Copy link
Contributor

@yec-akamai yec-akamai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work!

@zliang-akamai zliang-akamai merged commit 43aa1d6 into dev Apr 24, 2024
13 checks passed
@zliang-akamai zliang-akamai deleted the zhiwei/tags branch April 24, 2024 16:50
@zliang-akamai zliang-akamai added new-feature for new features in the changelog. bugfix for any bug fixes in the changelog. labels Apr 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugfix for any bug fixes in the changelog. new-feature for new features in the changelog.
Projects
None yet
3 participants