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

AUTH-5974 added saml_attribute_transform_jsonata for saas apps #3187

Merged
merged 4 commits into from
Mar 28, 2024

Conversation

russellkerns
Copy link
Contributor

No description provided.

Copy link
Contributor

github-actions bot commented Mar 14, 2024

changelog detected ✅

@jacobbednarz jacobbednarz added the workflow/pending-upstream-library Indicates an issue or PR requires changes from an upstream library. label Mar 15, 2024
@jacobbednarz jacobbednarz removed the workflow/pending-upstream-library Indicates an issue or PR requires changes from an upstream library. label Mar 21, 2024
@@ -771,6 +773,8 @@ resource "cloudflare_access_application" "%[1]s" {
name_id_format = "email"
default_relay_state = "https://saas-app.example"
name_id_transform_jsonata = "$substringBefore(email, '@') & '+sandbox@' & $substringAfter(email, '@')"
saml_attribute_transform_jsonata = "$ ~>| groups | {'group_name': name} |"
Copy link
Member

Choose a reason for hiding this comment

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

this is throwing invalid expression error atm

TF_ACC=1 go test ./internal/sdkv2provider -v -run "^TestAccCloudflareAccessApplication_WithSAMLSaas" -count 1 -timeout 120m -parallel 1
=== RUN   TestAccCloudflareAccessApplication_WithSAMLSaas
    resource_cloudflare_access_application_test.go:172: Step 1/1 error: Error running apply: exit status 1
        
        Error: error creating Access Application for accounts "f037e56e89293a057740de681ac9abbe": error from makeRequest: access.api.error.invalid_request: saml_attribute_transform_jsonata jsonata expression is invalid (12130)
        
          with cloudflare_access_application.apdysxmvfy,
          on terraform_plugin_test.tf line 12, in resource "cloudflare_access_application" "apdysxmvfy":
          12: resource "cloudflare_access_application" "apdysxmvfy" {
        
--- FAIL: TestAccCloudflareAccessApplication_WithSAMLSaas (3.80s)
=== RUN   TestAccCloudflareAccessApplication_WithSAMLSaas_Import
=== PAUSE TestAccCloudflareAccessApplication_WithSAMLSaas_Import
=== CONT  TestAccCloudflareAccessApplication_WithSAMLSaas_Import
    resource_cloudflare_access_application_test.go:241: Step 1/2 error: Error running apply: exit status 1
        
        Error: error creating Access Application for accounts "f037e56e89293a057740de681ac9abbe": error from makeRequest: access.api.error.invalid_request: saml_attribute_transform_jsonata jsonata expression is invalid (12130)
        
          with cloudflare_access_application.dzfcrwdsqd,
          on terraform_plugin_test.tf line 12, in resource "cloudflare_access_application" "dzfcrwdsqd":
          12: resource "cloudflare_access_application" "dzfcrwdsqd" {
        
--- FAIL: TestAccCloudflareAccessApplication_WithSAMLSaas_Import (3.50s)
FAIL
FAIL	github.com/cloudflare/terraform-provider-cloudflare/internal/sdkv2provider	8.441s
FAIL
make: *** [testacc] Error 1

@jacobbednarz
Copy link
Member

acceptance tests all passing

TF_ACC=1 go test ./internal/sdkv2provider -v -run "^TestAccCloudflareAccessApplication_" -count 1 -timeout 120m -parallel 1
=== RUN   TestAccCloudflareAccessApplication_BasicZone
--- PASS: TestAccCloudflareAccessApplication_BasicZone (14.36s)
=== RUN   TestAccCloudflareAccessApplication_BasicAccount
--- PASS: TestAccCloudflareAccessApplication_BasicAccount (7.60s)
=== RUN   TestAccCloudflareAccessApplication_WithCORS
--- PASS: TestAccCloudflareAccessApplication_WithCORS (7.86s)
=== RUN   TestAccCloudflareAccessApplication_WithSAMLSaas
--- PASS: TestAccCloudflareAccessApplication_WithSAMLSaas (8.27s)
=== RUN   TestAccCloudflareAccessApplication_WithSAMLSaas_Import
=== PAUSE TestAccCloudflareAccessApplication_WithSAMLSaas_Import
=== RUN   TestAccCloudflareAccessApplication_WithOIDCSaas
--- PASS: TestAccCloudflareAccessApplication_WithOIDCSaas (8.23s)
=== RUN   TestAccCloudflareAccessApplication_WithOIDCSaas_Import
=== PAUSE TestAccCloudflareAccessApplication_WithOIDCSaas_Import
=== RUN   TestAccCloudflareAccessApplication_WithAutoRedirectToIdentity
--- PASS: TestAccCloudflareAccessApplication_WithAutoRedirectToIdentity (10.32s)
=== RUN   TestAccCloudflareAccessApplication_WithEnableBindingCookie
--- PASS: TestAccCloudflareAccessApplication_WithEnableBindingCookie (7.71s)
=== RUN   TestAccCloudflareAccessApplication_WithCustomDenyFields
--- PASS: TestAccCloudflareAccessApplication_WithCustomDenyFields (8.19s)
=== RUN   TestAccCloudflareAccessApplication_WithADefinedIdps
--- PASS: TestAccCloudflareAccessApplication_WithADefinedIdps (12.87s)
=== RUN   TestAccCloudflareAccessApplication_WithMultipleIdpsReordered
--- PASS: TestAccCloudflareAccessApplication_WithMultipleIdpsReordered (16.52s)
=== RUN   TestAccCloudflareAccessApplication_WithHttpOnlyCookieAttribute
--- PASS: TestAccCloudflareAccessApplication_WithHttpOnlyCookieAttribute (15.90s)
=== RUN   TestAccCloudflareAccessApplication_WithHTTPOnlyCookieAttributeSetToFalse
--- PASS: TestAccCloudflareAccessApplication_WithHTTPOnlyCookieAttributeSetToFalse (8.21s)
=== RUN   TestAccCloudflareAccessApplication_WithSameSiteCookieAttribute
--- PASS: TestAccCloudflareAccessApplication_WithSameSiteCookieAttribute (9.24s)
=== RUN   TestAccCloudflareAccessApplication_WithLogoURL
--- PASS: TestAccCloudflareAccessApplication_WithLogoURL (8.04s)
=== RUN   TestAccCloudflareAccessApplication_WithSkipInterstitial
--- PASS: TestAccCloudflareAccessApplication_WithSkipInterstitial (12.10s)
=== RUN   TestAccCloudflareAccessApplication_WithAppLauncherVisible
--- PASS: TestAccCloudflareAccessApplication_WithAppLauncherVisible (9.17s)
=== RUN   TestAccCloudflareAccessApplication_WithSelfHostedDomains
--- PASS: TestAccCloudflareAccessApplication_WithSelfHostedDomains (7.81s)
=== RUN   TestAccCloudflareAccessApplication_WithDefinedTags
--- PASS: TestAccCloudflareAccessApplication_WithDefinedTags (9.21s)
=== RUN   TestAccCloudflareAccessApplication_WithAppLauncherCustomization
--- PASS: TestAccCloudflareAccessApplication_WithAppLauncherCustomization (7.53s)
=== CONT  TestAccCloudflareAccessApplication_WithSAMLSaas_Import
--- PASS: TestAccCloudflareAccessApplication_WithSAMLSaas_Import (12.80s)
=== CONT  TestAccCloudflareAccessApplication_WithOIDCSaas_Import
--- PASS: TestAccCloudflareAccessApplication_WithOIDCSaas_Import (12.58s)
PASS
ok  	github.com/cloudflare/terraform-provider-cloudflare/internal/sdkv2provider	215.497s

@jacobbednarz jacobbednarz merged commit 509088f into cloudflare:master Mar 28, 2024
9 checks passed
@github-actions github-actions bot added this to the v4.28.0 milestone Mar 28, 2024
github-actions bot pushed a commit that referenced this pull request Mar 28, 2024
Copy link
Contributor

This functionality has been released in v4.28.0 of the Terraform Cloudflare Provider.

Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you!

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 28, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants