1. Packages
  2. Civo Provider
  3. API Docs
  4. getNetwork
civo 1.1.5 published on Thursday, Feb 6, 2025 by civo

civo.getNetwork

Explore with Pulumi AI

civo 1.1.5 published on Thursday, Feb 6, 2025 by civo

Retrieve information about a network for use in other resources.

This data source provides all of the network’s properties as configured on your Civo account.

Networks may be looked up by id or label, and you can optionally pass region if you want to make a lookup for a specific network inside that region.

Example Usage

Coming soon!
Coming soon!
Coming soon!
Coming soon!
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.civo.CivoFunctions;
import com.pulumi.civo.inputs.GetNetworkArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        final var test = CivoFunctions.getNetwork(GetNetworkArgs.builder()
            .cidrV4("10.0.0.0/24")
            .label("test-network")
            .nameserversV4(            
                "8.8.8.8",
                "8.8.4.4",
                "1.1.1.1")
            .region("LON1")
            .build());

    }
}
Copy
variables:
  test:
    fn::invoke:
      function: civo:getNetwork
      arguments:
        cidrV4: 10.0.0.0/24
        label: test-network
        nameserversV4:
          - 8.8.8.8
          - 8.8.4.4
          - 1.1.1.1
        region: LON1
Copy

Using getNetwork

Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

function getNetwork(args: GetNetworkArgs, opts?: InvokeOptions): Promise<GetNetworkResult>
function getNetworkOutput(args: GetNetworkOutputArgs, opts?: InvokeOptions): Output<GetNetworkResult>
Copy
def get_network(id: Optional[str] = None,
                label: Optional[str] = None,
                region: Optional[str] = None,
                opts: Optional[InvokeOptions] = None) -> GetNetworkResult
def get_network_output(id: Optional[pulumi.Input[str]] = None,
                label: Optional[pulumi.Input[str]] = None,
                region: Optional[pulumi.Input[str]] = None,
                opts: Optional[InvokeOptions] = None) -> Output[GetNetworkResult]
Copy
func LookupNetwork(ctx *Context, args *LookupNetworkArgs, opts ...InvokeOption) (*LookupNetworkResult, error)
func LookupNetworkOutput(ctx *Context, args *LookupNetworkOutputArgs, opts ...InvokeOption) LookupNetworkResultOutput
Copy

> Note: This function is named LookupNetwork in the Go SDK.

public static class GetNetwork 
{
    public static Task<GetNetworkResult> InvokeAsync(GetNetworkArgs args, InvokeOptions? opts = null)
    public static Output<GetNetworkResult> Invoke(GetNetworkInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetNetworkResult> getNetwork(GetNetworkArgs args, InvokeOptions options)
public static Output<GetNetworkResult> getNetwork(GetNetworkArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: civo:index/getNetwork:getNetwork
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

Id string
The ID of this resource.
Label string
The label of an existing network
Region string
The region of an existing network
Id string
The ID of this resource.
Label string
The label of an existing network
Region string
The region of an existing network
id String
The ID of this resource.
label String
The label of an existing network
region String
The region of an existing network
id string
The ID of this resource.
label string
The label of an existing network
region string
The region of an existing network
id str
The ID of this resource.
label str
The label of an existing network
region str
The region of an existing network
id String
The ID of this resource.
label String
The label of an existing network
region String
The region of an existing network

getNetwork Result

The following output properties are available:

Default bool
If is the default network
Name string
The name of the network
Id string
The ID of this resource.
Label string
The label of an existing network
Region string
The region of an existing network
Default bool
If is the default network
Name string
The name of the network
Id string
The ID of this resource.
Label string
The label of an existing network
Region string
The region of an existing network
default_ Boolean
If is the default network
name String
The name of the network
id String
The ID of this resource.
label String
The label of an existing network
region String
The region of an existing network
default boolean
If is the default network
name string
The name of the network
id string
The ID of this resource.
label string
The label of an existing network
region string
The region of an existing network
default bool
If is the default network
name str
The name of the network
id str
The ID of this resource.
label str
The label of an existing network
region str
The region of an existing network
default Boolean
If is the default network
name String
The name of the network
id String
The ID of this resource.
label String
The label of an existing network
region String
The region of an existing network

Package Details

Repository
Civo civo/terraform-provider-civo
License
Notes
This Pulumi package is based on the civo Terraform Provider.
civo 1.1.5 published on Thursday, Feb 6, 2025 by civo