Skip to content

Conversation

@ravinadhruve10
Copy link
Contributor

Fixed and updated TestAccSecureCloudAuthAccountFC with feature and component{} payload in the resource request.

Fixed and updated TestAccSecureCloudAuthAccountFC with feature
and component payload in the resource request.
@ravinadhruve10 ravinadhruve10 marked this pull request as ready for review September 28, 2023 01:30
@ravinadhruve10 ravinadhruve10 merged commit e35bf0c into feature/api-only-secure-onboarding Sep 29, 2023
@ravinadhruve10 ravinadhruve10 deleted the cloudacc-update-tests branch September 29, 2023 22:20
sarangard pushed a commit that referenced this pull request Oct 13, 2023
* [SSPROD-29309] - Create a resource for GCP API-only onboarding (#407)

* SSPROD-29308: Implement CloudAccount client v2 for Secure

Change summary:
-----------------
Adding a new CloudAccount client v2 for making Secure BE
(cloudauth) APIs to support API-only onboarding support.

* SSPROD-29308: Update the CloudAccountSecureV2 model object

* SSPROD-29308: Use cloudauth proto objects and rename client file

* SSPROD-29308: Add cloudauth pb.go files copy

* SSPROD-29308: Remove not required protorepo module

* Initial draft of resource

* go fmt file

* Use declared functions

* Rename and add resource

* Remove unused file

* Reformat files

* Add alias field

* Rebase and add toResourceData function

* Implement CRUD operations in resource

* Add enabled field

* Change type for provider type

* Remove unused proto import

* Remove setId to empty

* Change account_id to id

---------

Co-authored-by: Ravina Dhruve <ravina.dhruve@sysdig.com>
Co-authored-by: Raghav Anandan <raghav.anandan@raghav.anandan>

* SSPROD-29926: Support Provider_Type enum for Cloudauth Account

Change summary:
----------------
1. Fixed and added support for Provider_type enum in the Cloudaccount API.
   Using encoding/protojson for marshaling/unmarshaling in the cloudauth
   account client (instead of the common encoding/json based functions
   used by all clients). Updated the CloudauthAccountSecure model definition
   to support the same.
2. Made the 'id' field as computed and optional, instead of required.
3. Updated the 'cloud_provider_type' to be string instead of int.

Testing done:
--------------
- Validated create, read & delete CloudAccount operations via Terraform on staging.
- Validated that incorrect provider_type is not allowed.

* [SSPROD-29925] - Add features and components to schema (#410)

* Add components to schema

* Test component type

* Add components to schema

* fix(cloudauth): update native types

* feat(cloudauth): features & components

* fix(cloudauth): update resource data

* fix(cloudauth): adjust required fields

* Fix schema field names

* Set features as optional

* Convert schema set to map

* Check for value before switch case

* Populate features only if value is not nil

* Setaccount features using function

* Refactor fromResourceData function

* Parse and populate Service Prinicipal Private Key in metadata

---------

Co-authored-by: Raghav Anandan <raghav.anandan@raghav.anandan>
Co-authored-by: Christopher Geers <christopher.geers@sysdig.com>
Co-authored-by: Ravina Dhruve <ravina.dhruve@sysdig.com>

* SSPROD-29302: Provider support for organization resource

* SSPROD-29302: Add comment

* SSPROD-29302: using proto def

* SSPROD-29302: Local copy of pb code

* SSPROD-29302: Temp disable Validation

* SSPROD-29302: Changes in response to new Cloudauth account

* SSPROD-29302: fmt

* TF destroy fix (#414)

* TF destroy logs

* Return map

* Fix destroy blockers for features and components

* Add features to map dynamically

* Refine logic

* Define consts for schema keys

* Move const to common.go

---------

Co-authored-by: Raghav Anandan <raghav.anandan@raghav.anandan>

* fix(secure-cloud-account): Support parsing JSON encoded string inputs for Component metadata (#417)

* Resolving rebase conflicts

* Rebase and use constants for schema field names

* Populate all fields of component metadata in Cloudauth Account resource (#420)

Change summary:
----------------
Populating all the fields to fill in the GCP service_principal_metadata
proto struct (and not just the required fields), since we want to store
enough metadata information for potential usecases allowing us to run any
future workflows.

* Add support for Organization onboarding tests (#421)

* Add logs for debug

* Add test code for organization resource

* Remove logs

* Change the provider type and documentation

* Change Schema*

* Whitespace

* Whitespace

* Rebase fixes

* Add Cloudauth Account resource Tests (#419)

* Add Cloudauth Account resource Tests

Change summary:
----------------
1. Added tests for new cloudauth based CloudAccount resource.
2. Minor refactoring of marshal/unmarshal methods of cloudauth client.
3. Added the tests for the marshal/unmarshal methods.

* Remove redundant test

* Add missing import

* Fix test key input format

* Comment out failing test until proper fix

* Update Org onboarding test with account creation (#424)

* Add logs for debug

* Remove logs

* Create account before organization

* Add Cloudauth Account resource Documentation (#422)

* Add Cloudauth Account resource Documentation

* Minor updates to Cloudauth Account resource Documentation

* Fix the resource example

* Add reference note section

* Removing the provider_type from org resource (#426)

* Add logs for debug

* Remove logs

* Remove provider_type from org resource.

* Remove provider_type from the org documentation (#427)

* Add logs for debug

* Remove logs

* Remove provider_type from the doc

* Uncomment and add TestAccSecureCloudAuthAccountFC (#425)

* Uncomment and add TestAccSecureCloudAuthAccountFC

Fixed and updated TestAccSecureCloudAuthAccountFC with feature
and component payload in the resource request.

* Use ignore_changes in resource snippet for the test

* fixing unit tests json asserts

* fixing whitespace in json

* addressing linting + unit test issues

* fixing org & single project gcp cloudauth tests

* Fix the TF Read & delete for GCP Org cloudauth

* Fix the 404 for cloud account & org

---------

Co-authored-by: Raghav <35452664+raghavanandan@users.noreply.github.com>
Co-authored-by: Ravina Dhruve <ravina.dhruve@sysdig.com>
Co-authored-by: Raghav Anandan <raghav.anandan@raghav.anandan>
Co-authored-by: Christopher Geers <christopher.geers@sysdig.com>
Co-authored-by: Mandar Kulkarni <mandar.kulkarni@sysdig.com>
Co-authored-by: Ravina Dhruve <136399755+ravinadhruve10@users.noreply.github.com>
Co-authored-by: Mandar Kulkarni <131720522+mdkulkarni15@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants