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

Add type to Access applications #1076

Merged
merged 1 commit into from
Jun 23, 2021

Conversation

Justin-Holmes
Copy link
Contributor

Supports the type field for Access applications.

Requires cloudflare/cloudflare-go#646 before this can be merged.

@Justin-Holmes Justin-Holmes marked this pull request as draft May 26, 2021 14:03
@jacobbednarz jacobbednarz added the workflow/pending-upstream-library Indicates an issue or PR requires changes from an upstream library. label Jun 15, 2021
@jacobbednarz jacobbednarz removed the workflow/pending-upstream-library Indicates an issue or PR requires changes from an upstream library. label Jun 23, 2021
@jacobbednarz jacobbednarz marked this pull request as ready for review June 23, 2021 03:38
@jacobbednarz
Copy link
Member

CI is green

TF_ACC=1 go test $(go list ./...) -v -run "^TestAccCloudflareAccessApplication" -timeout 120m -parallel 1
?   	github.com/cloudflare/terraform-provider-cloudflare	[no test files]
=== RUN   TestAccCloudflareAccessApplicationBasic
--- PASS: TestAccCloudflareAccessApplicationBasic (8.31s)
=== RUN   TestAccCloudflareAccessApplicationWithCORS
--- PASS: TestAccCloudflareAccessApplicationWithCORS (3.69s)
=== RUN   TestAccCloudflareAccessApplicationWithAutoRedirectToIdentity
--- PASS: TestAccCloudflareAccessApplicationWithAutoRedirectToIdentity (3.68s)
=== RUN   TestAccCloudflareAccessApplicationWithEnableBindingCookie
--- PASS: TestAccCloudflareAccessApplicationWithEnableBindingCookie (3.79s)
=== RUN   TestAccCloudflareAccessApplicationWithCustomDenyFields
--- PASS: TestAccCloudflareAccessApplicationWithCustomDenyFields (3.48s)
=== RUN   TestAccCloudflareAccessApplicationWithADefinedIdps
--- PASS: TestAccCloudflareAccessApplicationWithADefinedIdps (5.43s)
=== RUN   TestAccCloudflareAccessApplicationWithZoneID
--- PASS: TestAccCloudflareAccessApplicationWithZoneID (4.63s)
=== RUN   TestAccCloudflareAccessApplicationWithMissingCORSMethods
--- PASS: TestAccCloudflareAccessApplicationWithMissingCORSMethods (0.08s)
=== RUN   TestAccCloudflareAccessApplicationWithMissingCORSOrigins
--- PASS: TestAccCloudflareAccessApplicationWithMissingCORSOrigins (0.09s)
=== RUN   TestAccCloudflareAccessApplicationWithInvalidSessionDuration
--- PASS: TestAccCloudflareAccessApplicationWithInvalidSessionDuration (0.04s)
PASS
ok  	github.com/cloudflare/terraform-provider-cloudflare/cloudflare	33.986s
?   	github.com/cloudflare/terraform-provider-cloudflare/version	[no test files]

@jacobbednarz jacobbednarz merged commit 98ec8e4 into cloudflare:master Jun 23, 2021
@Justin-Holmes Justin-Holmes deleted the jholmes/app-types branch June 23, 2021 14:24
@@ -27,13 +27,11 @@ func resourceCloudflareAccessApplication() *schema.Resource {
"account_id": {
Type: schema.TypeString,
Optional: true,
Computed: true,
Copy link

@sboschman sboschman Jun 29, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this computed field removed? https://github.com/cloudflare/terraform-provider-cloudflare/blob/master/cloudflare/resource_cloudflare_access_mutual_tls_certificate.go#L28 also uses computed=true with a choice between account_id and zone_id.

Since upgrading to 2.21.0 to 2.22.0 I am unable to render cloudflare_access_application resources. It used to work without account_id and zone_id on the resource, as the account_id is supplied to the provider. This now results in Error: error creating Access resource: zone_id or account_id required. Supplying either account_id or zone_id explicitly to the resource throws the same error. If you define both account_id and zone_id at the same time it throws the expected errors: Error: "account_id": conflicts with zone_id and Error: "zone_id": conflicts with account_id

State (notice the empty account_id):

          "resources": [
            {
              "type": "cloudflare_access_application",
              "provider_name": "registry.terraform.io/cloudflare/cloudflare",
              "schema_version": 0,
              "values": {
                "account_id": "",
                "zone_id": null

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please open an issue following the issue template; this PR has already been merged.

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.

3 participants