ibm.getIsBareMetalServerInitialization
Explore with Pulumi AI
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:
- Bare
Metal stringServer - 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.
- Private
Key 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 stringServer - 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.
- Private
Key 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 StringServer - 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.
- private
Key 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 stringServer - 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.
- private
Key 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_ strserver - 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
.
- bare
Metal StringServer - 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.
- private
Key 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:
- Bare
Metal stringServer - Id string
- (String) The unique identifier for this bare metal server.
- Image string
- (String) The unique identifier for this image
- Image
Name string - (String) The user-defined or system-provided name for this image.
- Keys List<string>
- (Array) List of public SSH keys used at initialization.
- User
Accounts List<GetIs Bare Metal Server Initialization User Account> - (List) The size of the disk in GB (gigabytes).
Nested scheme for
user_accounts
: - Passphrase string
- Private
Key string
- Bare
Metal stringServer - Id string
- (String) The unique identifier for this bare metal server.
- Image string
- (String) The unique identifier for this image
- Image
Name string - (String) The user-defined or system-provided name for this image.
- Keys []string
- (Array) List of public SSH keys used at initialization.
- User
Accounts []GetIs Bare Metal Server Initialization User Account - (List) The size of the disk in GB (gigabytes).
Nested scheme for
user_accounts
: - Passphrase string
- Private
Key string
- bare
Metal StringServer - id String
- (String) The unique identifier for this bare metal server.
- image String
- (String) The unique identifier for this image
- image
Name String - (String) The user-defined or system-provided name for this image.
- keys List<String>
- (Array) List of public SSH keys used at initialization.
- user
Accounts List<GetIs Bare Metal Server Initialization User Account> - (List) The size of the disk in GB (gigabytes).
Nested scheme for
user_accounts
: - passphrase String
- private
Key String
- bare
Metal stringServer - id string
- (String) The unique identifier for this bare metal server.
- image string
- (String) The unique identifier for this image
- image
Name string - (String) The user-defined or system-provided name for this image.
- keys string[]
- (Array) List of public SSH keys used at initialization.
- user
Accounts GetIs Bare Metal Server Initialization User Account[] - (List) The size of the disk in GB (gigabytes).
Nested scheme for
user_accounts
: - passphrase string
- private
Key string
- bare_
metal_ strserver - 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[GetIs Bare Metal Server Initialization User Account] - (List) The size of the disk in GB (gigabytes).
Nested scheme for
user_accounts
: - passphrase str
- private_
key str
- bare
Metal StringServer - id String
- (String) The unique identifier for this bare metal server.
- image String
- (String) The unique identifier for this image
- image
Name String - (String) The user-defined or system-provided name for this image.
- keys List<String>
- (Array) List of public SSH keys used at initialization.
- user
Accounts List<Property Map> - (List) The size of the disk in GB (gigabytes).
Nested scheme for
user_accounts
: - passphrase String
- private
Key String
Supporting Types
GetIsBareMetalServerInitializationUserAccount
- Encrypted
Password string - (String) The password at initialization, encrypted using encryption_key, and returned base64-encoded.
- Encryption
Key string - (String) The CRN for this key.
- Password string
- (String) The password that you can use to access your bare metal server.
- Resource
Type string - (String) The type of resource referenced.
- Username string
- (String) The username for the account created at initialization.
- Encrypted
Password string - (String) The password at initialization, encrypted using encryption_key, and returned base64-encoded.
- Encryption
Key string - (String) The CRN for this key.
- Password string
- (String) The password that you can use to access your bare metal server.
- Resource
Type string - (String) The type of resource referenced.
- Username string
- (String) The username for the account created at initialization.
- encrypted
Password String - (String) The password at initialization, encrypted using encryption_key, and returned base64-encoded.
- encryption
Key String - (String) The CRN for this key.
- password String
- (String) The password that you can use to access your bare metal server.
- resource
Type String - (String) The type of resource referenced.
- username String
- (String) The username for the account created at initialization.
- encrypted
Password string - (String) The password at initialization, encrypted using encryption_key, and returned base64-encoded.
- encryption
Key string - (String) The CRN for this key.
- password string
- (String) The password that you can use to access your bare metal server.
- resource
Type 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.
- encrypted
Password String - (String) The password at initialization, encrypted using encryption_key, and returned base64-encoded.
- encryption
Key String - (String) The CRN for this key.
- password String
- (String) The password that you can use to access your bare metal server.
- resource
Type 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.