@hiiretail/gcp-infra-cli 0.98.0 → 0.99.1
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.
|
@@ -5,11 +5,6 @@ const BaseGenerator = require('../../../src/BaseGenerator');
|
|
|
5
5
|
module.exports = class extends BaseGenerator {
|
|
6
6
|
prompting() {
|
|
7
7
|
const prompts = [
|
|
8
|
-
{
|
|
9
|
-
type: 'input',
|
|
10
|
-
name: 'monitoringNotificationChannels',
|
|
11
|
-
message: 'Enter a comma-separated list of monitoring notification channels (format: projects/{project_id}/notificationChannels/{channel_id}). At least one email address must be included. Up to 5 channels are permitted.',
|
|
12
|
-
},
|
|
13
8
|
{
|
|
14
9
|
type: 'list',
|
|
15
10
|
name: 'usingGKE',
|
|
@@ -36,7 +31,6 @@ module.exports = class extends BaseGenerator {
|
|
|
36
31
|
}
|
|
37
32
|
|
|
38
33
|
writing() {
|
|
39
|
-
const channelsArray = this.answers.monitoringNotificationChannels ? this.answers.monitoringNotificationChannels.split(',').map((channel) => channel.trim()) : [];
|
|
40
34
|
let overheadPercentage = 0.01;
|
|
41
35
|
if (this.answers.usingInternalTraffic === 'false'
|
|
42
36
|
&& this.answers.usingGKE === 'false'
|
|
@@ -79,7 +73,6 @@ module.exports = class extends BaseGenerator {
|
|
|
79
73
|
{
|
|
80
74
|
...this.answers,
|
|
81
75
|
env,
|
|
82
|
-
monitoringNotificationChannels: channelsArray,
|
|
83
76
|
overheadPercentage,
|
|
84
77
|
},
|
|
85
78
|
);
|
|
@@ -1,12 +1,16 @@
|
|
|
1
1
|
## This yaml file will configure your cloud armor policies
|
|
2
2
|
## For more information on how to configure the expressions
|
|
3
3
|
## Visit https://cloud.google.com/armor/docs/rules-language-reference
|
|
4
|
+
|
|
5
|
+
## Logging filter for this policy:
|
|
6
|
+
# resource.type:(http_load_balancer) AND jsonPayload.enforcedSecurityPolicy.name:(<%-name%>)
|
|
7
|
+
|
|
4
8
|
description: Cloud armor policy
|
|
5
9
|
default-action: allow ## if no requests match any rules this value will be honored ( allow | deny )
|
|
6
10
|
rules:
|
|
7
11
|
deny-no-auth-header:
|
|
8
|
-
action: deny
|
|
9
|
-
priority: 10
|
|
12
|
+
action: deny(403)
|
|
13
|
+
priority: 10 # Priority 1 will be executed before 10 see the language reference for a more detailed explenation.
|
|
10
14
|
description: Block requests without auth header
|
|
11
15
|
preview: true ## dry run true | false
|
|
12
16
|
## Expression will block any request not containing the authorization header
|