vmware / terraform-provider-tanzu-mission-control

Terraform provider to manage resources of Tanzu Mission Control
Mozilla Public License 2.0
38 stars 31 forks source link

Feat/Custom IAM Role -- TF Resources #314

Closed GilTeraSky closed 10 months ago

GilTeraSky commented 10 months ago
  1. What this PR does / why we need it: This PR includes the Terraform Resource implementation for the Custom IAM role.

  2. Which issue(s) this PR fixes

  3. Additional information a. In the read function I implemented a fix for API inconsistencies which include: a.1 MatchExpression (AggregationRule) doesn't return from the API, therefore I implemented a merge between the response and the tf data to avoid changes but keeping new data from response (if exists). a.2 Sometimes the order of the array returning for the Resources is not the same but containing the same data, therefore I implemented a merge between the response and the tf data to avoid changes but keeping new data from response (if exists). b. I implemented a schema validation during the plan phase to make sure resources or url_paths (Exactly one) exist in each of the Rules provided.

  4. Special notes for your reviewer

codecov-commenter commented 10 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (740fc83) 25.57% compared to head (2480186) 25.58%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## feat/custom-role #314 +/- ## ================================================= Coverage 25.57% 25.58% ================================================= Files 187 187 Lines 15729 15730 +1 ================================================= + Hits 4023 4024 +1 Misses 11505 11505 Partials 201 201 ``` | [Files](https://app.codecov.io/gh/vmware/terraform-provider-tanzu-mission-control/pull/314?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=vmware) | Coverage Δ | | |---|---|---| | [internal/provider/provider.go](https://app.codecov.io/gh/vmware/terraform-provider-tanzu-mission-control/pull/314?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=vmware#diff-aW50ZXJuYWwvcHJvdmlkZXIvcHJvdmlkZXIuZ28=) | `100.00% <100.00%> (ø)` | |

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.