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

Update the pingone_notification_template_content to account for multiple notification types #233

Closed
patrickcping opened this issue Jan 12, 2023 · 4 comments
Labels
service/base PingOne Platform size/large Large size change (e.g. creation of new resources/datasources with tests) status/blocked/upstream-api The issue/PR is blocked by an upstream API type/enhancement New feature or request

Comments

@patrickcping
Copy link
Collaborator

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

Description

Currently the pingone_notification_template_content resource can only accept one of sms, email, push and voice notification methods. The feature request is to update the resource to be able to accept multiple notification methods as a convenience.

New or Affected Resource(s)

  • pingone_notification_template_content

Potential Terraform Configuration

# Copy-paste your PingOne related Terraform configurations here - for large Terraform configs,
# please use a service like Dropbox and share a link to the ZIP file. For
# security, you can also encrypt the files using our GPG public key.

# Remember to replace any account/customer sensitive information in the configuration before submitting the issue

resource "pingone_notification_template_content" "variant" {
  environment_id = pingone_environment.my_environment.id
  template_name  = "strong_authentication"
  locale         = "en"
  variant = "My Variant"

  email {
    body    = "Please approve this transaction with passcode $${otp}."
    subject = "BX Retail Transaction Request"

    from {
      name    = "BX Retail"
      address = "noreply@bxretail.org"
    }
  }

  push {
    body  = "Please approve this transaction."
    title = "BX Retail Transaction Request"
  }

  sms {
    content = "Please approve this transaction with passcode $${otp}."
    sender  = "BX Retail"
  }

  voice {
    content = "Hello <pause1sec> your authentication code is <sayCharValue>$${otp}</sayCharValue><pause1sec><pause1sec><repeatMessage val=2>I repeat <pause1sec>your code is <sayCharValue>$${otp}</sayCharValue></repeatMessage>"
    type    = "Alice"
  }
}

References

@patrickcping
Copy link
Collaborator Author

Raised from the discussion in #118

@samir-gandhi
Copy link

looking at #118 it seems like you are considering this already.
mentioning it just in case.
In the current provider I don't see a way to update the default template of a certain type.

I tried with template type general, and it overwrites it.. which is fine, but this seems like there is no way to make two custom templates through the provider to be used in a DV connection.

{"_links":{"self":{"href":"https://api.pingone.asia/v1/environments/bbbe7a62-9f74-4324-a2e2-9c66a95226f3/templates/general/contents/44c342bc-e4a2-4cd3-bb79-9c9d10effb12"},"template":{"href":"https://api.pingone.asia/v1/environments/bbbe7a62-9f74-4324-a2e2-9c66a95226f3/templates/general"},"environment":{"href":"https://api.pingone.asia/v1/environments/bbbe7a62-9f74-4324-a2e2-9c66a95226f3"}},"id":"44c342bc-e4a2-4cd3-bb79-9c9d10effb12","environment":{"id":"bbbe7a62-9f74-4324-a2e2-9c66a95226f3"},"createdAt":"2023-01-21T02:11:28.998Z","updatedAt":"2023-01-21T02:11:28.998Z","locale":"en","variant":"newtemp","template":{"id":"general"},"subject":"Custom email notification!!","body":"Enter your custom message here","deliveryMethod":"Email","default":false}

i.e. I don't see anything accounting for the variant field.

@patrickcping
Copy link
Collaborator Author

As we discussed the way to override the default is to leave the optional "variant" property out of the HCL definition. The same optional "variant" property can be set.

I've verified the issue we were talking about - where a default is overridden successfully but doesn't take effect - and raised a new issue #237

@patrickcping patrickcping added this to the v1.0.0 milestone May 5, 2023
@patrickcping patrickcping added the size/large Large size change (e.g. creation of new resources/datasources with tests) label May 22, 2023
@patrickcping patrickcping added the status/up-for-grabs The issue/PR is not blocked and can be picked up by a member of the community, or a maintainer label Jul 11, 2023
@patrickcping patrickcping added status/blocked/upstream-api The issue/PR is blocked by an upstream API and removed status/up-for-grabs The issue/PR is not blocked and can be picked up by a member of the community, or a maintainer labels Jun 11, 2024
@patrickcping patrickcping removed this from the v1.0.0-rc1 milestone Jun 11, 2024
@patrickcping
Copy link
Collaborator Author

This will be an anti-pattern if implemented in the provider, as the APIs don't lend themselves to this implementation.

Closing this ticket as it would be better implemented as a Terraform module

@patrickcping patrickcping closed this as not planned Won't fix, can't repro, duplicate, stale Jun 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
service/base PingOne Platform size/large Large size change (e.g. creation of new resources/datasources with tests) status/blocked/upstream-api The issue/PR is blocked by an upstream API type/enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants