chef-provisioning-aws 1.6.0 → 1.6.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0c186bb7a22b11f6bc9e02f6cc1a2545b6a9889b
4
- data.tar.gz: 8d58524a6a73a86543eb3f6a62d769bf7afe5fe5
3
+ metadata.gz: 62665ba3e28e4e1a98db8822ca277579ae6e3453
4
+ data.tar.gz: 20e6faf05a83817c47dccb6d8229d23c006ed25a
5
5
  SHA512:
6
- metadata.gz: 14c2b8d978b7291fcf5cf52b81f36237df7f0d6dd6f4f2400a999d4f8298301322331444a655fd8b8cfaa5002d52abff00c5c13a608ccf6e8fa717b27e7ee7ae
7
- data.tar.gz: 44f55a7e710faf8e72f1874ee3b8109fe8522d63f734a5f4f6b1598ff98089a2b8c1f8aac693aeb312320c7cd5d4fc7933eb4d011a934289d656afc943ab166b
6
+ metadata.gz: fa274c48c2ec46e0ce297eb55294e7ade6887e461853f7686f3e1dd925310a4b3957d841e65a66a7ed0d0e8bbcedf4ebf249a6442bb0c217fd7d79b660d83391
7
+ data.tar.gz: 3c9e658df95add6289bc049ffbd46e652f68ba489c541f1b13aa0106d44fa3b56f63ad957b435b658362e058c9227fddd49653b2075d6f82b957e094f83c2ae4
data/Gemfile CHANGED
@@ -3,4 +3,4 @@ gem "simplecov"
3
3
  gemspec
4
4
 
5
5
  #gem 'chef-provisioning', path: '../chef-provisioning'
6
- gem 'chef-provisioning', github: 'chef/chef-provisioning', branch: 'master'
6
+ #gem 'chef-provisioning', github: 'chef/chef-provisioning', branch: 'master'
@@ -9,9 +9,12 @@ class Chef::Provider::AwsServerCertificate < Chef::Provisioning::AWSDriver::AWSP
9
9
 
10
10
  def create_aws_object
11
11
  converge_by "create server certificate #{new_resource.name}" do
12
- new_resource.driver.iam.server_certificates.upload(:name => new_resource.name,
13
- :certificate_body => new_resource.certificate_body,
14
- :private_key => new_resource.private_key)
12
+ new_resource.driver.iam.server_certificates.upload(
13
+ :name => new_resource.name,
14
+ :certificate_body => new_resource.certificate_body,
15
+ :certificate_chain => new_resource.certificate_chain,
16
+ :private_key => new_resource.private_key
17
+ )
15
18
  end
16
19
  end
17
20
 
@@ -1,7 +1,7 @@
1
1
  class Chef
2
2
  module Provisioning
3
3
  module AWSDriver
4
- VERSION = '1.6.0'
4
+ VERSION = '1.6.1'
5
5
  end
6
6
  end
7
7
  end
@@ -6,6 +6,7 @@ class Chef::Resource::AwsServerCertificate < Chef::Provisioning::AWSDriver::AWSR
6
6
  attribute :name, kind_of: String, name_attribute: true
7
7
 
8
8
  attribute :certificate_body, kind_of: String
9
+ attribute :certificate_chain, kind_of: String
9
10
  attribute :private_key, kind_of: String
10
11
 
11
12
  def aws_object
@@ -5,18 +5,79 @@ describe Chef::Resource::AwsServerCertificate do
5
5
 
6
6
  when_the_chef_12_server "exists", organization: 'foo', server_scope: :context do
7
7
  with_aws "without a VPC" do
8
+ cert_string = <<-CERT
9
+ -----BEGIN CERTIFICATE-----
10
+ MIIB+TCCAWICAQEwDQYJKoZIhvcNAQEFBQAwRTELMAkGA1UEBhMCQVUxEzARBgNV
11
+ BAgTClNvbWUtU3RhdGUxITAfBgNVBAoTGEludGVybmV0IFdpZGdpdHMgUHR5IEx0
12
+ ZDAeFw0xNTExMDMyMjQ3MzdaFw0xNjExMDIyMjQ3MzdaMEUxCzAJBgNVBAYTAkFV
13
+ MRMwEQYDVQQIEwpTb21lLVN0YXRlMSEwHwYDVQQKExhJbnRlcm5ldCBXaWRnaXRz
14
+ IFB0eSBMdGQwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAL8NfMueVw1x7cHs
15
+ a4vO1ci5Dm2X9dg1qdMS8kVrUBuQPrGk9uMEPWrh6gSdAmlrLdcazvYu3iRHJrEO
16
+ JISFWQ9Z0XOw/rhihoNwieZIbtfrTRIdzicRe3VRs/Jguq/S0bgXu2Kf0AYuBPSL
17
+ HEe3hOeAmoH7xpf40qmO/MfuveqD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KEY
25
+ -----BEGIN RSA PRIVATE KEY-----
26
+ MIICXQIBAAKBgQC/DXzLnlcNce3B7GuLztXIuQ5tl/XYNanTEvJFa1AbkD6xpPbj
27
+ BD1q4eoEnQJpay3XGs72Lt4kRyaxDiSEhVkPWdFzsP64YoaDcInmSG7X600SHc4n
28
+ EXt1UbPyYLqv0tG4F7tin9AGLgT0ixxHt4TngJqB+8aX+NKpjvzH7r3qgwIDAQAB
29
+ AoGANKyuTKGCVNWlfMMHP8uuC6JiBPtRr+PTx7tAir00n/TcJDRcUWj42gAhelYj
30
+ tRb004qzpxJy8sOfOk+w58ywKd2ZbbIPFif4K0bSBcv9+CQh3OpW77oLqS7lft/S
31
+ s1AVd5qaqVwj/2kChdusSxt/mou0hECeiDf8eBQbPi4pRPECQQD3p3VkwIeqWC+R
32
+ q/rcOEMxSSk972KEhWq6KRpGaB9TBX5cmQ0iP+zOxSSRY3qPr/8r2osBA5DsJOBZ
33
+ zZora2f5AkEAxX24tll5g23hooWAy3em/NTCGBOOdTIuUMc3hOnrF4ZpFEK8iVh0
34
+ M9NYQPv9He6xSMqQHlrL58L+kfODfL7dWwJBAIRpJHsZ9W8+dzCLozTbYBGZ7FMR
35
+ CruQGeAu2b2LLjRVW5pmun71bsee4E5bwcvRbb0ku+1u2q1nigx5wVQ1uQECQGzf
36
+ RxH3t35V+BqhYIRKnRsqqymctl8zX8cWXCwAzKJ2bb1GoStSQRVFAJUqlbqHmOJZ
37
+ ESQ6x8gnfjG1vhnqGpsCQQDuEWMaRtd9ELlRABX+IexFyGzA+qv3jREn9ZMdM2Cz
38
+ iI9GRQvTYypjW4k9qbUEzY2h5AubGfVHtDB1iL7X4XeM
39
+ -----END RSA PRIVATE KEY-----
40
+ KEY
41
+
42
+ certificate_chain_string = <<-CHAIN
43
+ -----BEGIN CERTIFICATE-----
44
+ MIIB+TCCAWICAQEwDQYJKoZIhvcNAQEFBQAwRTELMAkGA1UEBhMCQVUxEzARBgNV
45
+ BAgTClNvbWUtU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dEkt9DT01hHXG3SZ3StWx3g1CIvPQaJEdExOuyvU
63
+ b4Km88aQuBIHVyUrYgXds8hwRxe341dfXyoq/hEmPQjlWMOG9iUuSzrwygdfD1xw
64
+ OOPAS5c78LXQxls+5d7FQUsE0Zxq+0lBb8EbGgUCAwEAATANBgkqhkiG9w0BAQUF
65
+ AAOBgQAduqTZaJJaaPJL18TqhpAqix2qZ2Vjdw/oAal53g+nElUSGSzj2O/bFNRy
66
+ v432ZFGMxlGp0pYplU6e8HScR+7FfScueDTWFbK7llG3c/GGbcKuMutXZ3c96yYm
67
+ ceGGtSPaBVFCEHB4CM2vNvTcgRKuYQCnsnUpoS4FtdJ/2zmj2A==
68
+ -----END CERTIFICATE-----
69
+ CHAIN
11
70
 
12
71
  it "creates a cert" do
13
72
  expect_recipe {
14
73
  aws_server_certificate "test-cert" do
15
74
  certificate_body cert_string
16
75
  private_key private_key_string
76
+ certificate_chain certificate_chain_string
17
77
  end
18
78
  }.to create_an_aws_server_certificate("test-cert",
19
- :certificate_body => cert_string#.delete("\n")
79
+ :certificate_body => cert_string.strip,
80
+ :certificate_chain => certificate_chain_string.strip
20
81
  ).and be_idempotent
21
82
  end
22
83
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: chef-provisioning-aws
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.6.0
4
+ version: 1.6.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - John Ewart
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-10-29 00:00:00.000000000 Z
11
+ date: 2015-11-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: chef-provisioning