diff options
Diffstat (limited to 'lib/chef/resource/windows_certificate.rb')
-rw-r--r-- | lib/chef/resource/windows_certificate.rb | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/lib/chef/resource/windows_certificate.rb b/lib/chef/resource/windows_certificate.rb index c6e32d9fa5..967ef2f811 100644 --- a/lib/chef/resource/windows_certificate.rb +++ b/lib/chef/resource/windows_certificate.rb @@ -30,6 +30,32 @@ class Chef description "Use the **windows_certificate** resource to install a certificate into the Windows certificate store from a file. The resource grants read-only access to the private key for designated accounts. Due to current limitations in WinRM, installing certificates remotely may not work if the operation requires a user profile. Operations on the local machine store should still work." introduced "14.7" + examples <<~DOC + **Add PFX cert to local machine personal store and grant accounts read-only access to private key** + + ```ruby + windows_certificate 'c:/test/mycert.pfx' do + pfx_password 'password' + private_key_acl ["acme\fred", "pc\jane"] + end + ``` + + **Add cert to trusted intermediate store** + + ```ruby + windows_certificate 'c:/test/mycert.cer' do + store_name 'CA' + end + ``` + + **Remove all certificates matching the subject** + + ```ruby + windows_certificate 'me.acme.com' do + action :delete + end + ``` + DOC property :source, String, description: "The source file (for create and acl_add), thumbprint (for delete and acl_add) or subject (for delete) if it differs from the resource block's name.", |