Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for Github service connections #264

Merged
merged 1 commit into from
Dec 8, 2021
Merged

Add support for Github service connections #264

merged 1 commit into from
Dec 8, 2021

Commits on Oct 20, 2021

  1. Add support for Github service connections

    In order to source pipeline yamls from Github (non public repos), we
    need to create a service connection.
    
    This commit updates the service endpoint functionality to understand a
    'type' value. For the existing configs, default type to 'TfsGit' if none
    is specified. If type is set to 'Github', then use the new logic under
    azdo_service_endpoint.github.tf to provision the connection.
    
    The various values for 'type' are shown at https://registry.terraform.io/providers/microsoft/azuredevops/latest/docs/resources/build_definition#repo_type
    - however this commit only implements Github. A similar pattern should
    be possible to implement Bitbucket / GitHubEnterprise.
    
    The following shows an example config to use this new functionality:
    
    service_endpoints = {
      github = {
        endpoint_name = "github_endpoint"
        type = "Github"
        project_key = "project_to_add_endpoint_to"
        keyvault = {
          lz_key      = "launchpad"
          key         = "secrets"
          secret_name = "github-pat"
        }
      }
    }
    
    NOTE: similar to azdo-pat-admin, a Github PAT must be manually created
    and stored in the keyvault identified in the 'keyvault {}' block above:
    
    $ az keyvault secret set --name gitub-pat --vault-name <secrets-vault> --value <pat>
    brk3 committed Oct 20, 2021
    Configuration menu
    Copy the full SHA
    eb2fbc9 View commit details
    Browse the repository at this point in the history