File tree Expand file tree Collapse file tree 32 files changed +572
-411
lines changed
internal/fleet/agent_policy
TestAccResourceAgentPolicyFromSDK
TestAccResourceAgentPolicySkipDestroy/create
TestAccResourceAgentPolicySpaceReordering
TestAccResourceAgentPolicyWithBadGlobalDataTags/create_with_bad_tags
TestAccResourceAgentPolicyWithSpaceIds/create_with_space_ids
TestAccResourceAgentPolicy
create_with_global_data_tags
update_with_global_data_tags
update_with_no_global_data_tags
update_with_supports_agentless
with_unenrollment_timeout Expand file tree Collapse file tree 32 files changed +572
-411
lines changed Load Diff Large diffs are not rendered by default.
Original file line number Diff line number Diff line change 1+ provider "elasticstack" {
2+ elasticsearch {}
3+ kibana {}
4+ }
5+
6+ resource "elasticstack_fleet_agent_policy" "test_policy" {
7+ name = var. policy_name
8+ namespace = " default"
9+ description = " Test Agent Policy"
10+ monitor_logs = true
11+ monitor_metrics = false
12+ skip_destroy = var. skip_destroy
13+ }
14+
15+ data "elasticstack_fleet_enrollment_tokens" "test_policy" {
16+ policy_id = elasticstack_fleet_agent_policy. test_policy . policy_id
17+ }
Original file line number Diff line number Diff line change 1+ variable "policy_name" {
2+ type = string
3+ description = " Name for the agent policy"
4+ }
5+
6+ variable "skip_destroy" {
7+ type = bool
8+ description = " Whether to skip destruction of the policy"
9+ default = false
10+ }
Original file line number Diff line number Diff line change 1+ provider "elasticstack" {
2+ elasticsearch {}
3+ kibana {}
4+ }
5+
6+ resource "elasticstack_fleet_agent_policy" "test_policy" {
7+ name = var. policy_name
8+ namespace = " default"
9+ description = " Test Agent Policy"
10+ monitor_logs = true
11+ monitor_metrics = false
12+ skip_destroy = var. skip_destroy
13+ global_data_tags = {
14+ tag1 = {
15+ string_value = " value1"
16+ }
17+ tag2 = {
18+ number_value = 1.1
19+ }
20+ }
21+ }
22+
23+ data "elasticstack_fleet_enrollment_tokens" "test_policy" {
24+ policy_id = elasticstack_fleet_agent_policy. test_policy . policy_id
25+ }
Original file line number Diff line number Diff line change 1+ variable "policy_name" {
2+ type = string
3+ description = " Name for the agent policy"
4+ }
5+
6+ variable "skip_destroy" {
7+ type = bool
8+ description = " Whether to skip destruction of the policy"
9+ default = false
10+ }
Original file line number Diff line number Diff line change 1+ provider "elasticstack" {
2+ elasticsearch {}
3+ kibana {}
4+ }
5+
6+ resource "elasticstack_fleet_agent_policy" "test_policy" {
7+ name = var. policy_name
8+ namespace = " default"
9+ description = " This policy was updated"
10+ monitor_logs = false
11+ monitor_metrics = true
12+ skip_destroy = var. skip_destroy
13+ }
14+
15+ data "elasticstack_fleet_enrollment_tokens" "test_policy" {
16+ policy_id = elasticstack_fleet_agent_policy. test_policy . policy_id
17+ }
Original file line number Diff line number Diff line change 1+ variable "policy_name" {
2+ type = string
3+ description = " Name for the agent policy"
4+ }
5+
6+ variable "skip_destroy" {
7+ type = bool
8+ description = " Whether to skip destruction of the policy"
9+ default = false
10+ }
Original file line number Diff line number Diff line change 1+ provider "elasticstack" {
2+ elasticsearch {}
3+ kibana {}
4+ }
5+
6+ resource "elasticstack_fleet_agent_policy" "test_policy" {
7+ name = var. policy_name
8+ namespace = " default"
9+ description = " This policy was updated"
10+ monitor_logs = false
11+ monitor_metrics = true
12+ skip_destroy = var. skip_destroy
13+ global_data_tags = {
14+ tag1 = {
15+ string_value = " value1a"
16+ }
17+ }
18+ }
19+
20+ data "elasticstack_fleet_enrollment_tokens" "test_policy" {
21+ policy_id = elasticstack_fleet_agent_policy. test_policy . policy_id
22+ }
Original file line number Diff line number Diff line change 1+ variable "policy_name" {
2+ type = string
3+ description = " Name for the agent policy"
4+ }
5+
6+ variable "skip_destroy" {
7+ type = bool
8+ description = " Whether to skip destruction of the policy"
9+ default = false
10+ }
Original file line number Diff line number Diff line change 1+ provider "elasticstack" {
2+ elasticsearch {}
3+ kibana {}
4+ }
5+
6+ resource "elasticstack_fleet_agent_policy" "test_policy" {
7+ name = var. policy_name
8+ namespace = " default"
9+ description = " This policy was updated without global data tags"
10+ monitor_logs = false
11+ monitor_metrics = true
12+ skip_destroy = var. skip_destroy
13+ }
14+
15+ data "elasticstack_fleet_enrollment_tokens" "test_policy" {
16+ policy_id = elasticstack_fleet_agent_policy. test_policy . policy_id
17+ }
You can’t perform that action at this time.
0 commit comments