-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added resource for bitbucket datacenter integration handling
- Loading branch information
1 parent
4d3a072
commit a98f8c7
Showing
9 changed files
with
342 additions
and
61 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
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,46 @@ | ||
--- | ||
# generated by https://github.com/hashicorp/terraform-plugin-docs | ||
page_title: "spacelift_bitbucket_datacenter_integration Resource - terraform-provider-spacelift" | ||
subcategory: "" | ||
description: |- | ||
spacelift_bitbucket_datacenter_integration represents details of a bitbucket datacenter integration | ||
--- | ||
|
||
# spacelift_bitbucket_datacenter_integration (Resource) | ||
|
||
`spacelift_bitbucket_datacenter_integration` represents details of a bitbucket datacenter integration | ||
|
||
## Example Usage | ||
|
||
```terraform | ||
resource "spacelift_bitbucket_datacenter_integration" "example" { | ||
api_host = "private://bitbucket_spacelift/bitbucket" | ||
user_facing_host = "https://bitbucket.spacelift.io/bitbucket" | ||
username = "bitbucket_user_name" | ||
access_token = "ABCD-MDQ3NzgxMzg3NzZ0VpOejJZmQfBBlpxxJuK9j1LLQG8g" | ||
} | ||
``` | ||
|
||
<!-- schema generated by tfplugindocs --> | ||
## Schema | ||
|
||
### Required | ||
|
||
- `access_token` (String, Sensitive) User access token from Bitbucket | ||
- `api_host` (String) The API host where requests will be sent | ||
- `user_facing_host` (String) User Facing Host which will be user for all user-facing URLs displayed in the Spacelift UI | ||
- `username` (String) Username which will be used to authenticate requests for cloning repositories | ||
|
||
### Read-Only | ||
|
||
- `id` (String) The ID of this resource. | ||
- `webhook_secret` (String, Sensitive) Secret for webhooks originating from Bitbucket repositories | ||
- `webhook_url` (String) URL for webhooks originating from Bitbucket repositories | ||
|
||
## Import | ||
|
||
Import is supported using the following syntax: | ||
|
||
```shell | ||
terraform import spacelift_bitbucket_datacenter_integration.example spacelift_bitbucket_datacenter_integration_id | ||
``` |
1 change: 1 addition & 0 deletions
1
examples/resources/spacelift_bitbucket_datacenter_integration/import.sh
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 @@ | ||
terraform import spacelift_bitbucket_datacenter_integration.example spacelift_bitbucket_datacenter_integration_id |
6 changes: 6 additions & 0 deletions
6
examples/resources/spacelift_bitbucket_datacenter_integration/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 |
---|---|---|
@@ -0,0 +1,6 @@ | ||
resource "spacelift_bitbucket_datacenter_integration" "example" { | ||
api_host = "private://bitbucket_spacelift/bitbucket" | ||
user_facing_host = "https://bitbucket.spacelift.io/bitbucket" | ||
username = "bitbucket_user_name" | ||
access_token = "ABCD-MDQ3NzgxMzg3NzZ0VpOejJZmQfBBlpxxJuK9j1LLQG8g" | ||
} |
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
28 changes: 28 additions & 0 deletions
28
spacelift/internal/structs/bitbucket_datacenter_integration.go
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,28 @@ | ||
package structs | ||
|
||
// BitbucketDatacenterIntegration represents the bitbucket datacenter integration data relevant to the provider. | ||
type BitbucketDatacenterIntegration struct { | ||
Id string `graphql:"id"` | ||
Name string `graphql:"name"` | ||
APIHost string `graphql:"apiHost"` | ||
Username string `graphql:"username"` | ||
UserFacingHost string `graphql:"userFacingHost"` | ||
WebhookSecret string `graphql:"webhookSecret"` | ||
WebhookURL string `graphql:"webhookURL"` | ||
} | ||
|
||
var BitbucketDatacenterFields = struct { | ||
UserFacingHost string | ||
Username string | ||
AccessToken string | ||
APIHost string | ||
WebhookSecret string | ||
WebhookURL string | ||
}{ | ||
UserFacingHost: "user_facing_host", | ||
Username: "username", | ||
AccessToken: "access_token", | ||
APIHost: "api_host", | ||
WebhookSecret: "webhook_secret", | ||
WebhookURL: "webhook_url", | ||
} |
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.