integrations / terraform-provider-github

Terraform GitHub provider
https://www.terraform.io/docs/providers/github/
MIT License
904 stars 744 forks source link

[DOCS]: github_repository_dependabot_security_updates resource in doc uses github_repository.test.id instead of github_repository.test.name #2433

Open ViacheslavKudinov opened 1 week ago

ViacheslavKudinov commented 1 week ago

Describe the need

Example should look like

resource "github_repository" "repo" {
  name         = "my-repo"
  description  = "GitHub repo managed by Terraform"

  private = false

  vulnerability_alerts   = true
}

resource "github_repository_dependabot_security_updates" "example" {
  repository  = github_repository.test.name # changed to name instead of id 
  enabled     = true
}

currently https://registry.terraform.io/providers/integrations/github/latest/docs/resources/repository_dependabot_security_updates#example-usage is used repository = github_repository.test.id and it creates an error

Error: PUT https://api.github.com/repos/ORG/REPO_ID/automated-security-fixes: 404 Not Found []

as API expects "repo name" in API request, not a "repo ID".

SDK Version

No response

API Version

No response

Relevant log output

No response

Code of Conduct

kfcampbell commented 4 days ago

Please feel free to submit a PR for this if you'd like!

ViacheslavKudinov commented 4 days ago

Sure, thank you. I will try. Need to start with contribution guide.

ViacheslavKudinov commented 3 days ago

Here we go https://github.com/integrations/terraform-provider-github/pull/2439