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

schema type "multilink" ignores some parameters #74

Open
fabian-kramer opened this issue Jul 15, 2024 · 1 comment
Open

schema type "multilink" ignores some parameters #74

fabian-kramer opened this issue Jul 15, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@fabian-kramer
Copy link

Version information

  • terraform: 1.9.2
  • terraform provider: v1.3.0

Describe the bug

When specifying standard link attributes like this:

  link = {
      type                    = "multilink"
      required                = false
      translatable            = false
      position                = 3
      asset_link_type         = true
      allow_target_blank      = true
      allow_custom_attributes = false
      show_anchor             = true
      link_scope              = "{0}"
      force_link_scope        = false
      email_link_type         = false
    }

Only the allow_target_blank and force_link_scope attributes are set in Storyblok. The other values like asset_link_type and show_anchor are ignored. Based on the export from Storyblok before importing into Terraform looks like this:

        "link": {
          "type": "multilink",
          "required": false,
          "translatable": false,
          "pos": 3,
          "asset_link_type": true,
          "allow_target_blank": true,
          "allow_custom_attributes": false,
          "show_anchor": true,
          "link_scope": "{0}",
          "force_link_scope": false,
          "email_link_type": false
        },

but they are partly missing in the tfstate file:

              "link": {
                "add_https": null,
                "allow_target_blank": true,
                "asset_folder_id": null,
                "can_sync": null,
                "component_whitelist": null,
                "customize_toolbar": null,
                "datasource_slug": null,
                "default_value": null,
                "description": null,
                "disable_time": null,
                "display_name": null,
                "external_datasource": null,
                "field_type": null,
                "filetypes": null,
                "filter_content_type": null,
                "folder_slug": null,
                "force_link_scope": false,
                "image_crop": null,
                "image_height": null,
                "image_width": null,
                "keep_image_size": null,
                "keys": null,
                "link_scope": "{0}",
                "max_length": null,
                "max_options": null,
                "maximum": null,
                "min_options": null,
                "minimum": null,
                "no_translate": null,
                "options": null,
                "position": 3,
                "regex": null,
                "required": false,
                "restrict_components": null,
                "restrict_content_types": null,
                "rich_markdown": null,
                "rtl": null,
                "source": null,
                "toolbar": null,
                "tooltip": null,
                "translatable": false,
                "type": "multilink",
                "use_uuid": null
              },

As you can see, some are missing, they are always set to false if the component is modified, probably because the provider is not aware of them.
I also found this issue: #45
There it is stated that the anchor attribute is fixed, but unfortunately, it is not. Maybe something else broke it again?

To Reproduce

Create a resource like a button, add the link attribute and try to set one of the following to "true":

  • asset_link_type
  • show_anchor
  • email_link_type
  • allow_custom_attributes
    Then see in Storyblok, the component will show all on false.

Expected behavior

The values are passed to Storyblok and can be updated.

@fabian-kramer fabian-kramer added bug Something isn't working triage Needs triage labels Jul 15, 2024
@demeyerthom
Copy link
Member

Hi @fabian-kramer. I think this is happening because these fields are not actually part of the datamodel in terraform, so terraform ignores them, and subsequently does not send them to storyblok either.

I will see if I can add the fields

@demeyerthom demeyerthom added enhancement New feature or request and removed bug Something isn't working triage Needs triage labels Jul 19, 2024
@demeyerthom demeyerthom self-assigned this Sep 3, 2024
@demeyerthom demeyerthom removed their assignment Nov 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants