-
Notifications
You must be signed in to change notification settings - Fork 137
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
feat(fastly_integration): implement resource and documentation #844
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is great!
I'm approving to unblock, but I do have a couple of suggested edits...
docs/resources/integration.md
Outdated
# IMPORTANT: mailing list integrations require confirmation. | ||
# To send a confirmation email and verify integration status, | ||
# after applying changes using Terraform, please visit | ||
# https://manage.fastly.com/observability/alerts/integrations |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Out of interest, what is the workflow like for a user who sets up this new resource but doesn't then confirm via email? Will the Fastly API eventually return an API error that will result in a new plan diff when the user runs terraform plan
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good question. It would likely be confusing for users who don't know about the extra step. To improve that experience, I added a diagnostic warning that will appear after applying or refreshing when there's an unconfirmed mailing list integration.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The Fastly API does not eventually return an API error; that resource just exists with one of several unconfirmed statuses needs_confirmation
, confirmation_pending
, or confirmation_expired
. A further potential enhancement would be for Fastly Terraform provider to request a confirmation email automatically and save the user from having to visit a UI, which would simplify the workflow if the Terraform user doesn't have a Fastly login. There's a little complexity with where to put such a hook though to deduplicate the requests per email address for the case when there are multiple mailing list integrations with the same address.
Co-authored-by: Mark McDonnell <Integralist@users.noreply.github.com>
…for unconfirmed mailing list integration, flag config field as sensitive to hide values in cli output
0410592
to
e21aefd
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Just one requested change please before we merge...
Co-authored-by: Mark McDonnell <Integralist@users.noreply.github.com>
This PR implements a new
fastly_integration
resource.