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

fix: Fix provider overwriting parts of the resource that is not managed by it #145

Merged
merged 4 commits into from
Sep 6, 2024

Commits on Sep 6, 2024

  1. Add a way to mark some parameters as private in terraform

    Private parameters are not part of the schema, but are still managed by terraform.
    kklimonda-cl committed Sep 6, 2024
    Configuration menu
    Copy the full SHA
    951c354 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    7f44565 View commit details
    Browse the repository at this point in the history
  3. During Update(), load the existing entry to restore private fields.

    Some parameters can have codegen override set to skip parameter in terraform
    provider - this can be used for example when rendering panorama templates to
    skip attributes related to importing - import is done implicitly when creating
    other resources.
    
    Due to that care has to be taken to make sure those private fields are still
    copied to pango structures for the update, otherwise Update() call will end
    up removing them.
    
    This implementation follows the old provider, by reading existing entries from
    the server during Update() call in the provider, and only copying data that
    is known to the provider, leaving everything else intact.
    kklimonda-cl committed Sep 6, 2024
    Configuration menu
    Copy the full SHA
    10b22cc View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    26bfc42 View commit details
    Browse the repository at this point in the history