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

required attribute "public_key" is maked as optional in ibm_compute_ssh_key docs #5575

Closed
pfeifferj opened this issue Aug 22, 2024 · 2 comments
Labels
documentation service/Classic Infrastructure Issues related to classic Infrastructure

Comments

@pfeifferj
Copy link

pfeifferj commented Aug 22, 2024

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

New or Affected Resource(s) or Datasource(s)

  • ibm_compute_ssh_key

Description

the docs state that only label is required and also feature this as the minimal example:

data "ibm_compute_ssh_key" "public_key" {
    label = "Terraform Public Key"
}

however, running tf validate against the example shows that public_key is also required

╷
│ Error: Missing required argument
│ 
│   on main.tf line 46, in resource "ibm_compute_ssh_key" "k8s_ssh_key":
│   46: resource "ibm_compute_ssh_key" "k8s_ssh_key" {
│ 
│ The argument "public_key" is required, but no definition was found.
╵

the docs should be corrected to also list public_key as required

References

@github-actions github-actions bot added the service/Classic Infrastructure Issues related to classic Infrastructure label Aug 22, 2024
@uibm
Copy link
Collaborator

uibm commented Sep 2, 2024

seems like the error is in resource and you are looking at the documents for datasource

On this page, it is mentioned that public_key is required

public_key- (Required, String) The public SSH key.

https://registry.terraform.io/providers/IBM-Cloud/ibm/latest/docs/resources/compute_ssh_key#public_key

@pfeifferj
Copy link
Author

you're right! sorry for the mixup

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation service/Classic Infrastructure Issues related to classic Infrastructure
Projects
None yet
Development

No branches or pull requests

2 participants