ibm 1.78.0 published on Wednesday, Apr 30, 2025 by ibm-cloud
ibm.getSmSecretGroup
Explore with Pulumi AI
Provides a read-only data source for a secret group. 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 secretGroup = ibm.getSmSecretGroup({
instanceId: ibm_resource_instance.sm_instance.guid,
region: "us-south",
secretGroupId: ibm_sm_secret_group.sm_secret_group_instance.secret_group_id,
});
import pulumi
import pulumi_ibm as ibm
secret_group = ibm.get_sm_secret_group(instance_id=ibm_resource_instance["sm_instance"]["guid"],
region="us-south",
secret_group_id=ibm_sm_secret_group["sm_secret_group_instance"]["secret_group_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.LookupSmSecretGroup(ctx, &ibm.LookupSmSecretGroupArgs{
InstanceId: ibm_resource_instance.Sm_instance.Guid,
Region: pulumi.StringRef("us-south"),
SecretGroupId: ibm_sm_secret_group.Sm_secret_group_instance.Secret_group_id,
}, 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 secretGroup = Ibm.GetSmSecretGroup.Invoke(new()
{
InstanceId = ibm_resource_instance.Sm_instance.Guid,
Region = "us-south",
SecretGroupId = ibm_sm_secret_group.Sm_secret_group_instance.Secret_group_id,
});
});
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.GetSmSecretGroupArgs;
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 secretGroup = IbmFunctions.getSmSecretGroup(GetSmSecretGroupArgs.builder()
.instanceId(ibm_resource_instance.sm_instance().guid())
.region("us-south")
.secretGroupId(ibm_sm_secret_group.sm_secret_group_instance().secret_group_id())
.build());
}
}
variables:
secretGroup:
fn::invoke:
function: ibm:getSmSecretGroup
arguments:
instanceId: ${ibm_resource_instance.sm_instance.guid}
region: us-south
secretGroupId: ${ibm_sm_secret_group.sm_secret_group_instance.secret_group_id}
Using getSmSecretGroup
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 getSmSecretGroup(args: GetSmSecretGroupArgs, opts?: InvokeOptions): Promise<GetSmSecretGroupResult>
function getSmSecretGroupOutput(args: GetSmSecretGroupOutputArgs, opts?: InvokeOptions): Output<GetSmSecretGroupResult>
def get_sm_secret_group(endpoint_type: Optional[str] = None,
id: Optional[str] = None,
instance_id: Optional[str] = None,
region: Optional[str] = None,
secret_group_id: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetSmSecretGroupResult
def get_sm_secret_group_output(endpoint_type: Optional[pulumi.Input[str]] = None,
id: Optional[pulumi.Input[str]] = None,
instance_id: Optional[pulumi.Input[str]] = None,
region: Optional[pulumi.Input[str]] = None,
secret_group_id: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetSmSecretGroupResult]
func LookupSmSecretGroup(ctx *Context, args *LookupSmSecretGroupArgs, opts ...InvokeOption) (*LookupSmSecretGroupResult, error)
func LookupSmSecretGroupOutput(ctx *Context, args *LookupSmSecretGroupOutputArgs, opts ...InvokeOption) LookupSmSecretGroupResultOutput
> Note: This function is named LookupSmSecretGroup
in the Go SDK.
public static class GetSmSecretGroup
{
public static Task<GetSmSecretGroupResult> InvokeAsync(GetSmSecretGroupArgs args, InvokeOptions? opts = null)
public static Output<GetSmSecretGroupResult> Invoke(GetSmSecretGroupInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetSmSecretGroupResult> getSmSecretGroup(GetSmSecretGroupArgs args, InvokeOptions options)
public static Output<GetSmSecretGroupResult> getSmSecretGroup(GetSmSecretGroupArgs args, InvokeOptions options)
fn::invoke:
function: ibm:index/getSmSecretGroup:getSmSecretGroup
arguments:
# arguments dictionary
The following arguments are supported:
- Instance
Id string - The GUID of the Secrets Manager instance.
- Secret
Group stringId - The ID of the secret group.
- Constraints: The maximum length is
36
characters. The minimum length is7
characters. The value must match regular expression/^([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}|default)$/
.
- Constraints: The maximum length is
- Endpoint
Type string - The endpoint type. If not provided the endpoint type is determined by the
visibility
argument provided in the provider configuration.- Constraints: Allowable values are:
private
,public
.
- Constraints: Allowable values are:
- Id string
- The unique identifier of the data source.
- Region string
- The region of the Secrets Manager instance. If not provided defaults to the region defined in the IBM provider configuration.
- Instance
Id string - The GUID of the Secrets Manager instance.
- Secret
Group stringId - The ID of the secret group.
- Constraints: The maximum length is
36
characters. The minimum length is7
characters. The value must match regular expression/^([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}|default)$/
.
- Constraints: The maximum length is
- Endpoint
Type string - The endpoint type. If not provided the endpoint type is determined by the
visibility
argument provided in the provider configuration.- Constraints: Allowable values are:
private
,public
.
- Constraints: Allowable values are:
- Id string
- The unique identifier of the data source.
- Region string
- The region of the Secrets Manager instance. If not provided defaults to the region defined in the IBM provider configuration.
- instance
Id String - The GUID of the Secrets Manager instance.
- secret
Group StringId - The ID of the secret group.
- Constraints: The maximum length is
36
characters. The minimum length is7
characters. The value must match regular expression/^([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}|default)$/
.
- Constraints: The maximum length is
- endpoint
Type String - The endpoint type. If not provided the endpoint type is determined by the
visibility
argument provided in the provider configuration.- Constraints: Allowable values are:
private
,public
.
- Constraints: Allowable values are:
- id String
- The unique identifier of the data source.
- region String
- The region of the Secrets Manager instance. If not provided defaults to the region defined in the IBM provider configuration.
- instance
Id string - The GUID of the Secrets Manager instance.
- secret
Group stringId - The ID of the secret group.
- Constraints: The maximum length is
36
characters. The minimum length is7
characters. The value must match regular expression/^([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}|default)$/
.
- Constraints: The maximum length is
- endpoint
Type string - The endpoint type. If not provided the endpoint type is determined by the
visibility
argument provided in the provider configuration.- Constraints: Allowable values are:
private
,public
.
- Constraints: Allowable values are:
- id string
- The unique identifier of the data source.
- region string
- The region of the Secrets Manager instance. If not provided defaults to the region defined in the IBM provider configuration.
- instance_
id str - The GUID of the Secrets Manager instance.
- secret_
group_ strid - The ID of the secret group.
- Constraints: The maximum length is
36
characters. The minimum length is7
characters. The value must match regular expression/^([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}|default)$/
.
- Constraints: The maximum length is
- endpoint_
type str - The endpoint type. If not provided the endpoint type is determined by the
visibility
argument provided in the provider configuration.- Constraints: Allowable values are:
private
,public
.
- Constraints: Allowable values are:
- id str
- The unique identifier of the data source.
- region str
- The region of the Secrets Manager instance. If not provided defaults to the region defined in the IBM provider configuration.
- instance
Id String - The GUID of the Secrets Manager instance.
- secret
Group StringId - The ID of the secret group.
- Constraints: The maximum length is
36
characters. The minimum length is7
characters. The value must match regular expression/^([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}|default)$/
.
- Constraints: The maximum length is
- endpoint
Type String - The endpoint type. If not provided the endpoint type is determined by the
visibility
argument provided in the provider configuration.- Constraints: Allowable values are:
private
,public
.
- Constraints: Allowable values are:
- id String
- The unique identifier of the data source.
- region String
- The region of the Secrets Manager instance. If not provided defaults to the region defined in the IBM provider configuration.
getSmSecretGroup Result
The following output properties are available:
- Created
At string - (String) The date when a resource was created. The date format follows RFC 3339.
- Description string
- (String) An extended description of your secret group.To protect your privacy, do not use personal data, such as your name or location, as a description for your secret group.
- Constraints: The maximum length is
1024
characters. The minimum length is0
characters. The value must match regular expression/(.*?)/
.
- Constraints: The maximum length is
- Id string
- The unique identifier of the data source.
- Instance
Id string - Name string
- (String) The name of your existing secret group.
- Constraints: The maximum length is
64
characters. The minimum length is2
characters. The value must match regular expression/(.*?)/
.
- Constraints: The maximum length is
- Region string
- Secret
Group stringId - Updated
At string - (String) The date when a resource was recently modified. The date format follows RFC 3339.
- Endpoint
Type string
- Created
At string - (String) The date when a resource was created. The date format follows RFC 3339.
- Description string
- (String) An extended description of your secret group.To protect your privacy, do not use personal data, such as your name or location, as a description for your secret group.
- Constraints: The maximum length is
1024
characters. The minimum length is0
characters. The value must match regular expression/(.*?)/
.
- Constraints: The maximum length is
- Id string
- The unique identifier of the data source.
- Instance
Id string - Name string
- (String) The name of your existing secret group.
- Constraints: The maximum length is
64
characters. The minimum length is2
characters. The value must match regular expression/(.*?)/
.
- Constraints: The maximum length is
- Region string
- Secret
Group stringId - Updated
At string - (String) The date when a resource was recently modified. The date format follows RFC 3339.
- Endpoint
Type string
- created
At String - (String) The date when a resource was created. The date format follows RFC 3339.
- description String
- (String) An extended description of your secret group.To protect your privacy, do not use personal data, such as your name or location, as a description for your secret group.
- Constraints: The maximum length is
1024
characters. The minimum length is0
characters. The value must match regular expression/(.*?)/
.
- Constraints: The maximum length is
- id String
- The unique identifier of the data source.
- instance
Id String - name String
- (String) The name of your existing secret group.
- Constraints: The maximum length is
64
characters. The minimum length is2
characters. The value must match regular expression/(.*?)/
.
- Constraints: The maximum length is
- region String
- secret
Group StringId - updated
At String - (String) The date when a resource was recently modified. The date format follows RFC 3339.
- endpoint
Type String
- created
At string - (String) The date when a resource was created. The date format follows RFC 3339.
- description string
- (String) An extended description of your secret group.To protect your privacy, do not use personal data, such as your name or location, as a description for your secret group.
- Constraints: The maximum length is
1024
characters. The minimum length is0
characters. The value must match regular expression/(.*?)/
.
- Constraints: The maximum length is
- id string
- The unique identifier of the data source.
- instance
Id string - name string
- (String) The name of your existing secret group.
- Constraints: The maximum length is
64
characters. The minimum length is2
characters. The value must match regular expression/(.*?)/
.
- Constraints: The maximum length is
- region string
- secret
Group stringId - updated
At string - (String) The date when a resource was recently modified. The date format follows RFC 3339.
- endpoint
Type string
- created_
at str - (String) The date when a resource was created. The date format follows RFC 3339.
- description str
- (String) An extended description of your secret group.To protect your privacy, do not use personal data, such as your name or location, as a description for your secret group.
- Constraints: The maximum length is
1024
characters. The minimum length is0
characters. The value must match regular expression/(.*?)/
.
- Constraints: The maximum length is
- id str
- The unique identifier of the data source.
- instance_
id str - name str
- (String) The name of your existing secret group.
- Constraints: The maximum length is
64
characters. The minimum length is2
characters. The value must match regular expression/(.*?)/
.
- Constraints: The maximum length is
- region str
- secret_
group_ strid - updated_
at str - (String) The date when a resource was recently modified. The date format follows RFC 3339.
- endpoint_
type str
- created
At String - (String) The date when a resource was created. The date format follows RFC 3339.
- description String
- (String) An extended description of your secret group.To protect your privacy, do not use personal data, such as your name or location, as a description for your secret group.
- Constraints: The maximum length is
1024
characters. The minimum length is0
characters. The value must match regular expression/(.*?)/
.
- Constraints: The maximum length is
- id String
- The unique identifier of the data source.
- instance
Id String - name String
- (String) The name of your existing secret group.
- Constraints: The maximum length is
64
characters. The minimum length is2
characters. The value must match regular expression/(.*?)/
.
- Constraints: The maximum length is
- region String
- secret
Group StringId - updated
At String - (String) The date when a resource was recently modified. The date format follows RFC 3339.
- endpoint
Type String
Package Details
- Repository
- ibm ibm-cloud/terraform-provider-ibm
- License
- Notes
- This Pulumi package is based on the
ibm
Terraform Provider.