Skip to main content
Kubernetes/EKS only. On a VM, skip this page.
ⓘINFO
Wizard steps satisfied. This page satisfies Wizard Step 6 — Terraform state backend and prepares the CI/CD applier answer in Wizard Step 1 — Deployment path. When you run the wizard, enter the bucket name, lock table name, AWS region, GitHub repository, and role ARN prepared here.
⚠WARNING
Do not continue with the wizard until you know the S3 bucket name, DynamoDB lock table name, and AWS region. These are required inputs for Wizard Step 6 — Terraform state backend. In most organizations, these values are provided by the AWS/platform team. The optional helper commands at the end of this page are only for teams that do not already have an approved Terraform state backend.
Use this task when your deployment path includes:
This page creates the customer-owned CI runner IAM role. It is not the same identity as the Sariva platform pod identity.
ⓘINFO
Keep the two GitHub credentials separate. The Sariva platform GitHub token lets Sariva open pull requests in your GitOps repository. The GitHub Actions AWS role lets GitHub Actions access AWS resources such as the S3 state bucket, DynamoDB lock table, and selected AWS credential-store paths. They are different credentials with different purposes.

1. Collect the state backend details

Ask the AWS/platform team for these values before running the setup wizard. Set local variables for the commands below. Replace the example values with your customer/project values:
These variables are used only by the helper commands on this page. The setup wizard will ask you for the same state bucket, lock table, region, GitHub repository, and role ARN later.

2. Validate the existing S3 bucket and DynamoDB table

Check that the S3 bucket exists in the expected region:
For us-east-1, AWS may return None or an empty value. For other regions, the output should match $AWS_REGION. Check versioning:
Expected result:
Check encryption:
Expected result: the bucket has default server-side encryption enabled. Check public access block:
Expected result: all four public access block settings are true. Check the DynamoDB lock table:
Expected result:
  • table status is ACTIVE
  • billing mode is PAY_PER_REQUEST
  • hash key is LockID
!DANGER
Stop if validation fails. Do not run the setup wizard with guessed bucket or table values. If the backend details are wrong, the first Terraform run fails at terraform init, and the generated GitOps workflow will not be able to manage infrastructure.

3. Confirm the GitHub OIDC provider in AWS

GitHub Actions should authenticate to AWS through OIDC instead of static AWS access keys. Check whether the provider already exists:
If the command returns nothing, create the provider:
Expected result: AWS has an OIDC provider for token.actions.githubusercontent.com.

4. Create the GitHub Actions Terraform deploy role

Create trust-policy.json:
Create the role:
!DANGER
Do not use a broad GitHub OIDC trust policy. For production, narrow the trust policy to a protected branch or environment, for example repo:<owner>/<repo>:ref:refs/heads/main or repo:<owner>/<repo>:environment:production.

5. Grant the role access to Terraform state

Create terraform-state-policy.json:
Attach it to the GitHub Actions role:
✓SUCCESS
This role now has Terraform backend access. The role can read and write the Terraform state object in S3 and use the DynamoDB lock table. Keep this base policy small, then add credential-store permissions only when the selected path needs them.

6. Add credential-store permissions when using AWS Secrets Manager or SSM

The base role above is enough for Terraform state only. If this deployment path stores Kafka credentials in AWS Secrets Manager or AWS SSM Parameter Store, the GitHub Actions role also needs access to the credential-store paths.
ⓘINFO
Credential source and Kafka credential store are different. credentialSource is where GitHub Actions reads CI inputs such as CONFLUENT_CLOUD_API_KEY. The Kafka credential store is where per-Kafka-cluster admin and observability credentials live after the Kafka cluster exists.

Required when using AWS Secrets Manager as the Kafka credential store

GitHub Actions needs to:
  • read the manually-created Kafka admin key from <stage>/<env>/clusters/<cluster>/kafka-admin so Terraform can configure topics, ACLs, and cluster-layer resources;
  • write the Sariva-created observability key to <stage>/<env>/clusters/<cluster>/observability-reader;
  • call GetResourcePolicy during Terraform create/refresh. Without it, the apply can fail after the Secret shell is created and before the value is written.
Create an additional policy for the same GitHub Actions role:
⚠WARNING
The GitHub Actions role and the pod AWS identity need different permissions. The GitHub Actions role reads the admin credential and writes the observability credential during Terraform apply. The Sariva platform pod reads only the observability credential at runtime. Do not grant the pod access to the admin Kafka key.

Required when using AWS SSM Parameter Store as the Kafka credential store

If the Kafka credential store is AWS SSM Parameter Store, grant the GitHub Actions role permission to read the admin parameter and write the observability parameter. Add KMS permissions when SecureString parameters use a customer-managed KMS key.

Matching pod read permission

The Sariva pod reads the observability credential at runtime. Configure the pod AWS identity on Wire the pod’s AWS identity so it can read only the observability leaf:

7. Add the AWS role ARN as a GitHub Actions secret

The generated workflow assumes the AWS role through OIDC, so it needs the role ARN as a repository secret. This is an AWS-auth secret and is required regardless of where your Confluent Cloud credentials live.

Option A — GitHub UI

Use this option if you do not have the GitHub CLI installed.
  1. Open the GitHub repository that will hold the Sariva GitOps scaffold.
  2. Go to Settings.
  3. Go to Secrets and variables.
  4. Select Actions.
  5. Select New repository secret.
  6. Add the following secret.

Option B — GitHub CLI

Use this option only if gh is installed and authenticated.
ⓘINFO
The Confluent Cloud OrganizationAdmin key is set separately. Where it lives depends on your credential source — GitHub Actions secrets or AWS SSM Parameter Store — so it is not always a GitHub secret. Set it on Confluent Cloud credentials for CI, which forks by your credentialSource choice. The Confluent Cloud metrics key is different again: it goes into the Sariva runtime Secret so the platform pod can read metrics.

8. Validate the role and AWS secret

Validate the role:
If you used the GitHub UI, confirm the secret name in:
If you used the GitHub CLI, run:
Expected from this page before the first Terraform apply:
The Confluent Cloud CONFLUENT_CLOUD_API_KEY / CONFLUENT_CLOUD_API_SECRET inputs are set and validated on Confluent Cloud credentials for CI — as GitHub secrets or SSM parameters depending on your credential source. Per-Kafka-cluster admin and observability credentials are not GitHub Actions secrets in the AWS-native credential-store path; they live in AWS Secrets Manager or SSM.

9. Values to enter in the setup wizard

When the wizard asks for Terraform state and CI authentication, enter the values you prepared here.

Optional helper: create a new state bucket and lock table

Use this only when your organization does not already have an approved Terraform state backend for Sariva.
After creation, return to Step 2 on this page and validate the backend.

Continue the deployment path

Next: Confluent Cloud credentials for CI

Provide the OrganizationAdmin Cloud API key to CI — as a GitHub secret or SSM parameter, per your credential source.

Back to the deployment path

Return to the full path map if you want to confirm where this task fits.
If the state backend or OIDC role is wrong, the first visible failure usually appears during the GitHub Actions AWS credential step or during terraform init.