-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🎉 configure Mondoo space at the provider level (#145)
Most of the resources we develop has a required field named `space_id`, this is because we need to know where do we have to create the resource and the Mondoo client doesn't have that information. We would see resources like: ```hcl provider "mondoo" {} resource "mondoo_space" "my_space" { name = "My Space" org_id = "my-org-123456" } resource "mondoo_policy_assignment" "space" { space_id = mondoo_space.my_space.id ... } resource "mondoo_custom_policy" "my_policy" { space_id = mondoo_space.my_space.id ... } resource "mondoo_integration_github" "gh_integration" { space_id = mondoo_space.my_space.id ... } ``` This change is making it so that users can configure the Mondoo space at the `provider` level, making it so that a single provider can manage N number of resources on that space without having to specify the space id every time. The code above would now look like: ```hcl provider "mondoo" { space = "hungry-poet-1988" } resource "mondoo_policy_assignment" "space" { ... } resource "mondoo_custom_policy" "my_policy" { ... } resource "mondoo_integration_github" "gh_integration" { ... } ``` This change is backwards compatible since all resources should continue to allow specifying the space where they belong via the `space_id` field. Additional changes: * ✅ update resource: integration_slack * ✨ add make cleanup-examples to remove leftover files * ✏️ add debug logs to provider code * ⭐️ New `Space` type to handle ID and MRN * ✅ update resource: registration_token * ✅ update resource: custom_policy * ✅ update resource: service_account * ✅ update resource: policy_assignment * ✅ update resource: querypack_assignment * ✅ update resource: space * ✅ update data-sources * ✅ update resource: integration_oci_tenant * ✅ update resource: integration_ms365 * ✅ update resource: integration_shodan * ✅ update resource: integration_github * 🧹 create generic ImportIntegration() * ✅ update resource: integration_gcp * ✅ update resource: integration_domain * ✅ update resource: integration_azure * ✅ update resource: integration_aws * ✅ update resource: integration_aws_serverless * ✅ update resource: framework_assignment * ✅ update resource: custom_querypack * ✅ update resource: custom_framework * 🤖 fix acceptance tests --------- Signed-off-by: Salim Afiune Maya <afiune@mondoo.com>
- Loading branch information
Showing
98 changed files
with
1,382 additions
and
1,127 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.