Skip to content

Commit

Permalink
refactored a bit
Browse files Browse the repository at this point in the history
  • Loading branch information
thejoeker12 committed Nov 15, 2024
1 parent c69f6b0 commit db5cbb7
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 61 deletions.
Original file line number Diff line number Diff line change
@@ -1,16 +1,5 @@
{
"exclude_ids": {
"jamfpro_script": [
7761,
7759,
7723,
7725,
7724,
7760,
7761,
7770,
7771
],
"jamfpro_category": [
224
]
Expand All @@ -19,7 +8,7 @@
"jamfpro_script": {
"active": true,
"validate": true,
"use_resource_type_as_name": false
"use_resource_type_as_name": true
},
"jamfpro_category": {
"active": true,
Expand Down
30 changes: 0 additions & 30 deletions importer_working_dir/outputs/jamfpro_category.tf

This file was deleted.

10 changes: 0 additions & 10 deletions importer_working_dir/outputs/jamfpro_policy.tf

This file was deleted.

5 changes: 0 additions & 5 deletions importer_working_dir/outputs/jamfpro_script.tf

This file was deleted.

6 changes: 2 additions & 4 deletions scripts/import_via_config_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@


# Consts
CONFIG_FN = "jamftf_config.json"
CONFIG_FN = "config.json"

# Environment vars
JP_TENANT_NAME = os.environ.get("JP_TENANT_NAME")
Expand Down Expand Up @@ -51,7 +51,7 @@ def get_hcl() -> dict:
target_resources = jamftf.parse_config_file(f"{WORKING_DIR}/{CONFIG_FN}")

importer = jamftf.Importer(
client=JP_CLIENT(),
client=JP_CLIENT,
targetted=target_resources,
debug=False
)
Expand All @@ -67,8 +67,6 @@ def write_out(hcl_dict: dict) -> None:

path = f"{WORKING_DIR}/{res_type}.tf"

os.mkdir(os.path.dirname(path), exist_ok=True)

with open(path, "w+", encoding="UTF-8") as f:
f.write(v)

Expand Down

0 comments on commit db5cbb7

Please sign in to comment.