Skip to content

Commit

Permalink
Changes to metadata files
Browse files Browse the repository at this point in the history
  • Loading branch information
m-strzelczyk committed Jan 2, 2024
1 parent d1a08f8 commit 8addb33
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 15 deletions.
6 changes: 3 additions & 3 deletions products/compute/metadata/delete_template.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ description = "Deletes an instance template from a project."
standalone = true
deprecated = false
# What kinds of preconditions needs to be met. Natural language. (optional)
requirements = "The template must exist... No special requirements or hidden catches here."
requirements_desc = "The template must exist... No special requirements or hidden catches here."
# What will happen when the code sample in the region tag gets executed. Natural Language. (optional)
effects = "The template gets deleted."
effects_desc = "The template gets deleted."

[requirements]
# List of services that need to be enabled for the sample (and tests) to work.
Expand Down Expand Up @@ -69,7 +69,7 @@ commands = ["gcloud compute instance-templates delete --quiet $TEMPLATE_NAME ||

[tests.python]
# We can specify which versions of a language we want to test against.
versions = ["3.8", "3.12"]
versions = ["3.11"]
# Legacy tests skip setup, cleanup and check. They only execute the method pointed to and check if it failed.
legacy = false
file = "../python/templates/delete.py"
Expand Down
4 changes: 2 additions & 2 deletions products/storage/metadata/storage_move_file.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ description = "Moves or renames a file inside a storage bucket. Not suitable to
standalone = true
deprecated = false
# What kinds of preconditions needs to be met. Natural language. (optional)
requirements = "The bucket and the file must exist. User needs to have write permission to the bucket."
requirements_desc = "The bucket and the file must exist. User needs to have write permission to the bucket."
# What will happen when the code sample in the region tag gets executed. Natural Language. (optional)
effects = "File is moved/renamed."
effects_desc = "File is moved/renamed."

[requirements]
# List of services that need to be enabled for the sample (and tests) to work.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,19 @@
* limitations under the License.
*/

variable "bucket_name" {
variable "BUCKET_NAME" {
type = string
}
variable "new_bucket_name" {

variable "NEW_BUCKET_NAME" {
type = string
}
variable "file_name" {
variable "FILE_NAME" {
type = string
}

resource "google_storage_bucket" "default" {
name = var.bucket_name
name = var.BUCKET_NAME
location = "EU"
force_destroy = true

Expand All @@ -34,7 +35,7 @@ resource "google_storage_bucket" "default" {
}

resource "google_storage_bucket" "default2" {
name = var.new_bucket_name
name = var.NEW_BUCKET_NAME
location = "EU"
force_destroy = true

Expand All @@ -43,7 +44,7 @@ resource "google_storage_bucket" "default2" {
}

resource "google_storage_bucket_object" "default" {
name = var.file_name
name = var.FILE_NAME
content = " this is the content! "
bucket = google_storage_bucket.default.name
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,16 @@
* limitations under the License.
*/

variable "bucket_name" {
variable "BUCKET_NAME" {
type = string
}
variable "file_name" {

variable "FILE_NAME" {
type = string
}

resource "google_storage_bucket" "default" {
name = var.bucket_name
name = var.BUCKET_NAME
location = "EU"
force_destroy = true

Expand All @@ -31,7 +32,7 @@ resource "google_storage_bucket" "default" {
}

resource "google_storage_bucket_object" "default" {
name = var.file_name
name = var.FILE_NAME
content = " this is the content! "
bucket = google_storage_bucket.default.name
}
Expand Down

0 comments on commit 8addb33

Please sign in to comment.