diff --git a/README.md b/README.md index 6ef6b29..1f4517d 100644 --- a/README.md +++ b/README.md @@ -409,209 +409,6 @@ $ terraform import bitbucketserver_mail_server.mail mail.example.com --- -## Data Sources - - -### Application Properties - -Retrieve version information and other application properties. - -```hcl -data "bitbucketserver_application_properties" "main" {} -``` - -#### Attributes - -* `version` - Version of Bitbucket. -* `build_number` - Build number of the Bitbucket instance. -* `build_date` - Date the Bitbucket build was made, -* `display_name` - Name of the Bitbucket instance. - - -### Groups - -Retrieve a list of groups, optionally matching the supplied `filter`. - -```hcl -data "bitbucketserver_groups" "all" {} -``` - -* `filter` - Optional. If specified only group names containing the supplied string will be returned. - -#### Attributes - -* `groups` - List of maps containing a `name` key. - - -### Users - -Retrieve a list of users for a group,optionally matching the supplied `filter`. - -```hcl -data "bitbucketserver_group_users" "stash-users" { - group = "stash-users" -} -``` - -* `group` - Required. Group to find the users for. -* `filter` - Optional. If specified only group names containing the supplied string will be returned. - -#### Attributes - -* `users` - List of users containing `name`, `email_address`, `display_name` and `active` keys. - - -### Global Permissions - Groups - -Retrieve a list of groups that have been granted at least one global permission. - -```hcl -data "bitbucketserver_global_permissions_groups" "all" { } -``` - -* `filter` - Optional. If specified only group names containing the supplied string will be returned. - -#### Attributes - -* `groups` - List of maps containing `name` and `permission` keys. Available permissions are: `LICENSED_USER`, `PROJECT_CREATE`, `ADMIN`, `SYS_ADMIN` - - -### Global Permissions - Users - -Retrieve a list of users that have been granted at least one global permission. - -```hcl -data "bitbucketserver_global_permissions_users" "proj" { } -``` - -* `filter` - Optional. If specified only user names containing the supplied string will be returned. - -#### Attributes - -* `users` - List of maps containing `name`, `email_address`, `display_name`, `active` and `permission` keys. Available permissions are: `LICENSED_USER`, `PROJECT_CREATE`, `ADMIN`, `SYS_ADMIN` - - -### Project Permissions - Groups - -Retrieve a list of groups that have been granted at least one permission for the specified project. - -```hcl -data "bitbucketserver_project_permissions_groups" "proj" { - project = "TEST" -} -``` - -* `project` - Required. Project Key to lookup permissions for. -* `filter` - Optional. If specified only group names containing the supplied string will be returned. - -#### Attributes - -* `groups` - List of maps containing `name` and `permission` keys. Available permissions are: `PROJECT_READ`, `PROJECT_WRITE`, `PROJECT_ADMIN` - - -### Project Permissions - Users - -Retrieve a list of users that have been granted at least one permission for the specified project. - -```hcl -data "bitbucketserver_project_permissions_users" "proj" { - project = "TEST" -} -``` - -* `project` - Required. Project Key to lookup permissions for. -* `filter` - Optional. If specified only user names containing the supplied string will be returned. - -#### Attributes - -* `users` - List of maps containing `name`, `email_address`, `display_name`, `active` and `permission` keys. Available permissions are: `PROJECT_READ`, `PROJECT_WRITE`, `PROJECT_ADMIN` - - -### Repository Permissions - Groups - -Retrieve a list of groups that have been granted at least one permission for the specified repository. - -```hcl -data "bitbucketserver_project_permissions_groups" "proj" { - project = "TEST" - repository = "my-repo" -} -``` - -* `project` - Required. Project Key to lookup permissions for. -* `repository` - Required. Repository slug to lookup permissions for. -* `filter` - Optional. If specified only group names containing the supplied string will be returned. - -#### Attributes - -* `groups` - List of maps containing `name` and `permission` keys. Available permissions are: `REPO_READ`, `REPO_WRITE`, `REPO_ADMIN` - - -### Repository Permissions - Users - -Retrieve a list of users that have been granted at least one permission for the specified repository. - -```hcl -data "bitbucketserver_project_permissions_users" "proj" { - project = "TEST" - repository = "my-repo" -} -``` - -* `project` - Required. Project Key to lookup permissions for. -* `repository` - Required. Repository slug to lookup permissions for. -* `filter` - Optional. If specified only user names containing the supplied string will be returned. - -#### Attributes - -* `users` - List of maps containing `name`, `email_address`, `display_name`, `active` and `permission` keys. Available permissions are: `REPO_READ`, `REPO_WRITE`, `REPO_ADMIN` - - -### Plugin Details - -Retrieve details of an installed plugin. - -```hcl -data "bitbucketserver_plugin" "myplugin" { - key = "com.atlassian.upm.atlassian-universal-plugin-manager-plugin" -} -``` - -* `key` - Unique key of the plugin. - -#### Attributes - -* `enabled` - Set to `true` if the plugin is enabled. -* `enabled_by_default` - Set to `true` if the plugin is enabled by default (for system plugins). -* `version` - Installed version of the plugin. -* `name` - Name of the plugin. -* `description` - Plugin description. -* `user_installed` - Set to `true` if this is a user installed plugin vs a system bundled plugin. -* `optional` - Set to `true` if this is an optional plugin. -* `vendor.name` - Name of the vendor. -* `vendor.link` - Vendor homepage. -* `vendor.marketplace_link` - Plugin marketplace link. -* `applied_license.0.valid` - Is the license valid. true/false. -* `applied_license.0.evaluation` - Is the license an evaluation. true/false. -* `applied_license.0.nearly_expired` - Is the license nearly expired. true/false. -* `applied_license.0.maintenance_expiry_date` - Date of maintenance expiry. -* `applied_license.0.maintenance_expired` - Is the maintenance expired. true/false. -* `applied_license.0.license_type` - Type of license. -* `applied_license.0.expiry_date` - Expiry date of the license. -* `applied_license.0.raw_license` - The raw license information. -* `applied_license.0.renewable` - Is the license renewabl. true/false. -* `applied_license.0.organization_name` - Name of the organization the license is for. -* `applied_license.0.enterprise` - Is the license for enterprise. true/false. -* `applied_license.0.data_center` - Is the license for data center. true/false. -* `applied_license.0.subscription` - Is the license a subscription. true/false. -* `applied_license.0.active` - Is the license active. true/false. -* `applied_license.0.auto_renewal` - Is the license renewed automatically. true/false. -* `applied_license.0.upgradable` - Is the license able to be upgraded. true/false. -* `applied_license.0.crossgradeable` - Can the license be crossgraded. true/false. -* `applied_license.0.purchase_past_server_cutoff_date` - The purchase date past the server cutoff date. true/false. - ---- - ## Development Guide ### Requirements diff --git a/docusaurus/docs/data_global_permissions_groups.md b/docusaurus/docs/data_global_permissions_groups.md new file mode 100644 index 0000000..773463c --- /dev/null +++ b/docusaurus/docs/data_global_permissions_groups.md @@ -0,0 +1,36 @@ +--- +id: data_global_permissions_groups +title: bitbucketserver_global_permissions_groups +--- + +Retrieve a list of groups that have been granted at least one global permission. + +## Example Usage + +``` +data "bitbucketserver_global_permissions_groups" "all" { } +``` + +### Applying a Custom Filter + +Find any groups starting with `dev`. + +``` +data "bitbucketserver_global_permissions_groups" "dev-groups" { + filter = "dev" +} +``` + +## Argument Reference + +* `filter` - Optional. If specified only group names containing the supplied string will be returned. + +## Attribute Reference + +* `groups` - List of maps containing `name` and `permission` keys. Available permissions are: + + * `LICENSED_USER` + * `PROJECT_CREATE` + * `ADMIN` + * `SYS_ADMIN` + diff --git a/docusaurus/docs/data_global_permissions_users.md b/docusaurus/docs/data_global_permissions_users.md new file mode 100644 index 0000000..1cdc557 --- /dev/null +++ b/docusaurus/docs/data_global_permissions_users.md @@ -0,0 +1,36 @@ +--- +id: data_global_permissions_users +title: bitbucketserver_global_permissions_users +--- + +Retrieve a list of users that have been granted at least one global permission. + +## Example Usage + +``` +data "bitbucketserver_global_permissions_users" "all" { } +``` + +### Applying a Custom Filter + +Find any users starting with `malcolm`. + +``` +data "bitbucketserver_global_permissions_users" "malcolms" { + filter = "malcolm" +} +``` + +## Argument Reference + +* `filter` - Optional. If specified only user's names/emails containing the supplied string will be returned. + +## Attribute Reference + +* `users` - List of maps containing `name`, `email_address`, `display_name`, `active` and `permission` keys. Available permissions are: `LICENSED_USER`, `PROJECT_CREATE`, `ADMIN`, `SYS_ADMIN` + + * `LICENSED_USER` + * `PROJECT_CREATE` + * `ADMIN` + * `SYS_ADMIN` + diff --git a/docusaurus/docs/data_group_users.md b/docusaurus/docs/data_group_users.md new file mode 100644 index 0000000..5231207 --- /dev/null +++ b/docusaurus/docs/data_group_users.md @@ -0,0 +1,34 @@ +--- +id: data_group_users +title: bitbucketserver_group_users +--- + +Retrieve a list of users for a specific group. + +## Example Usage + +``` +data "bitbucketserver_group_users" "stash-users" { + group = "stash-users" +} +``` + +### Applying a Custom Filter + +Find any users starting with `malcolm`. + +``` +data "bitbucketserver_group_users" "malcolms" { + group = "stash-users" + filter = "malcolm" +} +``` + +## Argument Reference + +* `group` - Required. Group to find the users for. +* `filter` - Optional. If specified only users matching name/email for the supplied string will be returned. + +## Attribute Reference + +* `users` - List of maps containing `name`, `email_address`, `display_name` and `active` keys. diff --git a/docusaurus/docs/data_groups.md b/docusaurus/docs/data_groups.md new file mode 100644 index 0000000..848dfce --- /dev/null +++ b/docusaurus/docs/data_groups.md @@ -0,0 +1,30 @@ +--- +id: data_groups +title: bitbucketserver_groups +--- + +This data source allows you to retrieve a list of groups, optionally matching the supplied `filter`. + +## Example Usage + +``` +data "bitbucketserver_groups" "all" { } +``` + +### Applying a Custom Filter + +Find any groups starting with `dev`. + +``` +data "bitbucketserver_groups" "dev-groups" { + filter = "dev" +} +``` + +## Argument Reference + +* `filter` - Optional. If specified only group names containing the supplied string will be returned. + +## Attribute Reference + +* `groups` - List of maps containing `name` key. diff --git a/docusaurus/docs/data_plugin.md b/docusaurus/docs/data_plugin.md new file mode 100644 index 0000000..c22d6ef --- /dev/null +++ b/docusaurus/docs/data_plugin.md @@ -0,0 +1,47 @@ +--- +id: data_plugin +title: bitbucketserver_plugin +--- + +This data source allows you to retrieve installed plugin information and license details. + +## Example Usage + +``` +data "bitbucketserver_plugin" "my-plugin" { + key = "com.example.plugin-my-plugin" +} +``` + +* `key` - Unique key of the plugin. + +## Attribute Reference + +* `enabled` - Set to `true` if the plugin is enabled. +* `enabled_by_default` - Set to `true` if the plugin is enabled by default (for system plugins). +* `version` - Installed version of the plugin. +* `name` - Name of the plugin. +* `description` - Plugin description. +* `user_installed` - Set to `true` if this is a user installed plugin vs a system bundled plugin. +* `optional` - Set to `true` if this is an optional plugin. +* `vendor.name` - Name of the vendor. +* `vendor.link` - Vendor homepage. +* `vendor.marketplace_link` - Plugin marketplace link. +* `applied_license.0.valid` - Is the license valid. true/false. +* `applied_license.0.evaluation` - Is the license an evaluation. true/false. +* `applied_license.0.nearly_expired` - Is the license nearly expired. true/false. +* `applied_license.0.maintenance_expiry_date` - Date of maintenance expiry. +* `applied_license.0.maintenance_expired` - Is the maintenance expired. true/false. +* `applied_license.0.license_type` - Type of license. +* `applied_license.0.expiry_date` - Expiry date of the license. +* `applied_license.0.raw_license` - The raw license information. +* `applied_license.0.renewable` - Is the license renewabl. true/false. +* `applied_license.0.organization_name` - Name of the organization the license is for. +* `applied_license.0.enterprise` - Is the license for enterprise. true/false. +* `applied_license.0.data_center` - Is the license for data center. true/false. +* `applied_license.0.subscription` - Is the license a subscription. true/false. +* `applied_license.0.active` - Is the license active. true/false. +* `applied_license.0.auto_renewal` - Is the license renewed automatically. true/false. +* `applied_license.0.upgradable` - Is the license able to be upgraded. true/false. +* `applied_license.0.crossgradeable` - Can the license be crossgraded. true/false. +* `applied_license.0.purchase_past_server_cutoff_date` - The purchase date past the server cutoff date. true/false. diff --git a/docusaurus/docs/data_project_permissions_groups.md b/docusaurus/docs/data_project_permissions_groups.md new file mode 100644 index 0000000..1c743d1 --- /dev/null +++ b/docusaurus/docs/data_project_permissions_groups.md @@ -0,0 +1,38 @@ +--- +id: data_project_permissions_groups +title: bitbucketserver_project_permissions_groups +--- + +Retrieve a list of groups that have been granted at least one project level permission to the specified project. + +## Example Usage + +``` +data "bitbucketserver_project_permissions_groups" "test-groups" { + project = "TEST" +} +``` + +### Applying a Custom Filter + +Find project groups starting with `dev` with project permissions. + +``` +data "bitbucketserver_project_permissions_groups" "dev-groups" { + project = "TEST" + filter = "dev" +} +``` + +## Argument Reference + +* `project` - Required. Project Key to lookup permissions for. +* `filter` - Optional. If specified only group names containing the supplied string will be returned. + +## Attribute Reference + +* `groups` - List of maps containing `name` and `permission` keys. Available permissions are: + + * `PROJECT_READ` + * `PROJECT_WRITE` + * `PROJECT_ADMIN` diff --git a/docusaurus/docs/data_project_permissions_users.md b/docusaurus/docs/data_project_permissions_users.md new file mode 100644 index 0000000..9adfee3 --- /dev/null +++ b/docusaurus/docs/data_project_permissions_users.md @@ -0,0 +1,38 @@ +--- +id: data_project_permissions_users +title: bitbucketserver_project_permissions_users +--- + +Retrieve a list of users that have been granted at least one permission for the specified project. + +## Example Usage + +``` +data "bitbucketserver_project_permissions_users" "test-users" { + project = "TEST" +} +``` + +### Applying a Custom Filter + +Find project users starting with `malcolm`. + +``` +data "bitbucketserver_project_permissions_users" "malcolms" { + project = "TEST" + filter = "malcolm" +} +``` + +## Argument Reference + +* `project` - Required. Project Key to lookup permissions for. +* `filter` - Optional. If specified only user's names/emails containing the supplied string will be returned. + +## Attribute Reference + +* `users` - List of maps containing `name`, `email_address`, `display_name`, `active` and `permission` keys. Available permissions are: + + * `PROJECT_READ` + * `PROJECT_WRITE` + * `PROJECT_ADMIN` diff --git a/docusaurus/docs/data_repository_permissions_groups.md b/docusaurus/docs/data_repository_permissions_groups.md new file mode 100644 index 0000000..5ed2790 --- /dev/null +++ b/docusaurus/docs/data_repository_permissions_groups.md @@ -0,0 +1,41 @@ +--- +id: data_repository_permissions_groups +title: bitbucketserver_repository_permissions_groups +--- + +Retrieve a list of groups that have been granted at least one repository level permission to the specified repo. + +## Example Usage + +``` +data "bitbucketserver_repository_permissions_groups" "my-repo-groups" { + project = "TEST" + repository = "my-repo" +} +``` + +### Applying a Custom Filter + +Find project groups starting with `dev` with project permissions. + +``` +data "bitbucketserver_repository_permissions_groups" "my-repo-dev-groups" { + project = "TEST" + repository = "my-repo" + filter = "dev" +} +``` + +## Argument Reference + +* `project` - Required. Project Key to lookup permissions for. +* `repository` - Required. Repository slug to lookup permissions for. +* `filter` - Optional. If specified only group names containing the supplied string will be returned. + +## Attribute Reference + +* `groups` - List of maps containing `name` and `permission` keys. Available permissions are: + + * `REPO_READ` + * `REPO_WRITE` + * `REPO_ADMIN` diff --git a/docusaurus/docs/data_repository_permissions_users.md b/docusaurus/docs/data_repository_permissions_users.md new file mode 100644 index 0000000..3479b71 --- /dev/null +++ b/docusaurus/docs/data_repository_permissions_users.md @@ -0,0 +1,41 @@ +--- +id: data_repository_permissions_users +title: bitbucketserver_repository_permissions_users +--- + +Retrieve a list of users that have been granted at least one permission for the specified repository. + +## Example Usage + +``` +data "bitbucketserver_repository_permissions_users" "my-repo-users" { + project = "TEST" + repository = "my-repo" +} +``` + +### Applying a Custom Filter + +Find repository users starting with `malcolm`. + +``` +data "bitbucketserver_repository_permissions_users" "my-repo-malcolms" { + project = "TEST" + repository = "my-repo" + filter = "malcolm" +} +``` + +## Argument Reference + +* `project` - Required. Project Key to lookup permissions for. +* `repository` - Required. Repository slug to lookup permissions for. +* `filter` - Optional. If specified only user's names/emails containing the supplied string will be returned. + +## Attribute Reference + +* `users` - List of maps containing `name`, `email_address`, `display_name`, `active` and `permission` keys. Available permissions are: + + * `REPO_READ` + * `REPO_WRITE` + * `REPO_ADMIN` diff --git a/docusaurus/website/i18n/en.json b/docusaurus/website/i18n/en.json index 768eb4e..314f651 100644 --- a/docusaurus/website/i18n/en.json +++ b/docusaurus/website/i18n/en.json @@ -7,6 +7,33 @@ "data_application_properties": { "title": "bitbucketserver_application_properties" }, + "data_global_permissions_groups": { + "title": "bitbucketserver_global_permissions_groups" + }, + "data_global_permissions_users": { + "title": "bitbucketserver_global_permissions_users" + }, + "data_group_users": { + "title": "bitbucketserver_group_users" + }, + "data_groups": { + "title": "bitbucketserver_groups" + }, + "data_plugin": { + "title": "bitbucketserver_plugin" + }, + "data_project_permissions_groups": { + "title": "bitbucketserver_project_permissions_groups" + }, + "data_project_permissions_users": { + "title": "bitbucketserver_project_permissions_users" + }, + "data_repository_permissions_groups": { + "title": "bitbucketserver_repository_permissions_groups" + }, + "data_repository_permissions_users": { + "title": "bitbucketserver_repository_permissions_users" + }, "provider": { "title": "Getting Started" } @@ -14,7 +41,8 @@ "links": {}, "categories": { "Bitbucket Server": "Bitbucket Server", - "Data Resources": "Data Resources" + "Data Sources": "Data Sources", + "Resources": "Resources" } }, "pages-strings": { diff --git a/docusaurus/website/sidebars.json b/docusaurus/website/sidebars.json index 9c572c2..3bdf04d 100755 --- a/docusaurus/website/sidebars.json +++ b/docusaurus/website/sidebars.json @@ -3,8 +3,20 @@ "Bitbucket Server": [ "provider" ], - "Data Resources": [ - "data_application_properties" + "Data Sources": [ + "data_application_properties", + "data_global_permissions_groups", + "data_global_permissions_users", + "data_group_users", + "data_groups", + "data_plugin", + "data_project_permissions_groups", + "data_project_permissions_users", + "data_repository_permissions_groups", + "data_repository_permissions_users" + ], + "Resources": [ + ] } } diff --git a/docusaurus/website/siteConfig.js b/docusaurus/website/siteConfig.js index 0ecb9a5..2f0d779 100644 --- a/docusaurus/website/siteConfig.js +++ b/docusaurus/website/siteConfig.js @@ -49,6 +49,7 @@ const siteConfig = { // No .html extensions for paths. cleanUrl: true, + docsSideNavCollapsible: true, }; module.exports = siteConfig; diff --git a/docusaurus/website/static/css/custom.css b/docusaurus/website/static/css/custom.css index 237bf33..800f53e 100755 --- a/docusaurus/website/static/css/custom.css +++ b/docusaurus/website/static/css/custom.css @@ -10,11 +10,20 @@ } @media only screen and (min-width: 1400px) { + .separateOnPageNav .wrapper, .separateOnPageNav .headerWrapper.wrapper { + max-width: 1600px; + } } @media only screen and (min-width: 1500px) { } +@media only screen and (min-width: 1700px) { + .separateOnPageNav .wrapper, .separateOnPageNav .headerWrapper.wrapper { + max-width: 1800px; + } +} + @media only screen and (min-width: 1024px) { .separateOnPageNav .docsNavContainer { flex: 0 0 300px; @@ -23,4 +32,8 @@ body { font-family: "Lato", "sans-serif"; +} + +.toc .toggleNav ul li a { + font-size: 13px; } \ No newline at end of file