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

Update pingone provider in acctests #349

Merged
merged 2 commits into from
Aug 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 14 additions & 15 deletions internal/acctest/acctest.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ func init() {
ExternalProviders = map[string]resource.ExternalProvider{
"pingone": {
Source: "pingidentity/pingone",
VersionConstraint: ">= 0.25, < 1.0",
VersionConstraint: ">= 1.0, < 2.0",
},
}
}
Expand Down Expand Up @@ -294,21 +294,20 @@ resource "pingone_environment" "%[1]s" {
name = "tf-testacc-dv-dynamic-%[1]s"
license_id = "%[2]s"

service {
type = "SSO"
}
service {
type = "DaVinci"
tags = %[6]s
}

dynamic "service" {
for_each = toset(var.services_%[1]s)

content {
type = service.key
services = concat([
for serviceType in var.services_%[1]s : {
type = serviceType
}
}
],
[
{
type = "SSO"
},
{
type = "DaVinci"
tags = %[6]s
}
])
}
`, resourceName, licenseID, username, adminEnvID, servicesString, daVinciTags)
}
Expand Down
2 changes: 1 addition & 1 deletion internal/acctest/models.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ func (tcp TestConnection) MakeConnectionHcl() (hcl string) {
}
hcl = fmt.Sprintf(`
resource "davinci_connection" "%[2]s" {
environment_id = resource.pingone_role_assignment_user.%[1]s.scope_environment_id
environment_id = resource.pingone_user_role_assignment.%[1]s.scope_environment_id
connector_id = "%[3]s"
name = "%[2]s"
%[4]s
Expand Down