powerstore.Host
Explore with Pulumi AI
Import
#Copyright (c) 2024 Dell Inc., or its subsidiaries. All Rights Reserved.
#Licensed under the Mozilla Public License Version 2.0 (the “License”);
#you may not use this file except in compliance with the License.
#You may obtain a copy of the License at
http://mozilla.org/MPL/2.0/
#Unless required by applicable law or agreed to in writing, software
#distributed under the License is distributed on an “AS IS” BASIS,
#WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
#See the License for the specific language governing permissions and
#limitations under the License.
Below are the steps to import host :
Step 1 - To import a host , we need the id of that host
Step 2 - To check the id of the host we can make Get request to host endpoint. eg. https://10.0.0.1/api/rest/host which will return list of all host ids.
Step 3 - Add empty resource block in tf file.
eg.
resource “powerstore_host” “resource_block_name” {
(resource arguments)
}
$ pulumi import powerstore:index/host:Host Step 4 - Execute the command: "powerstore_host.resource_block_name" "id_of_the_host" (resource_block_name must be taken from step 3 and id must be taken from step 2)
Step 5 - After successful execution of the command , check the state file
Create Host Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Host(name: string, args: HostArgs, opts?: CustomResourceOptions);
@overload
def Host(resource_name: str,
args: HostArgs,
opts: Optional[ResourceOptions] = None)
@overload
def Host(resource_name: str,
opts: Optional[ResourceOptions] = None,
initiators: Optional[Sequence[HostInitiatorArgs]] = None,
os_type: Optional[str] = None,
description: Optional[str] = None,
host_connectivity: Optional[str] = None,
name: Optional[str] = None)
func NewHost(ctx *Context, name string, args HostArgs, opts ...ResourceOption) (*Host, error)
public Host(string name, HostArgs args, CustomResourceOptions? opts = null)
type: powerstore:Host
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args HostArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args HostArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args HostArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args HostArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args HostArgs
- 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 hostResource = new Powerstore.Host("hostResource", new()
{
Initiators = new[]
{
new Powerstore.Inputs.HostInitiatorArgs
{
PortName = "string",
ChapMutualPassword = "string",
ChapMutualUsername = "string",
ChapSinglePassword = "string",
ChapSingleUsername = "string",
PortType = "string",
},
},
OsType = "string",
Description = "string",
HostConnectivity = "string",
Name = "string",
});
example, err := powerstore.NewHost(ctx, "hostResource", &powerstore.HostArgs{
Initiators: powerstore.HostInitiatorArray{
&powerstore.HostInitiatorArgs{
PortName: pulumi.String("string"),
ChapMutualPassword: pulumi.String("string"),
ChapMutualUsername: pulumi.String("string"),
ChapSinglePassword: pulumi.String("string"),
ChapSingleUsername: pulumi.String("string"),
PortType: pulumi.String("string"),
},
},
OsType: pulumi.String("string"),
Description: pulumi.String("string"),
HostConnectivity: pulumi.String("string"),
Name: pulumi.String("string"),
})
var hostResource = new Host("hostResource", HostArgs.builder()
.initiators(HostInitiatorArgs.builder()
.portName("string")
.chapMutualPassword("string")
.chapMutualUsername("string")
.chapSinglePassword("string")
.chapSingleUsername("string")
.portType("string")
.build())
.osType("string")
.description("string")
.hostConnectivity("string")
.name("string")
.build());
host_resource = powerstore.Host("hostResource",
initiators=[{
"port_name": "string",
"chap_mutual_password": "string",
"chap_mutual_username": "string",
"chap_single_password": "string",
"chap_single_username": "string",
"port_type": "string",
}],
os_type="string",
description="string",
host_connectivity="string",
name="string")
const hostResource = new powerstore.Host("hostResource", {
initiators: [{
portName: "string",
chapMutualPassword: "string",
chapMutualUsername: "string",
chapSinglePassword: "string",
chapSingleUsername: "string",
portType: "string",
}],
osType: "string",
description: "string",
hostConnectivity: "string",
name: "string",
});
type: powerstore:Host
properties:
description: string
hostConnectivity: string
initiators:
- chapMutualPassword: string
chapMutualUsername: string
chapSinglePassword: string
chapSingleUsername: string
portName: string
portType: string
name: string
osType: string
Host 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 Host resource accepts the following input properties:
- Initiators
List<Host
Initiator> - Parameters for creating or adding initiators to host.
- Os
Type string - Operating system of the host. This cannot be updated
- Description string
- Description of the host.
- Host
Connectivity string - Connectivity type for hosts and host groups.
- Name string
- Name of the host. This should be unique across all hosts in the cluster.
- Initiators
[]Host
Initiator Args - Parameters for creating or adding initiators to host.
- Os
Type string - Operating system of the host. This cannot be updated
- Description string
- Description of the host.
- Host
Connectivity string - Connectivity type for hosts and host groups.
- Name string
- Name of the host. This should be unique across all hosts in the cluster.
- initiators
List<Host
Initiator> - Parameters for creating or adding initiators to host.
- os
Type String - Operating system of the host. This cannot be updated
- description String
- Description of the host.
- host
Connectivity String - Connectivity type for hosts and host groups.
- name String
- Name of the host. This should be unique across all hosts in the cluster.
- initiators
Host
Initiator[] - Parameters for creating or adding initiators to host.
- os
Type string - Operating system of the host. This cannot be updated
- description string
- Description of the host.
- host
Connectivity string - Connectivity type for hosts and host groups.
- name string
- Name of the host. This should be unique across all hosts in the cluster.
- initiators
Sequence[Host
Initiator Args] - Parameters for creating or adding initiators to host.
- os_
type str - Operating system of the host. This cannot be updated
- description str
- Description of the host.
- host_
connectivity str - Connectivity type for hosts and host groups.
- name str
- Name of the host. This should be unique across all hosts in the cluster.
- initiators List<Property Map>
- Parameters for creating or adding initiators to host.
- os
Type String - Operating system of the host. This cannot be updated
- description String
- Description of the host.
- host
Connectivity String - Connectivity type for hosts and host groups.
- name String
- Name of the host. This should be unique across all hosts in the cluster.
Outputs
All input properties are implicitly available as output properties. Additionally, the Host resource produces the following output properties:
- Host
Group stringId - Associated host group, if host is part of host group.
- Id string
- The provider-assigned unique ID for this managed resource.
- Host
Group stringId - Associated host group, if host is part of host group.
- Id string
- The provider-assigned unique ID for this managed resource.
- host
Group StringId - Associated host group, if host is part of host group.
- id String
- The provider-assigned unique ID for this managed resource.
- host
Group stringId - Associated host group, if host is part of host group.
- id string
- The provider-assigned unique ID for this managed resource.
- host_
group_ strid - Associated host group, if host is part of host group.
- id str
- The provider-assigned unique ID for this managed resource.
- host
Group StringId - Associated host group, if host is part of host group.
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing Host Resource
Get an existing Host 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?: HostState, opts?: CustomResourceOptions): Host
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
description: Optional[str] = None,
host_connectivity: Optional[str] = None,
host_group_id: Optional[str] = None,
initiators: Optional[Sequence[HostInitiatorArgs]] = None,
name: Optional[str] = None,
os_type: Optional[str] = None) -> Host
func GetHost(ctx *Context, name string, id IDInput, state *HostState, opts ...ResourceOption) (*Host, error)
public static Host Get(string name, Input<string> id, HostState? state, CustomResourceOptions? opts = null)
public static Host get(String name, Output<String> id, HostState state, CustomResourceOptions options)
resources: _: type: powerstore:Host get: id: ${id}
- name
- The unique name of the resulting resource.
- id
- 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
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- 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
- The unique name of the resulting resource.
- id
- 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
- The unique name of the resulting resource.
- id
- 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.
- Description string
- Description of the host.
- Host
Connectivity string - Connectivity type for hosts and host groups.
- Host
Group stringId - Associated host group, if host is part of host group.
- Initiators
List<Host
Initiator> - Parameters for creating or adding initiators to host.
- Name string
- Name of the host. This should be unique across all hosts in the cluster.
- Os
Type string - Operating system of the host. This cannot be updated
- Description string
- Description of the host.
- Host
Connectivity string - Connectivity type for hosts and host groups.
- Host
Group stringId - Associated host group, if host is part of host group.
- Initiators
[]Host
Initiator Args - Parameters for creating or adding initiators to host.
- Name string
- Name of the host. This should be unique across all hosts in the cluster.
- Os
Type string - Operating system of the host. This cannot be updated
- description String
- Description of the host.
- host
Connectivity String - Connectivity type for hosts and host groups.
- host
Group StringId - Associated host group, if host is part of host group.
- initiators
List<Host
Initiator> - Parameters for creating or adding initiators to host.
- name String
- Name of the host. This should be unique across all hosts in the cluster.
- os
Type String - Operating system of the host. This cannot be updated
- description string
- Description of the host.
- host
Connectivity string - Connectivity type for hosts and host groups.
- host
Group stringId - Associated host group, if host is part of host group.
- initiators
Host
Initiator[] - Parameters for creating or adding initiators to host.
- name string
- Name of the host. This should be unique across all hosts in the cluster.
- os
Type string - Operating system of the host. This cannot be updated
- description str
- Description of the host.
- host_
connectivity str - Connectivity type for hosts and host groups.
- host_
group_ strid - Associated host group, if host is part of host group.
- initiators
Sequence[Host
Initiator Args] - Parameters for creating or adding initiators to host.
- name str
- Name of the host. This should be unique across all hosts in the cluster.
- os_
type str - Operating system of the host. This cannot be updated
- description String
- Description of the host.
- host
Connectivity String - Connectivity type for hosts and host groups.
- host
Group StringId - Associated host group, if host is part of host group.
- initiators List<Property Map>
- Parameters for creating or adding initiators to host.
- name String
- Name of the host. This should be unique across all hosts in the cluster.
- os
Type String - Operating system of the host. This cannot be updated
Supporting Types
HostInitiator, HostInitiatorArgs
- Port
Name string - IQN name aka address or NQN name for NVMEoF port types.
- Chap
Mutual stringPassword - Password for CHAP authentication. This value must be 12 to 64 UTF-8 characters. This password cannot be queried. CHAP password is required when the cluster CHAP mode is mutual authentication.
- Chap
Mutual stringUsername - Username for CHAP authentication. This value must be 1 to 64 UTF-8 characters. CHAP username is required when the cluster CHAP mode is mutual authentication.
- Chap
Single stringPassword - Password for CHAP authentication. This value must be 12 to 64 UTF-8 characters. This password cannot be queried. CHAP password is required when the cluster CHAP mode is single authentication.
- Chap
Single stringUsername - Username for CHAP authentication. This value must be 1 to 64 UTF-8 characters. CHAP username is required when the cluster CHAP mode is single authentication.
- Port
Type string - Protocol type of the host initiator.
- Port
Name string - IQN name aka address or NQN name for NVMEoF port types.
- Chap
Mutual stringPassword - Password for CHAP authentication. This value must be 12 to 64 UTF-8 characters. This password cannot be queried. CHAP password is required when the cluster CHAP mode is mutual authentication.
- Chap
Mutual stringUsername - Username for CHAP authentication. This value must be 1 to 64 UTF-8 characters. CHAP username is required when the cluster CHAP mode is mutual authentication.
- Chap
Single stringPassword - Password for CHAP authentication. This value must be 12 to 64 UTF-8 characters. This password cannot be queried. CHAP password is required when the cluster CHAP mode is single authentication.
- Chap
Single stringUsername - Username for CHAP authentication. This value must be 1 to 64 UTF-8 characters. CHAP username is required when the cluster CHAP mode is single authentication.
- Port
Type string - Protocol type of the host initiator.
- port
Name String - IQN name aka address or NQN name for NVMEoF port types.
- chap
Mutual StringPassword - Password for CHAP authentication. This value must be 12 to 64 UTF-8 characters. This password cannot be queried. CHAP password is required when the cluster CHAP mode is mutual authentication.
- chap
Mutual StringUsername - Username for CHAP authentication. This value must be 1 to 64 UTF-8 characters. CHAP username is required when the cluster CHAP mode is mutual authentication.
- chap
Single StringPassword - Password for CHAP authentication. This value must be 12 to 64 UTF-8 characters. This password cannot be queried. CHAP password is required when the cluster CHAP mode is single authentication.
- chap
Single StringUsername - Username for CHAP authentication. This value must be 1 to 64 UTF-8 characters. CHAP username is required when the cluster CHAP mode is single authentication.
- port
Type String - Protocol type of the host initiator.
- port
Name string - IQN name aka address or NQN name for NVMEoF port types.
- chap
Mutual stringPassword - Password for CHAP authentication. This value must be 12 to 64 UTF-8 characters. This password cannot be queried. CHAP password is required when the cluster CHAP mode is mutual authentication.
- chap
Mutual stringUsername - Username for CHAP authentication. This value must be 1 to 64 UTF-8 characters. CHAP username is required when the cluster CHAP mode is mutual authentication.
- chap
Single stringPassword - Password for CHAP authentication. This value must be 12 to 64 UTF-8 characters. This password cannot be queried. CHAP password is required when the cluster CHAP mode is single authentication.
- chap
Single stringUsername - Username for CHAP authentication. This value must be 1 to 64 UTF-8 characters. CHAP username is required when the cluster CHAP mode is single authentication.
- port
Type string - Protocol type of the host initiator.
- port_
name str - IQN name aka address or NQN name for NVMEoF port types.
- chap_
mutual_ strpassword - Password for CHAP authentication. This value must be 12 to 64 UTF-8 characters. This password cannot be queried. CHAP password is required when the cluster CHAP mode is mutual authentication.
- chap_
mutual_ strusername - Username for CHAP authentication. This value must be 1 to 64 UTF-8 characters. CHAP username is required when the cluster CHAP mode is mutual authentication.
- chap_
single_ strpassword - Password for CHAP authentication. This value must be 12 to 64 UTF-8 characters. This password cannot be queried. CHAP password is required when the cluster CHAP mode is single authentication.
- chap_
single_ strusername - Username for CHAP authentication. This value must be 1 to 64 UTF-8 characters. CHAP username is required when the cluster CHAP mode is single authentication.
- port_
type str - Protocol type of the host initiator.
- port
Name String - IQN name aka address or NQN name for NVMEoF port types.
- chap
Mutual StringPassword - Password for CHAP authentication. This value must be 12 to 64 UTF-8 characters. This password cannot be queried. CHAP password is required when the cluster CHAP mode is mutual authentication.
- chap
Mutual StringUsername - Username for CHAP authentication. This value must be 1 to 64 UTF-8 characters. CHAP username is required when the cluster CHAP mode is mutual authentication.
- chap
Single StringPassword - Password for CHAP authentication. This value must be 12 to 64 UTF-8 characters. This password cannot be queried. CHAP password is required when the cluster CHAP mode is single authentication.
- chap
Single StringUsername - Username for CHAP authentication. This value must be 1 to 64 UTF-8 characters. CHAP username is required when the cluster CHAP mode is single authentication.
- port
Type String - Protocol type of the host initiator.
Package Details
- Repository
- powerstore dell/terraform-provider-powerstore
- License
- Notes
- This Pulumi package is based on the
powerstore
Terraform Provider.