Skip to content

Conversation

@DavidePrette
Copy link

  • Implemented sendgrid_bounce_settings resource to manage bounce settings.
  • Added sendgrid_bounce_settings data source to retrieve current bounce settings.
  • Updated CHANGELOG.md to reflect new features.
  • Created documentation for both resource and data source.
  • Added tests for the new resource and data source.

- Implemented `sendgrid_bounce_settings` resource to manage bounce settings.
- Added `sendgrid_bounce_settings` data source to retrieve current bounce settings.
- Updated CHANGELOG.md to reflect new features.
- Created documentation for both resource and data source.
- Added tests for the new resource and data source.
Copy link
Owner

@kenzo0107 kenzo0107 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@DavidePrette Thank you for the pull request 🎉

The SendGrid client’s API handling is currently implemented in internal/provider/bounce_settings_client.go,
but all API-related logic should be implemented in kenzo0107/sendgrid.

Could you please move the implementation there instead?

Davide Prette added 3 commits October 9, 2025 14:17
- Remove internal bounce_settings_client.go implementation
- Update bounce_settings_data_source.go to use sendgrid.Client.GetBounceSettings()
- Update bounce_settings_resource.go to use sendgrid.Client.UpdateBounceSettings()
- Remove dependency on custom ExtendClient pattern and environment variable requirements
- Use local sendgrid library for testing via go.mod replace directive
- Simplify implementation by leveraging standardized sendgrid library methods

This migration moves the bounce settings API handling from the terraform provider
to the sendgrid library where all API-related logic should be implemented.
The replace directive was used for local testing and is not needed for production.
@DavidePrette
Copy link
Author

Implementation moved:
kenzo0107/sendgrid#69

@kenzo0107
Copy link
Owner

@DavidePrette
Regarding the following pull request:
kenzo0107/sendgrid#69

It currently only supports soft_bounces, but hard_bounces should also be supported as an optional parameter, and enabled needs to be required.

I have addressed these points in the following pull request:
kenzo0107/sendgrid#70

Also, although the default value for soft_bounces is set to 7 days, I couldn’t find a clear reason for that, so I believe it doesn’t need to be explicitly specified.

As for the validation of the number of days specified for soft_bounces, it seems best to leave that to the API response, so no validation is implemented on the provider side.

All of these updates have been handled in the following pull request:
#150

Your pull request greatly helped accelerate the development of the Bounce Settings feature.
I truly appreciate your contribution.

released by https://github.com/kenzo0107/terraform-provider-sendgrid/releases/tag/v2.4.0

@kenzo0107 kenzo0107 closed this Oct 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants