|
| 1 | +# ArgoCD Capability |
| 2 | + |
| 3 | +The [ArgoCD capability](https://docs.aws.amazon.com/eks/latest/userguide/capabilities.html) enables GitOps-based continuous deployment, automatically syncing application resources to clusters from Git repositories. It integrates with AWS Identity Center for authentication and authorization. |
| 4 | + |
| 5 | +This is the AWS-managed alternative to the self-managed [ArgoCDAddOn](../addons/argocd.md). Using both on the same cluster will result in a conflict error. |
| 6 | + |
| 7 | +## Usage |
| 8 | + |
| 9 | +```typescript |
| 10 | +import * as blueprints from '@aws-quickstart/eks-blueprints'; |
| 11 | + |
| 12 | +const stack = blueprints.EksBlueprint.builder() |
| 13 | + .version("auto") |
| 14 | + .capabilities({ |
| 15 | + argocd: new blueprints.capabilities.ArgoCapability({ |
| 16 | + idcInstanceArn: "arn:aws:sso:::instance/ssoins-1234567890abcdef", |
| 17 | + }), |
| 18 | + }) |
| 19 | + .build(app, 'my-cluster'); |
| 20 | +``` |
| 21 | + |
| 22 | +## Configuration |
| 23 | + |
| 24 | +| Property | Type | Default | Description | |
| 25 | +|----------|------|---------|-------------| |
| 26 | +| `idcInstanceArn` | `string` | **Required** | AWS Identity Center instance ARN | |
| 27 | +| `idcManagedApplicationArn` | `string` | - | IDC managed application ARN | |
| 28 | +| `idcRegion` | `string` | - | IDC region | |
| 29 | +| `capabilityName` | `string` | `blueprints-argocd-capability` | Name for the capability resource | |
| 30 | +| `namespace` | `string` | `argocd` | Kubernetes namespace for ArgoCD | |
| 31 | +| `serverUrl` | `string` | - | ArgoCD server URL | |
| 32 | +| `networkAccessVpcEndpoints` | `IVpcEndpoint[]` | - | VPC endpoints for network access | |
| 33 | +| `roleMappings` | `Record<ArgoCDSsoRole, ...>` | - | SSO role-to-identity mappings | |
| 34 | +| `roleArn` | `string` | Auto-created | Existing IAM role ARN | |
| 35 | +| `tags` | `CfnTag[]` | - | CloudFormation tags | |
| 36 | + |
| 37 | +The default IAM policy is `AWSSecretsManagerClientReadOnlyAccess`. |
| 38 | + |
| 39 | +## Role Mappings |
| 40 | + |
| 41 | +Map AWS Identity Center users or groups to ArgoCD RBAC roles. Two approaches: |
| 42 | + |
| 43 | +**Simplified props:** |
| 44 | +```typescript |
| 45 | +new blueprints.capabilities.ArgoCapability({ |
| 46 | + idcInstanceArn: "arn:aws:sso:::instance/ssoins-1234567890abcdef", |
| 47 | + roleMappings: { |
| 48 | + adminUsers: ["<sso-user-id>"], |
| 49 | + viewerGroups: ["<sso-group-id>"], |
| 50 | + editorUsers: ["<sso-user-id>"], |
| 51 | + }, |
| 52 | +}) |
| 53 | +``` |
| 54 | + |
| 55 | +**Builder methods:** |
| 56 | +```typescript |
| 57 | +new blueprints.capabilities.ArgoCapability({ |
| 58 | + idcInstanceArn: "arn:aws:sso:::instance/ssoins-1234567890abcdef", |
| 59 | +}) |
| 60 | +.addAdmin("<sso-user-id>", blueprints.SsoIdentityType.SSO_USER) |
| 61 | +.addViewer("<sso-group-id>", blueprints.SsoIdentityType.SSO_GROUP) |
| 62 | +.addEditor("<sso-user-id>", blueprints.SsoIdentityType.SSO_USER) |
| 63 | +``` |
| 64 | + |
| 65 | +Both approaches can be combined — mappings are merged at deploy time. |
| 66 | + |
| 67 | +Available roles: `ADMIN`, `EDITOR`, `VIEWER`. |
0 commit comments