deploymenttheory / terraform-provider-jamfpro

Jamf Pro Terraform Provider/Plugin written with the TF Provider SDK v2. Written in go
Mozilla Public License 2.0
34 stars 13 forks source link

FR: Support self service reinstall_button_text for policy resources #447

Closed mhrono closed 2 weeks ago

mhrono commented 3 weeks ago

Self Service options for policies in the jamf GUI provide separate options for install_button_text and reinstall_button_text, but it appears the provider only supports the former. It'd be great to be able to set both of these in the HCL.

ShocOne commented 2 weeks ago

field has been added into the provider and will be in release v0.4.3.

thanks

ecanault commented 1 week ago

Hi,

Not sure it's working well.

terraform plan goes well:

  # module.policies["E3772D90-64C3-4ECB-87D7-1BB06B3536F8"].jamfpro_policy.object will be updated in-place
  ~ resource "jamfpro_policy" "object" {
        id                            = "58"
        name                          = "p_install_jamfconnect_launcher"
        # (17 unchanged attributes hidden)

      ~ self_service {
          + reinstall_button_text           = "Installer"
            # (7 unchanged attributes hidden)

            # (1 unchanged block hidden)
        }

        # (2 unchanged blocks hidden)
    }

The state file is also correct after apply:

    self_service {
        feature_on_main_page            = false
        force_users_to_view_description = false
        install_button_text             = "Installer"
        reinstall_button_text           = "Installer"
        ... 

But the configuration does'nt seem to be correctly applied in Jamf Pro:

Edit_Policy_p_install_jamfconnect_launcher__

Regards, Emmanuel

ecanault commented 1 week ago

An update doesn’t see the difference between the state file and Jamf Pro. terraform plan or apply says there is no change.

No changes. Your infrastructure matches the configuration.

The resource was created initially with version 0.4.2. I tried to delete it and recreate it from scratch: same issue.

Tried also to destroy all, deleting .terraform folder and .tfstate files: same issue.