code: func isResolvedResourceType(resource *resourceRef,
  	template *gocf.Template,
  	literalTokenIndicator string,
  	templateType gocf.ResourceProperties) bool {
  	if resource.RefType == resourceLiteral ||
  		resource.RefType == resourceStringFunc {
  		return strings.Contains(resource.ResourceName, literalTokenIndicator)
  	}
  
  	// Dynamically provisioned resource included in the template definition?
  	existingResource, existingResourceExists := template.Resources[resource.ResourceName]
  	if existingResourceExists {
  		if reflect.TypeOf(existingResource.Properties) == reflect.TypeOf(templateType) {
  			return true
  		}
  	}
  	return false
  }
docs: // isResolvedResourceType is a utility function to determine if a resolved
  // reference is a given type. If it is a literal, the literalTokenIndicator
  // substring match is used for the predicate. If it is a resource provisioned
  // by this template, the &gocf.RESOURCE_TYPE{} will be used via reflection
  // Example:
  // isResolvedResourceType(resourceRef, template, ":dynamodb:", &gocf.DynamoDBTable{}) {
  //