-
Notifications
You must be signed in to change notification settings - Fork 19
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
Community::Organizations::Policy.Content - YAML support #78
Comments
hmm, i'm wondering if you can do the conversion with !JsonString function? Examples:
or put the yaml in a test.yaml file and use
|
The |
@mbarneyjr contents of pr #83 got published as this should allow you to use the type as follows: AWSTemplateFormatVersion: '2010-09-09'
Description: Example template for a global AI opt-out organizations management policy
Resources:
OrganizationPolicy:
Type: Community::Organizations::Policy
Properties:
PolicyDocument:
Version: "2012-10-17"
Statement:
- Sid: DenyLargerThan4XLarge
Effect: Deny
Action:
- "ec2:RunInstances"
- "ec2:ModifyInstanceAttribute"
Resource: "arn:aws:ec2:*:*:instance/*"
Condition:
ForAnyValue:StringNotLike:
"ec2:InstanceType":
- "*.nano"
- "*.small"
- "*.micro"
- "*.medium"
- "*.large"
- "*.xlarge"
- "*.2xlarge"
- "*.4xlarge"
Description: Deny running EC2 instances larger than 4xlarge
Name: DenyLargeEC2Instances
PolicyType: SERVICE_CONTROL_POLICY
TargetIds:
- !Ref AWS::AccountId |
I finally got around to testing this and it works like a charm! It seems both Just want to confirm I understand how this should be used, thanks for the feature! |
yes. both are supported (more precise would be either) |
It would be nice to be able to define an organization policy's content as YAML (similar to how you can define IAM policies in YAML), and have the resource provider itself do the conversion to json before calling the
organizations:CreatePolicy
apiThe text was updated successfully, but these errors were encountered: