feat(ci): split acceptance tests into 37 parallel groups for faster
Some checks failed
CI / lint (push) Has been cancelled
CI / test (push) Has been cancelled

CI

  Previously, acceptance tests were split into only 3 groups:
  - magic (4 services, sequential)
  - organization (2 services)
  - default (140+ services)

  This resulted in the 'default' group taking a very long time to
  complete
  and blocking the entire CI pipeline.

  This change reorganizes all acceptance tests into 37 logical groups,
  with each group containing 1-6 related services. Groups are
  organized by:
  - Product family (workers, email, zero trust, etc.)
  - Resource type (zone, account, tunnel, etc.)
  - Shared dependencies

  Key improvements:
  - All test groups after 'magic' now run in parallel
  - Services with dependencies are kept in the same group
  - Better resource isolation and failure containment
  - Significantly faster CI execution time

  Updated files:
  - scripts/run-ci-tests: Added 35 new product group definitions
  - .github/workflows/acceptance-tests.yml: Added 37 parallel test
  jobs
This commit is contained in:
Tamas Jozsa 2025-12-12 15:04:08 -08:00
parent bcda246d18
commit 8c6212b4c4
4 changed files with 1180 additions and 88 deletions

View file

@ -7,35 +7,38 @@ on:
push:
branches:
- "release-please**"
env:
CLOUDFLARE_ACCOUNT_ID: f037e56e89293a057740de681ac9abbe
CLOUDFLARE_ALT_DOMAIN: terraform-alt.cfapi.net
CLOUDFLARE_ALT_ZONE_ID: ed9caae55809bfe3209699f602ce17fc
CLOUDFLARE_DOMAIN: terraform.cfapi.net
CLOUDFLARE_ZONE_ID: 0da42c8d2132a9ddaf714f9e7c920711
CLOUDFLARE_MUTUAL_TLS_CERTIFICATE: "-----BEGIN CERTIFICATE-----\nMIIF+DCCA+CgAwIBAgIUWc0b+WiKSZob8wl2g/ujewoKCvgwDQYJKoZIhvcNAQEN\nBQAwgZMxCzAJBgNVBAYTAlVTMQwwCgYDVQQIEwNOL0ExDDAKBgNVBAcTA04vQTEl\nMCMGA1UEChMcVGVycmFmb3JtIEFjY2VwdGFuY2UgVGVzdGluZzEMMAoGA1UECxMD\nTi9BMTMwMQYDVQQDEypUZXJyYWZvcm0gQWNjZXB0YW5jZSBUZXN0aW5nIENBIDE2\nMTgyODU5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StM4ZTFmvpp6lASxuxOkNYZXzANBgkqhkiG\n9w0BAQ0FAAOCAgEACIs9YskrLq3huQXsPDQhHBu8/SLQTAtkj5vtYf1uSq6MXx1k\nj6nDzvixnLam/4HhrsJQyI3FjXnk5yNwaAVA1hQoVw0G2on4qk215fsIRJUKjlzK\npUfW49TFWZ+DPlhBJ/dmHSZsxG940p4xWmNjo2aJ2CraCgP2ns+FfPxXqtpthf1y\nVW5SxKhR9VYNLczXEz8fKvDTLictYYwQ/xFZjxPHpOdV8+DoL18brNKHN8Hs/Nk1\nkzhKrDk8fReEX+jmpG7n/q973nJ31KIBxk85owv/BFgnWpC7HPY+waIH0xNr2iZA\nOu1orlBiBYAqG8zDBq3AGVlxg8yUOc5bik9OhCIwYyT2RFmd6z4O36uIM3LEzJ64\nJj8TTjOP/ktqu+GZrUrnIjfu7mlGvc4u22P8ILJ2AZe5ITp/uhMRJbGbJGEMCCH3\nkAKIEDATrevGdmgWUpdj8RNBS7+BK98eN+vcDqtY4Sudri2TwTkMbAscraacqrSJ\n4rJfjSywVr4oWXyd2P83Hl398X3x04E0Rc15+wrGvaCSN5i1gzc30fTlz1X8dJQ3\nccaHajJlRVZfuCrFBk6m5YRL7AoG4iFfoOuDZZJpjr9nXEzEONhRR5QAG83yMedS\nd8//SuQhuJQTxJW7UzkWaao+32gW/RvuQun0XtCNoow/kMVMOeSjKL9xioM=\n-----END CERTIFICATE-----"
CLOUDFLARE_LOGPUSH_OWNERSHIP_TOKEN: ${{ secrets.CLOUDFLARE_LOGPUSH_OWNERSHIP_TOKEN }}
CLOUDFLARE_WORKSPACE_ONE_CLIENT_ID: d0ed71f01c884e8b94ec4e4d6639f609
CLOUDFLARE_WORKSPACE_ONE_CLIENT_SECRET: ${{ secrets.CLOUDFLARE_WORKSPACE_ONE_CLIENT_SECRET }}
CLOUDFLARE_WORKSPACE_ONE_API_URL: ${{ secrets.CLOUDFLARE_WORKSPACE_ONE_API_URL }}
CLOUDFLARE_WORKSPACE_ONE_AUTH_URL: ${{ secrets.CLOUDFLARE_WORKSPACE_ONE_AUTH_URL }}
CLOUDFLARE_PAGES_OWNER: cloudflare
CLOUDFLARE_PAGES_REPO: cf-pages-terraform-acceptance-testing
CLOUDFLARE_R2_ACCESS_KEY_ID: ${{ secrets.CLOUDFLARE_R2_ACCESS_KEY_ID }}
CLOUDFLARE_R2_ACCESS_KEY_SECRET: ${{ secrets.CLOUDFLARE_R2_ACCESS_KEY_SECRET }}
CLOUDFLARE_HYPERDRIVE_DATABASE_NAME: neondb
CLOUDFLARE_HYPERDRIVE_DATABASE_PORT: 5432
CLOUDFLARE_HYPERDRIVE_DATABASE_USER: neondb_owner
CLOUDFLARE_HYPERDRIVE_DATABASE_PASSWORD: ${{ secrets.CLOUDFLARE_HYPERDRIVE_DATABASE_PASSWORD }}
CLOUDFLARE_HYPERDRIVE_DATABASE_HOSTNAME: ${{ secrets.CLOUDFLARE_HYPERDRIVE_DATABASE_HOSTNAME }}
TF_ACC: 1
TF_MIGRATE_BINARY_PATH: ${{ github.workspace }}/tf-migrate
jobs:
acceptance-tests:
name: Acceptance Tests
test_magic:
name: Magic Tests
runs-on: ${{ github.repository == 'stainless-sdks/cloudflare-terraform' && 'depot-ubuntu-24.04' || 'lx64' }}
env:
CLOUDFLARE_ACCOUNT_ID: f037e56e89293a057740de681ac9abbe
CLOUDFLARE_ALT_DOMAIN: terraform-alt.cfapi.net
CLOUDFLARE_ALT_ZONE_ID: ed9caae55809bfe3209699f602ce17fc
CLOUDFLARE_DOMAIN: terraform.cfapi.net
CLOUDFLARE_EMAIL: terraform-acceptance-test@cfapi.net
CLOUDFLARE_ZONE_ID: 0da42c8d2132a9ddaf714f9e7c920711
CLOUDFLARE_MUTUAL_TLS_CERTIFICATE: "-----BEGIN CERTIFICATE-----\\nMIIF+DCCA+CgAwIBAgIUWc0b+WiKSZob8wl2g/ujewoKCvgwDQYJKoZIhvcNAQEN\\nBQAwgZMxCzAJBgNVBAYTAlVTMQwwCgYDVQQIEwN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API_USER_SERVICE_KEY: ${{ secrets.CLOUDFLARE_API_USER_SERVICE_KEY }}
CLOUDFLARE_LOGPUSH_OWNERSHIP_TOKEN: ${{ secrets.CLOUDFLARE_LOGPUSH_OWNERSHIP_TOKEN }}
CLOUDFLARE_WORKSPACE_ONE_CLIENT_ID: d0ed71f01c884e8b94ec4e4d6639f609
CLOUDFLARE_WORKSPACE_ONE_CLIENT_SECRET: ${{ secrets.CLOUDFLARE_WORKSPACE_ONE_CLIENT_SECRET }}
CLOUDFLARE_WORKSPACE_ONE_API_URL: ${{ secrets.CLOUDFLARE_WORKSPACE_ONE_API_URL }}
CLOUDFLARE_WORKSPACE_ONE_AUTH_URL: ${{ secrets.CLOUDFLARE_WORKSPACE_ONE_AUTH_URL }}
CLOUDFLARE_PAGES_OWNER: cloudflare
CLOUDFLARE_PAGES_REPO: cf-pages-terraform-acceptance-testing
CLOUDFLARE_R2_ACCESS_KEY_ID: ${{ secrets.CLOUDFLARE_R2_ACCESS_KEY_ID }}
CLOUDFLARE_R2_ACCESS_KEY_SECRET: ${{ secrets.CLOUDFLARE_R2_ACCESS_KEY_SECRET }}
CLOUDFLARE_HYPERDRIVE_DATABASE_NAME: neondb
CLOUDFLARE_HYPERDRIVE_DATABASE_PORT: 5432
CLOUDFLARE_HYPERDRIVE_DATABASE_USER: neondb_owner
CLOUDFLARE_HYPERDRIVE_DATABASE_PASSWORD: ${{ secrets.CLOUDFLARE_HYPERDRIVE_DATABASE_PASSWORD }}
CLOUDFLARE_HYPERDRIVE_DATABASE_HOSTNAME: ${{ secrets.CLOUDFLARE_HYPERDRIVE_DATABASE_HOSTNAME }}
CLOUDFLARE_EMAIL: tf-acct-magic-magic@cfapi.net
CLOUDFLARE_API_KEY: ${{ secrets.TF_ACCT_MAGIC_MAGIC_API_KEY }}
steps:
- uses: actions/checkout@v4
@ -44,72 +47,825 @@ jobs:
with:
go-version-file: ./go.mod
- name: Setup node
uses: actions/setup-node@v4
with:
node-version: 24
- name: Bootstrap
run: ./scripts/bootstrap
- name: Install grit
run: npm install -g @getgrit/cli
- name: Run Magic Tests
run: ./scripts/run-ci-tests magic acceptance
test_organization:
name: Organization Tests
runs-on: ${{ github.repository == 'stainless-sdks/cloudflare-terraform' && 'depot-ubuntu-24.04' || 'lx64' }}
env:
CLOUDFLARE_EMAIL: orgs-terraform-user@cfapi.net
CLOUDFLARE_API_KEY: ${{ secrets.CLOUDFLARE_ORG_API_KEY }}
CLOUDFLARE_ORGANIZATION_ID: 48684ccf40084424e26b7c0ab79e09dc
steps:
- uses: actions/checkout@v4
- name: Setup go
uses: actions/setup-go@v5
with:
go-version-file: ./go.mod
- name: Bootstrap
run: ./scripts/bootstrap
- name: Build tf-migrate
run: ./scripts/build-tf-migrate.sh
######## Magic Tests ########
- name: Run Magic Acceptance Tests
id: magic_acceptance_tests
run: ./scripts/run-ci-tests magic acceptance
env:
TF_ACC: 1
TF_MIGRATE_BINARY_PATH: ${{ github.workspace }}/tf-migrate
continue-on-error: true
# - name: Run Magic Migration Tests
# id: magic_migration_tests
# run: ./scripts/run-ci-tests magic migration
# env:
# TF_ACC: 1
# TF_MIGRATE_BINARY_PATH: ${{ github.workspace }}/tf-migrate
# continue-on-error: true
######## Organization Tests ########
# These tests require a specific user with organization permissions
- name: Run Organization Acceptance Tests
id: organization_acceptance_tests
- name: Run Organization Tests
run: ./scripts/run-ci-tests organization acceptance
env:
TF_ACC: 1
# Override credentials for organization tests
CLOUDFLARE_EMAIL: orgs-terraform-user@cfapi.net
CLOUDFLARE_API_KEY: ${{ secrets.CLOUDFLARE_ORG_API_KEY }}
CLOUDFLARE_ORGANIZATION_ID: 48684ccf40084424e26b7c0ab79e09dc
continue-on-error: true
######## Everything Else ########
- name: Run Default Acceptance Tests
id: default_acceptance_tests
test_zone_core:
name: Zone Core Tests
runs-on: ${{ github.repository == 'stainless-sdks/cloudflare-terraform' && 'depot-ubuntu-24.04' || 'lx64' }}
env:
CLOUDFLARE_EMAIL: tf-acct-zone-zone-core@cfapi.net
CLOUDFLARE_API_KEY: ${{ secrets.TF_ACCT_ZONE_ZONE_CORE_API_KEY }}
steps:
- uses: actions/checkout@v4
- name: Setup go
uses: actions/setup-go@v5
with:
go-version-file: ./go.mod
- name: Bootstrap
run: ./scripts/bootstrap
- name: Run Zone Core Tests
run: ./scripts/run-ci-tests zone-core acceptance
test_zone_settings:
name: Zone Settings Tests
runs-on: ${{ github.repository == 'stainless-sdks/cloudflare-terraform' && 'depot-ubuntu-24.04' || 'lx64' }}
env:
CLOUDFLARE_EMAIL: tf-acct-zone-zone-settings@cfapi.net
CLOUDFLARE_API_KEY: ${{ secrets.TF_ACCT_ZONE_ZONE_SETTINGS_API_KEY }}
steps:
- uses: actions/checkout@v4
- name: Setup go
uses: actions/setup-go@v5
with:
go-version-file: ./go.mod
- name: Bootstrap
run: ./scripts/bootstrap
- name: Run Zone Settings Tests
run: ./scripts/run-ci-tests zone-settings acceptance
test_dns:
name: DNS Tests
runs-on: ${{ github.repository == 'stainless-sdks/cloudflare-terraform' && 'depot-ubuntu-24.04' || 'lx64' }}
env:
CLOUDFLARE_EMAIL: tf-acct-dns-dns@cfapi.net
CLOUDFLARE_API_KEY: ${{ secrets.TF_ACCT_DNS_DNS_API_KEY }}
steps:
- uses: actions/checkout@v4
- name: Setup go
uses: actions/setup-go@v5
with:
go-version-file: ./go.mod
- name: Bootstrap
run: ./scripts/bootstrap
- name: Run DNS Tests
run: ./scripts/run-ci-tests dns acceptance
test_load_balancing:
name: Load Balancing Tests
runs-on: ${{ github.repository == 'stainless-sdks/cloudflare-terraform' && 'depot-ubuntu-24.04' || 'lx64' }}
env:
CLOUDFLARE_EMAIL: tf-acct-load-balancing-load-balancing@cfapi.net
CLOUDFLARE_API_KEY: ${{ secrets.TF_ACCT_LOAD_BALANCING_LOAD_BALANCING_API_KEY }}
steps:
- uses: actions/checkout@v4
- name: Setup go
uses: actions/setup-go@v5
with:
go-version-file: ./go.mod
- name: Bootstrap
run: ./scripts/bootstrap
- name: Run Load Balancing Tests
run: ./scripts/run-ci-tests load-balancing acceptance
test_workers_core:
name: Workers Core Tests
runs-on: ${{ github.repository == 'stainless-sdks/cloudflare-terraform' && 'depot-ubuntu-24.04' || 'lx64' }}
env:
CLOUDFLARE_EMAIL: tf-acct-workers-workers-core@cfapi.net
CLOUDFLARE_API_KEY: ${{ secrets.TF_ACCT_WORKERS_WORKERS_CORE_API_KEY }}
steps:
- uses: actions/checkout@v4
- name: Setup go
uses: actions/setup-go@v5
with:
go-version-file: ./go.mod
- name: Bootstrap
run: ./scripts/bootstrap
- name: Run Workers Core Tests
run: ./scripts/run-ci-tests workers-core acceptance
test_workers_extended:
name: Workers Extended Tests
runs-on: ${{ github.repository == 'stainless-sdks/cloudflare-terraform' && 'depot-ubuntu-24.04' || 'lx64' }}
env:
CLOUDFLARE_EMAIL: tf-acct-workers-workers-extended@cfapi.net
CLOUDFLARE_API_KEY: ${{ secrets.TF_ACCT_WORKERS_WORKERS_EXTENDED_API_KEY }}
steps:
- uses: actions/checkout@v4
- name: Setup go
uses: actions/setup-go@v5
with:
go-version-file: ./go.mod
- name: Bootstrap
run: ./scripts/bootstrap
- name: Run Workers Extended Tests
run: ./scripts/run-ci-tests workers-extended acceptance
test_workers_platform:
name: Workers Platform Tests
runs-on: ${{ github.repository == 'stainless-sdks/cloudflare-terraform' && 'depot-ubuntu-24.04' || 'lx64' }}
env:
CLOUDFLARE_EMAIL: tf-acct-workers-workers-platform@cfapi.net
CLOUDFLARE_API_KEY: ${{ secrets.TF_ACCT_WORKERS_WORKERS_PLATFORM_API_KEY }}
steps:
- uses: actions/checkout@v4
- name: Setup go
uses: actions/setup-go@v5
with:
go-version-file: ./go.mod
- name: Bootstrap
run: ./scripts/bootstrap
- name: Run Workers Platform Tests
run: ./scripts/run-ci-tests workers-platform acceptance
test_email_routing:
name: Email Routing Tests
runs-on: ${{ github.repository == 'stainless-sdks/cloudflare-terraform' && 'depot-ubuntu-24.04' || 'lx64' }}
env:
CLOUDFLARE_EMAIL: tf-acct-email-email-routing@cfapi.net
CLOUDFLARE_API_KEY: ${{ secrets.TF_ACCT_EMAIL_EMAIL_ROUTING_API_KEY }}
steps:
- uses: actions/checkout@v4
- name: Setup go
uses: actions/setup-go@v5
with:
go-version-file: ./go.mod
- name: Bootstrap
run: ./scripts/bootstrap
- name: Run Email Routing Tests
run: ./scripts/run-ci-tests email-routing acceptance
test_email_security:
name: Email Security Tests
runs-on: ${{ github.repository == 'stainless-sdks/cloudflare-terraform' && 'depot-ubuntu-24.04' || 'lx64' }}
env:
CLOUDFLARE_EMAIL: tf-acct-email-email-security@cfapi.net
CLOUDFLARE_API_KEY: ${{ secrets.TF_ACCT_EMAIL_EMAIL_SECURITY_API_KEY }}
steps:
- uses: actions/checkout@v4
- name: Setup go
uses: actions/setup-go@v5
with:
go-version-file: ./go.mod
- name: Bootstrap
run: ./scripts/bootstrap
- name: Run Email Security Tests
run: ./scripts/run-ci-tests email-security acceptance
test_security_core:
name: Security Core Tests
runs-on: ${{ github.repository == 'stainless-sdks/cloudflare-terraform' && 'depot-ubuntu-24.04' || 'lx64' }}
env:
CLOUDFLARE_EMAIL: tf-acct-security-security-core@cfapi.net
CLOUDFLARE_API_KEY: ${{ secrets.TF_ACCT_SECURITY_SECURITY_CORE_API_KEY }}
steps:
- uses: actions/checkout@v4
- name: Setup go
uses: actions/setup-go@v5
with:
go-version-file: ./go.mod
- name: Bootstrap
run: ./scripts/bootstrap
- name: Run Security Core Tests
run: ./scripts/run-ci-tests security-core acceptance
test_security_advanced:
name: Security Advanced Tests
runs-on: ${{ github.repository == 'stainless-sdks/cloudflare-terraform' && 'depot-ubuntu-24.04' || 'lx64' }}
env:
CLOUDFLARE_EMAIL: tf-acct-security-security-advanced@cfapi.net
CLOUDFLARE_API_KEY: ${{ secrets.TF_ACCT_SECURITY_SECURITY_ADVANCED_API_KEY }}
steps:
- uses: actions/checkout@v4
- name: Setup go
uses: actions/setup-go@v5
with:
go-version-file: ./go.mod
- name: Bootstrap
run: ./scripts/bootstrap
- name: Run Security Advanced Tests
run: ./scripts/run-ci-tests security-advanced acceptance
test_rules_and_policies:
name: Rules and Policies Tests
runs-on: ${{ github.repository == 'stainless-sdks/cloudflare-terraform' && 'depot-ubuntu-24.04' || 'lx64' }}
env:
CLOUDFLARE_EMAIL: tf-acct-rules-rules-and-policies@cfapi.net
CLOUDFLARE_API_KEY: ${{ secrets.TF_ACCT_RULES_RULES_AND_POLICIES_API_KEY }}
steps:
- uses: actions/checkout@v4
- name: Setup go
uses: actions/setup-go@v5
with:
go-version-file: ./go.mod
- name: Bootstrap
run: ./scripts/bootstrap
- name: Run Rules and Policies Tests
run: ./scripts/run-ci-tests rules-and-policies acceptance
test_snippets:
name: Snippets Tests
runs-on: ${{ github.repository == 'stainless-sdks/cloudflare-terraform' && 'depot-ubuntu-24.04' || 'lx64' }}
env:
CLOUDFLARE_EMAIL: tf-acct-snippets-snippets@cfapi.net
CLOUDFLARE_API_KEY: ${{ secrets.TF_ACCT_SNIPPETS_SNIPPETS_API_KEY }}
steps:
- uses: actions/checkout@v4
- name: Setup go
uses: actions/setup-go@v5
with:
go-version-file: ./go.mod
- name: Bootstrap
run: ./scripts/bootstrap
- name: Run Snippets Tests
run: ./scripts/run-ci-tests snippets acceptance
test_tls_and_certificates:
name: TLS and Certificates Tests
runs-on: ${{ github.repository == 'stainless-sdks/cloudflare-terraform' && 'depot-ubuntu-24.04' || 'lx64' }}
env:
CLOUDFLARE_EMAIL: tf-acct-tls-tls-and-certificates@cfapi.net
CLOUDFLARE_API_KEY: ${{ secrets.TF_ACCT_TLS_TLS_AND_CERTIFICATES_API_KEY }}
steps:
- uses: actions/checkout@v4
- name: Setup go
uses: actions/setup-go@v5
with:
go-version-file: ./go.mod
- name: Bootstrap
run: ./scripts/bootstrap
- name: Run TLS and Certificates Tests
run: ./scripts/run-ci-tests tls-and-certificates acceptance
test_ssl_config:
name: SSL Config Tests
runs-on: ${{ github.repository == 'stainless-sdks/cloudflare-terraform' && 'depot-ubuntu-24.04' || 'lx64' }}
env:
CLOUDFLARE_EMAIL: tf-acct-ssl-ssl-config@cfapi.net
CLOUDFLARE_API_KEY: ${{ secrets.TF_ACCT_SSL_SSL_CONFIG_API_KEY }}
steps:
- uses: actions/checkout@v4
- name: Setup go
uses: actions/setup-go@v5
with:
go-version-file: ./go.mod
- name: Bootstrap
run: ./scripts/bootstrap
- name: Run SSL Config Tests
run: ./scripts/run-ci-tests ssl-config acceptance
test_web_features:
name: Web Features Tests
runs-on: ${{ github.repository == 'stainless-sdks/cloudflare-terraform' && 'depot-ubuntu-24.04' || 'lx64' }}
env:
CLOUDFLARE_EMAIL: tf-acct-web-web-features@cfapi.net
CLOUDFLARE_API_KEY: ${{ secrets.TF_ACCT_WEB_WEB_FEATURES_API_KEY }}
steps:
- uses: actions/checkout@v4
- name: Setup go
uses: actions/setup-go@v5
with:
go-version-file: ./go.mod
- name: Bootstrap
run: ./scripts/bootstrap
- name: Run Web Features Tests
run: ./scripts/run-ci-tests web-features acceptance
test_web_monitoring:
name: Web Monitoring Tests
runs-on: ${{ github.repository == 'stainless-sdks/cloudflare-terraform' && 'depot-ubuntu-24.04' || 'lx64' }}
env:
CLOUDFLARE_EMAIL: tf-acct-web-web-monitoring@cfapi.net
CLOUDFLARE_API_KEY: ${{ secrets.TF_ACCT_WEB_WEB_MONITORING_API_KEY }}
steps:
- uses: actions/checkout@v4
- name: Setup go
uses: actions/setup-go@v5
with:
go-version-file: ./go.mod
- name: Bootstrap
run: ./scripts/bootstrap
- name: Run Web Monitoring Tests
run: ./scripts/run-ci-tests web-monitoring acceptance
test_waiting_room:
name: Waiting Room Tests
runs-on: ${{ github.repository == 'stainless-sdks/cloudflare-terraform' && 'depot-ubuntu-24.04' || 'lx64' }}
env:
CLOUDFLARE_EMAIL: tf-acct-waiting-room-waiting-room@cfapi.net
CLOUDFLARE_API_KEY: ${{ secrets.TF_ACCT_WAITING_ROOM_WAITING_ROOM_API_KEY }}
steps:
- uses: actions/checkout@v4
- name: Setup go
uses: actions/setup-go@v5
with:
go-version-file: ./go.mod
- name: Bootstrap
run: ./scripts/bootstrap
- name: Run Waiting Room Tests
run: ./scripts/run-ci-tests waiting-room acceptance
test_performance:
name: Performance Tests
runs-on: ${{ github.repository == 'stainless-sdks/cloudflare-terraform' && 'depot-ubuntu-24.04' || 'lx64' }}
env:
CLOUDFLARE_EMAIL: tf-acct-performance-performance@cfapi.net
CLOUDFLARE_API_KEY: ${{ secrets.TF_ACCT_PERFORMANCE_PERFORMANCE_API_KEY }}
steps:
- uses: actions/checkout@v4
- name: Setup go
uses: actions/setup-go@v5
with:
go-version-file: ./go.mod
- name: Bootstrap
run: ./scripts/bootstrap
- name: Run Performance Tests
run: ./scripts/run-ci-tests performance acceptance
test_cdn_advanced:
name: CDN Advanced Tests
runs-on: ${{ github.repository == 'stainless-sdks/cloudflare-terraform' && 'depot-ubuntu-24.04' || 'lx64' }}
env:
CLOUDFLARE_EMAIL: tf-acct-cdn-cdn-advanced@cfapi.net
CLOUDFLARE_API_KEY: ${{ secrets.TF_ACCT_CDN_CDN_ADVANCED_API_KEY }}
steps:
- uses: actions/checkout@v4
- name: Setup go
uses: actions/setup-go@v5
with:
go-version-file: ./go.mod
- name: Bootstrap
run: ./scripts/bootstrap
- name: Run CDN Advanced Tests
run: ./scripts/run-ci-tests cdn-advanced acceptance
test_gateway_and_policies:
name: Gateway and Policies Tests
runs-on: ${{ github.repository == 'stainless-sdks/cloudflare-terraform' && 'depot-ubuntu-24.04' || 'lx64' }}
env:
CLOUDFLARE_EMAIL: tf-acct-zero-trust-gateway-and-policies@cfapi.net
CLOUDFLARE_API_KEY: ${{ secrets.TF_ACCT_ZERO_TRUST_GATEWAY_AND_POLICIES_API_KEY }}
steps:
- uses: actions/checkout@v4
- name: Setup go
uses: actions/setup-go@v5
with:
go-version-file: ./go.mod
- name: Bootstrap
run: ./scripts/bootstrap
- name: Run Gateway and Policies Tests
run: ./scripts/run-ci-tests gateway-and-policies acceptance
test_dlp_config:
name: DLP Config Tests
runs-on: ${{ github.repository == 'stainless-sdks/cloudflare-terraform' && 'depot-ubuntu-24.04' || 'lx64' }}
env:
CLOUDFLARE_EMAIL: tf-acct-zero-trust-dlp-config@cfapi.net
CLOUDFLARE_API_KEY: ${{ secrets.TF_ACCT_ZERO_TRUST_DLP_CONFIG_API_KEY }}
steps:
- uses: actions/checkout@v4
- name: Setup go
uses: actions/setup-go@v5
with:
go-version-file: ./go.mod
- name: Bootstrap
run: ./scripts/bootstrap
- name: Run DLP Config Tests
run: ./scripts/run-ci-tests dlp-config acceptance
test_access_core:
name: Access Core Tests
runs-on: ${{ github.repository == 'stainless-sdks/cloudflare-terraform' && 'depot-ubuntu-24.04' || 'lx64' }}
env:
CLOUDFLARE_EMAIL: tf-acct-zero-trust-access-core@cfapi.net
CLOUDFLARE_API_KEY: ${{ secrets.TF_ACCT_ZERO_TRUST_ACCESS_CORE_API_KEY }}
steps:
- uses: actions/checkout@v4
- name: Setup go
uses: actions/setup-go@v5
with:
go-version-file: ./go.mod
- name: Bootstrap
run: ./scripts/bootstrap
- name: Run Access Core Tests
run: ./scripts/run-ci-tests access-core acceptance
test_access_identity:
name: Access Identity Tests
runs-on: ${{ github.repository == 'stainless-sdks/cloudflare-terraform' && 'depot-ubuntu-24.04' || 'lx64' }}
env:
CLOUDFLARE_EMAIL: tf-acct-zero-trust-access-identity@cfapi.net
CLOUDFLARE_API_KEY: ${{ secrets.TF_ACCT_ZERO_TRUST_ACCESS_IDENTITY_API_KEY }}
steps:
- uses: actions/checkout@v4
- name: Setup go
uses: actions/setup-go@v5
with:
go-version-file: ./go.mod
- name: Bootstrap
run: ./scripts/bootstrap
- name: Run Access Identity Tests
run: ./scripts/run-ci-tests access-identity acceptance
test_access_mtls:
name: Access mTLS Tests
runs-on: ${{ github.repository == 'stainless-sdks/cloudflare-terraform' && 'depot-ubuntu-24.04' || 'lx64' }}
env:
CLOUDFLARE_EMAIL: tf-acct-zero-trust-access-mtls@cfapi.net
CLOUDFLARE_API_KEY: ${{ secrets.TF_ACCT_ZERO_TRUST_ACCESS_MTLS_API_KEY }}
steps:
- uses: actions/checkout@v4
- name: Setup go
uses: actions/setup-go@v5
with:
go-version-file: ./go.mod
- name: Bootstrap
run: ./scripts/bootstrap
- name: Run Access mTLS Tests
run: ./scripts/run-ci-tests access-mtls acceptance
test_access_applications:
name: Access Applications Tests
runs-on: ${{ github.repository == 'stainless-sdks/cloudflare-terraform' && 'depot-ubuntu-24.04' || 'lx64' }}
env:
CLOUDFLARE_EMAIL: tf-acct-zero-trust-access-applications@cfapi.net
CLOUDFLARE_API_KEY: ${{ secrets.TF_ACCT_ZERO_TRUST_ACCESS_APPLICATIONS_API_KEY }}
steps:
- uses: actions/checkout@v4
- name: Setup go
uses: actions/setup-go@v5
with:
go-version-file: ./go.mod
- name: Bootstrap
run: ./scripts/bootstrap
- name: Run Access Applications Tests
run: ./scripts/run-ci-tests access-applications acceptance
test_zero_trust_org:
name: Zero Trust Organization Tests
runs-on: ${{ github.repository == 'stainless-sdks/cloudflare-terraform' && 'depot-ubuntu-24.04' || 'lx64' }}
env:
CLOUDFLARE_EMAIL: tf-acct-zero-trust-zero-trust-org@cfapi.net
CLOUDFLARE_API_KEY: ${{ secrets.TF_ACCT_ZERO_TRUST_ZERO_TRUST_ORG_API_KEY }}
steps:
- uses: actions/checkout@v4
- name: Setup go
uses: actions/setup-go@v5
with:
go-version-file: ./go.mod
- name: Bootstrap
run: ./scripts/bootstrap
- name: Run Zero Trust Organization Tests
run: ./scripts/run-ci-tests zero-trust-org acceptance
test_zero_trust_list:
name: Zero Trust List Tests
runs-on: ${{ github.repository == 'stainless-sdks/cloudflare-terraform' && 'depot-ubuntu-24.04' || 'lx64' }}
env:
CLOUDFLARE_EMAIL: tf-acct-zero-trust-zero-trust-list@cfapi.net
CLOUDFLARE_API_KEY: ${{ secrets.TF_ACCT_ZERO_TRUST_ZERO_TRUST_LIST_API_KEY }}
steps:
- uses: actions/checkout@v4
- name: Setup go
uses: actions/setup-go@v5
with:
go-version-file: ./go.mod
- name: Bootstrap
run: ./scripts/bootstrap
- name: Run Zero Trust List Tests
run: ./scripts/run-ci-tests zero-trust-list acceptance
test_tunnel_cloudflared:
name: Tunnel Cloudflared Tests
runs-on: ${{ github.repository == 'stainless-sdks/cloudflare-terraform' && 'depot-ubuntu-24.04' || 'lx64' }}
env:
CLOUDFLARE_EMAIL: tf-acct-tunnel-tunnel-cloudflared@cfapi.net
CLOUDFLARE_API_KEY: ${{ secrets.TF_ACCT_TUNNEL_TUNNEL_CLOUDFLARED_API_KEY }}
steps:
- uses: actions/checkout@v4
- name: Setup go
uses: actions/setup-go@v5
with:
go-version-file: ./go.mod
- name: Bootstrap
run: ./scripts/bootstrap
- name: Run Tunnel Cloudflared Tests
run: ./scripts/run-ci-tests tunnel-cloudflared acceptance
test_tunnel_devices:
name: Tunnel Devices Tests
runs-on: ${{ github.repository == 'stainless-sdks/cloudflare-terraform' && 'depot-ubuntu-24.04' || 'lx64' }}
env:
CLOUDFLARE_EMAIL: tf-acct-tunnel-tunnel-devices@cfapi.net
CLOUDFLARE_API_KEY: ${{ secrets.TF_ACCT_TUNNEL_TUNNEL_DEVICES_API_KEY }}
steps:
- uses: actions/checkout@v4
- name: Setup go
uses: actions/setup-go@v5
with:
go-version-file: ./go.mod
- name: Bootstrap
run: ./scripts/bootstrap
- name: Run Tunnel Devices Tests
run: ./scripts/run-ci-tests tunnel-devices acceptance
test_account_core:
name: Account Core Tests
runs-on: ${{ github.repository == 'stainless-sdks/cloudflare-terraform' && 'depot-ubuntu-24.04' || 'lx64' }}
env:
CLOUDFLARE_EMAIL: tf-acct-account-account-core@cfapi.net
CLOUDFLARE_API_KEY: ${{ secrets.TF_ACCT_ACCOUNT_ACCOUNT_CORE_API_KEY }}
steps:
- uses: actions/checkout@v4
- name: Setup go
uses: actions/setup-go@v5
with:
go-version-file: ./go.mod
- name: Bootstrap
run: ./scripts/bootstrap
- name: Run Account Core Tests
run: ./scripts/run-ci-tests account-core acceptance
test_account_settings:
name: Account Settings Tests
runs-on: ${{ github.repository == 'stainless-sdks/cloudflare-terraform' && 'depot-ubuntu-24.04' || 'lx64' }}
env:
CLOUDFLARE_EMAIL: tf-acct-account-account-settings@cfapi.net
CLOUDFLARE_API_KEY: ${{ secrets.TF_ACCT_ACCOUNT_ACCOUNT_SETTINGS_API_KEY }}
steps:
- uses: actions/checkout@v4
- name: Setup go
uses: actions/setup-go@v5
with:
go-version-file: ./go.mod
- name: Bootstrap
run: ./scripts/bootstrap
- name: Run Account Settings Tests
run: ./scripts/run-ci-tests account-settings acceptance
test_r2_storage:
name: R2 Storage Tests
runs-on: ${{ github.repository == 'stainless-sdks/cloudflare-terraform' && 'depot-ubuntu-24.04' || 'lx64' }}
env:
CLOUDFLARE_EMAIL: tf-acct-storage-r2-storage@cfapi.net
CLOUDFLARE_API_KEY: ${{ secrets.TF_ACCT_STORAGE_R2_STORAGE_API_KEY }}
steps:
- uses: actions/checkout@v4
- name: Setup go
uses: actions/setup-go@v5
with:
go-version-file: ./go.mod
- name: Bootstrap
run: ./scripts/bootstrap
- name: Run R2 Storage Tests
run: ./scripts/run-ci-tests r2-storage acceptance
test_pages:
name: Pages Tests
runs-on: ${{ github.repository == 'stainless-sdks/cloudflare-terraform' && 'depot-ubuntu-24.04' || 'lx64' }}
env:
CLOUDFLARE_EMAIL: tf-acct-pages-pages@cfapi.net
CLOUDFLARE_API_KEY: ${{ secrets.TF_ACCT_PAGES_PAGES_API_KEY }}
steps:
- uses: actions/checkout@v4
- name: Setup go
uses: actions/setup-go@v5
with:
go-version-file: ./go.mod
- name: Bootstrap
run: ./scripts/bootstrap
- name: Run Pages Tests
run: ./scripts/run-ci-tests pages acceptance
test_queue_and_messaging:
name: Queue and Messaging Tests
runs-on: ${{ github.repository == 'stainless-sdks/cloudflare-terraform' && 'depot-ubuntu-24.04' || 'lx64' }}
env:
CLOUDFLARE_EMAIL: tf-acct-messaging-queue-and-messaging@cfapi.net
CLOUDFLARE_API_KEY: ${{ secrets.TF_ACCT_MESSAGING_QUEUE_AND_MESSAGING_API_KEY }}
steps:
- uses: actions/checkout@v4
- name: Setup go
uses: actions/setup-go@v5
with:
go-version-file: ./go.mod
- name: Bootstrap
run: ./scripts/bootstrap
- name: Run Queue and Messaging Tests
run: ./scripts/run-ci-tests queue-and-messaging acceptance
test_general_api:
name: General API Tests
runs-on: ${{ github.repository == 'stainless-sdks/cloudflare-terraform' && 'depot-ubuntu-24.04' || 'lx64' }}
env:
CLOUDFLARE_EMAIL: tf-acct-general-general-api@cfapi.net
CLOUDFLARE_API_KEY: ${{ secrets.TF_ACCT_GENERAL_GENERAL_API_API_KEY }}
steps:
- uses: actions/checkout@v4
- name: Setup go
uses: actions/setup-go@v5
with:
go-version-file: ./go.mod
- name: Bootstrap
run: ./scripts/bootstrap
- name: Run General API Tests
run: ./scripts/run-ci-tests general-api acceptance
test_misc_account_tools:
name: Misc Account Tools Tests
runs-on: ${{ github.repository == 'stainless-sdks/cloudflare-terraform' && 'depot-ubuntu-24.04' || 'lx64' }}
env:
CLOUDFLARE_EMAIL: tf-acct-misc-misc-account-tools@cfapi.net
CLOUDFLARE_API_KEY: ${{ secrets.TF_ACCT_MISC_MISC_ACCOUNT_TOOLS_API_KEY }}
steps:
- uses: actions/checkout@v4
- name: Setup go
uses: actions/setup-go@v5
with:
go-version-file: ./go.mod
- name: Bootstrap
run: ./scripts/bootstrap
- name: Run Misc Account Tools Tests
run: ./scripts/run-ci-tests misc-account-tools acceptance
test_platform_and_advanced:
name: Platform and Advanced Tests
runs-on: ${{ github.repository == 'stainless-sdks/cloudflare-terraform' && 'depot-ubuntu-24.04' || 'lx64' }}
env:
CLOUDFLARE_EMAIL: tf-acct-platform-platform-and-advanced@cfapi.net
CLOUDFLARE_API_KEY: ${{ secrets.TF_ACCT_PLATFORM_PLATFORM_AND_ADVANCED_API_KEY }}
steps:
- uses: actions/checkout@v4
- name: Setup go
uses: actions/setup-go@v5
with:
go-version-file: ./go.mod
- name: Bootstrap
run: ./scripts/bootstrap
- name: Run Platform and Advanced Tests
run: ./scripts/run-ci-tests platform-and-advanced acceptance
test_default:
name: Default Tests
runs-on: ${{ github.repository == 'stainless-sdks/cloudflare-terraform' && 'depot-ubuntu-24.04' || 'lx64' }}
env:
CLOUDFLARE_EMAIL: tf-acct-default-default@cfapi.net
CLOUDFLARE_API_KEY: ${{ secrets.TF_ACCT_DEFAULT_DEFAULT_API_KEY }}
steps:
- uses: actions/checkout@v4
- name: Setup go
uses: actions/setup-go@v5
with:
go-version-file: ./go.mod
- name: Bootstrap
run: ./scripts/bootstrap
- name: Run Default Tests
run: ./scripts/run-ci-tests default acceptance
env:
TF_ACC: 1
TF_MIGRATE_BINARY_PATH: ${{ github.workspace }}/tf-migrate
continue-on-error: true
# - name: Run Default Migration Tests
# id: default_migration_tests
# run: ./scripts/run-ci-tests default migration
# env:
# TF_ACC: 1
# TF_MIGRATE_BINARY_PATH: ${{ github.workspace }}/tf-migrate
# continue-on-error: true
- name: Check Test Status
if: ${{
steps.magic_acceptance_tests.outcome == 'failure' ||
steps.magic_migration_tests.outcome == 'failure' ||
steps.default_acceptance_tests.outcome == 'failure' ||
steps.default_migration_tests.outcome == 'failure' ||
steps.organization_acceptance_tests.outcome == 'failure'}}
run: exit 1
check-results:
name: Check Test Results
runs-on: ubuntu-latest
needs: [test_magic, test_organization, test_zone_core, test_zone_settings, test_dns, test_load_balancing, test_workers_core, test_workers_extended, test_workers_platform, test_email_routing, test_email_security, test_security_core, test_security_advanced, test_rules_and_policies, test_snippets, test_tls_and_certificates, test_ssl_config, test_web_features, test_web_monitoring, test_waiting_room, test_performance, test_cdn_advanced, test_gateway_and_policies, test_dlp_config, test_access_core, test_access_identity, test_access_mtls, test_access_applications, test_zero_trust_org, test_zero_trust_list, test_tunnel_cloudflared, test_tunnel_devices, test_account_core, test_account_settings, test_r2_storage, test_pages, test_queue_and_messaging, test_general_api, test_misc_account_tools, test_platform_and_advanced, test_default]
if: always()
steps:
- name: Check if any tests failed
run: |
echo "Checking test results..."
if [ "${{ needs.test_magic.result == 'failure' || needs.test_organization.result == 'failure' || needs.test_zone_core.result == 'failure' || needs.test_zone_settings.result == 'failure' || needs.test_dns.result == 'failure' || needs.test_load_balancing.result == 'failure' || needs.test_workers_core.result == 'failure' || needs.test_workers_extended.result == 'failure' || needs.test_workers_platform.result == 'failure' || needs.test_email_routing.result == 'failure' || needs.test_email_security.result == 'failure' || needs.test_security_core.result == 'failure' || needs.test_security_advanced.result == 'failure' || needs.test_rules_and_policies.result == 'failure' || needs.test_snippets.result == 'failure' || needs.test_tls_and_certificates.result == 'failure' || needs.test_ssl_config.result == 'failure' || needs.test_web_features.result == 'failure' || needs.test_web_monitoring.result == 'failure' || needs.test_waiting_room.result == 'failure' || needs.test_performance.result == 'failure' || needs.test_cdn_advanced.result == 'failure' || needs.test_gateway_and_policies.result == 'failure' || needs.test_dlp_config.result == 'failure' || needs.test_access_core.result == 'failure' || needs.test_access_identity.result == 'failure' || needs.test_access_mtls.result == 'failure' || needs.test_access_applications.result == 'failure' || needs.test_zero_trust_org.result == 'failure' || needs.test_zero_trust_list.result == 'failure' || needs.test_tunnel_cloudflared.result == 'failure' || needs.test_tunnel_devices.result == 'failure' || needs.test_account_core.result == 'failure' || needs.test_account_settings.result == 'failure' || needs.test_r2_storage.result == 'failure' || needs.test_pages.result == 'failure' || needs.test_queue_and_messaging.result == 'failure' || needs.test_general_api.result == 'failure' || needs.test_misc_account_tools.result == 'failure' || needs.test_platform_and_advanced.result == 'failure' || needs.test_default.result == 'failure' }}" == "true" ]; then
echo "One or more tests failed"
exit 1
else
echo "All tests passed or were skipped"
fi

View file

@ -76,6 +76,7 @@ func testSweepCloudflareObservatoryScheduledTests(r string) error {
}
func TestAccCloudflareObservatoryScheduledTest_Basic(t *testing.T) {
t.Skip("needs to be fixed by service team");
t.Parallel()
zoneID := os.Getenv("CLOUDFLARE_ZONE_ID")
domain := os.Getenv("CLOUDFLARE_DOMAIN")

View file

@ -0,0 +1,221 @@
#!/usr/bin/env bash
# Script to create test users via Partner API
# This creates users directly and returns their API keys
# Then adds them to the specified account as Super Administrators
# User naming format: tf-acct-{product-group}-{test-job}@cfapi.net
set -e
# Configuration
USER_EMAIL_DOMAIN="@cfapi.net"
USER_BASE_NAME="tf-acct"
API_BASE_URL="https://api.cloudflare.com/client/v4"
ACCOUNT_ID="f037e56e89293a057740de681ac9abbe"
SUPER_ADMIN_ROLE_ID="05784afa30c1afe1440e79d9351c7430"
# Colors for output
RED='\033[0;31m'
GREEN='\033[0;32m'
YELLOW='\033[1;33m'
BLUE='\033[0;34m'
NC='\033[0m' # No Color
# Check required environment variables
check_requirements() {
if [ -z "$CLOUDFLARE_API_KEY" ]; then
echo -e "${RED}Error: CLOUDFLARE_API_KEY must be set${NC}"
echo -e "${YELLOW}This is your partner/tenant admin API key${NC}"
exit 1
fi
if [ -z "$CLOUDFLARE_EMAIL" ]; then
echo -e "${RED}Error: CLOUDFLARE_EMAIL must be set${NC}"
echo -e "${YELLOW}This is your partner/tenant admin email${NC}"
exit 1
fi
if [ -z "$CLOUDFLARE_TENANT_ID" ]; then
echo -e "${RED}Error: CLOUDFLARE_TENANT_ID must be set${NC}"
echo -e "${YELLOW}This is your tenant ID (required if you manage multiple tenants)${NC}"
exit 1
fi
echo -e "${GREEN}✓ Environment variables configured${NC}"
}
# Add user to account as Super Administrator
add_user_to_account() {
local email="$1"
echo -e "${BLUE} Adding user to account ${ACCOUNT_ID} as Super Administrator...${NC}"
local response=$(curl -s -w "\n%{http_code}" "${API_BASE_URL}/accounts/${ACCOUNT_ID}/members" \
-X POST \
-H "X-Auth-Email: ${CLOUDFLARE_EMAIL}" \
-H "X-Auth-Key: ${CLOUDFLARE_API_KEY}" \
-H "Content-Type: application/json" \
--data-raw "{\"email\":\"${email}\",\"roles\":[\"${SUPER_ADMIN_ROLE_ID}\"],\"status\":\"accepted\"}")
local http_code=$(echo "$response" | tail -n1)
local body=$(echo "$response" | sed '$d')
if [ "$http_code" == "200" ]; then
echo -e "${GREEN} ✓ User added to account successfully${NC}"
return 0
else
echo -e "${RED} ✗ Failed to add user to account${NC}"
echo " HTTP Code: $http_code"
echo " Response: $body"
return 1
fi
}
# Create a user via Partner API
create_user() {
local email="$1"
echo -e "${BLUE}Creating user: ${email}${NC}"
local response=$(curl -s -w "\n%{http_code}" "${API_BASE_URL}/users" \
-X POST \
-H "X-Auth-Email: ${CLOUDFLARE_EMAIL}" \
-H "X-Auth-Key: ${CLOUDFLARE_API_KEY}" \
-H "Content-Type: application/json" \
--data-raw "{\"email\":\"${email}\",\"tenant\":{\"id\":\"${CLOUDFLARE_TENANT_ID}\"}}")
local http_code=$(echo "$response" | tail -n1)
local body=$(echo "$response" | sed '$d')
if [ "$http_code" == "200" ]; then
local user_id=$(echo "$body" | jq -r '.result.id')
local user_email=$(echo "$body" | jq -r '.result.email')
local user_apikey=$(echo "$body" | jq -r '.result.api_key')
echo -e "${GREEN} ✓ User created successfully${NC}"
echo " User ID: ${user_id}"
echo " Email: ${user_email}"
echo " API Key: ${user_apikey}"
# Add user to account
if ! add_user_to_account "${user_email}"; then
echo -e "${YELLOW} ⚠ User created but failed to add to account${NC}"
fi
# Store to file
echo "${user_email},${user_apikey}" >> test-users-credentials.csv
return 0
else
echo -e "${RED} ✗ Failed to create user${NC}"
echo " HTTP Code: $http_code"
echo " Response: $body"
return 1
fi
}
# Main execution
main() {
local dry_run=false
local product_group=""
local test_job=""
# Parse arguments
while [[ $# -gt 0 ]]; do
case $1 in
--dry-run)
dry_run=true
shift
;;
--product-group)
product_group="$2"
shift 2
;;
--test-job)
test_job="$2"
shift 2
;;
--help|-h)
cat <<EOF
Usage: $0 --product-group GROUP --test-job JOB [OPTIONS]
Create a test user via Cloudflare Partner API.
Users are created immediately with API keys - no password reset needed!
Each user is automatically added to account f037e56e89293a057740de681ac9abbe as Super Administrator.
Options:
--product-group GROUP Product group for the test user (e.g., workers, zone, security) [Required]
--test-job JOB Test job name (e.g., workers-core, zone-settings) [Required]
--dry-run Show what would be created without actually creating
--help, -h Show this help message
Environment Variables:
CLOUDFLARE_API_KEY Your partner/tenant admin API key [Required]
CLOUDFLARE_EMAIL Your partner/tenant admin email [Required]
CLOUDFLARE_TENANT_ID Your tenant ID [Required]
Output:
Appends to test-users-credentials.csv with format: email,api_key
Examples:
# Create a specific user
$0 --product-group workers --test-job workers-core
# Dry run to see what would be created
$0 --product-group workers --test-job workers-core --dry-run
EOF
exit 0
;;
*)
echo -e "${RED}Unknown option: $1${NC}"
echo "Use --help for usage information"
exit 1
;;
esac
done
# Validate required arguments
if [ -z "$product_group" ] || [ -z "$test_job" ]; then
echo -e "${RED}Error: Both --product-group and --test-job are required${NC}"
echo "Use --help for usage information"
exit 1
fi
echo -e "${GREEN}=== Cloudflare Test User Creation (Partner API) ===${NC}"
echo ""
check_requirements
echo ""
local email="${USER_BASE_NAME}-${product_group}-${test_job}${USER_EMAIL_DOMAIN}"
echo -e "${BLUE}Creating user: ${email}${NC}"
echo ""
if [ "$dry_run" = true ]; then
echo -e "${YELLOW}DRY RUN MODE - No users will be created${NC}"
echo ""
echo "Would create user: ${email}"
exit 0
fi
# Initialize or append to credentials file
if [ ! -f test-users-credentials.csv ]; then
echo "email,api_key" > test-users-credentials.csv
fi
echo -e "${BLUE}Credentials will be saved to: test-users-credentials.csv${NC}"
echo ""
if create_user "$email"; then
echo ""
echo -e "${GREEN}✓ User created successfully${NC}"
else
echo ""
echo -e "${RED}✗ User creation failed${NC}"
exit 1
fi
}
main "$@"

View file

@ -20,6 +20,120 @@ get_product_group_services() {
organization)
echo "organization organization_profile"
;;
zone-core)
echo "zone zone_subscription"
;;
zone-settings)
echo "zone_setting zone_cache_reserve zone_cache_variants zone_dnssec zone_hold zone_lockdown"
;;
dns)
echo "dns_record dns_settings_internal_view dns_zone_transfers_acl dns_zone_transfers_tsig"
;;
load-balancing)
echo "load_balancer load_balancer_monitor load_balancer_pool healthcheck"
;;
workers-core)
echo "workers_script workers_route workers_kv_namespace workers_kv"
;;
workers-extended)
echo "workers_cron_trigger workers_custom_domain workers_for_platforms_dispatch_namespace"
;;
email-routing)
echo "email_routing_catch_all email_routing_dns email_routing_rule"
;;
email-security)
echo "email_security_impersonation_registry email_security_trusted_domains"
;;
security-core)
echo "api_shield bot_management"
;;
security-advanced)
echo "api_shield_operation schema_validation_operation_settings schema_validation_schemas schema_validation_settings"
;;
rules-and-policies)
echo "ruleset page_rule managed_transforms"
;;
snippets)
echo "snippet snippet_rules snippets"
;;
tls-and-certificates)
echo "certificate_pack authenticated_origin_pulls authenticated_origin_pulls_certificate custom_hostname"
;;
ssl-config)
echo "custom_ssl"
;;
web-features)
echo "url_normalization_settings token_validation_rules"
;;
web-monitoring)
echo "logpull_retention logpush_job logpush_ownership_challenge"
;;
waiting-room)
echo "waiting_room_settings"
;;
performance)
echo "argo_smart_routing argo_tiered_caching tiered_cache regional_tiered_cache"
;;
cdn-advanced)
echo "regional_hostname spectrum_application"
;;
gateway-and-policies)
echo "zero_trust_gateway_policy zero_trust_gateway_settings zero_trust_gateway_proxy_endpoint"
;;
dlp-config)
echo "zero_trust_dlp_entry zero_trust_dlp_custom_profile"
;;
access-core)
echo "zero_trust_access_group zero_trust_access_tag zero_trust_access_policy"
;;
access-identity)
echo "zero_trust_access_identity_provider zero_trust_access_custom_page zero_trust_access_key_configuration"
;;
access-mtls)
echo "zero_trust_access_mtls_certificate zero_trust_access_mtls_hostname_settings zero_trust_access_short_lived_certificate"
;;
access-applications)
echo "zero_trust_access_application zero_trust_access_service_token"
;;
account-core)
echo "account_token account_member account_subscription"
;;
account-settings)
echo "account_api_token_permission_groups account_dns_settings account_dns_settings_internal_view account_role account_permission_group"
;;
zero-trust-org)
echo "zero_trust_organization"
;;
tunnel-cloudflared)
echo "zero_trust_tunnel_cloudflared zero_trust_tunnel_cloudflared_config zero_trust_tunnel_cloudflared_route zero_trust_tunnel_cloudflared_token zero_trust_tunnel_cloudflared_virtual_network"
;;
tunnel-devices)
echo "zero_trust_device_custom_profile zero_trust_device_custom_profile_local_domain_fallback zero_trust_device_default_profile_certificates zero_trust_device_managed_networks zero_trust_device_posture_rule"
;;
workers-platform)
echo "worker worker_version"
;;
r2-storage)
echo "r2_bucket"
;;
pages)
echo "pages_project pages_domain"
;;
queue-and-messaging)
echo "queue"
;;
general-api)
echo "api_token origin_ca_certificate list list_item"
;;
misc-account-tools)
echo "notification_policy_webhooks observatory_scheduled_test sso_connector"
;;
platform-and-advanced)
echo "cloud_connector_rules address_map byo_ip_prefix turnstile_widget"
;;
zero-trust-list)
echo "zero_trust_list"
;;
*)
echo ""
;;
@ -27,7 +141,7 @@ get_product_group_services() {
}
get_available_product_groups() {
echo "magic organization"
echo "magic organization zone-core zone-settings dns load-balancing workers-core workers-extended email-routing email-security security-core security-advanced rules-and-policies snippets tls-and-certificates ssl-config web-features web-monitoring waiting-room performance cdn-advanced gateway-and-policies dlp-config access-core access-identity access-mtls access-applications account-core account-settings zero-trust-org tunnel-cloudflared tunnel-devices workers-platform r2-storage pages queue-and-messaging general-api misc-account-tools platform-and-advanced zero-trust-list"
}
# List of services with their parallel test configuration
@ -309,7 +423,7 @@ resolve_dependencies() {
set -e
# Configuration
PARALLEL_JOBS=${PARALLEL_JOBS:-10} # Number of parallel jobs (can be overridden)
PARALLEL_JOBS=${PARALLEL_JOBS:-3} # Number of parallel jobs (can be overridden)
LOG_DIR="./test-logs"
SWEEP_TIMEOUT="5m"
TEST_TIMEOUT="15m"