Skip to content

Commit c449e89

Browse files
committed
Fix examples
Signed-off-by: Bruno Loureiro <bruno.loureiro@outsystems.com>
1 parent b0129c6 commit c449e89

File tree

2 files changed

+105
-52
lines changed

2 files changed

+105
-52
lines changed

examples/wafv2/cluster/v1beta1/webaclrulegroupassociation.yaml

Lines changed: 52 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -2,66 +2,92 @@
22
#
33
# SPDX-License-Identifier: CC0-1.0
44

5-
65
apiVersion: wafv2.aws.upbound.io/v1beta1
76
kind: WebACLRuleGroupAssociation
87
metadata:
98
annotations:
109
meta.upbound.io/example-id: wafv2/v1beta1/webaclrulegroupassociation
1110
labels:
12-
testing.upbound.io/example-name: example
13-
name: example
11+
testing.upbound.io/example-name: example-custom
12+
name: example-custom
1413
spec:
1514
forProvider:
1615
priority: 100
1716
region: us-west-1
1817
ruleGroupReference:
19-
- arnSelector:
20-
matchLabels:
21-
testing.upbound.io/example-name: example
18+
- arnSelector:
19+
matchLabels:
20+
testing.upbound.io/example-name: example-custom
2221
ruleName: example-rule-group-rule
2322
webAclArnSelector:
2423
matchLabels:
2524
testing.upbound.io/example-name: example
2625

2726
---
27+
apiVersion: wafv2.aws.upbound.io/v1beta1
28+
kind: WebACLRuleGroupAssociation
29+
metadata:
30+
annotations:
31+
meta.upbound.io/example-id: wafv2/v1beta1/webaclrulegroupassociation
32+
labels:
33+
testing.upbound.io/example-name: example-managed
34+
name: example-managed
35+
spec:
36+
forProvider:
37+
priority: 50
38+
region: us-west-1
39+
managedRuleGroup:
40+
- name: AWSManagedRulesCommonRuleSet
41+
vendorName: AWS
42+
ruleName: aws-managed-common-rules
43+
webAclArnSelector:
44+
matchLabels:
45+
testing.upbound.io/example-name: example
2846

47+
---
2948
apiVersion: wafv2.aws.upbound.io/v1beta1
3049
kind: RuleGroup
3150
metadata:
3251
annotations:
3352
meta.upbound.io/example-id: wafv2/v1beta1/webaclrulegroupassociation
3453
labels:
35-
testing.upbound.io/example-name: example
36-
name: example
54+
testing.upbound.io/example-name: example-custom
55+
name: example-custom
3756
spec:
3857
forProvider:
3958
capacity: 10
4059
name: example-rule-group
4160
region: us-west-1
42-
rule:
43-
- action:
44-
- block:
45-
- {}
46-
name: block-suspicious-requests
47-
priority: 1
48-
statement:
49-
- geo_match_statement:
50-
- country_codes:
51-
- CN
52-
- RU
53-
visibility_config:
54-
- cloudwatch_metrics_enabled: true
55-
metric_name: block-suspicious-requests
56-
sampled_requests_enabled: true
61+
ruleJson: |
62+
[
63+
{
64+
"Name": "rule-1",
65+
"Priority": 1,
66+
"Statement": {
67+
"GeoMatchStatement": {
68+
"CountryCodes": [
69+
"US",
70+
"NL"
71+
]
72+
}
73+
},
74+
"Action": {
75+
"Allow": {}
76+
},
77+
"VisibilityConfig": {
78+
"SampledRequestsEnabled": false,
79+
"CloudWatchMetricsEnabled": false,
80+
"MetricName": "example-rule-group"
81+
}
82+
}
83+
]
5784
scope: REGIONAL
5885
visibilityConfig:
59-
cloudwatchMetricsEnabled: true
86+
cloudwatchMetricsEnabled: false
6087
metricName: example-rule-group
61-
sampledRequestsEnabled: true
88+
sampledRequestsEnabled: false
6289

6390
---
64-
6591
apiVersion: wafv2.aws.upbound.io/v1beta1
6692
kind: WebACL
6793
metadata:

examples/wafv2/namespaced/v1beta1/webaclrulegroupassociation.yaml

Lines changed: 53 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -2,68 +2,95 @@
22
#
33
# SPDX-License-Identifier: CC0-1.0
44

5-
65
apiVersion: wafv2.aws.m.upbound.io/v1beta1
76
kind: WebACLRuleGroupAssociation
87
metadata:
98
annotations:
109
meta.upbound.io/example-id: wafv2/v1beta1/webaclrulegroupassociation
1110
labels:
12-
testing.upbound.io/example-name: example
13-
name: example
11+
testing.upbound.io/example-name: example-custom
12+
name: example-custom
1413
namespace: upbound-system
1514
spec:
1615
forProvider:
1716
priority: 100
1817
region: us-west-1
1918
ruleGroupReference:
20-
- arnSelector:
21-
matchLabels:
22-
testing.upbound.io/example-name: example
19+
- arnSelector:
20+
matchLabels:
21+
testing.upbound.io/example-name: example-custom
2322
ruleName: example-rule-group-rule
2423
webAclArnSelector:
2524
matchLabels:
2625
testing.upbound.io/example-name: example
2726

2827
---
28+
apiVersion: wafv2.aws.m.upbound.io/v1beta1
29+
kind: WebACLRuleGroupAssociation
30+
metadata:
31+
annotations:
32+
meta.upbound.io/example-id: wafv2/v1beta1/webaclrulegroupassociation
33+
labels:
34+
testing.upbound.io/example-name: example-managed
35+
name: example-managed
36+
namespace: upbound-system
37+
spec:
38+
forProvider:
39+
priority: 50
40+
region: us-west-1
41+
managedRuleGroup:
42+
- name: AWSManagedRulesCommonRuleSet
43+
vendorName: AWS
44+
ruleName: aws-managed-common-rules
45+
webAclArnSelector:
46+
matchLabels:
47+
testing.upbound.io/example-name: example
2948

49+
---
3050
apiVersion: wafv2.aws.m.upbound.io/v1beta1
3151
kind: RuleGroup
3252
metadata:
3353
annotations:
3454
meta.upbound.io/example-id: wafv2/v1beta1/webaclrulegroupassociation
3555
labels:
36-
testing.upbound.io/example-name: example
37-
name: example
56+
testing.upbound.io/example-name: example-custom
57+
name: example-custom
3858
namespace: upbound-system
3959
spec:
4060
forProvider:
4161
capacity: 10
4262
name: example-rule-group
4363
region: us-west-1
44-
rule:
45-
- action:
46-
- block:
47-
- {}
48-
name: block-suspicious-requests
49-
priority: 1
50-
statement:
51-
- geo_match_statement:
52-
- country_codes:
53-
- CN
54-
- RU
55-
visibility_config:
56-
- cloudwatch_metrics_enabled: true
57-
metric_name: block-suspicious-requests
58-
sampled_requests_enabled: true
64+
ruleJson: |
65+
[
66+
{
67+
"Name": "rule-1",
68+
"Priority": 1,
69+
"Statement": {
70+
"GeoMatchStatement": {
71+
"CountryCodes": [
72+
"US",
73+
"NL"
74+
]
75+
}
76+
},
77+
"Action": {
78+
"Allow": {}
79+
},
80+
"VisibilityConfig": {
81+
"SampledRequestsEnabled": false,
82+
"CloudWatchMetricsEnabled": false,
83+
"MetricName": "example-rule-group"
84+
}
85+
}
86+
]
5987
scope: REGIONAL
6088
visibilityConfig:
61-
cloudwatchMetricsEnabled: true
89+
cloudwatchMetricsEnabled: false
6290
metricName: example-rule-group
63-
sampledRequestsEnabled: true
91+
sampledRequestsEnabled: false
6492

6593
---
66-
6794
apiVersion: wafv2.aws.m.upbound.io/v1beta1
6895
kind: WebACL
6996
metadata:

0 commit comments

Comments
 (0)