-
-
Notifications
You must be signed in to change notification settings - Fork 38
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
base: master
Are you sure you want to change the base?
Cmk resource #20
Conversation
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 []); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cmk
-> awsCustomManagedKeys
nixopsaws/resources/cmk.py
Outdated
self.keyId = cmk['KeyMetadata']['KeyId'] | ||
|
||
with self.depl._db: | ||
self.state = self.UP if config['origin'] != "EXTERNAL" else self.STARTING |
There was a problem hiding this comment.
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
nixopsaws/resources/cmk.py
Outdated
|
||
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']) |
There was a problem hiding this comment.
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
nixopsaws/resources/cmk.py
Outdated
|
||
def _destroy(self): | ||
if self.state != self.UP: return | ||
if self._state['deletionWaitPeriod'] == 0: |
There was a problem hiding this comment.
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.
No description provided.