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

Yaml CFN VS. Mixed CFN in Yaml with inline JSON #387

Open
kisst opened this issue Oct 29, 2024 · 0 comments
Open

Yaml CFN VS. Mixed CFN in Yaml with inline JSON #387

kisst opened this issue Oct 29, 2024 · 0 comments

Comments

@kisst
Copy link

kisst commented Oct 29, 2024

Current behaviour is that for json policy documents are kept in json with either | or just inline.
For example current:

    IAMRole:
        Type: "AWS::IAM::Role"
        Properties:
            Path: "/"
            RoleName: "BedrockStudioProvisioningRole"
            AssumeRolePolicyDocument: "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Principal\":{\"Service\":\"datazone.amazonaws.com\"},\"Action\":\"sts:AssumeRole\"}]}"
            MaxSessionDuration: 3600

or if the policy is too big then:

    IAMPolicy2:
       Type: "AWS::IAM::Policy"
       Properties:
           PolicyDocument: |
               {
                 "Version": "2012-10-17",
                 "Statement": [
                   {
...
etc

Neither above are pretty, a consistent native yaml would be at least my preference so even if this wouldn't be the default, at least a flag would be great.
for example:

ype: AWS::IAM::Role
Properties:
  RoleName: BedrockStudioServiceRole
  AssumeRolePolicyDocument:
    Version: '2012-10-17'
    Statement:
      - Effect: Allow
        Principal:
          Service: datazone.amazonaws.com
        Action: sts:AssumeRole
  Policies:
    - PolicyName: BedrockStudioServiceRolePolicy
      PolicyDocument:
        Version: '2012-10-17'
        Statement:
          - Effect: Allow
            Action:
              - bedrock:*
              - iam:PassRole
            Resource: '*'
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

No branches or pull requests

1 participant