Skip to content
This repository has been archived by the owner on Nov 27, 2024. It is now read-only.

Commit

Permalink
Add Retention Duration to google_pubsub_topic (#5347) (#365)
Browse files Browse the repository at this point in the history
Co-authored-by: upodroid <cy@borg.dev>
Signed-off-by: Modular Magician <magic-modules@google.com>

Co-authored-by: upodroid <cy@borg.dev>
  • Loading branch information
modular-magician and upodroid authored Nov 4, 2021
1 parent 568a111 commit 21cb558
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions converters/google/resources/pubsub_topic.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,12 @@ func GetPubsubTopicApiObject(d TerraformResourceData, config *Config) (map[strin
} else if v, ok := d.GetOkExists("schema_settings"); !isEmptyValue(reflect.ValueOf(schemaSettingsProp)) && (ok || !reflect.DeepEqual(v, schemaSettingsProp)) {
obj["schemaSettings"] = schemaSettingsProp
}
messageRetentionDurationProp, err := expandPubsubTopicMessageRetentionDuration(d.Get("message_retention_duration"), d, config)
if err != nil {
return nil, err
} else if v, ok := d.GetOkExists("message_retention_duration"); !isEmptyValue(reflect.ValueOf(messageRetentionDurationProp)) && (ok || !reflect.DeepEqual(v, messageRetentionDurationProp)) {
obj["messageRetentionDuration"] = messageRetentionDurationProp
}

return resourcePubsubTopicEncoder(d, config, obj)
}
Expand Down Expand Up @@ -162,3 +168,7 @@ func expandPubsubTopicSchemaSettingsSchema(v interface{}, d TerraformResourceDat
func expandPubsubTopicSchemaSettingsEncoding(v interface{}, d TerraformResourceData, config *Config) (interface{}, error) {
return v, nil
}

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

0 comments on commit 21cb558

Please sign in to comment.