common-fate / terraform-provider-commonfate

The Common Fate Terraform Provider
MIT License
2 stars 2 forks source link

fix state management for default duration #76

Closed meyerjrr closed 6 months ago

meyerjrr commented 6 months ago

Screenshot 2024-05-13 at 6 11 33 PM

Fixes an issue where the state would be updated in the app causing a drift from what is set in the terraform config

What was happening was: If default duration was empty in terraform, it was being set to the max duration causing a drift in the terraform config

example: resource:

resource "commonfate_access_workflow" "aws1" {
  name                     = "aws"
  access_duration_seconds  = 60 * 60 * 60
  try_extend_after_seconds = 5
  priority                 = 5
}

Screenshot 2024-05-13 at 6 18 47 PM

resource:

resource "commonfate_access_workflow" "aws1" {
  name                     = "aws"
  access_duration_seconds  = 60 * 60 * 60
  try_extend_after_seconds = 5
  priority                 = 5
  default_duration_seconds = 10 * 50
}

Screenshot 2024-05-13 at 6 19 25 PM

changeset-bot[bot] commented 6 months ago

⚠️ No Changeset found

Latest commit: e1a4b5b9f755b987f651b17d688f5a45ef1bde11

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR