-
Notifications
You must be signed in to change notification settings - Fork 904
Open
Labels
Status: BlockedSome technical or requirement is blocking the issueSome technical or requirement is blocking the issueStatus: PinnedA way to keep old or long lived issues aroundA way to keep old or long lived issues aroundType: BugSomething isn't working as documentedSomething isn't working as documented
Description
Overview
I recently started trying to use github_enterprise_organization that was added here: #1478 However there seems to be a bug around editing admin_logins after the organization is initially created. Creation works just fine.
Just to add, I'm currently targeting a GitHub enterprise v3.6 self-hosted instance.
The exact error is:
Error: AddEnterpriseOrganizationMemberInput isn't a defined input type (on $input)
I only really have basic knowledge of Go but after some digging into the code, I think it might be that the v4 API doesn't have a mutator for updating the organisation members similar to the case around organisation description updates noted here:
terraform-provider-github/github/resource_github_enterprise_organization.go
Lines 86 to 87 in f60e556
| //We use the V3 api to set the description of the org, because there is no mutator in the V4 API to edit the org's | |
| //description |
My tf
terraform {
required_providers {
github = {
source = "integrations/github"
version = "~> 5.0"
}
}
}
data "github_enterprise" "enterprise" {
slug = var.github_enterprise
}
resource "github_enterprise_organization" "organization" {
enterprise_id = data.github_enterprise.enterprise.id
name = var.name
description = var.description
billing_email = var.billing_email
admin_logins = var.organization_owners
}Full debug output
2023-01-27T11:53:03.140Z [DEBUG] provider.terraform-provider-github_v5.16.0: {
2023-01-27T11:53:03.140Z [DEBUG] provider.terraform-provider-github_v5.16.0: "errors": [
2023-01-27T11:53:03.140Z [DEBUG] provider.terraform-provider-github_v5.16.0: {
2023-01-27T11:53:03.140Z [DEBUG] provider.terraform-provider-github_v5.16.0: "path": [
2023-01-27T11:53:03.140Z [DEBUG] provider.terraform-provider-github_v5.16.0: "mutation"
2023-01-27T11:53:03.140Z [DEBUG] provider.terraform-provider-github_v5.16.0: ],
2023-01-27T11:53:03.140Z [DEBUG] provider.terraform-provider-github_v5.16.0: "extensions": {
2023-01-27T11:53:03.140Z [DEBUG] provider.terraform-provider-github_v5.16.0: "code": "variableRequiresValidType",
2023-01-27T11:53:03.140Z [DEBUG] provider.terraform-provider-github_v5.16.0: "typeName": "AddEnterpriseOrganizationMemberInput",
2023-01-27T11:53:03.140Z [DEBUG] provider.terraform-provider-github_v5.16.0: "variableName": "input"
2023-01-27T11:53:03.140Z [DEBUG] provider.terraform-provider-github_v5.16.0: },
2023-01-27T11:53:03.140Z [DEBUG] provider.terraform-provider-github_v5.16.0: "locations": [
2023-01-27T11:53:03.140Z [DEBUG] provider.terraform-provider-github_v5.16.0: {
2023-01-27T11:53:03.140Z [DEBUG] provider.terraform-provider-github_v5.16.0: "line": 1,
2023-01-27T11:53:03.140Z [DEBUG] provider.terraform-provider-github_v5.16.0: "column": 10
2023-01-27T11:53:03.140Z [DEBUG] provider.terraform-provider-github_v5.16.0: }
2023-01-27T11:53:03.140Z [DEBUG] provider.terraform-provider-github_v5.16.0: ],
2023-01-27T11:53:03.140Z [DEBUG] provider.terraform-provider-github_v5.16.0: "message": "AddEnterpriseOrganizationMemberInput isn't a defined input type (on $input)"
2023-01-27T11:53:03.140Z [DEBUG] provider.terraform-provider-github_v5.16.0: },
2023-01-27T11:53:03.140Z [DEBUG] provider.terraform-provider-github_v5.16.0: {
2023-01-27T11:53:03.140Z [DEBUG] provider.terraform-provider-github_v5.16.0: "path": [
2023-01-27T11:53:03.140Z [DEBUG] provider.terraform-provider-github_v5.16.0: "mutation",
2023-01-27T11:53:03.140Z [DEBUG] provider.terraform-provider-github_v5.16.0: "addEnterpriseOrganizationMember"
2023-01-27T11:53:03.140Z [DEBUG] provider.terraform-provider-github_v5.16.0: ],
2023-01-27T11:53:03.140Z [DEBUG] provider.terraform-provider-github_v5.16.0: "extensions": {
2023-01-27T11:53:03.140Z [DEBUG] provider.terraform-provider-github_v5.16.0: "code": "undefinedField",
2023-01-27T11:53:03.140Z [DEBUG] provider.terraform-provider-github_v5.16.0: "typeName": "Mutation",
2023-01-27T11:53:03.140Z [DEBUG] provider.terraform-provider-github_v5.16.0: "fieldName": "addEnterpriseOrganizationMember"
2023-01-27T11:53:03.140Z [DEBUG] provider.terraform-provider-github_v5.16.0: },
2023-01-27T11:53:03.140Z [DEBUG] provider.terraform-provider-github_v5.16.0: "locations": [
2023-01-27T11:53:03.140Z [DEBUG] provider.terraform-provider-github_v5.16.0: {
2023-01-27T11:53:03.140Z [DEBUG] provider.terraform-provider-github_v5.16.0: "line": 1,
2023-01-27T11:53:03.140Z [DEBUG] provider.terraform-provider-github_v5.16.0: "column": 56
2023-01-27T11:53:03.140Z [DEBUG] provider.terraform-provider-github_v5.16.0: }
2023-01-27T11:53:03.140Z [DEBUG] provider.terraform-provider-github_v5.16.0: ],
2023-01-27T11:53:03.140Z [DEBUG] provider.terraform-provider-github_v5.16.0: "message": "Field 'addEnterpriseOrganizationMember' doesn't exist on type 'Mutation'"
2023-01-27T11:53:03.140Z [DEBUG] provider.terraform-provider-github_v5.16.0: },
2023-01-27T11:53:03.140Z [DEBUG] provider.terraform-provider-github_v5.16.0: {
2023-01-27T11:53:03.140Z [DEBUG] provider.terraform-provider-github_v5.16.0: "path": [
2023-01-27T11:53:03.140Z [DEBUG] provider.terraform-provider-github_v5.16.0: "mutation"
2023-01-27T11:53:03.140Z [DEBUG] provider.terraform-provider-github_v5.16.0: ],
2023-01-27T11:53:03.140Z [DEBUG] provider.terraform-provider-github_v5.16.0: "extensions": {
2023-01-27T11:53:03.140Z [DEBUG] provider.terraform-provider-github_v5.16.0: "code": "variableNotUsed",
2023-01-27T11:53:03.140Z [DEBUG] provider.terraform-provider-github_v5.16.0: "variableName": "input"
2023-01-27T11:53:03.140Z [DEBUG] provider.terraform-provider-github_v5.16.0: },
2023-01-27T11:53:03.140Z [DEBUG] provider.terraform-provider-github_v5.16.0: "locations": [
2023-01-27T11:53:03.140Z [DEBUG] provider.terraform-provider-github_v5.16.0: {
2023-01-27T11:53:03.140Z [DEBUG] provider.terraform-provider-github_v5.16.0: "line": 1,
2023-01-27T11:53:03.140Z [DEBUG] provider.terraform-provider-github_v5.16.0: "column": 1
2023-01-27T11:53:03.140Z [DEBUG] provider.terraform-provider-github_v5.16.0: }
2023-01-27T11:53:03.140Z [DEBUG] provider.terraform-provider-github_v5.16.0: ],
2023-01-27T11:53:03.140Z [DEBUG] provider.terraform-provider-github_v5.16.0: "message": "Variable $input is declared by anonymous mutation but not used"
2023-01-27T11:53:03.140Z [DEBUG] provider.terraform-provider-github_v5.16.0: }
2023-01-27T11:53:03.140Z [DEBUG] provider.terraform-provider-github_v5.16.0: ]
2023-01-27T11:53:03.140Z [DEBUG] provider.terraform-provider-github_v5.16.0: }
2023-01-27T11:53:03.140Z [DEBUG] provider.terraform-provider-github_v5.16.0: -----------------------------------------------------
2023-01-27T11:53:03.146Z [ERROR] vertex "module.github_organization[\"markw-test4\"].github_enterprise_organization.organization" error: AddEnterpriseOrganizationMemberInput isn't a defined input type (on $input)
╷
│ Error: AddEnterpriseOrganizationMemberInput isn't a defined input type (on $input)
│
│ with module.github_organization["markw-test4"].github_enterprise_organization.organization,
│ on ../../modules/github_organization/main.tf line 14, in resource "github_enterprise_organization" "organization":
│ 14: resource "github_enterprise_organization" "organization" {
│
╵
╷
│ Error: AddEnterpriseOrganizationMemberInput isn't a defined input type (on $input)
│
│ with module.github_organization["markw-test2"].github_enterprise_organization.organization,
│ on ../../modules/github_organization/main.tf line 14, in resource "github_enterprise_organization" "organization":
│ 14: resource "github_enterprise_organization" "organization" {
│
Metadata
Metadata
Assignees
Labels
Status: BlockedSome technical or requirement is blocking the issueSome technical or requirement is blocking the issueStatus: PinnedA way to keep old or long lived issues aroundA way to keep old or long lived issues aroundType: BugSomething isn't working as documentedSomething isn't working as documented
Type
Projects
Status
🔥 Backlog
Status
Backlog