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

[Bug]: App Runner Observability catch-22 #27733

Closed
emarref opened this issue Nov 9, 2022 · 4 comments · Fixed by #28620
Closed

[Bug]: App Runner Observability catch-22 #27733

emarref opened this issue Nov 9, 2022 · 4 comments · Fixed by #28620
Labels
bug Addresses a defect in current functionality. good first issue Call to action for new contributors looking for a place to start. Smaller or straightforward issues. service/apprunner Issues and PRs that pertain to the apprunner service.

Comments

@emarref
Copy link

emarref commented Nov 9, 2022

Terraform Core Version

1.3.4

AWS Provider Version

4.38.0

Affected Resource(s)

  • aws_apprunner_service

Expected Behavior

I should be able to omit the observability_configuration block entirely if I do not want observability, or at least disable it with the observability_enabled = false option within that block without specifying an arn.

Actual Behavior

I created an App Runner service manually via the console (with no observability configured). I then imported it into my terraform configuration.

When I run terraform plan I get a diff notifying observability_enabled = false -> null.

image

When I add the block to set this value to false then run terraform plan again, I get an error telling me that observability_configuration_arn is required.

image

When I try again with observability_enabled = null instead of false, I get the same error:

image

I think it is an issue with the validation. If observability_enabled is set to false, observability_configuration_arn should not be required.

Relevant Error/Panic Output Snippet

Terraform will perform the following actions:

  # aws_apprunner_service.staging will be updated in-place
  ~ resource "aws_apprunner_service" "staging" {
        id                             = "arn:aws:apprunner:us-east-1:669859274049:service/mss-test/b394ed30588645e2b3ff9a98a3c3277e"
        tags                           = {}
        # (7 unchanged attributes hidden)

      - observability_configuration {
          - observability_enabled = false -> null
        }

        # (4 unchanged blocks hidden)
    }

Plan: 0 to add, 1 to change, 0 to destroy.

Terraform Configuration Files

resource "aws_apprunner_service" "staging" {
  service_name = "staging"

  source_configuration {
    auto_deployments_enabled = true

    authentication_configuration {
      access_role_arn = data.aws_iam_role.app_runner_service_role.arn
    }

    image_repository {
      image_identifier      = "${aws_ecr_repository.staging.repository_url}:latest"
      image_repository_type = "ECR"

      image_configuration {
        port = 3000
      }
    }
  }
}

Steps to Reproduce

terraform apply

Debug Output

No response

Panic Output

No response

Important Factoids

No response

References

No response

Would you like to implement a fix?

No response

@emarref emarref added bug Addresses a defect in current functionality. needs-triage Waiting for first response or review from a maintainer. labels Nov 9, 2022
@github-actions github-actions bot added the service/apprunner Issues and PRs that pertain to the apprunner service. label Nov 9, 2022
@github-actions
Copy link

github-actions bot commented Nov 9, 2022

Community Note

Voting for Prioritization

  • Please vote on this issue by adding a 👍 reaction to the original post to help the community and maintainers prioritize this request.
  • Please see our prioritization guide for information on how we prioritize.
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request.

Volunteering to Work on This Issue

  • If you are interested in working on this issue, please leave a comment.
  • If this would be your first contribution, please review the contribution guide.

@emarref
Copy link
Author

emarref commented Nov 9, 2022

Quick update - adding an empty ARN prevents the issue.

  observability_configuration {
    observability_enabled = false
    observability_configuration_arn = ""
  }

The above succeeds without any change of state or error.

@justinretzolk justinretzolk added good first issue Call to action for new contributors looking for a place to start. Smaller or straightforward issues. and removed needs-triage Waiting for first response or review from a maintainer. labels Nov 10, 2022
@bschaatsbergen
Copy link
Member

Good catch, thanks @emarref 👍

@github-actions
Copy link

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 have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 10, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Addresses a defect in current functionality. good first issue Call to action for new contributors looking for a place to start. Smaller or straightforward issues. service/apprunner Issues and PRs that pertain to the apprunner service.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants