powerstore.Hostgroup
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 group :
Step 1 - To import a host group, we need the id of that host group
Step 2 - To check the id of the host group we can make use of host group datasource to read required/all host group ids. Alternatively, we can make Get request to host group endpoint. eg. https://10.0.0.1/api/rest/host_group which will return list of all host group ids.
Step 3 - Add empty resource block in tf file.
eg.
resource “powerstore_hostgroup” “resource_block_name” {
(resource arguments)
}
$ pulumi import powerstore:index/hostgroup:Hostgroup Step 4 - Execute the command: "powerstore_hostgroup.resource_block_name" "id_of_the_hostgroup" (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 Hostgroup Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Hostgroup(name: string, args?: HostgroupArgs, opts?: CustomResourceOptions);
@overload
def Hostgroup(resource_name: str,
args: Optional[HostgroupArgs] = None,
opts: Optional[ResourceOptions] = None)
@overload
def Hostgroup(resource_name: str,
opts: Optional[ResourceOptions] = None,
description: Optional[str] = None,
host_connectivity: Optional[str] = None,
host_ids: Optional[Sequence[str]] = None,
host_names: Optional[Sequence[str]] = None,
name: Optional[str] = None)
func NewHostgroup(ctx *Context, name string, args *HostgroupArgs, opts ...ResourceOption) (*Hostgroup, error)
public Hostgroup(string name, HostgroupArgs? args = null, CustomResourceOptions? opts = null)
public Hostgroup(String name, HostgroupArgs args)
public Hostgroup(String name, HostgroupArgs args, CustomResourceOptions options)
type: powerstore:Hostgroup
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 HostgroupArgs
- 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 HostgroupArgs
- 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 HostgroupArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args HostgroupArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args HostgroupArgs
- 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 hostgroupResource = new Powerstore.Hostgroup("hostgroupResource", new()
{
Description = "string",
HostConnectivity = "string",
HostIds = new[]
{
"string",
},
HostNames = new[]
{
"string",
},
Name = "string",
});
example, err := powerstore.NewHostgroup(ctx, "hostgroupResource", &powerstore.HostgroupArgs{
Description: pulumi.String("string"),
HostConnectivity: pulumi.String("string"),
HostIds: pulumi.StringArray{
pulumi.String("string"),
},
HostNames: pulumi.StringArray{
pulumi.String("string"),
},
Name: pulumi.String("string"),
})
var hostgroupResource = new Hostgroup("hostgroupResource", HostgroupArgs.builder()
.description("string")
.hostConnectivity("string")
.hostIds("string")
.hostNames("string")
.name("string")
.build());
hostgroup_resource = powerstore.Hostgroup("hostgroupResource",
description="string",
host_connectivity="string",
host_ids=["string"],
host_names=["string"],
name="string")
const hostgroupResource = new powerstore.Hostgroup("hostgroupResource", {
description: "string",
hostConnectivity: "string",
hostIds: ["string"],
hostNames: ["string"],
name: "string",
});
type: powerstore:Hostgroup
properties:
description: string
hostConnectivity: string
hostIds:
- string
hostNames:
- string
name: string
Hostgroup 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 Hostgroup resource accepts the following input properties:
- Description string
- An optional description for the host group.
- Host
Connectivity string - Connectivity type for hosts and host groups.
- Host
Ids List<string> - The list of host IDs to include in the host group. Conflicts with
host_names
. - Host
Names List<string> - The list of host names to include in the host group. Conflicts with
host_ids
. - Name string
- The host group name.
- Description string
- An optional description for the host group.
- Host
Connectivity string - Connectivity type for hosts and host groups.
- Host
Ids []string - The list of host IDs to include in the host group. Conflicts with
host_names
. - Host
Names []string - The list of host names to include in the host group. Conflicts with
host_ids
. - Name string
- The host group name.
- description String
- An optional description for the host group.
- host
Connectivity String - Connectivity type for hosts and host groups.
- host
Ids List<String> - The list of host IDs to include in the host group. Conflicts with
host_names
. - host
Names List<String> - The list of host names to include in the host group. Conflicts with
host_ids
. - name String
- The host group name.
- description string
- An optional description for the host group.
- host
Connectivity string - Connectivity type for hosts and host groups.
- host
Ids string[] - The list of host IDs to include in the host group. Conflicts with
host_names
. - host
Names string[] - The list of host names to include in the host group. Conflicts with
host_ids
. - name string
- The host group name.
- description str
- An optional description for the host group.
- host_
connectivity str - Connectivity type for hosts and host groups.
- host_
ids Sequence[str] - The list of host IDs to include in the host group. Conflicts with
host_names
. - host_
names Sequence[str] - The list of host names to include in the host group. Conflicts with
host_ids
. - name str
- The host group name.
- description String
- An optional description for the host group.
- host
Connectivity String - Connectivity type for hosts and host groups.
- host
Ids List<String> - The list of host IDs to include in the host group. Conflicts with
host_names
. - host
Names List<String> - The list of host names to include in the host group. Conflicts with
host_ids
. - name String
- The host group name.
Outputs
All input properties are implicitly available as output properties. Additionally, the Hostgroup resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
- id string
- The provider-assigned unique ID for this managed resource.
- id str
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing Hostgroup Resource
Get an existing Hostgroup 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?: HostgroupState, opts?: CustomResourceOptions): Hostgroup
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
description: Optional[str] = None,
host_connectivity: Optional[str] = None,
host_ids: Optional[Sequence[str]] = None,
host_names: Optional[Sequence[str]] = None,
name: Optional[str] = None) -> Hostgroup
func GetHostgroup(ctx *Context, name string, id IDInput, state *HostgroupState, opts ...ResourceOption) (*Hostgroup, error)
public static Hostgroup Get(string name, Input<string> id, HostgroupState? state, CustomResourceOptions? opts = null)
public static Hostgroup get(String name, Output<String> id, HostgroupState state, CustomResourceOptions options)
resources: _: type: powerstore:Hostgroup 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
- An optional description for the host group.
- Host
Connectivity string - Connectivity type for hosts and host groups.
- Host
Ids List<string> - The list of host IDs to include in the host group. Conflicts with
host_names
. - Host
Names List<string> - The list of host names to include in the host group. Conflicts with
host_ids
. - Name string
- The host group name.
- Description string
- An optional description for the host group.
- Host
Connectivity string - Connectivity type for hosts and host groups.
- Host
Ids []string - The list of host IDs to include in the host group. Conflicts with
host_names
. - Host
Names []string - The list of host names to include in the host group. Conflicts with
host_ids
. - Name string
- The host group name.
- description String
- An optional description for the host group.
- host
Connectivity String - Connectivity type for hosts and host groups.
- host
Ids List<String> - The list of host IDs to include in the host group. Conflicts with
host_names
. - host
Names List<String> - The list of host names to include in the host group. Conflicts with
host_ids
. - name String
- The host group name.
- description string
- An optional description for the host group.
- host
Connectivity string - Connectivity type for hosts and host groups.
- host
Ids string[] - The list of host IDs to include in the host group. Conflicts with
host_names
. - host
Names string[] - The list of host names to include in the host group. Conflicts with
host_ids
. - name string
- The host group name.
- description str
- An optional description for the host group.
- host_
connectivity str - Connectivity type for hosts and host groups.
- host_
ids Sequence[str] - The list of host IDs to include in the host group. Conflicts with
host_names
. - host_
names Sequence[str] - The list of host names to include in the host group. Conflicts with
host_ids
. - name str
- The host group name.
- description String
- An optional description for the host group.
- host
Connectivity String - Connectivity type for hosts and host groups.
- host
Ids List<String> - The list of host IDs to include in the host group. Conflicts with
host_names
. - host
Names List<String> - The list of host names to include in the host group. Conflicts with
host_ids
. - name String
- The host group name.
Package Details
- Repository
- powerstore dell/terraform-provider-powerstore
- License
- Notes
- This Pulumi package is based on the
powerstore
Terraform Provider.