From af8a9f8123df7463c75e9b0fe76f0668caadb840 Mon Sep 17 00:00:00 2001 From: Gary Marjoram Date: Tue, 10 Jan 2023 19:01:17 +0000 Subject: [PATCH 1/2] Git PAT support --- ...ource_ibm_cd_toolchain_tool_bitbucketgit.go | 4 ++-- ...ibm_cd_toolchain_tool_githubconsolidated.go | 15 +++++++++++++-- ...data_source_ibm_cd_toolchain_tool_gitlab.go | 15 +++++++++++++-- ...a_source_ibm_cd_toolchain_tool_hostedgit.go | 15 +++++++++++++-- ...ource_ibm_cd_toolchain_tool_bitbucketgit.go | 6 +++--- ...ibm_cd_toolchain_tool_githubconsolidated.go | 18 +++++++++++++++--- .../resource_ibm_cd_toolchain_tool_gitlab.go | 18 +++++++++++++++--- ...resource_ibm_cd_toolchain_tool_hostedgit.go | 18 +++++++++++++++--- ...d_toolchain_tool_bitbucketgit.html.markdown | 2 +- ...chain_tool_githubconsolidated.html.markdown | 5 ++++- .../d/cd_toolchain_tool_gitlab.html.markdown | 5 ++++- .../cd_toolchain_tool_hostedgit.html.markdown | 5 ++++- ...d_toolchain_tool_bitbucketgit.html.markdown | 4 ++-- ...chain_tool_githubconsolidated.html.markdown | 9 +++++++-- .../r/cd_toolchain_tool_gitlab.html.markdown | 9 +++++++-- .../cd_toolchain_tool_hostedgit.html.markdown | 9 +++++++-- 16 files changed, 125 insertions(+), 32 deletions(-) diff --git a/ibm/service/cdtoolchain/data_source_ibm_cd_toolchain_tool_bitbucketgit.go b/ibm/service/cdtoolchain/data_source_ibm_cd_toolchain_tool_bitbucketgit.go index b924e501a59..431cc69911f 100644 --- a/ibm/service/cdtoolchain/data_source_ibm_cd_toolchain_tool_bitbucketgit.go +++ b/ibm/service/cdtoolchain/data_source_ibm_cd_toolchain_tool_bitbucketgit.go @@ -1,4 +1,4 @@ -// Copyright IBM Corp. 2022 All Rights Reserved. +// Copyright IBM Corp. 2023 All Rights Reserved. // Licensed under the Mozilla Public License v2.0 package cdtoolchain @@ -129,7 +129,7 @@ func DataSourceIBMCdToolchainToolBitbucketgit() *schema.Resource { "type": &schema.Schema{ Type: schema.TypeString, Computed: true, - Description: "The operation that should be performed to initialize the new tool integration. Use 'new' to create a new git repository, 'clone' to clone an existing repository into a new git repository, 'fork' to fork an existing git repository, or 'link' to link to an existing git repository.", + Description: "The operation that should be performed to initialize the new tool integration. Use 'new' or 'new_if_not_exists' to create a new git repository, 'clone' or 'clone_if_not_exists' to clone an existing repository into a new git repository, 'fork' or 'fork_if_not_exists' to fork an existing git repository, or 'link' to link to an existing git repository. If you attempt to apply a resource with type 'new', 'clone', or 'fork' when the target repo already exists, the attempt will fail. If you apply a resource with type 'new_if_not_exists`, 'clone_if_not_exists', or 'fork_if_not_exists' when the target repo already exists, the existing repo will be used as-is.", }, "private_repo": &schema.Schema{ Type: schema.TypeBool, diff --git a/ibm/service/cdtoolchain/data_source_ibm_cd_toolchain_tool_githubconsolidated.go b/ibm/service/cdtoolchain/data_source_ibm_cd_toolchain_tool_githubconsolidated.go index ee462cbe04b..8535fb0d66d 100644 --- a/ibm/service/cdtoolchain/data_source_ibm_cd_toolchain_tool_githubconsolidated.go +++ b/ibm/service/cdtoolchain/data_source_ibm_cd_toolchain_tool_githubconsolidated.go @@ -1,4 +1,4 @@ -// Copyright IBM Corp. 2022 All Rights Reserved. +// Copyright IBM Corp. 2023 All Rights Reserved. // Licensed under the Mozilla Public License v2.0 package cdtoolchain @@ -129,7 +129,7 @@ func DataSourceIBMCdToolchainToolGithubconsolidated() *schema.Resource { "type": &schema.Schema{ Type: schema.TypeString, Computed: true, - Description: "The operation that should be performed to initialize the new tool integration. Use 'new' to create a new git repository, 'clone' to clone an existing repository into a new git repository, 'fork' to fork an existing git repository, or 'link' to link to an existing git repository.", + Description: "The operation that should be performed to initialize the new tool integration. Use 'new' or 'new_if_not_exists' to create a new git repository, 'clone' or 'clone_if_not_exists' to clone an existing repository into a new git repository, 'fork' or 'fork_if_not_exists' to fork an existing git repository, or 'link' to link to an existing git repository. If you attempt to apply a resource with type 'new', 'clone', or 'fork' when the target repo already exists, the attempt will fail. If you apply a resource with type 'new_if_not_exists`, 'clone_if_not_exists', or 'fork_if_not_exists' when the target repo already exists, the existing repo will be used as-is.", }, "private_repo": &schema.Schema{ Type: schema.TypeBool, @@ -156,6 +156,17 @@ func DataSourceIBMCdToolchainToolGithubconsolidated() *schema.Resource { Computed: true, Description: "The ID of the GitHub repository.", }, + "auth_type": &schema.Schema{ + Type: schema.TypeString, + Computed: true, + Description: "Select the method of authentication that will be used to access the git provider.", + }, + "api_token": &schema.Schema{ + Type: schema.TypeString, + Computed: true, + Sensitive: true, + Description: "Personal Access Token.", + }, "toolchain_issues_enabled": &schema.Schema{ Type: schema.TypeBool, Computed: true, diff --git a/ibm/service/cdtoolchain/data_source_ibm_cd_toolchain_tool_gitlab.go b/ibm/service/cdtoolchain/data_source_ibm_cd_toolchain_tool_gitlab.go index e50a283dd2b..8e33b4a0b8d 100644 --- a/ibm/service/cdtoolchain/data_source_ibm_cd_toolchain_tool_gitlab.go +++ b/ibm/service/cdtoolchain/data_source_ibm_cd_toolchain_tool_gitlab.go @@ -1,4 +1,4 @@ -// Copyright IBM Corp. 2022 All Rights Reserved. +// Copyright IBM Corp. 2023 All Rights Reserved. // Licensed under the Mozilla Public License v2.0 package cdtoolchain @@ -129,7 +129,7 @@ func DataSourceIBMCdToolchainToolGitlab() *schema.Resource { "type": &schema.Schema{ Type: schema.TypeString, Computed: true, - Description: "The operation that should be performed to initialize the new tool integration. Use 'new' to create a new git repository, 'clone' to clone an existing repository into a new git repository, 'fork' to fork an existing git repository, or 'link' to link to an existing git repository.", + Description: "The operation that should be performed to initialize the new tool integration. Use 'new' or 'new_if_not_exists' to create a new git repository, 'clone' or 'clone_if_not_exists' to clone an existing repository into a new git repository, 'fork' or 'fork_if_not_exists' to fork an existing git repository, or 'link' to link to an existing git repository. If you attempt to apply a resource with type 'new', 'clone', or 'fork' when the target repo already exists, the attempt will fail. If you apply a resource with type 'new_if_not_exists`, 'clone_if_not_exists', or 'fork_if_not_exists' when the target repo already exists, the existing repo will be used as-is.", }, "private_repo": &schema.Schema{ Type: schema.TypeBool, @@ -151,6 +151,17 @@ func DataSourceIBMCdToolchainToolGitlab() *schema.Resource { Computed: true, Description: "The ID of the GitLab project.", }, + "auth_type": &schema.Schema{ + Type: schema.TypeString, + Computed: true, + Description: "Select the method of authentication that will be used to access the git provider.", + }, + "api_token": &schema.Schema{ + Type: schema.TypeString, + Computed: true, + Sensitive: true, + Description: "Personal Access Token.", + }, "toolchain_issues_enabled": &schema.Schema{ Type: schema.TypeBool, Computed: true, diff --git a/ibm/service/cdtoolchain/data_source_ibm_cd_toolchain_tool_hostedgit.go b/ibm/service/cdtoolchain/data_source_ibm_cd_toolchain_tool_hostedgit.go index f91eec59ef2..e733e4cdd62 100644 --- a/ibm/service/cdtoolchain/data_source_ibm_cd_toolchain_tool_hostedgit.go +++ b/ibm/service/cdtoolchain/data_source_ibm_cd_toolchain_tool_hostedgit.go @@ -1,4 +1,4 @@ -// Copyright IBM Corp. 2022 All Rights Reserved. +// Copyright IBM Corp. 2023 All Rights Reserved. // Licensed under the Mozilla Public License v2.0 package cdtoolchain @@ -129,7 +129,7 @@ func DataSourceIBMCdToolchainToolHostedgit() *schema.Resource { "type": &schema.Schema{ Type: schema.TypeString, Computed: true, - Description: "The operation that should be performed to initialize the new tool integration. Use 'new' to create a new git repository, 'clone' to clone an existing repository into a new git repository, 'fork' to fork an existing git repository, or 'link' to link to an existing git repository.", + Description: "The operation that should be performed to initialize the new tool integration. Use 'new' or 'new_if_not_exists' to create a new git repository, 'clone' or 'clone_if_not_exists' to clone an existing repository into a new git repository, 'fork' or 'fork_if_not_exists' to fork an existing git repository, or 'link' to link to an existing git repository. If you attempt to apply a resource with type 'new', 'clone', or 'fork' when the target repo already exists, the attempt will fail. If you apply a resource with type 'new_if_not_exists`, 'clone_if_not_exists', or 'fork_if_not_exists' when the target repo already exists, the existing repo will be used as-is.", }, "private_repo": &schema.Schema{ Type: schema.TypeBool, @@ -151,6 +151,17 @@ func DataSourceIBMCdToolchainToolHostedgit() *schema.Resource { Computed: true, Description: "The ID of the Git Repos and Issue Tracking project.", }, + "auth_type": &schema.Schema{ + Type: schema.TypeString, + Computed: true, + Description: "Select the method of authentication that will be used to access the git provider.", + }, + "api_token": &schema.Schema{ + Type: schema.TypeString, + Computed: true, + Sensitive: true, + Description: "Personal Access Token.", + }, "toolchain_issues_enabled": &schema.Schema{ Type: schema.TypeBool, Computed: true, diff --git a/ibm/service/cdtoolchain/resource_ibm_cd_toolchain_tool_bitbucketgit.go b/ibm/service/cdtoolchain/resource_ibm_cd_toolchain_tool_bitbucketgit.go index 05388fa6d18..89876bb8c55 100644 --- a/ibm/service/cdtoolchain/resource_ibm_cd_toolchain_tool_bitbucketgit.go +++ b/ibm/service/cdtoolchain/resource_ibm_cd_toolchain_tool_bitbucketgit.go @@ -1,4 +1,4 @@ -// Copyright IBM Corp. 2022 All Rights Reserved. +// Copyright IBM Corp. 2023 All Rights Reserved. // Licensed under the Mozilla Public License v2.0 package cdtoolchain @@ -84,7 +84,7 @@ func ResourceIBMCdToolchainToolBitbucketgit() *schema.Resource { "type": &schema.Schema{ Type: schema.TypeString, Computed: true, - Description: "The operation that should be performed to initialize the new tool integration. Use 'new' to create a new git repository, 'clone' to clone an existing repository into a new git repository, 'fork' to fork an existing git repository, or 'link' to link to an existing git repository.", + Description: "The operation that should be performed to initialize the new tool integration. Use 'new' or 'new_if_not_exists' to create a new git repository, 'clone' or 'clone_if_not_exists' to clone an existing repository into a new git repository, 'fork' or 'fork_if_not_exists' to fork an existing git repository, or 'link' to link to an existing git repository. If you attempt to apply a resource with type 'new', 'clone', or 'fork' when the target repo already exists, the attempt will fail. If you apply a resource with type 'new_if_not_exists`, 'clone_if_not_exists', or 'fork_if_not_exists' when the target repo already exists, the existing repo will be used as-is.", }, "private_repo": &schema.Schema{ Type: schema.TypeBool, @@ -158,7 +158,7 @@ func ResourceIBMCdToolchainToolBitbucketgit() *schema.Resource { Type: schema.TypeString, Required: true, ForceNew: true, - Description: "The operation that should be performed to initialize the new tool integration. Use 'new' to create a new git repository, 'clone' to clone an existing repository into a new git repository, 'fork' to fork an existing git repository, or 'link' to link to an existing git repository.", + Description: "The operation that should be performed to initialize the new tool integration. Use 'new' or 'new_if_not_exists' to create a new git repository, 'clone' or 'clone_if_not_exists' to clone an existing repository into a new git repository, 'fork' or 'fork_if_not_exists' to fork an existing git repository, or 'link' to link to an existing git repository. If you attempt to apply a resource with type 'new', 'clone', or 'fork' when the target repo already exists, the attempt will fail. If you apply a resource with type 'new_if_not_exists`, 'clone_if_not_exists', or 'fork_if_not_exists' when the target repo already exists, the existing repo will be used as-is.", }, "private_repo": &schema.Schema{ Type: schema.TypeBool, diff --git a/ibm/service/cdtoolchain/resource_ibm_cd_toolchain_tool_githubconsolidated.go b/ibm/service/cdtoolchain/resource_ibm_cd_toolchain_tool_githubconsolidated.go index 60797cbfe6a..54b478358c3 100644 --- a/ibm/service/cdtoolchain/resource_ibm_cd_toolchain_tool_githubconsolidated.go +++ b/ibm/service/cdtoolchain/resource_ibm_cd_toolchain_tool_githubconsolidated.go @@ -1,4 +1,4 @@ -// Copyright IBM Corp. 2022 All Rights Reserved. +// Copyright IBM Corp. 2023 All Rights Reserved. // Licensed under the Mozilla Public License v2.0 package cdtoolchain @@ -84,7 +84,7 @@ func ResourceIBMCdToolchainToolGithubconsolidated() *schema.Resource { "type": &schema.Schema{ Type: schema.TypeString, Computed: true, - Description: "The operation that should be performed to initialize the new tool integration. Use 'new' to create a new git repository, 'clone' to clone an existing repository into a new git repository, 'fork' to fork an existing git repository, or 'link' to link to an existing git repository.", + Description: "The operation that should be performed to initialize the new tool integration. Use 'new' or 'new_if_not_exists' to create a new git repository, 'clone' or 'clone_if_not_exists' to clone an existing repository into a new git repository, 'fork' or 'fork_if_not_exists' to fork an existing git repository, or 'link' to link to an existing git repository. If you attempt to apply a resource with type 'new', 'clone', or 'fork' when the target repo already exists, the attempt will fail. If you apply a resource with type 'new_if_not_exists`, 'clone_if_not_exists', or 'fork_if_not_exists' when the target repo already exists, the existing repo will be used as-is.", }, "private_repo": &schema.Schema{ Type: schema.TypeBool, @@ -113,6 +113,18 @@ func ResourceIBMCdToolchainToolGithubconsolidated() *schema.Resource { Computed: true, Description: "The ID of the GitHub repository.", }, + "auth_type": &schema.Schema{ + Type: schema.TypeString, + Optional: true, + Description: "Select the method of authentication that will be used to access the git provider.", + }, + "api_token": &schema.Schema{ + Type: schema.TypeString, + Optional: true, + DiffSuppressFunc: flex.SuppressHashedRawSecret, + Sensitive: true, + Description: "Personal Access Token.", + }, "toolchain_issues_enabled": &schema.Schema{ Type: schema.TypeBool, Optional: true, @@ -163,7 +175,7 @@ func ResourceIBMCdToolchainToolGithubconsolidated() *schema.Resource { Type: schema.TypeString, Required: true, ForceNew: true, - Description: "The operation that should be performed to initialize the new tool integration. Use 'new' to create a new git repository, 'clone' to clone an existing repository into a new git repository, 'fork' to fork an existing git repository, or 'link' to link to an existing git repository.", + Description: "The operation that should be performed to initialize the new tool integration. Use 'new' or 'new_if_not_exists' to create a new git repository, 'clone' or 'clone_if_not_exists' to clone an existing repository into a new git repository, 'fork' or 'fork_if_not_exists' to fork an existing git repository, or 'link' to link to an existing git repository. If you attempt to apply a resource with type 'new', 'clone', or 'fork' when the target repo already exists, the attempt will fail. If you apply a resource with type 'new_if_not_exists`, 'clone_if_not_exists', or 'fork_if_not_exists' when the target repo already exists, the existing repo will be used as-is.", }, "private_repo": &schema.Schema{ Type: schema.TypeBool, diff --git a/ibm/service/cdtoolchain/resource_ibm_cd_toolchain_tool_gitlab.go b/ibm/service/cdtoolchain/resource_ibm_cd_toolchain_tool_gitlab.go index 0566bea75a6..e250787c38a 100644 --- a/ibm/service/cdtoolchain/resource_ibm_cd_toolchain_tool_gitlab.go +++ b/ibm/service/cdtoolchain/resource_ibm_cd_toolchain_tool_gitlab.go @@ -1,4 +1,4 @@ -// Copyright IBM Corp. 2022 All Rights Reserved. +// Copyright IBM Corp. 2023 All Rights Reserved. // Licensed under the Mozilla Public License v2.0 package cdtoolchain @@ -84,7 +84,7 @@ func ResourceIBMCdToolchainToolGitlab() *schema.Resource { "type": &schema.Schema{ Type: schema.TypeString, Computed: true, - Description: "The operation that should be performed to initialize the new tool integration. Use 'new' to create a new git repository, 'clone' to clone an existing repository into a new git repository, 'fork' to fork an existing git repository, or 'link' to link to an existing git repository.", + Description: "The operation that should be performed to initialize the new tool integration. Use 'new' or 'new_if_not_exists' to create a new git repository, 'clone' or 'clone_if_not_exists' to clone an existing repository into a new git repository, 'fork' or 'fork_if_not_exists' to fork an existing git repository, or 'link' to link to an existing git repository. If you attempt to apply a resource with type 'new', 'clone', or 'fork' when the target repo already exists, the attempt will fail. If you apply a resource with type 'new_if_not_exists`, 'clone_if_not_exists', or 'fork_if_not_exists' when the target repo already exists, the existing repo will be used as-is.", }, "private_repo": &schema.Schema{ Type: schema.TypeBool, @@ -108,6 +108,18 @@ func ResourceIBMCdToolchainToolGitlab() *schema.Resource { Computed: true, Description: "The ID of the GitLab project.", }, + "auth_type": &schema.Schema{ + Type: schema.TypeString, + Optional: true, + Description: "Select the method of authentication that will be used to access the git provider.", + }, + "api_token": &schema.Schema{ + Type: schema.TypeString, + Optional: true, + DiffSuppressFunc: flex.SuppressHashedRawSecret, + Sensitive: true, + Description: "Personal Access Token.", + }, "toolchain_issues_enabled": &schema.Schema{ Type: schema.TypeBool, Optional: true, @@ -158,7 +170,7 @@ func ResourceIBMCdToolchainToolGitlab() *schema.Resource { Type: schema.TypeString, Required: true, ForceNew: true, - Description: "The operation that should be performed to initialize the new tool integration. Use 'new' to create a new git repository, 'clone' to clone an existing repository into a new git repository, 'fork' to fork an existing git repository, or 'link' to link to an existing git repository.", + Description: "The operation that should be performed to initialize the new tool integration. Use 'new' or 'new_if_not_exists' to create a new git repository, 'clone' or 'clone_if_not_exists' to clone an existing repository into a new git repository, 'fork' or 'fork_if_not_exists' to fork an existing git repository, or 'link' to link to an existing git repository. If you attempt to apply a resource with type 'new', 'clone', or 'fork' when the target repo already exists, the attempt will fail. If you apply a resource with type 'new_if_not_exists`, 'clone_if_not_exists', or 'fork_if_not_exists' when the target repo already exists, the existing repo will be used as-is.", }, "private_repo": &schema.Schema{ Type: schema.TypeBool, diff --git a/ibm/service/cdtoolchain/resource_ibm_cd_toolchain_tool_hostedgit.go b/ibm/service/cdtoolchain/resource_ibm_cd_toolchain_tool_hostedgit.go index cdfd6d172c8..f314b5a8edb 100644 --- a/ibm/service/cdtoolchain/resource_ibm_cd_toolchain_tool_hostedgit.go +++ b/ibm/service/cdtoolchain/resource_ibm_cd_toolchain_tool_hostedgit.go @@ -1,4 +1,4 @@ -// Copyright IBM Corp. 2022 All Rights Reserved. +// Copyright IBM Corp. 2023 All Rights Reserved. // Licensed under the Mozilla Public License v2.0 package cdtoolchain @@ -84,7 +84,7 @@ func ResourceIBMCdToolchainToolHostedgit() *schema.Resource { "type": &schema.Schema{ Type: schema.TypeString, Computed: true, - Description: "The operation that should be performed to initialize the new tool integration. Use 'new' to create a new git repository, 'clone' to clone an existing repository into a new git repository, 'fork' to fork an existing git repository, or 'link' to link to an existing git repository.", + Description: "The operation that should be performed to initialize the new tool integration. Use 'new' or 'new_if_not_exists' to create a new git repository, 'clone' or 'clone_if_not_exists' to clone an existing repository into a new git repository, 'fork' or 'fork_if_not_exists' to fork an existing git repository, or 'link' to link to an existing git repository. If you attempt to apply a resource with type 'new', 'clone', or 'fork' when the target repo already exists, the attempt will fail. If you apply a resource with type 'new_if_not_exists`, 'clone_if_not_exists', or 'fork_if_not_exists' when the target repo already exists, the existing repo will be used as-is.", }, "private_repo": &schema.Schema{ Type: schema.TypeBool, @@ -108,6 +108,18 @@ func ResourceIBMCdToolchainToolHostedgit() *schema.Resource { Computed: true, Description: "The ID of the Git Repos and Issue Tracking project.", }, + "auth_type": &schema.Schema{ + Type: schema.TypeString, + Optional: true, + Description: "Select the method of authentication that will be used to access the git provider.", + }, + "api_token": &schema.Schema{ + Type: schema.TypeString, + Optional: true, + DiffSuppressFunc: flex.SuppressHashedRawSecret, + Sensitive: true, + Description: "Personal Access Token.", + }, "toolchain_issues_enabled": &schema.Schema{ Type: schema.TypeBool, Optional: true, @@ -158,7 +170,7 @@ func ResourceIBMCdToolchainToolHostedgit() *schema.Resource { Type: schema.TypeString, Required: true, ForceNew: true, - Description: "The operation that should be performed to initialize the new tool integration. Use 'new' to create a new git repository, 'clone' to clone an existing repository into a new git repository, 'fork' to fork an existing git repository, or 'link' to link to an existing git repository.", + Description: "The operation that should be performed to initialize the new tool integration. Use 'new' or 'new_if_not_exists' to create a new git repository, 'clone' or 'clone_if_not_exists' to clone an existing repository into a new git repository, 'fork' or 'fork_if_not_exists' to fork an existing git repository, or 'link' to link to an existing git repository. If you attempt to apply a resource with type 'new', 'clone', or 'fork' when the target repo already exists, the attempt will fail. If you apply a resource with type 'new_if_not_exists`, 'clone_if_not_exists', or 'fork_if_not_exists' when the target repo already exists, the existing repo will be used as-is.", }, "private_repo": &schema.Schema{ Type: schema.TypeBool, diff --git a/website/docs/d/cd_toolchain_tool_bitbucketgit.html.markdown b/website/docs/d/cd_toolchain_tool_bitbucketgit.html.markdown index 85a4f256a41..fa464c03577 100644 --- a/website/docs/d/cd_toolchain_tool_bitbucketgit.html.markdown +++ b/website/docs/d/cd_toolchain_tool_bitbucketgit.html.markdown @@ -59,7 +59,7 @@ Nested scheme for **parameters**: * `token_url` - (String) The token URL used for authorizing with the Bitbucket server. * `toolchain_issues_enabled` - (Boolean) Setting this value to true will enable issues on the Bitbucket repository and add an issues tool card to the toolchain. Setting the value to false will remove the tool card from the toolchain, but will not impact whether or not issues are enabled on the Bitbucket repository itself. * Constraints: The default value is `true`. - * `type` - (String) The operation that should be performed to initialize the new tool integration. Use 'new' to create a new git repository, 'clone' to clone an existing repository into a new git repository, 'fork' to fork an existing git repository, or 'link' to link to an existing git repository. + * `type` - (String) The operation that should be performed to initialize the new tool integration. Use 'new' or 'new_if_not_exists' to create a new git repository, 'clone' or 'clone_if_not_exists' to clone an existing repository into a new git repository, 'fork' or 'fork_if_not_exists' to fork an existing git repository, or 'link' to link to an existing git repository. If you attempt to apply a resource with type 'new', 'clone', or 'fork' when the target repo already exists, the attempt will fail. If you apply a resource with type 'new_if_not_exists`, 'clone_if_not_exists', or 'fork_if_not_exists' when the target repo already exists, the existing repo will be used as-is. * Constraints: Allowable values are: `new`, `fork`, `clone`, `link`, `new_if_not_exists`, `clone_if_not_exists`, `fork_if_not_exists`. * `referent` - (List) Information on URIs to access this resource through the UI or API. diff --git a/website/docs/d/cd_toolchain_tool_githubconsolidated.html.markdown b/website/docs/d/cd_toolchain_tool_githubconsolidated.html.markdown index 2abd6231159..4a410943e53 100644 --- a/website/docs/d/cd_toolchain_tool_githubconsolidated.html.markdown +++ b/website/docs/d/cd_toolchain_tool_githubconsolidated.html.markdown @@ -44,6 +44,9 @@ In addition to all argument references listed, you can access the following attr * `parameters` - (List) Unique key-value pairs representing parameters to be used to create the tool. A list of parameters for each tool integration can be found in the Configuring tool integrations page. Nested scheme for **parameters**: * `api_root_url` - (String) The API root URL for the GitHub server. + * `api_token` - (String) Personal Access Token. + * `auth_type` - (String) Select the method of authentication that will be used to access the git provider. + * Constraints: Allowable values are: `oauth`, `pat`. * `auto_init` - (Boolean) Setting this value to true will initialize this repository with a README. This parameter is only used when creating a new repository. * Constraints: The default value is `false`. * `default_branch` - (String) The default branch of the git repository. @@ -61,7 +64,7 @@ Nested scheme for **parameters**: * `token_url` - (String) The token URL used for authorizing with the GitHub server. * `toolchain_issues_enabled` - (Boolean) Setting this value to true will enable issues on the GitHub repository and add an issues tool card to the toolchain. Setting the value to false will remove the tool card from the toolchain, but will not impact whether or not issues are enabled on the GitHub repository itself. * Constraints: The default value is `true`. - * `type` - (String) The operation that should be performed to initialize the new tool integration. Use 'new' to create a new git repository, 'clone' to clone an existing repository into a new git repository, 'fork' to fork an existing git repository, or 'link' to link to an existing git repository. + * `type` - (String) The operation that should be performed to initialize the new tool integration. Use 'new' or 'new_if_not_exists' to create a new git repository, 'clone' or 'clone_if_not_exists' to clone an existing repository into a new git repository, 'fork' or 'fork_if_not_exists' to fork an existing git repository, or 'link' to link to an existing git repository. If you attempt to apply a resource with type 'new', 'clone', or 'fork' when the target repo already exists, the attempt will fail. If you apply a resource with type 'new_if_not_exists`, 'clone_if_not_exists', or 'fork_if_not_exists' when the target repo already exists, the existing repo will be used as-is. * Constraints: Allowable values are: `new`, `fork`, `clone`, `link`, `new_if_not_exists`, `clone_if_not_exists`, `fork_if_not_exists`. * `referent` - (List) Information on URIs to access this resource through the UI or API. diff --git a/website/docs/d/cd_toolchain_tool_gitlab.html.markdown b/website/docs/d/cd_toolchain_tool_gitlab.html.markdown index 75aec79e916..22b1479eecc 100644 --- a/website/docs/d/cd_toolchain_tool_gitlab.html.markdown +++ b/website/docs/d/cd_toolchain_tool_gitlab.html.markdown @@ -44,6 +44,9 @@ In addition to all argument references listed, you can access the following attr * `parameters` - (List) Unique key-value pairs representing parameters to be used to create the tool. A list of parameters for each tool integration can be found in the Configuring tool integrations page. Nested scheme for **parameters**: * `api_root_url` - (String) The API root URL for the GitLab Server. + * `api_token` - (String) Personal Access Token. + * `auth_type` - (String) Select the method of authentication that will be used to access the git provider. + * Constraints: Allowable values are: `oauth`, `pat`. * `default_branch` - (String) The default branch of the git repository. * `enable_traceability` - (Boolean) Set this value to 'true' to track the deployment of code changes by creating tags, labels and comments on commits, pull requests and referenced issues. * Constraints: The default value is `false`. @@ -59,7 +62,7 @@ Nested scheme for **parameters**: * `token_url` - (String) The token URL used for authorizing with the GitLab server. * `toolchain_issues_enabled` - (Boolean) Setting this value to true will enable issues on the GitLab repository and add an issues tool card to the toolchain. Setting the value to false will remove the tool card from the toolchain, but will not impact whether or not issues are enabled on the GitLab repository itself. * Constraints: The default value is `true`. - * `type` - (String) The operation that should be performed to initialize the new tool integration. Use 'new' to create a new git repository, 'clone' to clone an existing repository into a new git repository, 'fork' to fork an existing git repository, or 'link' to link to an existing git repository. + * `type` - (String) The operation that should be performed to initialize the new tool integration. Use 'new' or 'new_if_not_exists' to create a new git repository, 'clone' or 'clone_if_not_exists' to clone an existing repository into a new git repository, 'fork' or 'fork_if_not_exists' to fork an existing git repository, or 'link' to link to an existing git repository. If you attempt to apply a resource with type 'new', 'clone', or 'fork' when the target repo already exists, the attempt will fail. If you apply a resource with type 'new_if_not_exists`, 'clone_if_not_exists', or 'fork_if_not_exists' when the target repo already exists, the existing repo will be used as-is. * Constraints: Allowable values are: `new`, `fork`, `clone`, `link`, `new_if_not_exists`, `clone_if_not_exists`, `fork_if_not_exists`. * `referent` - (List) Information on URIs to access this resource through the UI or API. diff --git a/website/docs/d/cd_toolchain_tool_hostedgit.html.markdown b/website/docs/d/cd_toolchain_tool_hostedgit.html.markdown index 1470eabb7d0..4c81bef4a88 100644 --- a/website/docs/d/cd_toolchain_tool_hostedgit.html.markdown +++ b/website/docs/d/cd_toolchain_tool_hostedgit.html.markdown @@ -44,6 +44,9 @@ In addition to all argument references listed, you can access the following attr * `parameters` - (List) Unique key-value pairs representing parameters to be used to create the tool. A list of parameters for each tool integration can be found in the Configuring tool integrations page. Nested scheme for **parameters**: * `api_root_url` - (String) The API root URL for the GitLab server. + * `api_token` - (String) Personal Access Token. + * `auth_type` - (String) Select the method of authentication that will be used to access the git provider. + * Constraints: Allowable values are: `oauth`, `pat`. * `default_branch` - (String) The default branch of the git repository. * `enable_traceability` - (Boolean) Set this value to 'true' to track the deployment of code changes by creating tags, labels and comments on commits, pull requests and referenced issues. * Constraints: The default value is `false`. @@ -59,7 +62,7 @@ Nested scheme for **parameters**: * `token_url` - (String) The token URL used for authorizing with the Bitbucket server. * `toolchain_issues_enabled` - (Boolean) Setting this value to true will enable issues on the GitLab repository and add an issues tool card to the toolchain. Setting the value to false will remove the tool card from the toolchain, but will not impact whether or not issues are enabled on the GitLab repository itself. * Constraints: The default value is `true`. - * `type` - (String) The operation that should be performed to initialize the new tool integration. Use 'new' to create a new git repository, 'clone' to clone an existing repository into a new git repository, 'fork' to fork an existing git repository, or 'link' to link to an existing git repository. + * `type` - (String) The operation that should be performed to initialize the new tool integration. Use 'new' or 'new_if_not_exists' to create a new git repository, 'clone' or 'clone_if_not_exists' to clone an existing repository into a new git repository, 'fork' or 'fork_if_not_exists' to fork an existing git repository, or 'link' to link to an existing git repository. If you attempt to apply a resource with type 'new', 'clone', or 'fork' when the target repo already exists, the attempt will fail. If you apply a resource with type 'new_if_not_exists`, 'clone_if_not_exists', or 'fork_if_not_exists' when the target repo already exists, the existing repo will be used as-is. * Constraints: Allowable values are: `new`, `fork`, `clone`, `link`, `new_if_not_exists`, `clone_if_not_exists`, `fork_if_not_exists`. * `referent` - (List) Information on URIs to access this resource through the UI or API. diff --git a/website/docs/r/cd_toolchain_tool_bitbucketgit.html.markdown b/website/docs/r/cd_toolchain_tool_bitbucketgit.html.markdown index 83604fa352c..51a9ffb1e4d 100644 --- a/website/docs/r/cd_toolchain_tool_bitbucketgit.html.markdown +++ b/website/docs/r/cd_toolchain_tool_bitbucketgit.html.markdown @@ -46,7 +46,7 @@ Nested scheme for **initialization**: * `repo_name` - (Optional, Forces new resource, String) The name of the new Bitbucket repository to create. This parameter is required when creating a new repository, cloning, or forking a repository. The value will be computed when linking to an existing repository. * `repo_url` - (Optional, Forces new resource, String) The URL of the bitbucket repository for this tool integration. This parameter is required when linking to an existing repository. The value will be computed when creating a new repository, cloning, or forking a repository. * `source_repo_url` - (Optional, Forces new resource, String) The URL of the repository that you are forking or cloning. This parameter is required when forking or cloning a repository. It is not used when creating a new repository or linking to an existing repository. - * `type` - (Required, Forces new resource, String) The operation that should be performed to initialize the new tool integration. Use 'new' to create a new git repository, 'clone' to clone an existing repository into a new git repository, 'fork' to fork an existing git repository, or 'link' to link to an existing git repository. + * `type` - (Required, Forces new resource, String) The operation that should be performed to initialize the new tool integration. Use 'new' or 'new_if_not_exists' to create a new git repository, 'clone' or 'clone_if_not_exists' to clone an existing repository into a new git repository, 'fork' or 'fork_if_not_exists' to fork an existing git repository, or 'link' to link to an existing git repository. If you attempt to apply a resource with type 'new', 'clone', or 'fork' when the target repo already exists, the attempt will fail. If you apply a resource with type 'new_if_not_exists`, 'clone_if_not_exists', or 'fork_if_not_exists' when the target repo already exists, the existing repo will be used as-is. * Constraints: Allowable values are: `new`, `fork`, `clone`, `link`, `new_if_not_exists`, `clone_if_not_exists`, `fork_if_not_exists`. * `name` - (Optional, String) Name of the tool. * Constraints: The maximum length is `128` characters. The minimum length is `0` characters. The value must match regular expression `/^([^\\x00-\\x7F]|[a-zA-Z0-9-._ ])+$/`. @@ -68,7 +68,7 @@ Nested scheme for **parameters**: * `token_url` - (Computed, String) The token URL used for authorizing with the Bitbucket server. * `toolchain_issues_enabled` - (Optional, Boolean) Setting this value to true will enable issues on the Bitbucket repository and add an issues tool card to the toolchain. Setting the value to false will remove the tool card from the toolchain, but will not impact whether or not issues are enabled on the Bitbucket repository itself. * Constraints: The default value is `true`. - * `type` - (Computed, String) The operation that should be performed to initialize the new tool integration. Use 'new' to create a new git repository, 'clone' to clone an existing repository into a new git repository, 'fork' to fork an existing git repository, or 'link' to link to an existing git repository. + * `type` - (Computed, String) The operation that should be performed to initialize the new tool integration. Use 'new' or 'new_if_not_exists' to create a new git repository, 'clone' or 'clone_if_not_exists' to clone an existing repository into a new git repository, 'fork' or 'fork_if_not_exists' to fork an existing git repository, or 'link' to link to an existing git repository. If you attempt to apply a resource with type 'new', 'clone', or 'fork' when the target repo already exists, the attempt will fail. If you apply a resource with type 'new_if_not_exists`, 'clone_if_not_exists', or 'fork_if_not_exists' when the target repo already exists, the existing repo will be used as-is. * Constraints: Allowable values are: `new`, `fork`, `clone`, `link`, `new_if_not_exists`, `clone_if_not_exists`, `fork_if_not_exists`. * `toolchain_id` - (Required, Forces new resource, String) ID of the toolchain to bind the tool to. * Constraints: The maximum length is `36` characters. The minimum length is `36` characters. The value must match regular expression `/^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-4[a-fA-F0-9]{3}-[89abAB][a-fA-F0-9]{3}-[a-fA-F0-9]{12}$/`. diff --git a/website/docs/r/cd_toolchain_tool_githubconsolidated.html.markdown b/website/docs/r/cd_toolchain_tool_githubconsolidated.html.markdown index 29cf33a6fe1..966a6e40223 100644 --- a/website/docs/r/cd_toolchain_tool_githubconsolidated.html.markdown +++ b/website/docs/r/cd_toolchain_tool_githubconsolidated.html.markdown @@ -28,6 +28,8 @@ resource "ibm_cd_toolchain_tool_githubconsolidated" "cd_toolchain_tool_githubcon parameters { enable_traceability = false integration_owner = "my-userid" + auth_type = "pat" + api_token = "" toolchain_issues_enabled = true } toolchain_id = ibm_cd_toolchain.cd_toolchain.id @@ -49,13 +51,16 @@ Nested scheme for **initialization**: * `repo_name` - (Optional, Forces new resource, String) The name of the new GitHub repository to create. This parameter is required when creating a new repository, cloning, or forking a repository. The value will be computed when linking to an existing repository. * `repo_url` - (Optional, Forces new resource, String) The URL of the GitHub repository for this tool integration. This parameter is required when linking to an existing repository. The value will be computed when creating a new repository, cloning, or forking a repository. * `source_repo_url` - (Optional, Forces new resource, String) The URL of the repository that you are forking or cloning. This parameter is required when forking or cloning a repository. It is not used when creating a new repository or linking to an existing repository. - * `type` - (Required, Forces new resource, String) The operation that should be performed to initialize the new tool integration. Use 'new' to create a new git repository, 'clone' to clone an existing repository into a new git repository, 'fork' to fork an existing git repository, or 'link' to link to an existing git repository. + * `type` - (Required, Forces new resource, String) The operation that should be performed to initialize the new tool integration. Use 'new' or 'new_if_not_exists' to create a new git repository, 'clone' or 'clone_if_not_exists' to clone an existing repository into a new git repository, 'fork' or 'fork_if_not_exists' to fork an existing git repository, or 'link' to link to an existing git repository. If you attempt to apply a resource with type 'new', 'clone', or 'fork' when the target repo already exists, the attempt will fail. If you apply a resource with type 'new_if_not_exists`, 'clone_if_not_exists', or 'fork_if_not_exists' when the target repo already exists, the existing repo will be used as-is. * Constraints: Allowable values are: `new`, `fork`, `clone`, `link`, `new_if_not_exists`, `clone_if_not_exists`, `fork_if_not_exists`. * `name` - (Optional, String) Name of the tool. * Constraints: The maximum length is `128` characters. The minimum length is `0` characters. The value must match regular expression `/^([^\\x00-\\x7F]|[a-zA-Z0-9-._ ])+$/`. * `parameters` - (Required, List) Unique key-value pairs representing parameters to be used to create the tool. A list of parameters for each tool integration can be found in the Configuring tool integrations page. Nested scheme for **parameters**: * `api_root_url` - (Computed, String) The API root URL for the GitHub server. + * `api_token` - (Optional, String) Personal Access Token. + * `auth_type` - (Optional, String) Select the method of authentication that will be used to access the git provider. + * Constraints: Allowable values are: `oauth`, `pat`. * `auto_init` - (Computed, Boolean) Setting this value to true will initialize this repository with a README. This parameter is only used when creating a new repository. * Constraints: The default value is `false`. * `default_branch` - (Computed, String) The default branch of the git repository. @@ -73,7 +78,7 @@ Nested scheme for **parameters**: * `token_url` - (Computed, String) The token URL used for authorizing with the GitHub server. * `toolchain_issues_enabled` - (Optional, Boolean) Setting this value to true will enable issues on the GitHub repository and add an issues tool card to the toolchain. Setting the value to false will remove the tool card from the toolchain, but will not impact whether or not issues are enabled on the GitHub repository itself. * Constraints: The default value is `true`. - * `type` - (Computed, String) The operation that should be performed to initialize the new tool integration. Use 'new' to create a new git repository, 'clone' to clone an existing repository into a new git repository, 'fork' to fork an existing git repository, or 'link' to link to an existing git repository. + * `type` - (Computed, String) The operation that should be performed to initialize the new tool integration. Use 'new' or 'new_if_not_exists' to create a new git repository, 'clone' or 'clone_if_not_exists' to clone an existing repository into a new git repository, 'fork' or 'fork_if_not_exists' to fork an existing git repository, or 'link' to link to an existing git repository. If you attempt to apply a resource with type 'new', 'clone', or 'fork' when the target repo already exists, the attempt will fail. If you apply a resource with type 'new_if_not_exists`, 'clone_if_not_exists', or 'fork_if_not_exists' when the target repo already exists, the existing repo will be used as-is. * Constraints: Allowable values are: `new`, `fork`, `clone`, `link`, `new_if_not_exists`, `clone_if_not_exists`, `fork_if_not_exists`. * `toolchain_id` - (Required, Forces new resource, String) ID of the toolchain to bind the tool to. * Constraints: The maximum length is `36` characters. The minimum length is `36` characters. The value must match regular expression `/^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-4[a-fA-F0-9]{3}-[89abAB][a-fA-F0-9]{3}-[a-fA-F0-9]{12}$/`. diff --git a/website/docs/r/cd_toolchain_tool_gitlab.html.markdown b/website/docs/r/cd_toolchain_tool_gitlab.html.markdown index c758b0d29e3..83b5d6f8f7a 100644 --- a/website/docs/r/cd_toolchain_tool_gitlab.html.markdown +++ b/website/docs/r/cd_toolchain_tool_gitlab.html.markdown @@ -27,6 +27,8 @@ resource "ibm_cd_toolchain_tool_gitlab" "cd_toolchain_tool_gitlab_instance" { parameters { enable_traceability = false integration_owner = "my-userid" + auth_type = "pat" + api_token = "" toolchain_issues_enabled = true } toolchain_id = ibm_cd_toolchain.cd_toolchain.id @@ -46,13 +48,16 @@ Nested scheme for **initialization**: * `repo_name` - (Optional, Forces new resource, String) The name of the new GitLab repository to create. This parameter is required when creating a new repository, cloning, or forking a repository. The value will be computed when linking to an existing repository. * `repo_url` - (Optional, Forces new resource, String) The URL of the GitLab repository for this tool integration. This parameter is required when linking to an existing repository. The value will be computed when creating a new repository, cloning, or forking a repository. * `source_repo_url` - (Optional, Forces new resource, String) The URL of the repository that you are forking or cloning. This parameter is required when forking or cloning a repository. It is not used when creating a new repository or linking to an existing repository. - * `type` - (Required, Forces new resource, String) The operation that should be performed to initialize the new tool integration. Use 'new' to create a new git repository, 'clone' to clone an existing repository into a new git repository, 'fork' to fork an existing git repository, or 'link' to link to an existing git repository. + * `type` - (Required, Forces new resource, String) The operation that should be performed to initialize the new tool integration. Use 'new' or 'new_if_not_exists' to create a new git repository, 'clone' or 'clone_if_not_exists' to clone an existing repository into a new git repository, 'fork' or 'fork_if_not_exists' to fork an existing git repository, or 'link' to link to an existing git repository. If you attempt to apply a resource with type 'new', 'clone', or 'fork' when the target repo already exists, the attempt will fail. If you apply a resource with type 'new_if_not_exists`, 'clone_if_not_exists', or 'fork_if_not_exists' when the target repo already exists, the existing repo will be used as-is. * Constraints: Allowable values are: `new`, `fork`, `clone`, `link`, `new_if_not_exists`, `clone_if_not_exists`, `fork_if_not_exists`. * `name` - (Optional, String) Name of the tool. * Constraints: The maximum length is `128` characters. The minimum length is `0` characters. The value must match regular expression `/^([^\\x00-\\x7F]|[a-zA-Z0-9-._ ])+$/`. * `parameters` - (Required, List) Unique key-value pairs representing parameters to be used to create the tool. A list of parameters for each tool integration can be found in the Configuring tool integrations page. Nested scheme for **parameters**: * `api_root_url` - (Computed, String) The API root URL for the GitLab Server. + * `api_token` - (Optional, String) Personal Access Token. + * `auth_type` - (Optional, String) Select the method of authentication that will be used to access the git provider. + * Constraints: Allowable values are: `oauth`, `pat`. * `default_branch` - (Computed, String) The default branch of the git repository. * `enable_traceability` - (Optional, Boolean) Set this value to 'true' to track the deployment of code changes by creating tags, labels and comments on commits, pull requests and referenced issues. * Constraints: The default value is `false`. @@ -68,7 +73,7 @@ Nested scheme for **parameters**: * `token_url` - (Computed, String) The token URL used for authorizing with the GitLab server. * `toolchain_issues_enabled` - (Optional, Boolean) Setting this value to true will enable issues on the GitLab repository and add an issues tool card to the toolchain. Setting the value to false will remove the tool card from the toolchain, but will not impact whether or not issues are enabled on the GitLab repository itself. * Constraints: The default value is `true`. - * `type` - (Computed, String) The operation that should be performed to initialize the new tool integration. Use 'new' to create a new git repository, 'clone' to clone an existing repository into a new git repository, 'fork' to fork an existing git repository, or 'link' to link to an existing git repository. + * `type` - (Computed, String) The operation that should be performed to initialize the new tool integration. Use 'new' or 'new_if_not_exists' to create a new git repository, 'clone' or 'clone_if_not_exists' to clone an existing repository into a new git repository, 'fork' or 'fork_if_not_exists' to fork an existing git repository, or 'link' to link to an existing git repository. If you attempt to apply a resource with type 'new', 'clone', or 'fork' when the target repo already exists, the attempt will fail. If you apply a resource with type 'new_if_not_exists`, 'clone_if_not_exists', or 'fork_if_not_exists' when the target repo already exists, the existing repo will be used as-is. * Constraints: Allowable values are: `new`, `fork`, `clone`, `link`, `new_if_not_exists`, `clone_if_not_exists`, `fork_if_not_exists`. * `toolchain_id` - (Required, Forces new resource, String) ID of the toolchain to bind the tool to. * Constraints: The maximum length is `36` characters. The minimum length is `36` characters. The value must match regular expression `/^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-4[a-fA-F0-9]{3}-[89abAB][a-fA-F0-9]{3}-[a-fA-F0-9]{12}$/`. diff --git a/website/docs/r/cd_toolchain_tool_hostedgit.html.markdown b/website/docs/r/cd_toolchain_tool_hostedgit.html.markdown index 5157b6671ec..80c8f024ee2 100644 --- a/website/docs/r/cd_toolchain_tool_hostedgit.html.markdown +++ b/website/docs/r/cd_toolchain_tool_hostedgit.html.markdown @@ -27,6 +27,8 @@ resource "ibm_cd_toolchain_tool_hostedgit" "cd_toolchain_tool_hostedgit_instance parameters { enable_traceability = false integration_owner = "my-userid" + auth_type = "pat" + api_token = "" toolchain_issues_enabled = true } toolchain_id = ibm_cd_toolchain.cd_toolchain.id @@ -46,13 +48,16 @@ Nested scheme for **initialization**: * `repo_name` - (Optional, Forces new resource, String) The name of the new GitLab repository to create. This parameter is required when creating a new repository, cloning, or forking a repository. The value will be computed when linking to an existing repository. * `repo_url` - (Optional, Forces new resource, String) The URL of the GitLab repository for this tool integration. This parameter is required when linking to an existing repository. The value will be computed when creating a new repository, cloning, or forking a repository. * `source_repo_url` - (Optional, Forces new resource, String) The URL of the repository that you are forking or cloning. This parameter is required when forking or cloning a repository. It is not used when creating a new repository or linking to an existing repository. - * `type` - (Required, Forces new resource, String) The operation that should be performed to initialize the new tool integration. Use 'new' to create a new git repository, 'clone' to clone an existing repository into a new git repository, 'fork' to fork an existing git repository, or 'link' to link to an existing git repository. + * `type` - (Required, Forces new resource, String) The operation that should be performed to initialize the new tool integration. Use 'new' or 'new_if_not_exists' to create a new git repository, 'clone' or 'clone_if_not_exists' to clone an existing repository into a new git repository, 'fork' or 'fork_if_not_exists' to fork an existing git repository, or 'link' to link to an existing git repository. If you attempt to apply a resource with type 'new', 'clone', or 'fork' when the target repo already exists, the attempt will fail. If you apply a resource with type 'new_if_not_exists`, 'clone_if_not_exists', or 'fork_if_not_exists' when the target repo already exists, the existing repo will be used as-is. * Constraints: Allowable values are: `new`, `fork`, `clone`, `link`, `new_if_not_exists`, `clone_if_not_exists`, `fork_if_not_exists`. * `name` - (Optional, String) Name of the tool. * Constraints: The maximum length is `128` characters. The minimum length is `0` characters. The value must match regular expression `/^([^\\x00-\\x7F]|[a-zA-Z0-9-._ ])+$/`. * `parameters` - (Required, List) Unique key-value pairs representing parameters to be used to create the tool. A list of parameters for each tool integration can be found in the Configuring tool integrations page. Nested scheme for **parameters**: * `api_root_url` - (Computed, String) The API root URL for the GitLab server. + * `api_token` - (Optional, String) Personal Access Token. + * `auth_type` - (Optional, String) Select the method of authentication that will be used to access the git provider. + * Constraints: Allowable values are: `oauth`, `pat`. * `default_branch` - (Computed, String) The default branch of the git repository. * `enable_traceability` - (Optional, Boolean) Set this value to 'true' to track the deployment of code changes by creating tags, labels and comments on commits, pull requests and referenced issues. * Constraints: The default value is `false`. @@ -68,7 +73,7 @@ Nested scheme for **parameters**: * `token_url` - (Computed, String) The token URL used for authorizing with the Bitbucket server. * `toolchain_issues_enabled` - (Optional, Boolean) Setting this value to true will enable issues on the GitLab repository and add an issues tool card to the toolchain. Setting the value to false will remove the tool card from the toolchain, but will not impact whether or not issues are enabled on the GitLab repository itself. * Constraints: The default value is `true`. - * `type` - (Computed, String) The operation that should be performed to initialize the new tool integration. Use 'new' to create a new git repository, 'clone' to clone an existing repository into a new git repository, 'fork' to fork an existing git repository, or 'link' to link to an existing git repository. + * `type` - (Computed, String) The operation that should be performed to initialize the new tool integration. Use 'new' or 'new_if_not_exists' to create a new git repository, 'clone' or 'clone_if_not_exists' to clone an existing repository into a new git repository, 'fork' or 'fork_if_not_exists' to fork an existing git repository, or 'link' to link to an existing git repository. If you attempt to apply a resource with type 'new', 'clone', or 'fork' when the target repo already exists, the attempt will fail. If you apply a resource with type 'new_if_not_exists`, 'clone_if_not_exists', or 'fork_if_not_exists' when the target repo already exists, the existing repo will be used as-is. * Constraints: Allowable values are: `new`, `fork`, `clone`, `link`, `new_if_not_exists`, `clone_if_not_exists`, `fork_if_not_exists`. * `toolchain_id` - (Required, Forces new resource, String) ID of the toolchain to bind the tool to. * Constraints: The maximum length is `36` characters. The minimum length is `36` characters. The value must match regular expression `/^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-4[a-fA-F0-9]{3}-[89abAB][a-fA-F0-9]{3}-[a-fA-F0-9]{12}$/`. From a91cb9e9d7dffa086a5d00d462aebc7c7e89d86d Mon Sep 17 00:00:00 2001 From: Gary Marjoram Date: Wed, 11 Jan 2023 15:54:01 +0000 Subject: [PATCH 2/2] Fix example --- .../ibm-cd-toolchain-simple-helm/repositories/repositories.tf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/ibm-cd-toolchain-simple-helm/repositories/repositories.tf b/examples/ibm-cd-toolchain-simple-helm/repositories/repositories.tf index 7b820bcb9d1..9cbe82e597d 100644 --- a/examples/ibm-cd-toolchain-simple-helm/repositories/repositories.tf +++ b/examples/ibm-cd-toolchain-simple-helm/repositories/repositories.tf @@ -18,7 +18,7 @@ resource "ibm_cd_toolchain_tool_hostedgit" "pipeline_repo" { name = "pipeline-repo" initialization { type = "clone_if_not_exists" - repo_url = var.pipeline_repo + source_repo_url = var.pipeline_repo private_repo = true repo_name = join("-", [ var.repositories_prefix, "pipeline-repo" ]) } @@ -33,7 +33,7 @@ resource "ibm_cd_toolchain_tool_hostedgit" "tekton_tasks_catalog_repo" { name = "tasks-repo" initialization { type = "clone_if_not_exists" - repo_url = var.tekton_tasks_catalog_repo + source_repo_url = var.tekton_tasks_catalog_repo private_repo = true repo_name = join("-", [ var.repositories_prefix, "tasks-repo" ]) }