Oracle Cloud Infrastructure · Arazzo Workflow

Oracle Cloud Teardown VCN Network

Version 1.0.0

List subnets in a VCN, delete the first subnet, then delete the VCN itself.

1 workflow 1 source API 1 provider
View Spec View on GitHub Cloud ComputingEnterprise CloudInfrastructure as a ServiceOraclePlatform as a ServiceArazzoWorkflows

Provider

oracle-cloud

Workflows

teardown-vcn-network
Delete a VCN's subnet, then delete the VCN.
Confirms the VCN, lists its subnets, deletes the first subnet, then deletes the VCN to release the network.
4 steps inputs: compartmentId, vcnId outputs: deletedSubnetId, deletedVcnId
1
getVcn
getVcn
Confirm the VCN exists before deleting dependent resources.
2
listSubnets
listSubnets
List the subnets that belong to the VCN.
3
deleteSubnet
deleteSubnet
Delete the first subnet returned for the VCN.
4
deleteVcn
deleteVcn
Delete the now-empty VCN.

Source API Descriptions

Arazzo Workflow Specification

oracle-cloud-teardown-vcn-network-workflow.yml Raw ↑
arazzo: 1.0.1
info:
  title: Oracle Cloud Teardown VCN Network
  summary: List subnets in a VCN, delete the first subnet, then delete the VCN itself.
  description: >-
    Cleanly decommissions a virtual cloud network by removing dependent
    resources first. The workflow reads the VCN, lists its subnets, deletes the
    first subnet returned, and then deletes the VCN. Every step spells out its
    request inline so the teardown flow can be read and executed without opening
    the underlying OpenAPI description.
  version: 1.0.0
sourceDescriptions:
- name: networkingApi
  url: ../openapi/oracle-cloud-networking-openapi.yaml
  type: openapi
workflows:
- workflowId: teardown-vcn-network
  summary: Delete a VCN's subnet, then delete the VCN.
  description: >-
    Confirms the VCN, lists its subnets, deletes the first subnet, then deletes
    the VCN to release the network.
  inputs:
    type: object
    required:
    - compartmentId
    - vcnId
    properties:
      compartmentId:
        type: string
        description: The OCID of the compartment containing the VCN.
      vcnId:
        type: string
        description: The OCID of the VCN to tear down.
  steps:
  - stepId: getVcn
    description: Confirm the VCN exists before deleting dependent resources.
    operationId: getVcn
    parameters:
    - name: vcnId
      in: path
      value: $inputs.vcnId
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      vcnName: $response.body#/displayName
  - stepId: listSubnets
    description: List the subnets that belong to the VCN.
    operationId: listSubnets
    parameters:
    - name: compartmentId
      in: query
      value: $inputs.compartmentId
    - name: vcnId
      in: query
      value: $inputs.vcnId
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      subnetId: $response.body#/0/id
  - stepId: deleteSubnet
    description: Delete the first subnet returned for the VCN.
    operationId: deleteSubnet
    parameters:
    - name: subnetId
      in: path
      value: $steps.listSubnets.outputs.subnetId
    successCriteria:
    - condition: $statusCode == 204
  - stepId: deleteVcn
    description: Delete the now-empty VCN.
    operationId: deleteVcn
    parameters:
    - name: vcnId
      in: path
      value: $inputs.vcnId
    successCriteria:
    - condition: $statusCode == 204
  outputs:
    deletedVcnId: $inputs.vcnId
    deletedSubnetId: $steps.listSubnets.outputs.subnetId