terraform-provider-aws
terraform-provider-aws copied to clipboard
feat: new datasource spot datafeed subscription
Description
From #39259: This is a data source that mirrors the aws_spot_datafeed_subscription resource. Every AWS account is allowed up to one spot data-feed subscription, which updates an s3 bucket with the latest EC2 spot instance prices.
Relations
Closes #39259
References
Copied from #39259:
- AWS Go SDK v2: DescribeSpotDatafeedSubscription
- awscli2: describe-spot-datafeed-subscription*
- AWS EC2 API Reference: DescribeSpotDatafeedSubscription
- AWS EC2 User Guide: Track your Spot Instance costs using the Spot Instance data feed
- hashicorp/aws docs: resource "aws_spot_datafeed_subscription"
Output from Acceptance Testing
❯ make testacc TESTS=TestAccEC2SpotDataFeedSubscriptionDataSource_basic PKG=ec2
make: Verifying source code with gofmt...
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go1.23.1 test ./internal/service/ec2/... -v -count 1 -parallel 20 -run='TestAccEC2SpotDataFeedSubscriptionDataSource_basic' -timeout 360m
=== RUN TestAccEC2SpotDataFeedSubscriptionDataSource_basic
=== PAUSE TestAccEC2SpotDataFeedSubscriptionDataSource_basic
=== CONT TestAccEC2SpotDataFeedSubscriptionDataSource_basic
--- PASS: TestAccEC2SpotDataFeedSubscriptionDataSource_basic (39.80s)
PASS
ok github.com/hashicorp/terraform-provider-aws/internal/service/ec2 39.947s
...