ibm.getIsFlowLogs
Explore with Pulumi AI
Retrieve an information of an existing IBM Cloud Infrastructure flow logs as a read-only data source. For more information, about VPC flow log, see creating a flow log collector.
Note:
VPC infrastructure services are a regional specific based endpoint, by default targets to us-south
. Please make sure to target right region in the provider block as shown in the provider.tf
file, if VPC service is created in region other than us-south
.
provider.tf
import * as pulumi from "@pulumi/pulumi";
import pulumi
package main
import (
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
return await Deployment.RunAsync(() =>
{
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
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) {
}
}
{}
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as ibm from "@pulumi/ibm";
const example = ibm.getIsFlowLogs({});
const example1 = ibm.getIsFlowLogs({
name: "my-flow-log",
vpcName: ibm_is_vpc.example.name,
vpcCrn: ibm_is_vpc.example.crn,
vpc: ibm_is_vpc.example.id,
resourceGroup: ibm_is_vpc.example.resource_group,
target: ibm_is_vpc.example.id,
targetResourceType: "vpc",
});
import pulumi
import pulumi_ibm as ibm
example = ibm.get_is_flow_logs()
example1 = ibm.get_is_flow_logs(name="my-flow-log",
vpc_name=ibm_is_vpc["example"]["name"],
vpc_crn=ibm_is_vpc["example"]["crn"],
vpc=ibm_is_vpc["example"]["id"],
resource_group=ibm_is_vpc["example"]["resource_group"],
target=ibm_is_vpc["example"]["id"],
target_resource_type="vpc")
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/ibm/ibm"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := ibm.GetIsFlowLogs(ctx, &ibm.GetIsFlowLogsArgs{}, nil)
if err != nil {
return err
}
_, err = ibm.GetIsFlowLogs(ctx, &ibm.GetIsFlowLogsArgs{
Name: pulumi.StringRef("my-flow-log"),
VpcName: pulumi.StringRef(ibm_is_vpc.Example.Name),
VpcCrn: pulumi.StringRef(ibm_is_vpc.Example.Crn),
Vpc: pulumi.StringRef(ibm_is_vpc.Example.Id),
ResourceGroup: pulumi.StringRef(ibm_is_vpc.Example.Resource_group),
Target: pulumi.StringRef(ibm_is_vpc.Example.Id),
TargetResourceType: pulumi.StringRef("vpc"),
}, nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Ibm = Pulumi.Ibm;
return await Deployment.RunAsync(() =>
{
var example = Ibm.GetIsFlowLogs.Invoke();
var example1 = Ibm.GetIsFlowLogs.Invoke(new()
{
Name = "my-flow-log",
VpcName = ibm_is_vpc.Example.Name,
VpcCrn = ibm_is_vpc.Example.Crn,
Vpc = ibm_is_vpc.Example.Id,
ResourceGroup = ibm_is_vpc.Example.Resource_group,
Target = ibm_is_vpc.Example.Id,
TargetResourceType = "vpc",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.ibm.IbmFunctions;
import com.pulumi.ibm.inputs.GetIsFlowLogsArgs;
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 example = IbmFunctions.getIsFlowLogs();
final var example1 = IbmFunctions.getIsFlowLogs(GetIsFlowLogsArgs.builder()
.name("my-flow-log")
.vpcName(ibm_is_vpc.example().name())
.vpcCrn(ibm_is_vpc.example().crn())
.vpc(ibm_is_vpc.example().id())
.resourceGroup(ibm_is_vpc.example().resource_group())
.target(ibm_is_vpc.example().id())
.targetResourceType("vpc")
.build());
}
}
variables:
example:
fn::invoke:
function: ibm:getIsFlowLogs
arguments: {}
example1:
fn::invoke:
function: ibm:getIsFlowLogs
arguments:
name: my-flow-log
vpcName: ${ibm_is_vpc.example.name}
vpcCrn: ${ibm_is_vpc.example.crn}
vpc: ${ibm_is_vpc.example.id}
resourceGroup: ${ibm_is_vpc.example.resource_group}
target: ${ibm_is_vpc.example.id}
targetResourceType: vpc
Using getIsFlowLogs
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 getIsFlowLogs(args: GetIsFlowLogsArgs, opts?: InvokeOptions): Promise<GetIsFlowLogsResult>
function getIsFlowLogsOutput(args: GetIsFlowLogsOutputArgs, opts?: InvokeOptions): Output<GetIsFlowLogsResult>
def get_is_flow_logs(id: Optional[str] = None,
name: Optional[str] = None,
resource_group: Optional[str] = None,
target: Optional[str] = None,
target_resource_type: Optional[str] = None,
vpc: Optional[str] = None,
vpc_crn: Optional[str] = None,
vpc_name: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetIsFlowLogsResult
def get_is_flow_logs_output(id: Optional[pulumi.Input[str]] = None,
name: Optional[pulumi.Input[str]] = None,
resource_group: Optional[pulumi.Input[str]] = None,
target: Optional[pulumi.Input[str]] = None,
target_resource_type: Optional[pulumi.Input[str]] = None,
vpc: Optional[pulumi.Input[str]] = None,
vpc_crn: Optional[pulumi.Input[str]] = None,
vpc_name: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetIsFlowLogsResult]
func GetIsFlowLogs(ctx *Context, args *GetIsFlowLogsArgs, opts ...InvokeOption) (*GetIsFlowLogsResult, error)
func GetIsFlowLogsOutput(ctx *Context, args *GetIsFlowLogsOutputArgs, opts ...InvokeOption) GetIsFlowLogsResultOutput
> Note: This function is named GetIsFlowLogs
in the Go SDK.
public static class GetIsFlowLogs
{
public static Task<GetIsFlowLogsResult> InvokeAsync(GetIsFlowLogsArgs args, InvokeOptions? opts = null)
public static Output<GetIsFlowLogsResult> Invoke(GetIsFlowLogsInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetIsFlowLogsResult> getIsFlowLogs(GetIsFlowLogsArgs args, InvokeOptions options)
public static Output<GetIsFlowLogsResult> getIsFlowLogs(GetIsFlowLogsArgs args, InvokeOptions options)
fn::invoke:
function: ibm:index/getIsFlowLogs:getIsFlowLogs
arguments:
# arguments dictionary
The following arguments are supported:
- Id string
- (String) The unique identifier of the flow log collector.
- Name string
- The name of the flow log collector
- Resource
Group string - The ID of the Resource group this flow log collector belongs to
- Target string
- The ID of the target this collector is collecting flow logs for.
- Target
Resource stringType - The target resource type for this flow log collector. Available options are
instance
,instance_network_attachment
,network_interface
,subnet
,vpc
,virtual_network_interface
- Vpc string
- The ID of the VPC this flow log collector resides in
- Vpc
Crn string - The CRN of the VPC this flow log collector resides in
- Vpc
Name string - The name of the VPC this flow log collector resides in
- Id string
- (String) The unique identifier of the flow log collector.
- Name string
- The name of the flow log collector
- Resource
Group string - The ID of the Resource group this flow log collector belongs to
- Target string
- The ID of the target this collector is collecting flow logs for.
- Target
Resource stringType - The target resource type for this flow log collector. Available options are
instance
,instance_network_attachment
,network_interface
,subnet
,vpc
,virtual_network_interface
- Vpc string
- The ID of the VPC this flow log collector resides in
- Vpc
Crn string - The CRN of the VPC this flow log collector resides in
- Vpc
Name string - The name of the VPC this flow log collector resides in
- id String
- (String) The unique identifier of the flow log collector.
- name String
- The name of the flow log collector
- resource
Group String - The ID of the Resource group this flow log collector belongs to
- target String
- The ID of the target this collector is collecting flow logs for.
- target
Resource StringType - The target resource type for this flow log collector. Available options are
instance
,instance_network_attachment
,network_interface
,subnet
,vpc
,virtual_network_interface
- vpc String
- The ID of the VPC this flow log collector resides in
- vpc
Crn String - The CRN of the VPC this flow log collector resides in
- vpc
Name String - The name of the VPC this flow log collector resides in
- id string
- (String) The unique identifier of the flow log collector.
- name string
- The name of the flow log collector
- resource
Group string - The ID of the Resource group this flow log collector belongs to
- target string
- The ID of the target this collector is collecting flow logs for.
- target
Resource stringType - The target resource type for this flow log collector. Available options are
instance
,instance_network_attachment
,network_interface
,subnet
,vpc
,virtual_network_interface
- vpc string
- The ID of the VPC this flow log collector resides in
- vpc
Crn string - The CRN of the VPC this flow log collector resides in
- vpc
Name string - The name of the VPC this flow log collector resides in
- id str
- (String) The unique identifier of the flow log collector.
- name str
- The name of the flow log collector
- resource_
group str - The ID of the Resource group this flow log collector belongs to
- target str
- The ID of the target this collector is collecting flow logs for.
- target_
resource_ strtype - The target resource type for this flow log collector. Available options are
instance
,instance_network_attachment
,network_interface
,subnet
,vpc
,virtual_network_interface
- vpc str
- The ID of the VPC this flow log collector resides in
- vpc_
crn str - The CRN of the VPC this flow log collector resides in
- vpc_
name str - The name of the VPC this flow log collector resides in
- id String
- (String) The unique identifier of the flow log collector.
- name String
- The name of the flow log collector
- resource
Group String - The ID of the Resource group this flow log collector belongs to
- target String
- The ID of the target this collector is collecting flow logs for.
- target
Resource StringType - The target resource type for this flow log collector. Available options are
instance
,instance_network_attachment
,network_interface
,subnet
,vpc
,virtual_network_interface
- vpc String
- The ID of the VPC this flow log collector resides in
- vpc
Crn String - The CRN of the VPC this flow log collector resides in
- vpc
Name String - The name of the VPC this flow log collector resides in
getIsFlowLogs Result
The following output properties are available:
- Flow
Log List<GetCollectors Is Flow Logs Flow Log Collector> - (List) Lists all the flow logs in the IBM Cloud.
- Id string
- (String) The unique identifier of the flow log collector.
- Name string
- (String) The flow log collector name.
- Resource
Group string - (String) The resource group Id of the flow log.
- Target string
- (String) The target ID that the flow log collector collects the flow logs.
- Target
Resource stringType - Vpc string
- (String) The VPC of the flow log collector that are associated.
- Vpc
Crn string - Vpc
Name string
- Flow
Log []GetCollectors Is Flow Logs Flow Log Collector - (List) Lists all the flow logs in the IBM Cloud.
- Id string
- (String) The unique identifier of the flow log collector.
- Name string
- (String) The flow log collector name.
- Resource
Group string - (String) The resource group Id of the flow log.
- Target string
- (String) The target ID that the flow log collector collects the flow logs.
- Target
Resource stringType - Vpc string
- (String) The VPC of the flow log collector that are associated.
- Vpc
Crn string - Vpc
Name string
- flow
Log List<GetCollectors Is Flow Logs Flow Log Collector> - (List) Lists all the flow logs in the IBM Cloud.
- id String
- (String) The unique identifier of the flow log collector.
- name String
- (String) The flow log collector name.
- resource
Group String - (String) The resource group Id of the flow log.
- target String
- (String) The target ID that the flow log collector collects the flow logs.
- target
Resource StringType - vpc String
- (String) The VPC of the flow log collector that are associated.
- vpc
Crn String - vpc
Name String
- flow
Log GetCollectors Is Flow Logs Flow Log Collector[] - (List) Lists all the flow logs in the IBM Cloud.
- id string
- (String) The unique identifier of the flow log collector.
- name string
- (String) The flow log collector name.
- resource
Group string - (String) The resource group Id of the flow log.
- target string
- (String) The target ID that the flow log collector collects the flow logs.
- target
Resource stringType - vpc string
- (String) The VPC of the flow log collector that are associated.
- vpc
Crn string - vpc
Name string
- flow_
log_ Sequence[Getcollectors Is Flow Logs Flow Log Collector] - (List) Lists all the flow logs in the IBM Cloud.
- id str
- (String) The unique identifier of the flow log collector.
- name str
- (String) The flow log collector name.
- resource_
group str - (String) The resource group Id of the flow log.
- target str
- (String) The target ID that the flow log collector collects the flow logs.
- target_
resource_ strtype - vpc str
- (String) The VPC of the flow log collector that are associated.
- vpc_
crn str - vpc_
name str
- flow
Log List<Property Map>Collectors - (List) Lists all the flow logs in the IBM Cloud.
- id String
- (String) The unique identifier of the flow log collector.
- name String
- (String) The flow log collector name.
- resource
Group String - (String) The resource group Id of the flow log.
- target String
- (String) The target ID that the flow log collector collects the flow logs.
- target
Resource StringType - vpc String
- (String) The VPC of the flow log collector that are associated.
- vpc
Crn String - vpc
Name String
Supporting Types
GetIsFlowLogsFlowLogCollector
- List<string>
- (String) Access management tags associated for flow log.
- Active bool
- (String) Indicates whether the collector is active.
- Created
At string - (Timestamp) The date and time the flow log created.
- Crn string
- (String) The CRN of the flow log collector.
- Href string
- (String) The URL of the flow log collector.
- Id string
- (String) The unique identifier of the flow log collector.
- Lifecycle
State string - (String) The lifecycle state of the flow log collector.
- Name string
- The name of the flow log collector
- Resource
Group string - The ID of the Resource group this flow log collector belongs to
- Storage
Bucket string - (String) The IBM Cloud Object Storage bucket name where the flow logs are logged.
- List<string>
- Target string
- The ID of the target this collector is collecting flow logs for.
- Vpc string
- The ID of the VPC this flow log collector resides in
- []string
- (String) Access management tags associated for flow log.
- Active bool
- (String) Indicates whether the collector is active.
- Created
At string - (Timestamp) The date and time the flow log created.
- Crn string
- (String) The CRN of the flow log collector.
- Href string
- (String) The URL of the flow log collector.
- Id string
- (String) The unique identifier of the flow log collector.
- Lifecycle
State string - (String) The lifecycle state of the flow log collector.
- Name string
- The name of the flow log collector
- Resource
Group string - The ID of the Resource group this flow log collector belongs to
- Storage
Bucket string - (String) The IBM Cloud Object Storage bucket name where the flow logs are logged.
- []string
- Target string
- The ID of the target this collector is collecting flow logs for.
- Vpc string
- The ID of the VPC this flow log collector resides in
- List<String>
- (String) Access management tags associated for flow log.
- active Boolean
- (String) Indicates whether the collector is active.
- created
At String - (Timestamp) The date and time the flow log created.
- crn String
- (String) The CRN of the flow log collector.
- href String
- (String) The URL of the flow log collector.
- id String
- (String) The unique identifier of the flow log collector.
- lifecycle
State String - (String) The lifecycle state of the flow log collector.
- name String
- The name of the flow log collector
- resource
Group String - The ID of the Resource group this flow log collector belongs to
- storage
Bucket String - (String) The IBM Cloud Object Storage bucket name where the flow logs are logged.
- List<String>
- target String
- The ID of the target this collector is collecting flow logs for.
- vpc String
- The ID of the VPC this flow log collector resides in
- string[]
- (String) Access management tags associated for flow log.
- active boolean
- (String) Indicates whether the collector is active.
- created
At string - (Timestamp) The date and time the flow log created.
- crn string
- (String) The CRN of the flow log collector.
- href string
- (String) The URL of the flow log collector.
- id string
- (String) The unique identifier of the flow log collector.
- lifecycle
State string - (String) The lifecycle state of the flow log collector.
- name string
- The name of the flow log collector
- resource
Group string - The ID of the Resource group this flow log collector belongs to
- storage
Bucket string - (String) The IBM Cloud Object Storage bucket name where the flow logs are logged.
- string[]
- target string
- The ID of the target this collector is collecting flow logs for.
- vpc string
- The ID of the VPC this flow log collector resides in
- Sequence[str]
- (String) Access management tags associated for flow log.
- active bool
- (String) Indicates whether the collector is active.
- created_
at str - (Timestamp) The date and time the flow log created.
- crn str
- (String) The CRN of the flow log collector.
- href str
- (String) The URL of the flow log collector.
- id str
- (String) The unique identifier of the flow log collector.
- lifecycle_
state str - (String) The lifecycle state of the flow log collector.
- name str
- The name of the flow log collector
- resource_
group str - The ID of the Resource group this flow log collector belongs to
- storage_
bucket str - (String) The IBM Cloud Object Storage bucket name where the flow logs are logged.
- Sequence[str]
- target str
- The ID of the target this collector is collecting flow logs for.
- vpc str
- The ID of the VPC this flow log collector resides in
- List<String>
- (String) Access management tags associated for flow log.
- active Boolean
- (String) Indicates whether the collector is active.
- created
At String - (Timestamp) The date and time the flow log created.
- crn String
- (String) The CRN of the flow log collector.
- href String
- (String) The URL of the flow log collector.
- id String
- (String) The unique identifier of the flow log collector.
- lifecycle
State String - (String) The lifecycle state of the flow log collector.
- name String
- The name of the flow log collector
- resource
Group String - The ID of the Resource group this flow log collector belongs to
- storage
Bucket String - (String) The IBM Cloud Object Storage bucket name where the flow logs are logged.
- List<String>
- target String
- The ID of the target this collector is collecting flow logs for.
- vpc String
- The ID of the VPC this flow log collector resides in
Package Details
- Repository
- ibm ibm-cloud/terraform-provider-ibm
- License
- Notes
- This Pulumi package is based on the
ibm
Terraform Provider.