Integrate checklist data in FAST (#1969)

* add locals for additive and authoritative org iam roles

* first shot at IAM and logging location

* tfdoc

* use locals for locations

* fix file parsing, resman stubs

* initial resman implementation

* remove unneeded code

* fix data file

* replace dumb yamldecode

* fix wrong type in organization additive bindings try

* simplify logging local

* Use check asserts for version and org id

* Checks on checklist for resman

* refactor checks, ignore checklist files on wrong org id

* stage 0 tests

* fix checklist checks

* stage 1 tests

---------

Co-authored-by: Wiktor Niesiobędzki <wiktorn@google.com>
This commit is contained in:
Ludovico Magnocavallo
2024-01-18 05:45:29 +01:00
committed by GitHub
parent a34cdd5597
commit a8c84357f4
24 changed files with 1145 additions and 77 deletions

View File

@@ -127,12 +127,10 @@ def plan_summary(module_path, basedir, tf_var_files=None, extra_files=None,
q = collections.deque([plan.root_module])
while q:
e = q.popleft()
if 'type' in e:
counts[e['type']] += 1
if 'values' in e:
values[e['address']] = e['values']
for x in e.get('resources', []):
counts['resources'] += 1
q.append(x)
@@ -198,6 +196,8 @@ def plan_validator(module_path, inventory_paths, basedir, tf_var_files=None,
# - put the values coming from user's inventory the right
# side of any comparison operators.
# - include a descriptive error message to the assert
# print(yaml.dump({'values': summary.values}))
# print(yaml.dump({'counts': summary.counts}))
if 'values' in inventory:
validate_plan_object(inventory['values'], summary.values, relative_path,
@@ -234,7 +234,6 @@ def plan_validator(module_path, inventory_paths, basedir, tf_var_files=None,
if _buffer:
print(yaml.dump(_buffer))
raise
return summary