Civo v2.4.1 published on Thursday, Aug 22, 2024 by Pulumi
civo.getNetwork
Explore with Pulumi AI
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()
.label("test-network")
.region("LON1")
.cidrV4("10.0.0.0/24")
.nameserversV4(
"8.8.8.8",
"8.8.4.4",
"1.1.1.1")
.build());
}
}
variables:
test:
fn::invoke:
Function: civo:getNetwork
Arguments:
label: test-network
region: LON1
cidrV4: 10.0.0.0/24
nameserversV4:
- 8.8.8.8
- 8.8.4.4
- 1.1.1.1
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>
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]
func LookupNetwork(ctx *Context, args *LookupNetworkArgs, opts ...InvokeOption) (*LookupNetworkResult, error)
func LookupNetworkOutput(ctx *Context, args *LookupNetworkOutputArgs, opts ...InvokeOption) LookupNetworkResultOutput
> 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)
}
public static CompletableFuture<GetNetworkResult> getNetwork(GetNetworkArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: civo:index/getNetwork:getNetwork
arguments:
# arguments dictionary
The following arguments are supported:
getNetwork Result
The following output properties are available:
Package Details
- Repository
- Civo pulumi/pulumi-civo
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
civo
Terraform Provider.