Skip to content
This repository has been archived by the owner on Sep 9, 2022. It is now read-only.

Support KMS key #299

Merged
merged 8 commits into from
Jan 11, 2017
Merged

Support KMS key #299

merged 8 commits into from
Jan 11, 2017

Conversation

dtan4
Copy link
Owner

@dtan4 dtan4 commented Jan 11, 2017

from #278

WHAT

Support aws_kms_key resource. Command is terraforming kmsk.

REF

AWS: aws_kms_key - Terraform by HashiCorp

end

def keys
@client.list_keys.keys.reject { |key| managed_master_key?(key) }.map { |key| @client.describe_key(key_id: key.key_id) }.map(&:key_metadata)
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[rubocop]

  • Line is too long. [147/140] :ref

def key_policy_of(key)
policies = @client.list_key_policies(key_id: key.key_id).policy_names

return "" if policies.length == 0
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[rubocop]

  • Use empty? instead of length == 0.

end

def key_usage_of(key)
key.key_usage.gsub("_", "/")
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[rubocop]

  • Use tr instead of gsub. :ref

end

def key_usage_of(key)
key.key_usage.gsub("_", "/")
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[rubocop]

  • Use tr instead of gsub. :ref

@dtan4 dtan4 merged commit cdb572e into master Jan 11, 2017
@dtan4 dtan4 deleted the kms-key branch January 11, 2017 06:56
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant