Skip to main content

List Resources

The list commands lists the live resources.

Screencast

Command Options

gc help list
Usage: gc list|l [options]

List the live resources

Options:
-j, --json <file> write inventory to a file in json format (default:
"artifacts/inventory.json")
-g, --graph create an SVG representation of the live infrastructure
-a, --all List also read-only resources
-n, --name <value> List by name
--id <value> List by id
-o, --our List only our managed resources
--default-exclude Exclude the default resources, i.e VPC and Subnet
-e, --types-exclude <value> Exclude by type, multiple values allowed
-d, --canBeDeleted display resources which can be deleted, a.k.a non default
resources
-p, --provider <value> Filter by provider, multiple values allowed
--resource-group <value> Azure only: Filter by resource groups, multiple values
allowed
-t, --types <value> Include by type, multiple values allowed
--group <value> Include by group, multiple values allowed
--dot-file <dotFile> output 'dot' file name for the live diagram (default:
"artifacts/diagram-live.dot")
--title <value> diagram title (default: "aks-basic")
-h, --help display help for command

graph

Produce a diagram depicting the lives resources and their associations.

gc list --graph

all

The all option also display list-only resources which are resources not created/deleted by this application. For instance the AWS KeyPair resource is a considered as list-only.

gc list --all

name

The name option lists the resource given its name:

gc list --name web-server

id

The id option lists the resource given its id:

gc list --name ewBMe9BLC

types

The types option lists the resources filtering by types

gc list --types Server

The types option is repeatable:

gc list --types Server --types SecurityGroup

types-exclude

The --types-exclude option excludes one or more types:

gc list --graph  --types-exclude Certificate --types-exclude Route53Domain --types-exclude NetworkInterface

our

The our option only list resources deployed by this application

gc list --our

canBeDeleted

The canBeDeleted option only lists resources that can be deleted by this application. For instance, the default AWS VPC for instance cannot be deleted and will not show up with this option.

gc list --canBeDeleted

--default-exclude

The --default-exclude option excludes the default resources such as VPC, subnet and security group.

gc list --default-exclude

provider

The provider option only lists resources for a given provider

gc list --provider=aws

resource-group

The resource-group option filters based on the resource group. Azure only.

gc list --resource-group=my-rg