- GitHub organization
- AWS Account
- May spend some money...
- DONOT FORGOT TO DESTROY
- S3 Bucket for tfstate
- Route53 public hostedzone (
example.com
)- ArgoCD will use
argocd.example.com
(create by terraform) - Sample application will use
sample-app.example.com
(create by terraform)
- ArgoCD will use
cd resources/github
- Change
backend-config.hcl
for one's environment. cp example.tfvars example.auto.tfvars
, and edit (Comment out input values appropriately).- Setup backend:
terraform init -backend-config=backend-config.hcl
- Export GitHub Token:
export GITHUB_TOKEN=hogehoge
terraform plan
terraform apply
Following are abstract procedures. See document repo for complete description.
- Create application in one's organization.
- Install application to one's organiztion.
- Save pem file
github-app.pem
toresources/github
. - (optional) After installation, one can manage installation of GitHub App to a repository by terraform.
- Terraform requires
installation_id
shown after the first installation. - For installation, you need at least one repository.
- Terraform requires
Configure GitHub App and GitHub Secrets.
cd resources/github
- Edit
example.auto.tfvars
terraform plan
terraform apply
https://github.com/organizations/{your_org}/settings/applications
- Create OAuth application
- Generate Client secret
cd resources/argocd
- Edit
backend-config.hcl
cp example.tfvars example.auto.tfvars
, and editcp example-vaults.tfvars example-vaults.auto.tfvars
, and edit- Setup backend:
terraform init -backend-config=backend-config.hcl
terraform plan
terraform apply
: May take 20 minites or more.