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

Added an additional computer EA #95

Merged
merged 1 commit into from
Mar 21, 2024
Merged

Added an additional computer EA #95

merged 1 commit into from
Mar 21, 2024

Conversation

ShocOne
Copy link
Contributor

@ShocOne ShocOne commented Mar 21, 2024

Change

State your intended change to Jamf Pro

Thank you for your contribution !
Please include a summary of the change and which issue is fixed.
Please also include relevant motivation and context.
List any dependencies that are required for this change.

Type of Change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update (Wiki)

Checklist

  • I'm sure there are no other open Pull Requests for the same update/change
  • My corresponding pipelines / checks run clean and green without any errors or warnings
  • My code follows the style guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation (readme)
  • I did format my code

Copy link
Contributor

Terraform Format and Style 🖌success

Terraform Initialization ⚙️success

Terraform Validation 🤖success

Validation Output


Terraform Plan 📖success

Show Plan

Running plan in Terraform Cloud. Output will stream here. Pressing Ctrl-C
will stop streaming the logs, but will not stop the plan running remotely.

Preparing the remote plan...

To view this run in a browser, visit:
https://app.terraform.io/app/deploymenttheory/terraform-jamfpro-demo/runs/run-MVrsMPTmkLmYKiwX

Waiting for the plan to start...

Terraform v1.7.4
on linux_amd64
Initializing plugins and modules...
jamfpro_package.jamfpro_package_002: Refreshing state... [id=109]
jamfpro_category.jamfpro_category_001: Refreshing state... [id=117]
jamfpro_script.jamfpro_script_001: Refreshing state... [id=7249]
jamfpro_macos_configuration_profile.jamfpro_macos_configuration_profile_001: Refreshing state... [id=1764]
data.jamfpro_package.jamfpro_package_002_data: Refreshing...
data.jamfpro_category.jamfpro_category_001_data: Refreshing...
data.jamfpro_script.jamfpro_script_001_data: Refreshing...
data.jamfpro_package.jamfpro_package_002_data: Refresh complete after 0s [id=109]
data.jamfpro_category.jamfpro_category_001_data: Refresh complete after 0s [id=117]
data.jamfpro_script.jamfpro_script_001_data: Refresh complete after 0s [id=7249]
╷
│ Warning: Value for undeclared variable
│
│ The root module does not declare a variable named "JAMFPRO_CLIENT_SECRET"
│ but a value was found in file
│ "/home/tfc-agent/.tfc-agent/component/terraform/runs/run-MVrsMPTmkLmYKiwX/terraform.tfvars".
│ If you meant to use this value, add a "variable" block to the
│ configuration.
│
│ To silence these warnings, use TF_VAR_... environment variables to provide
│ certain "global" settings to all configurations in your organization. To
│ reduce the verbosity of these warnings, use the -compact-warnings option.
╵
╷
│ Warning: Value for undeclared variable
│
│ The root module does not declare a variable named "JAMFPRO_CLIENT_ID" but a
│ value was found in file
│ "/home/tfc-agent/.tfc-agent/component/terraform/runs/run-MVrsMPTmkLmYKiwX/terraform.tfvars".
│ If you meant to use this value, add a "variable" block to the
│ configuration.
│
│ To silence these warnings, use TF_VAR_... environment variables to provide
│ certain "global" settings to all configurations in your organization. To
│ reduce the verbosity of these warnings, use the -compact-warnings option.
╵
╷
│ Warning: Values for undeclared variables
│
│ In addition to the other similar warnings shown, 1 other variable(s)
│ defined without being declared.
╵

Terraform used the selected providers to generate the following execution
plan. Resource actions are indicated with the following symbols:
  + create

Terraform will perform the following actions:

  # jamfpro_computer_extension_attribute.computer_extension_attribute_script_batch[0] will be created
  + resource "jamfpro_computer_extension_attribute" "computer_extension_attribute_script_batch" {
      + data_type         = "String"
      + description       = "An attribute collected via a script."
      + enabled           = true
      + id                = (known after apply)
      + inventory_display = "Operating System"
      + name              = "tf-example-cexa-logged-in-user-001"
      + recon_display     = (known after apply)

      + input_type {
          + platform = "Mac"
          + script   = <<-EOT
                #!/bin/sh
                
                ########## variable-ing ##########
                
                
                
                loggedInUser=$(/usr/bin/stat -f%Su "/dev/console")
                
                
                
                ########## main process ##########
                
                
                
                # Report logged-in user.
                echo "<result>$loggedInUser</result>"
                
                
                
                exit 0
            EOT
          + type     = "script"
        }
    }

  # jamfpro_computer_extension_attribute.computer_extension_attribute_script_batch[1] will be created
  + resource "jamfpro_computer_extension_attribute" "computer_extension_attribute_script_batch" {
      + data_type         = "String"
      + description       = "An attribute collected via a script."
      + enabled           = true
      + id                = (known after apply)
      + inventory_display = "Operating System"
      + name              = "tf-example-cexa-logged-in-user-002"
      + recon_display     = (known after apply)

      + input_type {
          + platform = "Mac"
          + script   = <<-EOT
                #!/bin/sh
                
                ########## variable-ing ##########
                
                
                
                loggedInUser=$(/usr/bin/stat -f%Su "/dev/console")
                
                
                
                ########## main process ##########
                
                
                
                # Report logged-in user.
                echo "<result>$loggedInUser</result>"
                
                
                
                exit 0
            EOT
          + type     = "script"
        }
    }

  # jamfpro_computer_extension_attribute.computer_extension_attribute_script_batch[2] will be created
  + resource "jamfpro_computer_extension_attribute" "computer_extension_attribute_script_batch" {
      + data_type         = "String"
      + description       = "An attribute collected via a script."
      + enabled           = true
      + id                = (known after apply)
      + inventory_display = "Operating System"
      + name              = "tf-example-cexa-logged-in-user-003"
      + recon_display     = (known after apply)

      + input_type {
          + platform = "Mac"
          + script   = <<-EOT
                #!/bin/sh
                
                ########## variable-ing ##########
                
                
                
                loggedInUser=$(/usr/bin/stat -f%Su "/dev/console")
                
                
                
                ########## main process ##########
                
                
                
                # Report logged-in user.
                echo "<result>$loggedInUser</result>"
                
                
                
                exit 0
            EOT
          + type     = "script"
        }
    }

  # jamfpro_computer_extension_attribute.computer_extension_attribute_script_batch[3] will be created
  + resource "jamfpro_computer_extension_attribute" "computer_extension_attribute_script_batch" {
      + data_type         = "String"
      + description       = "An attribute collected via a script."
      + enabled           = true
      + id                = (known after apply)
      + inventory_display = "Operating System"
      + name              = "tf-example-cexa-logged-in-user-004"
      + recon_display     = (known after apply)

      + input_type {
          + platform = "Mac"
          + script   = <<-EOT
                #!/bin/sh
                
                ########## variable-ing ##########
                
                
                
                loggedInUser=$(/usr/bin/stat -f%Su "/dev/console")
                
                
                
                ########## main process ##########
                
                
                
                # Report logged-in user.
                echo "<result>$loggedInUser</result>"
                
                
                
                exit 0
            EOT
          + type     = "script"
        }
    }

  # jamfpro_computer_extension_attribute.computer_extension_attribute_script_batch[4] will be created
  + resource "jamfpro_computer_extension_attribute" "computer_extension_attribute_script_batch" {
      + data_type         = "String"
      + description       = "An attribute collected via a script."
      + enabled           = true
      + id                = (known after apply)
      + inventory_display = "Operating System"
      + name              = "tf-example-cexa-logged-in-user-005"
      + recon_display     = (known after apply)

      + input_type {
          + platform = "Mac"
          + script   = <<-EOT
                #!/bin/sh
                
                ########## variable-ing ##########
                
                
                
                loggedInUser=$(/usr/bin/stat -f%Su "/dev/console")
                
                
                
                ########## main process ##########
                
                
                
                # Report logged-in user.
                echo "<result>$loggedInUser</result>"
                
                
                
                exit 0
            EOT
          + type     = "script"
        }
    }

Plan: 5 to add, 0 to change, 0 to destroy.

------------------------------------------------------------------------

Cost Estimation:

Resources: 0 of 9 estimated
           $0.0/mo +$0.0

Pusher: @ShocOne, Action: pull_request, Working Directory: workload/terraform/jamfpro, Workflow: Terraform Plan

Copy link
Contributor

Terraform Cloud Plan Output

Plan: 5 to add, 0 to change, 0 to destroy.

Terraform Cloud Plan

@ShocOne ShocOne merged commit 44573ae into main Mar 21, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant