Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

app_include property of okta_policy_rule_mfa not properly stored in state #893

Closed
thatguysimon opened this issue Jan 10, 2022 · 1 comment · Fixed by #962
Closed

app_include property of okta_policy_rule_mfa not properly stored in state #893

thatguysimon opened this issue Jan 10, 2022 · 1 comment · Fixed by #962

Comments

@thatguysimon
Copy link
Contributor

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Terraform Version

Terraform v1.1.3

Affected Resource(s)

  • okta_policy_rule_mfa

Terraform Configuration Files

resource "okta_policy_rule_mfa" "some_mfa_policy_rule" {
  name      = "Some policy rule"
  policy_id = okta_policy_mfa.some_mfa_policy.id

  app_include {
    name = "okta"
    type = "APP_TYPE"
  }
}

Debug Output

Note: Objects have changed outside of Terraform

Terraform detected the following changes made outside of Terraform since the last "terraform apply":

  # module.okta.okta_policy_rule_mfa.some_mfa_policy_rule has changed
  ~ resource "okta_policy_rule_mfa" "some_mfa_policy_rule" {
        id                 = "0pr3wfmg9wzX5x4802d7"
        name               = "Some policy rule"
        # (6 unchanged attributes hidden)

      - app_include {
          - name = "okta" -> null
          - type = "APP_TYPE" -> null
        }
    }

...
...

Terraform used the selected providers to generate the following execution plan. Resource actions are indicated with the following symbols:
  ~ update in-place

Terraform will perform the following actions:

  # module.okta.okta_policy_rule_mfa.some_mfa_policy_rule will be updated in-place
  ~ resource "okta_policy_rule_mfa" "some_mfa_policy_rule" {
        id                 = "0pr3wfmg9wzX5x4802d7"
        name               = "Some policy rule"
        # (6 unchanged attributes hidden)

      + app_include {
          + name = "okta"
          + type = "APP_TYPE"
        }
    }

Expected Behavior

Resource to be configured once and state stored properly.

Actual Behavior

Running terraform plan will produce this same output every time, even after running terraform apply.
For some reason Terraform thinks the app_include section of the policy rule has been changed outside of Terraform, and thus plans to add the app_include configuration every time.

Steps to Reproduce

  1. terraform plan
  2. terraform apply
  3. terraform plan
@bogdanprodan-okta
Copy link
Contributor

Hi, @thatguysimon! Thanks for submitting this issue! I'll investigate the problem and get back to you asap.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants