From d92657cc5b23636461a5ed4aab9451495fe87caf Mon Sep 17 00:00:00 2001 From: Balazs Czoma Date: Wed, 26 Jun 2024 10:12:41 -0400 Subject: [PATCH] Declaring only minimum provider version. Also updated the option to use the client module in the example --- examples/adding-headers/main.tf | 31 +++++++++---------- examples/basic/main.tf | 3 +- .../using-substitution-expressions/main.tf | 31 +++++++++---------- internal/gen-template/provider.tf | 2 +- provider.tf | 2 +- 5 files changed, 33 insertions(+), 36 deletions(-) diff --git a/examples/adding-headers/main.tf b/examples/adding-headers/main.tf index 62b60a3..3406f03 100644 --- a/examples/adding-headers/main.tf +++ b/examples/adding-headers/main.tf @@ -1,17 +1,17 @@ -# Copyright 2024 Solace Corporation. All rights reserved. -# -# 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. - +# Copyright 2024 Solace Corporation. All rights reserved. +# +# 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. + provider "solacebroker" { username = "admin" password = "admin" @@ -19,8 +19,7 @@ provider "solacebroker" { } # The RDP requires a queue to bind to. -# Recommended: Use the queue-endpoint module to create the queue -# TODO: Uncomment the following block and replace the resource block once the queue-endpoint module is available +# Option: Use the queue-endpoint module to create the queue. If using this option then also uncomment the queue_name in module "testrdp" below. # module "rdp_queue" { # source = SolaceProducts/queue-endpoint/solacebroker # diff --git a/examples/basic/main.tf b/examples/basic/main.tf index d24eb91..87a951b 100644 --- a/examples/basic/main.tf +++ b/examples/basic/main.tf @@ -19,8 +19,7 @@ provider "solacebroker" { } # The RDP requires a queue to bind to. -# Recommended: Use the queue-endpoint module to create the queue -# TODO: Uncomment the following block and replace the resource block once the queue-endpoint module is available +# Option: Use the queue-endpoint module to create the queue. If using this option then also uncomment the queue_name in module "testrdp" below. # module "rdp_queue" { # source = SolaceProducts/queue-endpoint/solacebroker # diff --git a/examples/using-substitution-expressions/main.tf b/examples/using-substitution-expressions/main.tf index 7aedec4..b353ee2 100644 --- a/examples/using-substitution-expressions/main.tf +++ b/examples/using-substitution-expressions/main.tf @@ -1,17 +1,17 @@ -# Copyright 2024 Solace Corporation. All rights reserved. -# -# 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. - +# Copyright 2024 Solace Corporation. All rights reserved. +# +# 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. + provider "solacebroker" { username = "admin" password = "admin" @@ -19,8 +19,7 @@ provider "solacebroker" { } # The RDP requires a queue to bind to. -# Recommended: Use the queue-endpoint module to create the queue -# TODO: Uncomment the following block and replace the resource block once the queue-endpoint module is available +# Option: Use the queue-endpoint module to create the queue. If using this option then also uncomment the queue_name in module "testrdp" below. # module "rdp_queue" { # source = SolaceProducts/queue-endpoint/solacebroker # diff --git a/internal/gen-template/provider.tf b/internal/gen-template/provider.tf index f2e37c2..8155aea 100644 --- a/internal/gen-template/provider.tf +++ b/internal/gen-template/provider.tf @@ -4,7 +4,7 @@ terraform { required_providers { solacebroker = { source = "registry.terraform.io/solaceproducts/solacebroker" - version = "~> 1.0" + version = ">= 1.0" } } } diff --git a/provider.tf b/provider.tf index 0366e34..39b56af 100644 --- a/provider.tf +++ b/provider.tf @@ -18,7 +18,7 @@ terraform { required_providers { solacebroker = { source = "registry.terraform.io/solaceproducts/solacebroker" - version = "~> 1.0" + version = ">= 1.0" } } }