Skip to content

Commit

Permalink
Merge pull request #41546 from dylanaxcelerate/b-aws_secrets_manager_…
Browse files Browse the repository at this point in the history
…random_password_fixed_exclude_characters_type

Fixed incorrect schema type for ephemeral aws_secrets_manager_random_…
  • Loading branch information
ewbankkit authored Mar 4, 2025
2 parents f5607a5 + 3d8df73 commit db3928d
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
3 changes: 3 additions & 0 deletions .changelog/41546.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:bug
ephemeral/aws_secrets_manager_random_password: Change `exclude_characters` from `Bool` to `String`
```
4 changes: 2 additions & 2 deletions internal/service/secretsmanager/random_password_ephemeral.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ type ephemeralRandomPassword struct {
func (e *ephemeralRandomPassword) Schema(ctx context.Context, req ephemeral.SchemaRequest, resp *ephemeral.SchemaResponse) {
resp.Schema = schema.Schema{
Attributes: map[string]schema.Attribute{
"exclude_characters": schema.BoolAttribute{
"exclude_characters": schema.StringAttribute{
Optional: true,
},
"exclude_lowercase": schema.BoolAttribute{
Expand Down Expand Up @@ -94,7 +94,7 @@ func (e *ephemeralRandomPassword) Open(ctx context.Context, req ephemeral.OpenRe
}

type ephemeralRandomPasswordModel struct {
ExcludeCharacters types.Bool `tfsdk:"exclude_characters"`
ExcludeCharacters types.String `tfsdk:"exclude_characters"`
ExcludeLowercase types.Bool `tfsdk:"exclude_lowercase"`
ExcludeNumbers types.Bool `tfsdk:"exclude_numbers"`
ExcludePunctuation types.Bool `tfsdk:"exclude_punctuation"`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,12 @@ func testAccRandomPasswordEphemeralResourceConfig_basic() string {
return acctest.ConfigCompose(
acctest.ConfigWithEchoProvider("ephemeral.aws_secretsmanager_random_password.test"),
`
ephemeral "aws_secretsmanager_random_password" "test" {}
ephemeral "aws_secretsmanager_random_password" "test" {
password_length = 40
exclude_characters = "abc"
exclude_numbers = true
exclude_uppercase = true
exclude_punctuation = true
}
`)
}

0 comments on commit db3928d

Please sign in to comment.