profile
viewpoint
If you are wondering where the data of this site comes from, please visit https://api.github.com/users/onematchfox/events. GitMemory does not store any data, but only uses NGINX to cache data for a period of time. The idea behind GitMemory is simply to give users a better reading experience.
Brian Fox onematchfox Midnite IT AB Stockholm

onematchfox/angular.js 0

AngularJS - HTML enhanced for web apps!

onematchfox/aws-load-balancer-controller 0

A Kubernetes controller for Elastic Load Balancers

onematchfox/backstage 0

Backstage is an open platform for building developer portals

onematchfox/backstage-plugin-argo-cd 0

A Backstage plugin for deployment tool ArgoCD

onematchfox/blueprints 0

Example Shipyard stacks and tutorials

onematchfox/cloudflare-go 0

Go library for the Cloudflare v4 API

onematchfox/commitlint-github-action 0

Lints Pull Request commits with commitlint

onematchfox/consul-k8s 0

First-class support for Consul and Kubernetes. Run Consul on Kubernetes, integrate Connect, sync services, and more.

onematchfox/consul-smi-controller 0

Controller implementing SMI Spec for HashiCorp Consul

onematchfox/cookbook 0

Collection of MinIO recipes

startednpryce/adr-tools

started time in a day

startedsigstore/cosign

started time in 24 days

startedory/hydra

started time in a month

startedarmosec/kubescape

started time in a month

issue openedcloudflare/terraform-provider-cloudflare

Origin CA certificate validity not applied (provider version >= `v2.22.0`)

Confirmation

  • [X] My issue isn't already found on the issue tracker.
  • [X] I have replicated my issue using the latest version of the provider and it is still present.

Terraform and Cloudflare provider version

Terraform v0.14.11 Cloudflare Provider >= v2.22.0

Affected resource(s)

cloudflare_origin_ca_certificate

Terraform configuration files

resource "tls_private_key" "example" {
  algorithm = "RSA"
}

resource "tls_cert_request" "example" {
  key_algorithm   = tls_private_key.example.algorithm
  private_key_pem = tls_private_key.example.private_key_pem

  subject {
    common_name  = ""
    organization = "Terraform Test"
  }
}

resource "cloudflare_origin_ca_certificate" "example" {
  csr                = tls_cert_request.example.cert_request_pem
  hostnames          = [ "example.com" ]
  request_type       = "origin-rsa"
  requested_validity = 30
}

Debug output

Should be reproducible by running Terraform acceptance tests?

Panic output

No response

Expected output

Expect a certificate to be created that is valid for 30 days

Actual output

Certificate that is created is valid for 5475 days

Steps to reproduce

The easiest way would be to run the Terraform acceptance tests within this repository. I was going to extend the tests to showcase this but it looks like they are already failing:

=== RUN   TestAccCloudflareOriginCACertificate_Basic
    testing.go:705: Step 0 error: Check failed: Check 6/6 error: cloudflare_origin_ca_certificate.hfjigatemd: Attribute 'requested_validity' expected "7", got "5475"
--- FAIL: TestAccCloudflareOriginCACertificate_Basic (7.76s)
FAIL
exit status 1
FAIL    github.com/cloudflare/terraform-provider-cloudflare/cloudflare  7.767s

Additional factoids

No response

References

Issue was introduced with change in #1078

created time in a month

startedasdf-vm/asdf

started time in a month

startedasdf-vm/asdf-plugins

started time in a month

delete branch onematchfox/terraform-provider-cloudflare

delete branch : feat/origin-ca-root-cert

delete time in a month

pull request commentcloudflare/terraform-provider-cloudflare

New data source - `cloudflare_origin_ca_root_certificate`

Hi @jacobbednarz, Just checking in on this PR to make sure it hasn't dropped off your radar. Let me know if there's anything else you need me to do. Cheers.

onematchfox

comment created time in a month

push eventonematchfox/terraform-provider-cloudflare

Brian Fox

commit sha 7eddf58af583be3aa9af1d5841f045af7c49b77d

Update website/docs/d/ip_ranges.html.md

view details

push time in a month

push eventonematchfox/terraform-provider-cloudflare

Brian Fox

commit sha eb26e807d321f5b89a959ea7ab56693041cf229b

Update website/docs/d/ip_ranges.html.md Signed-off-by: Brian Fox <brianhfox@gmail.com>

view details

push time in a month

push eventonematchfox/terraform-provider-cloudflare

Brian Fox

commit sha 0b01bbe86a025d42fd0c2873b461b0dc20d80b10

Update website/docs/d/ip_ranges.html.md

view details

push time in a month

pull request commentcloudflare/terraform-provider-cloudflare

New data source - `cloudflare_origin_ca_root_certificate`

some minor nitpicks but nothing major once we get those sorted, this looks fine to merge in.

Thanks for the review. Accepted all suggestions. Hope you don't mind me tagging an extra commit on to the PR - I took the liberty of fixing the ip_range sidebar annotations so that these are no longer the odd ones out with their use of _ instead of -

onematchfox

comment created time in a month

push eventonematchfox/terraform-provider-cloudflare

Brian Fox

commit sha d4b2c8d108a093f2d45c76a625d387fdd73be853

Update website/docs/d/ip_ranges.html.md

view details

push time in a month

push eventonematchfox/terraform-provider-cloudflare

Brian Fox

commit sha a82123c23ec4baf9b35e75fe9522de31e2a21aee

Update website/docs/d/origin_ca_root_certificate.html.md Co-authored-by: Jacob Bednarz <jacob.bednarz@hey.com>

view details

push time in a month

push eventonematchfox/terraform-provider-cloudflare

Brian Fox

commit sha 08af35a0c9b1bab2bdcc6e3dd87edf901830c124

Update website/cloudflare.erb Co-authored-by: Jacob Bednarz <jacob.bednarz@hey.com>

view details

push time in a month

push eventonematchfox/terraform-provider-cloudflare

Brian Fox

commit sha 336721bca6ebf7b142c2edcf765d4a01c962a990

Update cloudflare/data_source_origin_ca_root_certificate.go Co-authored-by: Jacob Bednarz <jacob.bednarz@hey.com>

view details

push time in a month

Pull request review commentcloudflare/terraform-provider-cloudflare

New data source - `cloudflare_origin_ca_root_certificate`

+package cloudflare++import (+	"fmt"+	"strings"++	"github.com/cloudflare/cloudflare-go"+	"github.com/hashicorp/terraform-plugin-sdk/helper/schema"+	"github.com/hashicorp/terraform-plugin-sdk/helper/validation"+)++func dataSourceCloudflareOriginCARootCertificate() *schema.Resource {+	return &schema.Resource{+		Read: dataSourceCloudflareOriginCARootCertificateRead,++		Schema: map[string]*schema.Schema{+			"algorithm": {+				Type:         schema.TypeString,+				Required:     true,+				ForceNew:     true,+				ValidateFunc: validation.StringInSlice([]string{"rsa", "ecc"}, true),+			},++			"cert_pem": {+				Type:     schema.TypeString,+				Computed: true,+			},+		},+	}+}++func dataSourceCloudflareOriginCARootCertificateRead(d *schema.ResourceData, meta interface{}) error {+	algorithm := strings.ToLower(fmt.Sprintf("%v", d.Get("algorithm")))

Good catch

onematchfox

comment created time in a month

PullRequestReviewEvent

Pull request review commentcloudflare/terraform-provider-cloudflare

New data source - `cloudflare_origin_ca_root_certificate`

+package cloudflare++import (+	"fmt"+	"strings"++	"github.com/cloudflare/cloudflare-go"+	"github.com/hashicorp/terraform-plugin-sdk/helper/schema"+	"github.com/hashicorp/terraform-plugin-sdk/helper/validation"+)++func dataSourceCloudflareOriginCARootCertificate() *schema.Resource {+	return &schema.Resource{+		Read: dataSourceCloudflareOriginCARootCertificateRead,++		Schema: map[string]*schema.Schema{+			"algorithm": {+				Type:         schema.TypeString,+				Required:     true,+				ForceNew:     true,+				ValidateFunc: validation.StringInSlice([]string{"rsa", "ecc"}, true),+			},++			"cert_pem": {+				Type:     schema.TypeString,+				Computed: true,+			},+		},+	}+}++func dataSourceCloudflareOriginCARootCertificateRead(d *schema.ResourceData, meta interface{}) error {+	algorithm := strings.ToLower(fmt.Sprintf("%v", d.Get("algorithm")))+	certBytes, err := cloudflare.OriginCARootCertificate(algorithm)+	if err != nil {+		return fmt.Errorf("failed to fetch Cloudflare IP ranges: %s", err)

Oops :roll_eyes:

onematchfox

comment created time in a month

PullRequestReviewEvent

push eventonematchfox/terraform-provider-cloudflare

Brian Fox

commit sha 2ae32338fd2f25a2cde373619d33858079f82740

Update cloudflare/data_source_origin_ca_root_certificate.go Co-authored-by: Jacob Bednarz <jacob.bednarz@hey.com>

view details

push time in a month

PR opened cloudflare/terraform-provider-cloudflare

New data source - `cloudflare_origin_ca_root_certificate`

Introduces new data source cloudflare_origin_ca_root_certificate which can be used to read the Origin CA root certificate for a given algorithm.

Closes #1096

+131 -0

0 comment

5 changed files

pr created time in a month

push eventonematchfox/terraform-provider-cloudflare

Brian Fox

commit sha 93acea14f3098206ba91e9ac00be09eb08df81d1

datasource/cloudflare_origin_ca_root_certificate: new data source

view details

push time in a month

push eventonematchfox/terraform-provider-cloudflare

Brian Fox

commit sha 34091a36cea15fafad38bfc5b7dc4b6dd81b7e5b

feat: add data source `cloudflare_origin_ca_root_certificate`

view details

push time in a month

push eventonematchfox/terraform-provider-cloudflare

Brian Fox

commit sha 1fbef672c3ea9b7ac51bee253000cf52a6383955

feat: add data source `cloudflare_origin_ca_root_certificate`

view details

push time in a month

push eventonematchfox/terraform-provider-cloudflare

Brian Fox

commit sha 9ad21b3c79661a8d0a1f44d6f513551a148c3f66

feat: add data source `cloudflare_origin_ca_root_certificate`

view details

push time in a month

startedhashicorp/consul

started time in a month

startedJeffail/benthos

started time in a month