-
Notifications
You must be signed in to change notification settings - Fork 9.6k
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: Add aws_instance data source #11272
Conversation
Adds the `aws_instance` data source, tests, and documentation. ``` ==> Checking that code complies with gofmt requirements... go generate $(go list ./... | grep -v /terraform/vendor/) 2017/01/18 11:49:09 Generated command/internal_plugin_list.go TF_ACC=1 go test ./builtin/providers/aws -v -run=TestAccAWSInstanceDataSource -timeout 120m === RUN TestAccAWSInstanceDataSource_basic --- PASS: TestAccAWSInstanceDataSource_basic (106.24s) === RUN TestAccAWSInstanceDataSource_AzUserData --- PASS: TestAccAWSInstanceDataSource_AzUserData (108.52s) === RUN TestAccAWSInstanceDataSource_gp2IopsDevice --- PASS: TestAccAWSInstanceDataSource_gp2IopsDevice (80.71s) === RUN TestAccAWSInstanceDataSource_blockDevices --- PASS: TestAccAWSInstanceDataSource_blockDevices (94.07s) === RUN TestAccAWSInstanceDataSource_rootInstanceStore --- PASS: TestAccAWSInstanceDataSource_rootInstanceStore (95.17s) === RUN TestAccAWSInstanceDataSource_privateIP --- PASS: TestAccAWSInstanceDataSource_privateIP (241.75s) === RUN TestAccAWSInstanceDataSource_keyPair --- PASS: TestAccAWSInstanceDataSource_keyPair (208.77s) === RUN TestAccAWSInstanceDataSource_VPC --- PASS: TestAccAWSInstanceDataSource_VPC (109.89s) === RUN TestAccAWSInstanceDataSource_SecurityGroups --- PASS: TestAccAWSInstanceDataSource_SecurityGroups (118.66s) === RUN TestAccAWSInstanceDataSource_VPCSecurityGroups --- PASS: TestAccAWSInstanceDataSource_VPCSecurityGroups (136.79s) PASS ok github.com/hashicorp/terraform/builtin/providers/aws 1300.625s ```
This is awesome :) LGTM! |
I was almost filed an issue for this. Thank you so much for your work. |
@grubernaut before opening an issue I wanted to be sure. It seems that |
BTW |
I have just seen your comment.
|
Just a heads up, this is still not listed in the documentation side menu under data sources. I've written a lot of ugliness in order to work around the lack of an aws_instance datasource 😅 Also, it seems like this data source doesn't map the tags properly and leaves them in the form they were received from amazon. For comparison, see the state from the resource vs the data source:
I tried to work around this with interpolations but haven't been successful. |
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. |
Adds the
aws_instance
data source, tests, and documentation.Fixes: #11172