Skip to content

Move deploy secrets to the production environment - #260

Merged
localden merged 2 commits into
mainfrom
move-secrets-to-production
Nov 30, 2026
Merged

localden merged 2 commits into
mainfrom
move-secrets-to-production

Conversation

@localden

Copy link
Copy Markdown
Contributor

Human: @localden

Requested by Den · project thread

Moves the deploy secrets from repository level to the production environment, as the README describes for the App key. Values don't change.

  • move-secrets-to-production.yml (one-time, run by hand, main only): copies the six secrets into production without showing them. It uses no checkout and no third-party actions, checks everything before writing, and refuses to run if production already has one of them.
  • deploy.yml: stops before changing anything if a secret is missing. Until now a missing Cloudflare token made Pulumi delete the Access policy.
  • preview.yml: when preview has none of the secrets, validation still runs, the Pulumi steps are skipped, and any earlier preview comment is updated to say so. It fails when only some are there.
  • README: describes where the secrets go now.

After merging:

  1. Create a fine-grained token for this repository only, with Environments read and write and a one-day expiry. Save it in production as SECRETS_MOVE_TOKEN.
  2. Run "Move Secrets to Production" from main.
  3. Run Deploy and check that it succeeds.
  4. Delete the repository-level copies, then SECRETS_MOVE_TOKEN and the token itself.
  5. Remove the one-time workflow in a follow-up.

Pull requests stop getting a Pulumi preview after step 4. Previews can come back later by adding required reviewers to preview and then the secrets.

Checked locally: formatting, and each changed script run against a stand-in for gh (success, repeat run, missing value, missing token, failed write). The copy job itself can only run from main, so it has not been run.


Generated by Claude Code

Add a one-time workflow that copies the repository-level secrets into production. Deploy now stops if one is missing, and Preview skips the Pulumi steps when the preview environment has none of them.
@localden
localden requested a review from a team as a code owner November 30, 2026 00:14
@localden localden self-assigned this Nov 30, 2026
@github-actions

github-actions Bot commented Nov 30, 2026 •

Copy link
Copy Markdown

Pulumi Preview

Click to expand preview output
Previewing update (prod):
  pulumi:pulumi:Stack: (same)
    [urn=urn:pulumi:prod::mcp-access::pulumi:pulumi:Stack::mcp-access-prod]
    ~ googleworkspace:index/orgUnit:OrgUnit: (update)
        [id=id:03ph8a2z0nc6rsr]
        [urn=urn:pulumi:prod::mcp-access::googleworkspace:index/orgUnit:OrgUnit::mcp-org-unit]
        [provider=urn:pulumi:prod::mcp-access::pulumi:providers:googleworkspace::default_0_11_2::2a78e29b-bbb9-425e-a8de-1a161a6a7d9f]
        description      : "Model Context Protocol"
        name             : "Model Context Protocol"
        parentOrgUnitPath: "/"
    ~ googleworkspace:index/groupSettings:GroupSettings: (update)
        [id=security@modelcontextprotocol.io]
        [urn=urn:pulumi:prod::mcp-access::googleworkspace:index/groupSettings:GroupSettings::security]
        [provider=urn:pulumi:prod::mcp-access::pulumi:providers:googleworkspace::default_0_11_2::2a78e29b-bbb9-425e-a8de-1a161a6a7d9f]
        allowExternalMembers : false
        email                : "security@modelcontextprotocol.io"
        whoCanContactOwner   : "ALL_OWNERS_CAN_CONTACT"
        whoCanJoin           : "INVITED_CAN_JOIN"
        whoCanLeaveGroup     : "NONE_CAN_LEAVE"
        whoCanModerateMembers: "NONE"
        whoCanPostMessage    : "ANYONE_CAN_POST"
        whoCanViewGroup      : "ALL_MEMBERS_CAN_VIEW"
        whoCanViewMembership : "ALL_IN_DOMAIN_CAN_VIEW"
    ~ googleworkspace:index/groupSettings:GroupSettings: (update)
        [id=catch-all@modelcontextprotocol.io]
        [urn=urn:pulumi:prod::mcp-access::googleworkspace:index/groupSettings:GroupSettings::catch-all]
        [provider=urn:pulumi:prod::mcp-access::pulumi:providers:googleworkspace::default_0_11_2::2a78e29b-bbb9-425e-a8de-1a161a6a7d9f]
        allowExternalMembers : true
        email                : "catch-all@modelcontextprotocol.io"
        whoCanContactOwner   : "ALL_OWNERS_CAN_CONTACT"
        whoCanJoin           : "INVITED_CAN_JOIN"
        whoCanLeaveGroup     : "NONE_CAN_LEAVE"
        whoCanModerateMembers: "NONE"
        whoCanPostMessage    : "ANYONE_CAN_POST"
        whoCanViewGroup      : "ALL_MEMBERS_CAN_VIEW"
        whoCanViewMembership : "ALL_IN_DOMAIN_CAN_VIEW"
    ~ googleworkspace:index/groupSettings:GroupSettings: (update)
        [id=lead-maintainers@modelcontextprotocol.io]
        [urn=urn:pulumi:prod::mcp-access::googleworkspace:index/groupSettings:GroupSettings::lead-maintainers]
        [provider=urn:pulumi:prod::mcp-access::pulumi:providers:googleworkspace::default_0_11_2::2a78e29b-bbb9-425e-a8de-1a161a6a7d9f]
        allowExternalMembers : false
        email                : "lead-maintainers@modelcontextprotocol.io"
        whoCanContactOwner   : "ALL_OWNERS_CAN_CONTACT"
        whoCanJoin           : "INVITED_CAN_JOIN"
        whoCanLeaveGroup     : "NONE_CAN_LEAVE"
        whoCanModerateMembers: "NONE"
        whoCanPostMessage    : "ALL_OWNERS_CAN_POST"
        whoCanViewGroup      : "ALL_OWNERS_CAN_VIEW"
        whoCanViewMembership : "ALL_IN_DOMAIN_CAN_VIEW"
    ~ googleworkspace:index/groupSettings:GroupSettings: (update)
        [id=appeals@modelcontextprotocol.io]
        [urn=urn:pulumi:prod::mcp-access::googleworkspace:index/groupSettings:GroupSettings::appeals]
        [provider=urn:pulumi:prod::mcp-access::pulumi:providers:googleworkspace::default_0_11_2::2a78e29b-bbb9-425e-a8de-1a161a6a7d9f]
        allowExternalMembers : false
        email                : "appeals@modelcontextprotocol.io"
        whoCanContactOwner   : "ALL_OWNERS_CAN_CONTACT"
        whoCanJoin           : "INVITED_CAN_JOIN"
        whoCanLeaveGroup     : "NONE_CAN_LEAVE"
        whoCanModerateMembers: "NONE"
        whoCanPostMessage    : "ANYONE_CAN_POST"
        whoCanViewGroup      : "ALL_MEMBERS_CAN_VIEW"
        whoCanViewMembership : "ALL_IN_DOMAIN_CAN_VIEW"
    ~ googleworkspace:index/groupSettings:GroupSettings: (update)
        [id=antitrust@modelcontextprotocol.io]
        [urn=urn:pulumi:prod::mcp-access::googleworkspace:index/groupSettings:GroupSettings::antitrust]
        [provider=urn:pulumi:prod::mcp-access::pulumi:providers:googleworkspace::default_0_11_2::2a78e29b-bbb9-425e-a8de-1a161a6a7d9f]
        allowExternalMembers : true
        email                : "antitrust@modelcontextprotocol.io"
        whoCanContactOwner   : "ALL_OWNERS_CAN_CONTACT"
        whoCanJoin           : "INVITED_CAN_JOIN"
        whoCanLeaveGroup     : "NONE_CAN_LEAVE"
        whoCanModerateMembers: "NONE"
        whoCanPostMessage    : "ANYONE_CAN_POST"
        whoCanViewGroup      : "ALL_MEMBERS_CAN_VIEW"
        whoCanViewMembership : "ALL_IN_DOMAIN_CAN_VIEW"
    ~ googleworkspace:index/groupSettings:GroupSettings: (update)
        [id=moderators@modelcontextprotocol.io]
        [urn=urn:pulumi:prod::mcp-access::googleworkspace:index/groupSettings:GroupSettings::moderators]
        [provider=urn:pulumi:prod::mcp-access::pulumi:providers:googleworkspace::default_0_11_2::2a78e29b-bbb9-425e-a8de-1a161a6a7d9f]
        allowExternalMembers : false
        email                : "moderators@modelcontextprotocol.io"
        whoCanContactOwner   : "ALL_OWNERS_CAN_CONTACT"
        whoCanJoin           : "INVITED_CAN_JOIN"
        whoCanLeaveGroup     : "NONE_CAN_LEAVE"
        whoCanModerateMembers: "NONE"
        whoCanPostMessage    : "ALL_OWNERS_CAN_POST"
        whoCanViewGroup      : "ALL_OWNERS_CAN_VIEW"
        whoCanViewMembership : "ALL_IN_DOMAIN_CAN_VIEW"
    ~ googleworkspace:index/groupSettings:GroupSettings: (update)
        [id=core-maintainers@modelcontextprotocol.io]
        [urn=urn:pulumi:prod::mcp-access::googleworkspace:index/groupSettings:GroupSettings::core-maintainers]
        [provider=urn:pulumi:prod::mcp-access::pulumi:providers:googleworkspace::default_0_11_2::2a78e29b-bbb9-425e-a8de-1a161a6a7d9f]
        allowExternalMembers : false
        email                : "core-maintainers@modelcontextprotocol.io"
        whoCanContactOwner   : "ALL_OWNERS_CAN_CONTACT"
        whoCanJoin           : "INVITED_CAN_JOIN"
        whoCanLeaveGroup     : "NONE_CAN_LEAVE"
        whoCanModerateMembers: "NONE"
        whoCanPostMessage    : "ALL_OWNERS_CAN_POST"
        whoCanViewGroup      : "ALL_OWNERS_CAN_VIEW"
        whoCanViewMembership : "ALL_IN_DOMAIN_CAN_VIEW"
    ~ googleworkspace:index/groupSettings:GroupSettings: (update)
        [id=maintainers@modelcontextprotocol.io]
        [urn=urn:pulumi:prod::mcp-access::googleworkspace:index/groupSettings:GroupSettings::maintainers]
        [provider=urn:pulumi:prod::mcp-access::pulumi:providers:googleworkspace::default_0_11_2::2a78e29b-bbb9-425e-a8de-1a161a6a7d9f]
        allowExternalMembers : true
        email                : "maintainers@modelcontextprotocol.io"
        whoCanContactOwner   : "ALL_OWNERS_CAN_CONTACT"
        whoCanJoin           : "INVITED_CAN_JOIN"
        whoCanLeaveGroup     : "NONE_CAN_LEAVE"
        whoCanModerateMembers: "NONE"
        whoCanPostMessage    : "ALL_OWNERS_CAN_POST"
        whoCanViewGroup      : "ALL_OWNERS_CAN_VIEW"
        whoCanViewMembership : "ALL_IN_DOMAIN_CAN_VIEW"
    ~ googleworkspace:index/groupSettings:GroupSettings: (update)
        [id=registry-wg@modelcontextprotocol.io]
        [urn=urn:pulumi:prod::mcp-access::googleworkspace:index/groupSettings:GroupSettings::registry-wg]
        [provider=urn:pulumi:prod::mcp-access::pulumi:providers:googleworkspace::default_0_11_2::2a78e29b-bbb9-425e-a8de-1a161a6a7d9f]
        allowExternalMembers : true
        email                : "registry-wg@modelcontextprotocol.io"
        whoCanContactOwner   : "ALL_OWNERS_CAN_CONTACT"
        whoCanJoin           : "INVITED_CAN_JOIN"
        whoCanLeaveGroup     : "NONE_CAN_LEAVE"
        whoCanModerateMembers: "NONE"
        whoCanPostMessage    : "ALL_OWNERS_CAN_POST"
        whoCanViewGroup      : "ALL_OWNERS_CAN_VIEW"
        whoCanViewMembership : "ALL_IN_DOMAIN_CAN_VIEW"
    --outputs:--
  ~ cloudflareAccessPolicies : {
      ~ security-room-maintainers: {
            accountId                   : "c39d6379ccfdb20a3627eeddffa80ec9"
            appCount                    : 1
          + approvalGroups              : [unknown]
          + approvalRequired            : [unknown]
            connectionRules             : {
                rdp: {}
            }
            createdAt                   : "2026-08-30T07:04:32Z"
            decision                    : "allow"
          + excludes                    : [unknown]
            id                          : "11a6814e-bb85-4ea2-aa12-6b081b09aa56"
            includes                    : [
                [0]: {
                    githubOrganization: {
                        identityProviderId: "1e53bc11-a504-4572-92d1-4c8d56fc198b"
                        name              : "modelcontextprotocol"
                        team              : "core-maintainers"
                    }
                }
                [1]: {
                    githubOrganization: {
                        identityProviderId: "1e53bc11-a504-4572-92d1-4c8d56fc198b"
                        name              : "modelcontextprotocol"
                        team              : "lead-maintainers"
                    }
                }
                [2]: {
                    githubOrganization: {
                        identityProviderId: "1e53bc11-a504-4572-92d1-4c8d56fc198b"
                        name              : "modelcontextprotocol"
                        team              : "security-managers"
                    }
                }
                [3]: {
                    githubOrganization: {
                        identityProviderId: "1e53bc11-a504-4572-92d1-4c8d56fc198b"
                        name              : "modelcontextprotocol"
                        team              : "security-team"
                    }
                }
            ]
          + isolationRequired           : [unknown]
          + mfaConfig                   : [unknown]
            name                        : "Maintainers"
          + purposeJustificationPrompt  : [unknown]
          + purposeJustificationRequired: [unknown]
          + requires                    : [unknown]
            reusable                    : true
          + sessionDuration             : [unknown]
            updatedAt                   : "2026-09-29T22:44:09Z"
            urn                         : "urn:pulumi:prod::mcp-access::cloudflare:index/zeroTrustAccessPolicy:ZeroTrustAccessPolicy::access-policy-security-room-maintainers"
        }
    }
  ~ googleGroups             : {
      ~ antitrust       : {
            adminCreated      : true
            description       : "Antitrust compliance contacts \n(Managed by github.com/modelcontextprotocol/access)"
            directMembersCount: 3
            email             : "antitrust@modelcontextprotocol.io"
            etag              : "\"VbqSf-yrmEfRSgG5mKhNXH6ZbZd6vfos28i0x3r99Hg/12nXGX1E7I-1YUOAYQeNSbKogNo\""
            id                : "03jtnz0s4hi6gld"
            name              : "antitrust"
            nonEditableAliases: [
                [0]: "antitrust@modelcontextprotocol.io.test-google-a.com"
            ]
          + timeouts          : [unknown]
            urn               : "urn:pulumi:prod::mcp-access::googleworkspace:index/group:Group::antitrust"
        }
      ~ appeals         : {
            adminCreated      : true
            description       : "Code of Conduct ban appeals inbox \n(Managed by github.com/modelcontextprotocol/access)"
            directMembersCount: 7
            email             : "appeals@modelcontextprotocol.io"
            etag              : "\"VbqSf-yrmEfRSgG5mKhNXH6ZbZd6vfos28i0x3r99Hg/YG7AugYroj58SMbKq19ZUn2K0oo\""
            id                : "02lwamvv3jybavz"
            name              : "appeals"
            nonEditableAliases: [
                [0]: "appeals@modelcontextprotocol.io.test-google-a.com"
            ]
          + timeouts          : [unknown]
            urn               : "urn:pulumi:prod::mcp-access::googleworkspace:index/group:Group::appeals"
        }
      ~ catch-all       : {
            adminCreated      : true
            description       : "Catch-all email group \n(Managed by github.com/modelcontextprotocol/access)"
            directMembersCount: 1
            email             : "catch-all@modelcontextprotocol.io"
            etag              : "\"VbqSf-yrmEfRSgG5mKhNXH6ZbZd6vfos28i0x3r99Hg/pTou_lPGwjMpstD35DKtK2YkPfY\""
            id                : "00upglbi31qapnv"
            name              : "catch-all"
            nonEditableAliases: [
                [0]: "catch-all@modelcontextprotocol.io.test-google-a.com"
            ]
          + timeouts          : [unknown]
            urn               : "urn:pulumi:prod::mcp-access::googleworkspace:index/group:Group::catch-all"
        }
      ~ core-maintainers: {
            adminCreated      : true
            description       : "Core maintainers \n(Managed by github.com/modelcontextprotocol/access)"
            directMembersCount: 9
            email             : "core-maintainers@modelcontextprotocol.io"
            etag              : "\"VbqSf-yrmEfRSgG5mKhNXH6ZbZd6vfos28i0x3r99Hg/Js8-fag3WWiFJ5ogLQnHbUkeNNQ\""
            id                : "028h4qwu28692os"
            name              : "core-maintainers"
            nonEditableAliases: [
                [0]: "core-maintainers@modelcontextprotocol.io.test-google-a.com"
            ]
          + timeouts          : [unknown]
            urn               : "urn:pulumi:prod::mcp-access::googleworkspace:index/group:Group::core-maintainers"
        }
      ~ lead-maintainers: {
            adminCreated      : true
            description       : "Lead core maintainers \n(Managed by github.com/modelcontextprotocol/access)"
            directMembersCount: 3
            email             : "lead-maintainers@modelcontextprotocol.io"
            etag              : "\"VbqSf-yrmEfRSgG5mKhNXH6ZbZd6vfos28i0x3r99Hg/n2Lvhva7IyRgxEYaRf4y0umm-8I\""
            id                : "00meukdy1121tlu"
            name              : "lead-maintainers"
            nonEditableAliases: [
                [0]: "lead-maintainers@modelcontextprotocol.io.test-google-a.com"
            ]
          + timeouts          : [unknown]
            urn               : "urn:pulumi:prod::mcp-access::googleworkspace:index/group:Group::lead-maintainers"
        }
      ~ maintainers     : {
            adminCreated      : true
            description       : "General maintainers \n(Managed by github.com/modelcontextprotocol/access)"
            directMembersCount: 21
            email             : "maintainers@modelcontextprotocol.io"
            etag              : "\"VbqSf-yrmEfRSgG5mKhNXH6ZbZd6vfos28i0x3r99Hg/LXvhHnqRmEEEa81aQhhRofT32_g\""
            id                : "04f1mdlm38smb30"
            name              : "maintainers"
            nonEditableAliases: [
                [0]: "maintainers@modelcontextprotocol.io.test-google-a.com"
            ]
          + timeouts          : [unknown]
            urn               : "urn:pulumi:prod::mcp-access::googleworkspace:index/group:Group::maintainers"
        }
      ~ moderators      : {
            adminCreated      : true
            description       : "Community moderators \n(Managed by github.com/modelcontextprotocol/access)"
            directMembersCount: 8
            email             : "moderators@modelcontextprotocol.io"
            etag              : "\"VbqSf-yrmEfRSgG5mKhNXH6ZbZd6vfos28i0x3r99Hg/hrsc4FmmaLhHGshskk933rKRxa4\""
            id                : "028h4qwu0zx0c4t"
            name              : "moderators"
            nonEditableAliases: [
                [0]: "moderators@modelcontextprotocol.io.test-google-a.com"
            ]
          + timeouts          : [unknown]
            urn               : "urn:pulumi:prod::mcp-access::googleworkspace:index/group:Group::moderators"
        }
      ~ registry-wg     : {
            adminCreated      : true
            description       : "Official registry builders and maintainers \n(Managed by github.com/modelcontextprotocol/access)"
            directMembersCount: 4
            email             : "registry-wg@modelcontextprotocol.io"
            etag              : "\"VbqSf-yrmEfRSgG5mKhNXH6ZbZd6vfos28i0x3r99Hg/BW1gtJfJQOnzFgOMqoUNAsxYhRQ\""
            id                : "040ew0vw3g472qb"
            name              : "registry-wg"
            nonEditableAliases: [
                [0]: "registry-wg@modelcontextprotocol.io.test-google-a.com"
            ]
          + timeouts          : [unknown]
            urn               : "urn:pulumi:prod::mcp-access::googleworkspace:index/group:Group::registry-wg"
        }
      ~ security        : {
            adminCreated      : true
            description       : "Organization security managers (security_manager org role via orgRoles.ts) \n(Managed by github.com/modelcontextprotocol/access)"
            directMembersCount: 3
            email             : "security@modelcontextprotocol.io"
            etag              : "\"VbqSf-yrmEfRSgG5mKhNXH6ZbZd6vfos28i0x3r99Hg/epy6JJzMg42SQvZAKqU-i71G148\""
            id                : "04k668n32gk6gpc"
            name              : "security"
            nonEditableAliases: [
                [0]: "security@modelcontextprotocol.io.test-google-a.com"
            ]
          + timeouts          : [unknown]
            urn               : "urn:pulumi:prod::mcp-access::googleworkspace:index/group:Group::security"
        }
    }
Resources:
    ~ 10 to update
    755 unchanged

@localden
localden enabled auto-merge (squash) November 30, 2026 00:27
@localden
localden disabled auto-merge November 30, 2026 00:28
@localden
localden merged commit 9613586 into main Nov 30, 2026
5 checks passed
@localden
localden deleted the move-secrets-to-production branch November 30, 2026 00:28

This branch was successfully deployed

1 active deployment
preview — b87a492b Deployed Nov 30, 2026 by localden via Preview Changes #457
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants