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

EoL attribute is set to empty string #13134

Closed
srinadhbh opened this issue Aug 6, 2024 · 3 comments
Closed

EoL attribute is set to empty string #13134

srinadhbh opened this issue Aug 6, 2024 · 3 comments

Comments

@srinadhbh
Copy link

srinadhbh commented Aug 6, 2024

Hello All

I have a requirement to set the "End of life date" to T+90 days. I have tried using the below options but I dont see any value set during the image version creation.

image

In line expression:

PACKER_LOG=1 packer build -var "azure_client_id=***" -var "azure_client_secret=***" -var "azure_subscription_id=***" -var "git_token=" -var "gallery_name=goldenimage_gallery" -var "resource_group=****" -var "subscription=***" -var "image_name=az-img-rhel8-gen1" -var "vm_size=Standard_D2_v4" -var "image_version=1.0.0" -var "virtual_network_name=HUB-USEast" -var "virtual_network_resource_group_name=RG-NetworkHUB-EastUS" -var "virtual_network_subnet_name=Internal-App" -var "image_sku=8-LVM" -var shared_gallery_image_version_end_of_life_date=$(date -d "+3 months" --utc +"%Y-%m-%dT%H:%M:%SZ") ./RHEL8/RHEL8.json

Using a variable:

#!/bin/bash

expiry_date=$(date -d “+3 months” --utc +“%Y-%m-%dT%H:%M:%SZ”)

echo “Expiry Date: $expiry_date”

PACKER_LOG=1 packer build -var “azure_client_id=" -var "azure_client_secret=” -var “azure_subscription_id=" -var “git_token=” -var “gallery_name=goldenimage_gallery” -var "resource_group=********" -var "subscription=” -var “image_name=az-img-rhel8-gen1” -var “vm_size=Standard_D2_v4” -var “image_version=1.0.0” -var “virtual_network_name=HUB-USEast” -var “virtual_network_resource_group_name=RG-EastUS” -var “virtual_network_subnet_name=Internal-App” -var “image_sku=8-LVM” -var “shared_gallery_image_version_end_of_life_date=$expiry_date” ./RHEL8/RHEL8.json

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

When filing a bug, please include the following headings if possible. Any
example text in this template can be deleted.

Overview of the Issue

A paragraph or two about the issue you're experiencing.

Reproduction Steps

Steps to reproduce this issue

Packer version

From packer version

Simplified Packer Template

If the file is longer than a few dozen lines, please include the URL to the
gist of the log or use the Github detailed
format

instead of posting it directly in the issue.

Operating system and Environment details

OS, Architecture, and any other information you can provide about the
environment.

Log Fragments and crash.log files

Include appropriate log fragments. If the log is longer than a few dozen lines,
please include the URL to the gist of the log or
use the Github detailed format instead of posting it directly in the issue.

Set the env var PACKER_LOG=1 for maximum log detail.

@srinadhbh srinadhbh added the bug label Aug 6, 2024
@lbajolet-hashicorp
Copy link
Contributor

Hi @srinadhbh,

With the command-line only it's hard to understand if there's a bug with the attribute, with the variable, or if it's a usage problem. Have you used the variable to set the value of the attribute in the template?

Would you mind sharing your template so we can take a look?

Thanks

@srinadhbh
Copy link
Author

I am closing the issue as I found a typo in json template.

Copy link

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.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 14, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants