-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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 arn attribute to aws_ebs_volume resource and datasource #2271
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.
Thanks for adding all the tests, I left you two less important questions and one about the schema.
aws/data_source_aws_ebs_volume.go
Outdated
@@ -117,9 +122,19 @@ func mostRecentVolume(volumes []*ec2.Volume) *ec2.Volume { | |||
return sortedVolumes[len(sortedVolumes)-1] | |||
} | |||
|
|||
func volumeDescriptionAttributes(d *schema.ResourceData, volume *ec2.Volume) error { | |||
func volumeDescriptionAttributes(d *schema.ResourceData, meta interface{}, volume *ec2.Volume) error { |
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.
I don't think we need the whole meta
here 🤔 , do you mind "reducing it" to client *AWSClient
?
aws/resource_aws_ebs_volume.go
Outdated
@@ -25,6 +26,11 @@ func resourceAwsEbsVolume() *schema.Resource { | |||
}, | |||
|
|||
Schema: map[string]*schema.Schema{ | |||
"arn": { | |||
Type: schema.TypeString, | |||
Optional: true, |
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.
Is there any particular reason why this field should also be optional?
aws/resource_aws_ebs_volume.go
Outdated
@@ -267,9 +273,18 @@ func resourceAwsEbsVolumeDelete(d *schema.ResourceData, meta interface{}) error | |||
|
|||
} | |||
|
|||
func readVolume(d *schema.ResourceData, volume *ec2.Volume) error { | |||
func readVolume(d *schema.ResourceData, meta interface{}, volume *ec2.Volume) error { |
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.
As above, do you mind reducing the interface?
Changes sound great, I'll get them in shortly. |
…ve Optional from arn attribute and reduce full meta interface usage
Updates pushed and still passing local acceptance testing. Hopefully Travis agrees. 👍
|
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.
I really appreciate the level of detail in your PR descriptions - links to docs are very useful - things I'd otherwise have to look for myself.
Pleasure to review such PRs!
🚢
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! |
Not provided directly by EC2 DescribeVolumes API, so built manually. References:
Closes #2261