diff --git a/coralogix/data_source_coralogix_group.go b/coralogix/data_source_coralogix_group.go index ff3104ab..5d4899ab 100644 --- a/coralogix/data_source_coralogix_group.go +++ b/coralogix/data_source_coralogix_group.go @@ -1,11 +1,11 @@ // Copyright 2024 Coralogix Ltd. -// +// // Licensed under the Apache 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 -// +// // https://www.apache.org/licenses/LICENSE-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. @@ -20,11 +20,12 @@ import ( "fmt" "log" + "terraform-provider-coralogix/coralogix/clientset" + "github.com/hashicorp/terraform-plugin-framework/datasource" "github.com/hashicorp/terraform-plugin-framework/resource" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" - "terraform-provider-coralogix/coralogix/clientset" ) var _ datasource.DataSourceWithConfigure = &GroupDataSource{} diff --git a/examples/group/main.tf b/examples/group/main.tf index ff1ba51c..1615c226 100644 --- a/examples/group/main.tf +++ b/examples/group/main.tf @@ -12,12 +12,6 @@ provider "coralogix" { #env = "" } -resource "coralogix_custom_role" "example" { - name = "Example custom role" - description = "This role is created with terraform!" - parent_role = "Standard User" - permissions = ["spans.events2metrics:UpdateConfig"] -} resource "coralogix_user" "example" { user_name = "example@coralogix.com" @@ -29,7 +23,7 @@ resource "coralogix_user" "example" { resource "coralogix_scope" "example" { display_name = "ExampleScope" - default_expression = " true" + default_expression = "true" filters = [ { entity_type = "logs" @@ -39,9 +33,9 @@ resource "coralogix_scope" "example" { } resource "coralogix_group" "example" { - display_name = "example" - role = coralogix_custom_role.example.name + display_name = "example2" + role = "Read Only" members = [coralogix_user.example.id] - scope_id = data.coralogix_scope.example.id + scope_id = coralogix_scope.example.id } diff --git a/examples/scope/main.tf b/examples/scope/main.tf index 454615a0..570d3d65 100644 --- a/examples/scope/main.tf +++ b/examples/scope/main.tf @@ -14,11 +14,11 @@ provider "coralogix" { resource "coralogix_scope" "example" { display_name = "ExampleScope" - default_expression = " true" + default_expression = "true" filters = [ { entity_type = "logs" - expression = "(subsystemName == 'purchases') || (subsystemName == 'signups')" + expression = "(subsystemName == 'purchases') || (subsystemName == 'signups')" } ] }