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:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 31c38885e7c54ae57a9e37b7a0ac7cfa0f8c82d29ec9d84706dfa4a04bdf2b78
|
|
4
|
+
data.tar.gz: e16f179d0fb5806855dfe840afd60c4e87a7d58abe6f60364a09846f38e64bef
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
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
|
-
|
|
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
|
-
|
|
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.
|
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:
|
|
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:
|
|
12
|
+
date: 2026-03-04 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: oci
|