Skip to content

Commit

Permalink
add enforce_in_transit field in google_pubsub_topic (#12716) (#3311)
Browse files Browse the repository at this point in the history
[upstream:47353838db00bc219c8d1c5df636674b117732e8]

Signed-off-by: Modular Magician <[email protected]>
  • Loading branch information
modular-magician authored Jan 15, 2025
1 parent 444c050 commit ddc4ebb
Showing 1 changed file with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -129,13 +129,24 @@ func expandPubsubTopicMessageStoragePolicy(v interface{}, d tpgresource.Terrafor
transformed["allowedPersistenceRegions"] = transformedAllowedPersistenceRegions
}

transformedEnforceInTransit, err := expandPubsubTopicMessageStoragePolicyEnforceInTransit(original["enforce_in_transit"], d, config)
if err != nil {
return nil, err
} else if val := reflect.ValueOf(transformedEnforceInTransit); val.IsValid() && !tpgresource.IsEmptyValue(val) {
transformed["enforceInTransit"] = transformedEnforceInTransit
}

return transformed, nil
}

func expandPubsubTopicMessageStoragePolicyAllowedPersistenceRegions(v interface{}, d tpgresource.TerraformResourceData, config *transport_tpg.Config) (interface{}, error) {
return v, nil
}

func expandPubsubTopicMessageStoragePolicyEnforceInTransit(v interface{}, d tpgresource.TerraformResourceData, config *transport_tpg.Config) (interface{}, error) {
return v, nil
}

func expandPubsubTopicSchemaSettings(v interface{}, d tpgresource.TerraformResourceData, config *transport_tpg.Config) (interface{}, error) {
l := v.([]interface{})
if len(l) == 0 || l[0] == nil {
Expand Down

0 comments on commit ddc4ebb

Please sign in to comment.