-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
r/lb_target_group: Respect threshold & interval for TCP LBs #2323
Conversation
aws/resource_aws_lb_target_group.go
Outdated
} | ||
|
||
healthCheckProtocol := strings.ToLower(healthCheck["protocol"].(string)) | ||
|
||
if !d.IsNewResource() && d.HasChange("health_check.0.interval") && healthCheckProtocol == "tcp" { |
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.
From our chat just now I learned that ResourceDiff.ForceNew
doesn't accept dot-separated paths like this and that's why you are doing this check in here.
The downside of doing it in here is that it won't fail until apply time. A possible compromise is to do this check inside CustomizeDiff
and have it return an error (rather than calling ForceNew
) if it detects a change like this. That way it will fail during plan time rather than apply time.
Not ideal of course, but I think better than generating a plan successfully and then bailing out partway through apply.
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.
Ha, that's a good idea actually 🤔 I'll change it.
50b153c
to
f59a59c
Compare
f59a59c
to
77cd556
Compare
Curious why we didn't use the customize diff to mark the attribute as |
@catsby this is because |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks! |
Something I noticed when reading #2170
Although most issues were solved in #2251 we also (IMO unintentionally) ignored
UnhealthyThresholdCount
and interval.Interval cannot be updated after initial creation, so I just added appropriate error message after pondering with
CustomizeDiff
and realizing that it doesn't work for nested fields (yet) 😞Closes #2170
Test results