Skip to content

Marked colab notebook execution tests that rely on dataform as min_version beta #9266

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

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .changelog/13003.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:none

```
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ func TestAccColabNotebookExecution_colabNotebookExecutionFullExample(t *testing.

acctest.VcrTest(t, resource.TestCase{
PreCheck: func() { acctest.AccTestPreCheck(t) },
ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories(t),
ProtoV5ProviderFactories: acctest.ProtoV5ProviderBetaFactories(t),
CheckDestroy: testAccCheckColabNotebookExecutionDestroyProducer(t),
Steps: []resource.TestStep{
{
Expand All @@ -170,6 +170,7 @@ func TestAccColabNotebookExecution_colabNotebookExecutionFullExample(t *testing.
func testAccColabNotebookExecution_colabNotebookExecutionFullExample(context map[string]interface{}) string {
return acctest.Nprintf(`
resource "google_colab_runtime_template" "my_runtime_template" {
provider = google-beta
name = "tf-test-runtime-template-name%{random_suffix}"
display_name = "Runtime template"
location = "us-central1"
Expand All @@ -184,13 +185,15 @@ resource "google_colab_runtime_template" "my_runtime_template" {
}

resource "google_storage_bucket" "output_bucket" {
provider = google-beta
name = "tf_test_my_bucket%{random_suffix}"
location = "US"
force_destroy = true
uniform_bucket_level_access = true
}

resource "google_storage_bucket_object" "notebook" {
provider = google-beta
name = "hello_world.ipynb"
bucket = google_storage_bucket.output_bucket.name
content = <<EOF
Expand Down Expand Up @@ -232,6 +235,7 @@ resource "google_storage_bucket_object" "notebook" {
}

resource "google_colab_notebook_execution" "notebook-execution" {
provider = google-beta
notebook_execution_job_id = "tf-test-colab-notebook-execution%{random_suffix}"
display_name = "Notebook execution full"
location = "us-central1"
Expand Down Expand Up @@ -275,7 +279,7 @@ func TestAccColabNotebookExecution_colabNotebookExecutionDataformExample(t *test

acctest.VcrTest(t, resource.TestCase{
PreCheck: func() { acctest.AccTestPreCheck(t) },
ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories(t),
ProtoV5ProviderFactories: acctest.ProtoV5ProviderBetaFactories(t),
CheckDestroy: testAccCheckColabNotebookExecutionDestroyProducer(t),
Steps: []resource.TestStep{
{
Expand All @@ -294,6 +298,7 @@ func TestAccColabNotebookExecution_colabNotebookExecutionDataformExample(t *test
func testAccColabNotebookExecution_colabNotebookExecutionDataformExample(context map[string]interface{}) string {
return acctest.Nprintf(`
resource "google_colab_runtime_template" "my_runtime_template" {
provider = google-beta
name = "tf-test-runtime-template-name%{random_suffix}"
display_name = "Runtime template"
location = "us-central1"
Expand All @@ -308,13 +313,15 @@ resource "google_colab_runtime_template" "my_runtime_template" {
}

resource "google_storage_bucket" "output_bucket" {
provider = google-beta
name = "tf_test_my_bucket%{random_suffix}"
location = "US"
force_destroy = true
uniform_bucket_level_access = true
}

resource "google_secret_manager_secret" "secret" {
provider = google-beta
secret_id = "secret%{random_suffix}"

replication {
Expand All @@ -323,12 +330,14 @@ resource "google_secret_manager_secret" "secret" {
}

resource "google_secret_manager_secret_version" "secret_version" {
provider = google-beta
secret = google_secret_manager_secret.secret.id

secret_data = "secret-data"
}

resource "google_dataform_repository" "dataform_repository" {
provider = google-beta
name = "tf-test-dataform-repository%{random_suffix}"
display_name = "dataform_repository"
npmrc_environment_variables_secret_version = google_secret_manager_secret_version.secret_version.id
Expand All @@ -353,6 +362,7 @@ resource "google_dataform_repository" "dataform_repository" {
}

resource "google_colab_notebook_execution" "notebook-execution" {
provider = google-beta
display_name = "Notebook execution Dataform"
location = "us-central1"

Expand Down
10 changes: 10 additions & 0 deletions website/docs/r/colab_notebook_execution.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ resource "google_colab_notebook_execution" "notebook-execution" {

```hcl
resource "google_colab_runtime_template" "my_runtime_template" {
provider = google-beta
name = "runtime-template-name"
display_name = "Runtime template"
location = "us-central1"
Expand All @@ -129,13 +130,15 @@ resource "google_colab_runtime_template" "my_runtime_template" {
}

resource "google_storage_bucket" "output_bucket" {
provider = google-beta
name = "my_bucket"
location = "US"
force_destroy = true
uniform_bucket_level_access = true
}

resource "google_storage_bucket_object" "notebook" {
provider = google-beta
name = "hello_world.ipynb"
bucket = google_storage_bucket.output_bucket.name
content = <<EOF
Expand Down Expand Up @@ -177,6 +180,7 @@ resource "google_storage_bucket_object" "notebook" {
}

resource "google_colab_notebook_execution" "notebook-execution" {
provider = google-beta
notebook_execution_job_id = "colab-notebook-execution"
display_name = "Notebook execution full"
location = "us-central1"
Expand Down Expand Up @@ -205,6 +209,7 @@ resource "google_colab_notebook_execution" "notebook-execution" {

```hcl
resource "google_colab_runtime_template" "my_runtime_template" {
provider = google-beta
name = "runtime-template-name"
display_name = "Runtime template"
location = "us-central1"
Expand All @@ -219,13 +224,15 @@ resource "google_colab_runtime_template" "my_runtime_template" {
}

resource "google_storage_bucket" "output_bucket" {
provider = google-beta
name = "my_bucket"
location = "US"
force_destroy = true
uniform_bucket_level_access = true
}

resource "google_secret_manager_secret" "secret" {
provider = google-beta
secret_id = "secret"

replication {
Expand All @@ -234,12 +241,14 @@ resource "google_secret_manager_secret" "secret" {
}

resource "google_secret_manager_secret_version" "secret_version" {
provider = google-beta
secret = google_secret_manager_secret.secret.id

secret_data = "secret-data"
}

resource "google_dataform_repository" "dataform_repository" {
provider = google-beta
name = "dataform-repository"
display_name = "dataform_repository"
npmrc_environment_variables_secret_version = google_secret_manager_secret_version.secret_version.id
Expand All @@ -264,6 +273,7 @@ resource "google_dataform_repository" "dataform_repository" {
}

resource "google_colab_notebook_execution" "notebook-execution" {
provider = google-beta
display_name = "Notebook execution Dataform"
location = "us-central1"

Expand Down