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(secure-onboarding) Fix resource update operation #435

Merged
merged 4 commits into from
Oct 27, 2023

Commits on Oct 25, 2023

  1. fix(secure-onboarding) Fix resource update operation

    The TF provider’s knowledge of cloud account object is older and
    different from the actual BE cloud account. This is because BE has
    modified the account object with fields like organization_id during
    org onboarding. Hence, during intended PUTs, TF overwrites these
    fields resulting in unexpected state.
    
    Fix summary:
    ------------
    1. Add and expose the organization_id in provider's account resource schema
       (as a computed field only). This is to let the customers know if their
       onboarded account is part of any org when they fetch the real existing
       infrastructure objects using GET calls.
    2. During resource updates (PUT API calls) restrict and reject with error
       when the customer tries to update any non-updatable resource fields.
    3. Minor refactoring for cleaner code.
    
    Testing done:
    ---------------
    Validated the scenarios :-
    - During tf apply again --> it returns and updates organization_id on the account.
    - No unnecessary PUTs
    - On triggering an intended PUT :-
      - restricts any non-updatable fields
      - PUT works as expected, doesn't oevrwrite organization_id to ""
    ravinadhruve10 committed Oct 25, 2023
    Configuration menu
    Copy the full SHA
    3ed0614 View commit details
    Browse the repository at this point in the history
  2. Fix lint issue

    ravinadhruve10 committed Oct 25, 2023
    Configuration menu
    Copy the full SHA
    2b0d1c6 View commit details
    Browse the repository at this point in the history

Commits on Oct 26, 2023

  1. Configuration menu
    Copy the full SHA
    3355e9e View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    4587a57 View commit details
    Browse the repository at this point in the history