Manages the default Kibana data view. See the Kibana Data Views API documentation for more information.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as elasticstack from "@pulumi/elasticstack";
const myIndex = new elasticstack.ElasticsearchIndex("my_index", {
name: "my-index-000001",
deletionProtection: false,
});
const myDataView = new elasticstack.KibanaDataView("my_data_view", {dataView: {
title: "my-index-*",
name: "My Index Data View",
}}, {
dependsOn: [myIndex],
});
const _default = new elasticstack.KibanaDefaultDataView("default", {
dataViewId: myDataView.dataView.apply(dataView => dataView.id),
force: true,
skipDelete: false,
});
import pulumi
import pulumi_elasticstack as elasticstack
my_index = elasticstack.ElasticsearchIndex("my_index",
name="my-index-000001",
deletion_protection=False)
my_data_view = elasticstack.KibanaDataView("my_data_view", data_view={
"title": "my-index-*",
"name": "My Index Data View",
},
opts = pulumi.ResourceOptions(depends_on=[my_index]))
default = elasticstack.KibanaDefaultDataView("default",
data_view_id=my_data_view.data_view.id,
force=True,
skip_delete=False)
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 {
myIndex, err := elasticstack.NewElasticsearchIndex(ctx, "my_index", &elasticstack.ElasticsearchIndexArgs{
Name: pulumi.String("my-index-000001"),
DeletionProtection: pulumi.Bool(false),
})
if err != nil {
return err
}
myDataView, err := elasticstack.NewKibanaDataView(ctx, "my_data_view", &elasticstack.KibanaDataViewArgs{
DataView: &elasticstack.KibanaDataViewDataViewArgs{
Title: pulumi.String("my-index-*"),
Name: pulumi.String("My Index Data View"),
},
}, pulumi.DependsOn([]pulumi.Resource{
myIndex,
}))
if err != nil {
return err
}
_, err = elasticstack.NewKibanaDefaultDataView(ctx, "default", &elasticstack.KibanaDefaultDataViewArgs{
DataViewId: pulumi.String(myDataView.DataView.ApplyT(func(dataView elasticstack.KibanaDataViewDataView) (*string, error) {
return &dataView.Id, nil
}).(pulumi.StringPtrOutput)),
Force: pulumi.Bool(true),
SkipDelete: pulumi.Bool(false),
})
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 myIndex = new Elasticstack.ElasticsearchIndex("my_index", new()
{
Name = "my-index-000001",
DeletionProtection = false,
});
var myDataView = new Elasticstack.KibanaDataView("my_data_view", new()
{
DataView = new Elasticstack.Inputs.KibanaDataViewDataViewArgs
{
Title = "my-index-*",
Name = "My Index Data View",
},
}, new CustomResourceOptions
{
DependsOn =
{
myIndex,
},
});
var @default = new Elasticstack.KibanaDefaultDataView("default", new()
{
DataViewId = myDataView.DataView.Apply(dataView => dataView.Id),
Force = true,
SkipDelete = false,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.elasticstack.ElasticsearchIndex;
import com.pulumi.elasticstack.ElasticsearchIndexArgs;
import com.pulumi.elasticstack.KibanaDataView;
import com.pulumi.elasticstack.KibanaDataViewArgs;
import com.pulumi.elasticstack.inputs.KibanaDataViewDataViewArgs;
import com.pulumi.elasticstack.KibanaDefaultDataView;
import com.pulumi.elasticstack.KibanaDefaultDataViewArgs;
import com.pulumi.resources.CustomResourceOptions;
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 myIndex = new ElasticsearchIndex("myIndex", ElasticsearchIndexArgs.builder()
.name("my-index-000001")
.deletionProtection(false)
.build());
var myDataView = new KibanaDataView("myDataView", KibanaDataViewArgs.builder()
.dataView(KibanaDataViewDataViewArgs.builder()
.title("my-index-*")
.name("My Index Data View")
.build())
.build(), CustomResourceOptions.builder()
.dependsOn(myIndex)
.build());
var default_ = new KibanaDefaultDataView("default", KibanaDefaultDataViewArgs.builder()
.dataViewId(myDataView.dataView().applyValue(_dataView -> _dataView.id()))
.force(true)
.skipDelete(false)
.build());
}
}
resources:
myIndex:
type: elasticstack:ElasticsearchIndex
name: my_index
properties:
name: my-index-000001
deletionProtection: false
myDataView:
type: elasticstack:KibanaDataView
name: my_data_view
properties:
dataView:
title: my-index-*
name: My Index Data View
options:
dependsOn:
- ${myIndex}
default:
type: elasticstack:KibanaDefaultDataView
properties:
dataViewId: ${myDataView.dataView.id}
force: true
skipDelete: false
Create KibanaDefaultDataView Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new KibanaDefaultDataView(name: string, args?: KibanaDefaultDataViewArgs, opts?: CustomResourceOptions);@overload
def KibanaDefaultDataView(resource_name: str,
args: Optional[KibanaDefaultDataViewArgs] = None,
opts: Optional[ResourceOptions] = None)
@overload
def KibanaDefaultDataView(resource_name: str,
opts: Optional[ResourceOptions] = None,
data_view_id: Optional[str] = None,
force: Optional[bool] = None,
skip_delete: Optional[bool] = None,
space_id: Optional[str] = None)func NewKibanaDefaultDataView(ctx *Context, name string, args *KibanaDefaultDataViewArgs, opts ...ResourceOption) (*KibanaDefaultDataView, error)public KibanaDefaultDataView(string name, KibanaDefaultDataViewArgs? args = null, CustomResourceOptions? opts = null)
public KibanaDefaultDataView(String name, KibanaDefaultDataViewArgs args)
public KibanaDefaultDataView(String name, KibanaDefaultDataViewArgs args, CustomResourceOptions options)
type: elasticstack:KibanaDefaultDataView
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 KibanaDefaultDataViewArgs
- 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 KibanaDefaultDataViewArgs
- 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 KibanaDefaultDataViewArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args KibanaDefaultDataViewArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args KibanaDefaultDataViewArgs
- 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 kibanaDefaultDataViewResource = new Elasticstack.KibanaDefaultDataView("kibanaDefaultDataViewResource", new()
{
DataViewId = "string",
Force = false,
SkipDelete = false,
SpaceId = "string",
});
example, err := elasticstack.NewKibanaDefaultDataView(ctx, "kibanaDefaultDataViewResource", &elasticstack.KibanaDefaultDataViewArgs{
DataViewId: pulumi.String("string"),
Force: pulumi.Bool(false),
SkipDelete: pulumi.Bool(false),
SpaceId: pulumi.String("string"),
})
var kibanaDefaultDataViewResource = new KibanaDefaultDataView("kibanaDefaultDataViewResource", KibanaDefaultDataViewArgs.builder()
.dataViewId("string")
.force(false)
.skipDelete(false)
.spaceId("string")
.build());
kibana_default_data_view_resource = elasticstack.KibanaDefaultDataView("kibanaDefaultDataViewResource",
data_view_id="string",
force=False,
skip_delete=False,
space_id="string")
const kibanaDefaultDataViewResource = new elasticstack.KibanaDefaultDataView("kibanaDefaultDataViewResource", {
dataViewId: "string",
force: false,
skipDelete: false,
spaceId: "string",
});
type: elasticstack:KibanaDefaultDataView
properties:
dataViewId: string
force: false
skipDelete: false
spaceId: string
KibanaDefaultDataView 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 KibanaDefaultDataView resource accepts the following input properties:
- Data
View stringId - The data view identifier to set as default. NOTE: The API does not validate whether it is a valid identifier. Leave this unset (or explicitly
null) to unset the default data view. - Force bool
- Update an existing default data view identifier. If set to false and a default data view already exists, the operation will fail.
- Skip
Delete bool - If set to true, the default data view will not be unset when the resource is destroyed. The existing default data view will remain unchanged.
- Space
Id string - The Kibana space ID to set the default data view in. Defaults to
default.
- Data
View stringId - The data view identifier to set as default. NOTE: The API does not validate whether it is a valid identifier. Leave this unset (or explicitly
null) to unset the default data view. - Force bool
- Update an existing default data view identifier. If set to false and a default data view already exists, the operation will fail.
- Skip
Delete bool - If set to true, the default data view will not be unset when the resource is destroyed. The existing default data view will remain unchanged.
- Space
Id string - The Kibana space ID to set the default data view in. Defaults to
default.
- data
View StringId - The data view identifier to set as default. NOTE: The API does not validate whether it is a valid identifier. Leave this unset (or explicitly
null) to unset the default data view. - force Boolean
- Update an existing default data view identifier. If set to false and a default data view already exists, the operation will fail.
- skip
Delete Boolean - If set to true, the default data view will not be unset when the resource is destroyed. The existing default data view will remain unchanged.
- space
Id String - The Kibana space ID to set the default data view in. Defaults to
default.
- data
View stringId - The data view identifier to set as default. NOTE: The API does not validate whether it is a valid identifier. Leave this unset (or explicitly
null) to unset the default data view. - force boolean
- Update an existing default data view identifier. If set to false and a default data view already exists, the operation will fail.
- skip
Delete boolean - If set to true, the default data view will not be unset when the resource is destroyed. The existing default data view will remain unchanged.
- space
Id string - The Kibana space ID to set the default data view in. Defaults to
default.
- data_
view_ strid - The data view identifier to set as default. NOTE: The API does not validate whether it is a valid identifier. Leave this unset (or explicitly
null) to unset the default data view. - force bool
- Update an existing default data view identifier. If set to false and a default data view already exists, the operation will fail.
- skip_
delete bool - If set to true, the default data view will not be unset when the resource is destroyed. The existing default data view will remain unchanged.
- space_
id str - The Kibana space ID to set the default data view in. Defaults to
default.
- data
View StringId - The data view identifier to set as default. NOTE: The API does not validate whether it is a valid identifier. Leave this unset (or explicitly
null) to unset the default data view. - force Boolean
- Update an existing default data view identifier. If set to false and a default data view already exists, the operation will fail.
- skip
Delete Boolean - If set to true, the default data view will not be unset when the resource is destroyed. The existing default data view will remain unchanged.
- space
Id String - The Kibana space ID to set the default data view in. Defaults to
default.
Outputs
All input properties are implicitly available as output properties. Additionally, the KibanaDefaultDataView 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 KibanaDefaultDataView Resource
Get an existing KibanaDefaultDataView 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?: KibanaDefaultDataViewState, opts?: CustomResourceOptions): KibanaDefaultDataView@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
data_view_id: Optional[str] = None,
force: Optional[bool] = None,
skip_delete: Optional[bool] = None,
space_id: Optional[str] = None) -> KibanaDefaultDataViewfunc GetKibanaDefaultDataView(ctx *Context, name string, id IDInput, state *KibanaDefaultDataViewState, opts ...ResourceOption) (*KibanaDefaultDataView, error)public static KibanaDefaultDataView Get(string name, Input<string> id, KibanaDefaultDataViewState? state, CustomResourceOptions? opts = null)public static KibanaDefaultDataView get(String name, Output<String> id, KibanaDefaultDataViewState state, CustomResourceOptions options)resources: _: type: elasticstack:KibanaDefaultDataView 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.
- Data
View stringId - The data view identifier to set as default. NOTE: The API does not validate whether it is a valid identifier. Leave this unset (or explicitly
null) to unset the default data view. - Force bool
- Update an existing default data view identifier. If set to false and a default data view already exists, the operation will fail.
- Skip
Delete bool - If set to true, the default data view will not be unset when the resource is destroyed. The existing default data view will remain unchanged.
- Space
Id string - The Kibana space ID to set the default data view in. Defaults to
default.
- Data
View stringId - The data view identifier to set as default. NOTE: The API does not validate whether it is a valid identifier. Leave this unset (or explicitly
null) to unset the default data view. - Force bool
- Update an existing default data view identifier. If set to false and a default data view already exists, the operation will fail.
- Skip
Delete bool - If set to true, the default data view will not be unset when the resource is destroyed. The existing default data view will remain unchanged.
- Space
Id string - The Kibana space ID to set the default data view in. Defaults to
default.
- data
View StringId - The data view identifier to set as default. NOTE: The API does not validate whether it is a valid identifier. Leave this unset (or explicitly
null) to unset the default data view. - force Boolean
- Update an existing default data view identifier. If set to false and a default data view already exists, the operation will fail.
- skip
Delete Boolean - If set to true, the default data view will not be unset when the resource is destroyed. The existing default data view will remain unchanged.
- space
Id String - The Kibana space ID to set the default data view in. Defaults to
default.
- data
View stringId - The data view identifier to set as default. NOTE: The API does not validate whether it is a valid identifier. Leave this unset (or explicitly
null) to unset the default data view. - force boolean
- Update an existing default data view identifier. If set to false and a default data view already exists, the operation will fail.
- skip
Delete boolean - If set to true, the default data view will not be unset when the resource is destroyed. The existing default data view will remain unchanged.
- space
Id string - The Kibana space ID to set the default data view in. Defaults to
default.
- data_
view_ strid - The data view identifier to set as default. NOTE: The API does not validate whether it is a valid identifier. Leave this unset (or explicitly
null) to unset the default data view. - force bool
- Update an existing default data view identifier. If set to false and a default data view already exists, the operation will fail.
- skip_
delete bool - If set to true, the default data view will not be unset when the resource is destroyed. The existing default data view will remain unchanged.
- space_
id str - The Kibana space ID to set the default data view in. Defaults to
default.
- data
View StringId - The data view identifier to set as default. NOTE: The API does not validate whether it is a valid identifier. Leave this unset (or explicitly
null) to unset the default data view. - force Boolean
- Update an existing default data view identifier. If set to false and a default data view already exists, the operation will fail.
- skip
Delete Boolean - If set to true, the default data view will not be unset when the resource is destroyed. The existing default data view will remain unchanged.
- space
Id String - The Kibana space ID to set the default data view in. Defaults to
default.
Package Details
- Repository
- elasticstack elastic/terraform-provider-elasticstack
- License
- Notes
- This Pulumi package is based on the
elasticstackTerraform Provider.
