Skip to content

Commit f411401

Browse files
fix: better version handling, lint
1 parent d700272 commit f411401

17 files changed

+2078
-2864
lines changed

docs/resources/secret_version.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,9 @@ The following arguments are supported:
3838

3939
- `secret_id` - (Required) The ID of the secret associated with the version.
4040
- `data` - (Optional) The data payload of the secret version. Must not exceed 64KiB in size (e.g. `my-secret-version-payload`). Only one of `data` or `data_wo` should be specified. Find out more on the [data section](/#data-information).
41-
- `data_wo` - (Optional) The data payload of the secret version. Must not exceed 64KiB in size (e.g. `my-secret-version-payload`). Only one of `data` or `data_wo` should be specified. `data_wo` will not be set in the Terraform state. Manually increment the revision when using `data_wo` to create a new version of the secret. Find out more on the [data section](/#data-information).
41+
- `data_wo` - (Optional) The data payload of the secret version. Must not exceed 64KiB in size (e.g. `my-secret-version-payload`). Only one of `data` or `data_wo` should be specified. `data_wo` will not be set in the Terraform state. Find out more on the [data section](/#data-information).
4242
- `description` - (Optional) Description of the secret version (e.g. `my-new-description`).
4343
- `region` - (Defaults to the region specified in the [provider configuration](../index.md#region)). The [region](../guides/regions_and_zones.md#regions) where the resource exists.
44-
- `revision` - (Optional) The revision number of the secret version. Manually increment this value when using `data_wo` to create a new version of the secret.
4544

4645
### Data
4746

@@ -57,6 +56,7 @@ Keep in mind that this is a sensitive attribute. For more information, see [Sens
5756

5857
In addition to all arguments above, the following attributes are exported:
5958

59+
- `revision` - The revision number of the secret version.
6060
- `status` - The status of the secret version.
6161
- `created_at` - The date and time of the secret version's creation (in RFC 3339 format).
6262
- `updated_at` - The date and time of the secret version's last update (in RFC 3339 format).

internal/services/secret/secret_test.go

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,11 @@ func TestAccSecret_Basic(t *testing.T) {
2222
tt := acctest.NewTestTools(t)
2323
defer tt.Cleanup()
2424

25-
secretName := "secretNameBasic"
26-
updatedName := "secretNameBasicUpdated"
27-
secretDescription := "secret description"
25+
const (
26+
secretDescription = "secret description"
27+
secretName = "secretNameBasic"
28+
updatedName = "secretNameBasicUpdated"
29+
)
2830
resource.ParallelTest(t, resource.TestCase{
2931
ProtoV6ProviderFactories: tt.ProviderFactories,
3032
CheckDestroy: testAccCheckSecretDestroy(tt),

internal/services/secret/testdata/data-source-secret-basic.cassette.yaml

Lines changed: 238 additions & 238 deletions
Large diffs are not rendered by default.

internal/services/secret/testdata/data-source-secret-path.cassette.yaml

Lines changed: 98 additions & 98 deletions
Large diffs are not rendered by default.

internal/services/secret/testdata/data-source-secret-version-basic.cassette.yaml

Lines changed: 436 additions & 436 deletions
Large diffs are not rendered by default.

internal/services/secret/testdata/data-source-secret-version-by-name-secret.cassette.yaml

Lines changed: 220 additions & 220 deletions
Large diffs are not rendered by default.

internal/services/secret/testdata/secret-basic.cassette.yaml

Lines changed: 134 additions & 134 deletions
Large diffs are not rendered by default.

internal/services/secret/testdata/secret-ephemeral-policy.cassette.yaml

Lines changed: 134 additions & 134 deletions
Large diffs are not rendered by default.

internal/services/secret/testdata/secret-path.cassette.yaml

Lines changed: 190 additions & 190 deletions
Large diffs are not rendered by default.

internal/services/secret/testdata/secret-protected.cassette.yaml

Lines changed: 111 additions & 111 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)