Skip to content

Commit

Permalink
Update package_file_path and add new package in jamfpro_package resource
Browse files Browse the repository at this point in the history
  • Loading branch information
ShocOne committed Jul 2, 2024
1 parent 71f0e92 commit 933b6cb
Showing 1 changed file with 34 additions and 2 deletions.
36 changes: 34 additions & 2 deletions workload/terraform/jamfpro/packages.tf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@

// Example of referencing a package directly within the repository
resource "jamfpro_package" "jamfpro_package_001" {
package_name = "tf-ghatest-package-suspiciouspackage"
package_file_path = "support_files/packages/gha-test-SuspiciousPackage.dmg"
Expand All @@ -21,4 +21,36 @@ resource "jamfpro_package" "jamfpro_package_001" {
suppress_registration = false
manifest = ""
manifest_file_name = ""
}
}

// Example of downloading a package from a URL and uploading it to Jamf Pro
resource "terraform_data" "download_package" {
provisioner "local-exec" {
command = "curl -L -o /tmp/ghatest-companyportal-latest.pkg https://go.microsoft.com/fwlink/?linkid=853070"
}
}

resource "jamfpro_package" "jamfpro_package_002" {
depends_on = [terraform_data.download_package]
package_name = "tf-ghatest-package-source:http-companyportal-latest"
package_file_path = "/tmp/ghatest-companyportal-latest.pkg"
category_id = "-1" // jamfpro_category.jamfpro_category_001.id
info = "tf package deployment for demonstration"
notes = "Uploaded by: terraform-provider-jamfpro plugin."
priority = 10
reboot_required = true
fill_user_template = false
fill_existing_users = false
os_requirements = "macOS 10.15.0"
swu = false
self_heal_notify = false
os_install = false
serial_number = ""
suppress_updates = false
ignore_conflicts = false
suppress_from_dock = false
suppress_eula = false
suppress_registration = false
manifest = ""
manifest_file_name = ""
}

0 comments on commit 933b6cb

Please sign in to comment.