lib/terraforming/resource/kms_key.rb in terraforming-0.15.0 vs lib/terraforming/resource/kms_key.rb in terraforming-0.16.0
- old
+ new
@@ -30,11 +30,11 @@
"description" => key.description,
"enable_key_rotation" => key_rotation_status_of(key).key_rotation_enabled.to_s,
"id" => key.key_id,
"is_enabled" => key.enabled.to_s,
"key_id" => key.key_id,
- "key_usage" => key_usage_of(key),
+ "key_usage" => key.key_usage,
"policy" => key_policy_of(key),
},
},
}
resources
@@ -65,13 +65,9 @@
@client.get_key_policy(key_id: key.key_id, policy_name: policies[0]).policy
end
def key_rotation_status_of(key)
@client.get_key_rotation_status(key_id: key.key_id)
- end
-
- def key_usage_of(key)
- key.key_usage.tr("_", "/")
end
def managed_master_key?(key)
!aliases.select { |a| a.target_key_id == key.key_id && a.alias_name =~ %r{\Aalias/aws/} }.empty?
end