Creates a new Fleet Server Host.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as elasticstack from "@pulumi/elasticstack";
const testHost = new elasticstack.FleetServerHost("test_host", {
name: "Test Host",
"default": false,
hosts: ["https://fleet-server:8220"],
});
import pulumi
import pulumi_elasticstack as elasticstack
test_host = elasticstack.FleetServerHost("test_host",
name="Test Host",
default=False,
hosts=["https://fleet-server:8220"])
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/elasticstack/elasticstack"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := elasticstack.NewFleetServerHost(ctx, "test_host", &elasticstack.FleetServerHostArgs{
Name: pulumi.String("Test Host"),
Default: pulumi.Bool(false),
Hosts: pulumi.StringArray{
pulumi.String("https://fleet-server:8220"),
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Elasticstack = Pulumi.Elasticstack;
return await Deployment.RunAsync(() =>
{
var testHost = new Elasticstack.FleetServerHost("test_host", new()
{
Name = "Test Host",
Default = false,
Hosts = new[]
{
"https://fleet-server:8220",
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.elasticstack.FleetServerHost;
import com.pulumi.elasticstack.FleetServerHostArgs;
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 testHost = new FleetServerHost("testHost", FleetServerHostArgs.builder()
.name("Test Host")
.default_(false)
.hosts("https://fleet-server:8220")
.build());
}
}
resources:
testHost:
type: elasticstack:FleetServerHost
name: test_host
properties:
name: Test Host
default: false
hosts:
- https://fleet-server:8220
Create FleetServerHost Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new FleetServerHost(name: string, args: FleetServerHostArgs, opts?: CustomResourceOptions);@overload
def FleetServerHost(resource_name: str,
args: FleetServerHostArgs,
opts: Optional[ResourceOptions] = None)
@overload
def FleetServerHost(resource_name: str,
opts: Optional[ResourceOptions] = None,
hosts: Optional[Sequence[str]] = None,
default: Optional[bool] = None,
host_id: Optional[str] = None,
name: Optional[str] = None,
space_ids: Optional[Sequence[str]] = None)func NewFleetServerHost(ctx *Context, name string, args FleetServerHostArgs, opts ...ResourceOption) (*FleetServerHost, error)public FleetServerHost(string name, FleetServerHostArgs args, CustomResourceOptions? opts = null)
public FleetServerHost(String name, FleetServerHostArgs args)
public FleetServerHost(String name, FleetServerHostArgs args, CustomResourceOptions options)
type: elasticstack:FleetServerHost
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 FleetServerHostArgs
- 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 FleetServerHostArgs
- 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 FleetServerHostArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args FleetServerHostArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args FleetServerHostArgs
- 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 fleetServerHostResource = new Elasticstack.FleetServerHost("fleetServerHostResource", new()
{
Hosts = new[]
{
"string",
},
Default = false,
HostId = "string",
Name = "string",
SpaceIds = new[]
{
"string",
},
});
example, err := elasticstack.NewFleetServerHost(ctx, "fleetServerHostResource", &elasticstack.FleetServerHostArgs{
Hosts: pulumi.StringArray{
pulumi.String("string"),
},
Default: pulumi.Bool(false),
HostId: pulumi.String("string"),
Name: pulumi.String("string"),
SpaceIds: pulumi.StringArray{
pulumi.String("string"),
},
})
var fleetServerHostResource = new FleetServerHost("fleetServerHostResource", FleetServerHostArgs.builder()
.hosts("string")
.default_(false)
.hostId("string")
.name("string")
.spaceIds("string")
.build());
fleet_server_host_resource = elasticstack.FleetServerHost("fleetServerHostResource",
hosts=["string"],
default=False,
host_id="string",
name="string",
space_ids=["string"])
const fleetServerHostResource = new elasticstack.FleetServerHost("fleetServerHostResource", {
hosts: ["string"],
"default": false,
hostId: "string",
name: "string",
spaceIds: ["string"],
});
type: elasticstack:FleetServerHost
properties:
default: false
hostId: string
hosts:
- string
name: string
spaceIds:
- string
FleetServerHost 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 FleetServerHost resource accepts the following input properties:
- Hosts List<string>
- A list of hosts.
- Default bool
- Set as default.
- Host
Id string - Unique identifier of the Fleet server host.
- Name string
- The name of the Fleet server host.
- Space
Ids List<string> - The Kibana space IDs where this server host is available. When set, the server host will be created and managed within the specified space. Note: The order of space IDs does not matter as this is a set.
- Hosts []string
- A list of hosts.
- Default bool
- Set as default.
- Host
Id string - Unique identifier of the Fleet server host.
- Name string
- The name of the Fleet server host.
- Space
Ids []string - The Kibana space IDs where this server host is available. When set, the server host will be created and managed within the specified space. Note: The order of space IDs does not matter as this is a set.
- hosts List<String>
- A list of hosts.
- default_ Boolean
- Set as default.
- host
Id String - Unique identifier of the Fleet server host.
- name String
- The name of the Fleet server host.
- space
Ids List<String> - The Kibana space IDs where this server host is available. When set, the server host will be created and managed within the specified space. Note: The order of space IDs does not matter as this is a set.
- hosts string[]
- A list of hosts.
- default boolean
- Set as default.
- host
Id string - Unique identifier of the Fleet server host.
- name string
- The name of the Fleet server host.
- space
Ids string[] - The Kibana space IDs where this server host is available. When set, the server host will be created and managed within the specified space. Note: The order of space IDs does not matter as this is a set.
- hosts Sequence[str]
- A list of hosts.
- default bool
- Set as default.
- host_
id str - Unique identifier of the Fleet server host.
- name str
- The name of the Fleet server host.
- space_
ids Sequence[str] - The Kibana space IDs where this server host is available. When set, the server host will be created and managed within the specified space. Note: The order of space IDs does not matter as this is a set.
- hosts List<String>
- A list of hosts.
- default Boolean
- Set as default.
- host
Id String - Unique identifier of the Fleet server host.
- name String
- The name of the Fleet server host.
- space
Ids List<String> - The Kibana space IDs where this server host is available. When set, the server host will be created and managed within the specified space. Note: The order of space IDs does not matter as this is a set.
Outputs
All input properties are implicitly available as output properties. Additionally, the FleetServerHost 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 FleetServerHost Resource
Get an existing FleetServerHost 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?: FleetServerHostState, opts?: CustomResourceOptions): FleetServerHost@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
default: Optional[bool] = None,
host_id: Optional[str] = None,
hosts: Optional[Sequence[str]] = None,
name: Optional[str] = None,
space_ids: Optional[Sequence[str]] = None) -> FleetServerHostfunc GetFleetServerHost(ctx *Context, name string, id IDInput, state *FleetServerHostState, opts ...ResourceOption) (*FleetServerHost, error)public static FleetServerHost Get(string name, Input<string> id, FleetServerHostState? state, CustomResourceOptions? opts = null)public static FleetServerHost get(String name, Output<String> id, FleetServerHostState state, CustomResourceOptions options)resources: _: type: elasticstack:FleetServerHost 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.
- Default bool
- Set as default.
- Host
Id string - Unique identifier of the Fleet server host.
- Hosts List<string>
- A list of hosts.
- Name string
- The name of the Fleet server host.
- Space
Ids List<string> - The Kibana space IDs where this server host is available. When set, the server host will be created and managed within the specified space. Note: The order of space IDs does not matter as this is a set.
- Default bool
- Set as default.
- Host
Id string - Unique identifier of the Fleet server host.
- Hosts []string
- A list of hosts.
- Name string
- The name of the Fleet server host.
- Space
Ids []string - The Kibana space IDs where this server host is available. When set, the server host will be created and managed within the specified space. Note: The order of space IDs does not matter as this is a set.
- default_ Boolean
- Set as default.
- host
Id String - Unique identifier of the Fleet server host.
- hosts List<String>
- A list of hosts.
- name String
- The name of the Fleet server host.
- space
Ids List<String> - The Kibana space IDs where this server host is available. When set, the server host will be created and managed within the specified space. Note: The order of space IDs does not matter as this is a set.
- default boolean
- Set as default.
- host
Id string - Unique identifier of the Fleet server host.
- hosts string[]
- A list of hosts.
- name string
- The name of the Fleet server host.
- space
Ids string[] - The Kibana space IDs where this server host is available. When set, the server host will be created and managed within the specified space. Note: The order of space IDs does not matter as this is a set.
- default bool
- Set as default.
- host_
id str - Unique identifier of the Fleet server host.
- hosts Sequence[str]
- A list of hosts.
- name str
- The name of the Fleet server host.
- space_
ids Sequence[str] - The Kibana space IDs where this server host is available. When set, the server host will be created and managed within the specified space. Note: The order of space IDs does not matter as this is a set.
- default Boolean
- Set as default.
- host
Id String - Unique identifier of the Fleet server host.
- hosts List<String>
- A list of hosts.
- name String
- The name of the Fleet server host.
- space
Ids List<String> - The Kibana space IDs where this server host is available. When set, the server host will be created and managed within the specified space. Note: The order of space IDs does not matter as this is a set.
Import
The pulumi import command can be used, for example:
$ pulumi import elasticstack:index/fleetServerHost:FleetServerHost my_host <fleet_server_host_id>
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- elasticstack elastic/terraform-provider-elasticstack
- License
- Notes
- This Pulumi package is based on the
elasticstackTerraform Provider.
