Skip to content

Commit e5527c4

Browse files
Notifcation config (#10817) (#18594)
[upstream:eff19adf97250c0d62e8c417e9d7cefb60203f35] Signed-off-by: Modular Magician <[email protected]>
1 parent 8ed3269 commit e5527c4

15 files changed

+1059
-2
lines changed

.changelog/10817.txt

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
```release-note:new-resource
2+
`google_scc_v2_organization_notification_config`
3+
```

.teamcity/components/inputs/services_beta.kt

+5
Original file line numberDiff line numberDiff line change
@@ -626,6 +626,11 @@ var ServicesListBeta = mapOf(
626626
"displayName" to "Securitycentermanagement",
627627
"path" to "./google-beta/services/securitycentermanagement"
628628
),
629+
"securitycenterv2" to mapOf(
630+
"name" to "securitycenterv2",
631+
"displayName" to "securitycenterv2",
632+
"path" to "./google-beta/services/securitycenterv2"
633+
),
629634
"securityposture" to mapOf(
630635
"name" to "securityposture",
631636
"displayName" to "Securityposture",

.teamcity/components/inputs/services_ga.kt

+5
Original file line numberDiff line numberDiff line change
@@ -621,6 +621,11 @@ var ServicesListGa = mapOf(
621621
"displayName" to "Securitycentermanagement",
622622
"path" to "./google/services/securitycentermanagement"
623623
),
624+
"securitycenterv2" to mapOf(
625+
"name" to "securitycenterv2",
626+
"displayName" to "securitycenterv2",
627+
"path" to "./google/services/securitycenterv2"
628+
),
624629
"securityposture" to mapOf(
625630
"name" to "securityposture",
626631
"displayName" to "Securityposture",

google/fwmodels/provider_model.go

+1
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,7 @@ type ProviderModel struct {
129129
SecureSourceManagerCustomEndpoint types.String `tfsdk:"secure_source_manager_custom_endpoint"`
130130
SecurityCenterCustomEndpoint types.String `tfsdk:"security_center_custom_endpoint"`
131131
SecurityCenterManagementCustomEndpoint types.String `tfsdk:"security_center_management_custom_endpoint"`
132+
SecurityCenterV2CustomEndpoint types.String `tfsdk:"security_center_v2_custom_endpoint"`
132133
SecuritypostureCustomEndpoint types.String `tfsdk:"securityposture_custom_endpoint"`
133134
ServiceManagementCustomEndpoint types.String `tfsdk:"service_management_custom_endpoint"`
134135
ServiceNetworkingCustomEndpoint types.String `tfsdk:"service_networking_custom_endpoint"`

google/fwprovider/framework_provider.go

+6
Original file line numberDiff line numberDiff line change
@@ -750,6 +750,12 @@ func (p *FrameworkProvider) Schema(_ context.Context, _ provider.SchemaRequest,
750750
transport_tpg.CustomEndpointValidator(),
751751
},
752752
},
753+
"security_center_v2_custom_endpoint": &schema.StringAttribute{
754+
Optional: true,
755+
Validators: []validator.String{
756+
transport_tpg.CustomEndpointValidator(),
757+
},
758+
},
753759
"securityposture_custom_endpoint": &schema.StringAttribute{
754760
Optional: true,
755761
Validators: []validator.String{

google/fwtransport/framework_config.go

+10
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,7 @@ type FrameworkProviderConfig struct {
152152
SecureSourceManagerBasePath string
153153
SecurityCenterBasePath string
154154
SecurityCenterManagementBasePath string
155+
SecurityCenterV2BasePath string
155156
SecuritypostureBasePath string
156157
ServiceManagementBasePath string
157158
ServiceNetworkingBasePath string
@@ -309,6 +310,7 @@ func (p *FrameworkProviderConfig) LoadAndValidateFramework(ctx context.Context,
309310
p.SecureSourceManagerBasePath = data.SecureSourceManagerCustomEndpoint.ValueString()
310311
p.SecurityCenterBasePath = data.SecurityCenterCustomEndpoint.ValueString()
311312
p.SecurityCenterManagementBasePath = data.SecurityCenterManagementCustomEndpoint.ValueString()
313+
p.SecurityCenterV2BasePath = data.SecurityCenterV2CustomEndpoint.ValueString()
312314
p.SecuritypostureBasePath = data.SecuritypostureCustomEndpoint.ValueString()
313315
p.ServiceManagementBasePath = data.ServiceManagementCustomEndpoint.ValueString()
314316
p.ServiceNetworkingBasePath = data.ServiceNetworkingCustomEndpoint.ValueString()
@@ -1261,6 +1263,14 @@ func (p *FrameworkProviderConfig) HandleDefaults(ctx context.Context, data *fwmo
12611263
data.SecurityCenterManagementCustomEndpoint = types.StringValue(customEndpoint.(string))
12621264
}
12631265
}
1266+
if data.SecurityCenterV2CustomEndpoint.IsNull() {
1267+
customEndpoint := transport_tpg.MultiEnvDefault([]string{
1268+
"GOOGLE_SECURITY_CENTER_V2_CUSTOM_ENDPOINT",
1269+
}, transport_tpg.DefaultBasePaths[transport_tpg.SecurityCenterV2BasePathKey])
1270+
if customEndpoint != nil {
1271+
data.SecurityCenterV2CustomEndpoint = types.StringValue(customEndpoint.(string))
1272+
}
1273+
}
12641274
if data.SecuritypostureCustomEndpoint.IsNull() {
12651275
customEndpoint := transport_tpg.MultiEnvDefault([]string{
12661276
"GOOGLE_SECURITYPOSTURE_CUSTOM_ENDPOINT",

google/provider/provider.go

+6
Original file line numberDiff line numberDiff line change
@@ -649,6 +649,11 @@ func Provider() *schema.Provider {
649649
Optional: true,
650650
ValidateFunc: transport_tpg.ValidateCustomEndpoint,
651651
},
652+
"security_center_v2_custom_endpoint": {
653+
Type: schema.TypeString,
654+
Optional: true,
655+
ValidateFunc: transport_tpg.ValidateCustomEndpoint,
656+
},
652657
"securityposture_custom_endpoint": {
653658
Type: schema.TypeString,
654659
Optional: true,
@@ -1027,6 +1032,7 @@ func ProviderConfigure(ctx context.Context, d *schema.ResourceData, p *schema.Pr
10271032
config.SecureSourceManagerBasePath = d.Get("secure_source_manager_custom_endpoint").(string)
10281033
config.SecurityCenterBasePath = d.Get("security_center_custom_endpoint").(string)
10291034
config.SecurityCenterManagementBasePath = d.Get("security_center_management_custom_endpoint").(string)
1035+
config.SecurityCenterV2BasePath = d.Get("security_center_v2_custom_endpoint").(string)
10301036
config.SecuritypostureBasePath = d.Get("securityposture_custom_endpoint").(string)
10311037
config.ServiceManagementBasePath = d.Get("service_management_custom_endpoint").(string)
10321038
config.ServiceNetworkingBasePath = d.Get("service_networking_custom_endpoint").(string)

google/provider/provider_mmv1_resources.go

+4-2
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,7 @@ import (
105105
"github.com/hashicorp/terraform-provider-google/google/services/securesourcemanager"
106106
"github.com/hashicorp/terraform-provider-google/google/services/securitycenter"
107107
"github.com/hashicorp/terraform-provider-google/google/services/securitycentermanagement"
108+
"github.com/hashicorp/terraform-provider-google/google/services/securitycenterv2"
108109
"github.com/hashicorp/terraform-provider-google/google/services/securityposture"
109110
"github.com/hashicorp/terraform-provider-google/google/services/servicemanagement"
110111
"github.com/hashicorp/terraform-provider-google/google/services/servicenetworking"
@@ -416,9 +417,9 @@ var handwrittenIAMDatasources = map[string]*schema.Resource{
416417
}
417418

418419
// Resources
419-
// Generated resources: 430
420+
// Generated resources: 431
420421
// Generated IAM resources: 252
421-
// Total generated resources: 682
422+
// Total generated resources: 683
422423
var generatedResources = map[string]*schema.Resource{
423424
"google_folder_access_approval_settings": accessapproval.ResourceAccessApprovalFolderSettings(),
424425
"google_organization_access_approval_settings": accessapproval.ResourceAccessApprovalOrganizationSettings(),
@@ -1016,6 +1017,7 @@ var generatedResources = map[string]*schema.Resource{
10161017
"google_scc_management_organization_event_threat_detection_custom_module": securitycentermanagement.ResourceSecurityCenterManagementOrganizationEventThreatDetectionCustomModule(),
10171018
"google_scc_management_organization_security_health_analytics_custom_module": securitycentermanagement.ResourceSecurityCenterManagementOrganizationSecurityHealthAnalyticsCustomModule(),
10181019
"google_scc_management_project_security_health_analytics_custom_module": securitycentermanagement.ResourceSecurityCenterManagementProjectSecurityHealthAnalyticsCustomModule(),
1020+
"google_scc_v2_organization_notification_config": securitycenterv2.ResourceSecurityCenterV2OrganizationNotificationConfig(),
10191021
"google_securityposture_posture": securityposture.ResourceSecurityposturePosture(),
10201022
"google_securityposture_posture_deployment": securityposture.ResourceSecurityposturePostureDeployment(),
10211023
"google_endpoints_service_iam_binding": tpgiamresource.ResourceIamBinding(servicemanagement.ServiceManagementServiceIamSchema, servicemanagement.ServiceManagementServiceIamUpdaterProducer, servicemanagement.ServiceManagementServiceIdParseFunc),

0 commit comments

Comments
 (0)