Skip to content

IAM full access

IAM full access #27

Workflow file for this run

---
name: Flowzone
on:
pull_request:
types: [opened, synchronize, closed]
branches: [main, master]
# allow external contributions to use secrets within trusted code
pull_request_target:
types: [opened, synchronize, closed]
branches: [main, master]
# https://docs.github.com/en/actions/security-guides/automatic-token-authentication
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#permissions
# https://docs.github.com/en/actions/deployment/security-hardening-your-deployments/about-security-hardening-with-openid-connect#adding-permissions-settings
permissions:
actions: read
checks: read
contents: read
deployments: read
id-token: write # AWS GitHub OIDC required: write
issues: read
discussions: read
packages: read
pages: read
pull-requests: read
repository-projects: read
security-events: read
statuses: read
jobs:
flowzone:
name: Flowzone
uses: product-os/flowzone/.github/workflows/flowzone.yml@master
# prevent duplicate workflow executions for pull_request and pull_request_target
if: |
(
github.event.pull_request.head.repo.full_name == github.repository &&
github.event_name == 'pull_request'
) || (
github.event.pull_request.head.repo.full_name != github.repository &&
github.event_name == 'pull_request_target'
)
secrets:
GH_APP_PRIVATE_KEY: ${{ secrets.GH_APP_PRIVATE_KEY }}
with:
jobs_timeout_minutes: 60
repo_config: true
repo_description: "AWS/GitOps automation"
repo_enable_auto_merge: true
repo_enable_merge_commit: true
cloudformation_templates: >
{
"stacks": [
{
"name": "github-oidc-belodetek",
"template": "aws/aws-cf-templates/operations/github-openid-connect.yaml",
"params": [
"GitHubRestriction=repo:belodetek/cfn-generic-custom-resource:*,repo:belodetek/.github:*",
"RoleMaxSessionDuration=43200",
"ManagedPolicyArns=arn:aws:iam::aws:policy/AWSCloudFormationFullAccess,arn:aws:iam::aws:policy/AmazonS3FullAccess,arn:aws:iam::aws:policy/IAMFullAccess,arn:aws:iam::aws:policy/AmazonEC2ContainerRegistryPowerUser,arn:aws:iam::aws:policy/AmazonElasticContainerRegistryPublicPowerUser"
],
"tags": [
"Name=github-oidc",
"Environment=belodetek",
"cost-function=shared",
"cost-type=iam"
],
"capabilities": [
"CAPABILITY_IAM",
"CAPABILITY_NAMED_IAM"
],
"role": "arn:aws:iam::312433241086:role/github-oidc-belodetek-Role-exdwzug18ntp"
},
{
"name": "cloudformation-s3-resources-playground",
"template": "aws/aws-cf-templates/state/s3.yaml",
"params": [
"BucketName=cfn-601eb2aa-79a1-11ee-a866-0efcede062c7-us-east-1",
"Versioning=false"
],
"tags": [
"Name=cloudformation-s3-resources",
"Environment=belodetek",
"cost-function=shared",
"cost-type=cloudformation"
],
"capabilities": [
"CAPABILITY_IAM",
"CAPABILITY_NAMED_IAM"
],
"role": "arn:aws:iam::312433241086:role/github-oidc-belodetek-Role-exdwzug18ntp"
}
]
}