-
Notifications
You must be signed in to change notification settings - Fork 9.2k
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]: Changed id to use the ServicePermissionID - the ID of the actual resource. #27640
[Enhancement]: Changed id to use the ServicePermissionID - the ID of the actual resource. #27640
Conversation
Community NoteVoting for Prioritization
For Submitters
|
10efc14
to
d68480e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR, @robh007 🚀
--- PASS: TestAccVPCEndpointServiceAllowedPrincipal_tags (238.74s)
--- PASS: TestAccVPCEndpointServiceAllowedPrincipal_basic (247.72s)
--- PASS: TestAccVPCEndpointServiceAllowedPrincipal_migrateID (275.04s)
--- PASS: TestAccVPCEndpointServiceAllowedPrincipal_migrateAndTag (311.48s)
This functionality has been released in v4.64.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! |
I suspect this change might have introduced a bug. data "aws_vpc_endpoint_service" "this" {
service_name = var.vpc_endpoint_service
}
resource "aws_vpc_endpoint_service_allowed_principal" "this" {
vpc_endpoint_service_id = data.aws_vpc_endpoint_service.this.service_id
principal_arn = "arn:aws:iam::${var.aws_account_id}:root"
} error:
|
@asvinours Yes, it looks to be on the read, if you check the service the allowed_principal does get updated. Then the read happens, there was some additional code changes to my original pull request which changed the way the read worked. I've checked locally with my branch & I'm able to add additional principals without issue. terraform-provider-aws/internal/service/ec2/find.go Lines 3348 to 3353 in 746e737
This code be modified to include a filter for the PrincipalArn. func FindVPCEndpointServicePermissionsByID(ctx context.Context, conn *ec2.EC2, id, principalARN string) ([]*ec2.AllowedPrincipal, error) {
input := &ec2.DescribeVpcEndpointServicePermissionsInput{
ServiceId: aws.String(id),
Filters: BuildAttributeFilterList(map[string]string{
"principal": principalARN,
}),
}
return FindVPCEndpointServicePermissions(ctx, conn, input)
} But there maybe an issue with |
That VPC service in our AWS account has 68 different allowed principals, maybe the issue arises with existing VPC services that have more than one allowed principal? |
@asvinours Yes that's correct, I've opened a bug #30873. I may look to provide a fix over the weekend, with additional tests for more than one principal. |
I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. |
Description
Relations
Closes #27599
References
This change provides a usable ID & supports the ability to apply tags to the service principal using
ec2_tags
resource type.Output from Acceptance Testing