1. Packages
  2. Ibm Provider
  3. API Docs
  4. SmSecretGroup
ibm 1.77.1 published on Monday, Apr 14, 2025 by ibm-cloud

ibm.SmSecretGroup

Explore with Pulumi AI

Provides a resource for SecretGroup. This allows SecretGroup to be created, updated and deleted.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as ibm from "@pulumi/ibm";

const smSecretGroup = new ibm.SmSecretGroup("smSecretGroup", {
    instanceId: ibm_resource_instance.sm_instance.guid,
    region: "us-south",
    description: "Extended description for this group.",
});
Copy
import pulumi
import pulumi_ibm as ibm

sm_secret_group = ibm.SmSecretGroup("smSecretGroup",
    instance_id=ibm_resource_instance["sm_instance"]["guid"],
    region="us-south",
    description="Extended description for this group.")
Copy
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.NewSmSecretGroup(ctx, "smSecretGroup", &ibm.SmSecretGroupArgs{
			InstanceId:  pulumi.Any(ibm_resource_instance.Sm_instance.Guid),
			Region:      pulumi.String("us-south"),
			Description: pulumi.String("Extended description for this group."),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Ibm = Pulumi.Ibm;

return await Deployment.RunAsync(() => 
{
    var smSecretGroup = new Ibm.SmSecretGroup("smSecretGroup", new()
    {
        InstanceId = ibm_resource_instance.Sm_instance.Guid,
        Region = "us-south",
        Description = "Extended description for this group.",
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.ibm.SmSecretGroup;
import com.pulumi.ibm.SmSecretGroupArgs;
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 smSecretGroup = new SmSecretGroup("smSecretGroup", SmSecretGroupArgs.builder()
            .instanceId(ibm_resource_instance.sm_instance().guid())
            .region("us-south")
            .description("Extended description for this group.")
            .build());

    }
}
Copy
resources:
  smSecretGroup:
    type: ibm:SmSecretGroup
    properties:
      instanceId: ${ibm_resource_instance.sm_instance.guid}
      region: us-south
      description: Extended description for this group.
Copy

Provider Configuration

The IBM Cloud provider offers a flexible means of providing credentials for authentication. The following methods are supported, in this order, and explained below:

  • Static credentials
  • Environment variables

To find which credentials are required for this resource, see the service table here.

Static credentials

You can provide your static credentials by adding the ibmcloud_api_key, iaas_classic_username, and iaas_classic_api_key arguments in the IBM Cloud provider block.

Usage:

provider "ibm" {
    ibmcloud_api_key = ""
    iaas_classic_username = ""
    iaas_classic_api_key = ""
}

Environment variables

You can provide your credentials by exporting the IC_API_KEY, IAAS_CLASSIC_USERNAME, and IAAS_CLASSIC_API_KEY environment variables, representing your IBM Cloud platform API key, IBM Cloud Classic Infrastructure (SoftLayer) user name, and IBM Cloud infrastructure API key, respectively.

provider "ibm" {}

Usage:

export IC_API_KEY="ibmcloud_api_key"
export IAAS_CLASSIC_USERNAME="iaas_classic_username"
export IAAS_CLASSIC_API_KEY="iaas_classic_api_key"
pulumi preview

Note:

  1. Create or find your ibmcloud_api_key and iaas_classic_api_key here.
  • Select My IBM Cloud API Keys option from view dropdown for ibmcloud_api_key
  • Select Classic Infrastructure API Keys option from view dropdown for iaas_classic_api_key
  1. For iaas_classic_username
  • Go to Users
  • Click on user.
  • Find user name in the VPN password section under User Details tab

For more informaton, see here.

Create SmSecretGroup Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new SmSecretGroup(name: string, args: SmSecretGroupArgs, opts?: CustomResourceOptions);
@overload
def SmSecretGroup(resource_name: str,
                  args: SmSecretGroupArgs,
                  opts: Optional[ResourceOptions] = None)

@overload
def SmSecretGroup(resource_name: str,
                  opts: Optional[ResourceOptions] = None,
                  instance_id: Optional[str] = None,
                  description: Optional[str] = None,
                  endpoint_type: Optional[str] = None,
                  name: Optional[str] = None,
                  region: Optional[str] = None,
                  sm_secret_group_id: Optional[str] = None)
func NewSmSecretGroup(ctx *Context, name string, args SmSecretGroupArgs, opts ...ResourceOption) (*SmSecretGroup, error)
public SmSecretGroup(string name, SmSecretGroupArgs args, CustomResourceOptions? opts = null)
public SmSecretGroup(String name, SmSecretGroupArgs args)
public SmSecretGroup(String name, SmSecretGroupArgs args, CustomResourceOptions options)
type: ibm:SmSecretGroup
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. SmSecretGroupArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. SmSecretGroupArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. SmSecretGroupArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. SmSecretGroupArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. SmSecretGroupArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

Constructor example

The following reference example uses placeholder values for all input properties.

var smSecretGroupResource = new Ibm.SmSecretGroup("smSecretGroupResource", new()
{
    InstanceId = "string",
    Description = "string",
    EndpointType = "string",
    Name = "string",
    Region = "string",
    SmSecretGroupId = "string",
});
Copy
example, err := ibm.NewSmSecretGroup(ctx, "smSecretGroupResource", &ibm.SmSecretGroupArgs{
InstanceId: pulumi.String("string"),
Description: pulumi.String("string"),
EndpointType: pulumi.String("string"),
Name: pulumi.String("string"),
Region: pulumi.String("string"),
SmSecretGroupId: pulumi.String("string"),
})
Copy
var smSecretGroupResource = new SmSecretGroup("smSecretGroupResource", SmSecretGroupArgs.builder()
    .instanceId("string")
    .description("string")
    .endpointType("string")
    .name("string")
    .region("string")
    .smSecretGroupId("string")
    .build());
Copy
sm_secret_group_resource = ibm.SmSecretGroup("smSecretGroupResource",
    instance_id="string",
    description="string",
    endpoint_type="string",
    name="string",
    region="string",
    sm_secret_group_id="string")
Copy
const smSecretGroupResource = new ibm.SmSecretGroup("smSecretGroupResource", {
    instanceId: "string",
    description: "string",
    endpointType: "string",
    name: "string",
    region: "string",
    smSecretGroupId: "string",
});
Copy
type: ibm:SmSecretGroup
properties:
    description: string
    endpointType: string
    instanceId: string
    name: string
    region: string
    smSecretGroupId: string
Copy

SmSecretGroup Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The SmSecretGroup resource accepts the following input properties:

InstanceId This property is required. string
The GUID of the Secrets Manager instance.
Description 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 is 0 characters. The value must match regular expression /(.*?)/.
EndpointType 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.
Name string
The name of your existing secret group.

  • Constraints: The maximum length is 64 characters. The minimum length is 2 characters. The value must match regular expression /(.*?)/.
Region string
The region of the Secrets Manager instance. If not provided defaults to the region defined in the IBM provider configuration.
SmSecretGroupId string
InstanceId This property is required. string
The GUID of the Secrets Manager instance.
Description 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 is 0 characters. The value must match regular expression /(.*?)/.
EndpointType 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.
Name string
The name of your existing secret group.

  • Constraints: The maximum length is 64 characters. The minimum length is 2 characters. The value must match regular expression /(.*?)/.
Region string
The region of the Secrets Manager instance. If not provided defaults to the region defined in the IBM provider configuration.
SmSecretGroupId string
instanceId This property is required. String
The GUID of the Secrets Manager instance.
description 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 is 0 characters. The value must match regular expression /(.*?)/.
endpointType 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.
name String
The name of your existing secret group.

  • Constraints: The maximum length is 64 characters. The minimum length is 2 characters. The value must match regular expression /(.*?)/.
region String
The region of the Secrets Manager instance. If not provided defaults to the region defined in the IBM provider configuration.
smSecretGroupId String
instanceId This property is required. string
The GUID of the Secrets Manager instance.
description 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 is 0 characters. The value must match regular expression /(.*?)/.
endpointType 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.
name string
The name of your existing secret group.

  • Constraints: The maximum length is 64 characters. The minimum length is 2 characters. The value must match regular expression /(.*?)/.
region string
The region of the Secrets Manager instance. If not provided defaults to the region defined in the IBM provider configuration.
smSecretGroupId string
instance_id This property is required. str
The GUID of the Secrets Manager instance.
description str
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 is 0 characters. The value must match regular expression /(.*?)/.
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.
name str
The name of your existing secret group.

  • Constraints: The maximum length is 64 characters. The minimum length is 2 characters. The value must match regular expression /(.*?)/.
region str
The region of the Secrets Manager instance. If not provided defaults to the region defined in the IBM provider configuration.
sm_secret_group_id str
instanceId This property is required. String
The GUID of the Secrets Manager instance.
description 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 is 0 characters. The value must match regular expression /(.*?)/.
endpointType 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.
name String
The name of your existing secret group.

  • Constraints: The maximum length is 64 characters. The minimum length is 2 characters. The value must match regular expression /(.*?)/.
region String
The region of the Secrets Manager instance. If not provided defaults to the region defined in the IBM provider configuration.
smSecretGroupId String

Outputs

All input properties are implicitly available as output properties. Additionally, the SmSecretGroup resource produces the following output properties:

CreatedAt string
(String) The date when a resource was created. The date format follows RFC 3339.
Id string
The provider-assigned unique ID for this managed resource.
SecretGroupId string
The unique identifier of the SecretGroup.
UpdatedAt string
(String) The date when a resource was recently modified. The date format follows RFC 3339.
CreatedAt string
(String) The date when a resource was created. The date format follows RFC 3339.
Id string
The provider-assigned unique ID for this managed resource.
SecretGroupId string
The unique identifier of the SecretGroup.
UpdatedAt string
(String) The date when a resource was recently modified. The date format follows RFC 3339.
createdAt String
(String) The date when a resource was created. The date format follows RFC 3339.
id String
The provider-assigned unique ID for this managed resource.
secretGroupId String
The unique identifier of the SecretGroup.
updatedAt String
(String) The date when a resource was recently modified. The date format follows RFC 3339.
createdAt string
(String) The date when a resource was created. The date format follows RFC 3339.
id string
The provider-assigned unique ID for this managed resource.
secretGroupId string
The unique identifier of the SecretGroup.
updatedAt string
(String) The date when a resource was recently modified. The date format follows RFC 3339.
created_at str
(String) The date when a resource was created. The date format follows RFC 3339.
id str
The provider-assigned unique ID for this managed resource.
secret_group_id str
The unique identifier of the SecretGroup.
updated_at str
(String) The date when a resource was recently modified. The date format follows RFC 3339.
createdAt String
(String) The date when a resource was created. The date format follows RFC 3339.
id String
The provider-assigned unique ID for this managed resource.
secretGroupId String
The unique identifier of the SecretGroup.
updatedAt String
(String) The date when a resource was recently modified. The date format follows RFC 3339.

Look up Existing SmSecretGroup Resource

Get an existing SmSecretGroup resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: SmSecretGroupState, opts?: CustomResourceOptions): SmSecretGroup
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        created_at: Optional[str] = None,
        description: Optional[str] = None,
        endpoint_type: Optional[str] = None,
        instance_id: Optional[str] = None,
        name: Optional[str] = None,
        region: Optional[str] = None,
        secret_group_id: Optional[str] = None,
        sm_secret_group_id: Optional[str] = None,
        updated_at: Optional[str] = None) -> SmSecretGroup
func GetSmSecretGroup(ctx *Context, name string, id IDInput, state *SmSecretGroupState, opts ...ResourceOption) (*SmSecretGroup, error)
public static SmSecretGroup Get(string name, Input<string> id, SmSecretGroupState? state, CustomResourceOptions? opts = null)
public static SmSecretGroup get(String name, Output<String> id, SmSecretGroupState state, CustomResourceOptions options)
resources:  _:    type: ibm:SmSecretGroup    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
The following state arguments are supported:
CreatedAt string
(String) The date when a resource was created. The date format follows RFC 3339.
Description 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 is 0 characters. The value must match regular expression /(.*?)/.
EndpointType 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.
InstanceId string
The GUID of the Secrets Manager instance.
Name string
The name of your existing secret group.

  • Constraints: The maximum length is 64 characters. The minimum length is 2 characters. The value must match regular expression /(.*?)/.
Region string
The region of the Secrets Manager instance. If not provided defaults to the region defined in the IBM provider configuration.
SecretGroupId string
The unique identifier of the SecretGroup.
SmSecretGroupId string
UpdatedAt string
(String) The date when a resource was recently modified. The date format follows RFC 3339.
CreatedAt string
(String) The date when a resource was created. The date format follows RFC 3339.
Description 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 is 0 characters. The value must match regular expression /(.*?)/.
EndpointType 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.
InstanceId string
The GUID of the Secrets Manager instance.
Name string
The name of your existing secret group.

  • Constraints: The maximum length is 64 characters. The minimum length is 2 characters. The value must match regular expression /(.*?)/.
Region string
The region of the Secrets Manager instance. If not provided defaults to the region defined in the IBM provider configuration.
SecretGroupId string
The unique identifier of the SecretGroup.
SmSecretGroupId string
UpdatedAt string
(String) The date when a resource was recently modified. The date format follows RFC 3339.
createdAt String
(String) The date when a resource was created. The date format follows RFC 3339.
description 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 is 0 characters. The value must match regular expression /(.*?)/.
endpointType 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.
instanceId String
The GUID of the Secrets Manager instance.
name String
The name of your existing secret group.

  • Constraints: The maximum length is 64 characters. The minimum length is 2 characters. The value must match regular expression /(.*?)/.
region String
The region of the Secrets Manager instance. If not provided defaults to the region defined in the IBM provider configuration.
secretGroupId String
The unique identifier of the SecretGroup.
smSecretGroupId String
updatedAt String
(String) The date when a resource was recently modified. The date format follows RFC 3339.
createdAt string
(String) The date when a resource was created. The date format follows RFC 3339.
description 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 is 0 characters. The value must match regular expression /(.*?)/.
endpointType 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.
instanceId string
The GUID of the Secrets Manager instance.
name string
The name of your existing secret group.

  • Constraints: The maximum length is 64 characters. The minimum length is 2 characters. The value must match regular expression /(.*?)/.
region string
The region of the Secrets Manager instance. If not provided defaults to the region defined in the IBM provider configuration.
secretGroupId string
The unique identifier of the SecretGroup.
smSecretGroupId string
updatedAt string
(String) The date when a resource was recently modified. The date format follows RFC 3339.
created_at str
(String) The date when a resource was created. The date format follows RFC 3339.
description str
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 is 0 characters. The value must match regular expression /(.*?)/.
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.
instance_id str
The GUID of the Secrets Manager instance.
name str
The name of your existing secret group.

  • Constraints: The maximum length is 64 characters. The minimum length is 2 characters. The value must match regular expression /(.*?)/.
region str
The region of the Secrets Manager instance. If not provided defaults to the region defined in the IBM provider configuration.
secret_group_id str
The unique identifier of the SecretGroup.
sm_secret_group_id str
updated_at str
(String) The date when a resource was recently modified. The date format follows RFC 3339.
createdAt String
(String) The date when a resource was created. The date format follows RFC 3339.
description 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 is 0 characters. The value must match regular expression /(.*?)/.
endpointType 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.
instanceId String
The GUID of the Secrets Manager instance.
name String
The name of your existing secret group.

  • Constraints: The maximum length is 64 characters. The minimum length is 2 characters. The value must match regular expression /(.*?)/.
region String
The region of the Secrets Manager instance. If not provided defaults to the region defined in the IBM provider configuration.
secretGroupId String
The unique identifier of the SecretGroup.
smSecretGroupId String
updatedAt String
(String) The date when a resource was recently modified. The date format follows RFC 3339.

Import

You can import the ibm_sm_secret_group resource by using region, instance_id, and secret_group_id.

For more information, see the documentation

Syntax

bash

$ pulumi import ibm:index/smSecretGroup:SmSecretGroup sm_secret_group <region>/<instance_id>/<secret_group_id>
Copy

Example

bash

$ pulumi import ibm:index/smSecretGroup:SmSecretGroup sm_secret_group us-east/6ebc4224-e983-496a-8a54-f40a0bfa9175/b49ad24d-81d4-5ebc-b9b9-b0937d1c84d5
Copy

To learn more about importing existing cloud resources, see Importing resources.

Package Details

Repository
ibm ibm-cloud/terraform-provider-ibm
License
Notes
This Pulumi package is based on the ibm Terraform Provider.