-
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
Add 'aws_cloudtrail_service_account' data source #1774
Add 'aws_cloudtrail_service_account' data source #1774
Conversation
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.
|
||
if accid, ok := cloudTrailServiceAccountPerRegionMap[region]; ok { | ||
d.SetId(accid) | ||
d.Set("arn", fmt.Sprintf("arn:%s:iam::%s:root", meta.(*AWSClient).partition, accid)) |
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.
Would probably be better to use https://github.com/terraform-providers/terraform-provider-aws/blob/master/vendor/github.com/aws/aws-sdk-go/aws/arn/arn.go#L28, thoughts?
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.
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.
Agreed, as it has been merged, should be all ok!
Get AWS CloudTrail Service Account ID for storing trail data in S3. | ||
--- | ||
|
||
# aws\_cloudtrail\_service\_account |
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.
These antislashes are not needed anymore when writing markdown
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.
OK, I'll correct.
"Version": "2008-10-17", | ||
"Statement": [ | ||
{ | ||
"Sid": "Put bucket policy needed for trails", |
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.
Can you fix indentations there? 2 spaces would be really nice :)
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.
Will do.
3c901bf
to
f78f23e
Compare
Rebased from
|
19514f9
to
b5687df
Compare
b5687df
to
3177675
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, I just resolved last conflicts 👍 🚀
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 feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks! |
New data source
aws_cloudtrail_service_account
to return the account ID and account ARN of the AWS CloudTrail service in the specified region.See:
Acceptance tests: