Skip to content

Commit

Permalink
Fix test data for 'access_group' acceptance tests
Browse files Browse the repository at this point in the history
  • Loading branch information
musa-cf committed Nov 15, 2024
1 parent 93f02c9 commit baeae4c
Show file tree
Hide file tree
Showing 9 changed files with 34 additions and 29 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ resource "cloudflare_zero_trust_access_group" "%[1]s" {
%[2]s_id = "%[3]s"
name = "%[1]s"

include {
include = [{
common_name = "common"
}
}]
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,12 @@ resource "cloudflare_zero_trust_access_group" "%[1]s" {
%[2]s_id = "%[3]s"
name = "%[1]s"

include {
common_names = ["common", "name"]
}
include = [
{
common_name = { common_name = "common" }
},
{
common_name = { common_name = "name" }
}
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ resource "cloudflare_zero_trust_access_group" "%[1]s" {
name = "%[1]s-updated"

include = [{
email = ["%[3]s"]
email_domain = ["example.com"]
email = "%[3]s"
email_domain = "example.com"
}]
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@ resource "cloudflare_zero_trust_list" "%[2]s" {
name = "%[2]s"
type = "EMAIL"
description = "Email list test for %[1]s"
items = [ "[email protected]" ]
items = [ { value = "[email protected]" } ]
}

resource "cloudflare_zero_trust_access_group" "%[1]s" {
%[3]s_id = "%[4]s"
name = "%[1]s"

include {
email_list = [cloudflare_zero_trust_list.%[2]s.id]
}
include = [{
email_list = { id = cloudflare_zero_trust_list.%[2]s.id }
}]
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ resource "cloudflare_zero_trust_access_group" "%[1]s" {
name = "%[1]s"

include = [{
email = ["%[3]s"]
email_domain = ["example.com"]
email = { email = "%[3]s" }
email_domain = { domain = "example.com" }
}]

exclude = [{
email = ["%[3]s"]
email = { email = "%[3]s" }
}]
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,16 @@ resource "cloudflare_zero_trust_access_group" "%[1]s" {
name = "%[1]s"

include = [{
email = ["%[3]s"]
email_domain = ["example.com"]
email = { email = "%[3]s" }
email_domain = { domain = "example.com" }
common_names = ["common", "name"]
}]

require = [{
email = ["%[3]s"]
email = { email = "%[3]s" }
}]

exclude = [{
email = ["%[3]s"]
email = { email = "%[3]s" }
}]
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ resource "cloudflare_zero_trust_access_group" "%[1]s" {
name = "%[1]s"

include = [{
email = ["%[3]s"]
email_domain = ["example.com"]
email = { email = "%[3]s" }
email_domain = { domain = "example.com" }
}]

require = [{
email = ["%[3]s"]
email = { email = "%[3]s" }
}]
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ resource "cloudflare_zero_trust_access_identity_provider" "%[2]s" {
name = "%[2]s"
type = "github"
config = {
client_id = "test"
client_id = "test"
client_secret = "secret"
}
}
Expand All @@ -13,10 +13,10 @@ resource "cloudflare_zero_trust_access_group" "%[2]s" {
name = "%[2]s"

include = [{
github = [{
github_organization = {
name = "%[3]s"
teams = ["%[4]s"]
team = "%[4]s"
identity_provider_id = cloudflare_zero_trust_access_identity_provider.%[2]s.id
}]
}
}]
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@ resource "cloudflare_zero_trust_access_group" "%[2]s" {
name = "%[2]s"

include = [{
any_valid_service_token = true
any_valid_service_token = {}
}]

require = [{
auth_context = [{
auth_context = {
id = "%[3]s"
ac_id = "%[4]s"
identity_provider_id = cloudflare_zero_trust_access_identity_provider.%[2]s.id
}
}
}]
}]
}

0 comments on commit baeae4c

Please sign in to comment.