Skip to content

Commit

Permalink
Explain .Mappable() has the same shape as NewTagConfig expected
Browse files Browse the repository at this point in the history
  • Loading branch information
iwahbe committed Aug 3, 2023
1 parent 16f0081 commit 579222f
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions provider/resources.go
Original file line number Diff line number Diff line change
Expand Up @@ -7152,6 +7152,15 @@ func applyTags(
return config, nil
}

// awsShim.NewTagConfig accepts (context.Context, i interface{}) where i can be
// one of map[string]interface{} among other types. .Mappable() produces a
// map[string]interface{} where every value is of type string. This is well
// handled by awsShim.NewTagConfig.
//
// config values are guaranteed to be of the correct type because they have
// already been seen and approved of by the provider, which verifies its
// configuration is well typed.

if defaults, ok := meta["defaultTags"]; ok {
if defaults.ContainsUnknowns() {
return unknown()
Expand Down

0 comments on commit 579222f

Please sign in to comment.