Skip to content

Commit f94103f

Browse files
authored
Merge pull request #135 from mineiros-io/mariux/5.x
feat: Add support for provider 5.x
2 parents c0fb8e1 + 9a4693a commit f94103f

File tree

6 files changed

+22
-23
lines changed

6 files changed

+22
-23
lines changed

Diff for: CHANGELOG.md

+10-4
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
## [0.17.0]
11+
12+
### Added
13+
14+
- Add support for Terraform GitHub Provider version `5.x`
15+
1016
## [0.16.2]
1117

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

81-
82-
``` hcl
87+
```hcl
8388
terraform {
8489
required_version = "~> 1.0"
8590
@@ -96,7 +101,7 @@ Once you've updated the provider, a manual state migration is required to
96101
migrate existing resources to the new provider.
97102
The following command will replace the provider in the state.
98103

99-
``` bash
104+
```bash
100105
terraform state replace-provider registry.terraform.io/hashicorp/github registry.terraform.io/integrations/github
101106
```
102107

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

383-
[unreleased]: https://github.com/mineiros-io/terraform-github-repository/compare/v0.16.2...HEAD
388+
[unreleased]: https://github.com/mineiros-io/terraform-github-repository/compare/v0.17.0...HEAD
389+
[0.17.0]: https://github.com/mineiros-io/terraform-github-repository/compare/v0.16.2...v0.17.0
384390
[0.16.2]: https://github.com/mineiros-io/terraform-github-repository/compare/v0.16.1...v0.16.2
385391
[0.16.1]: https://github.com/mineiros-io/terraform-github-repository/compare/v0.16.0...v0.16.1
386392
[0.16.0]: https://github.com/mineiros-io/terraform-github-repository/compare/v0.15.0...v0.16.0

Diff for: README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@
1010

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

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

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

17-
_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._
17+
** 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.**
1818

1919

2020
- [GitHub as Code](#github-as-code)

Diff for: README.tfdoc.hcl

+2-2
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,11 @@ section {
3939
content = <<-END
4040
A [Terraform] module for creating a public or private repository on [Github].
4141
42-
**_This module supports Terraform v1.x and is compatible with the Official Terraform GitHub Provider v4.10 and above from `integrations/github`._**
42+
**_This module supports Terraform v1.x and is compatible with the Official Terraform GitHub Provider v4.20 and above from `integrations/github`._**
4343
4444
**Attention: This module is incompatible with the Hashicorp GitHub Provider! The latest version of this module supporting `hashicorp/github` provider is `~> 0.10.0`**
4545
46-
_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._
46+
** 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.**
4747
END
4848

4949
section {

Diff for: test/unit-complete/provider.tf

+5-2
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,11 @@ terraform {
66
required_providers {
77
github = {
88
source = "integrations/github"
9-
version = "~> 4.19"
9+
version = "~> 5.0, !=5.3.0, !=5.4.0, !=5.5.0"
10+
}
11+
tls = {
12+
source = "hashicorp/tls"
13+
version = "~> 2.1"
1014
}
11-
tls = "~> 2.1"
1215
}
1316
}

Diff for: test/unit-complete/variables.tf

+1-10
Original file line numberDiff line numberDiff line change
@@ -101,16 +101,7 @@ variable "projects" {
101101
name = string,
102102
body = string
103103
}))
104-
default = [
105-
{
106-
name = "Testproject"
107-
body = "This is a fancy test project for testing"
108-
},
109-
{
110-
name = "Another Testproject"
111-
body = "This is a fancy test project for testing"
112-
}
113-
]
104+
default = []
114105
}
115106

116107
variable "issue_labels" {

Diff for: versions.tf

+2-3
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,11 @@
55
terraform {
66
required_version = "~> 1.0"
77

8-
# 4.7.0 to 4.9.1 has a security regression: new repositories created via a
9-
# template have a public visibility. Has been fixed in 4.9.2.
8+
# branch_protections_v3 are broken in >= 5.3
109
required_providers {
1110
github = {
1211
source = "integrations/github"
13-
version = "~> 4.20"
12+
version = ">= 4.20, < 6.0"
1413
}
1514
}
1615
}

0 commit comments

Comments
 (0)