Skip to content

Issue: possible issue in jamfpro_policy with import function ? #635

@ecanault

Description

@ecanault

Hi,

I'm trying to use the terraform import function with policies.
For policies with Self Service enabled terraform plan says that the resources will be updated in-place instead of imported.

Here is an example:

  # module.policies["771149E1-AEB0-4F35-BBE1-97CE52ED2212"].jamfpro_policy.object will be updated in-place
  # (imported from "12")
  ~ resource "jamfpro_policy" "object" {
        category_id                   = 5
        enabled                       = true
[...]
      + self_service {
          + feature_on_main_page            = true
          + force_users_to_view_description = true
          + install_button_text             = "Exécuter"
          + reinstall_button_text           = "Exécuter"
          + self_service_display_name       = "Réparation de votre Mac"
          + self_service_icon_id            = (known after apply)
          + use_for_self_service            = true

          + self_service_category {
              + display_in = true
              + feature_in = true
              + id         = 5
            }
        }
[...]

As you can see in the example above, the self_service block is created despite the fact that it already exists in the Jamf Pro server, with the exact same values.

Perhaps I'm doing something wrong but I don't encounter this behaviour on other resources for imports.
May be this is related to the icon attribute? As it is (re)created, it impacts the whole self_service block?

Thanks for helping!
Emmanuel

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions