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

ram: could not get pending status ram resource shares #8951

Open
1 task
tangr opened this issue Sep 27, 2024 · 5 comments
Open
1 task

ram: could not get pending status ram resource shares #8951

tangr opened this issue Sep 27, 2024 · 5 comments
Assignees
Labels
bug This issue is a bug. p2 This is a standard priority issue ram response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days. service-api This issue is due to a problem in a service API, not the SDK implementation.

Comments

@tangr
Copy link

tangr commented Sep 27, 2024

Describe the bug

aws ram get-resource-shares --resource-owner OTHER-ACCOUNTS
could not get PENDING status ram share resources, just shows up ACTIVE status

{
    "resourceShares": [
        {
            "resourceShareArn": "arn:aws:ram:::resource-share",
            "name": "",
            "owningAccountId": "",
            "allowExternalPrincipals": true,
            "status": "ACTIVE",
            "creationTime": "2023-",
            "lastUpdatedTime": "2023-",
            "featureSet": "STANDARD"
        }
    ]
}

Even explicitly specifying PENDING status with:

aws ram get-resource-shares --resource-owner OTHER-ACCOUNTS --resource-share-status PENDING

{
    "resourceShares": []
}

And after I accepted the pending status ram share resource on console, it will shows up since the status of ram share resource is ACTIVE.

Regression Issue

  • Select this option if this issue appears to be a regression.

Expected Behavior

show all status share resources on the ram:get-resource-shares api.

Current Behavior

Only show "ACTIVE" resources, or FAILED? not all resources.

Reproduction Steps

create ram share resources, but not accept on the target account.

Possible Solution

No response

Additional Information/Context

No response

CLI version used

aws-cli/2.9.13 Python/3.9.11

Environment details (OS name and version, etc.)

Darwin/23.1.0 exe/x86_64 prompt/off

@tangr tangr added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Sep 27, 2024
@tim-finnigan tim-finnigan self-assigned this Sep 27, 2024
@tim-finnigan
Copy link
Contributor

Thanks for reaching out. The get-resource-shares command calls the underlying GetResourceShares API, so these results are coming from the AWS RAM API. When I tried creating a resource share, it almost immediately would go into ACTIVE state.

Are you trying to list pending invitation resources? Because in that case you'd want to use the list-pending-invitation-resources command. Otherwise could you tell us more about your use case?

Also version 2.9.13 is very old — the latest version is 2.17.60 per the CHANGELOG. Can you update to a more recent version in order to access the latest changes/fixes?

@tim-finnigan tim-finnigan added service-api This issue is due to a problem in a service API, not the SDK implementation. p2 This is a standard priority issue response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days. ram and removed needs-triage This issue or PR still needs to be triaged. labels Sep 27, 2024
@tangr
Copy link
Author

tangr commented Sep 28, 2024

HI @tim-finnigan , thanks for your quickly response.
I know it's under api. "it almost immediately would go into ACTIVE state." in it's action, will need to accept manually on console, but the console user may do not have enough permissions to accept it.

"Otherwise could you tell us more about your use case?" The usage scenario was under IAC, see as follows on pulumi/terraform.

https://www.pulumi.com/registry/packages/aws/api-docs/ram/getresourceshare/

https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/ram_resource_share

And what I mean is the actual behavior is inconsistent with documentation, since the manual supports all Valid Values: PENDING | ACTIVE | FAILED | DELETING | DELETED
resourceShareStatus

@github-actions github-actions bot removed the response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days. label Sep 28, 2024
@tim-finnigan
Copy link
Contributor

Thanks for following up. When testing this, the behavior I observed is that the resource share almost immediately went into an active state, so it wouldn't be in PENDING long enough to return that status via the API. Is that the behavior you're seeing? If you could share your debug logs (with any sensitive info redacted) by adding --debug to the command, then we can see what exactly the API response is.

@tim-finnigan tim-finnigan added the response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days. label Sep 30, 2024
@tangr
Copy link
Author

tangr commented Oct 8, 2024

HI @tim-finnigan ,
Sorry for the late reply, I didn't understand "the behavior I observed is that the resource share almost immediately went into an active state". Is it because your account under the organization and auto-accepted?

I think the accept should be accepted by manual. See attached.

img_v3_02ff_a6564bb2-977e-45bb-8f7f-334e99a129ag

but
aws ram get-resource-shares --resource-owner OTHER-ACCOUNTS --resource-share-status PENDING

{
    "resourceShares": []
}

@github-actions github-actions bot removed the response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days. label Oct 8, 2024
@tim-finnigan
Copy link
Contributor

Thanks for following up — can you share your debug logs when running this command? You can get these by adding --debug to the command, and you can redact any sensitive information. The logs will show us the raw API response, which we can share with the service API team to help with further investigation of this issue.

@tim-finnigan tim-finnigan added the response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days. label Nov 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue is a bug. p2 This is a standard priority issue ram response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days. service-api This issue is due to a problem in a service API, not the SDK implementation.
Projects
None yet
Development

No branches or pull requests

2 participants