-
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
Added Disabled to Route 53 health check resource #8939
Added Disabled to Route 53 health check resource #8939
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.
Hi @Glen-Moonpig 👋 This is off to a great start -- we just need to introduce covering acceptance testing that verifies it can be disabled on creation and that updates occur as expected. Please reach out if you have any questions or do not have time to implement the feedback. 👍
@@ -279,6 +279,7 @@ resource "aws_route53_health_check" "foo" { | |||
request_interval = "30" | |||
measure_latency = true | |||
invert_healthcheck = true | |||
disabled = false |
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.
To ensure we are not introducing any regressions (unlikely given the implementation here, but as a good practice), could we leave the existing test configurations without these changes and introduce a new acceptance test with its own configuration that verifies the new functionality? e.g.
func TestAccAWSRoute53HealthCheck_Disabled(t *testing.T) {
resourceName := "aws_route53_health_check.test"
resource.ParallelTest(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
Providers: testAccProviders,
CheckDestroy: testAccCheckRoute53HealthCheckDestroy,
Steps: []resource.TestStep{
{
Config: testAccRoute53HealthCheckConfigDisabled(true),
Check: resource.ComposeTestCheckFunc(
testAccCheckRoute53HealthCheckExists(resourceName),
resource.TestCheckResourceAttr(resourceName, "disabled", "true"),
),
},
{
ResourceName: resourceName,
ImportState: true,
ImportStateVerify: true,
},
{
Config: testAccRoute53HealthCheckConfigDisabled(false),
Check: resource.ComposeTestCheckFunc(
testAccCheckRoute53HealthCheckExists(resourceName),
resource.TestCheckResourceAttr(resourceName, "disabled", "false"),
),
},
{
Config: testAccRoute53HealthCheckConfigDisabled(true),
Check: resource.ComposeTestCheckFunc(
testAccCheckRoute53HealthCheckExists(resourceName),
resource.TestCheckResourceAttr(resourceName, "disabled", "true"),
),
},
},
})
}
func testAccRoute53HealthCheckConfigDisabled(disabled bool) string {
return fmt.Sprintf(`
resource "aws_route53_health_check" "test" {
disabled = %[1]t
failure_threshold = "2"
fqdn = "dev.notexample.com"
port = 80
request_interval = "30"
resource_path = "/"
type = "HTTP"
}
`, disabled)
Hi again 👋 Since we haven't heard back, we are going to close this pull request for now. If anyone is still interested in this change, please submit a new pull request and we will take a fresh look. Thanks. |
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! |
Community Note
Fixes #8937
Closes #10117
Release note for CHANGELOG:
Output from acceptance testing: