# sam-bee/oracle-cloud-repeater architecture

> Architecture diagram of the GitHub repository sam-bee/oracle-cloud-repeater, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-02). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/sam-bee/oracle-cloud-repeater
- Repository: https://github.com/sam-bee/oracle-cloud-repeater

## Overview

This repository packages a small retry utility alongside a container environment for provisioning OCI compute. The principal workflow is to supply a Terraform or OCI CLI command, have the utility rerun it only after an out-of-capacity failure, and stop on success, timeout, or another error. The README also documents direct Terraform use and OCI CLI as an alternative. The retry behavior is supported by the sampled Go source; the provisioning and container links are documented in the README, not verified in unsampled implementation files.

Main entry points: [`resources/main.tf.example`](https://github.com/sam-bee/oracle-cloud-repeater/blob/master/resources/main.tf.example) (Terraform stack), [`Dockerfile`](https://github.com/sam-bee/oracle-cloud-repeater/blob/master/Dockerfile) (OCI CLI), [`repeat-command/main.go`](https://github.com/sam-bee/oracle-cloud-repeater/blob/master/repeat-command/main.go) (Command repeater)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_retry["Retry utility"]
  node_repeater["Command repeater<br/>[main.go]"]
  node_shell["Shell command"]
end

subgraph group_provision["OCI provisioning"]
  node_terraform["Terraform stack<br/>[main.tf.example]"]
  node_oci_cli["OCI CLI"]
  node_oci{{"OCI"}}
  node_instance["Compute instance"]
end

subgraph group_environment["Container environment"]
  node_container["Provisioning container"]
end

node_user(("Operator"))

node_user -->|"runs with command"| node_repeater
node_repeater -->|"executes command"| node_shell
node_user -->|"prepares stack"| node_terraform
node_shell -->|"runs apply"| node_terraform
node_terraform -->|"provisions through"| node_oci
node_shell -->|"can run"| node_oci_cli
node_oci_cli -->|"launches instance"| node_oci
node_oci -->|"provisions"| node_instance
node_container -->|"provides tooling for"| node_terraform
node_container -->|"provides tooling for"| node_oci_cli

click node_repeater "https://github.com/sam-bee/oracle-cloud-repeater/blob/master/repeat-command/main.go"
click node_terraform "https://github.com/sam-bee/oracle-cloud-repeater/blob/master/resources/main.tf.example"
click node_oci_cli "https://github.com/sam-bee/oracle-cloud-repeater/blob/master/Dockerfile"
click node_container "https://github.com/sam-bee/oracle-cloud-repeater/blob/master/Dockerfile"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_repeater,node_shell toneBlue
class node_terraform,node_oci_cli,node_oci,node_instance toneAmber
class node_container toneMint
class node_user toneIndigo
```

## Components

### Retry utility

- [Command repeater](https://github.com/sam-bee/oracle-cloud-repeater/blob/master/repeat-command/main.go): `repeat-command/main.go`
- **Shell command**

### OCI provisioning

- [Terraform stack](https://github.com/sam-bee/oracle-cloud-repeater/blob/master/resources/main.tf.example): `resources/main.tf.example`
- [OCI CLI](https://github.com/sam-bee/oracle-cloud-repeater/blob/master/Dockerfile): `Dockerfile`
- **OCI**
- **Compute instance**

### Container environment

- [Provisioning container](https://github.com/sam-bee/oracle-cloud-repeater/blob/master/Dockerfile): `Dockerfile`

### Other components

- **Operator**

## Connections

- Operator → Command repeater: runs with command (evidence: `README.md`)
- Command repeater → Shell command: executes command (evidence: `repeat-command/main.go`)
- Operator → Terraform stack: prepares stack (evidence: `README.md`)
- Shell command → Terraform stack: runs apply (evidence: `README.md`)
- Terraform stack → OCI: provisions through (evidence: `README.md`)
- Shell command → OCI CLI: can run (evidence: `README.md`)
- OCI CLI → OCI: launches instance (evidence: `README.md`)
- OCI → Compute instance: provisions (evidence: `README.md`)
- Provisioning container → Terraform stack: provides tooling for (evidence: `README.md`)
- Provisioning container → OCI CLI: provides tooling for (evidence: `README.md`)
