Skip to content
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

VPC Peering Connection does not define exists? #916

Closed
tyler-ball opened this issue Sep 1, 2015 · 2 comments
Closed

VPC Peering Connection does not define exists? #916

tyler-ball opened this issue Sep 1, 2015 · 2 comments
Labels
guidance Question that needs advice or information.

Comments

@tyler-ball
Copy link

[9] pry(main)> p = ec2_resource.vpc_peering_connection('pcx-12345678')
=> #<Aws::EC2::VpcPeeringConnection id="pcx-12345678">
[10] pry(main)> ls p
Aws::Resources::Resource#methods: client  data  data_loaded?  exists?  identifiers  inspect  load  reload  wait_until
Aws::EC2::VpcPeeringConnection#methods: accept  accepter_vpc  accepter_vpc_info  delete  expiration_time  id  reject  requester_vpc  requester_vpc_info  status  tags  vpc_peering_connection_id
instance variables: @client  @data  @identifiers
[11] pry(main)> p.exists?
NotImplementedError: #exists? is not implemented for Aws::EC2::VpcPeeringConnection
from /Users/tball/.rvm/gems/ruby-2.1.6@cookbook-test-provisioning/gems/aws-sdk-resources-2.1.16/lib/aws-sdk-resources/resource.rb:139:in `rescue in exists?'

Because it inherits from Aws::Resources::Resource it looks like it should define exists?.

@trevorrowe
Copy link
Member

The base resource class defines #exists? in such a way to raise the NotImplementError if the appropriate waiter definition does not exist. It relies on a waiter to check for the existence of the resource. I'll try to add a waiter that polls for the existence of a VPC peering connection and I'll share that shortly.

@tyler-ball
Copy link
Author

Thanks for the quick turnaround @trevorrowe !

@srchase srchase added the guidance Question that needs advice or information. label Dec 24, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
guidance Question that needs advice or information.
Projects
None yet
Development

No branches or pull requests

3 participants