1. Packages
  2. Ibm Provider
  3. API Docs
  4. getIsBareMetalServerInitialization
ibm 1.78.0 published on Wednesday, Apr 30, 2025 by ibm-cloud

ibm.getIsBareMetalServerInitialization

Explore with Pulumi AI

ibm logo
ibm 1.78.0 published on Wednesday, Apr 30, 2025 by ibm-cloud

    Import the details of configuration variables used to initialize the bare metal server, such as the image used, SSH keys, and any configured usernames and passwords as a read-only data source. You can then reference the fields of the data source in other resources within the same configuration using interpolation syntax. For more information, about bare metal servers, see About Bare Metal Servers for VPC.

    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 dsBmsIni = ibm.getIsBareMetalServerInitialization({
        bareMetalServer: ibm_is_bare_metal_server.example.id,
    });
    
    import pulumi
    import pulumi_ibm as ibm
    
    ds_bms_ini = ibm.get_is_bare_metal_server_initialization(bare_metal_server=ibm_is_bare_metal_server["example"]["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.LookupIsBareMetalServerInitialization(ctx, &ibm.LookupIsBareMetalServerInitializationArgs{
    			BareMetalServer: ibm_is_bare_metal_server.Example.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 dsBmsIni = Ibm.GetIsBareMetalServerInitialization.Invoke(new()
        {
            BareMetalServer = ibm_is_bare_metal_server.Example.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.GetIsBareMetalServerInitializationArgs;
    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 dsBmsIni = IbmFunctions.getIsBareMetalServerInitialization(GetIsBareMetalServerInitializationArgs.builder()
                .bareMetalServer(ibm_is_bare_metal_server.example().id())
                .build());
    
        }
    }
    
    variables:
      dsBmsIni:
        fn::invoke:
          function: ibm:getIsBareMetalServerInitialization
          arguments:
            bareMetalServer: ${ibm_is_bare_metal_server.example.id}
    

    Using getIsBareMetalServerInitialization

    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 getIsBareMetalServerInitialization(args: GetIsBareMetalServerInitializationArgs, opts?: InvokeOptions): Promise<GetIsBareMetalServerInitializationResult>
    function getIsBareMetalServerInitializationOutput(args: GetIsBareMetalServerInitializationOutputArgs, opts?: InvokeOptions): Output<GetIsBareMetalServerInitializationResult>
    def get_is_bare_metal_server_initialization(bare_metal_server: Optional[str] = None,
                                                id: Optional[str] = None,
                                                passphrase: Optional[str] = None,
                                                private_key: Optional[str] = None,
                                                opts: Optional[InvokeOptions] = None) -> GetIsBareMetalServerInitializationResult
    def get_is_bare_metal_server_initialization_output(bare_metal_server: Optional[pulumi.Input[str]] = None,
                                                id: Optional[pulumi.Input[str]] = None,
                                                passphrase: Optional[pulumi.Input[str]] = None,
                                                private_key: Optional[pulumi.Input[str]] = None,
                                                opts: Optional[InvokeOptions] = None) -> Output[GetIsBareMetalServerInitializationResult]
    func LookupIsBareMetalServerInitialization(ctx *Context, args *LookupIsBareMetalServerInitializationArgs, opts ...InvokeOption) (*LookupIsBareMetalServerInitializationResult, error)
    func LookupIsBareMetalServerInitializationOutput(ctx *Context, args *LookupIsBareMetalServerInitializationOutputArgs, opts ...InvokeOption) LookupIsBareMetalServerInitializationResultOutput

    > Note: This function is named LookupIsBareMetalServerInitialization in the Go SDK.

    public static class GetIsBareMetalServerInitialization 
    {
        public static Task<GetIsBareMetalServerInitializationResult> InvokeAsync(GetIsBareMetalServerInitializationArgs args, InvokeOptions? opts = null)
        public static Output<GetIsBareMetalServerInitializationResult> Invoke(GetIsBareMetalServerInitializationInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetIsBareMetalServerInitializationResult> getIsBareMetalServerInitialization(GetIsBareMetalServerInitializationArgs args, InvokeOptions options)
    public static Output<GetIsBareMetalServerInitializationResult> getIsBareMetalServerInitialization(GetIsBareMetalServerInitializationArgs args, InvokeOptions options)
    
    fn::invoke:
      function: ibm:index/getIsBareMetalServerInitialization:getIsBareMetalServerInitialization
      arguments:
        # arguments dictionary

    The following arguments are supported:

    BareMetalServer string
    The id for this bare metal server.
    Id string
    (String) The unique identifier for this bare metal server.
    Passphrase string
    The passphrase that you used when you created your SSH key. If you did not enter a passphrase when you created the SSH key, do not provide this input parameter.
    PrivateKey string
    The private key of an SSH key that you want to add to your Bare metal server during creation in PEM format. It is used to decrypt the default password of the Windows administrator for the bare metal server if the image is used of type windows.
    BareMetalServer string
    The id for this bare metal server.
    Id string
    (String) The unique identifier for this bare metal server.
    Passphrase string
    The passphrase that you used when you created your SSH key. If you did not enter a passphrase when you created the SSH key, do not provide this input parameter.
    PrivateKey string
    The private key of an SSH key that you want to add to your Bare metal server during creation in PEM format. It is used to decrypt the default password of the Windows administrator for the bare metal server if the image is used of type windows.
    bareMetalServer String
    The id for this bare metal server.
    id String
    (String) The unique identifier for this bare metal server.
    passphrase String
    The passphrase that you used when you created your SSH key. If you did not enter a passphrase when you created the SSH key, do not provide this input parameter.
    privateKey String
    The private key of an SSH key that you want to add to your Bare metal server during creation in PEM format. It is used to decrypt the default password of the Windows administrator for the bare metal server if the image is used of type windows.
    bareMetalServer string
    The id for this bare metal server.
    id string
    (String) The unique identifier for this bare metal server.
    passphrase string
    The passphrase that you used when you created your SSH key. If you did not enter a passphrase when you created the SSH key, do not provide this input parameter.
    privateKey string
    The private key of an SSH key that you want to add to your Bare metal server during creation in PEM format. It is used to decrypt the default password of the Windows administrator for the bare metal server if the image is used of type windows.
    bare_metal_server str
    The id for this bare metal server.
    id str
    (String) The unique identifier for this bare metal server.
    passphrase str
    The passphrase that you used when you created your SSH key. If you did not enter a passphrase when you created the SSH key, do not provide this input parameter.
    private_key str
    The private key of an SSH key that you want to add to your Bare metal server during creation in PEM format. It is used to decrypt the default password of the Windows administrator for the bare metal server if the image is used of type windows.
    bareMetalServer String
    The id for this bare metal server.
    id String
    (String) The unique identifier for this bare metal server.
    passphrase String
    The passphrase that you used when you created your SSH key. If you did not enter a passphrase when you created the SSH key, do not provide this input parameter.
    privateKey String
    The private key of an SSH key that you want to add to your Bare metal server during creation in PEM format. It is used to decrypt the default password of the Windows administrator for the bare metal server if the image is used of type windows.

    getIsBareMetalServerInitialization Result

    The following output properties are available:

    BareMetalServer string
    Id string
    (String) The unique identifier for this bare metal server.
    Image string
    (String) The unique identifier for this image
    ImageName string
    (String) The user-defined or system-provided name for this image.
    Keys List<string>
    (Array) List of public SSH keys used at initialization.
    UserAccounts List<GetIsBareMetalServerInitializationUserAccount>
    (List) The size of the disk in GB (gigabytes). Nested scheme for user_accounts:
    Passphrase string
    PrivateKey string
    BareMetalServer string
    Id string
    (String) The unique identifier for this bare metal server.
    Image string
    (String) The unique identifier for this image
    ImageName string
    (String) The user-defined or system-provided name for this image.
    Keys []string
    (Array) List of public SSH keys used at initialization.
    UserAccounts []GetIsBareMetalServerInitializationUserAccount
    (List) The size of the disk in GB (gigabytes). Nested scheme for user_accounts:
    Passphrase string
    PrivateKey string
    bareMetalServer String
    id String
    (String) The unique identifier for this bare metal server.
    image String
    (String) The unique identifier for this image
    imageName String
    (String) The user-defined or system-provided name for this image.
    keys List<String>
    (Array) List of public SSH keys used at initialization.
    userAccounts List<GetIsBareMetalServerInitializationUserAccount>
    (List) The size of the disk in GB (gigabytes). Nested scheme for user_accounts:
    passphrase String
    privateKey String
    bareMetalServer string
    id string
    (String) The unique identifier for this bare metal server.
    image string
    (String) The unique identifier for this image
    imageName string
    (String) The user-defined or system-provided name for this image.
    keys string[]
    (Array) List of public SSH keys used at initialization.
    userAccounts GetIsBareMetalServerInitializationUserAccount[]
    (List) The size of the disk in GB (gigabytes). Nested scheme for user_accounts:
    passphrase string
    privateKey string
    bare_metal_server str
    id str
    (String) The unique identifier for this bare metal server.
    image str
    (String) The unique identifier for this image
    image_name str
    (String) The user-defined or system-provided name for this image.
    keys Sequence[str]
    (Array) List of public SSH keys used at initialization.
    user_accounts Sequence[GetIsBareMetalServerInitializationUserAccount]
    (List) The size of the disk in GB (gigabytes). Nested scheme for user_accounts:
    passphrase str
    private_key str
    bareMetalServer String
    id String
    (String) The unique identifier for this bare metal server.
    image String
    (String) The unique identifier for this image
    imageName String
    (String) The user-defined or system-provided name for this image.
    keys List<String>
    (Array) List of public SSH keys used at initialization.
    userAccounts List<Property Map>
    (List) The size of the disk in GB (gigabytes). Nested scheme for user_accounts:
    passphrase String
    privateKey String

    Supporting Types

    GetIsBareMetalServerInitializationUserAccount

    EncryptedPassword string
    (String) The password at initialization, encrypted using encryption_key, and returned base64-encoded.
    EncryptionKey string
    (String) The CRN for this key.
    Password string
    (String) The password that you can use to access your bare metal server.
    ResourceType string
    (String) The type of resource referenced.
    Username string
    (String) The username for the account created at initialization.
    EncryptedPassword string
    (String) The password at initialization, encrypted using encryption_key, and returned base64-encoded.
    EncryptionKey string
    (String) The CRN for this key.
    Password string
    (String) The password that you can use to access your bare metal server.
    ResourceType string
    (String) The type of resource referenced.
    Username string
    (String) The username for the account created at initialization.
    encryptedPassword String
    (String) The password at initialization, encrypted using encryption_key, and returned base64-encoded.
    encryptionKey String
    (String) The CRN for this key.
    password String
    (String) The password that you can use to access your bare metal server.
    resourceType String
    (String) The type of resource referenced.
    username String
    (String) The username for the account created at initialization.
    encryptedPassword string
    (String) The password at initialization, encrypted using encryption_key, and returned base64-encoded.
    encryptionKey string
    (String) The CRN for this key.
    password string
    (String) The password that you can use to access your bare metal server.
    resourceType string
    (String) The type of resource referenced.
    username string
    (String) The username for the account created at initialization.
    encrypted_password str
    (String) The password at initialization, encrypted using encryption_key, and returned base64-encoded.
    encryption_key str
    (String) The CRN for this key.
    password str
    (String) The password that you can use to access your bare metal server.
    resource_type str
    (String) The type of resource referenced.
    username str
    (String) The username for the account created at initialization.
    encryptedPassword String
    (String) The password at initialization, encrypted using encryption_key, and returned base64-encoded.
    encryptionKey String
    (String) The CRN for this key.
    password String
    (String) The password that you can use to access your bare metal server.
    resourceType String
    (String) The type of resource referenced.
    username String
    (String) The username for the account created at initialization.

    Package Details

    Repository
    ibm ibm-cloud/terraform-provider-ibm
    License
    Notes
    This Pulumi package is based on the ibm Terraform Provider.
    ibm logo
    ibm 1.78.0 published on Wednesday, Apr 30, 2025 by ibm-cloud