Skip to content

Commit

Permalink
reordered
Browse files Browse the repository at this point in the history
  • Loading branch information
tedkahwaji committed Oct 9, 2024
1 parent 0602dcd commit 4a44a0f
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions datadog/fwprovider/resource_datadog_integration_gcp.go
Original file line number Diff line number Diff line change
Expand Up @@ -295,10 +295,6 @@ func (r *integrationGcpResource) updateState(ctx context.Context, state *integra
state.ResourceCollectionEnabled = types.BoolValue(resp.GetResourceCollectionEnabled())
state.IsSecurityCommandCenterEnabled = types.BoolValue(resp.GetIsSecurityCommandCenterEnabled())

if runFilters, ok := resp.GetCloudRunRevisionFiltersOk(); ok && len(*runFilters) > 0 {
state.CloudRunRevisionFilters, _ = types.SetValueFrom(ctx, types.StringType, *runFilters)
}

// Non-computed values
if clientId, ok := resp.GetClientIdOk(); ok {
state.ClientId = types.StringValue(*clientId)
Expand All @@ -309,6 +305,9 @@ func (r *integrationGcpResource) updateState(ctx context.Context, state *integra
if privateKeyId, ok := resp.GetPrivateKeyIdOk(); ok {
state.PrivateKeyId = types.StringValue(*privateKeyId)
}
if runFilters, ok := resp.GetCloudRunRevisionFiltersOk(); ok && len(*runFilters) > 0 {
state.CloudRunRevisionFilters, _ = types.SetValueFrom(ctx, types.StringType, *runFilters)
}
}

func (r *integrationGcpResource) getGCPIntegration(state integrationGcpModel) (*datadogV1.GCPAccount, error) {
Expand Down

0 comments on commit 4a44a0f

Please sign in to comment.