-
Notifications
You must be signed in to change notification settings - Fork 18
Support for disabling legacy IMDS. #134
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
base: main
Are you sure you want to change the base?
Conversation
Hi, @lbajolet-hashicorp. I apologize for tagging directly, but I saw you were referenced on another open PR. Would it be possible to get some eyes on mine? Thank you. |
builder/oci/driver_oci.go
Outdated
if d.cfg.InstanceOptions.AreLegacyImdsEndpointsDisabled != nil { | ||
InstanceOptionsDetails := core.InstanceOptions{AreLegacyImdsEndpointsDisabled: d.cfg.InstanceOptions.AreLegacyImdsEndpointsDisabled} | ||
|
||
instanceDetails.InstanceOptions = &InstanceOptionsDetails |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could be inlined maybe?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry @neumayer , I was out last week, so didn't have a chance to get to this until now. I pulled the instance options inline. Thank you.

@@ -55,6 +55,10 @@ type ListImagesRequest struct { | |||
Shape *string `mapstructure:"shape"` | |||
} | |||
|
|||
type InstanceOptionsConfig struct { | |||
AreLegacyImdsEndpointsDisabled *bool `mapstructure:"are_legacy_imds_endpoints_disabled" required:"false"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i think this can be added directly to config no need of a new instance
@cernertrevor please run make generate as some of the web docs are missing. |
Hello. I am looking to offer an enhancement to packer-plugin-oracle to support the creation of instances with IMDSv1 support disabled (i.e. resolving #69 )
This is done by adding a new builder configuration option "instance_options" with a single attribute "are_legacy_imds_endpoints_disabled". This aligns with Oracle's CLI and Terraform's representation.
A few notes:
IMDS Disabled using the following builder configuration:
And without the configuration, the current behavior:

Thank you for this opportunity.
Closes #69