[apigatewayv1] Inability to Use parentRef.from.name for Root Path Resource Creation in RestAPI #2359
Labels
needs-investigation
Indicates an issue needs some investigation.
service/apigateway
Indicates issues or PRs that are related to apigateway-controller.
Describe the bug
api gateway v1 - https://github.com/aws-controllers-k8s/apigateway-controller
When using API Gateway V1 controller, there is a limitation when attempting to create a
Resource
whose parent is the root path (/
). This issue arises because theparentRef.from.name
parameter, which is intended to reference the parent resource by name, is restricted to only recognizeResource
names. However, the root path (/
) is associated with theRestAPI
rather than aResource
, making it impossible to useparentRef.from.name
to reference it directly.As a result, when creating a
Resource
with the root path as its parent, users must manually retrieve the.status.rootResourceID
of theRestAPI
after its creation. This additional step is necessary to obtain the root resource ID, which is then used in theParentID
field for creating theResource
.Steps to reproduce
Attempt to apply the following yaml to the cluster:
Expected outcome
It should be allowed to use the name of the
RestAPI
in theResource
parentRef.from.name
, or have another parameter inResource
such asrestApiParentRef.from.name
for exampleActual outcome
The following error message appears:
resources.apigateway.services.k8s.aws "example-restapi-name" not found
Environment
The text was updated successfully, but these errors were encountered: