8000 AWS::Logs::ResourcePolicy by jerry153fish · Pull Request #1936 · cloudtools/troposphere · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

AWS::Logs::ResourcePolicy #1936

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

Merged

Conversation

jerry153fish
Copy link
Contributor

No description provided.

from .validators import integer_list_item, json_checker


def validate_resource_policy(policy_document):
Copy link
Member

Choose a reason for hiding this comment

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

This validation should take into account the other policy document types coming from awacs. This is imported via https://github.com/cloudtools/troposphere/blob/main/troposphere/compat.py
Note: the length checks won't work with some of these awacs types and additional checking needs to be done around the json_checker return types.

Copy link
Contributor Author
@jerry153fish jerry153fish Jul 22, 2021

Choose a reason for hiding this comment

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

hi @markpeek So the plan will be

  1. build a more general policy document validator
  2. cover the types of dict, Policy, PolicyDocumen, and string
  3. add tests cover all above

Any other cases need to be considered here?

Copy link
Member

Choose a reason for hiding this comment

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

That looks like the right list of items. Thanks.

@markpeek markpeek merged commit 028e251 into cloudtools:main Aug 22, 2021
@markpeek
Copy link
Member

Excellent. Thank you for the commit.

@jerry153fish
Copy link
Contributor Author

Thanks my pleasure.

@jerry153fish jerry153fish deleted the feature/Add-AWS-Logs-ResourcePolicy branch August 23, 2021 00:01
@PeteE
Copy link
Contributor
PeteE commented Aug 26, 2021

FYI - there are now two AWS::Logs::ResourcePolicy types in logs.py.

class ResourcePolicy(AWSObject):
and
class LogResourcePolicy(AWSObject):

Should the first one be removed?

@markpeek
Copy link
Member

Oh good catch. Fixed via a771640

    Fix duplicate AWS::Logs::ResourcePolicy

    The newly added LogResourcePolicy already existed as ResourcePolicy
    in Logs. Prefer the older one as it aligns with the AWS naming.
    This does keep the newly added validation and tests.

@jerry153fish
Copy link
Contributor Author

thx, I missed that.

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.

3 participants
0