-
Notifications
You must be signed in to change notification settings - Fork 134
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
Init cmd #424
base: release/0.3.0
Are you sure you want to change the base?
Init cmd #424
Conversation
except self.client.exceptions.AlreadyExistsException as ex: | ||
logger.debug(ex, exc_info=True) | ||
logger.info("Database %s cannot be created in %s: %s", name, catalog_id, ex) | ||
raise CidError() from ex |
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.
In other paces we use a logic of 'ensure' this means if we ask to create it will create or return exisitng. Simiarly with delete if the final state is achieved we do not need to raise a problem.
Please can you review if this fits?
|
||
for name, policy_file in custom_policies.items(): | ||
policy_document = pkg_resources.read_text('cid.builtin.core.data.iam', policy_file) | ||
policy_document = inject_variables(source=policy_document, variables=self.variables) |
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.
Wgt we do not use a template as in other places?
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.
option 1 (new with Mako)
template = Template(resource_string(
package_or_requirement='cid.builtin.core',
resource_name=template_file,
).decode('utf-8'))
text = template.render(**params)
option 2 (leagcy with sandard lib )
from string import Template
....
folder_permissions_tpl = Template(resource_string(
package_or_requirement='cid.builtin.core',
resource_name=f'data/permissions/folder_permissions.json',
).decode('utf-8'))
columns_tpl = {
'PrincipalArn': self.qs.get_principal_arn()
}
folder_permissions = json.loads(folder_permissions_tpl.safe_substitute(columns_tpl))
This looks more robust and future proof
Co-authored-by: Iakov Gan <[email protected]>
Co-authored-by: Sean Nixon <[email protected]>
…#512) Co-authored-by: Iakov Gan <[email protected]>
Co-authored-by: Iakov Gan <[email protected]>
Co-authored-by: Babic <[email protected]>
Co-authored-by: Babic <[email protected]>
…RDS partial upfront RIs (aws-samples#524)
Updated all tabs to include relative date range & as of date. Added new spend by calendar period visual to allow for quarterly analysis
Co-authored-by: Iakov Gan <[email protected]>
Co-authored-by: Iakov Gan <[email protected]>
* initial for cur-aggregation.yaml * security recommendations for cur-aggregator --------- Co-authored-by: Iakov Gan <[email protected]>
Co-authored-by: Iakov Gan <[email protected]>
…framework-deployment into init-cmd
…-deployment into init-cmd
…work-deployment into init-cmd
Description of changes:
New implementation of
init
commandBy submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.