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

r/aws_applicationinsights_application: ACTIVE is a valid create target status #36615

Merged
merged 1 commit into from
Mar 27, 2024

Commits on Mar 27, 2024

  1. r/aws_applicationinsights_application: ACTIVE is a valid create targe…

    …t status
    
    In some configurations with `auto_config_enabled = true`, intermittent errors are observed waiting for application creation.
    
    ```
    │ Error: waiting for ApplicationInsights Application (example) create: unexpected state 'ACTIVE', wanted target 'NOT_CONFIGURED'. last error: %!s(<nil>)
    ```
    
    The current assumption is that all applications enter a `NOT_CONFIGURED` lifecycle status upon initial creation (which is why this succeeds most of the time in minimal configurations such as our acceptance test), but in some instances can proceed into an `ACTIVE` status before the create waiter has polled for and observed a `NOT_CONFIGURED` status. The AWS documentation on the [LifeCycle argument](https://docs.aws.amazon.com/cloudwatch/latest/APIReference/API_ApplicationInfo.html#appinsights-Type-ApplicationInfo-LifeCycle) is limited, so while we cannot be certain about the expected values in the lifecycle flow, there is enough evidence from issue reports and manual testing to indicate `ACTIVE` should be considered a valid target state.
    
    ```console
    % make testacc PKG=applicationinsights TESTS=TestAccApplicationInsightsApplication_
    ==> Checking that code complies with gofmt requirements...
    TF_ACC=1 go1.21.8 test ./internal/service/applicationinsights/... -v -count 1 -parallel 20 -run='TestAccApplicationInsightsApplication_'  -timeout 360m
    
    --- PASS: TestAccApplicationInsightsApplication_disappears (22.83s)
    --- PASS: TestAccApplicationInsightsApplication_autoConfig (25.47s)
    --- PASS: TestAccApplicationInsightsApplication_basic (34.21s)
    --- PASS: TestAccApplicationInsightsApplication_tags (43.17s)
    PASS
    ok      github.com/hashicorp/terraform-provider-aws/internal/service/applicationinsights        48.867s
    ```
    jar-b committed Mar 27, 2024
    Configuration menu
    Copy the full SHA
    d211c1c View commit details
    Browse the repository at this point in the history