Skip to content

Instantly share code, notes, and snippets.

@issyl0
Last active January 30, 2021 19:36
Show Gist options
  • Save issyl0/cd61e4cb59de2c2e1e8f45e3cf7c12f5 to your computer and use it in GitHub Desktop.
Save issyl0/cd61e4cb59de2c2e1e8f45e3cf7c12f5 to your computer and use it in GitHub Desktop.
provider_installation {
dev_overrides {
"integrations/github" = "/Users/issyl0/go/bin/"
}
direct {}
}

On the released version of terraform-provider-github 4.3.1:

➜ terraform plan

Error: GET https://api.github.com/orgs/issyl0: 404 Not Found []

  on /Users/issyl0/repos/terraform-test/github.tf line 1, in provider "github":

After applying the patch in and make build, plus the .terraformrc development provider config:

➜ terraform plan

An execution plan has been generated and is shown below.
Resource actions are indicated with the following symbols:
  + create

Terraform will perform the following actions:

  # github_repository.tf-provider-test will be created
  + resource "github_repository" "tf-provider-test" {
      + allow_merge_commit     = true
      + allow_rebase_merge     = true
      + allow_squash_merge     = true
      + archived               = false
      + default_branch         = (known after apply)
      + delete_branch_on_merge = false
      + etag                   = (known after apply)
      + full_name              = (known after apply)
      + git_clone_url          = (known after apply)
      + has_downloads          = true
      + has_issues             = true
      + has_projects           = true
      + has_wiki               = true
      + html_url               = (known after apply)
      + http_clone_url         = (known after apply)
      + id                     = (known after apply)
      + name                   = "tf-provider-test"
      + node_id                = (known after apply)
      + private                = (known after apply)
      + repo_id                = (known after apply)
      + ssh_clone_url          = (known after apply)
      + svn_url                = (known after apply)
      + visibility             = "public"
    }

Plan: 1 to add, 0 to change, 0 to destroy.

------------------------------------------------------------------------

Note: You didn't specify an "-out" parameter to save this plan, so Terraform
can't guarantee that exactly these actions will be performed if
"terraform apply" is subsequently run.
terraform {
required_providers {
github = {
source = "integrations/github"
}
}
}
provider "github" {
owner = "issyl0"
# token from `GITHUB_TOKEN` envvar
}
resource "github_repository" "tf-provider-test" {
name = "tf-provider-test"
visibility = "public"
has_issues = true
has_projects = true
has_wiki = true
has_downloads = true
allow_merge_commit = true
allow_squash_merge = true
allow_rebase_merge = true
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment