From df1c9c334ef7b52ea8805519c677d6fc14dd8d80 Mon Sep 17 00:00:00 2001 From: DanamoCP Date: Sun, 29 Sep 2024 12:43:26 +0300 Subject: [PATCH] AL-2889 - Add SSE CMK scan support to Azure org (#226) --- ...ource_dome9_azure_organization_onboarding.go | 4 ++++ ...ource_dome9_azure_organization_onboarding.go | 17 ++++++++++++++--- go.mod | 2 +- go.sum | 4 ++-- .../cloudaccounts/azure_org/azure_org.go | 7 ++++--- vendor/modules.txt | 2 +- .../azure_organization_onboarding.html.markdown | 1 + .../azure_organization_onboarding.html.markdown | 1 + 8 files changed, 28 insertions(+), 10 deletions(-) diff --git a/dome9/data_source_dome9_azure_organization_onboarding.go b/dome9/data_source_dome9_azure_organization_onboarding.go index 457d903c..ea93f7a7 100644 --- a/dome9/data_source_dome9_azure_organization_onboarding.go +++ b/dome9/data_source_dome9_azure_organization_onboarding.go @@ -92,6 +92,10 @@ func dataSourceAzureOrganizationOnboarding() *schema.Resource { Type: schema.TypeBool, Computed: true, }, + "with_sse_cmk_encrypted_disks_scan": { + Type: schema.TypeBool, + Computed: true, + }, }, }, }, diff --git a/dome9/resource_dome9_azure_organization_onboarding.go b/dome9/resource_dome9_azure_organization_onboarding.go index baed391e..94470bb7 100644 --- a/dome9/resource_dome9_azure_organization_onboarding.go +++ b/dome9/resource_dome9_azure_organization_onboarding.go @@ -86,6 +86,11 @@ func resourceAzureOrganizationOnboarding() *schema.Resource { Optional: true, Default: false, }, + "with_sse_cmk_encrypted_disks_scan": { + Type: schema.TypeBool, + Optional: true, + Default: false, + }, }, }, }, @@ -229,6 +234,11 @@ func resourceAzureOrganizationOnboarding() *schema.Resource { Optional: true, Default: false, }, + "with_sse_cmk_encrypted_disks_scan": { + Type: schema.TypeBool, + Optional: true, + Default: false, + }, }, }, }, @@ -392,9 +402,10 @@ func expandAzureOrganizationOnboardingRequest(d *schema.ResourceData) azure_org. BladeConfiguration: azure_org.BladeConfiguration{ IsEnabled: awp["is_enabled"].(bool), }, - OnboardingMode: azure_org.AwpOnboardingMode(awp["onboarding_mode"].(string)), - CentralizedSubscriptionId: awp["centralized_subscription_id"].(string), - WithFunctionAppsScan: awp["with_function_apps_scan"].(bool), + OnboardingMode: azure_org.AwpOnboardingMode(awp["onboarding_mode"].(string)), + CentralizedSubscriptionId: awp["centralized_subscription_id"].(string), + WithFunctionAppsScan: awp["with_function_apps_scan"].(bool), + WithSseCmkEncryptedDisksScan: awp["with_sse_cmk_encrypted_disks_scan"].(bool), }, Serverless: azure_org.ServerlessConfiguration{ BladeConfiguration: azure_org.BladeConfiguration{ diff --git a/go.mod b/go.mod index 574fdacc..78c8fb1e 100644 --- a/go.mod +++ b/go.mod @@ -3,7 +3,7 @@ module github.com/terraform-providers/terraform-provider-dome9 go 1.19 require ( - github.com/dome9/dome9-sdk-go v1.23.8 + github.com/dome9/dome9-sdk-go v1.23.9 github.com/google/uuid v1.1.2 github.com/hashicorp/terraform-plugin-sdk v1.17.2 ) diff --git a/go.sum b/go.sum index 35246c68..df942922 100644 --- a/go.sum +++ b/go.sum @@ -83,8 +83,8 @@ github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ3 github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/dome9/dome9-sdk-go v1.23.8 h1:rUBwNzY5NFRAU/RLIDa92Mp0QR9GCFRyYRK81Nm+Tg8= -github.com/dome9/dome9-sdk-go v1.23.8/go.mod h1:mfA4+mIM0SmqGGBfbQSOhOi/KW0uV5WW7ozIHug4NKQ= +github.com/dome9/dome9-sdk-go v1.23.9 h1:KX8/7gU5Um4WYikGXeLkSS37Ra9hbAUaRgJKbMoz2zE= +github.com/dome9/dome9-sdk-go v1.23.9/go.mod h1:mfA4+mIM0SmqGGBfbQSOhOi/KW0uV5WW7ozIHug4NKQ= github.com/emirpasic/gods v1.12.0 h1:QAUIPSaCu4G+POclxeqb3F+WPpdKqFGlw36+yOzGlrg= github.com/emirpasic/gods v1.12.0/go.mod h1:YfzfFFoVP/catgzJb4IKIqXjX78Ha8FMSDh3ymbK86o= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= diff --git a/vendor/github.com/dome9/dome9-sdk-go/services/cloudaccounts/azure_org/azure_org.go b/vendor/github.com/dome9/dome9-sdk-go/services/cloudaccounts/azure_org/azure_org.go index 00bc3cc6..f11b9824 100644 --- a/vendor/github.com/dome9/dome9-sdk-go/services/cloudaccounts/azure_org/azure_org.go +++ b/vendor/github.com/dome9/dome9-sdk-go/services/cloudaccounts/azure_org/azure_org.go @@ -36,9 +36,10 @@ type BladeConfiguration struct { type AwpConfiguration struct { BladeConfiguration - OnboardingMode AwpOnboardingMode `json:"onboardingMode"` - CentralizedSubscriptionId string `json:"centralizedSubscriptionId,omitempty"` - WithFunctionAppsScan bool `json:"withFunctionAppsScan"` + OnboardingMode AwpOnboardingMode `json:"onboardingMode"` + CentralizedSubscriptionId string `json:"centralizedSubscriptionId,omitempty"` + WithFunctionAppsScan bool `json:"withFunctionAppsScan"` + WithSseCmkEncryptedDisksScan bool `json:"withSseCmkEncryptedDisksScan"` } type ServerlessConfiguration struct { diff --git a/vendor/modules.txt b/vendor/modules.txt index ee215af6..c67abf45 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -94,7 +94,7 @@ github.com/bgentry/speakeasy # github.com/davecgh/go-spew v1.1.1 ## explicit github.com/davecgh/go-spew/spew -# github.com/dome9/dome9-sdk-go v1.23.8 +# github.com/dome9/dome9-sdk-go v1.23.9 ## explicit; go 1.19 github.com/dome9/dome9-sdk-go/dome9 github.com/dome9/dome9-sdk-go/dome9/client diff --git a/website/docs/d/azure_organization_onboarding.html.markdown b/website/docs/d/azure_organization_onboarding.html.markdown index 1dbed30c..6ea9fc83 100644 --- a/website/docs/d/azure_organization_onboarding.html.markdown +++ b/website/docs/d/azure_organization_onboarding.html.markdown @@ -44,6 +44,7 @@ The following arguments are supported: * `onboarding_mode` - Onboarding mode. Can be: `saas`, `inAccount`, `inAccountHub`. * `centralized_subscription_id` - Centralized subscription ID. * `with_function_apps_scan` - Boolean flag to enable function apps scan. + * `with_sse_cmk_encrypted_disks_scan` - (Optional) Boolean flag to enable sse cmk scan. Default: `false`. * `serverless_configuration` - Serverless configuration. * `is_enabled` - Boolean flag to enable serverless protection. * `accounts` - List of serverless accounts. diff --git a/website/docs/r/azure_organization_onboarding.html.markdown b/website/docs/r/azure_organization_onboarding.html.markdown index c6b6654e..b8ae0dc4 100644 --- a/website/docs/r/azure_organization_onboarding.html.markdown +++ b/website/docs/r/azure_organization_onboarding.html.markdown @@ -94,6 +94,7 @@ The following arguments are supported: * `onboarding_mode` - (Optional) Onboarding mode. Can be: `saas`, `inAccount`, `inAccountHub`. * `centralized_subscription_id` - (Optional) Centralized subscription ID. * `with_function_apps_scan` - (Optional) Boolean flag to enable function apps scan. + * `with_sse_cmk_encrypted_disks_scan` - (Optional) Boolean flag to enable sse cmk apps scan. * `cdr` - (Required) CloudGuard Data Protection configuration. * `is_enabled` - (Required) Boolean flag to enable CloudGuard Data Protection. * `accounts` - (Optional) List of storage accounts.