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

[Enhancement]: Resource: aws_servicecatalog_principal_portfolio_association to support principal_type "IAM_PATTERN" #33038

Closed
nrswetha4797 opened this issue Aug 16, 2023 · 4 comments · Fixed by #32243
Labels
documentation Introduces or discusses updates to documentation. service/servicecatalog Issues and PRs that pertain to the servicecatalog service.
Milestone

Comments

@nrswetha4797
Copy link

nrswetha4797 commented Aug 16, 2023

Description

Currently, aws_servicecatalog_principal_portfolio_association supports only principal_type "IAM"

https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/servicecatalog_principal_portfolio_association

However, from the AWS console we can associate a portfolio using "IAM_PATTERN"

Ctrail:

Using terraform,

"eventTime": "2023-08-08T18:47:43Z",
"eventSource": "servicecatalog.amazonaws.com",
"eventName": "AssociatePrincipalWithPortfolio",
"awsRegion": "us-west-2",
"sourceIPAddress": "5********0",
"userAgent": "APN/1.0 HashiCorp/1.0 Terraform/1.5.4 (+https://www.terraform.io/) terraform-provider-aws/4.67.0 (+https://registry.terraform.io/providers/hashicorp/aws) aws-sdk-go/1.44.261 (go1.19.8; linux; arm64) exec-env/AWS_ECS_FARGATE",
"errorCode": "ResourceNotFoundException",
"errorMessage": "Resource not found, caller account id (883*****566) does not match input account id ()",
"requestParameters": {
"acceptLanguage": "en",
"portfolioId": "por*******fdii",
"principalType": "IAM",
"principalARN": "arn:aws:iam:::role/aws-reserved/sso.amazonaws.com/us-west-2/AWSReservedSSO_devops-admin_*"
},

same operation from console, the principal gets associated with portfolio

"eventTime": "2023-08-08T19:40:54Z",
"eventSource": "servicecatalog.amazonaws.com",
"eventName": "AssociatePrincipalWithPortfolio",
"awsRegion": "us-west-2",
"sourceIPAddress": "168.****.42",
"userAgent": "AWS Internal",
"requestParameters": {
"portfolioId": "po*********x7fdii",
"principalType": "IAM_PATTERN",
"principalARN": "arn:aws:iam:::role/aws-reserved/sso.amazonaws.com/us-west-2/AWSReservedSSO_devops-admin_*"
},

Affected Resource(s) and/or Data Source(s)

No response

Potential Terraform Configuration

No response

References

No response

Would you like to implement a fix?

None

@nrswetha4797 nrswetha4797 added the enhancement Requests to existing resources that expand the functionality or scope. label Aug 16, 2023
@github-actions
Copy link

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.

@terraform-aws-provider terraform-aws-provider bot added the needs-triage Waiting for first response or review from a maintainer. label Aug 16, 2023
@MickSheppardWB
Copy link

Although it's documented that only "IAM" is supported you can provide "IAM_PATTERN" as suggested and this does create the access as expected. However it fails to clean up correctly on a destroy as indicated in issue #32229.

One of these issues should be closed in favour of the other.

@justinretzolk justinretzolk added documentation Introduces or discusses updates to documentation. and removed enhancement Requests to existing resources that expand the functionality or scope. needs-triage Waiting for first response or review from a maintainer. labels Aug 17, 2023
@ewbankkit ewbankkit added the service/servicecatalog Issues and PRs that pertain to the servicecatalog service. label Sep 6, 2023
@github-actions github-actions bot added this to the v5.16.0 milestone Sep 6, 2023
@github-actions
Copy link

github-actions bot commented Sep 8, 2023

This functionality has been released in v5.16.0 of the Terraform AWS Provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you!

@github-actions
Copy link

github-actions bot commented Oct 8, 2023

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 Oct 8, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
documentation Introduces or discusses updates to documentation. service/servicecatalog Issues and PRs that pertain to the servicecatalog service.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants