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

Support 0.12 #309

Merged
merged 17 commits into from
May 22, 2019
Merged

Support 0.12 #309

merged 17 commits into from
May 22, 2019

Conversation

jacobbednarz
Copy link
Member

@jacobbednarz jacobbednarz commented Apr 26, 2019

Puts all the building blocks in place for adding 0.12 support.

  • Get provider building and working as intended
  • Update tests to use 0.12 syntax
  • Ensure CI is green for acceptance tests
  • Update README to reference new Go + Terraform minimum versions

@ghost ghost added the size/XL label Apr 26, 2019
@ghost ghost added size/XXL and removed size/XL labels May 14, 2019
@jacobbednarz
Copy link
Member Author

Using the following example setup, this branch is working as expected.

provider "cloudflare" {
  email  = "${var.cloudflare_email}"
  token  = "${var.cloudflare_token}"
  org_id = "${var.org_id}"
}

resource "cloudflare_record" "foobar" {
  domain = "${var.cloudflare_domain}"
  name   = "test"
  value  = "example.com"
  type   = "CNAME"
  ttl    = 120
}

@jacobbednarz jacobbednarz marked this pull request as ready for review May 14, 2019 22:11
@jacobbednarz
Copy link
Member Author

This really isn't ready for review just yet but when things are in "draft", the branch isn't visible to external systems so things like CI aren't triggered.

Terraform 0.12 requires that resource names don't start with a number
(although they can still contain a number). To ensure we use a
consistent supported format, I've introduced
`generateRandomResourceName` which will be available to all tests for
use whenever a random resource name is required.

Fixes the following CI exception.

```
------- Stdout: -------
=== RUN   TestAccCloudflareLoadBalancerPool_CreateAfterManualDestroy
=== PAUSE TestAccCloudflareLoadBalancerPool_CreateAfterManualDestroy
=== CONT  TestAccCloudflareLoadBalancerPool_CreateAfterManualDestroy
--- FAIL: TestAccCloudflareLoadBalancerPool_CreateAfterManualDestroy (0.00s)
    testing.go:568: Step 0 error: /opt/teamcity-agent/temp/buildTmp/tf-test154368520/main.tf:2,42-54: Invalid resource name; A name must start with a letter and may contain only letters, digits, underscores, and dashes.
FAIL
```
@jacobbednarz
Copy link
Member Author

Integration tests for CI are all green with the exception of those three flakey ones which need the sweeper (addressed in #321).

@mgkeen
Copy link

mgkeen commented May 22, 2019

v0.12 went live like an hour ago. go go go! 😉 Anything I can do to help?

@jacobbednarz jacobbednarz merged commit 5d7a3d1 into cloudflare:master May 22, 2019
@jacobbednarz
Copy link
Member Author

Release to be cut in next couple of days once the dust has settled for the Hashicorp folks. In the meantime, feel free to build against master.

@jacobbednarz jacobbednarz deleted the 0.12 branch May 22, 2019 22:00
@rafilkmp3
Copy link

@jacobbednarz how i can build and use ?

@jacobbednarz
Copy link
Member Author

Please see the building the provider section of the README.

@jacobbednarz
Copy link
Member Author

1.15.0 was released today with 0.12 compatibility.

boekkooi-lengoo pushed a commit to boekkooi-lengoo/terraform-provider-cloudflare that referenced this pull request Feb 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants