Setup Java Spring Boot Platform
| This documentation was generated with the assistance of AI. Please report any inaccuracies. |
Generates the OpenTofu (Terraform-compatible) configuration that deploys a Spring Boot service, derived from the technologies the service actually uses and the cloud recorded in its stack manifest.
Purpose
iru-setup-java-springboot-platform is governed by five rules, each of which shapes what it writes:
-
Managed services over self-packaged containers. The compose stack from Setup Java Spring Boot Testcontainers exists for local development and integration tests; deployed environments use the provider’s managed offering, because backups, failover, patching, and encryption-at-rest are the actual work and running them yourself is a permanent cost.
-
No secret in any file — not in a
.tf, not in a.tfvars, not in a default. Secrets are created empty in the provider’s secret manager, withlifecycle { ignore_changes }on the value so a later apply never reverts a rotated secret, and populated out-of-band. -
Remote, encrypted, locked state, because state contains resource attributes that are effectively secrets.
-
Keyless CI authentication via GitHub OIDC, with the trust policy scoped to the repository and the environment — a wildcard subject would let any branch deploy to production.
-
Nothing is applied. The skill writes configuration and runs
validate(andplanonly on request), because every apply costs money.
A substantial part of its value is the compatibility caveats it raises rather than papering over: DocumentDB is not MongoDB enough for Spring Data plus Flamingock, Neptune is not Neo4j, Amazon OpenSearch has diverged from Elasticsearch, Cloud SQL for MySQL is not a true MariaDB, MSK ships no managed schema registry (so AVRO needs Glue Schema Registry or Confluent Cloud), gRPC needs the load balancer’s protocol set to HTTP/2, and a Cloud Run service cannot reach a private Cloud SQL or Memorystore instance without a Serverless VPC Access connector. Where the right answer is a third-party managed service (MongoDB Atlas, Couchbase Capella, Neo4j Aura, Qdrant Cloud, Elastic or Confluent Cloud), it says so and notes that each needs its own account, billing, and provider credential.
The skill announces whether it is generating infra/ from scratch or updating an existing one (listing the modules
and envs/* found) and never touches a .tfstate. For each existing file group it owns (per module, per
environment, the backend configuration) it warns and asks Update (fill gaps) (Recommended) / Keep as is /
Replace, unless on-existing pre-answers. Replace can produce a destructive plan against live infrastructure
(renamed addresses mean destroy-and-recreate), so it is offered only with that warning and needs an explicit second
confirmation for any environment with remote state; an on-existing: replace from args is treated as Update for
those environments, so a scripted run can never replace live-resource configuration unattended.
Rolling deployments (optional)
When the manifest’s deploy.rolling.enabled is true (or rolling: yes arrives in args), the skill also creates the
infrastructure for a staged rollout, following one design: the workflow drives the traffic shifting and the rollout
state lives in the cloud, so promote.yml is stateless. OpenTofu creates the capability to hold two versions and split
traffic between them but never the split itself: live weights, traffic and step are in lifecycle { ignore_changes },
so an unrelated tofu apply cannot reset a rollout in flight, and new versions always deploy at 0 % traffic. Strategy
rolling has no second environment and uses the runtime’s native rolling update with a weaker rollback.
| Runtime | What is generated |
|---|---|
ECS Fargate |
Blue and green target groups with identical health checks and two ECS services (one per slot); a weighted |
Cloud Run |
An explicit |
EKS / GKE Autopilot |
The Argo Rollouts controller (installed with a pinned Helm release, or verified as a prerequisite; Flagger is
documented but not generated), the |
Every environment’s outputs.tf then also exposes rollout_candidate_url, rollout_gate, and per runtime
rollout_alarm_names, rollout_target_groups or rollout_name, which the workflows consume. With rolling absent or
disabled nothing in this skill changes. See Spring Boot Rolling Deployments.
Plugin
Shipped by the iru-springboot plugin of the ai-catalog marketplace (install with /plugin install iru-springboot@ai-catalog; see Plugins).
Inputs
| Argument | Required | Description | Default |
|---|---|---|---|
|
No |
|
|
|
No |
|
None |
|
No |
|
Rolling disabled |
|
No |
|
|
Environments |
Yes |
Which to generate. Each gets its own directory and its own state file, so a |
|
Region, and multi-AZ for production |
Yes |
Per environment. Multi-AZ roughly doubles managed-database cost, so it is asked rather than assumed. |
None |
Sizing per environment |
Yes |
Replica min/max, CPU, and memory, plus the intended JVM heap — container memory must exceed heap plus metaspace plus native overhead, or the container gets OOM-killed. |
Starting points offered (1 vCPU / 1–2 GiB, 2 replicas for |
Compute runtime |
Yes |
|
Fargate / Cloud Run recommended |
Existing versus new infrastructure |
Yes |
Asked per database, cache, and Kafka cluster: create it here, or reference an existing one via a |
None |
Public exposure, domain, DNS zone |
Yes |
Whether the service is internet-facing; if so the domain name and whether the zone already exists. TLS comes from ACM or Google-managed certificates. |
None |
State backend |
Yes |
The S3 + DynamoDB or GCS backend to use. If none exists, a separate |
None |
Cost acknowledgement |
Yes |
Explicit confirmation, after naming the resources that bill continuously regardless of traffic (managed databases, NAT gateways, load balancers, Kafka clusters, provisioned OpenSearch). |
None — must be confirmed |
Outputs
-
A report stating whether
infra/was generated from scratch or updated, and per file group the action taken (created / updated / replaced / kept as is) with each gap left in a kept group. It also warns that when the manifest’sci.enabledisfalseno deploy/undeploy workflow exists, so everytofu apply/tofu destroyis a manual run, deletion-protection advice applies to whoever runs it, and the CI OIDC identity is not needed until workflows are added. -
infra/README.md— the bootstrap order, what every variable means and its blast radius, how to destroy an environment safely, what has deletion protection on purpose, and every step OpenTofu cannot perform with concrete instructions: domain registration or subdomain delegation, populating each secret’s value, the third-party accounts and provider credentials needed, the schema registry’s compatibility mode, quota increases, and SSO/OAuth provider configuration. -
infra/modules/— reusable modules for network, the service runtime, one per database engine, cache, Kafka, observability, and DNS, with no environment-specific literals. -
infra/envs/<env>/— thin per-environment directories (provider, backend, module calls, values) with one state file each,outputs.tfexposing endpoints and secret names, and documented.tfvars.examplefiles. -
infra/bootstrap/— only when the state backend must be created. -
The OIDC deployment role or service account, container registry with an immutable-tag policy and untagged-image expiry, the compute service with actuator-matching health probes and graceful-shutdown period, empty secrets with scoped IAM, log groups with an explicit retention period, and the managed metrics target.
-
Pinned
required_versionandrequired_providersconstraints, with.terraform.lock.hclcommitted. -
Only when rolling deployments are enabled: the rollout resources per runtime (second target group and weighted listener with test listener, alarms, Cloud Run traffic pin and tag, or Argo Rollouts,
RolloutandAnalysisTemplate), therollout_*outputs in every environment, and a rolling-prerequisites section ininfra/README.md(an ALB for ECS, Prometheus scraping for Kubernetes, thresholds to tune, the Argo controller, a candidate URL reachable from CI runners, the roughly doubled compute during a rollout, and how to inspect or reset the cloud-side split by hand). The report states whether rolling is enabled or disabled, the resources, the outputs, the design decision and the prerequisites.
Execution flow
Dependencies
Invokes
None. It reads springboot-stack.yml and the Spring profile files (so generated environment-variable names match
the placeholders already referenced there), and writes OpenTofu configuration.
Invoked by
-
Setup Java Spring Boot — Step 8, OpenTofu deployment config, via the
iru-isolated-skill-executoragent.
Also runs standalone (/iru-setup-java-springboot-platform).
Related: Spring Boot Rolling Deployments — the skill that enables, disables and operates rolling deployments, and whose workflows consume the
rollout_* outputs this skill exposes.
Source
SKILL.md on GitHub — the file this page was generated from.