Open fracampit opened 1 year ago
Voting for Prioritization
Volunteering to Work on This Issue
I can reproduce this with a new acceptance test case:
% make testacc TESTARGS='-run=TestAccAppRunnerService_ImageRepository_addObservabilityConfiguration' PKG=apprunner ACCTEST_PARALLELISM=2
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/apprunner/... -v -count 1 -parallel 2 -run=TestAccAppRunnerService_ImageRepository_addObservabilityConfiguration -timeout 360m
=== RUN TestAccAppRunnerService_ImageRepository_addObservabilityConfiguration
=== PAUSE TestAccAppRunnerService_ImageRepository_addObservabilityConfiguration
=== CONT TestAccAppRunnerService_ImageRepository_addObservabilityConfiguration
service_test.go:431: Step 2/2 error: Error running apply: exit status 1
Error: updating App Runner Service (arn:aws:apprunner:us-west-2:187416307283:service/tf-acc-test-7971785430668016957/d289a03b7176469bb7b6de7f4364882f): operation error AppRunner: UpdateService, https response error StatusCode: 400, RequestID: 0c95d9e6-926c-4f40-a70b-da145e04cbad, InvalidRequestException: No configurations provided in the UpdateService request.
with aws_apprunner_service.test,
on terraform_plugin_test.tf line 2, in resource "aws_apprunner_service" "test":
2: resource "aws_apprunner_service" "test" {
--- FAIL: TestAccAppRunnerService_ImageRepository_addObservabilityConfiguration (197.31s)
FAIL
FAIL github.com/hashicorp/terraform-provider-aws/internal/service/apprunner 202.788s
FAIL
make: *** [testacc] Error 1
My interpretation of the AWS documentation is that you can't specify a completely new observability_configuration
when updating an aws_apprunner_service
that didn't have one previously, only update (enable or disable, change the configuration ARN) of an existing observability_configuration
.
Hi, any news on this. Or Workarounds?
in my experience this can corrupt your config. i got the same error as reported, tried to get my infra to match to unblock myself (e.g. by enabling observability manually in aws), no dice. decided to revert and abandon observability... disabled it in aws, then put configs back to observability = false... and now i still have the same error because it's trying to remove the observability_configuration_arn from my services
~ observability_configuration {
- observability_configuration_arn = "arn:aws:apprunner:us-east-1:<account_id>:observabilityconfiguration/DefaultConfiguration/1/00000000000000000000000000000001" -> null
# (1 unchanged attribute hidden)
}
Error: updating App Runner Service (arn:aws:apprunner:us-east-1:<account_id>:service/<service_arn>): operation error AppRunner: UpdateService, https response error StatusCode: 400, RequestID: aea0bb20-e853-4de4-ba18-5ff11691969f, InvalidRequestException: No configurations provided in the UpdateService request.
might have to remake my services? -_-
A workaround is to create a fake configuration:
resource "aws_apprunner_service" "example" {
observability_configuration {
observability_configuration_arn = aws_apprunner_observability_configuration.xray.arn
observability_enabled = false
}
}
resource "aws_apprunner_observability_configuration" "xray" {
observability_configuration_name = "xray"
trace_configuration {
vendor = "AWSXRAY"
}
}
Terraform Core Version
registry.gitlab.com/gitlab-org/terraform-images/stable:latest
AWS Provider Version
5.0.1
Affected Resource(s)
aws_apprunner_service
Expected Behavior
adding the observability_configuration block successfully enables observability on App runner
Actual Behavior
Relevant Error/Panic Output Snippet
No response
Terraform Configuration Files
Steps to Reproduce
just deploy the above
Debug Output
No response
Panic Output
No response
Important Factoids
No response
References
No response
Would you like to implement a fix?
None