-
Notifications
You must be signed in to change notification settings - Fork 94
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug] Resource elasticstack_fleet_integration_policy
fails for CSPM integration
#921
Labels
bug
Something isn't working
Comments
Can confirm this works in 0.11.6 but fails when upgrading the provider |
With what is currently in ╷
│ Error: Provider produced inconsistent result after apply
│
│ When applying changes to elasticstack_fleet_integration_policy.cspm, provider "provider[\"registry.terraform.io/elastic/elasticstack\"]" produced an unexpected new value: .input[3].streams_json: inconsistent
│ values for sensitive attribute.
│
│ This is a bug in the provider, which should be reported in the provider's own issue tracker.
╵ Using the following terraform resource "elasticstack_fleet_integration" "cspm" {
name = "cloud_security_posture"
version = "1.10.1"
force = true
skip_destroy = true
}
resource "elasticstack_fleet_agent_policy" "gcp" {
name = "gcp"
namespace = "default"
description = "Collect logs and metrics from GSS Project"
monitor_logs = true
monitor_metrics = true
sys_monitoring = true
skip_destroy = false
}
resource "elasticstack_fleet_integration_policy" "cspm" {
name = "cspm"
namespace = "default"
description = "GCP Cloud Security Posture Management"
agent_policy_id = elasticstack_fleet_agent_policy.gcp.policy_id
integration_name = elasticstack_fleet_integration.cspm.name
integration_version = elasticstack_fleet_integration.cspm.version
vars_json = jsonencode({
"posture" : "cspm",
"deployment" : "gcp"
})
input {
input_id = "kspm-cloudbeat/cis_k8s"
enabled = false
streams_json = jsonencode({
"cloud_security_posture.findings" : {
"enabled" : false,
"vars" : {}
}
})
}
input {
input_id = "kspm-cloudbeat/cis_eks"
enabled = false
streams_json = jsonencode({
"cloud_security_posture.findings" : {
"enabled" : false,
"vars" : {}
}
})
}
input {
input_id = "cspm-cloudbeat/cis_aws"
enabled = false
streams_json = jsonencode({
"cloud_security_posture.findings" : {
"enabled" : false,
"vars" : {
"aws.account_type" : "organization-account"
}
}
})
}
input {
input_id = "cspm-cloudbeat/cis_gcp"
enabled = true
streams_json = jsonencode({
"cloud_security_posture.findings" : {
"enabled" : true,
"setup_access" : "manual",
"vars" : {
"gcp.account_type" : "single-account",
"gcp.project_id" : "test",
"gcp.credentials.type" : "credentials-json",
"gcp.credentials.json" : "test"
},
}
})
}
input {
input_id = "cspm-cloudbeat/cis_azure"
enabled = false
streams_json = jsonencode({
"cloud_security_posture.findings" : {
"enabled" : false,
"vars" : {}
}
})
}
input {
input_id = "vuln_mgmt-cloudbeat/vuln_mgmt_aws"
enabled = false
streams_json = jsonencode({
"cloud_security_posture.vulnerabilities" : {
"enabled" : false
}
})
}
}
terraform {
required_version = ">= 1.0.0"
required_providers {
elasticstack = {
source = "elastic/elasticstack"
version = "0.12.12"
}
}
}
provider "elasticstack" {
elasticsearch {
username = "elastic"
password = "test"
endpoints = ["https://elasticstack"]
}
kibana {
endpoints = ["https://elasticstack"]
}
} |
facing the same issue, I am on v0.11.11 of the elasticstack provider |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
Applying the CSPM integration to a policy works but returns an error. The integration is added to the policy the provider returns the error
panic: interface conversion: interface {} is nil, not map[string]interface {}
To Reproduce
Steps to reproduce the behavior:
terraform apply
Expected behavior
Terraform apply to run without an error
Debug output
Run
terraform
command withTF_LOG=trace
and provide extended information on TF operations. Please ensure you redact any base64 encoded credentials from your output.eg
Screenshots
If applicable, add screenshots to help explain your problem.
Versions (please complete the following information):
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: