You can now manage all your GitHub repositories wi...
# atmos
e
You can now manage all your GitHub repositories with Atmos https://github.com/cloudposse-terraform-components/aws-github-repository
Copy code
components:
  terraform:
    myrepo:
      metadata:
        component: aws-github-repository
      vars:
        enabled: true
        owner: acme-github-org
        repository:
          name: "my-repository"
          description: "My repository"
          homepage_url: "http://example.com/"
          topics:
            - terraform
            - github
            - test
        default_branch: "main"
        secrets:
          MY_SECRET: "my-secret-value"
          MY_SECRET_2: "nacl:dGVzdC12YWx1ZS0yCg=="
          MY_SECRET_3: "ssm://my/secret/path"
          MY_SECRET_4: "sm:secret-name"
        variables:
          MY_VARIABLE: "my-variable-value"
          MY_VARIABLE_2: "ssm://my/variable/path"
          MY_VARIABLE_3: "sm:variable-name"
This particular component implementation is using AWS SSM, hence the naming of the repository.
The reliance on AWS SSM is for retrieving secrets from a centralized storage for population into GitHub repositories as secrets.
The beauty of managing GitHub repositories this way is that each repository is its own instance of a component.
This avoids rate limiting issues on the GitHub API, since typically not all 1000 repositories are updated at the same time. Furthermore, if executed inside of a matrix, each one of those jobs would be a separate GitHub token, further mitigating issues of rate limits.
This supports the full implementation of the Terraform resource for managing a GitHub repository, including managing GitHub repository rulesets, secrets, environments, environment secrets, and so forth.
If you're managing a large GitHub organization, this is a nice thing to check out.
🐕 1