Skip to content

Commit

Permalink
Inspec project_metric
Browse files Browse the repository at this point in the history
Signed-off-by: Modular Magician <[email protected]>
  • Loading branch information
slevenick authored and modular-magician committed Jan 22, 2020
1 parent bcfa887 commit 6d99043
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions google/logging_metric.go
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,13 @@ func expandLoggingMetricMetricDescriptor(v interface{}, d TerraformResourceData,
transformed["displayName"] = transformedDisplayName
}

transformedType, err := expandLoggingMetricMetricDescriptorType(original["type"], d, config)
if err != nil {
return nil, err
} else if val := reflect.ValueOf(transformedType); val.IsValid() && !isEmptyValue(val) {
transformed["type"] = transformedType
}

return transformed, nil
}

Expand Down Expand Up @@ -213,6 +220,10 @@ func expandLoggingMetricMetricDescriptorDisplayName(v interface{}, d TerraformRe
return v, nil
}

func expandLoggingMetricMetricDescriptorType(v interface{}, d TerraformResourceData, config *Config) (interface{}, error) {
return v, nil
}

func expandLoggingMetricLabelExtractors(v interface{}, d TerraformResourceData, config *Config) (map[string]string, error) {
if v == nil {
return map[string]string{}, nil
Expand Down

0 comments on commit 6d99043

Please sign in to comment.