feat: provision one pilot number per primary agent - #5
Merged
Conversation
Purchases four US local SMS/MMS-capable Twilio numbers, one per primary agent, using search_criteria purchase. account_sid reaches OpenTofu only as TF_VAR_account_sid inside the SOPS exec-env child. No messaging webhook is configured yet; that change waits for a healthy bridge.
Contributor
OpenTofu TestOpenTofu test passed. View run output |
Contributor
OpenTofu PlanOpenTofu plan passed. View run outputOpenTofu will perform the following actions:
# twilio_phone_number.agent["grillmaster"] will be created
+ resource "twilio_phone_number" "agent" {
+ account_sid = "ACd4bedd2459ed934014d92be908474ecc"
+ address_requirements = (known after apply)
+ beta = (known after apply)
+ capabilities = (known after apply)
+ date_created = (known after apply)
+ date_updated = (known after apply)
+ emergency_status = (known after apply)
+ friendly_name = "opencode-sms grillmaster"
+ id = (known after apply)
+ origin = (known after apply)
+ phone_number = (known after apply)
+ sid = (known after apply)
+ status = (known after apply)
+ status_callback_method = "POST"
+ fax (known after apply)
+ messaging (known after apply)
+ search_criteria {
+ iso_country = "US"
+ type = "local"
+ capabilities {
+ mms_enabled = true
+ sms_enabled = true
}
}
+ voice (known after apply)
}
# twilio_phone_number.agent["homerepair"] will be created
+ resource "twilio_phone_number" "agent" {
+ account_sid = "ACd4bedd2459ed934014d92be908474ecc"
+ address_requirements = (known after apply)
+ beta = (known after apply)
+ capabilities = (known after apply)
+ date_created = (known after apply)
+ date_updated = (known after apply)
+ emergency_status = (known after apply)
+ friendly_name = "opencode-sms homerepair"
+ id = (known after apply)
+ origin = (known after apply)
+ phone_number = (known after apply)
+ sid = (known after apply)
+ status = (known after apply)
+ status_callback_method = "POST"
+ fax (known after apply)
+ messaging (known after apply)
+ search_criteria {
+ iso_country = "US"
+ type = "local"
+ capabilities {
+ mms_enabled = true
+ sms_enabled = true
}
}
+ voice (known after apply)
}
# twilio_phone_number.agent["homesteader"] will be created
+ resource "twilio_phone_number" "agent" {
+ account_sid = "ACd4bedd2459ed934014d92be908474ecc"
+ address_requirements = (known after apply)
+ beta = (known after apply)
+ capabilities = (known after apply)
+ date_created = (known after apply)
+ date_updated = (known after apply)
+ emergency_status = (known after apply)
+ friendly_name = "opencode-sms homesteader"
+ id = (known after apply)
+ origin = (known after apply)
+ phone_number = (known after apply)
+ sid = (known after apply)
+ status = (known after apply)
+ status_callback_method = "POST"
+ fax (known after apply)
+ messaging (known after apply)
+ search_criteria {
+ iso_country = "US"
+ type = "local"
+ capabilities {
+ mms_enabled = true
+ sms_enabled = true
}
}
+ voice (known after apply)
}
# twilio_phone_number.agent["lawnmowerman"] will be created
+ resource "twilio_phone_number" "agent" {
+ account_sid = "ACd4bedd2459ed934014d92be908474ecc"
+ address_requirements = (known after apply)
+ beta = (known after apply)
+ capabilities = (known after apply)
+ date_created = (known after apply)
+ date_updated = (known after apply)
+ emergency_status = (known after apply)
+ friendly_name = "opencode-sms lawnmowerman"
+ id = (known after apply)
+ origin = (known after apply)
+ phone_number = (known after apply)
+ sid = (known after apply)
+ status = (known after apply)
+ status_callback_method = "POST"
+ fax (known after apply)
+ messaging (known after apply)
+ search_criteria {
+ iso_country = "US"
+ type = "local"
+ capabilities {
+ mms_enabled = true
+ sms_enabled = true
}
}
+ voice (known after apply)
}
Plan: 4 to add, 0 to change, 0 to destroy.
Changes to Outputs:
+ agent_phone_numbers = {
+ grillmaster = (known after apply)
+ homerepair = (known after apply)
+ homesteader = (known after apply)
+ lawnmowerman = (known after apply)
}
─────────────────────────────────────────────────────────────────────────────
Note: You didn't use the -out option to save this plan, so OpenTofu can't
guarantee to take exactly these actions if you run "tofu apply" now. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Owner-approved purchase of exactly four Twilio phone numbers: one US local SMS/MMS-capable number per primary agent (
lawnmowerman,grillmaster,homesteader,homerepair), declared withsearch_criteriapurchase innumbers.tf. The account SID reaches OpenTofu only asTF_VAR_account_sidinside the existing SOPSexec-envchild. No inbound messaging webhook is configured.Fixes # N/A — owner approved four-number provisioning on 2026-09-04; area code/number type unspecified, so the purchase defaults to any available US local number with SMS and MMS capability.
Type of change
Validation
opentofu / testandopentofu / planpassed on head01ba0307e3d30758137f379cb4fce32f87e6bb01(after the workflow's automatic terraform-docs README fix at1992f8d2). The credentialed plan reports4 to add, 0 to change, 0 to destroy— exactly the fourtwilio_phone_number.agentresources and theagent_phone_numbersoutput; the provider authenticated through the SOPS-injected environment with no other account change.No local OpenTofu, Makefile, SOPS, state, import, plan, or apply operation was run.
Impact and rollout
Producer: merged credential delivery at
e325cba5and provider authentication ata04c7836supply the validated SOPS-only authentication this change consumes. Consumer:numbers.tfadds fourtwilio_phone_number.agentresources and one non-sensitiveagent_phone_numbersoutput; the Makefile injectsTF_VAR_account_sidfrom the SOPS child forplanandapplyonly.Merging submits the environment-gated
mainapply, which purchases the four numbers (recurring Twilio charges begin). The PR plan shows the four creations without contacting Twilio beyond provider credential validation. Purchased values land only in remote state and the output, which later feeds thekustomize-clusterrouting secret. Themessagingwebhook block deliberately remains unset until the bridge is deployed, healthy, and separately approved; this PR changes nothing else in the account.Rollback is a reviewed change removing the resources (releasing the numbers) or a revert before merge.
search_criteriaresources cannot be imported, so each future replacement forces a fresh purchase.Safety and secrets
sops exec-env.GitHub Advanced Security secret scanning is unavailable for this repository; the changed source was manually reviewed. AI agent materially produced this change; reviewers should confirm the four-agent resource set, US local SMS/MMS search criteria, the TF_VAR injection path, and the absence of any webhook or bridge-runtime ownership.