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

feat: Add support for provider 5.x #135

Merged
merged 4 commits into from
Oct 20, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 10 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [0.17.0]

### Added

- Add support for Terraform GitHub Provider version `5.x`

## [0.16.2]

### Fixed
Expand Down Expand Up @@ -78,8 +84,7 @@ This needs migration actions if you already used this module with the `hashicorp
To migrate from a previous version, please ensure that you are using the
`integrations/github` official GitHub Terraform Provider.


``` hcl
```hcl
terraform {
required_version = "~> 1.0"

Expand All @@ -96,7 +101,7 @@ Once you've updated the provider, a manual state migration is required to
migrate existing resources to the new provider.
The following command will replace the provider in the state.

``` bash
```bash
terraform state replace-provider registry.terraform.io/hashicorp/github registry.terraform.io/integrations/github
```

Expand Down Expand Up @@ -380,7 +385,8 @@ Please review plans and report regressions and issues asap so we can improve doc
- This is the initial release of our GitHub Repository module with support for
creating and managing GitHub Repositories for Organizations.

[unreleased]: https://github.com/mineiros-io/terraform-github-repository/compare/v0.16.2...HEAD
[unreleased]: https://github.com/mineiros-io/terraform-github-repository/compare/v0.17.0...HEAD
[0.17.0]: https://github.com/mineiros-io/terraform-github-repository/compare/v0.16.2...v0.17.0
[0.16.2]: https://github.com/mineiros-io/terraform-github-repository/compare/v0.16.1...v0.16.2
[0.16.1]: https://github.com/mineiros-io/terraform-github-repository/compare/v0.16.0...v0.16.1
[0.16.0]: https://github.com/mineiros-io/terraform-github-repository/compare/v0.15.0...v0.16.0
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@

A [Terraform] module for creating a public or private repository on [Github].

**_This module supports Terraform v1.x and is compatible with the Official Terraform GitHub Provider v4.10 and above from `integrations/github`._**
**_This module supports Terraform v1.x and is compatible with the Official Terraform GitHub Provider v4.20 and above from `integrations/github`._**

**Attention: This module is incompatible with the Hashicorp GitHub Provider! The latest version of this module supporting `hashicorp/github` provider is `~> 0.10.0`**

_Security related notice: Versions 4.7.0, 4.8.0, 4.9.0 and 4.9.1 of the Terraform Github Provider are deny-listed in version constraints as a regression introduced in 4.7.0 and fixed in 4.9.2 creates public repositories from templates even if visibility is set to private._
** Note: Versions 5.3.0, 5.4.0, and 5.5.0 of the Terraform Github Provider have broken branch protections support and should not be used.**


- [GitHub as Code](#github-as-code)
Expand Down
4 changes: 2 additions & 2 deletions README.tfdoc.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,11 @@ section {
content = <<-END
A [Terraform] module for creating a public or private repository on [Github].
**_This module supports Terraform v1.x and is compatible with the Official Terraform GitHub Provider v4.10 and above from `integrations/github`._**
**_This module supports Terraform v1.x and is compatible with the Official Terraform GitHub Provider v4.20 and above from `integrations/github`._**
**Attention: This module is incompatible with the Hashicorp GitHub Provider! The latest version of this module supporting `hashicorp/github` provider is `~> 0.10.0`**
_Security related notice: Versions 4.7.0, 4.8.0, 4.9.0 and 4.9.1 of the Terraform Github Provider are deny-listed in version constraints as a regression introduced in 4.7.0 and fixed in 4.9.2 creates public repositories from templates even if visibility is set to private._
** Note: Versions 5.3.0, 5.4.0, and 5.5.0 of the Terraform Github Provider have broken branch protections support and should not be used.**
END

section {
Expand Down
7 changes: 5 additions & 2 deletions test/unit-complete/provider.tf
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,11 @@ terraform {
required_providers {
github = {
source = "integrations/github"
version = "~> 4.19"
version = "~> 5.0, !=5.3.0, !=5.4.0, !=5.5.0"
}
tls = {
source = "hashicorp/tls"
version = "~> 2.1"
}
tls = "~> 2.1"
}
}
11 changes: 1 addition & 10 deletions test/unit-complete/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -101,16 +101,7 @@ variable "projects" {
name = string,
body = string
}))
default = [
{
name = "Testproject"
body = "This is a fancy test project for testing"
},
{
name = "Another Testproject"
body = "This is a fancy test project for testing"
}
]
default = []
}

variable "issue_labels" {
Expand Down
5 changes: 2 additions & 3 deletions versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,11 @@
terraform {
required_version = "~> 1.0"

# 4.7.0 to 4.9.1 has a security regression: new repositories created via a
# template have a public visibility. Has been fixed in 4.9.2.
# branch_protections_v3 are broken in >= 5.3
required_providers {
github = {
source = "integrations/github"
version = "~> 4.20"
version = ">= 4.20, < 6.0"
}
}
}