serverless-es-proxy-logs
Advanced tools
Comparing version 3.0.4 to 3.0.5
@@ -88,11 +88,13 @@ "use strict"; | ||
} | ||
const { endpoint, index, tags, region, service } = esLogs; | ||
const { endpoint, index, tags, secutiryGroupIds, subnetIds } = esLogs; | ||
if (!endpoint) { | ||
throw new this.serverless.classes.Error(`ERROR: Must define an endpoint for serverless-es-logs!`); | ||
} | ||
if (!region) { | ||
throw new this.serverless.classes.Error(`ERROR: Must define an region for serverless-es-logs!`); | ||
if (!secutiryGroupIds) { | ||
this.serverless.cli.log('Warning:serverless-es-logs: SecutiryGroupIds is not set, setting it empty'); | ||
esLogs.secutiryGroupIds = []; | ||
} | ||
if (!service) { | ||
esLogs.service = 'es'; | ||
if (!subnetIds) { | ||
this.serverless.cli.log('Warning:serverless-es-logs: SubnetIds is not set, setting it empty'); | ||
esLogs.subnetIds = []; | ||
} | ||
@@ -227,3 +229,3 @@ if (!index) { | ||
addLogProcesser() { | ||
const { index, endpoint, tags, region, service } = this.custom().esLogs; | ||
const { index, endpoint, tags, secutiryGroupIds, subnetIds } = this.custom().esLogs; | ||
const tagsStringified = tags ? JSON.stringify(tags) : /* istanbul ignore next */ ''; | ||
@@ -241,4 +243,2 @@ const dirPath = path_1.default.join(this.serverless.config.servicePath, this.logProcesserDir); | ||
ES_INDEX_PREFIX: index, | ||
ES_REGION: region, | ||
ES_SERVICE: service, | ||
ES_TAGS: tagsStringified, | ||
@@ -257,3 +257,7 @@ }, | ||
timeout: 60, | ||
tracing: false, | ||
tracing: true, | ||
vpc: { | ||
securityGroupIds: secutiryGroupIds, | ||
subnetIds: subnetIds, | ||
}, | ||
}; | ||
@@ -260,0 +264,0 @@ } |
{ | ||
"name": "serverless-es-proxy-logs", | ||
"version": "3.0.4", | ||
"version": "3.0.5", | ||
"license": "MIT", | ||
@@ -5,0 +5,0 @@ "description": "A Serverless plugin to transport logs to ElasticSearch", |
@@ -7,4 +7,2 @@ // v1.1.2 | ||
var endpoint = process.env.ES_ENDPOINT; | ||
var region = process.env.ES_REGION; | ||
var service = process.env.ES_SERVICE; | ||
var indexPrefix = process.env.ES_INDEX_PREFIX; | ||
@@ -190,3 +188,3 @@ // TODO: Verify DLQ is empty | ||
function put(body, callback) { | ||
var requestParams = buildRequest(endpoint, body, region, service); | ||
var requestParams = buildRequest(endpoint, body); | ||
@@ -193,0 +191,0 @@ var request = https.request(requestParams, function(response) { |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 2 instances in 1 package
56240
736
5