-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #11 from Spotnana-Tech/typename
Provider Typename alterations
Showing
32 changed files
with
145 additions
and
142 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 3 additions & 3 deletions
6
docs/data-sources/snjumpcloud_apps.md → docs/data-sources/apps.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 3 additions & 3 deletions
6
docs/data-sources/snjumpcloud_usergroups.md → docs/data-sources/usergroups.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 3 additions & 3 deletions
6
docs/resources/snjumpcloud_usergroup.md → docs/resources/usergroup.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
data "jumpcloud_apps" "all_apps" {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
data "jumpcloud_usergroups" "all_usergroups" {} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
22 changes: 11 additions & 11 deletions
22
examples/snjumpcloud/app/main.tf → examples/jumpcloud/app/main.tf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,43 +1,43 @@ | ||
terraform { | ||
required_providers { | ||
snjumpcloud = { | ||
source = "github.com/Spotnana-Tech/snjumpcloud" | ||
jumpcloud = { | ||
source = "Spotnana-Tech/jumpcloud" | ||
} | ||
} | ||
} | ||
variable "api_key" { | ||
type = string | ||
sensitive = true | ||
} | ||
provider "snjumpcloud" { | ||
provider "jumpcloud" { | ||
api_key = var.api_key | ||
} | ||
|
||
# Create a few user groups | ||
resource "snjumpcloud_usergroup" "group1" { | ||
resource "jumpcloud_usergroup" "group1" { | ||
name = "Test-Terraform-Group1" | ||
description = "This group was created by Spotnana Terraform Provider!" | ||
} | ||
resource "snjumpcloud_usergroup" "group2" { | ||
resource "jumpcloud_usergroup" "group2" { | ||
name = "Test-Terraform-Group2" | ||
description = "This group was also created by Spotnana Terraform Provider!" | ||
} | ||
resource "snjumpcloud_usergroup" "group3" { | ||
resource "jumpcloud_usergroup" "group3" { | ||
name = "Test-Terraform-Group3" | ||
description = "This group was the 3rd created by Spotnana Terraform Provider!" | ||
} | ||
|
||
# Importing the app association via applicationID | ||
import { | ||
to = snjumpcloud_app.test_app | ||
to = jumpcloud_app.test_app | ||
id = "65bc1fdaf6fc2af5f541a4c3" | ||
} | ||
|
||
# Associate the user groups with the app | ||
resource "snjumpcloud_app" "test_app" { | ||
resource "jumpcloud_app" "test_app" { | ||
associated_groups = [ | ||
snjumpcloud_usergroup.group1.id, | ||
snjumpcloud_usergroup.group2.id, | ||
snjumpcloud_usergroup.group3.id | ||
jumpcloud_usergroup.group1.id, | ||
jumpcloud_usergroup.group2.id, | ||
jumpcloud_usergroup.group3.id | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
# | ||
# This example covers all use cases for the jumpcloud provider | ||
# | ||
terraform { | ||
required_providers { | ||
jumpcloud = { | ||
source = "Spotnana-Tech/jumpcloud" | ||
} | ||
} | ||
} | ||
variable "api_key" { | ||
type = string | ||
sensitive = true | ||
} | ||
provider "jumpcloud" { | ||
api_key = var.api_key | ||
} | ||
|
||
# Pulls all usergroups from the JumpCloud API | ||
data "jumpcloud_usergroups" "all_usergroups" {} | ||
|
||
# Pulls all apps from the JumpCloud API | ||
data "jumpcloud_apps" "all_apps" {} | ||
|
||
# Create a new usergroup | ||
resource "jumpcloud_usergroup" "new_usergroup" { | ||
name = "tf-provider-test-new_usergroup" | ||
description = "This is a new usergroup from the Terraform provider" | ||
} | ||
|
||
# Importing the app association via applicationID | ||
import { | ||
to = jumpcloud_app.test_app | ||
id = "65bc1fdaf6fc2af5f541a4c3" | ||
} | ||
|
||
# Associate the user groups with the app | ||
resource "jumpcloud_app" "test_app" { | ||
associated_groups = [ | ||
jumpcloud_usergroup.new_usergroup.id | ||
] | ||
} | ||
|
||
output "num_usergroups" { | ||
value = length(data.jumpcloud_usergroups.all_usergroups.usergroups) | ||
} | ||
|
||
output "num_apps" { | ||
value = length(data.jumpcloud_apps.all_apps.apps) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,14 @@ | ||
terraform { | ||
required_providers { | ||
snjumpcloud = { | ||
source = "github.com/Spotnana-Tech/snjumpcloud" | ||
jumpcloud = { | ||
source = "Spotnana-Tech/jumpcloud" | ||
} | ||
} | ||
} | ||
variable "api_key" { | ||
type = string | ||
sensitive = true | ||
} | ||
provider "snjumpcloud" { | ||
provider "jumpcloud" { | ||
api_key = var.api_key | ||
} |
File renamed without changes.
2 changes: 1 addition & 1 deletion
2
...les/resources/snjumpcloud_app/resource.tf → examples/resources/jumpcloud_app/resource.tf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
2 changes: 1 addition & 1 deletion
2
...sources/snjumpcloud_usergroup/resource.tf → ...resources/jumpcloud_usergroup/resource.tf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
resource "snjumpcloud_usergroup" "example" { | ||
resource "jumpcloud_usergroup" "example" { | ||
name = "example-name" | ||
description = "example description" | ||
} |
Oops, something went wrong.