ibm.getIsSourceShare
Explore with Pulumi AI
Provides a read-only data source for the source share. You can then reference the fields of the data source in other resources within the same configuration using interpolation syntax.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as ibm from "@pulumi/ibm";
const exampleIsVpc = new ibm.IsVpc("exampleIsVpc", {});
const exampleIsShare = new ibm.IsShare("exampleIsShare", {
size: 200,
profile: "dp2",
zone: "us-south-2",
});
const example1 = new ibm.IsShare("example1", {
zone: "us-south-3",
sourceShare: exampleIsShare.isShareId,
profile: "tier-3iops",
replicationCronSpec: "0 */5 * * *",
});
const exampleIsSourceShare = ibm.getIsSourceShareOutput({
shareReplica: example1.isShareId,
});
import pulumi
import pulumi_ibm as ibm
example_is_vpc = ibm.IsVpc("exampleIsVpc")
example_is_share = ibm.IsShare("exampleIsShare",
size=200,
profile="dp2",
zone="us-south-2")
example1 = ibm.IsShare("example1",
zone="us-south-3",
source_share=example_is_share.is_share_id,
profile="tier-3iops",
replication_cron_spec="0 */5 * * *")
example_is_source_share = ibm.get_is_source_share_output(share_replica=example1.is_share_id)
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.NewIsVpc(ctx, "exampleIsVpc", nil)
if err != nil {
return err
}
exampleIsShare, err := ibm.NewIsShare(ctx, "exampleIsShare", &ibm.IsShareArgs{
Size: pulumi.Float64(200),
Profile: pulumi.String("dp2"),
Zone: pulumi.String("us-south-2"),
})
if err != nil {
return err
}
example1, err := ibm.NewIsShare(ctx, "example1", &ibm.IsShareArgs{
Zone: pulumi.String("us-south-3"),
SourceShare: exampleIsShare.IsShareId,
Profile: pulumi.String("tier-3iops"),
ReplicationCronSpec: pulumi.String("0 */5 * * *"),
})
if err != nil {
return err
}
_ = ibm.GetIsSourceShareOutput(ctx, ibm.GetIsSourceShareOutputArgs{
ShareReplica: example1.IsShareId,
}, nil)
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Ibm = Pulumi.Ibm;
return await Deployment.RunAsync(() =>
{
var exampleIsVpc = new Ibm.IsVpc("exampleIsVpc");
var exampleIsShare = new Ibm.IsShare("exampleIsShare", new()
{
Size = 200,
Profile = "dp2",
Zone = "us-south-2",
});
var example1 = new Ibm.IsShare("example1", new()
{
Zone = "us-south-3",
SourceShare = exampleIsShare.IsShareId,
Profile = "tier-3iops",
ReplicationCronSpec = "0 */5 * * *",
});
var exampleIsSourceShare = Ibm.GetIsSourceShare.Invoke(new()
{
ShareReplica = example1.IsShareId,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.ibm.IsVpc;
import com.pulumi.ibm.IsShare;
import com.pulumi.ibm.IsShareArgs;
import com.pulumi.ibm.IbmFunctions;
import com.pulumi.ibm.inputs.GetIsSourceShareArgs;
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) {
var exampleIsVpc = new IsVpc("exampleIsVpc");
var exampleIsShare = new IsShare("exampleIsShare", IsShareArgs.builder()
.size(200)
.profile("dp2")
.zone("us-south-2")
.build());
var example1 = new IsShare("example1", IsShareArgs.builder()
.zone("us-south-3")
.sourceShare(exampleIsShare.isShareId())
.profile("tier-3iops")
.replicationCronSpec("0 */5 * * *")
.build());
final var exampleIsSourceShare = IbmFunctions.getIsSourceShare(GetIsSourceShareArgs.builder()
.shareReplica(example1.isShareId())
.build());
}
}
resources:
exampleIsVpc:
type: ibm:IsVpc
exampleIsShare:
type: ibm:IsShare
properties:
size: 200
profile: dp2
zone: us-south-2
example1:
type: ibm:IsShare
properties:
zone: us-south-3
sourceShare: ${exampleIsShare.isShareId}
profile: tier-3iops
replicationCronSpec: 0 */5 * * *
variables:
exampleIsSourceShare:
fn::invoke:
function: ibm:getIsSourceShare
arguments:
shareReplica: ${example1.isShareId}
Using getIsSourceShare
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 getIsSourceShare(args: GetIsSourceShareArgs, opts?: InvokeOptions): Promise<GetIsSourceShareResult>
function getIsSourceShareOutput(args: GetIsSourceShareOutputArgs, opts?: InvokeOptions): Output<GetIsSourceShareResult>
def get_is_source_share(id: Optional[str] = None,
share_replica: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetIsSourceShareResult
def get_is_source_share_output(id: Optional[pulumi.Input[str]] = None,
share_replica: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetIsSourceShareResult]
func GetIsSourceShare(ctx *Context, args *GetIsSourceShareArgs, opts ...InvokeOption) (*GetIsSourceShareResult, error)
func GetIsSourceShareOutput(ctx *Context, args *GetIsSourceShareOutputArgs, opts ...InvokeOption) GetIsSourceShareResultOutput
> Note: This function is named GetIsSourceShare
in the Go SDK.
public static class GetIsSourceShare
{
public static Task<GetIsSourceShareResult> InvokeAsync(GetIsSourceShareArgs args, InvokeOptions? opts = null)
public static Output<GetIsSourceShareResult> Invoke(GetIsSourceShareInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetIsSourceShareResult> getIsSourceShare(GetIsSourceShareArgs args, InvokeOptions options)
public static Output<GetIsSourceShareResult> getIsSourceShare(GetIsSourceShareArgs args, InvokeOptions options)
fn::invoke:
function: ibm:index/getIsSourceShare:getIsSourceShare
arguments:
# arguments dictionary
The following arguments are supported:
- string
The file share identifier.
Note One of the aurgument is mandatory
- Id string
- (String) The ID of the file share.
- string
The file share identifier.
Note One of the aurgument is mandatory
- Id string
- (String) The ID of the file share.
- String
The file share identifier.
Note One of the aurgument is mandatory
- id String
- (String) The ID of the file share.
- string
The file share identifier.
Note One of the aurgument is mandatory
- id string
- (String) The ID of the file share.
- str
The file share identifier.
Note One of the aurgument is mandatory
- id str
- (String) The ID of the file share.
- String
The file share identifier.
Note One of the aurgument is mandatory
- id String
- (String) The ID of the file share.
getIsSourceShare Result
The following output properties are available:
- Crn string
- The CRN for this share.
- Href string
- The URL for this share.
- Id string
- (String) The ID of the file share.
- Name string
- The unique user-defined name for this file share.
- Resource
Type string - The type of resource referenced.
- string
- Crn string
- The CRN for this share.
- Href string
- The URL for this share.
- Id string
- (String) The ID of the file share.
- Name string
- The unique user-defined name for this file share.
- Resource
Type string - The type of resource referenced.
- string
- crn String
- The CRN for this share.
- href String
- The URL for this share.
- id String
- (String) The ID of the file share.
- name String
- The unique user-defined name for this file share.
- resource
Type String - The type of resource referenced.
- String
- crn string
- The CRN for this share.
- href string
- The URL for this share.
- id string
- (String) The ID of the file share.
- name string
- The unique user-defined name for this file share.
- resource
Type string - The type of resource referenced.
- string
- crn str
- The CRN for this share.
- href str
- The URL for this share.
- id str
- (String) The ID of the file share.
- name str
- The unique user-defined name for this file share.
- resource_
type str - The type of resource referenced.
- str
- crn String
- The CRN for this share.
- href String
- The URL for this share.
- id String
- (String) The ID of the file share.
- name String
- The unique user-defined name for this file share.
- resource
Type String - The type of resource referenced.
- String
Package Details
- Repository
- ibm ibm-cloud/terraform-provider-ibm
- License
- Notes
- This Pulumi package is based on the
ibm
Terraform Provider.