Added IAM support and refactoring

- Added validations to resource
- Added helper method to resource to create hosts with trailing dots
- Changed the create actions logic a bit