Skip to content

Commit 608bd6b

Browse files
Add Resource OrganizationEventThreatDetectionCustomModule (#10769) (#18317)
[upstream:00dddb9762ed27beba42df87aa6f2a6a77b575c7] Signed-off-by: Modular Magician <magic-modules@google.com>
1 parent 3ea3807 commit 608bd6b

13 files changed

+1597
-648
lines changed

.teamcity/components/inputs/services_beta.kt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -616,6 +616,11 @@ var ServicesListBeta = mapOf(
616616
"displayName" to "Securitycenter",
617617
"path" to "./google-beta/services/securitycenter"
618618
),
619+
"securitycentermanagement" to mapOf(
620+
"name" to "securitycentermanagement",
621+
"displayName" to "Securitycentermanagement",
622+
"path" to "./google-beta/services/securitycentermanagement"
623+
),
619624
"securityposture" to mapOf(
620625
"name" to "securityposture",
621626
"displayName" to "Securityposture",

.teamcity/components/inputs/services_ga.kt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -611,6 +611,11 @@ var ServicesListGa = mapOf(
611611
"displayName" to "Securitycenter",
612612
"path" to "./google/services/securitycenter"
613613
),
614+
"securitycentermanagement" to mapOf(
615+
"name" to "securitycentermanagement",
616+
"displayName" to "Securitycentermanagement",
617+
"path" to "./google/services/securitycentermanagement"
618+
),
614619
"securityposture" to mapOf(
615620
"name" to "securityposture",
616621
"displayName" to "Securityposture",

google/fwmodels/provider_model.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,7 @@ type ProviderModel struct {
127127
SecretManagerCustomEndpoint types.String `tfsdk:"secret_manager_custom_endpoint"`
128128
SecureSourceManagerCustomEndpoint types.String `tfsdk:"secure_source_manager_custom_endpoint"`
129129
SecurityCenterCustomEndpoint types.String `tfsdk:"security_center_custom_endpoint"`
130+
SecurityCenterManagementCustomEndpoint types.String `tfsdk:"security_center_management_custom_endpoint"`
130131
SecuritypostureCustomEndpoint types.String `tfsdk:"securityposture_custom_endpoint"`
131132
ServiceManagementCustomEndpoint types.String `tfsdk:"service_management_custom_endpoint"`
132133
ServiceUsageCustomEndpoint types.String `tfsdk:"service_usage_custom_endpoint"`

google/fwprovider/framework_provider.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -738,6 +738,12 @@ func (p *FrameworkProvider) Schema(_ context.Context, _ provider.SchemaRequest,
738738
transport_tpg.CustomEndpointValidator(),
739739
},
740740
},
741+
"security_center_management_custom_endpoint": &schema.StringAttribute{
742+
Optional: true,
743+
Validators: []validator.String{
744+
transport_tpg.CustomEndpointValidator(),
745+
},
746+
},
741747
"securityposture_custom_endpoint": &schema.StringAttribute{
742748
Optional: true,
743749
Validators: []validator.String{

google/fwtransport/framework_config.go

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,7 @@ type FrameworkProviderConfig struct {
150150
SecretManagerBasePath string
151151
SecureSourceManagerBasePath string
152152
SecurityCenterBasePath string
153+
SecurityCenterManagementBasePath string
153154
SecuritypostureBasePath string
154155
ServiceManagementBasePath string
155156
ServiceUsageBasePath string
@@ -304,6 +305,7 @@ func (p *FrameworkProviderConfig) LoadAndValidateFramework(ctx context.Context,
304305
p.SecretManagerBasePath = data.SecretManagerCustomEndpoint.ValueString()
305306
p.SecureSourceManagerBasePath = data.SecureSourceManagerCustomEndpoint.ValueString()
306307
p.SecurityCenterBasePath = data.SecurityCenterCustomEndpoint.ValueString()
308+
p.SecurityCenterManagementBasePath = data.SecurityCenterManagementCustomEndpoint.ValueString()
307309
p.SecuritypostureBasePath = data.SecuritypostureCustomEndpoint.ValueString()
308310
p.ServiceManagementBasePath = data.ServiceManagementCustomEndpoint.ValueString()
309311
p.ServiceUsageBasePath = data.ServiceUsageCustomEndpoint.ValueString()
@@ -1239,6 +1241,14 @@ func (p *FrameworkProviderConfig) HandleDefaults(ctx context.Context, data *fwmo
12391241
data.SecurityCenterCustomEndpoint = types.StringValue(customEndpoint.(string))
12401242
}
12411243
}
1244+
if data.SecurityCenterManagementCustomEndpoint.IsNull() {
1245+
customEndpoint := transport_tpg.MultiEnvDefault([]string{
1246+
"GOOGLE_SECURITY_CENTER_MANAGEMENT_CUSTOM_ENDPOINT",
1247+
}, transport_tpg.DefaultBasePaths[transport_tpg.SecurityCenterManagementBasePathKey])
1248+
if customEndpoint != nil {
1249+
data.SecurityCenterManagementCustomEndpoint = types.StringValue(customEndpoint.(string))
1250+
}
1251+
}
12421252
if data.SecuritypostureCustomEndpoint.IsNull() {
12431253
customEndpoint := transport_tpg.MultiEnvDefault([]string{
12441254
"GOOGLE_SECURITYPOSTURE_CUSTOM_ENDPOINT",

google/provider/provider.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -639,6 +639,11 @@ func Provider() *schema.Provider {
639639
Optional: true,
640640
ValidateFunc: transport_tpg.ValidateCustomEndpoint,
641641
},
642+
"security_center_management_custom_endpoint": {
643+
Type: schema.TypeString,
644+
Optional: true,
645+
ValidateFunc: transport_tpg.ValidateCustomEndpoint,
646+
},
642647
"securityposture_custom_endpoint": {
643648
Type: schema.TypeString,
644649
Optional: true,
@@ -1010,6 +1015,7 @@ func ProviderConfigure(ctx context.Context, d *schema.ResourceData, p *schema.Pr
10101015
config.SecretManagerBasePath = d.Get("secret_manager_custom_endpoint").(string)
10111016
config.SecureSourceManagerBasePath = d.Get("secure_source_manager_custom_endpoint").(string)
10121017
config.SecurityCenterBasePath = d.Get("security_center_custom_endpoint").(string)
1018+
config.SecurityCenterManagementBasePath = d.Get("security_center_management_custom_endpoint").(string)
10131019
config.SecuritypostureBasePath = d.Get("securityposture_custom_endpoint").(string)
10141020
config.ServiceManagementBasePath = d.Get("service_management_custom_endpoint").(string)
10151021
config.ServiceUsageBasePath = d.Get("service_usage_custom_endpoint").(string)

0 commit comments

Comments
 (0)