STEP 1Create the architecture manifest
cat > /tmp/cloud-capstone.json <<'JSON'
{
"vpc_cidr":"10.20.0.0/22",
"zones":2,
"tiers":{
"edge":{"subnets":["10.20.0.0/24","10.20.2.0/24"],"public":true},
"app":{"subnets":["10.20.1.0/25","10.20.3.0/25"],"public":false},
"data":{"subnets":["10.20.1.128/25","10.20.3.128/25"],"public":false}
},
"flows":[
{"from":"internet","to":"lb","port":443,"source":"0.0.0.0/0"},
{"from":"lb","to":"app","port":8080,"source":"edge"},
{"from":"app","to":"db","port":5432,"source":"app"}
],
"recovery":{"rto_minutes":60,"rpo_minutes":15,"backup_interval_minutes":15,"restore_test_minutes":45,"strategy":"backup_restore"},
"controls":{"multi_az":true,"temporary_identity":true,"tls":true,"private_data_tier":true,"encryption_at_rest":true,"backups":true,"audit_logs":true,"monitoring":true,"owner_tags":true,"budget":true},
"risks":{
"failure":{"scenario":"availability-zone failure","control":"multi_az"},
"threat":{"scenario":"direct public database exposure","control":"private_data_tier"},
"cost":{"scenario":"unowned resources continue running","control":"owner_tags"}
},
"delivery":{"terraform":true,"reviewed_plan":true,"post_change_health":true,"rollback":true,"cleanup":true}
}
JSON
STEP 2Create and run the relationship-aware validator
cat > /tmp/validate-cloud-capstone.py <<'PY'
import ipaddress,json,sys
path=sys.argv[1] if len(sys.argv)>1 else '/tmp/cloud-capstone.json'
a=json.load(open(path))
vpc=ipaddress.ip_network(a['vpc_cidr'])
subnets=[]
for tier,meta in a['tiers'].items():
nets=[ipaddress.ip_network(x) for x in meta['subnets']]
assert len(nets)>=2, f'{tier} must span at least two subnet ranges'
for n in nets:
assert n.subnet_of(vpc), f'{n} is outside {vpc}'
subnets.append((tier,n))
for i,(ta,a_net) in enumerate(subnets):
for tb,b_net in subnets[i+1:]:
assert not a_net.overlaps(b_net), f'overlap: {ta}:{a_net} and {tb}:{b_net}'
assert a['zones']>=2, 'architecture must span at least two availability zones'
assert a['tiers']['edge']['public'] is True, 'edge tier should be the public ingress tier'
assert a['tiers']['app']['public'] is False and a['tiers']['data']['public'] is False, 'application/data tiers must remain private'
required={("internet","lb",443),("lb","app",8080),("app","db",5432)}
actual={(f['from'],f['to'],f['port']) for f in a['flows']}
assert required<=actual, f'missing required flow: {required-actual}'
for f in a['flows']:
assert not (f['to'] in {'db','data'} and f.get('source') in {'0.0.0.0/0','::/0'}), 'data tier must not accept internet-wide source'
assert not (f['from']=='internet' and f['to'] in {'db','data'}), 'internet must not connect directly to data tier'
r=a['recovery']
assert r['rto_minutes']>0 and r['rpo_minutes']>=0, 'RTO/RPO must be numeric non-negative objectives'
assert r['backup_interval_minutes']<=r['rpo_minutes'], 'backup interval violates RPO'
assert r['restore_test_minutes']<=r['rto_minutes'], 'measured restore violates RTO'
for kind,item in a['risks'].items():
assert item['scenario'].strip(), f'{kind} scenario missing'
key=item['control']; assert key in a['controls'], f'{kind} maps to unknown control {key}'
assert a['controls'][key] is True, f'{kind} control {key} is not enabled'
for k in ('temporary_identity','tls','private_data_tier','encryption_at_rest','backups','audit_logs','monitoring','owner_tags','budget','multi_az'):
assert a['controls'].get(k) is True, f'missing required control {k}'
assert all(a['delivery'].values()), 'delivery evidence must include plan review, health verification, rollback and cleanup'
print('PASS: architecture relationships, recovery objectives and risk mappings validated')
PY
python3 /tmp/validate-cloud-capstone.py /tmp/cloud-capstone.json
STEP 3Deliberately break the data-tier security rule and prove rejection
python3 - <<'PY'
import json,copy
a=json.load(open('/tmp/cloud-capstone.json')); bad=copy.deepcopy(a)
bad['flows'].append({'from':'internet','to':'db','port':5432,'source':'0.0.0.0/0'})
json.dump(bad,open('/tmp/cloud-capstone-bad-flow.json','w'),indent=2)
PY
if python3 /tmp/validate-cloud-capstone.py /tmp/cloud-capstone-bad-flow.json; then
echo 'ERROR: validator accepted direct internet-to-database flow' >&2; exit 1
else
echo 'PASS: validator rejected direct internet-to-database flow as expected'
fi
STEP 4Deliberately break recovery evidence and prove rejection
python3 - <<'PY'
import json,copy
a=json.load(open('/tmp/cloud-capstone.json')); bad=copy.deepcopy(a)
bad['recovery']['backup_interval_minutes']=60
json.dump(bad,open('/tmp/cloud-capstone-bad-recovery.json','w'),indent=2)
PY
if python3 /tmp/validate-cloud-capstone.py /tmp/cloud-capstone-bad-recovery.json; then
echo 'ERROR: validator accepted a backup interval that violates RPO' >&2; exit 1
else
echo 'PASS: validator rejected recovery evidence that violates RPO as expected'
fi
STEP 5Score the design with the rubric
Use the rubric below. For every criterion, point to concrete manifest evidence. A statement such as “secure” earns no credit unless the network/control relationship that makes it true is shown.
Real-world connectionA real architecture review would add provider limits, DNS/TLS details, database failover behavior, endpoint routes, IAM policy evidence, logging destinations, pricing, compliance and tested Terraform plans. The capstone intentionally teaches how to make claims falsifiable before provisioning.