Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cmk resource #20

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Cmk resource #20

wants to merge 3 commits into from

Conversation

PsyanticY
Copy link
Contributor

No description provided.

nix/default.nix Outdated
@@ -44,6 +44,7 @@
awsVPNGateways = evalResources ./aws-vpn-gateway.nix (zipAttrs resourcesByType.awsVPNGateways or []);
awsVPNConnections = evalResources ./aws-vpn-connection.nix (zipAttrs resourcesByType.awsVPNConnections or []);
awsVPNConnectionRoutes = evalResources ./aws-vpn-connection-route.nix (zipAttrs resourcesByType.awsVPNConnectionRoutes or []);
cmk = evalResources ./cmk.nix (zipAttrs resourcesByType.cmk or []);
Copy link
Member

Choose a reason for hiding this comment

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

cmk -> awsCustomManagedKeys

self.keyId = cmk['KeyMetadata']['KeyId']

with self.depl._db:
self.state = self.UP if config['origin'] != "EXTERNAL" else self.STARTING
Copy link
Member

Choose a reason for hiding this comment

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

probably needs to be reverted as we only support an enum


def realize_update_description(self, allow_recreate):
config = self.get_defn()
self.get_client(service="kms").update_key_description(KeyId=self.keyId, Description=config['description'])
Copy link
Member

Choose a reason for hiding this comment

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

make sure to split these lines


def _destroy(self):
if self.state != self.UP: return
if self._state['deletionWaitPeriod'] == 0:
Copy link
Member

Choose a reason for hiding this comment

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

this looks like an unexpected behavior as the key should be removed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants