Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update gcm_channel upsert schema #37976

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
update gcm_channel upsert schema
  • Loading branch information
Liam Clarke committed Jun 14, 2024
commit 5bf298b6732e845e3d4888788f824fbf676df6b0
13 changes: 12 additions & 1 deletion internal/service/pinpoint/gcm_channel.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,23 @@ func ResourceGCMChannel() *schema.Resource {
},
"api_key": {
Type: schema.TypeString,
Required: true,
Required: false,
Sensitive: true,
},
"default_authentication_method": {
Type: schema.TypeString,
Required: true,
Default: "KEY",
},
names.AttrEnabled: {
Type: schema.TypeBool,
Optional: true,
Default: true,
},
"service_json": {
Type: schema.TypeString,
Required: false,
},
},
}
}
Expand All @@ -57,7 +66,9 @@ func resourceGCMChannelUpsert(ctx context.Context, d *schema.ResourceData, meta
params := &pinpoint.GCMChannelRequest{}

params.ApiKey = aws.String(d.Get("api_key").(string))
params.DefaultAuthenticationMethod = aws.String(d.Get("default_authentication_method").(string))
params.Enabled = aws.Bool(d.Get(names.AttrEnabled).(bool))
params.ServiceJson = aws.String(d.Get("service_json").(string))

req := pinpoint.UpdateGcmChannelInput{
ApplicationId: aws.String(applicationId),
Expand Down