Skip to content

Commit

Permalink
Revert "SCALRCORE-30839 remove 'secret-key' attr from 'scalr_webhook'…
Browse files Browse the repository at this point in the history
… datasource"

This reverts commit fcc4b25.
  • Loading branch information
RomanMytsko committed May 21, 2024
1 parent fcc4b25 commit ab28d2d
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
4 changes: 0 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Removed

- `data.scalr_webhook`: drop attribute `secret_key` ([#313](https://github.com/Scalr/terraform-provider-scalr/pull/313))

### Added

- `scalr_slack_integration`: new attribute `run_mode` ([#300](https://github.com/Scalr/terraform-provider-scalr/pull/300))
Expand Down
7 changes: 7 additions & 0 deletions scalr/data_source_scalr_webhook.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,13 @@ func dataSourceScalrWebhook() *schema.Resource {
Computed: true,
},

"secret_key": {
Description: "Secret key to sign the webhook payload.",
Type: schema.TypeString,
Computed: true,
Sensitive: true,
},

"timeout": {
Description: "Endpoint timeout (in seconds).",
Type: schema.TypeInt,
Expand Down
4 changes: 4 additions & 0 deletions scalr/data_source_scalr_webhook_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ func TestAccWebhookDataSource_basic(t *testing.T) {
// Attributes from related endpoint
resource.TestCheckResourceAttr(
"data.scalr_webhook.test", "url", "https://example.com/webhook"),
resource.TestCheckResourceAttrSet(
"data.scalr_webhook.test", "secret_key"),
resource.TestCheckResourceAttr(
"data.scalr_webhook.test", "timeout", "15"),
resource.TestCheckResourceAttr(
Expand All @@ -75,6 +77,8 @@ func TestAccWebhookDataSource_basic(t *testing.T) {
"data.scalr_webhook.test-new", "enabled", "false"),
resource.TestCheckResourceAttr(
"data.scalr_webhook.test-new", "url", "https://example.com/webhook"),
resource.TestCheckResourceAttrSet(
"data.scalr_webhook.test-new", "secret_key"),
resource.TestCheckResourceAttrSet(
"data.scalr_webhook.test-new", "timeout"),
resource.TestCheckResourceAttr(
Expand Down

0 comments on commit ab28d2d

Please sign in to comment.