An argument named versioning is not expected here Did you mean to define a block of type versioning

0 votes

Hi Guys,

I am trying to create a GCS bucket using Terraform. But it is showing me the below error.

An argument named "versioning" is not expected here. Did you mean to define a block of type "versioning"?
Dec 1, 2020 in Terraform by akhtar
• 38,260 points
2,930 views

1 answer to this question.

0 votes

Hi@akhtar,

The error is telling that you need to enable versioning in the bucket. You can see the below example.

resource "google_storage_bucket" "foo" {
    ...
    versioning {
      enabled = true
    }
}
answered Dec 1, 2020 by MD
• 95,460 points

Related Questions In Terraform

0 votes
1 answer

'terraform' is not recognized as an internal or external command, operable program or batch file.

Hi@akhtar, You have to set an environment variable ...READ MORE

answered Jun 10, 2020 in Terraform by MD
• 95,460 points
29,079 views
0 votes
1 answer
0 votes
1 answer

Error:No credentials loaded. To use your gcloud credentials, run 'gcloud auth application-default login'.

Hi@akhtar, You are trying to connect the GCP ...READ MORE

answered Sep 12, 2020 in Terraform by MD
• 95,460 points
4,645 views
0 votes
1 answer

How to use GCP provider in Terraform?

Hi@akhtar, Terraform supports many providers to deploy the ...READ MORE

answered Sep 12, 2020 in Terraform by MD
• 95,460 points
709 views
0 votes
1 answer

How to launch an instance in GCP using Terraform?

Hi@akhtar, You can use the google_compute_instance resource in ...READ MORE

answered Sep 12, 2020 in Terraform by MD
• 95,460 points
839 views
0 votes
1 answer
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP