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

repo_id attribute from github_repository resource not generated #164

Open
neilharris123 opened this issue Oct 5, 2023 · 2 comments
Open

Comments

@neilharris123
Copy link

neilharris123 commented Oct 5, 2023

As explained here all attributes from the github_repository resource should be exported by the module.
There is an attribute on the github_repository documentation named repo_id.

However, when I create a github repository with the mineiros-io module, this repo_id attribute does not exist. For example, my attributes look something like this:

{
  "attributes": {
    "allow_merge_commit": true,
    "allow_rebase_merge": true,
    "allow_squash_merge": true,
    "archived": false,
    "auto_init": false,
    "default_branch": "master",
    "delete_branch_on_merge": false,
    "description": "",
    "etag": "W/\"b62fa29d48ada996cea8f6f4742c81c0c62b21256e886a72a356089eb57077c4\"",
    "full_name": "exampleorg/repo-anonymized",
    "git_clone_url": "git://github.com/exampleorg/repo-anonymized.git",
    "gitignore_template": null,
    "has_downloads": true,
    "has_issues": true,
    "has_projects": false,
    "has_wiki": true,
    "homepage_url": "",
    "html_url": "https://github.com/exampleorg/repo-anonymized",
    "http_clone_url": "https://github.com/exampleorg/repo-anonymized.git",
    "id": "repo-anonymized",
    "is_template": false,
    "license_template": null,
    "name": "repo-anonymized",
    "node_id": "MDEwOlJlcG9zaXRvcnk3NDU4OTg4NQ==",
    "private": true,
    "ssh_clone_url": "git@exampleorg/repo-anonymized.git",
    "svn_url": "https://github.com/exampleorg/repo-anonymized",
    "template": [],
    "topics": [],
    "visibility": "private"
  }
}

Is there any reason this one attribute is not generated by the module?

@shinenelson
Copy link

I tried to reproduce the issue, but I was unable to. What I tried was to export the module's output as an output from my root module. Also, listing module.<module-name>.repository from the terraform console gave the expected output.

Can you confirm whether you have the attribute when you create a resource without using the module? If not, then it might be an issue with the upstream provider.

Also, could you please mention the version of the provider that you are using?

@shinenelson
Copy link

I just noticed that you had an attributes key in the output you pasted.
Also, the output does not have other attributes like archive_on_destroy, has_discussions, pages, security configuration, merge configuration, etc.
That seems odd.

Can you also provide a sample configuration of how you are attempting to access the attribute?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants