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

Feature module: aws-iam-policy #906

Merged
merged 4 commits into from
Jun 8, 2022

Conversation

nsarupr
Copy link
Contributor

@nsarupr nsarupr commented Jun 6, 2022

Description

New module: aws-iam-policy

Safety checklist

  • This change is backwards compatible and safe to apply by existing users
  • This change will NOT lead to data loss
  • This change will NOT lead to downtime who already has an env/service setup

Example on how to use the IAM policy module:
configuration.yaml

name: <env_name>
org_name: <org_name>
providers:
  aws:
    region: "us-east-1"
    account_id: 000000000000
modules:
  - type: base
  - type: k8s-cluster
  - type: k8s-base
  - type: aws-iam-policy
    file: policy.json

policy.json

{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Action": [
        "ec2:Describe*"
      ],
      "Effect": "Allow",
      "Resource": "*"
    }
  ]
}

How has this change been tested, beside unit tests?

Tested Manually.

@codecov
Copy link

codecov bot commented Jun 6, 2022

Codecov Report

Merging #906 (f98a01e) into main (bc95d16) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main     #906   +/-   ##
=======================================
  Coverage   72.91%   72.91%           
=======================================
  Files         122      122           
  Lines        8282     8282           
=======================================
  Hits         6039     6039           
  Misses       2243     2243           
Flag Coverage Δ
unittests 72.91% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.


Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update bc95d16...f98a01e. Read the comment docs.


```
- name: deployer
type: aws-iam-role
Copy link
Collaborator

Choose a reason for hiding this comment

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

?
this is not an example of aws iam policy

Copy link
Contributor Author

Choose a reason for hiding this comment

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

My bad, let me add a proper example for the same.

```
- name: deployer
type: aws-iam-policy
file: valid_policy.json
Copy link
Collaborator

Choose a reason for hiding this comment

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

show what the valid policy json looks like.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added an example in the PR as well as in the readme.

@juandiegopalomino juandiegopalomino merged commit 1408068 into main Jun 8, 2022
@juandiegopalomino juandiegopalomino deleted the runx-1304-new-module-aws-iam-policy branch June 8, 2022 18:37
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.

2 participants