fluent-plugin-cloudwatch-logs 0.11.0 → 0.11.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
  SHA256:
3
- metadata.gz: 1dc48c250b022126a1de2b125bfa8ad3320daaa5eca5613f51ba7e6571a0b9a9
4
- data.tar.gz: 23993ce51cac3aacfbe6937c1f928a00a61fbd94f64fb4ccf8c38ac8e4656787
3
+ metadata.gz: 7d78abf2df32b76a85618e07a9164b6b4b59085bb56054b9cff15a947674eb26
4
+ data.tar.gz: 935d10a414f4ac4e83d619978695aa98bc2ec784c02ef5e60ec082ac7b39f667
5
5
  SHA512:
6
- metadata.gz: 84fd2ea44c0b498364a13da89d422d39b6ea18abdb38add8fbacbc9f0c7b04b6ed18498f26e85920ffe8a7c80e5c14dce8f191c6ecc1a2f1c36809ce67e6961b
7
- data.tar.gz: e16ab191ba87408d82e1ffa73564aec909a0795cca65c0ab506b2bb538f4c1cd0ad61641035c6b42056ccd4459e4ba677cb35a28d8af74edc3d1d0bd04422db1
6
+ metadata.gz: 8f5113e44e0fb327000423a12292f1d6c25be4e5e491773e3e074b06a9c4206797ac0a3873c5b252da9dbbfa705d7989bb6b84f71d39e4080c5eb882555c914e
7
+ data.tar.gz: ee663a6f50e7788703d3bea274c194ea83d4b330d25b284112682247984cf9de344d00a4a7aba8d7f6e7589c396510e0a0970cb48bea73d73841eb1c22e3cd77
@@ -2,7 +2,7 @@ module Fluent
2
2
  module Plugin
3
3
  module Cloudwatch
4
4
  module Logs
5
- VERSION = "0.11.0"
5
+ VERSION = "0.11.1"
6
6
  end
7
7
  end
8
8
  end
@@ -17,6 +17,7 @@ module Fluent::Plugin
17
17
  config_param :aws_use_sts, :bool, default: false
18
18
  config_param :aws_sts_role_arn, :string, default: nil
19
19
  config_param :aws_sts_session_name, :string, default: 'fluentd'
20
+ config_param :aws_sts_endpoint_url, :string, default: nil
20
21
  config_param :region, :string, default: nil
21
22
  config_param :endpoint, :string, default: nil
22
23
  config_param :tag, :string
@@ -82,10 +83,17 @@ module Fluent::Plugin
82
83
 
83
84
  if @aws_use_sts
84
85
  Aws.config[:region] = options[:region]
85
- options[:credentials] = Aws::AssumeRoleCredentials.new(
86
+ credentials_options = {
86
87
  role_arn: @aws_sts_role_arn,
87
88
  role_session_name: @aws_sts_session_name
88
- )
89
+ }
90
+ credentials_options[:sts_endpoint_url] = @aws_sts_endpoint_url if @aws_sts_endpoint_url
91
+ if @region and @aws_sts_endpoint_url
92
+ credentails_options[:client] = Aws::STS::Client.new(:region => @region, endpoint: @aws_sts_endpoint_url)
93
+ elsif @region
94
+ credentails_options[:client] = Aws::STS::Client.new(:region => @region)
95
+ end
96
+ options[:credentials] = Aws::AssumeRoleCredentials.new(credentials_options)
89
97
  elsif @web_identity_credentials
90
98
  c = @web_identity_credentials
91
99
  credentials_options = {}
@@ -19,6 +19,7 @@ module Fluent::Plugin
19
19
  config_param :aws_use_sts, :bool, default: false
20
20
  config_param :aws_sts_role_arn, :string, default: nil
21
21
  config_param :aws_sts_session_name, :string, default: 'fluentd'
22
+ config_param :aws_sts_endpoint_url, :string, default: nil
22
23
  config_param :region, :string, :default => nil
23
24
  config_param :endpoint, :string, :default => nil
24
25
  config_param :log_group_name, :string, :default => nil
@@ -101,10 +102,17 @@ module Fluent::Plugin
101
102
 
102
103
  if @aws_use_sts
103
104
  Aws.config[:region] = options[:region]
104
- options[:credentials] = Aws::AssumeRoleCredentials.new(
105
+ credentials_options = {
105
106
  role_arn: @aws_sts_role_arn,
106
107
  role_session_name: @aws_sts_session_name
107
- )
108
+ }
109
+ credentials_options[:sts_endpoint_url] = @aws_sts_endpoint_url if @aws_sts_endpoint_url
110
+ if @region and @aws_sts_endpoint_url
111
+ credentails_options[:client] = Aws::STS::Client.new(:region => @region, endpoint: @aws_sts_endpoint_url)
112
+ elsif @region
113
+ credentails_options[:client] = Aws::STS::Client.new(:region => @region)
114
+ end
115
+ options[:credentials] = Aws::AssumeRoleCredentials.new(credentials_options)
108
116
  elsif @web_identity_credentials
109
117
  c = @web_identity_credentials
110
118
  credentials_options = {}
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fluent-plugin-cloudwatch-logs
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.11.0
4
+ version: 0.11.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryota Arai
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-10-19 00:00:00.000000000 Z
11
+ date: 2020-10-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: fluentd