diff --git a/mmv1/products/cloudbuildv2/Connection.yaml b/mmv1/products/cloudbuildv2/Connection.yaml index e4607930dc3f..0678336e62b4 100644 --- a/mmv1/products/cloudbuildv2/Connection.yaml +++ b/mmv1/products/cloudbuildv2/Connection.yaml @@ -14,11 +14,21 @@ --- !ruby/object:Api::Resource name: 'Connection' base_url: projects/{{project}}/locations/{{location}}/connections +create_url: projects/{{project}}/locations/{{location}}/connections?connectionId={{name}} self_link: projects/{{project}}/locations/{{location}}/connections/{{name}} -exclude_resource: true +references: !ruby/object:Api::Resource::ReferenceLinks + guides: + 'Official Documentation': 'https://cloud.google.com/build/docs' + api: 'https://cloud.google.com/build/docs/api/reference/rest' +autogen_async: true +async: !ruby/object:Api::OpAsync + operation: !ruby/object:Api::OpAsync::Operation + base_url: '{{op_id}}' +update_verb: :PATCH description: | - Only used to generate IAM resources. + A connection to a SCM like GitHub, GitHub Enterprise, Bitbucket Data Center or GitLab. exclude_tgc: true +legacy_long_form_project: true iam_policy: !ruby/object:Api::Resource::IamPolicy skip_import_test: true method_name_separator: ':' @@ -40,8 +50,190 @@ examples: ])" vars: connection_name: 'tf-test-connection' -properties: + - !ruby/object:Provider::Terraform::Examples + name: 'cloudbuildv2_connection_ghe' + skip_test: true + - !ruby/object:Provider::Terraform::Examples + name: 'cloudbuildv2_connection_github' + skip_test: true +parameters: + - !ruby/object:Api::Type::String + name: name + description: Immutable. The resource name of the connection. + url_param_only: true + required: true + immutable: true - !ruby/object:Api::Type::String - name: 'name' - description: Dummy property. + name: location + description: The location for the resource + url_param_only: true required: true + immutable: true +properties: + - !ruby/object:Api::Type::String + name: createTime + description: Output only. Server assigned timestamp for when the connection was created. + output: true + - !ruby/object:Api::Type::String + name: updateTime + description: Output only. Server assigned timestamp for when the connection was updated. + output: true + - !ruby/object:Api::Type::NestedObject + name: githubConfig + description: Configuration for connections to github.com. + conflicts: + - 'github_enterprise_config' + - 'gitlab_config' + properties: + - !ruby/object:Api::Type::NestedObject + name: authorizerCredential + description: OAuth credential of the account that authorized the Cloud Build GitHub App. It is recommended to use a robot account instead of a human user account. The OAuth token must be tied to the Cloud Build GitHub App. + properties: + - !ruby/object:Api::Type::String + name: oauthTokenSecretVersion + description: 'A SecretManager resource containing the OAuth token that authorizes the Cloud Build connection. Format: `projects/*/secrets/*/versions/*`.' + diff_suppress_func: 'tpgresource.CompareSelfLinkOrResourceName' + - !ruby/object:Api::Type::String + name: username + description: Output only. The username associated to this token. + output: true + - !ruby/object:Api::Type::Integer + name: appInstallationId + description: GitHub App installation id. + - !ruby/object:Api::Type::NestedObject + name: githubEnterpriseConfig + conflicts: + - 'github_config' + - 'gitlab_config' + description: Configuration for connections to an instance of GitHub Enterprise. + properties: + - !ruby/object:Api::Type::String + name: hostUri + description: Required. The URI of the GitHub Enterprise host this connection is for. + required: true + - !ruby/object:Api::Type::Integer + name: appId + description: Id of the GitHub App created from the manifest. + - !ruby/object:Api::Type::String + name: appSlug + description: The URL-friendly name of the GitHub App. + - !ruby/object:Api::Type::String + name: privateKeySecretVersion + description: SecretManager resource containing the private key of the GitHub App, formatted as `projects/*/secrets/*/versions/*`. + diff_suppress_func: 'tpgresource.CompareSelfLinkOrResourceName' + - !ruby/object:Api::Type::String + name: webhookSecretSecretVersion + description: SecretManager resource containing the webhook secret of the GitHub App, formatted as `projects/*/secrets/*/versions/*`. + diff_suppress_func: 'tpgresource.CompareSelfLinkOrResourceName' + - !ruby/object:Api::Type::Integer + name: appInstallationId + description: ID of the installation of the GitHub App. + - !ruby/object:Api::Type::NestedObject + name: serviceDirectoryConfig + description: Configuration for using Service Directory to privately connect to a GitHub Enterprise server. This should only be set if the GitHub Enterprise server is hosted on-premises and not reachable by public internet. If this field is left empty, calls to the GitHub Enterprise server will be made over the public internet. + properties: + - !ruby/object:Api::Type::String + name: service + description: 'Required. The Service Directory service name. Format: projects/{project}/locations/{location}/namespaces/{namespace}/services/{service}.' + required: true + diff_suppress_func: 'tpgresource.CompareSelfLinkOrResourceName' + - !ruby/object:Api::Type::String + name: sslCa + description: SSL certificate to use for requests to GitHub Enterprise. + - !ruby/object:Api::Type::NestedObject + name: gitlabConfig + conflicts: + - 'github_config' + - 'github_enterprise_config' + description: Configuration for connections to gitlab.com or an instance of GitLab Enterprise. + properties: + - !ruby/object:Api::Type::String + name: hostUri + description: The URI of the GitLab Enterprise host this connection is for. If not specified, the default value is https://gitlab.com. + default_from_api: true + - !ruby/object:Api::Type::String + name: webhookSecretSecretVersion + description: Required. Immutable. SecretManager resource containing the webhook secret of a GitLab Enterprise project, formatted as `projects/*/secrets/*/versions/*`. + required: true + immutable: true + diff_suppress_func: 'tpgresource.CompareSelfLinkOrResourceName' + - !ruby/object:Api::Type::NestedObject + name: readAuthorizerCredential + description: Required. A GitLab personal access token with the minimum `read_api` scope access. + required: true + properties: + - !ruby/object:Api::Type::String + name: userTokenSecretVersion + description: 'Required. A SecretManager resource containing the user token that authorizes the Cloud Build connection. Format: `projects/*/secrets/*/versions/*`.' + required: true + diff_suppress_func: 'tpgresource.CompareSelfLinkOrResourceName' + - !ruby/object:Api::Type::String + name: username + description: Output only. The username associated to this token. + output: true + - !ruby/object:Api::Type::NestedObject + name: authorizerCredential + description: Required. A GitLab personal access token with the `api` scope access. + required: true + properties: + - !ruby/object:Api::Type::String + name: userTokenSecretVersion + description: 'Required. A SecretManager resource containing the user token that authorizes the Cloud Build connection. Format: `projects/*/secrets/*/versions/*`.' + required: true + diff_suppress_func: 'tpgresource.CompareSelfLinkOrResourceName' + - !ruby/object:Api::Type::String + name: username + description: Output only. The username associated to this token. + output: true + - !ruby/object:Api::Type::NestedObject + name: serviceDirectoryConfig + description: Configuration for using Service Directory to privately connect to a GitLab Enterprise server. This should only be set if the GitLab Enterprise server is hosted on-premises and not reachable by public internet. If this field is left empty, calls to the GitLab Enterprise server will be made over the public internet. + properties: + - !ruby/object:Api::Type::String + name: service + description: 'Required. The Service Directory service name. Format: projects/{project}/locations/{location}/namespaces/{namespace}/services/{service}.' + required: true + diff_suppress_func: 'tpgresource.CompareSelfLinkOrResourceName' + - !ruby/object:Api::Type::String + name: sslCa + description: SSL certificate to use for requests to GitLab Enterprise. + - !ruby/object:Api::Type::String + name: serverVersion + description: Output only. Version of the GitLab Enterprise server running on the `host_uri`. + output: true + - !ruby/object:Api::Type::NestedObject + name: installationState + description: Output only. Installation state of the Connection. + output: true + properties: + - !ruby/object:Api::Type::Enum + name: stage + description: Output only. Current step of the installation process. + output: true + values: + - :STAGE_UNSPECIFIED + - :PENDING_CREATE_APP + - :PENDING_USER_OAUTH + - :PENDING_INSTALL_APP + - :COMPLETE + - !ruby/object:Api::Type::String + name: message + description: Output only. Message of what the user should do next to continue the installation. Empty string if the installation is already complete. + output: true + - !ruby/object:Api::Type::String + name: actionUri + description: Output only. Link to follow for next action. Empty string if the installation is already complete. + output: true + - !ruby/object:Api::Type::Boolean + name: disabled + description: If disabled is set to true, functionality is disabled for this connection. Repository based API methods and webhooks processing for repositories in this connection will be disabled. + - !ruby/object:Api::Type::Boolean + name: reconciling + description: Output only. Set to true when the connection is being set up or updated in the background. + output: true + - !ruby/object:Api::Type::KeyValueAnnotations + name: annotations + description: Allows clients to store small amounts of arbitrary data. + - !ruby/object:Api::Type::Fingerprint + name: etag + description: This checksum is computed by the server based on the value of other fields, and may be sent on update and delete requests to ensure the client has an up-to-date value before proceeding. diff --git a/tpgtools/overrides/cloudbuildv2/samples/connection/ghe.tf.tmpl b/mmv1/templates/terraform/examples/cloudbuildv2_connection_ghe.tf.erb similarity index 100% rename from tpgtools/overrides/cloudbuildv2/samples/connection/ghe.tf.tmpl rename to mmv1/templates/terraform/examples/cloudbuildv2_connection_ghe.tf.erb diff --git a/tpgtools/overrides/cloudbuildv2/samples/connection/github.tf.tmpl b/mmv1/templates/terraform/examples/cloudbuildv2_connection_github.tf.erb similarity index 77% rename from tpgtools/overrides/cloudbuildv2/samples/connection/github.tf.tmpl rename to mmv1/templates/terraform/examples/cloudbuildv2_connection_github.tf.erb index 05bd5d6b81dc..0a37ce2b9276 100644 --- a/tpgtools/overrides/cloudbuildv2/samples/connection/github.tf.tmpl +++ b/mmv1/templates/terraform/examples/cloudbuildv2_connection_github.tf.erb @@ -14,8 +14,8 @@ resource "google_secret_manager_secret_version" "github-token-secret-version" { data "google_iam_policy" "p4sa-secretAccessor" { binding { role = "roles/secretmanager.secretAccessor" - // Here, {{projectNum}} is the Google Cloud project number for {{project}}. - members = ["serviceAccount:service-{{projectNum}}@gcp-sa-cloudbuild.iam.gserviceaccount.com"] + // Here, 123456789 is the Google Cloud project number for the project that contains the connection. + members = ["serviceAccount:service-123456789@gcp-sa-cloudbuild.iam.gserviceaccount.com"] } } @@ -25,11 +25,11 @@ resource "google_secret_manager_secret_iam_policy" "policy" { } resource "google_cloudbuildv2_connection" "my-connection" { - location = "{{region}}" + location = "us-central1" name = "my-connection" github_config { - app_installation_id = {{installation-id}} + app_installation_id = 123123 authorizer_credential { oauth_token_secret_version = google_secret_manager_secret_version.github-token-secret-version.id } diff --git a/mmv1/third_party/terraform/services/cloudbuildv2/resource_cloudbuildv2_connection_test.go b/mmv1/third_party/terraform/services/cloudbuildv2/resource_cloudbuildv2_connection_test.go new file mode 100644 index 000000000000..bdf4b9fce0a4 --- /dev/null +++ b/mmv1/third_party/terraform/services/cloudbuildv2/resource_cloudbuildv2_connection_test.go @@ -0,0 +1,679 @@ +package cloudbuildv2_test + +import ( + "testing" + + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-provider-google/google/acctest" + "github.com/hashicorp/terraform-provider-google/google/envvar" +) + +func TestAccCloudbuildv2Connection_GheCompleteConnection(t *testing.T) { + t.Parallel() + + context := map[string]interface{}{ + "project_name": envvar.GetTestProjectFromEnv(), + "region": envvar.GetTestRegionFromEnv(), + "random_suffix": acctest.RandString(t, 10), + } + + acctest.VcrTest(t, resource.TestCase{ + PreCheck: func() { acctest.AccTestPreCheck(t) }, + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories(t), + CheckDestroy: testAccCheckCloudbuildv2ConnectionDestroyProducer(t), + Steps: []resource.TestStep{ + { + Config: testAccCloudbuildv2Connection_GheCompleteConnection(context), + }, + { + ResourceName: "google_cloudbuildv2_connection.primary", + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"annotations", "name"}, + }, + }, + }) +} + +func TestAccCloudbuildv2Connection_GheConnection(t *testing.T) { + t.Parallel() + + context := map[string]interface{}{ + "project_name": envvar.GetTestProjectFromEnv(), + "region": envvar.GetTestRegionFromEnv(), + "random_suffix": acctest.RandString(t, 10), + } + + acctest.VcrTest(t, resource.TestCase{ + PreCheck: func() { acctest.AccTestPreCheck(t) }, + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories(t), + CheckDestroy: testAccCheckCloudbuildv2ConnectionDestroyProducer(t), + Steps: []resource.TestStep{ + { + Config: testAccCloudbuildv2Connection_GheConnection(context), + }, + { + ResourceName: "google_cloudbuildv2_connection.primary", + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"annotations"}, + }, + { + Config: testAccCloudbuildv2Connection_GheConnectionUpdate0(context), + }, + { + ResourceName: "google_cloudbuildv2_connection.primary", + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"annotations"}, + }, + }, + }) +} + +func TestAccCloudbuildv2Connection_GhePrivConnection(t *testing.T) { + t.Parallel() + + context := map[string]interface{}{ + "project_name": envvar.GetTestProjectFromEnv(), + "region": envvar.GetTestRegionFromEnv(), + "random_suffix": acctest.RandString(t, 10), + } + + acctest.VcrTest(t, resource.TestCase{ + PreCheck: func() { acctest.AccTestPreCheck(t) }, + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories(t), + CheckDestroy: testAccCheckCloudbuildv2ConnectionDestroyProducer(t), + Steps: []resource.TestStep{ + { + Config: testAccCloudbuildv2Connection_GhePrivConnection(context), + }, + { + ResourceName: "google_cloudbuildv2_connection.primary", + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"annotations"}, + }, + }, + }) +} + +func TestAccCloudbuildv2Connection_GhePrivUpdateConnection(t *testing.T) { + t.Parallel() + + context := map[string]interface{}{ + "project_name": envvar.GetTestProjectFromEnv(), + "region": envvar.GetTestRegionFromEnv(), + "random_suffix": acctest.RandString(t, 10), + } + + acctest.VcrTest(t, resource.TestCase{ + PreCheck: func() { acctest.AccTestPreCheck(t) }, + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories(t), + CheckDestroy: testAccCheckCloudbuildv2ConnectionDestroyProducer(t), + Steps: []resource.TestStep{ + { + Config: testAccCloudbuildv2Connection_GhePrivUpdateConnection(context), + }, + { + ResourceName: "google_cloudbuildv2_connection.primary", + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"annotations"}, + }, + { + Config: testAccCloudbuildv2Connection_GhePrivUpdateConnectionUpdate0(context), + }, + { + ResourceName: "google_cloudbuildv2_connection.primary", + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"annotations"}, + }, + }, + }) +} + +func TestAccCloudbuildv2Connection_GithubConnection(t *testing.T) { + t.Parallel() + + context := map[string]interface{}{ + "project_name": envvar.GetTestProjectFromEnv(), + "region": envvar.GetTestRegionFromEnv(), + "random_suffix": acctest.RandString(t, 10), + } + + acctest.VcrTest(t, resource.TestCase{ + PreCheck: func() { acctest.AccTestPreCheck(t) }, + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories(t), + CheckDestroy: testAccCheckCloudbuildv2ConnectionDestroyProducer(t), + Steps: []resource.TestStep{ + { + Config: testAccCloudbuildv2Connection_GithubConnection(context), + }, + { + ResourceName: "google_cloudbuildv2_connection.primary", + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"annotations"}, + }, + { + Config: testAccCloudbuildv2Connection_GithubConnectionUpdate0(context), + }, + { + ResourceName: "google_cloudbuildv2_connection.primary", + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"annotations"}, + }, + }, + }) +} + +func TestAccCloudbuildv2Connection_GitlabConnection(t *testing.T) { + t.Parallel() + + context := map[string]interface{}{ + "project_name": envvar.GetTestProjectFromEnv(), + "random_suffix": acctest.RandString(t, 10), + } + + acctest.VcrTest(t, resource.TestCase{ + PreCheck: func() { acctest.AccTestPreCheck(t) }, + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories(t), + CheckDestroy: testAccCheckCloudbuildv2ConnectionDestroyProducer(t), + Steps: []resource.TestStep{ + { + Config: testAccCloudbuildv2Connection_GitlabConnection(context), + }, + { + ResourceName: "google_cloudbuildv2_connection.primary", + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"annotations"}, + }, + }, + }) +} + +func TestAccCloudbuildv2Connection_GleConnection(t *testing.T) { + t.Parallel() + + context := map[string]interface{}{ + "project_name": envvar.GetTestProjectFromEnv(), + "random_suffix": acctest.RandString(t, 10), + } + + acctest.VcrTest(t, resource.TestCase{ + PreCheck: func() { acctest.AccTestPreCheck(t) }, + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories(t), + CheckDestroy: testAccCheckCloudbuildv2ConnectionDestroyProducer(t), + Steps: []resource.TestStep{ + { + Config: testAccCloudbuildv2Connection_GleConnection(context), + }, + { + ResourceName: "google_cloudbuildv2_connection.primary", + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"annotations"}, + }, + { + Config: testAccCloudbuildv2Connection_GleConnectionUpdate0(context), + }, + { + ResourceName: "google_cloudbuildv2_connection.primary", + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"annotations"}, + }, + }, + }) +} + +func TestAccCloudbuildv2Connection_GleOldConnection(t *testing.T) { + t.Parallel() + + context := map[string]interface{}{ + "project_name": envvar.GetTestProjectFromEnv(), + "random_suffix": acctest.RandString(t, 10), + } + + acctest.VcrTest(t, resource.TestCase{ + PreCheck: func() { acctest.AccTestPreCheck(t) }, + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories(t), + CheckDestroy: testAccCheckCloudbuildv2ConnectionDestroyProducer(t), + Steps: []resource.TestStep{ + { + Config: testAccCloudbuildv2Connection_GleOldConnection(context), + }, + { + ResourceName: "google_cloudbuildv2_connection.primary", + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"annotations"}, + }, + { + Config: testAccCloudbuildv2Connection_GleOldConnectionUpdate0(context), + }, + { + ResourceName: "google_cloudbuildv2_connection.primary", + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"annotations"}, + }, + }, + }) +} + +func TestAccCloudbuildv2Connection_GlePrivConnection(t *testing.T) { + t.Parallel() + + context := map[string]interface{}{ + "project_name": envvar.GetTestProjectFromEnv(), + "random_suffix": acctest.RandString(t, 10), + } + + acctest.VcrTest(t, resource.TestCase{ + PreCheck: func() { acctest.AccTestPreCheck(t) }, + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories(t), + CheckDestroy: testAccCheckCloudbuildv2ConnectionDestroyProducer(t), + Steps: []resource.TestStep{ + { + Config: testAccCloudbuildv2Connection_GlePrivConnection(context), + }, + { + ResourceName: "google_cloudbuildv2_connection.primary", + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"annotations"}, + }, + }, + }) +} + +func TestAccCloudbuildv2Connection_GlePrivUpdateConnection(t *testing.T) { + t.Parallel() + + context := map[string]interface{}{ + "project_name": envvar.GetTestProjectFromEnv(), + "random_suffix": acctest.RandString(t, 10), + } + + acctest.VcrTest(t, resource.TestCase{ + PreCheck: func() { acctest.AccTestPreCheck(t) }, + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories(t), + CheckDestroy: testAccCheckCloudbuildv2ConnectionDestroyProducer(t), + Steps: []resource.TestStep{ + { + Config: testAccCloudbuildv2Connection_GleConnection(context), + }, + { + ResourceName: "google_cloudbuildv2_connection.primary", + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"annotations"}, + }, + { + Config: testAccCloudbuildv2Connection_GlePrivConnection(context), + }, + { + ResourceName: "google_cloudbuildv2_connection.primary", + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"annotations"}, + }, + }, + }) +} + +func testAccCloudbuildv2Connection_GheCompleteConnection(context map[string]interface{}) string { + return acctest.Nprintf(` +resource "google_cloudbuildv2_connection" "primary" { + location = "%{region}" + name = "projects/%{project_name}/locations/%{region}/connections/tf-test-connection%{random_suffix}" + + github_enterprise_config { + host_uri = "https://ghe.proctor-staging-test.com" + app_id = 516 + app_installation_id = 243 + app_slug = "myapp" + private_key_secret_version = "projects/gcb-terraform-creds/secrets/ghe-private-key/versions/latest" + webhook_secret_secret_version = "projects/gcb-terraform-creds/secrets/ghe-webhook-secret/versions/latest" + } + + project = "%{project_name}" + annotations = {} +} + + +`, context) +} + +func testAccCloudbuildv2Connection_GheConnection(context map[string]interface{}) string { + return acctest.Nprintf(` +resource "google_cloudbuildv2_connection" "primary" { + location = "%{region}" + name = "tf-test-connection%{random_suffix}" + + github_enterprise_config { + host_uri = "https://ghe.proctor-staging-test.com" + } + + project = "%{project_name}" + annotations = {} +} + + +`, context) +} + +func testAccCloudbuildv2Connection_GheConnectionUpdate0(context map[string]interface{}) string { + return acctest.Nprintf(` +resource "google_cloudbuildv2_connection" "primary" { + location = "%{region}" + name = "tf-test-connection%{random_suffix}" + + github_enterprise_config { + host_uri = "https://ghe.proctor-staging-test.com" + app_id = 516 + app_installation_id = 243 + app_slug = "myapp" + private_key_secret_version = "projects/gcb-terraform-creds/secrets/ghe-private-key/versions/latest" + webhook_secret_secret_version = "projects/gcb-terraform-creds/secrets/ghe-webhook-secret/versions/latest" + } + + project = "%{project_name}" + annotations = {} +} + + +`, context) +} + +func testAccCloudbuildv2Connection_GhePrivConnection(context map[string]interface{}) string { + return acctest.Nprintf(` +resource "google_cloudbuildv2_connection" "primary" { + location = "%{region}" + name = "tf-test-connection%{random_suffix}" + + github_enterprise_config { + host_uri = "https://ghe.proctor-private-ca.com" + + service_directory_config { + service = "projects/gcb-ter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GAsCRdJHh65iUx/IH0C4Ux2UZRDZdj6wVbuVu9tb938xF\nyRuVClONoLSn/lwdzeV7hQmBSm8qmfgbNPbYRaNLz3hOpsT+27aDQp2/pxue8hFJ\nd7We3+Lr5O4IL45PBwhVEAiFZqde6d4qViNEB2qTAgMBAAGjYzBhMA4GA1UdDwEB\n/wQEAwIBBjAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBTkQGTiCkLCmv/Awxdz\n5TAVRmyFfDAfBgNVHSMEGDAWgBTkQGTiCkLCmv/Awxdz5TAVRmyFfDANBgkqhkiG\n9w0BAQsFAAOCAQEAfy5BJsWdx0oWWi7SFg9MbryWjBVPJl93UqACgG0Cgh813O/x\nlDZQhGO/ZFVhHz/WgooE/HgVNoVJTubKLLzz+zCkOB0wa3GMqJDyFjhFmUtd/3VM\nZh0ZQ+JWYsAiZW4VITj5xEn/d/B3xCFWGC1vhvhptEJ8Fo2cE1yM2pzk08NqFWoY\n4FaH0sbxWgyCKwTmtcYDbnx4FYuddryGCIxbYizqUK1dr4DGKeHonhm/d234Ew3x\n3vIBPoHMOfBec/coP1xAf5o+F+MRMO/sQ3tTGgyOH18lwsHo9SmXCrmOwVQPKrEw\nm+A+5TjXLmenyaBhqXa0vkAZYJhWdROhWC0VTA==\n-----END CERTIFICATE-----\n" + } + + project = "%{project_name}" + annotations = {} +} + + +`, context) +} + +func testAccCloudbuildv2Connection_GhePrivUpdateConnection(context map[string]interface{}) string { + return acctest.Nprintf(` +resource "google_cloudbuildv2_connection" "primary" { + location = "%{region}" + name = "tf-test-connection%{random_suffix}" + + github_enterprise_config { + host_uri = "https://ghe.proctor-staging-test.com" + } + + project = "%{project_name}" + annotations = {} +} + + +`, context) +} + +func testAccCloudbuildv2Connection_GhePrivUpdateConnectionUpdate0(context map[string]interface{}) string { + return acctest.Nprintf(` +resource "google_cloudbuildv2_connection" "primary" { + location = "%{region}" + name = "tf-test-connection%{random_suffix}" + + github_enterprise_config { + host_uri = "https://ghe.proctor-private-ca.com" + + service_directory_config { + service = "projects/gcb-terraform-creds/locations/%{region}/namespaces/myns/services/serv" + } + + ssl_ca = "-----BEGIN CERTIFICATE-----\nMIIEXTCCA0WgAwIBAgIUANaBCc9j/xdKJHU0sgmv6yE2WCIwDQYJKoZIhvcNAQEL\nBQAwLDEUMBIGA1UEChMLUHJvY3RvciBFbmcxFDASBgNVBAMTC1Byb2N0b3ItZW5n\nMB4XDTIxMDcxNTIwMDcwMloXDTIyMDcxNTIwMDcwMVowADCCASIwDQYJKoZIhvcN\nAQEBBQADggEPADCCAQoCggEBAMVel7I88DkhwW445BNPBZvJNTV1AreHdz4um4U1\nop2+4L7JeNrUs5SRc0fzeOyOmA9ZzTDu9hBC7zj/sVNUy6cIQGCj32sr5SCAEIat\nnFZlzmVqJPT4J5NAaE37KO5347myTJEBrvpq8az4CtvX0yUzPK0gbUmaSaztVi4o\ndbJLKyv575xCLC/Hu6fIHBDH19eG1Ath9VpuAOkttRRoxu2VqijJZrGqaS+0o+OX\nrLi5HMtZbZjgQB4mc1g3ZDKX/gynxr+CDNaqNOqxuog33Tl5OcOk9DrR3MInaE7F\nyQFuH9mzF64AqOoTf7Tr/eAIz5XVt8K51nk+fSybEfKVwtMCAwEAAaOCAaEwggGd\nMA4GA1UdDwEB/wQEAwIFoDAMBgNVHRMBAf8EAjAAMB0GA1UdDgQWBBQU/9dYyqMz\nv9rOMwPZcoIRMDAQCjAfBgNVHSMEGDAWgBTkQGTiCkLCmv/Awxdz5TAVRmyFfDCB\njQYIKwYBBQUHAQEEgYAwfjB8BggrBgEFBQcwAoZwaHR0cDovL3ByaXZhdGVjYS1j\nb250ZW50LTYxYWEyYzA5LTAwMDAtMjJjMi05ZjYyLWQ0ZjU0N2Y4MDIwMC5zdG9y\nYWdlLmdvb2dsZWFwaXMuY29tLzQxNGU4ZTJjZjU2ZWEyYzQxNmM0L2NhLmNydDAo\nBgNVHREBAf8EHjAcghpnaGUucHJvY3Rvci1wcml2YXRlLWNhLmNvbTC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ldoy+6OysB\nRu7dGDwicW5F9h7eSkpGAsCRdJHh65iUx/IH0C4Ux2UZRDZdj6wVbuVu9tb938xF\nyRuVClONoLSn/lwdzeV7hQmBSm8qmfgbNPbYRaNLz3hOpsT+27aDQp2/pxue8hFJ\nd7We3+Lr5O4IL45PBwhVEAiFZqde6d4qViNEB2qTAgMBAAGjYzBhMA4GA1UdDwEB\n/wQEAwIBBjAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBTkQGTiCkLCmv/Awxdz\n5TAVRmyFfDAfBgNVHSMEGDAWgBTkQGTiCkLCmv/Awxdz5TAVRmyFfDANBgkqhkiG\n9w0BAQsFAAOCAQEAfy5BJsWdx0oWWi7SFg9MbryWjBVPJl93UqACgG0Cgh813O/x\nlDZQhGO/ZFVhHz/WgooE/HgVNoVJTubKLLzz+zCkOB0wa3GMqJDyFjhFmUtd/3VM\nZh0ZQ+JWYsAiZW4VITj5xEn/d/B3xCFWGC1vhvhptEJ8Fo2cE1yM2pzk08NqFWoY\n4FaH0sbxWgyCKwTmtcYDbnx4FYuddryGCIxbYizqUK1dr4DGKeHonhm/d234Ew3x\n3vIBPoHMOfBec/coP1xAf5o+F+MRMO/sQ3tTGgyOH18lwsHo9SmXCrmOwVQPKrEw\nm+A+5TjXLmenyaBhqXa0vkAZYJhWdROhWC0VTA==\n-----END CERTIFICATE-----\n" + } + + project = "%{project_name}" + annotations = {} +} + + +`, context) +} + +func testAccCloudbuildv2Connection_GithubConnection(context map[string]interface{}) string { + return acctest.Nprintf(` +resource "google_cloudbuildv2_connection" "primary" { + location = "%{region}" + name = "tf-test-connection%{random_suffix}" + disabled = true + + github_config { + app_installation_id = 0 + + authorizer_credential { + oauth_token_secret_version = "projects/gcb-terraform-creds/secrets/github-pat/versions/1" + } + } + + project = "%{project_name}" + + annotations = { + somekey = "somevalue" + } +} + + +`, context) +} + +func testAccCloudbuildv2Connection_GithubConnectionUpdate0(context map[string]interface{}) string { + return acctest.Nprintf(` +resource "google_cloudbuildv2_connection" "primary" { + location = "%{region}" + name = "tf-test-connection%{random_suffix}" + disabled = false + + github_config { + app_installation_id = 31300675 + + authorizer_credential { + oauth_token_secret_version = "projects/gcb-terraform-creds/secrets/github-pat/versions/latest" + } + } + + project = "%{project_name}" + + annotations = { + otherkey = "othervalue" + + somekey = "somevalue" + } +} + + +`, context) +} + +func testAccCloudbuildv2Connection_GitlabConnection(context map[string]interface{}) string { + return acctest.Nprintf(` +resource "google_cloudbuildv2_connection" "primary" { + location = "us-west1" + name = "tf-test-connection%{random_suffix}" + + gitlab_config { + authorizer_credential { + user_token_secret_version = "projects/407304063574/secrets/gitlab-api-pat/versions/latest" + } + + read_authorizer_credential { + user_token_secret_version = "projects/407304063574/secrets/gitlab-read-pat/versions/latest" + } + + webhook_secret_secret_version = "projects/407304063574/secrets/gle-webhook-secret/versions/latest" + } + + project = "%{project_name}" + annotations = {} +} + + +`, context) +} + +func testAccCloudbuildv2Connection_GleConnection(context map[string]interface{}) string { + return acctest.Nprintf(` +resource "google_cloudbuildv2_connection" "primary" { + location = "us-west1" + name = "tf-test-connection%{random_suffix}" + + gitlab_config { + authorizer_credential { + user_token_secret_version = "projects/407304063574/secrets/gle-api-token/versions/latest" + } + + read_authorizer_credential { + user_token_secret_version = "projects/407304063574/secrets/gle-read-token/versions/latest" + } + + webhook_secret_secret_version = "projects/407304063574/secrets/gle-webhook-secret/versions/latest" + host_uri = "https://gle-us-central1.gcb-test.com" + } + + project = "%{project_name}" + annotations = {} +} + + +`, context) +} + +func testAccCloudbuildv2Connection_GleConnectionUpdate0(context map[string]interface{}) string { + return acctest.Nprintf(` +resource "google_cloudbuildv2_connection" "primary" { + location = "us-west1" + name = "tf-test-connection%{random_suffix}" + + gitlab_config { + authorizer_credential { + user_token_secret_version = "projects/407304063574/secrets/gle-old-api-token/versions/2" + } + + read_authorizer_credential { + user_token_secret_version = "projects/407304063574/secrets/gle-old-read-token/versions/3" + } + + webhook_secret_secret_version = "projects/407304063574/secrets/gle-webhook-secret/versions/latest" + host_uri = "https://gle-old.gcb-test.com" + } + + project = "%{project_name}" + annotations = {} +} + + +`, context) +} + +func testAccCloudbuildv2Connection_GleOldConnection(context map[string]interface{}) string { + return acctest.Nprintf(` +resource "google_cloudbuildv2_connection" "primary" { + location = "us-west1" + name = "tf-test-connection%{random_suffix}" + + gitlab_config { + authorizer_credential { + user_token_secret_version = "projects/407304063574/secrets/gle-old-api-token/versions/2" + } + + read_authorizer_credential { + user_token_secret_version = "projects/407304063574/secrets/gle-old-read-token/versions/3" + } + + webhook_secret_secret_version = "projects/407304063574/secrets/gle-webhook-secret/versions/latest" + host_uri = "https://gle-old.gcb-test.com" + } + + project = "%{project_name}" + annotations = {} +} + + +`, context) +} + +func testAccCloudbuildv2Connection_GleOldConnectionUpdate0(context map[string]interface{}) string { + return acctest.Nprintf(` +resource "google_cloudbuildv2_connection" "primary" { + location = "us-west1" + name = "tf-test-connection%{random_suffix}" + + gitlab_config { + authorizer_credential { + user_token_secret_version = "projects/407304063574/secrets/gle-api-token/versions/latest" + } + + read_authorizer_credential { + user_token_secret_version = "projects/407304063574/secrets/gle-read-token/versions/latest" + } + + webhook_secret_secret_version = "projects/407304063574/secrets/gle-webhook-secret/versions/latest" + host_uri = "https://gle-us-central1.gcb-test.com" + } + + project = "%{project_name}" + annotations = {} +} + + +`, context) +} + +func testAccCloudbuildv2Connection_GlePrivConnection(context map[string]interface{}) string { + return acctest.Nprintf(` +resource "google_cloudbuildv2_connection" "primary" { + location = "us-west1" + name = "tf-test-connection%{random_suffix}" + + gitlab_config { + authorizer_credential { + user_token_secret_version = "projects/407304063574/secrets/gle-private-api/versions/1" + } + + read_authorizer_credential { + user_token_secret_version = "projects/407304063574/secrets/gle-private-read-token/versions/1" + } + + webhook_secret_secret_version = "projects/407304063574/secrets/gle-webhook-secret/versions/latest" + host_uri = "https://gle-us.gle-us-private.com" + + service_directory_config { + service = "projects/407304063574/locations/us-west1/namespaces/private-conn/services/gitlab-private" + } + + ssl_ca = "-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GzFog+/f9mtjoHL\nplcmx0VWHBQ5KO9Aq4OR/86DSg5QRPk76W9k3cM2ShXMm3TmTBZ+taJFfjZo5jP+\n7PLt2z9grSvFSXh2jnMyAs2yP4c+WezOXZLijqROr378AGBaksQK0CP+CYjZRpn1\nvndr1njLbvSjIypwKgZROb4P6XVa\n-----END CERTIFICATE-----\n" + } + + project = "%{project_name}" + annotations = {} +} + + +`, context) +} diff --git a/tpgtools/api/cloudbuildv2/samples/ghe.repository.json b/tpgtools/api/cloudbuildv2/samples/ghe.repository.json deleted file mode 100755 index 63f88267fb86..000000000000 --- a/tpgtools/api/cloudbuildv2/samples/ghe.repository.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "project": "{{project}}", - "location": "{{region}}", - "connection": "{{ref:ghe_complete.connection.json:name}}", - "name": "{{repository}}", - "remoteUri": "https://ghe.proctor-staging-test.com/proctorteam/regional_test.git", - "annotations": { - "some-key": "some-value" - } -} diff --git a/tpgtools/api/cloudbuildv2/samples/ghe_complete.connection.json b/tpgtools/api/cloudbuildv2/samples/ghe_complete.connection.json deleted file mode 100755 index 4c8f5dba6460..000000000000 --- a/tpgtools/api/cloudbuildv2/samples/ghe_complete.connection.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "name": "{{connection}}", - "githubEnterpriseConfig": { - "hostUri": "https://ghe.proctor-staging-test.com", - "privateKeySecretVersion":"projects/gcb-terraform-creds/secrets/ghe-private-key/versions/latest", - "webhookSecretSecretVersion":"projects/gcb-terraform-creds/secrets/ghe-webhook-secret/versions/latest", - "appId":516, - "appSlug":"myapp", - "appInstallationId": 243 - }, - "project": "{{project}}", - "location": "{{region}}" -} diff --git a/tpgtools/api/cloudbuildv2/samples/ghe_complete_connection.yaml b/tpgtools/api/cloudbuildv2/samples/ghe_complete_connection.yaml deleted file mode 100755 index aa8975d661d7..000000000000 --- a/tpgtools/api/cloudbuildv2/samples/ghe_complete_connection.yaml +++ /dev/null @@ -1,26 +0,0 @@ -# Copyright 2023 Google LLC. All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -name: ghe_complete_connection -description: Creates a GitHub Enterprise connection. -type: connection -versions: -- ga -resource: samples/ghe_complete.connection.json -variables: -- name: connection - type: resource_name -- name: project - type: project -- name: region - type: region diff --git a/tpgtools/api/cloudbuildv2/samples/ghe_connection.yaml b/tpgtools/api/cloudbuildv2/samples/ghe_connection.yaml deleted file mode 100755 index 87f8316550a8..000000000000 --- a/tpgtools/api/cloudbuildv2/samples/ghe_connection.yaml +++ /dev/null @@ -1,29 +0,0 @@ -# Copyright 2023 Google LLC. All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -name: ghe_connection -description: Creates and updates a GitHub Enterprise connection. -type: connection -versions: -- ga -resource: samples/ghe_initial.connection.json -updates: -- resource: samples/ghe_complete.connection.json - dependencies: [] -variables: -- name: connection - type: resource_name -- name: project - type: project -- name: region - type: region diff --git a/tpgtools/api/cloudbuildv2/samples/ghe_initial.connection.json b/tpgtools/api/cloudbuildv2/samples/ghe_initial.connection.json deleted file mode 100755 index d9fa4a5477ce..000000000000 --- a/tpgtools/api/cloudbuildv2/samples/ghe_initial.connection.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "name": "{{connection}}", - "githubEnterpriseConfig": { - "hostUri": "https://ghe.proctor-staging-test.com" - }, - "project": "{{project}}", - "location": "{{region}}" -} diff --git a/tpgtools/api/cloudbuildv2/samples/ghe_priv.connection.json b/tpgtools/api/cloudbuildv2/samples/ghe_priv.connection.json deleted file mode 100755 index 5f979968ef88..000000000000 --- a/tpgtools/api/cloudbuildv2/samples/ghe_priv.connection.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "name": "{{connection}}", - "githubEnterpriseConfig": { - "hostUri": "https://ghe.proctor-private-ca.com", - "serviceDirectoryConfig": { - "service": "projects/gcb-terraform-creds/locations/{{region}}/namespaces/myns/services/serv" - }, - "sslCa": "-----BEGIN CERTIFICATE-----\nMIIEXTCCA0WgAwIBAgIUANaBCc9j/xdKJHU0sgmv6yE2WCIwDQYJKoZIhvcNAQEL\nBQAwLDEUMBIGA1UEChMLUHJvY3RvciBFbmcxFDASBgNVBAMTC1Byb2N0b3ItZW5n\nMB4XDTIxMDcxNTIwMDcwMloXDTIyMDcxNTIwMDcwMVowADCCASIwDQYJKoZIhvcN\nAQEBBQADggEPADCCAQoCggEBAMVel7I88DkhwW445BNPBZvJNTV1AreHdz4um4U1\nop2+4L7JeNrUs5SRc0fzeOyOmA9ZzTDu9hBC7zj/sVNUy6cIQGCj32sr5SCAEIat\nnFZlzmVqJPT4J5NAaE37KO5347myTJEBrvpq8az4CtvX0yUzPK0gbUmaSaztVi4o\ndbJLKyv575xCLC/Hu6fIHBDH19eG1Ath9VpuAOkttRRoxu2VqijJZrGqaS+0o+OX\nrLi5HMtZbZjgQB4mc1g3ZDKX/gynxr+CDNaqNOqxuog33Tl5OcOk9DrR3MInaE7F\nyQFuH9mzF64AqOoTf7Tr/eAIz5XVt8K51nk+fSybEfKVwtMCAwEAAaOCAaEwggGd\nMA4GA1UdDwEB/wQEAwIFoDAMBgNVHRMBAf8EAjAAMB0GA1UdDgQWBBQU/9dYyqMz\nv9rOMwPZcoIRMDAQCjAfBgNVHSMEGDAWgBTkQGTiCkLCmv/Awxdz5TAVRmyFfDCB\njQYIKwYBBQUHAQEEg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IGA1UEAxMLUHJvY3Rvci1lbmcwggEiMA0GCSqGSIb3DQEBAQUA\nA4IBDwAwggEKAoIBAQCYqJP5Qt90jIbld2dtuUV/zIkBFsTe4fapJfhBji03xBpN\nO1Yxj/jPSZ67Kdeoy0lEwvc2hL5FQGhIjLMR0mzOyN4fk/DZiA/4tAVi7hJyqpUC\n71JSwp7MwXL1b26CSE1MhcoCqA/E4iZxfJfF/ef4lhmC24UEmu8FEbldoy+6OysB\nRu7dGDwicW5F9h7eSkpGAsCRdJHh65iUx/IH0C4Ux2UZRDZdj6wVbuVu9tb938xF\nyRuVClONoLSn/lwdzeV7hQmBSm8qmfgbNPbYRaNLz3hOpsT+27aDQp2/pxue8hFJ\nd7We3+Lr5O4IL45PBwhVEAiFZqde6d4qViNEB2qTAgMBAAGjYzBhMA4GA1UdDwEB\n/wQEAwIBBjAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBTkQGTiCkLCmv/Awxdz\n5TAVRmyFfDAfBgNVHSMEGDAWgBTkQGTiCkLCmv/Awxdz5TAVRmyFfDANBgkqhkiG\n9w0BAQsFAAOCAQEAfy5BJsWdx0oWWi7SFg9MbryWjBVPJl93UqACgG0Cgh813O/x\nlDZQhGO/ZFVhHz/WgooE/HgVNoVJTubKLLzz+zCkOB0wa3GMqJDyFjhFmUtd/3VM\nZh0ZQ+JWYsAiZW4VITj5xEn/d/B3xCFWGC1vhvhptEJ8Fo2cE1yM2pzk08NqFWoY\n4FaH0sbxWgyCKwTmtcYDbnx4FYuddryGCIxbYizqUK1dr4DGKeHonhm/d234Ew3x\n3vIBPoHMOfBec/coP1xAf5o+F+MRMO/sQ3tTGgyOH18lwsHo9SmXCrmOwVQPKrEw\nm+A+5TjXLmenyaBhqXa0vkAZYJhWdROhWC0VTA==\n-----END CERTIFICATE-----\n" - }, - "project": "{{project}}", - "location": "{{region}}" -} diff --git a/tpgtools/api/cloudbuildv2/samples/ghe_priv_connection.yaml b/tpgtools/api/cloudbuildv2/samples/ghe_priv_connection.yaml deleted file mode 100755 index 73025a7cf763..000000000000 --- a/tpgtools/api/cloudbuildv2/samples/ghe_priv_connection.yaml +++ /dev/null @@ -1,26 +0,0 @@ -# Copyright 2023 Google LLC. All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -name: ghe_priv_connection -description: Creates a connection to a private server using Service Directory. -type: connection -versions: -- ga -resource: samples/ghe_priv.connection.json -variables: -- name: connection - type: resource_name -- name: project - type: project -- name: region - type: region diff --git a/tpgtools/api/cloudbuildv2/samples/ghe_priv_update_connection.yaml b/tpgtools/api/cloudbuildv2/samples/ghe_priv_update_connection.yaml deleted file mode 100755 index 5e12dbf3d70e..000000000000 --- a/tpgtools/api/cloudbuildv2/samples/ghe_priv_update_connection.yaml +++ /dev/null @@ -1,29 +0,0 @@ -# Copyright 2023 Google LLC. All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -name: ghe_priv_update_connection -description: Creates and updates a connection to a private server using Service Directory. -type: connection -versions: -- ga -resource: samples/ghe_initial.connection.json -updates: -- resource: samples/ghe_priv.connection.json - dependencies: [] -variables: -- name: connection - type: resource_name -- name: project - type: project -- name: region - type: region diff --git a/tpgtools/api/cloudbuildv2/samples/ghe_repository.yaml b/tpgtools/api/cloudbuildv2/samples/ghe_repository.yaml deleted file mode 100755 index 0e457ebaa459..000000000000 --- a/tpgtools/api/cloudbuildv2/samples/ghe_repository.yaml +++ /dev/null @@ -1,30 +0,0 @@ -# Copyright 2023 Google LLC. All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -name: ghe_repository -description: Creates a GitHub repository. -type: repository -versions: -- ga -resource: samples/ghe.repository.json -dependencies: -- samples/ghe_complete.connection.json -variables: -- name: connection - type: resource_name -- name: project - type: project -- name: region - type: region -- name: repository - type: resource_name diff --git a/tpgtools/api/cloudbuildv2/samples/github.repository.json b/tpgtools/api/cloudbuildv2/samples/github.repository.json deleted file mode 100755 index 8c809423b494..000000000000 --- a/tpgtools/api/cloudbuildv2/samples/github.repository.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "project": "{{project}}", - "location": "{{region}}", - "connection": "{{ref:github_update.connection.json:name}}", - "name": "{{repository}}", - "remoteUri": "https://github.com/gcb-repos-robot/tf-demo.git" -} diff --git a/tpgtools/api/cloudbuildv2/samples/github_connection.yaml b/tpgtools/api/cloudbuildv2/samples/github_connection.yaml deleted file mode 100755 index f96c3d242533..000000000000 --- a/tpgtools/api/cloudbuildv2/samples/github_connection.yaml +++ /dev/null @@ -1,29 +0,0 @@ -# Copyright 2023 Google LLC. All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -name: github_connection -description: Creates and updates a GitHub connection. -type: connection -versions: -- ga -resource: samples/github_initial.connection.json -updates: -- resource: samples/github_update.connection.json - dependencies: [] -variables: -- name: connection - type: resource_name -- name: project - type: project -- name: region - type: region diff --git a/tpgtools/api/cloudbuildv2/samples/github_initial.connection.json b/tpgtools/api/cloudbuildv2/samples/github_initial.connection.json deleted file mode 100755 index 2a651a6abe37..000000000000 --- a/tpgtools/api/cloudbuildv2/samples/github_initial.connection.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "name": "{{connection}}", - "githubConfig": { - "appInstallationId": 0, - "authorizerCredential": { - "oauthTokenSecretVersion": "projects/gcb-terraform-creds/secrets/github-pat/versions/1" - } - }, - "project": "{{project}}", - "location": "{{region}}", - "annotations": {"somekey": "somevalue"}, - "disabled": true -} diff --git a/tpgtools/api/cloudbuildv2/samples/github_repository.yaml b/tpgtools/api/cloudbuildv2/samples/github_repository.yaml deleted file mode 100755 index 416dc48815f9..000000000000 --- a/tpgtools/api/cloudbuildv2/samples/github_repository.yaml +++ /dev/null @@ -1,30 +0,0 @@ -# Copyright 2023 Google LLC. All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -name: github_repository -description: Creates a GitHub repository. -type: repository -versions: -- ga -resource: samples/github.repository.json -dependencies: -- samples/github_update.connection.json -variables: -- name: connection - type: resource_name -- name: project - type: project -- name: region - type: region -- name: repository - type: resource_name diff --git a/tpgtools/api/cloudbuildv2/samples/github_update.connection.json b/tpgtools/api/cloudbuildv2/samples/github_update.connection.json deleted file mode 100755 index edf9d0a78b16..000000000000 --- a/tpgtools/api/cloudbuildv2/samples/github_update.connection.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "name": "{{connection}}", - "githubConfig": { - "appInstallationId": 31300675, - "authorizerCredential": { - "oauthTokenSecretVersion": "projects/gcb-terraform-creds/secrets/github-pat/versions/latest" - } - }, - "project": "{{project}}", - "location": "{{region}}", - "annotations": { - "somekey": "somevalue", - "otherkey": "othervalue" - }, - "disabled": false -} diff --git a/tpgtools/api/cloudbuildv2/samples/gitlab.connection.json b/tpgtools/api/cloudbuildv2/samples/gitlab.connection.json deleted file mode 100755 index 6c64584d8859..000000000000 --- a/tpgtools/api/cloudbuildv2/samples/gitlab.connection.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "name": "{{connection}}", - "gitlabConfig": { - "authorizerCredential": { - "userTokenSecretVersion": "projects/407304063574/secrets/gitlab-api-pat/versions/latest" - }, - "readAuthorizerCredential": { - "userTokenSecretVersion": "projects/407304063574/secrets/gitlab-read-pat/versions/latest" - }, - "webhookSecretSecretVersion":"projects/407304063574/secrets/gle-webhook-secret/versions/latest" - }, - "project": "{{project}}", - "location": "us-west1" -} diff --git a/tpgtools/api/cloudbuildv2/samples/gitlab.repository.json b/tpgtools/api/cloudbuildv2/samples/gitlab.repository.json deleted file mode 100755 index 83d58f1e374c..000000000000 --- a/tpgtools/api/cloudbuildv2/samples/gitlab.repository.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "project": "{{project}}", - "location": "us-west1", - "connection": "{{ref:gitlab.connection.json:name}}", - "name": "{{repository}}", - "remoteUri": "https://gitlab.com/proctor-eng-team/terraform-testing.git", - "annotations": { - "some-key": "some-value" - } -} diff --git a/tpgtools/api/cloudbuildv2/samples/gitlab_connection.yaml b/tpgtools/api/cloudbuildv2/samples/gitlab_connection.yaml deleted file mode 100755 index af304f627f0f..000000000000 --- a/tpgtools/api/cloudbuildv2/samples/gitlab_connection.yaml +++ /dev/null @@ -1,24 +0,0 @@ -# Copyright 2023 Google LLC. All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -name: gitlab_connection -description: Creates a gitlab.com connection. -type: connection -versions: -- ga -resource: samples/gitlab.connection.json -variables: -- name: connection - type: resource_name -- name: project - type: project diff --git a/tpgtools/api/cloudbuildv2/samples/gitlab_repository.yaml b/tpgtools/api/cloudbuildv2/samples/gitlab_repository.yaml deleted file mode 100755 index 8c6ec92cff67..000000000000 --- a/tpgtools/api/cloudbuildv2/samples/gitlab_repository.yaml +++ /dev/null @@ -1,28 +0,0 @@ -# Copyright 2023 Google LLC. All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -name: gitlab_repository -description: Creates a gitlab repository. -type: repository -versions: -- ga -resource: samples/gitlab.repository.json -dependencies: -- samples/gitlab.connection.json -variables: -- name: connection - type: resource_name -- name: project - type: project -- name: repository - type: resource_name diff --git a/tpgtools/api/cloudbuildv2/samples/gle.connection.json b/tpgtools/api/cloudbuildv2/samples/gle.connection.json deleted file mode 100755 index b12e32c9eb29..000000000000 --- a/tpgtools/api/cloudbuildv2/samples/gle.connection.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "name": "{{connection}}", - "gitlabConfig": { - "hostUri": "https://gle-us-central1.gcb-test.com", - "authorizerCredential": { - "userTokenSecretVersion": "projects/407304063574/secrets/gle-api-token/versions/latest" - }, - "readAuthorizerCredential": { - "userTokenSecretVersion": "projects/407304063574/secrets/gle-read-token/versions/latest" - }, - "webhookSecretSecretVersion":"projects/407304063574/secrets/gle-webhook-secret/versions/latest" - }, - "project": "{{project}}", - "location": "us-west1" -} diff --git a/tpgtools/api/cloudbuildv2/samples/gle.repository.json b/tpgtools/api/cloudbuildv2/samples/gle.repository.json deleted file mode 100755 index 0f04872dd47f..000000000000 --- a/tpgtools/api/cloudbuildv2/samples/gle.repository.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "project": "{{project}}", - "location": "us-west1", - "connection": "{{ref:gle.connection.json:name}}", - "name": "{{repository}}", - "remoteUri": "https://gle-us-central1.gcb-test.com/proctor-test/smoketest.git", - "annotations": { - "some-key": "some-value" - } -} diff --git a/tpgtools/api/cloudbuildv2/samples/gle_connection.yaml b/tpgtools/api/cloudbuildv2/samples/gle_connection.yaml deleted file mode 100755 index 08c141636bb1..000000000000 --- a/tpgtools/api/cloudbuildv2/samples/gle_connection.yaml +++ /dev/null @@ -1,27 +0,0 @@ -# Copyright 2023 Google LLC. All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -name: gle_connection -description: Creates a GLE connection then update to an older version. -type: connection -versions: -- ga -resource: samples/gle.connection.json -updates: -- resource: samples/gle_old.connection.json - dependencies: [] -variables: -- name: connection - type: resource_name -- name: project - type: project diff --git a/tpgtools/api/cloudbuildv2/samples/gle_old.connection.json b/tpgtools/api/cloudbuildv2/samples/gle_old.connection.json deleted file mode 100755 index fe441053ea8a..000000000000 --- a/tpgtools/api/cloudbuildv2/samples/gle_old.connection.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "name": "{{connection}}", - "gitlabConfig": { - "hostUri": "https://gle-old.gcb-test.com", - "authorizerCredential": { - "userTokenSecretVersion": "projects/407304063574/secrets/gle-old-api-token/versions/2" - }, - "readAuthorizerCredential": { - "userTokenSecretVersion": "projects/407304063574/secrets/gle-old-read-token/versions/3" - }, - "webhookSecretSecretVersion":"projects/407304063574/secrets/gle-webhook-secret/versions/latest" - }, - "project": "{{project}}", - "location": "us-west1" -} diff --git a/tpgtools/api/cloudbuildv2/samples/gle_old_connection.yaml b/tpgtools/api/cloudbuildv2/samples/gle_old_connection.yaml deleted file mode 100755 index ba81509db2c7..000000000000 --- a/tpgtools/api/cloudbuildv2/samples/gle_old_connection.yaml +++ /dev/null @@ -1,27 +0,0 @@ -# Copyright 2023 Google LLC. All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -name: gle_old_connection -description: Creates a GLE connection on an old version then update to a newer version. -type: connection -versions: -- ga -resource: samples/gle_old.connection.json -updates: -- resource: samples/gle.connection.json - dependencies: [] -variables: -- name: connection - type: resource_name -- name: project - type: project diff --git a/tpgtools/api/cloudbuildv2/samples/gle_priv_connection.yaml b/tpgtools/api/cloudbuildv2/samples/gle_priv_connection.yaml deleted file mode 100755 index 9a416479ae7b..000000000000 --- a/tpgtools/api/cloudbuildv2/samples/gle_priv_connection.yaml +++ /dev/null @@ -1,24 +0,0 @@ -# Copyright 2023 Google LLC. All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -name: gle_priv_connection -description: Creates a connection to a private server using Service Directory. -type: connection -versions: -- ga -resource: samples/gle_priv.connection.json -variables: -- name: connection - type: resource_name -- name: project - type: project diff --git a/tpgtools/api/cloudbuildv2/samples/gle_priv_update_connection.yaml b/tpgtools/api/cloudbuildv2/samples/gle_priv_update_connection.yaml deleted file mode 100755 index d38c63343248..000000000000 --- a/tpgtools/api/cloudbuildv2/samples/gle_priv_update_connection.yaml +++ /dev/null @@ -1,27 +0,0 @@ -# Copyright 2023 Google LLC. All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -name: gle_priv_update_connection -description: Creates and updates a connection to a private server using Service Directory. -type: connection -versions: -- ga -resource: samples/gle.connection.json -updates: -- resource: samples/gle_priv.connection.json - dependencies: [] -variables: -- name: connection - type: resource_name -- name: project - type: project diff --git a/tpgtools/api/cloudbuildv2/samples/gle_repository.yaml b/tpgtools/api/cloudbuildv2/samples/gle_repository.yaml deleted file mode 100755 index 11997f3a30e2..000000000000 --- a/tpgtools/api/cloudbuildv2/samples/gle_repository.yaml +++ /dev/null @@ -1,28 +0,0 @@ -# Copyright 2023 Google LLC. All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -name: gle_repository -description: Creates a GLE repository. -type: repository -versions: -- ga -resource: samples/gle.repository.json -dependencies: -- samples/gle.connection.json -variables: -- name: connection - type: resource_name -- name: project - type: project -- name: repository - type: resource_name diff --git a/tpgtools/api/cloudbuildv2/samples/gle_update.connection.json b/tpgtools/api/cloudbuildv2/samples/gle_update.connection.json deleted file mode 100755 index 2a77427c701a..000000000000 --- a/tpgtools/api/cloudbuildv2/samples/gle_update.connection.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "name": "{{connection}}", - "gitlabConfig": { - "hostUri": "https://gle-us-central1.gcb-test.com", - "authorizerCredential": { - "userTokenSecretVersion": "projects/212465313333/secrets/proctor-repo-gle-api-token/versions/latest" - }, - "webhookSecretSecretVersion":"projects/407304063574/secrets/gle-webhook-secret/versions/latest" - }, - "project": "{{project}}", - "annotations": {"somekey": "somevalue"}, - "location": "{{region}}" -} diff --git a/tpgtools/overrides/cloudbuildv2/beta/connection.yaml b/tpgtools/overrides/cloudbuildv2/beta/connection.yaml deleted file mode 100644 index af851d79a0c9..000000000000 --- a/tpgtools/overrides/cloudbuildv2/beta/connection.yaml +++ /dev/null @@ -1,4 +0,0 @@ -- type: CUSTOMIZE_DIFF - details: - functions: - - tpgresource.DefaultProviderProject diff --git a/tpgtools/overrides/cloudbuildv2/beta/tpgtools_product.yaml b/tpgtools/overrides/cloudbuildv2/beta/tpgtools_product.yaml deleted file mode 100644 index dd8f9eabb9de..000000000000 --- a/tpgtools/overrides/cloudbuildv2/beta/tpgtools_product.yaml +++ /dev/null @@ -1,9 +0,0 @@ -## product level overrides - -- type: PRODUCT_DOCS_SECTION - details: - docssection: Cloud Build v2 - -- type: PRODUCT_BASE_PATH - details: - skip: true diff --git a/tpgtools/overrides/cloudbuildv2/connection.yaml b/tpgtools/overrides/cloudbuildv2/connection.yaml deleted file mode 100644 index af851d79a0c9..000000000000 --- a/tpgtools/overrides/cloudbuildv2/connection.yaml +++ /dev/null @@ -1,4 +0,0 @@ -- type: CUSTOMIZE_DIFF - details: - functions: - - tpgresource.DefaultProviderProject diff --git a/tpgtools/overrides/cloudbuildv2/samples/connection/github.yaml b/tpgtools/overrides/cloudbuildv2/samples/connection/github.yaml deleted file mode 100644 index fedc68b1c72a..000000000000 --- a/tpgtools/overrides/cloudbuildv2/samples/connection/github.yaml +++ /dev/null @@ -1,16 +0,0 @@ -name: GitHub Connection -description: Creates a Connection to github.com -variables: - - name: "project" - type: "project" - - name: "projectNum" - type: "project_number" - docs_value: 123456789 - - name: "region" - type: "region" - - name: "github-token-secret" - type: "resource_name" - - name: "installation-id" - type: "custom" - docs_value: 123123 - diff --git a/tpgtools/overrides/cloudbuildv2/samples/connection/meta.yaml b/tpgtools/overrides/cloudbuildv2/samples/connection/meta.yaml deleted file mode 100644 index 5703e8f9d682..000000000000 --- a/tpgtools/overrides/cloudbuildv2/samples/connection/meta.yaml +++ /dev/null @@ -1,20 +0,0 @@ -test_hide: -# These examples are a good approximation of how users will use the resources, -# however they cannot be executed as tests because they depend on external -# resources (github repos and credentials). -- github.yaml -- github.tf.tmpl -- ghe.tf.tmpl -doc_hide: -# These tests depend on secrets stored in a separate project, so we prefer not -# to show them in the docs. -- github_connection.yaml -- ghe_connection.yaml -- ghe_complete_connection.yaml -- ghe_priv_connection.yaml -- ghe_priv_update_connection.yaml -- gitlab_connection.yaml -- gle_connection.yaml -- gle_old_connection.yaml -- gle_priv_connection.yaml -- gle_priv_update_connection.yaml diff --git a/tpgtools/overrides/cloudbuildv2/tpgtools_product.yaml b/tpgtools/overrides/cloudbuildv2/tpgtools_product.yaml deleted file mode 100644 index dd8f9eabb9de..000000000000 --- a/tpgtools/overrides/cloudbuildv2/tpgtools_product.yaml +++ /dev/null @@ -1,9 +0,0 @@ -## product level overrides - -- type: PRODUCT_DOCS_SECTION - details: - docssection: Cloud Build v2 - -- type: PRODUCT_BASE_PATH - details: - skip: true