Skip to content

Commit

Permalink
refactor: Remove commented out code in Jamf Pro Terraform configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
ShocOne committed Jul 23, 2024
1 parent 2a4d41c commit d065c57
Show file tree
Hide file tree
Showing 7 changed files with 109 additions and 109 deletions.
18 changes: 9 additions & 9 deletions workload/terraform/jamfpro/buildings.tf
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@

resource "jamfpro_building" "jamfpro_building_001" {
name = "tf-ghatest-Apple-Park"
street_address1 = "The McIntosh Tree"
street_address2 = "One Apple Park Way"
city = "Cupertino"
state_province = "California"
zip_postal_code = "95014"
country = "The United States of America"
}
# resource "jamfpro_building" "jamfpro_building_001" {
# name = "tf-ghatest-Apple-Park"
# street_address1 = "The McIntosh Tree"
# street_address2 = "One Apple Park Way"
# city = "Cupertino"
# state_province = "California"
# zip_postal_code = "95014"
# country = "The United States of America"
# }

# data "jamfpro_building" "jamfpro_building_001_data" {
# id = jamfpro_building.jamfpro_building_001.id
Expand Down
8 changes: 4 additions & 4 deletions workload/terraform/jamfpro/categories.tf
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
resource "jamfpro_category" "jamfpro_category_001" {
name = "tf-ghatest-category-01"
priority = 5
}
# resource "jamfpro_category" "jamfpro_category_001" {
# name = "tf-ghatest-category-01"
# priority = 5
# }

# data "jamfpro_category" "jamfpro_category_001_data" {
# id = jamfpro_category.jamfpro_category_001.id
Expand Down
16 changes: 8 additions & 8 deletions workload/terraform/jamfpro/computerextensionattributes.tf
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@

# # //-------------------------------------------------------------------//
resource "jamfpro_computer_extension_attribute" "computer_extension_attribute_popup_menu_1" {
name = "tf-ghatest-cexa-popup-menu-example"
enabled = true
description = "An attribute collected from a pop-up menu."
# resource "jamfpro_computer_extension_attribute" "computer_extension_attribute_popup_menu_1" {
# name = "tf-ghatest-cexa-popup-menu-example"
# enabled = true
# description = "An attribute collected from a pop-up menu."

input_type = "Pop-up Menu"
input_popup = ["Option 1", "Option 2", "Option 3"]
# input_type = "Pop-up Menu"
# input_popup = ["Option 1", "Option 2", "Option 3"]


inventory_display = "User and Location"
}
# inventory_display = "User and Location"
# }

# //-------------------------------------------------------------------//

Expand Down
10 changes: 5 additions & 5 deletions workload/terraform/jamfpro/dockitems.tf
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@

// App Dock Item Example
resource "jamfpro_dock_item" "jamfpro_dock_item_001" {
name = "tf-ghatest-dockItem-app-iTunes"
type = "App"
path = "file://localhost/Applications/iTunes.app/"
}
# resource "jamfpro_dock_item" "jamfpro_dock_item_001" {
# name = "tf-ghatest-dockItem-app-iTunes"
# type = "App"
# path = "file://localhost/Applications/iTunes.app/"
# }

# // File Dock Item Example
# resource "jamfpro_dock_item" "jamfpro_dock_item_002" {
Expand Down
106 changes: 53 additions & 53 deletions workload/terraform/jamfpro/scripts.tf
Original file line number Diff line number Diff line change
@@ -1,65 +1,65 @@
resource "jamfpro_script" "jamfpro_script_001" {
name = "tf-ghatest-correct-application-permissions-v1.0"
script_contents = file("${path.module}/support_files/scripts/Correct Application Permissions.sh")
os_requirements = "13"
priority = "BEFORE"
info = "Adds target user or group to specified group membership, or removes said membership."
notes = "Jamf Pro script parameters: 4 -> 7"
parameter4 = "Google Chrome" // targetApplication
}
# resource "jamfpro_script" "jamfpro_script_001" {
# name = "tf-ghatest-correct-application-permissions-v1.0"
# script_contents = file("${path.module}/support_files/scripts/Correct Application Permissions.sh")
# os_requirements = "13"
# priority = "BEFORE"
# info = "Adds target user or group to specified group membership, or removes said membership."
# notes = "Jamf Pro script parameters: 4 -> 7"
# parameter4 = "Google Chrome" // targetApplication
# }

data "jamfpro_script" "jamfpro_script_001_data" {
id = jamfpro_script.jamfpro_script_001.id
}
# data "jamfpro_script" "jamfpro_script_001_data" {
# id = jamfpro_script.jamfpro_script_001.id
# }

output "jamfpro_script_001_data_id" {
value = data.jamfpro_script.jamfpro_script_001_data.id
}
# output "jamfpro_script_001_data_id" {
# value = data.jamfpro_script.jamfpro_script_001_data.id
# }

output "jamfpro_script_001_data_name" {
value = data.jamfpro_script.jamfpro_script_001_data.name
}
# output "jamfpro_script_001_data_name" {
# value = data.jamfpro_script.jamfpro_script_001_data.name
# }

resource "jamfpro_script" "jamfpro_script_002" {
name = "tf-ghatest-encrypt-apfs-volume-v5.0.1"
script_contents = file("${path.module}/support_files/scripts/Encrypt APFS Volume.zsh")
os_requirements = "13"
priority = "BEFORE"
info = "Adds target user or group to specified group membership, or removes said membership."
notes = "Jamf Pro script parameters: 4"
parameter4 = "/" // targetVolume
}
# resource "jamfpro_script" "jamfpro_script_002" {
# name = "tf-ghatest-encrypt-apfs-volume-v5.0.1"
# script_contents = file("${path.module}/support_files/scripts/Encrypt APFS Volume.zsh")
# os_requirements = "13"
# priority = "BEFORE"
# info = "Adds target user or group to specified group membership, or removes said membership."
# notes = "Jamf Pro script parameters: 4"
# parameter4 = "/" // targetVolume
# }

data "jamfpro_script" "jamfpro_script_002_data" {
id = jamfpro_script.jamfpro_script_002.id
}
# data "jamfpro_script" "jamfpro_script_002_data" {
# id = jamfpro_script.jamfpro_script_002.id
# }

output "jamfpro_script_002_data_id" {
value = data.jamfpro_script.jamfpro_script_002_data.id
}
# output "jamfpro_script_002_data_id" {
# value = data.jamfpro_script.jamfpro_script_002_data.id
# }

output "jamfpro_script_002_data_name" {
value = data.jamfpro_script.jamfpro_script_002_data.name
}
# output "jamfpro_script_002_data_name" {
# value = data.jamfpro_script.jamfpro_script_002_data.name
# }

resource "jamfpro_script" "jamfpro_script_003" {
name = "tf-ghatest-reset-safari-v2.1.4"
script_contents = file("${path.module}/support_files/scripts/Reset Safari.sh")
os_requirements = "13"
priority = "BEFORE"
info = "Deleting Safari preference files to reset to system default."
notes = "Jamf Pro script parameters: none"
# resource "jamfpro_script" "jamfpro_script_003" {
# name = "tf-ghatest-reset-safari-v2.1.4"
# script_contents = file("${path.module}/support_files/scripts/Reset Safari.sh")
# os_requirements = "13"
# priority = "BEFORE"
# info = "Deleting Safari preference files to reset to system default."
# notes = "Jamf Pro script parameters: none"

}
# }

data "jamfpro_script" "jamfpro_script_003_data" {
id = jamfpro_script.jamfpro_script_003.id
}
# data "jamfpro_script" "jamfpro_script_003_data" {
# id = jamfpro_script.jamfpro_script_003.id
# }

output "jamfpro_script_003_data_id" {
value = data.jamfpro_script.jamfpro_script_003_data.id
}
# output "jamfpro_script_003_data_id" {
# value = data.jamfpro_script.jamfpro_script_003_data.id
# }

output "jamfpro_script_003_data_name" {
value = data.jamfpro_script.jamfpro_script_003_data.name
}
# output "jamfpro_script_003_data_name" {
# value = data.jamfpro_script.jamfpro_script_003_data.name
# }
48 changes: 24 additions & 24 deletions workload/terraform/jamfpro/smartcomputergroups.tf
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
resource "jamfpro_smart_computer_group" "smart_computer_group_001" {
name = "tf-ghatest-computergroup-operating-system-like-macos-14"
# resource "jamfpro_smart_computer_group" "smart_computer_group_001" {
# name = "tf-ghatest-computergroup-operating-system-like-macos-14"

// optional
site_id = -1
# // optional
# site_id = -1

# Add computers to the group
criteria {
name = "Operating System Version"
priority = 0
and_or = "and"
search_type = "like"
value = "14"
opening_paren = true
closing_paren = false
}
criteria {
name = "Operating System Version"
priority = 1
and_or = "and"
search_type = "like"
value = "14"
opening_paren = false
closing_paren = true
}
# # Add computers to the group
# criteria {
# name = "Operating System Version"
# priority = 0
# and_or = "and"
# search_type = "like"
# value = "14"
# opening_paren = true
# closing_paren = false
# }
# criteria {
# name = "Operating System Version"
# priority = 1
# and_or = "and"
# search_type = "like"
# value = "14"
# opening_paren = false
# closing_paren = true
# }

}
# }
12 changes: 6 additions & 6 deletions workload/terraform/jamfpro/staticcomputergroups.tf
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
resource "jamfpro_static_computer_group" "static_computer_group_002" {
name = "tf-ghatest-staticcomputergroup"
# resource "jamfpro_static_computer_group" "static_computer_group_002" {
# name = "tf-ghatest-staticcomputergroup"

// optional
//site_id = -1
# // optional
# //site_id = -1

assigned_computer_ids = [16, 17, 20]
# assigned_computer_ids = [16, 17, 20]

}
# }

0 comments on commit d065c57

Please sign in to comment.