fix: set instance_options at launch time for IMDSv2 support#84
Open
warisshaikh1 wants to merge 2 commits intostephenpearson:masterfrom
Open
fix: set instance_options at launch time for IMDSv2 support#84warisshaikh1 wants to merge 2 commits intostephenpearson:masterfrom
warisshaikh1 wants to merge 2 commits intostephenpearson:masterfrom
Conversation
OCI security policies can deny instance creation when areLegacyEndpointsDisabled='false' at launch time. The current implementation sets instance_options via update_instance AFTER launch, which fails when such policies are in place. This change adds launch_instance_options to ComputeLaunchDetails to set instance_options in LaunchInstanceDetails, ensuring IMDSv2 is enabled from instance creation.
psub-github
approved these changes
Feb 23, 2026
Collaborator
|
This feature was originally coded this way, but I switched to the current implementation because some older images would not launch with this instance option set. Setting it after creation was a backward compatibility compromise. Thank you for this submission. I will review it and test it again. Maybe things have changed on the oci side since the last time I looked at it that will make it less of a breaking change. |
Aligns test expectations with the IMDSv2 launch-time fix by adding instance_options to launch_instance_request and launch_instance_from_bv_request.
Author
|
Added test fix to align expectations with the IMDSv2 launch-time change. The launch_instance_request and launch_instance_from_bv_request now include instance_options with are_legacy_imds_endpoints_disabled: true to match the updated implementation. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
OCI security policies can deny instance creation when areLegacyEndpointsDisabled='false' at launch time. The current implementation sets instance_options via update_instance AFTER launch, which fails when such policies are in place.
This change adds launch_instance_options to ComputeLaunchDetails to set instance_options in LaunchInstanceDetails, ensuring IMDSv2 is enabled from instance creation.