Only call FnGetAtt if resource is in acceptable state.

This will give resource type authors some certainty on what error
checking their FnGetAtt methods will require.

Fixes bug: #1184794

Change-Id: Iec456075c14cd609cf9607f07bce23e4c6b33c0c