Skip to content
This repository has been archived by the owner on Dec 5, 2020. It is now read-only.

terraform rancher2 provider failed to set rancher2_notifier email_config tls to false #104

Closed
panho66 opened this issue Feb 18, 2020 · 1 comment

Comments

@panho66
Copy link

panho66 commented Feb 18, 2020

Terraform Version

Terraform v0.12.20

  • provider.aws v2.41.0
  • provider.external v1.2.0
  • provider.kubernetes v1.11.0
  • provider.local v1.4.0
  • provider.null v2.1.2
  • provider.rancher2 v1.7.2
  • provider.template v2.1.2

Affected Resource(s)

rancher2_notifier

 rancher2_notifier.EmailM will be updated in-place
  ~ resource "rancher2_notifier" "EmailM" {
        annotations   = {}
        cluster_id    = "c-xqdfd"
        description   = "Email Me"
        id            = "c-xqdfd:n-27bc6"
        labels        = {
            "cattle.io/creator" = "norman"
        }
        name          = "EmailM"
        send_resolved = true

      ~ smtp_config {
            default_recipient = "nobody@me"
            host              = "exch-smtp2"
            port              = 25
            sender            = "nobody@mig1-pnvgreen.pnvgreen.policy.iagcloud.net"
          ~ tls               = true -> false
        }
    }

Terraform Configuration Files

resource "rancher2_notifier" "EmailM" {
   name          = "EmailM"
   cluster_id    = "c-xqdfd"
   description   = "Email Me"
   send_resolved = true
   smtp_config {
      default_recipient = "nobody@me"
      host              = "exch-smtp2"
      port              = 25
      sender            = "nobody@${local.cluster_name}.${local.env_name}${local.env_type}.policy.iagcloud.net"
      tls               = false
   }

  provider = rancher2.admin
}

Debug Output

terraform trace

2020/02/18 08:57:16 [TRACE] GRPCProvider: ApplyResourceChange
2020-02-18T08:57:16.303Z [DEBUG] plugin.terraform-provider-rancher2_v1.7.2_x4: 2020/02/18 08:57:16 [DEBUG] setting computed for "annotations" from ComputedKeys
2020-02-18T08:57:16.304Z [DEBUG] plugin.terraform-provider-rancher2_v1.7.2_x4: 2020/02/18 08:57:16 [DEBUG] setting computed for "labels" from ComputedKeys
2020-02-18T08:57:16.304Z [DEBUG] plugin.terraform-provider-rancher2_v1.7.2_x4: 2020/02/18 08:57:16 [INFO] Creating Notifier EmailM
2020-02-18T08:57:16.422Z [DEBUG] plugin.terraform-provider-rancher2_v1.7.2_x4: 2020/02/18 08:57:16 [DEBUG] Waiting for state to become: [active]
2020-02-18T08:57:17.428Z [DEBUG] plugin.terraform-provider-rancher2_v1.7.2_x4: 2020/02/18 08:57:17 [INFO] Refreshing Notifier ID c-xqdfd:n-27bc6
2020/02/18 08:57:17 [WARN] Provider "registry.terraform.io/-/rancher2" produced an unexpected new value for rancher2_notifier.EmailM, but we are tolerating it because it is using the legacy plugin SDK.
The following problems may be the cause of any confusing errors from downstream operations:
- .smtp_config[0].username: was null, but now cty.StringVal("")
- .smtp_config[0].password: inconsistent values for sensitive attribute
- .smtp_config[0].tls: was cty.False, but now cty.True
2020/02/18 08:57:17 [TRACE] : eval: *terraform.EvalMaybeTainted
2020/02/18 08:57:17 [TRACE] : eval: *terraform.EvalWriteState
2020/02/18 08:57:17 [TRACE] EvalWriteState: recording 0 dependencies for rancher2_notifier.EmailM
2020/02/18 08:57:17 [TRACE] EvalWriteState: writing current state object for rancher2_notifier.EmailM
2020/02/18 08:57:17 [TRACE] : eval: *terraform.EvalApplyProvisioners
2020/02/18 08:57:17 [TRACE] : eval: *terraform.EvalMaybeTainted
2020/02/18 08:57:17 [TRACE] : eval: *terraform.EvalWriteState
2020/02/18 08:57:17 [TRACE] EvalWriteState: recording 0 dependencies for rancher2_notifier.EmailM
2020/02/18 08:57:17 [TRACE] EvalWriteState: writing current state object for rancher2_notifier.EmailM
2020/02/18 08:57:17 [TRACE] : eval: *terraform.EvalIf
2020/02/18 08:57:17 [TRACE] : eval: *terraform.EvalIf
2020/02/18 08:57:17 [TRACE] : eval: *terraform.EvalWriteDiff
2020/02/18 08:57:17 [TRACE] : eval: *terraform.EvalApplyPost
2020/02/18 08:57:17 [TRACE] : eval: *terraform.EvalUpdateStateHook
2020/02/18 08:57:17 [TRACE] statemgr.Filesystem: reading latest snapshot from terraform.tfstate
2020/02/18 08:57:17 [TRACE] statemgr.Filesystem: snapshot file has nil snapshot, but that's okay
2020/02/18 08:57:17 [TRACE] statemgr.Filesystem: read nil snapshot
2020/02/18 08:57:17 [TRACE] statemgr.Filesystem: no original state snapshot to back up
2020/02/18 08:57:17 [TRACE] statemgr.Filesystem: state has changed since last snapshot, so incrementing serial to 1
2020/02/18 08:57:17 [TRACE] statemgr.Filesystem: writing snapshot at terraform.tfstate
2020/02/18 08:57:17 [TRACE] [walkApply] Exiting eval tree: rancher2_notifier.EmailM
2020/02/18 08:57:17 [TRACE] vertex "rancher2_notifier.EmailM": visit complete
2020/02/18 08:57:17 [TRACE] dag/walk: visiting "provider.rancher2.admin (close)"
2020/02/18 08:57:17 [TRACE] vertex "provider.rancher2.admin (close)": starting visit (*terraform.graphNodeCloseProvider)
2020/02/18 08:57:17 [TRACE] vertex "provider.rancher2.admin (close)": evaluating
2020/02/18 08:57:17 [TRACE] [walkApply] Entering eval tree: provider.rancher2.admin (close)

Rancher audit log

"requestBody":{"links":null,"actions":null,"clusterId":"c-xqdfd","description":"Email Me","name":"EmailM","smtpConfig":{"defaultRecipient":"nobody@me","host":"exch-smtp2","port":25,"sender":"nobody@mig1-pnvgreen"},"sendResolved":true}}

Expected Behavior

set tls in email_config to false

Actual Behavior

tls value in email_config do not change always default to true

Steps to Reproduce

Please list the steps required to reproduce the issue, for example:

  1. terraform apply
@panho66 panho66 changed the title terraform rancher2 provider failed to rancher2_notifier email_config tls to false terraform rancher2 provider failed to set rancher2_notifier email_config tls to false Feb 18, 2020
@panho66
Copy link
Author

panho66 commented Feb 26, 2020

open in wrong repository

@panho66 panho66 closed this as completed Feb 26, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant