-
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
feat(spn): created service principal name data source #38307
feat(spn): created service principal name data source #38307
Conversation
Signed-off-by: Fred Myerscough <myerscf@amazon.co.uk>
Community NoteVoting for Prioritization
For Submitters
|
Signed-off-by: Fred Myerscough <myerscf@amazon.co.uk>
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.
Welcome @myerscf 👋
It looks like this is your first Pull Request submission to the Terraform AWS Provider! If you haven’t already done so please make sure you have checked out our CONTRIBUTOR guide and FAQ to make sure your contribution is adhering to best practice and has all the necessary elements in place for a successful approval.
Also take a look at our FAQ which details how we prioritize Pull Requests for inclusion.
Thanks again, and welcome to the community! 😃
I'm getting a failure in the acceptance tests. Otherwise, this LGTM
|
Signed-off-by: Fred Myerscough <myerscf@amazon.co.uk>
Fixed - |
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.
Thank you! LGTM 🎉
% make t T=TestAccMetaServicePrincipal_ K=meta
make: Verifying source code with gofmt...
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go1.22.5 test ./internal/service/meta/... -v -count 1 -parallel 20 -run='TestAccMetaServicePrincipal_' -timeout 360m
=== RUN TestAccMetaServicePrincipal_basic
=== PAUSE TestAccMetaServicePrincipal_basic
=== RUN TestAccMetaServicePrincipal_MissingService
=== PAUSE TestAccMetaServicePrincipal_MissingService
=== RUN TestAccMetaServicePrincipal_ByRegion
=== RUN TestAccMetaServicePrincipal_ByRegion/us-east-1
=== PAUSE TestAccMetaServicePrincipal_ByRegion/us-east-1
=== RUN TestAccMetaServicePrincipal_ByRegion/cn-north-1
=== PAUSE TestAccMetaServicePrincipal_ByRegion/cn-north-1
=== RUN TestAccMetaServicePrincipal_ByRegion/us-gov-east-1
=== PAUSE TestAccMetaServicePrincipal_ByRegion/us-gov-east-1
=== RUN TestAccMetaServicePrincipal_ByRegion/us-iso-east-1
=== PAUSE TestAccMetaServicePrincipal_ByRegion/us-iso-east-1
=== RUN TestAccMetaServicePrincipal_ByRegion/us-isob-east-1
=== PAUSE TestAccMetaServicePrincipal_ByRegion/us-isob-east-1
=== RUN TestAccMetaServicePrincipal_ByRegion/eu-isoe-west-1
=== PAUSE TestAccMetaServicePrincipal_ByRegion/eu-isoe-west-1
=== CONT TestAccMetaServicePrincipal_ByRegion/us-east-1
=== CONT TestAccMetaServicePrincipal_ByRegion/eu-isoe-west-1
=== CONT TestAccMetaServicePrincipal_ByRegion/us-iso-east-1
=== CONT TestAccMetaServicePrincipal_ByRegion/us-gov-east-1
=== CONT TestAccMetaServicePrincipal_ByRegion/cn-north-1
=== CONT TestAccMetaServicePrincipal_ByRegion/us-isob-east-1
--- PASS: TestAccMetaServicePrincipal_ByRegion (0.00s)
--- PASS: TestAccMetaServicePrincipal_ByRegion/us-iso-east-1 (14.75s)
--- PASS: TestAccMetaServicePrincipal_ByRegion/us-east-1 (14.80s)
--- PASS: TestAccMetaServicePrincipal_ByRegion/eu-isoe-west-1 (14.80s)
--- PASS: TestAccMetaServicePrincipal_ByRegion/us-isob-east-1 (14.80s)
--- PASS: TestAccMetaServicePrincipal_ByRegion/us-gov-east-1 (14.81s)
--- PASS: TestAccMetaServicePrincipal_ByRegion/cn-north-1 (14.81s)
=== RUN TestAccMetaServicePrincipal_UniqueForServiceInRegion
=== RUN TestAccMetaServicePrincipal_UniqueForServiceInRegion/us-iso-east-1/cloudhsm
=== PAUSE TestAccMetaServicePrincipal_UniqueForServiceInRegion/us-iso-east-1/cloudhsm
=== RUN TestAccMetaServicePrincipal_UniqueForServiceInRegion/us-iso-east-1/config
=== PAUSE TestAccMetaServicePrincipal_UniqueForServiceInRegion/us-iso-east-1/config
=== RUN TestAccMetaServicePrincipal_UniqueForServiceInRegion/us-iso-east-1/logs
=== PAUSE TestAccMetaServicePrincipal_UniqueForServiceInRegion/us-iso-east-1/logs
=== RUN TestAccMetaServicePrincipal_UniqueForServiceInRegion/us-iso-east-1/workspaces
=== PAUSE TestAccMetaServicePrincipal_UniqueForServiceInRegion/us-iso-east-1/workspaces
=== RUN TestAccMetaServicePrincipal_UniqueForServiceInRegion/us-isob-east-1/dms
=== PAUSE TestAccMetaServicePrincipal_UniqueForServiceInRegion/us-isob-east-1/dms
=== RUN TestAccMetaServicePrincipal_UniqueForServiceInRegion/us-isob-east-1/logs
=== PAUSE TestAccMetaServicePrincipal_UniqueForServiceInRegion/us-isob-east-1/logs
=== RUN TestAccMetaServicePrincipal_UniqueForServiceInRegion/cn-north-1/codedeploy
=== PAUSE TestAccMetaServicePrincipal_UniqueForServiceInRegion/cn-north-1/codedeploy
=== RUN TestAccMetaServicePrincipal_UniqueForServiceInRegion/cn-north-1/elasticmapreduce
=== PAUSE TestAccMetaServicePrincipal_UniqueForServiceInRegion/cn-north-1/elasticmapreduce
=== RUN TestAccMetaServicePrincipal_UniqueForServiceInRegion/cn-north-1/logs
=== PAUSE TestAccMetaServicePrincipal_UniqueForServiceInRegion/cn-north-1/logs
=== CONT TestAccMetaServicePrincipal_UniqueForServiceInRegion/us-iso-east-1/cloudhsm
=== CONT TestAccMetaServicePrincipal_UniqueForServiceInRegion/cn-north-1/codedeploy
=== CONT TestAccMetaServicePrincipal_UniqueForServiceInRegion/cn-north-1/logs
=== CONT TestAccMetaServicePrincipal_UniqueForServiceInRegion/cn-north-1/elasticmapreduce
=== CONT TestAccMetaServicePrincipal_UniqueForServiceInRegion/us-iso-east-1/workspaces
=== CONT TestAccMetaServicePrincipal_UniqueForServiceInRegion/us-isob-east-1/logs
=== CONT TestAccMetaServicePrincipal_UniqueForServiceInRegion/us-isob-east-1/dms
=== CONT TestAccMetaServicePrincipal_UniqueForServiceInRegion/us-iso-east-1/logs
=== CONT TestAccMetaServicePrincipal_UniqueForServiceInRegion/us-iso-east-1/config
--- PASS: TestAccMetaServicePrincipal_UniqueForServiceInRegion (0.00s)
--- PASS: TestAccMetaServicePrincipal_UniqueForServiceInRegion/cn-north-1/elasticmapreduce (18.18s)
--- PASS: TestAccMetaServicePrincipal_UniqueForServiceInRegion/cn-north-1/codedeploy (18.19s)
--- PASS: TestAccMetaServicePrincipal_UniqueForServiceInRegion/us-iso-east-1/config (18.19s)
--- PASS: TestAccMetaServicePrincipal_UniqueForServiceInRegion/us-isob-east-1/dms (18.19s)
--- PASS: TestAccMetaServicePrincipal_UniqueForServiceInRegion/us-iso-east-1/logs (18.19s)
--- PASS: TestAccMetaServicePrincipal_UniqueForServiceInRegion/us-iso-east-1/cloudhsm (18.21s)
--- PASS: TestAccMetaServicePrincipal_UniqueForServiceInRegion/us-iso-east-1/workspaces (18.21s)
--- PASS: TestAccMetaServicePrincipal_UniqueForServiceInRegion/us-isob-east-1/logs (18.21s)
--- PASS: TestAccMetaServicePrincipal_UniqueForServiceInRegion/cn-north-1/logs (18.21s)
=== CONT TestAccMetaServicePrincipal_basic
=== CONT TestAccMetaServicePrincipal_MissingService
--- PASS: TestAccMetaServicePrincipal_MissingService (1.33s)
--- PASS: TestAccMetaServicePrincipal_basic (9.47s)
PASS
ok github.com/hashicorp/terraform-provider-aws/internal/service/meta 45.352s
This functionality has been released in v5.60.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'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
This PR is for a data source:
aws_service_principal
. It will be used for generating a Service Principal Name (SPN) for a service (with region), which can be then be used in places that need to reference it - mainly for when writing IAM Policies.Service Principals Names should always end in the standard global format:
{servicename}.amazonaws.com
- however there are edge cases where this is not the case.Some Service Principals Names could look different (e.g. in ISO regions) were SPNs where different, as they where made before AWS standardised its policies.
Using this data source, users can create a reference to use - which will do the heavy lifting of looking for regional difference fallbacks.
Relations
N/A
References
CDK equivalent
Output from Acceptance Testing