Repository navigation
Expand file tree
/
Copy pathREADME.yaml
More file actions
115 lines (107 loc) · 4.04 KB
/
Copy pathREADME.yaml
File metadata and controls
115 lines (107 loc) · 4.04 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
name: "aws-argocd-github-repo"
# Canonical GitHub repo
github_repo: "cloudposse-terraform-components/aws-argocd-github-repo"
# Short description of this project
description: |-
This component is responsible for creating and managing an ArgoCD desired state repository.
# How to use this project
usage: |-
**Stack Level**: Regional
The following are example snippets of how to use this component:
```yaml
# stacks/argocd/repo/default.yaml
components:
terraform:
argocd-repo:
vars:
enabled: true
github_user: ci-acme
github_user_email: ci@acme.com
github_organization: ACME
github_codeowner_teams:
- "@ACME/cloud-admins"
- "@ACME/cloud-posse"
# the team must be present in the org where the repository lives
# team_slug is the name of the team without the org
# e.g. `@cloudposse/engineering` is just `engineering`
permissions:
- team_slug: admins
permission: admin
- team_slug: bots
permission: admin
- team_slug: engineering
permission: push
```
```yaml
# stacks/argocd/repo/non-prod.yaml
import:
- catalog/argocd/repo/defaults
components:
terraform:
argocd-deploy-non-prod:
component: argocd-repo
settings:
spacelift:
workspace_enabled: true
vars:
name: argocd-deploy-non-prod
description: "ArgoCD desired state repository (Non-production) for ACME applications"
environments:
- tenant: mgmt
environment: uw2
stage: sandbox
```
```yaml
# stacks/mgmt-gbl-corp.yaml
import:
---
- catalog/argocd/repo/non-prod
```
If the repository already exists, it will need to be imported (replace names of IAM profile var file accordingly):
```bash
$ export TF_VAR_github_token_override=[REDACTED]
$ atmos terraform varfile argocd-deploy-non-prod -s mgmt-gbl-corp
$ cd components/terraform/argocd-repo
$ terraform import -var "import_profile_name=eg-mgmt-gbl-corp-admin" -var-file="mgmt-gbl-corp-argocd-deploy-non-prod.terraform.tfvars.json" "github_repository.default[0]" argocd-deploy-non-prod
$ atmos terraform varfile argocd-deploy-non-prod -s mgmt-gbl-corp
$ cd components/terraform/argocd-repo
$ terraform import -var "import_profile_name=eg-mgmt-gbl-corp-admin" -var-file="mgmt-gbl-corp-argocd-deploy-non-prod.terraform.tfvars.json" "github_branch.default[0]" argocd-deploy-non-prod:main
$ cd components/terraform/argocd-repo
$ terraform import -var "import_profile_name=eg-mgmt-gbl-corp-admin" -var-file="mgmt-gbl-corp-argocd-deploy-non-prod.terraform.tfvars.json" "github_branch_default.default[0]" argocd-deploy-non-prod
```
<!-- prettier-ignore-start -->
<!-- prettier-ignore-end -->
# References
references:
- name: cloudposse-terraform-components
url: https://github.com/orgs/cloudposse-terraform-components/repositories
description: "Cloud Posse's upstream component"
tags:
- component/argocd-repo
- layer/software-delivery
- provider/aws
- provider/github
# Categories of this project
categories:
- component/argocd-repo
- layer/software-delivery
- provider/aws
- provider/github
# License of this project
license: "APACHE2"
# Badges to display
badges:
- name: Latest Release
image: https://img.shields.io/github/release/cloudposse-terraform-components/aws-argocd-github-repo.svg?style=for-the-badge
url: https://github.com/cloudposse-terraform-components/aws-argocd-github-repo/releases/latest
- name: Slack Community
image: https://slack.cloudposse.com/for-the-badge.svg
url: https://slack.cloudposse.com
related:
- name: "Cloud Posse Terraform Modules"
description: Our collection of reusable Terraform modules used by our reference architectures.
url: "https://docs.cloudposse.com/modules/"
- name: "Atmos"
description: "Atmos is like docker-compose but for your infrastructure"
url: "https://atmos.tools"
contributors: [] # If included generates contribs