kitchen-oci 2.1.0 → 3.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 106a6d1ccf47752842daaddc79bc644b71bb5ff27da42f1bf30e4271aa2fb946
4
- data.tar.gz: 50d21fcc7ab88eb9af0546f3d97c62798621967b96c3190b5ceceee3548c1923
3
+ metadata.gz: 31c38885e7c54ae57a9e37b7a0ac7cfa0f8c82d29ec9d84706dfa4a04bdf2b78
4
+ data.tar.gz: e16f179d0fb5806855dfe840afd60c4e87a7d58abe6f60364a09846f38e64bef
5
5
  SHA512:
6
- metadata.gz: cbd4b274c32c38bdb2203fc53ca2218aad402c917c969343bfe05d27436d13be6195399469b30163c3127fe343f4f43d29a6fe2b87f20f233f639dc5b5a0c20c
7
- data.tar.gz: 4405307075b1181534c5f55630fd48b76f05ec0c920b8366049c57c71ec4be2e264956a70b274490e1c3b3dc5de38f81f59c739b7526e213ef67bedb5746c77f
6
+ metadata.gz: 128addb8b6ed1e6fd0a0b1dae8c18c9daed987793171d666963d20b6492d5cc0899d3e072bc4050ae7fc1190ddbb44f800d596ad58e67166a04afe45ab0dc14e
7
+ data.tar.gz: 9bf0610720a61ef373f709d3b1fad3b7f52fdb9a6428d454a98256fddb362fee853b73e07facb9637fe2d8494746a5738652b30619efe413876c3225e07dd37a
@@ -95,6 +95,17 @@ module Kitchen
95
95
  def instance_metadata
96
96
  launch_details.metadata = metadata
97
97
  end
98
+
99
+ # Adds the instance_options property to the launch_details to disable legacy IMDS endpoints at launch time.
100
+ # This ensures IMDSv2 is enabled from instance creation, which is required by OCI security policies
101
+ # that deny instance creation when areLegacyEndpointsDisabled='false'.
102
+ def launch_instance_options
103
+ opts = config[:instance_options].dup
104
+ return if opts.delete(:post_create)
105
+
106
+ opts[:are_legacy_imds_endpoints_disabled] = true unless opts.key?(:are_legacy_imds_endpoints_disabled)
107
+ launch_details.instance_options = OCI::Core::Models::InstanceOptions.new(opts)
108
+ end
98
109
  end
99
110
  end
100
111
  end
@@ -97,10 +97,12 @@ module Kitchen
97
97
  # Acts as a guard for setting instance options.
98
98
  def instance_options?
99
99
  return false unless config[:instance_type] == "compute"
100
+ return false unless config[:instance_options].delete(:post_create)
100
101
 
101
- config[:instance_options].merge!(are_legacy_imds_endpoints_disabled: true) unless config[:instance_options].key?(:are_legacy_imds_endpoints_disabled)
102
+ opts = config[:instance_options]
103
+ opts.merge!(are_legacy_imds_endpoints_disabled: true) unless opts.key?(:are_legacy_imds_endpoints_disabled)
102
104
  # Basically tell me if there's more stuff in there than `are_legacy_imds_endpoints_disabled: false`. If so, then proceed to setting it.
103
- config[:instance_options].reject { |o, v| o == :are_legacy_imds_endpoints_disabled && !v }.any?
105
+ opts.reject { |o, v| o == :are_legacy_imds_endpoints_disabled && !v }.any?
104
106
  end
105
107
 
106
108
  # Checks if legacy metadata is disabled.
@@ -22,6 +22,6 @@ module Kitchen
22
22
  # Version string for Oracle OCI Kitchen driver
23
23
  #
24
24
  # @author Stephen Pearson (<stephen.pearson@oracle.com>)
25
- OCI_VERSION = "2.1.0"
25
+ OCI_VERSION = "3.0.0"
26
26
  end
27
27
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kitchen-oci
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.0
4
+ version: 3.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stephen Pearson
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2025-10-20 00:00:00.000000000 Z
12
+ date: 2026-03-04 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: oci