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

Add support for LINODE_CA env var and api_ca_path attribute #270

Merged
merged 2 commits into from
Nov 4, 2024

Conversation

zliang-akamai
Copy link
Member

📝 Description

Similar to the Terraform PR linode/terraform-provider-linode#1614, adding support for LINODE_CA environment var and api_ca_path attribute in our packer plugin.

✔️ How to Test

Automated Testing (CA test not included)

make test

Manual Testing

Put this content in a file called test.pkr.hcl

locals { timestamp = regex_replace(timestamp(), "[- TZ:]", "") }

source "linode" "example" {
  image             = "linode/debian11"
  image_description = "My Private Image"
  image_label       = "private-image-${local.timestamp}"
  instance_label    = "temporary-linode-${local.timestamp}"
  instance_type     = "g6-nanode-1"
  region            = "us-east"
  ssh_username      = "root"
  api_ca_path       = "/path/to/your/ca.pem"

  interface {
    purpose = "public"
  }
}

build {
  sources = ["source.linode.example"]
}
make dev
packer build .

@zliang-akamai zliang-akamai requested a review from a team as a code owner October 30, 2024 02:57
@zliang-akamai zliang-akamai requested review from ykim-akamai and yec-akamai and removed request for a team October 30, 2024 02:57
@ezilber-akamai ezilber-akamai self-requested a review November 4, 2024 16:54
Copy link

@ezilber-akamai ezilber-akamai left a comment

Choose a reason for hiding this comment

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

Nice work! Everything is working as expected locally.

Copy link
Contributor

@ykim-akamai ykim-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, tests and manual steps are passing locally

@zliang-akamai zliang-akamai merged commit 4343f20 into linode:dev Nov 4, 2024
10 checks passed
@zliang-akamai zliang-akamai deleted the zhiwei/ca-path branch November 4, 2024 20:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants