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

Update package_file_path and add new package in jamfpro_package resource #129

Merged
merged 1 commit into from
Jul 2, 2024
Merged
Changes from all commits
Commits
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
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 = ""
}