-
Notifications
You must be signed in to change notification settings - Fork 9.7k
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
provider/aws: aws_ebs_volume datasource #9753
Conversation
@@ -159,6 +159,7 @@ func Provider() terraform.ResourceProvider { | |||
"aws_s3_bucket_object": dataSourceAwsS3BucketObject(), | |||
"aws_subnet": dataSourceAwsSubnet(), | |||
"aws_security_group": dataSourceAwsSecurityGroup(), | |||
"aws_volume": dataSourceAwsVolumes(), |
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'm not sure I can really explain why, but it feels weird to me not to name this aws_ebs_volume
... I guess because it doesn't really feel "specific enough" without it, even though I'd concede that the naming scheme until now has generally been to use generic names for EC2 stuff.
A slightly stronger (but still rather weak) argument would be that when paired with aws_ebs_snapshot
these would group together nicely in an alphabetical list.
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 - this was only during WIP to make sure it was viable :)
3f5e3a5
to
5808f76
Compare
5808f76
to
2a808f3
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.
A few minor nits but otherwise LGTM.
volume = filteredVolumes[0] | ||
} | ||
|
||
log.Printf("[DEBUG] aws_volume - Single Volume found: %s", *volume.VolumeId) |
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.
aws_ebs_volume
return sortedVolumes[len(sortedVolumes)-1] | ||
} | ||
|
||
// populate the numerous fields that the image description returns. |
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.
Comments no longer relevant?
|
||
# aws\_ebs\_volume | ||
|
||
Use this data source to get the information of an EBS volume for use in other |
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.
"to get information about"?
This will allows us to filter a specific ebs_volume for attachment to an aws_instance ``` make testacc TEST=./builtin/providers/aws TESTARGS='-run=TestAccAWSEbsVolumeDataSource_'✹ ==> Checking that code complies with gofmt requirements... go generate $(go list ./... | grep -v /terraform/vendor/) 2016/11/01 12:39:19 Generated command/internal_plugin_list.go TF_ACC=1 go test ./builtin/providers/aws -v -run=TestAccAWSEbsVolumeDataSource_ -timeout 120m === RUN TestAccAWSEbsVolumeDataSource_basic --- PASS: TestAccAWSEbsVolumeDataSource_basic (28.74s) === RUN TestAccAWSEbsVolumeDataSource_multipleFilters --- PASS: TestAccAWSEbsVolumeDataSource_multipleFilters (28.37s) PASS ok github.com/hashicorp/terraform/builtin/providers/aws57.145s ```
2a808f3
to
76e1997
Compare
This will allows us to filter a specific ebs_volume for attachment to an aws_instance ``` make testacc TEST=./builtin/providers/aws TESTARGS='-run=TestAccAWSEbsVolumeDataSource_'✹ ==> Checking that code complies with gofmt requirements... go generate $(go list ./... | grep -v /terraform/vendor/) 2016/11/01 12:39:19 Generated command/internal_plugin_list.go TF_ACC=1 go test ./builtin/providers/aws -v -run=TestAccAWSEbsVolumeDataSource_ -timeout 120m === RUN TestAccAWSEbsVolumeDataSource_basic --- PASS: TestAccAWSEbsVolumeDataSource_basic (28.74s) === RUN TestAccAWSEbsVolumeDataSource_multipleFilters --- PASS: TestAccAWSEbsVolumeDataSource_multipleFilters (28.37s) PASS ok github.com/hashicorp/terraform/builtin/providers/aws57.145s ```
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. |
This will allows us to filter a specific ebs_volume for attachment to an
aws_instance
fixes #9620