From 45a6e54c98f1ef608416dfecbb26f8c514b717f1 Mon Sep 17 00:00:00 2001 From: Nathan Coleman Date: Thu, 1 Aug 2024 14:29:06 -0400 Subject: [PATCH] Update test matrix to reflect latest Consul releases (#411) * Update test matrix to reflect latest Consul releases * Update branch name trigger for test workflow `main` is now the primary branch for this repo * Add explicit resource dependency to terraform failing delete * Regenerate docs * Use latest version of tfplugindocs --- .github/workflows/test.yaml | 14 +++++++------- consul/resource_consul_config_entry_ce_test.go | 2 ++ docs/resources/acl_binding_rule.md | 2 +- .../consul_certificate_authority/resource.tf | 2 +- 4 files changed, 11 insertions(+), 9 deletions(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 4bcfa122..4ce74c56 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -1,16 +1,16 @@ on: push: branches: - - master + - main pull_request: branches: - - master + - main jobs: test: strategy: fail-fast: false matrix: - consul-version: [1.16.6, 1.17.3, 1.18.0] + consul-version: [1.17.3, 1.18.2, 1.19.1] os: [ubuntu-latest] runs-on: ${{ matrix.os }} steps: @@ -41,10 +41,10 @@ jobs: uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 # v3.5.0 - name: Install tfplugindocs run: | - curl -LO https://github.com/hashicorp/terraform-plugin-docs/releases/download/v0.16.0/tfplugindocs_0.16.0_linux_amd64.zip - sudo unzip tfplugindocs_0.16.0_linux_amd64.zip tfplugindocs -d /usr/local/bin - rm -f tfplugindocs_0.16.0_linux_amd64.zip - - name: Generate the documentation + curl -LO https://github.com/hashicorp/terraform-plugin-docs/releases/download/v0.19.4/tfplugindocs_0.19.4_linux_amd64.zip + sudo unzip tfplugindocs_0.19.4_linux_amd64.zip tfplugindocs -d /usr/local/bin + rm -f tfplugindocs_0.19.4_linux_amd64.zip + - name: Generate the documentation' run: | terraform fmt -recursive . tfplugindocs generate --ignore-deprecated true diff --git a/consul/resource_consul_config_entry_ce_test.go b/consul/resource_consul_config_entry_ce_test.go index c044eb9e..e8af5a71 100644 --- a/consul/resource_consul_config_entry_ce_test.go +++ b/consul/resource_consul_config_entry_ce_test.go @@ -595,6 +595,8 @@ resource "consul_config_entry" "service_intentions" { name = consul_config_entry.sd.name kind = "service-intentions" + depends_on = [consul_config_entry.jwt_provider] + config_json = jsonencode({ Sources = [ { diff --git a/docs/resources/acl_binding_rule.md b/docs/resources/acl_binding_rule.md index c1e5ea6e..0fe7f29f 100644 --- a/docs/resources/acl_binding_rule.md +++ b/docs/resources/acl_binding_rule.md @@ -3,7 +3,7 @@ page_title: "consul_acl_binding_rule Resource - terraform-provider-consul" subcategory: "" description: |- - Starting with Consul 1.5.0, the consulaclbinding_rule resource can be used to managed Consul ACL binding rules. + Starting with Consul 1.5.0, the consul_acl_binding_rule resource can be used to managed Consul ACL binding rules. --- # consul_acl_binding_rule (Resource) diff --git a/examples/resources/consul_certificate_authority/resource.tf b/examples/resources/consul_certificate_authority/resource.tf index 4242accc..8f2f8d5d 100644 --- a/examples/resources/consul_certificate_authority/resource.tf +++ b/examples/resources/consul_certificate_authority/resource.tf @@ -2,7 +2,7 @@ resource "consul_certificate_authority" "connect" { connect_provider = "consul" - config_json = jsondecode({ + config_json = jsonencode({ LeafCertTTL = "24h" RotationPeriod = "2160h" IntermediateCertTTL = "8760h"