diff --git a/README.md b/README.md index f0975d8..912f88b 100644 --- a/README.md +++ b/README.md @@ -27,12 +27,12 @@ your existing [GOPATH](http://golang.org/doc/code.html#GOPATH). The instructions home directory outside the standard GOPATH (i.e `$HOME/development/terraform-providers/`). ```sh -$ git clone git@github.com:moia-oss/terraform-provider-opensearch.git -$ cd terraform-provider-opensearch +$ git clone git@github.com:moia-oss/terraform-provider-opensearch-dashboards.git +$ cd terraform-provider-opensearch-dashboards ... ``` -Enter the provider directory and run `make install`. This will install the needed tools for the provider. +`make install` will install the needed tools for the provider. ```sh $ make install @@ -44,7 +44,7 @@ directory. The provider will be compiled for different supported architectures a ```sh $ make release ... -$ ./bin/terraform-provider-opensearch___ +$ ./bin/terraform-provider-opensearch-dashboards___ ... ``` @@ -67,8 +67,7 @@ To instead use a custom-built provider in your Terraform environment (e.g. the p We really appreciate your help! -To contribute, please read the contribution -guidelines: [Contributing to Terraform - OpenSearch Provider](.github/CONTRIBUTING.md) +To contribute, simply make a PR and a maintainer will review it shortly. Issues on GitHub are intended to be related to the bugs or feature requests with provider codebase. See [Plugin SDK Community](https://www.terraform.io/community) diff --git a/examples/saved_objects.tf b/examples/saved_objects.tf index 629a583..530859f 100644 --- a/examples/saved_objects.tf +++ b/examples/saved_objects.tf @@ -5,7 +5,7 @@ resource "opensearch_saved_object" "test-query" { "title" : "Test Query", "description" : "", "query" : { - "query" : "\"Processstate\" AND \"systemtest\"", + "query" : "\"firstSearchTerm\" AND \"SecondSearchTerm\"", "language" : "kuery" }, "filters" : [ @@ -15,18 +15,18 @@ resource "opensearch_saved_object" "test-query" { "negate" : false, "disabled" : false, "type" : "phrase", - "key" : "kubernetes.labels.app", + "key" : "foo.key", "params" : { - "query" : "execution-coordinator" + "query" : "value-to-search-for" } }, "query" : { "match_phrase" : { - "kubernetes.labels.app" : "execution-coordinator" + "foo.key" : "value-to-search-for" } }, "$state" : { - "store" : "appState" + "store" : "fooState" } } ] diff --git a/opensearch/provider.go b/opensearch/provider.go index 5b982a6..43f84a8 100644 --- a/opensearch/provider.go +++ b/opensearch/provider.go @@ -1,5 +1,21 @@ package opensearch +/* +Copyright 2022 MOIA GmbH + +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 + +http://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. +See the License for the specific language governing permissions and +limitations under the License. +*/ + import ( "context" "net/http" @@ -73,7 +89,7 @@ func providerConfigure(_ context.Context, d *schema.ResourceData) (any, diag.Dia if err != nil { diags = append(diags, diag.Diagnostic{ Severity: diag.Error, - Summary: "Failed to get AWS credentials via the default chain", + Summary: "Could not create sigv4 HTTP request signer", Detail: err.Error(), }) return nil, diags diff --git a/opensearch/resource_saved_objects.go b/opensearch/resource_saved_objects.go index 04a5bac..59a8471 100644 --- a/opensearch/resource_saved_objects.go +++ b/opensearch/resource_saved_objects.go @@ -1,5 +1,21 @@ package opensearch +/* +Copyright 2022 MOIA GmbH + +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 + +http://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. +See the License for the specific language governing permissions and +limitations under the License. +*/ + import ( "context" "encoding/json" diff --git a/pkg/saved_objects/saved_objects.go b/pkg/saved_objects/saved_objects.go index 360fa8c..9915390 100644 --- a/pkg/saved_objects/saved_objects.go +++ b/pkg/saved_objects/saved_objects.go @@ -1,5 +1,21 @@ package saved_objects +/* +Copyright 2022 MOIA GmbH + +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 + +http://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. +See the License for the specific language governing permissions and +limitations under the License. +*/ + import ( "bytes" "context" diff --git a/pkg/saved_objects/saved_objects_test.go b/pkg/saved_objects/saved_objects_test.go index 4ed1943..187d70a 100644 --- a/pkg/saved_objects/saved_objects_test.go +++ b/pkg/saved_objects/saved_objects_test.go @@ -1,5 +1,21 @@ package saved_objects +/* +Copyright 2022 MOIA GmbH + +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 + +http://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. +See the License for the specific language governing permissions and +limitations under the License. +*/ + import ( "context" "encoding/json" diff --git a/pkg/saved_objects/types.go b/pkg/saved_objects/types.go index 907046d..7a70150 100644 --- a/pkg/saved_objects/types.go +++ b/pkg/saved_objects/types.go @@ -1,5 +1,21 @@ package saved_objects +/* +Copyright 2022 MOIA GmbH + +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 + +http://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. +See the License for the specific language governing permissions and +limitations under the License. +*/ + type SavedObjectOSD struct { Type string `json:"type,omitempty"` ID string `json:"id,omitempty"` diff --git a/pkg/sigv4/sigv4_signer.go b/pkg/sigv4/sigv4_signer.go index 567e52e..d44052b 100644 --- a/pkg/sigv4/sigv4_signer.go +++ b/pkg/sigv4/sigv4_signer.go @@ -1,5 +1,21 @@ package sigv4 +/* +Copyright 2022 MOIA GmbH + +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 + +http://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. +See the License for the specific language governing permissions and +limitations under the License. +*/ + import ( "bytes" "fmt"