diff --git a/.github/dependabot.yml b/.github/dependabot.yml index eed0ba6..083d5d9 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -5,3 +5,20 @@ updates: schedule: interval: "daily" labels: ["dependencies"] + - package-ecosystem: github-actions + directory: / + schedule: + interval: weekly + labels: + - dependencies + # only update HashiCorp actions, external actions managed by TSCCR + allow: + - dependency-name: hashicorp/* + groups: + github-actions-breaking: + update-types: + - major + github-actions-backward-compatible: + update-types: + - minor + - patch diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index b33b686..a93ed95 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -20,9 +20,9 @@ jobs: timeout-minutes: 3 steps: - name: Checkout Repo - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4 - name: Install copywrite - uses: hashicorp/setup-copywrite@v1.1.2 + uses: hashicorp/setup-copywrite@32638da2d4e81d56a0764aa1547882fc4d209636 # v1.1.3 - name: Validate Header Compliance run: copywrite headers --plan @@ -41,9 +41,9 @@ jobs: - "1.20" steps: - name: Checkout - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4 - name: Set up Go - uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0 + uses: actions/setup-go@cdcb36043654635271a94b9a6d1392de5bb323a7 # v5.0.1 with: go-version: ${{ matrix.go }} - name: Go mod download @@ -51,4 +51,4 @@ jobs: - name: Go mod verify run: go mod verify - name: Run tests - run: go test -v ./... \ No newline at end of file + run: go test -v ./... diff --git a/go.mod b/go.mod index dba92f9..1698313 100644 --- a/go.mod +++ b/go.mod @@ -8,7 +8,7 @@ require ( github.com/hashicorp/go-version v1.6.0 github.com/mitchellh/copystructure v1.2.0 github.com/sebdah/goldie v1.0.0 - github.com/zclconf/go-cty v1.14.1 + github.com/zclconf/go-cty v1.14.4 github.com/zclconf/go-cty-debug v0.0.0-20191215020915-b22d67c1ba0b ) diff --git a/go.sum b/go.sum index 2c27248..9e27c16 100644 --- a/go.sum +++ b/go.sum @@ -27,8 +27,8 @@ github.com/stretchr/testify v1.3.0 h1:TivCn/peBQ7UY8ooIcPgZFpTNSz0Q2U6UrFlUfqbe0 github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/vmihailenco/msgpack v3.3.3+incompatible/go.mod h1:fy3FlTQTDXWkZ7Bh6AcGMlsjHatGryHQYUTf1ShIgkk= github.com/zclconf/go-cty v1.2.0/go.mod h1:hOPWgoHbaTUnI5k4D2ld+GRpFJSCe6bCM7m1q/N4PQ8= -github.com/zclconf/go-cty v1.14.1 h1:t9fyA35fwjjUMcmL5hLER+e/rEPqrbCK1/OSE4SI9KA= -github.com/zclconf/go-cty v1.14.1/go.mod h1:VvMs5i0vgZdhYawQNq5kePSpLAoz8u1xvZgrPIxfnZE= +github.com/zclconf/go-cty v1.14.4 h1:uXXczd9QDGsgu0i/QFR/hzI5NYCHLf6NQw/atrbnhq8= +github.com/zclconf/go-cty v1.14.4/go.mod h1:VvMs5i0vgZdhYawQNq5kePSpLAoz8u1xvZgrPIxfnZE= github.com/zclconf/go-cty-debug v0.0.0-20191215020915-b22d67c1ba0b h1:FosyBZYxY34Wul7O/MSKey3txpPYyCqVO5ZyceuQJEI= github.com/zclconf/go-cty-debug v0.0.0-20191215020915-b22d67c1ba0b/go.mod h1:ZRKQfBXbGkpdV6QMzT3rU1kSTAnfu1dO8dPKjYprgj8= golang.org/x/net v0.0.0-20180811021610-c39426892332/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= diff --git a/plan.go b/plan.go index 38ea778..67a5b6e 100644 --- a/plan.go +++ b/plan.go @@ -60,6 +60,14 @@ type Plan struct { // plan. ResourceChanges []*ResourceChange `json:"resource_changes,omitempty"` + // DeferredChanges contains the change operations for resources that are deferred + // for this plan. + DeferredChanges []*DeferredResourceChange `json:"deferred_changes,omitempty"` + + // Complete indicates that all resources have successfully planned changes. + // This will be false if there are DeferredChanges or if the -target flag is used. + Complete bool `json:"complete,omitempty"` + // The change operations for outputs within this plan. OutputChanges map[string]*Change `json:"output_changes,omitempty"` @@ -269,3 +277,13 @@ type PlanVariable struct { // The value for this variable at plan time. Value interface{} `json:"value,omitempty"` } + +// DeferredResourceChange is a description of a resource change that has been +// deferred for some reason. +type DeferredResourceChange struct { + // Reason is the reason why this resource change was deferred. + Reason string `json:"reason,omitempty"` + + // Change contains any information we have about the deferred change. + ResourceChange *ResourceChange `json:"resource_change,omitempty"` +}