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

(Fix #883) Additionally expose ipv4/6 cidrs in github_ip_ranges data source #884

Merged

Conversation

rymir
Copy link
Contributor

@rymir rymir commented Aug 18, 2021

Fixes #883

https://api.github.com/meta recently changed and now includes both ipv4 and ipv6 cidrs

When integrating the github_ip_ranges data source with resources from other providers requiring cidrs to be specified separately (ipv4 and ipv6), you find yourself writing additional terraform logic to split them.

ref. https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/security_group_rule#ipv6_cidr_blocks

This pull request encapsulates the logic in the github_ip_ranges data source, by including additional _ipv4 and _ipv6 outputs - it maintains backwards compatibility intact as it preserves the original data source outputs too.

@rymir rymir force-pushed the fix-issue-883-github-source-cidrs-ipv4-ipv6 branch 2 times, most recently from 9a60870 to 942e3af Compare August 18, 2021 11:45
@rymir rymir changed the title (Fix #883) Additionally expose ipv4/6 cidr in github_ip_ranges data source (Fix #883) Additionally expose ipv4/6 cidrs in github_ip_ranges data source Aug 18, 2021
@rymir rymir force-pushed the fix-issue-883-github-source-cidrs-ipv4-ipv6 branch from 942e3af to e52dcd3 Compare August 18, 2021 17:12
@jcudit jcudit added this to the v4.14.0 milestone Aug 31, 2021
@jcudit jcudit merged commit 3948033 into integrations:main Sep 2, 2021
jphuynh added a commit to jphuynh/terraform-provider-github that referenced this pull request Sep 2, 2021
Follow up on the PR (integrations#884) that introduced the *_ipv4/*_ipv6 attributes.
jcudit pushed a commit that referenced this pull request Sep 10, 2021
Follow up on the PR (#884) that introduced the *_ipv4/*_ipv6 attributes.
kfcampbell pushed a commit to kfcampbell/terraform-provider-github that referenced this pull request Jul 26, 2022
kfcampbell pushed a commit to kfcampbell/terraform-provider-github that referenced this pull request Jul 26, 2022
…s#895)

Follow up on the PR (integrations#884) that introduced the *_ipv4/*_ipv6 attributes.
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

Successfully merging this pull request may close these issues.

Provider returns both IPv4 and IPv6 IPs as an array causing terraform security group resource to fail
4 participants