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

resource scm_decryption_rule fails to create when type ssl_inbound_inspection is set #15

Open
ancoleman opened this issue Mar 14, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@ancoleman
Copy link
Contributor

Describe the bug

scm_decryption_rule resource for parameter type: ssl_inbound_inspection fails when specifying a string value of a certificate name.

Expected behavior

When using the ssl_inbound_inspection type, you should be able to set the certificate name to be use as a string value.

Current behavior

When setting parameter type: ssl_inbound_inspection a response from Strata Cloud Manager is received

module.security_policy_with_yaml.scm_decryption_rule.this["terraform-decryption-rule-1"]: Creating...
module.security_policy_with_yaml.scm_decryption_rule.this["terraform-decryption-rule-2"]: Creating...
module.security_policy_with_yaml.scm_decryption_rule.this["terraform-decryption-rule-1"]: Creation complete after 1s [id=d4a650e3-a8e7-4371-9d5d-21762ccf2a28]
╷
│ Error: Error creating config
│ 
│   with module.security_policy_with_yaml.scm_decryption_rule.this["terraform-decryption-rule-2"],
│   on ../../modules/policy/rules.tf line 95, in resource "scm_decryption_rule" "this":
│   95: resource "scm_decryption_rule" "this" {
│ 
│ [HTTP 400] API_I00035 Invalid Request Payload [object Object] - ["type.ssl_inbound_inspection" must be of type object]
╵

Example yaml configuration for type parameter:

    type:
      ssl_inbound_inspection: "Forward-Trust-CA"

Possible Solution

When reviewing the API response it seems when setting the type to ssl_inbound_inspection it should be an array object sent to it like:

{
    "ssl_inbound_inspection": {
        "certificates": ["CertificateName"]
    }
}

Steps to reproduce

  1. set the ssl_inbound_inspection value to a string value of a known certificate name

Your Environment

  • Version used: Terraform v1.4.6
  • Provider Version: v0.6.0
  • Operating System and version: MacOS 14.3.1
@ancoleman ancoleman added the bug Something isn't working label Mar 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant