Skip to content

Infrastructure

Bases: DuploResourceV2

Duplocloud Infrastructure Resource

The infrastructure resource provides a set of commands to manage infrastructures in the Duplo system. An infrastructure defines the underlying cloud environment including VPC, subnets, and Kubernetes clusters.

Basic CLI Use
duploctl infrastructure <action>

Commands

apply

Apply a service.

Parameters:

--file, -f, --cli-input
A file to read the input from
FileType('r') action: YamlAction
--wait, -w
Wait for the operation to complete

create

Create Infrastructure

Create a new infrastructure. When used with the --wait flag, the command will poll until the infrastructure reaches a Complete provisioning status.

Basic CLI Use
duploctl infrastructure create --file infra.yaml
Infrastructure Body

Contents of the infra.yaml file

EnableK8Cluster: false
EnableECSCluster: false
AzCount: 2
Vnet:
  SubnetCidr: 22
Cloud: 0
Region: us-east-2

Create One Liner
echo """
EnableK8Cluster: false
EnableECSCluster: false
AzCount: 2
Vnet:
  SubnetCidr: 22
Cloud: 0
Region: us-east-2

""" | duploctl infrastructure create -f -

Returns:

Name Type Description
message

A success message.

Parameters:

--file, -f, --cli-input
A file to read the input from
FileType('r') action: YamlAction

delete

Delete Infrastructure

Delete an infrastructure by name.

Basic CLI Use
duploctl infrastructure delete <name>

Returns:

Name Type Description
message

A success message.

Parameters:

name positional
The resource name
str

eks_config

EKS Configuration

Retrieve EKS session credentials for the current user scoped to an infrastructure plan.

Basic CLI Use
duploctl infrastructure eks_config --plan <plan-name>

Returns:

Name Type Description
eks_config

The EKS cluster configuration and credentials.

Parameters:

--plan, -P
The plan name.
str env: $DUPLO_PLAN

faults

Infrastructure Faults

Retrieve a list of all faults across infrastructures in the Duplo system.

Basic CLI Use
duploctl infrastructure faults <name>

Returns:

Name Type Description
faults list

A list of infrastructure faults.

Parameters:

name positional
The resource name
str

find

Find Infrastructure

Find an infrastructure by name.

Basic CLI Use
duploctl infrastructure find <name>

Returns:

Name Type Description
infrastructure

The infrastructure object.

Parameters:

name positional
The resource name
str

list

List Infrastructures

Retrieve a list of all infrastructures in the Duplo system.

Basic CLI Use
duploctl infrastructure list

Returns:

Name Type Description
infrastructures list

A list of all infrastructures.