Replies: 1 comment
-
Thanks for opening up a discussion.
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I've got some Terraform code, but no state file. I'm working to match up the TF declared resources with existing AWS resources. More or less, I'm doing this with the Ruby SDK:
The response is a struct, but not an object of type
AWS::RDS::DBInstance
. Is it possible to easily take an arbitrary response struct and convert it to a specific (ie RDS::DBInstance) object class? Or more specifically, within the struct is the paginationmarker
and an array of hashes that contain the db instance metadata.Part of the issue I'm running into with the struct is writing code that handles different AWS resource types somewhat generically. The
RDS::DBInstance
class has anid
method, but the struct requires you to know that the property isdb_instance_identifier
- which will be different for every AWS resource type.Alternatively, is there a data file somewhere that maps AWS resources, for example for AWS::RDS::DBInstance, the struct key pointing at the array of data is
db_instances
and the id property isdb_instance_identifier
I've tried looking at the SDK code, but nothing jumps out at me as being obvious and at least a little generic so I can use the same general approach for EC2 instances, RDS, etc. thanks!Beta Was this translation helpful? Give feedback.
All reactions