Skip to content

Commit

Permalink
AL-2889 - Add SSE CMK scan support to Azure org (#226)
Browse files Browse the repository at this point in the history
  • Loading branch information
DanamoCP authored Sep 29, 2024
1 parent ce3d209 commit df1c9c3
Show file tree
Hide file tree
Showing 8 changed files with 28 additions and 10 deletions.
4 changes: 4 additions & 0 deletions dome9/data_source_dome9_azure_organization_onboarding.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,10 @@ func dataSourceAzureOrganizationOnboarding() *schema.Resource {
Type: schema.TypeBool,
Computed: true,
},
"with_sse_cmk_encrypted_disks_scan": {
Type: schema.TypeBool,
Computed: true,
},
},
},
},
Expand Down
17 changes: 14 additions & 3 deletions dome9/resource_dome9_azure_organization_onboarding.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
},
},
},
},
Expand Down Expand Up @@ -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,
},
},
},
},
Expand Down Expand Up @@ -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{
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -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
)
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -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=
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion vendor/modules.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions website/docs/d/azure_organization_onboarding.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
1 change: 1 addition & 0 deletions website/docs/r/azure_organization_onboarding.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit df1c9c3

Please sign in to comment.