-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Migrate Username credential to Plugin Framework (#145)
* Migrate Username credential to Plugin Framework * Update generated documentation
- Loading branch information
Showing
12 changed files
with
429 additions
and
245 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,39 @@ | ||
# jenkins_credential_username Data Source | ||
--- | ||
# generated by https://github.com/hashicorp/terraform-plugin-docs | ||
page_title: "jenkins_credential_username Data Source - terraform-provider-jenkins" | ||
subcategory: "" | ||
description: |- | ||
Get the attributes of a username credential within Jenkins. | ||
--- | ||
|
||
# jenkins_credential_username (Data Source) | ||
|
||
Get the attributes of a username credential within Jenkins. | ||
|
||
## Example Usage | ||
|
||
```hcl | ||
```terraform | ||
data "jenkins_credential_username" "example" { | ||
name = "job-name" | ||
name = "name" | ||
folder = jenkins_folder.example.id | ||
} | ||
``` | ||
|
||
## Argument Reference | ||
<!-- schema generated by tfplugindocs --> | ||
## Schema | ||
|
||
### Required | ||
|
||
The following arguments are supported: | ||
- `name` (String) The name of the resource being read. | ||
|
||
* `name` - (Required) The name of the resource being read. | ||
* `domain` - (Optional) The domain store to place the credentials into. If not set will default to the global credentials store. | ||
* `folder` - (Optional) The folder namespace containing this resource. | ||
### Optional | ||
|
||
## Attribute Reference | ||
- `domain` (String) The domain store containing this resource. | ||
- `folder` (String) The folder namespace containing this resource. | ||
|
||
In addition to all arguments above, the following attributes are exported: | ||
### Read-Only | ||
|
||
* `id` - The full canonical job path, E.G. `/job/job-name`. | ||
* `description` - A human readable description of the credentials being stored. | ||
* `scope` - The visibility of the credentials to Jenkins agents. This must be set to either "GLOBAL" or "SYSTEM". | ||
* `username` - The username to be associated with the credentials. | ||
- `description` (String) A human readable description of the credentials being stored. | ||
- `id` (String) The full canonical job path, e.g. `/job/job-name` | ||
- `scope` (String) The visibility of the credentials to Jenkins agents. This will be either "GLOBAL" or "SYSTEM". | ||
- `username` (String) The username associated with the credentials. |
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,31 +1,45 @@ | ||
# jenkins_credential_username Resource | ||
--- | ||
# generated by https://github.com/hashicorp/terraform-plugin-docs | ||
page_title: "jenkins_credential_username Resource - terraform-provider-jenkins" | ||
subcategory: "" | ||
description: |- | ||
Manages a username credential within Jenkins. This username may then be referenced within jobs that are created. | ||
~> The "password" property may leave plain-text passwords in your state file. If using the property to manage the password in Terraform, ensure that your state file is properly secured and encrypted at rest. | ||
--- | ||
|
||
# jenkins_credential_username (Resource) | ||
|
||
Manages a username credential within Jenkins. This username may then be referenced within jobs that are created. | ||
|
||
~> The "password" property may leave plain-text passwords in your state file. If using the property to manage the password in Terraform, ensure that your state file is properly secured and encrypted at rest. | ||
|
||
## Example Usage | ||
|
||
```hcl | ||
```terraform | ||
resource "jenkins_credential_username" "example" { | ||
name = "example-username" | ||
name = "name" | ||
folder = jenkins_folder.example.id | ||
username = "example" | ||
password = "super-secret" | ||
} | ||
``` | ||
|
||
## Argument Reference | ||
<!-- schema generated by tfplugindocs --> | ||
## Schema | ||
|
||
### Required | ||
|
||
- `name` (String) The name of the credentials being created. This maps to the ID property within Jenkins, and cannot be changed once set. | ||
- `username` (String) The username to be associated with the credentials. | ||
|
||
The following arguments are supported: | ||
### Optional | ||
|
||
* `name` - (Required) The name of the credentials being created. This maps to the ID property within Jenkins, and cannot be changed once set. | ||
* `domain` - (Optional) The domain store to place the credentials into. If not set will default to the global credentials store. | ||
* `folder` - (Optional) The folder namespace to store the credentials in. If not set will default to global Jenkins credentials. | ||
* `scope` - (Optional) The visibility of the credentials to Jenkins agents. This must be set to either "GLOBAL" or "SYSTEM". If not set will default to "GLOBAL". | ||
* `description` - (Optional) A human readable description of the credentials being stored. | ||
* `username` - (Required) The username to be associated with the credentials. | ||
* `password` - (Optional) The password to be associated with the credentials. If empty then the password property will become unmanaged and expected to be set manually within Jenkins. If set then the password will be updated only upon changes -- if the password is set manually within Jenkins then it will not reconcile this drift until the next time the password property is changed. | ||
- `description` (String) A human readable description of the credentials being stored. | ||
- `domain` (String) The domain store to place the credentials into. If not set will default to the global credentials store. | ||
- `folder` (String) The folder namespace to store the credentials in. If not set will default to global Jenkins credentials. | ||
- `password` (String, Sensitive) The password to be associated with the credentials. If empty then the password property will become unmanaged and expected to be set manually within Jenkins. If set then the password will be updated only upon changes -- if the password is set manually within Jenkins then it will not reconcile this drift until the next time the password property is changed. | ||
|
||
## Attribute Reference | ||
### Read-Only | ||
|
||
All arguments above are exported. | ||
- `id` (String) The full canonical job path, e.g. `/job/job-name` | ||
- `scope` (String) The visibility of the credentials to Jenkins agents. This must be set to either "GLOBAL" or "SYSTEM". If not set will default to "GLOBAL". |
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,6 @@ | ||
resource "jenkins_credential_username" "example" { | ||
name = "name" | ||
folder = jenkins_folder.example.id | ||
username = "example" | ||
password = "super-secret" | ||
} |
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
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
Oops, something went wrong.