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

[ibm_sm_iam_credentials_secret] TTL field only accepts integers #4464

Closed
alex-reiff opened this issue Mar 31, 2023 · 1 comment
Closed

[ibm_sm_iam_credentials_secret] TTL field only accepts integers #4464

alex-reiff opened this issue Mar 31, 2023 · 1 comment
Labels
service/Secrets Manager Issues related to Secrets Manager

Comments

@alex-reiff
Copy link

The TTL field expects an integer, so values like 960h or 60m do not work like they should.

│ Error: expected ttl to represent an integer
│
│   with module.dynamic_serviceid_apikey1.ibm_sm_iam_credentials_secret.sm_iam_credentials_secret,
│   on ../../main.tf line 25, in resource "ibm_sm_iam_credentials_secret" "sm_iam_credentials_secret":
│   25:   ttl             = var.sm_iam_secret_ttl
│

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 CLI and Terraform IBM Provider Version

Terraform v1.4.4
on darwin_amd64
+ provider registry.terraform.io/ibm-cloud/ibm v1.51.0

Affected Resource(s)

  • ibm_sm_iam_credentials_secret

Terraform Configuration Files

(internal link) https://github.ibm.com/GoldenEye/iam-serviceid-apikey-secrets-manager-module/tree/master/examples/complete-no-rotation-policy

Debug Output

Panic Output

Expected Behavior

Actual Behavior

Steps to Reproduce

  1. TF_VAR_sm_iam_secret_ttl=960h
  2. terraform apply

Important Factoids

References

  • #0000
@github-actions github-actions bot added the service/Secrets Manager Issues related to Secrets Manager label Mar 31, 2023
@haimsch
Copy link
Collaborator

haimsch commented May 1, 2023

The ttl field accepts only integer values (number of seconds). See the documentation of the ttl field here https://registry.terraform.io/providers/IBM-Cloud/ibm/latest/docs/resources/sm_iam_credentials_secret
The example in this page is still ttl = "30m" but this has been fixed in PR #4530
Note that the Secrets Manager API does support a value like "30m" for ttl, but in the Terraform provider we had to limit the possible values to integers only (because in the the response it is always integer).

@haimsch haimsch closed this as completed May 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
service/Secrets Manager Issues related to Secrets Manager
Projects
None yet
Development

No branches or pull requests

2 participants