Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

POL-1378 Linting Updates: Cost Policies: Google #2736

Merged
merged 186 commits into from
Oct 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
186 commits
Select commit Hold shift + click to select a range
732ba5d
update
XOmniverse Mar 28, 2024
c1139d9
fix
XOmniverse Mar 28, 2024
de63c78
Merge branch 'master' of github-xomniverse:flexera-public/policy_temp…
XOmniverse Mar 28, 2024
f31bdcb
Merge branch 'master' of github-xomniverse:flexera-public/policy_temp…
XOmniverse Mar 28, 2024
f1efbe0
Merge branch 'master' of github-xomniverse:flexera-public/policy_temp…
XOmniverse Mar 29, 2024
c7418b0
Merge branch 'master' of github-xomniverse:flexera-public/policy_temp…
XOmniverse Mar 29, 2024
88e9304
Merge branch 'master' of github-xomniverse:flexera-public/policy_temp…
XOmniverse Mar 29, 2024
f245ad7
Merge branch 'master' of github-xomniverse:flexera-public/policy_temp…
XOmniverse Mar 29, 2024
09f7a1d
Merge branch 'master' of github-xomniverse:flexera-public/policy_temp…
XOmniverse Mar 29, 2024
738db1b
Merge branch 'master' of github-xomniverse:flexera-public/policy_temp…
XOmniverse Apr 1, 2024
e5f6ec4
Merge branch 'master' of github-xomniverse:flexera-public/policy_temp…
XOmniverse Apr 2, 2024
4e71e8b
Merge branch 'master' of github-xomniverse:flexera-public/policy_temp…
XOmniverse Apr 2, 2024
1d8b882
Merge branch 'master' of github-xomniverse:flexera-public/policy_temp…
XOmniverse Apr 2, 2024
f52328d
Merge branch 'master' of github-xomniverse:flexera-public/policy_temp…
XOmniverse Apr 3, 2024
39e8cb9
Merge branch 'master' of github-xomniverse:flexera-public/policy_temp…
XOmniverse Apr 4, 2024
323df85
Merge branch 'master' of github-xomniverse:flexera-public/policy_temp…
XOmniverse Apr 8, 2024
572d97b
Merge branch 'master' of github-xomniverse:flexera-public/policy_temp…
XOmniverse Apr 10, 2024
f0af998
Merge branch 'master' of github-xomniverse:flexera-public/policy_temp…
XOmniverse Apr 10, 2024
a28ec3d
Merge branch 'master' of github-xomniverse:flexera-public/policy_temp…
XOmniverse Apr 10, 2024
9bd65b9
Merge branch 'master' of github-xomniverse:flexera-public/policy_temp…
XOmniverse Apr 15, 2024
98ccf43
Merge branch 'master' of github-xomniverse:flexera-public/policy_temp…
XOmniverse Apr 16, 2024
208ddf7
Merge branch 'master' of github-xomniverse:flexera-public/policy_temp…
XOmniverse Apr 16, 2024
e7767f2
Merge branch 'master' of github-xomniverse:flexera-public/policy_temp…
XOmniverse Apr 17, 2024
66fbcb8
Merge branch 'master' of github-xomniverse:flexera-public/policy_temp…
XOmniverse Apr 18, 2024
e2ef148
Merge branch 'master' of github-xomniverse:flexera-public/policy_temp…
XOmniverse Apr 18, 2024
7f4a5a3
Merge branch 'master' of github-xomniverse:flexera-public/policy_temp…
XOmniverse Apr 18, 2024
0e5293d
Merge branch 'master' of github-xomniverse:flexera-public/policy_temp…
XOmniverse Apr 19, 2024
1d9a4a4
Merge branch 'master' of github-xomniverse:flexera-public/policy_temp…
XOmniverse Apr 22, 2024
b799cc7
Merge branch 'master' of github-xomniverse:flexera-public/policy_temp…
XOmniverse Apr 22, 2024
02d4aa6
Merge branch 'master' of github-xomniverse:flexera-public/policy_temp…
XOmniverse Apr 23, 2024
5ce4da5
Merge branch 'master' of github-xomniverse:flexera-public/policy_temp…
XOmniverse Apr 24, 2024
a42bf60
Merge branch 'master' of github-xomniverse:flexera-public/policy_temp…
XOmniverse Apr 26, 2024
f98a7f2
Merge branch 'master' of github-xomniverse:flexera-public/policy_temp…
XOmniverse Apr 26, 2024
4a6e6e5
Merge branch 'master' of github-xomniverse:flexera-public/policy_temp…
XOmniverse Apr 29, 2024
368c9da
Merge branch 'master' of github-xomniverse:flexera-public/policy_temp…
XOmniverse Apr 30, 2024
7dfe259
Merge branch 'master' of github-xomniverse:flexera-public/policy_temp…
XOmniverse Apr 30, 2024
1ab7b95
Merge branch 'master' of github-xomniverse:flexera-public/policy_temp…
XOmniverse Apr 30, 2024
0754ff4
Merge branch 'master' of github-xomniverse:flexera-public/policy_temp…
XOmniverse May 1, 2024
67a2084
Merge branch 'master' of github-xomniverse:flexera-public/policy_temp…
XOmniverse May 2, 2024
a982026
Merge branch 'master' of github-xomniverse:flexera-public/policy_temp…
XOmniverse May 3, 2024
9adf853
Merge branch 'master' of github-xomniverse:flexera-public/policy_temp…
XOmniverse May 3, 2024
fa45c07
Merge branch 'master' of github-xomniverse:flexera-public/policy_temp…
XOmniverse May 6, 2024
9798847
Merge branch 'master' of github-xomniverse:flexera-public/policy_temp…
XOmniverse May 6, 2024
98f4443
Merge branch 'master' of github-xomniverse:flexera-public/policy_temp…
XOmniverse May 7, 2024
7a86663
Merge branch 'master' of github-xomniverse:flexera-public/policy_temp…
XOmniverse May 8, 2024
e3dee38
Merge branch 'master' of github-xomniverse:flexera-public/policy_temp…
XOmniverse May 8, 2024
b69e670
Merge branch 'master' of github-xomniverse:flexera-public/policy_temp…
XOmniverse May 9, 2024
7cadb9d
Merge branch 'master' of github-xomniverse:flexera-public/policy_temp…
XOmniverse May 9, 2024
ad1744d
Merge branch 'master' of github-xomniverse:flexera-public/policy_temp…
XOmniverse May 10, 2024
10dbbc4
Merge branch 'master' of github-xomniverse:flexera-public/policy_temp…
XOmniverse May 13, 2024
88fbc95
Merge branch 'master' of github-xomniverse:flexera-public/policy_temp…
XOmniverse May 14, 2024
6bcb57c
Merge branch 'master' of github-xomniverse:flexera-public/policy_temp…
XOmniverse May 14, 2024
09d2116
Merge branch 'master' of github-xomniverse:flexera-public/policy_temp…
XOmniverse May 15, 2024
0158083
Merge branch 'master' of github-xomniverse:flexera-public/policy_temp…
XOmniverse May 16, 2024
66bc1c2
Merge branch 'master' of github-xomniverse:flexera-public/policy_temp…
XOmniverse May 20, 2024
63e1602
Merge branch 'master' of github-xomniverse:flexera-public/policy_temp…
XOmniverse May 20, 2024
e17a02c
Merge branch 'master' of github-xomniverse:flexera-public/policy_temp…
XOmniverse May 21, 2024
c1cc974
Merge branch 'master' of github-xomniverse:flexera-public/policy_temp…
XOmniverse May 22, 2024
b5bc6f3
Merge branch 'master' of github-xomniverse:flexera-public/policy_temp…
XOmniverse May 22, 2024
ec75e97
Merge branch 'master' of github-xomniverse:flexera-public/policy_temp…
XOmniverse May 30, 2024
1cb4926
Merge branch 'master' of github-xomniverse:flexera-public/policy_temp…
XOmniverse May 30, 2024
4cf06de
Merge branch 'master' of github-xomniverse:flexera-public/policy_temp…
XOmniverse May 31, 2024
0230fae
Merge branch 'master' of github-xomniverse:flexera-public/policy_temp…
XOmniverse Jun 3, 2024
f3e2031
Merge branch 'master' of github-xomniverse:flexera-public/policy_temp…
XOmniverse Jun 3, 2024
98f4217
Merge branch 'master' of github-xomniverse:flexera-public/policy_temp…
XOmniverse Jun 4, 2024
c17e410
Merge branch 'master' of github-xomniverse:flexera-public/policy_temp…
XOmniverse Jun 5, 2024
b017672
Merge branch 'master' of github-xomniverse:flexera-public/policy_temp…
XOmniverse Jun 7, 2024
ab5629c
Merge branch 'master' of github-xomniverse:flexera-public/policy_temp…
XOmniverse Jun 10, 2024
a82f6b7
Merge branch 'master' of github-xomniverse:flexera-public/policy_temp…
XOmniverse Jun 11, 2024
2025aa5
Merge branch 'master' of github-xomniverse:flexera-public/policy_temp…
XOmniverse Jun 11, 2024
37eef59
Merge branch 'master' of github-xomniverse:flexera-public/policy_temp…
XOmniverse Jun 13, 2024
391c9be
Merge branch 'master' of github-xomniverse:flexera-public/policy_temp…
XOmniverse Jun 13, 2024
d6c63d3
Merge branch 'master' of github-xomniverse:flexera-public/policy_temp…
XOmniverse Jun 14, 2024
7e4a04b
Merge branch 'master' of github-xomniverse:flexera-public/policy_temp…
XOmniverse Jun 14, 2024
01aa513
Merge branch 'master' of github-xomniverse:flexera-public/policy_temp…
XOmniverse Jun 17, 2024
75e924f
Merge branch 'master' of github-xomniverse:flexera-public/policy_temp…
XOmniverse Jun 17, 2024
75063a8
Merge branch 'master' of github-xomniverse:flexera-public/policy_temp…
XOmniverse Jun 21, 2024
6c6bcc8
Merge branch 'master' of github-xomniverse:flexera-public/policy_temp…
XOmniverse Jun 21, 2024
95d75c0
Merge branch 'master' of github-xomniverse:flexera-public/policy_temp…
XOmniverse Jun 24, 2024
755e613
Merge branch 'master' of github-xomniverse:flexera-public/policy_temp…
XOmniverse Jun 24, 2024
4c2fe38
Merge branch 'master' of github-xomniverse:flexera-public/policy_temp…
XOmniverse Jun 24, 2024
edc04d3
Merge branch 'master' of github-xomniverse:flexera-public/policy_temp…
XOmniverse Jun 26, 2024
b975488
Merge branch 'master' of github-xomniverse:flexera-public/policy_temp…
XOmniverse Jun 26, 2024
4809927
Merge branch 'master' of github-xomniverse:flexera-public/policy_temp…
XOmniverse Jun 26, 2024
e6d34be
Merge branch 'master' of github-xomniverse:flexera-public/policy_temp…
XOmniverse Jun 26, 2024
35602c4
Merge branch 'master' of github-xomniverse:flexera-public/policy_temp…
XOmniverse Jun 27, 2024
dc20ed5
Merge branch 'master' of github-xomniverse:flexera-public/policy_temp…
XOmniverse Jun 27, 2024
cb2dc12
Merge branch 'master' of github-xomniverse:flexera-public/policy_temp…
XOmniverse Jun 28, 2024
209db7b
Merge branch 'master' of github-xomniverse:flexera-public/policy_temp…
XOmniverse Jul 1, 2024
b05ff68
Merge branch 'master' of github-xomniverse:flexera-public/policy_temp…
XOmniverse Jul 1, 2024
01b057a
Merge branch 'master' of github-xomniverse:flexera-public/policy_temp…
XOmniverse Jul 2, 2024
e612090
Merge branch 'master' of github-xomniverse:flexera-public/policy_temp…
XOmniverse Jul 2, 2024
088af1b
Merge branch 'master' of github-xomniverse:flexera-public/policy_temp…
XOmniverse Jul 8, 2024
f14609a
Merge branch 'master' of github-xomniverse:flexera-public/policy_temp…
XOmniverse Jul 8, 2024
c474f94
Merge branch 'master' of github-xomniverse:flexera-public/policy_temp…
XOmniverse Jul 9, 2024
add397f
Merge branch 'master' of github-xomniverse:flexera-public/policy_temp…
XOmniverse Jul 10, 2024
322c6a5
Merge branch 'master' of github-xomniverse:flexera-public/policy_temp…
XOmniverse Jul 15, 2024
39fe39d
Merge branch 'master' of github-xomniverse:flexera-public/policy_temp…
XOmniverse Jul 16, 2024
6f9acad
Merge branch 'master' of github-xomniverse:flexera-public/policy_temp…
XOmniverse Jul 16, 2024
11012e8
Merge branch 'master' of github-xomniverse:flexera-public/policy_temp…
XOmniverse Jul 17, 2024
28fa3e8
Merge branch 'master' of github-xomniverse:flexera-public/policy_temp…
XOmniverse Jul 19, 2024
d281bdd
Merge branch 'master' of github-xomniverse:flexera-public/policy_temp…
XOmniverse Jul 22, 2024
a6c92d3
Merge branch 'master' of github-xomniverse:flexera-public/policy_temp…
XOmniverse Jul 23, 2024
94c5add
Merge branch 'master' of github-xomniverse:flexera-public/policy_temp…
XOmniverse Jul 24, 2024
d1aa94f
Merge branch 'master' of github-xomniverse:flexera-public/policy_temp…
XOmniverse Jul 26, 2024
0ac1e7d
Merge branch 'master' of github-xomniverse:flexera-public/policy_temp…
XOmniverse Jul 29, 2024
8a219db
Merge branch 'master' of github-xomniverse:flexera-public/policy_temp…
XOmniverse Jul 29, 2024
6562bed
Merge branch 'master' of github-xomniverse:flexera-public/policy_temp…
XOmniverse Jul 31, 2024
74ae3a4
Merge branch 'master' of github-xomniverse:flexera-public/policy_temp…
XOmniverse Jul 31, 2024
8032a7f
Merge branch 'master' of github-xomniverse:flexera-public/policy_temp…
XOmniverse Aug 1, 2024
4c99ce0
Merge branch 'master' of github-xomniverse:flexera-public/policy_temp…
XOmniverse Aug 1, 2024
6f6ec72
Merge branch 'master' of github-xomniverse:flexera-public/policy_temp…
XOmniverse Aug 2, 2024
fd171a2
Merge branch 'master' of github-xomniverse:flexera-public/policy_temp…
XOmniverse Aug 5, 2024
45630f7
Merge branch 'master' of github-xomniverse:flexera-public/policy_temp…
XOmniverse Aug 9, 2024
4a99d74
update
XOmniverse Aug 9, 2024
3b1c72e
fix
XOmniverse Aug 9, 2024
f0bae6d
Merge branch 'master' of github-xomniverse:flexera-public/policy_temp…
XOmniverse Aug 9, 2024
5526d06
Merge branch 'master' of github-xomniverse:flexera-public/policy_temp…
XOmniverse Aug 12, 2024
5ba0f63
Merge branch 'master' of github-xomniverse:flexera-public/policy_temp…
XOmniverse Aug 12, 2024
149099b
Merge branch 'master' of github-xomniverse:flexera-public/policy_temp…
XOmniverse Aug 12, 2024
3d68121
Merge branch 'master' of github-xomniverse:flexera-public/policy_temp…
XOmniverse Aug 12, 2024
e126509
update
XOmniverse Aug 13, 2024
6ddd523
update
XOmniverse Aug 13, 2024
6ae60c3
fix
XOmniverse Aug 13, 2024
cb57b0b
Merge branch 'master' of github-xomniverse:flexera-public/policy_temp…
XOmniverse Aug 13, 2024
ce7d180
Merge branch 'master' of github-xomniverse:flexera-public/policy_temp…
XOmniverse Aug 15, 2024
a989c71
Merge branch 'master' of github-xomniverse:flexera-public/policy_temp…
XOmniverse Aug 18, 2024
b423284
Merge branch 'master' of github-xomniverse:flexera-public/policy_temp…
XOmniverse Aug 18, 2024
861baf0
Merge branch 'master' of github-xomniverse:flexera-public/policy_temp…
XOmniverse Aug 20, 2024
cc4b4ba
Merge branch 'master' of github-xomniverse:flexera-public/policy_temp…
XOmniverse Aug 26, 2024
5b6f1de
Merge branch 'master' of github-xomniverse:flexera-public/policy_temp…
XOmniverse Aug 27, 2024
c806617
Merge branch 'master' of github-xomniverse:flexera-public/policy_temp…
XOmniverse Aug 28, 2024
45e0671
Merge branch 'master' of github-xomniverse:flexera-public/policy_temp…
XOmniverse Aug 28, 2024
1d00ed3
Merge branch 'master' of github-xomniverse:flexera-public/policy_temp…
XOmniverse Aug 28, 2024
84f66f2
Merge branch 'master' of github-xomniverse:flexera-public/policy_temp…
XOmniverse Sep 3, 2024
a62b5af
Merge branch 'master' of github-xomniverse:flexera-public/policy_temp…
XOmniverse Sep 3, 2024
9f5d414
Merge branch 'master' of github-xomniverse:flexera-public/policy_temp…
XOmniverse Sep 3, 2024
b271c89
Merge branch 'master' of github-xomniverse:flexera-public/policy_temp…
XOmniverse Sep 3, 2024
02301d1
Merge branch 'master' of github-xomniverse:flexera-public/policy_temp…
XOmniverse Sep 4, 2024
1f7529e
Merge branch 'master' of github-xomniverse:flexera-public/policy_temp…
XOmniverse Sep 4, 2024
f1419be
Merge branch 'master' of github-xomniverse:flexera-public/policy_temp…
XOmniverse Sep 5, 2024
d925789
Merge branch 'master' of github-xomniverse:flexera-public/policy_temp…
XOmniverse Sep 9, 2024
482f80c
Merge branch 'master' of github-xomniverse:flexera-public/policy_temp…
XOmniverse Sep 12, 2024
9c2688b
Merge branch 'master' of github-xomniverse:flexera-public/policy_temp…
XOmniverse Sep 13, 2024
63ff2b6
Merge branch 'master' of github-xomniverse:flexera-public/policy_temp…
XOmniverse Sep 15, 2024
6222c12
Merge branch 'master' of github-xomniverse:flexera-public/policy_temp…
XOmniverse Sep 17, 2024
9ba4d62
Merge branch 'master' of github-xomniverse:flexera-public/policy_temp…
XOmniverse Sep 17, 2024
7436078
Merge branch 'master' of github-xomniverse:flexera-public/policy_temp…
XOmniverse Sep 19, 2024
17c1be7
Merge branch 'master' of github-xomniverse:flexera-public/policy_temp…
XOmniverse Sep 20, 2024
1c55ed0
Merge branch 'master' of github-xomniverse:flexera-public/policy_temp…
XOmniverse Sep 20, 2024
2ba0a42
Merge branch 'master' of github-xomniverse:flexera-public/policy_temp…
XOmniverse Sep 20, 2024
47906e9
Merge branch 'master' of github-xomniverse:flexera-public/policy_temp…
XOmniverse Sep 20, 2024
9b69de6
Merge branch 'master' of github-xomniverse:flexera-public/policy_temp…
XOmniverse Sep 20, 2024
60c1e96
Merge branch 'master' of github-xomniverse:flexera-public/policy_temp…
XOmniverse Sep 23, 2024
06f0fc0
Merge branch 'master' of github-xomniverse:flexera-public/policy_temp…
XOmniverse Sep 23, 2024
1b8c80b
Merge branch 'master' of github-xomniverse:flexera-public/policy_temp…
XOmniverse Sep 23, 2024
9a92af5
Merge branch 'master' of github-xomniverse:flexera-public/policy_temp…
XOmniverse Sep 24, 2024
3932db1
Merge branch 'master' of github-xomniverse:flexera-public/policy_temp…
XOmniverse Sep 25, 2024
df96d78
Merge branch 'master' of github-xomniverse:flexera-public/policy_temp…
XOmniverse Sep 25, 2024
cdabbec
Merge branch 'master' of github-xomniverse:flexera-public/policy_temp…
XOmniverse Sep 26, 2024
5fd24ea
Merge branch 'master' of github-xomniverse:flexera-public/policy_temp…
XOmniverse Sep 30, 2024
10210f1
Merge branch 'master' of github-xomniverse:flexera-public/policy_temp…
XOmniverse Sep 30, 2024
d613c6f
Merge branch 'master' of github-xomniverse:flexera-public/policy_temp…
XOmniverse Oct 1, 2024
a1058fa
Merge branch 'master' of github-xomniverse:flexera-public/policy_temp…
XOmniverse Oct 2, 2024
bdadb02
Merge branch 'master' of github-xomniverse:flexera-public/policy_temp…
XOmniverse Oct 2, 2024
b21ff3a
Merge branch 'master' of github-xomniverse:flexera-public/policy_temp…
XOmniverse Oct 3, 2024
446b1a0
Merge branch 'master' of github-xomniverse:flexera-public/policy_temp…
XOmniverse Oct 4, 2024
e559d2b
Merge branch 'master' of github-xomniverse:flexera-public/policy_temp…
XOmniverse Oct 7, 2024
f510611
update
XOmniverse Oct 8, 2024
4af5e37
update
XOmniverse Oct 8, 2024
27997df
update
XOmniverse Oct 8, 2024
d301346
update
XOmniverse Oct 8, 2024
0416ccb
Merge branch 'master' of github-xomniverse:flexera-public/policy_temp…
XOmniverse Oct 8, 2024
cccfa67
update
XOmniverse Oct 9, 2024
7ea239b
Merge branch 'master' of github-xomniverse:flexera-public/policy_temp…
XOmniverse Oct 11, 2024
4a2fe0f
Merge branch 'master' of github-xomniverse:flexera-public/policy_temp…
XOmniverse Oct 11, 2024
41c42d6
Merge branch 'master' of github-xomniverse:flexera-public/policy_temp…
XOmniverse Oct 11, 2024
02f4f3a
Merge branch 'master' of github-xomniverse:flexera-public/policy_temp…
XOmniverse Oct 14, 2024
9300812
update
XOmniverse Oct 14, 2024
09dbc19
update
XOmniverse Oct 14, 2024
c8fcddd
update
XOmniverse Oct 14, 2024
7b46260
update
XOmniverse Oct 14, 2024
0470072
Merge branch 'master' of github-xomniverse:flexera-public/policy_temp…
XOmniverse Oct 14, 2024
804dcc4
Merge branch 'master' of github-xomniverse:flexera-public/policy_temp…
XOmniverse Oct 14, 2024
9d65456
Merge branch 'master' into POL-1378-linting-cost-google
XOmniverse Oct 14, 2024
fdd3fb8
update
XOmniverse Oct 14, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .dangerfile/policy_tests.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1064,7 +1064,7 @@ def policy_run_script_incorrect_order?(file, file_lines)
value_found = false # Whether we've found a raw value, like a number or string

parameters.each_with_index do |parameter, index|
if parameter.include?("iter_item") || parameter.include?("val(")
if parameter.include?("iter_item") || parameter.include?("val(") || parameter.include?("jq(")
val_found = true
val_index = index
disordered = true if ds_found || param_found || constant_found || value_found
Expand Down Expand Up @@ -1482,6 +1482,8 @@ def policy_verb_get?(file, file_lines)
fail_message = ""

file_lines.each_with_index do |line, index|
break if line.strip.start_with?("# Cloud Workflow")

line_number = index + 1
fail_message += "Line #{line_number.to_s}\n" if line.strip.start_with?("verb \"GET\"") || line.strip.start_with?("verb: \"GET\"") || line.strip.start_with?("verb 'GET'") || line.strip.start_with?("verb: 'GET'")
end
Expand Down
2 changes: 1 addition & 1 deletion cost/google/cheaper_regions/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,4 @@ The [Provider-Specific Credentials](https://docs.flexera.com/flexera/EN/Automati

## Cost

This Policy Template does not incur any cloud costs.
This policy template does not incur any cloud costs.
8 changes: 8 additions & 0 deletions cost/google/cloud_run_anomaly_detection/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Changelog

## v0.1.3

- Minor code improvements to conform with current standards. Functionality unchanged.

## v0.1.2

- fixed spelling errors in parameters

## v0.1.1

- fixed link to README in policy description
Expand Down
42 changes: 24 additions & 18 deletions cost/google/cloud_run_anomaly_detection/README.md
Original file line number Diff line number Diff line change
@@ -1,28 +1,14 @@
# Google Cloud Run Anomaly Detection

## What it does
## What It Does

This Policy uses Google Cloud Metrics data to identify anomalies for Cloud Run services using the [Standard Score (aka `Z-score`)](https://en.wikipedia.org/wiki/Standard_score) statistical method.

> The standard score is the number of standard deviations by which the value of a raw score (i.e., an observed value or data point) is above or below the mean value of what is being observed or measured.

This policy only uses Google Cloud Metric data and is designed to notify of anomalies <24 hours -- specifically before cost and usage data is available.

## Prerequisites

This Policy Template uses [Credentials](https://docs.flexera.com/flexera/EN/Automation/ManagingCredentialsExternal.htm) for authenticating to datasources -- in order to apply this policy you must have a Credential registered in the system that is compatible with this policy. If there are no Credentials listed when you apply the policy, please contact your Flexera Org Admin and ask them to register a Credential that is compatible with this policy. The information below should be consulted when creating the credential(s).

- [**Google Cloud Credential**](https://docs.flexera.com/flexera/EN/Automation/ProviderCredentials.htm#automationadmin_4083446696_1121577) (*provider=gce*) which has the following:

- Permissions
- `resourcemanager.projects.get`
- `compute.regions.list`
- `run.services.list`
- `monitoring.timeSeries.list`

The [Provider-Specific Credentials](https://docs.flexera.com/flexera/EN/Automation/ProviderCredentials.htm) page in the docs has detailed instructions for setting up Credentials for the most common providers.

### Input Parameters
## Input Parameters

This policy has the following input parameters required when launching the policy.

Expand All @@ -34,9 +20,29 @@ This policy has the following input parameters required when launching the polic
- *Lookback Aggregation Period* - The time period to aggregate the metric data
- *Metric Name* - The name of the metric to monitor for anomalies
- *Threshold For Z-score* - The threshold for Z-scale, which is the number of consequent anomaly events to trigger an incident (i.e. 1, 2, 3)
- *Threshold For Consequtive Anomalies* - Number of Consqutive Anomalies to trigger an incident
- *Threshold For Consecutive Anomalies* - Number of Consecutive Anomalies to trigger an incident
- *Email addresses* - A list of email addresses to notify

## Policy Actions

- Send an email report

## Prerequisites

This Policy Template uses [Credentials](https://docs.flexera.com/flexera/EN/Automation/ManagingCredentialsExternal.htm) for authenticating to datasources -- in order to apply this policy you must have a Credential registered in the system that is compatible with this policy. If there are no Credentials listed when you apply the policy, please contact your Flexera Org Admin and ask them to register a Credential that is compatible with this policy. The information below should be consulted when creating the credential(s).

- [**Google Cloud Credential**](https://docs.flexera.com/flexera/EN/Automation/ProviderCredentials.htm#automationadmin_4083446696_1121577) (*provider=gce*) which has the following:
- `resourcemanager.projects.get`
- `compute.regions.list`
- `run.services.list`
- `monitoring.timeSeries.list`

The [Provider-Specific Credentials](https://docs.flexera.com/flexera/EN/Automation/ProviderCredentials.htm) page in the docs has detailed instructions for setting up Credentials for the most common providers.

## Supported Clouds

- Google

## Cost

This Policy Template does not incur any cloud costs.
This policy template does not incur any cloud costs.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ category "Cost"
default_frequency "daily"
info(
publish: "false",
version: "0.1.1",
version: "0.1.3",
provider: "Google",
service: "Cloud Run",
policy_set: "Anomaly Detection"
Expand All @@ -19,15 +19,14 @@ info(
###############################################################################

parameter "param_email" do
category "Policy Settings"
type "list"
category "Policy Settings"
label "Email addresses to notify"
description "Email addresses of the recipients you wish to notify when new incidents are created"
default []
end

parameter "param_projects_allow_or_deny" do
category "Filters"
type "string"
category "Filters"
label "Allow/Deny Projects"
Expand All @@ -37,7 +36,6 @@ parameter "param_projects_allow_or_deny" do
end

parameter "param_projects_list" do
category "Filters"
type "list"
category "Filters"
label "Allow/Deny Projects List"
Expand All @@ -46,7 +44,6 @@ parameter "param_projects_list" do
end

parameter "param_regions_allow_or_deny" do
category "Filters"
type "string"
category "Filters"
label "Allow/Deny Regions"
Expand All @@ -56,7 +53,6 @@ parameter "param_regions_allow_or_deny" do
end

parameter "param_regions_list" do
category "Filters"
type "list"
category "Filters"
label "Allow/Deny Regions List"
Expand All @@ -65,48 +61,48 @@ parameter "param_regions_list" do
end

parameter "param_metric_lookback_time" do
type "string"
category "Statistics"
label "Lookback Time Period"
type "string"
description "The time period to look back for anomalies. The longer the time period, the more accurate the anomaly detection will be."
default "Last 1 day"
allowed_values ["Last 15 minutes", "Last 30 minutes", "Last 1 hour", "Last 3 hours", "Last 6 hours", "Last 12 hours", "Last 1 day", "Last 2 days", "Last 7 days", "Last 14 days"]
default "Last 1 day"
end

parameter "param_metric_aggregation" do
type "string"
category "Statistics"
label "Lookback Aggregation Period"
type "string"
description "The time period to aggregate the metric data"
default "1 minute"
allowed_values ["1 minute", "5 minutes", "10 minutes", "15 minutes", "30 minutes", "1 hour", "3 hours", "6 hours", "12 hours", "1 day"]
default "1 minute"
end

parameter "param_threshold_metric_name" do
type "string"
category "Statistics"
label "Metric Name"
type "string"
description "The name of the metric to monitor for anomalies"
default "run.googleapis.com/container/billable_instance_time"
allowed_values ["run.googleapis.com/container/billable_instance_time", "run.googleapis.com/container/instance_count", "run.googleapis.com/container/memory", "run.googleapis.com/container/cpu"]
default "run.googleapis.com/container/billable_instance_time"
end

parameter "param_threshold_zscore" do
type "number"
category "Filters"
label "Threshold For Z-Score"
type "number"
description "The Z-score is the number of standard deviations by which the value of a raw score (i.e., an observed value or data point) is above or below the mean value of what is being observed or measured"
default 3
min_value 0
default 3
end

parameter "param_threshold_consequtive_anomalies" do
category "Filters"
label "Threshold For Consequtive Anomalies"
type "number"
description "Number of Consequtive Anomalies to trigger an incident"
default 0
category "Filters"
label "Threshold For Consecutive Anomalies"
description "Number of Consecutive Anomalies to trigger an incident"
min_value 0
default 0
end

###############################################################################
Expand Down Expand Up @@ -151,9 +147,9 @@ script "js_param_values", type: "javascript" do
// Using param_metric_lookback_time, calculate the start and end time for the interval
var end_time = new Date()
// Set the seconds and milliseconds to 0 to make the timestamp more human-readable
end_time.setSeconds(0,0)
end_time.setSeconds(0, 0)
// Default start_time to Last 1 day
var start_time = new Date(end_time.getTime() - 24*60*60000)
var start_time = new Date(end_time.getTime() - 24 * 60 * 60000)
// Override default if param value matches mapping in switch
switch (param_metric_lookback_time) {
case "Last 15 minutes":
Expand Down Expand Up @@ -317,10 +313,9 @@ datasource "ds_google_cloud_run_services" do
iterate $ds_google_regions_filtered
request do
auth $auth_google
pagination $pagination_google
host "run.googleapis.com" # v2 can use Global endpoint https://cloud.google.com/run/docs/reference/rest#rest_endpoints
verb "GET"
path join(["/v2/projects/", val(iter_item, "projectId"), "/locations/", val(iter_item, "region"), "/services"])
pagination $pagination_google
end
result do
encoding "json"
Expand All @@ -341,14 +336,14 @@ datasource "ds_cloud_run_utilization" do
request do
auth $auth_google
host "monitoring.googleapis.com"
path join(["/v3/projects/",val(iter_item,"projectId"),"/timeSeries"])
query "aggregation.alignmentPeriod", join(['+',val($ds_param_values,"aggregation"),"s"],"")
path join(["/v3/projects/", val(iter_item, "projectId"), "/timeSeries"])
query "aggregation.alignmentPeriod", join(['+', val($ds_param_values, "aggregation"), "s"], "")
query "aggregation.crossSeriesReducer", "REDUCE_SUM"
query "aggregation.groupByFields", 'resource.label."service_name"'
query "aggregation.perSeriesAligner", "ALIGN_RATE"
query "filter", join(['metric.type="',$param_threshold_metric_name,'" resource.type="cloud_run_revision" resource.label."service_name"="',last(split(val(iter_item, "name"), "/services/")),'" AND resource.labels."location"="',val(iter_item, "region"),'" AND resource.labels."service_name"="',last(split(val(iter_item, "name"), "/services/")),'"'],"")
query "filter", join(['metric.type="', $param_threshold_metric_name, '" resource.type="cloud_run_revision" resource.label."service_name"="', last(split(val(iter_item, "name"), "/services/")), '" AND resource.labels."location"="', val(iter_item, "region"), '" AND resource.labels."service_name"="', last(split(val(iter_item, "name"), "/services/")), '"'], "")
query "interval.startTime", val($ds_param_values, "start_time")
query "interval.endTime", val($ds_param_values, "end_time")
query "interval.endTime", val($ds_param_values, "end_time")
end
result do
encoding "json"
Expand Down Expand Up @@ -437,14 +432,9 @@ policy "pol_utilization" do
validate_each $ds_cloud_run_utilization_anomalies do
summary_template "Google Cloud Run Anomaly Detection: {{ len data }} Anomalies In {{ parameters.param_metric_lookback_time }} For {{ parameters.param_threshold_metric_name }} Metric"
detail_template " "
check lt( val(val(item, "value"), "consequtiveAnomalyIndex") , $param_threshold_consequtive_anomalies) # Check that the consequtiveAnomalyIndex is less than the param_consequtiveAnomaly_threshold
escalate $email
check lt(val(val(item, "value"), "consequtiveAnomalyIndex"), $param_threshold_consequtive_anomalies) # Check that the consequtiveAnomalyIndex is less than the param_consequtiveAnomaly_threshold
escalate $esc_email
export do
# resource_level true
# field "id" do
# label "Resource ID"
# path "service_name"
# end
field "param_threshold_consequtive_anomalies" do
label "Policy Parameter Threshold Consequtive Anomalies"
path "parameters.param_threshold_consequtive_anomalies"
Expand Down Expand Up @@ -497,12 +487,11 @@ policy "pol_utilization" do
end
end


###############################################################################
# Escalations
###############################################################################

escalation "email" do
escalation "esc_email" do
automatic true
label "Send Email"
description "Send incident email"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ The following policy actions are taken on any resources found to be out of compl

## Cost

This Policy Template does not launch any instances, and so does not incur any cloud costs.
This policy template does not incur any cloud costs.

## API Quotas

Expand Down
4 changes: 4 additions & 0 deletions cost/google/cloudsql_rightsizing/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## v2.10.2

- Minor code improvements to conform with current standards. Functionality unchanged.

## v2.10.1

- Deprecated: This policy is no longer being updated. Please see policy README for more information.
Expand Down
6 changes: 3 additions & 3 deletions cost/google/cloudsql_rightsizing/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@

This policy is no longer being updated. The [Google Rightsize Cloud SQL Recommender](https://github.com/flexera-public/policy_templates/tree/master/cost/google/rightsize_cloudsql_recommendations/) policy should be used instead.

## What it does
## What It Does

This Policy Template checks Google Cloud SQL instances based on provided CPU threshold over a 30 day average and resizes them after approval.

## Functional Details
## How It Works

- This policy identifies all Google CloudSQL instances reporting performance metrics to stackdriver whose CPU utilization is below the thresholds set in the **Average used CPU % - Downsize Threshold** and **Average used CPU % - Upsize Threshold** parameters.
- If APIs & Services are not enabled for a project, the policy will skip that particular project. On the next run if APIs & Services are enabled, then the project will be considered for execution.
Expand Down Expand Up @@ -56,4 +56,4 @@ Required permissions in the provider:

## Cost

This Policy Template does not incur any cloud costs.
This policy template does not incur any cloud costs.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ severity "medium"
category "Cost"
default_frequency "daily"
info(
version: "2.10.1",
version: "2.10.2",
provider: "GCE",
service: "SQL",
policy_set: "Rightsize Database Services",
Expand Down Expand Up @@ -190,7 +190,6 @@ end

datasource "ds_google_instance_size_map" do
request do
verb "GET"
host "raw.githubusercontent.com"
path "/flexera/policy_templates/e412d4ca5dc191f15fcf6cc532dc2d31de44f3ee/data/google/instance_types.json"
header "User-Agent", "RS Policies"
Expand Down
2 changes: 1 addition & 1 deletion cost/google/cud_expiration/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,4 @@ Additionally, this Policy Template requires that several APIs be enabled in your

## Cost

This Policy Template does not incur any cloud costs.
This policy template does not incur any cloud costs.
5 changes: 5 additions & 0 deletions cost/google/cud_recommendations/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Changelog

## v4.2.1

- Added `Service` field to incident table
- Minor code improvements to conform with current standards.

## v4.2

- Updated policy to use new source for currency information. Policy functionality is unchanged.
Expand Down
Loading
Loading