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

google_compute_firewall provider does not recognize enable logging #5337

Closed
ghost opened this issue Jan 8, 2020 · 5 comments
Closed

google_compute_firewall provider does not recognize enable logging #5337

ghost opened this issue Jan 8, 2020 · 5 comments
Assignees
Labels

Comments

@ghost
Copy link

ghost commented Jan 8, 2020

This issue was originally opened by @srisurya777 as hashicorp/terraform#23806. It was migrated here as a result of the provider split. The original body of the issue is below.


Hello there,

I have been trying to deploy firewall on google cloud with terraform. Google_compute_firewall terraform official document has the argument reference "enable_logging". However, it throws the following error when I use it in my file.

Error: Unsupported argument

on main.tf line 22, in resource "google_compute_firewall" "default_firewall":
22: enable_logging = true

An argument named "enable_logging" is not expected here.

@edwardmedia
Copy link
Contributor

@@srisurya777 can you share your configuration files, so I can repro the issue? What versions (terraform and google provider) are you using? It will be good if you can attach the full debug log when this happens. Thanks

@srisurya777
Copy link

provider "google" {
version = "~> 2.5"
project = var.gcloud_project_name
region = var.gcloud_region
}

provider "google-beta" {
version = "~> 2.5"
project = var.project
region = var.region
}

resource "google_compute_firewall" "default_firewall" {
name = "${var.deployment_prefix}-https-base"
network = var.network
allow {
protocol = "tcp"
ports = ["443"]
}
enable_logging = true
}

Above is my configuration terraform file.

when I try to run the terraform apply I get the error as posted in my previous post.

Attached is the debug file as per your requirement.
tflogs.txt

@ghost ghost removed the waiting-response label Jan 8, 2020
@edwardmedia
Copy link
Contributor

@srisurya777 this field is not supported in provider's early version. I just tested your code in terraform-provider-google_v3.4.0, and it is accepted. Please upgrade your provider version and try again. I am closing this issue. If you still see an issue or need further discussion, please reopen this issue or another one accordingly. Thanks.

@srisurya777
Copy link

While I am going back and forth for an enhancement #5361 in adapting to the latest version of provider, its likely that I stick to the 2.x version. Hence, the enable_logging field will not be working.

I will be happy to take any suggestions you offer.

@ghost
Copy link
Author

ghost commented Feb 8, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 hashibot-feedback@hashicorp.com. Thanks!

@ghost ghost locked and limited conversation to collaborators Feb 8, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants