AppRunner DescribeService should return ServiceUrl when IsPubliclyAccessible = false
Describe the bug
This issue arose while using aws terraform provider v.4.40.0. But digging more it looks the problem is how the API returns the response calling DescribeService and only if IsPubliclyAccessible = false.
As per documentation the response should return ServiceUrl however it doesn't.
This is the output from one of AppRunner services I've deployed.
{
"Service": {
"ServiceName": "my-service-name",
"ServiceId": "XXXXXXXXXXXXXXXXXXXXXX",
"ServiceArn": "arn:aws:apprunner:eu-west-1:123456789012:service/my-service-name/XXXXXXXXXXXXXXXXXXXXXX",
"CreatedAt": 1669040555.0,
"UpdatedAt": 1669040555.0,
"Status": "RUNNING",
"SourceConfiguration": {
"ImageRepository": {
"ImageIdentifier": "123456789012.dkr.ecr.eu-west-1.amazonaws.com/my-image:latest",
"ImageConfiguration": {
"Port": "8000"
},
"ImageRepositoryType": "ECR"
},
"AutoDeploymentsEnabled": false,
"AuthenticationConfiguration": {
"AccessRoleArn": "arn:aws:iam::123456789012:role/MyAppRunnerBuildRole"
}
},
"InstanceConfiguration": {
"Cpu": "2048",
"Memory": "4096",
"InstanceRoleArn": "arn:aws:iam::123456789012:role/MyAppRunnerInstanceRole"
},
"HealthCheckConfiguration": {
"Protocol": "HTTP",
"Path": "/api/ping",
"Interval": 5,
"Timeout": 2,
"HealthyThreshold": 1,
"UnhealthyThreshold": 5
},
"AutoScalingConfigurationSummary": {
"AutoScalingConfigurationArn": "arn:aws:apprunner:eu-west-1:123456789012:autoscalingconfiguration/MyAutoScalingConfiguration/1/YYYYYYYYYYYYYYYYYYYY",
"AutoScalingConfigurationName": "MyAutoScalingConfiguration",
"AutoScalingConfigurationRevision": 1
},
"NetworkConfiguration": {
"EgressConfiguration": {
"EgressType": "DEFAULT"
},
"IngressConfiguration": {
"IsPubliclyAccessible": false
}
}
}
}
Not sure if this is supposed to happen or not, but the console returns the Url even if the service is not publicly accessible.
Is this something that can be done here or it's a bug in the APIs?
Expected Behavior
I'm expecting to get the ServiceUrl even if the Service is not publicly accessible.
Current Behavior
DescribeService does not return ServiceUrl if the service is deployed with a VPC interface endpoint to be accessible only within the VPC.
Reproduction Steps
- Run
aws apprunner describe-service --service-arn <service_arn>for a service which has been deployed accepting traffic from the VPC only though the interface endpoint. - It doesn't return the ServiceUrl
- Go to the console. For the same service it shows the proper URL.
Possible Solution
No response
Additional Information/Context
No response
SDK version used
v1.44.141
Environment details (Version of Go (go version)? OS name and version, etc.)
go 1.11
Hey @sgrilux thanks for opening this issue, the docs mention here the serviceUrl to be not required seems to be the same in API models as well. I will check the httpResponse when using the go SDK if 'serviceUrl returned by the service.
Hi @ajredniwja @sgrilux Any idea, if this issue has been resolved in any version of terraform?
Hi @carlduevel
I see you closed the original issue on the Terraform repo and that they linked the migration to v2 as a resolution.
I'm going to close this issue. if it still persists please open a new issue on our v2 repo.
Thanks again, Ran~
Comments on closed issues are hard for our team to see. If you need more assistance, please either tag a team member or open a new issue that references this one. If you wish to keep having a conversation with other community members under this issue feel free to do so.