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

service_account.scopes doesn't accept "trace" alias #8495

Closed
ymotongpoo opened this issue Feb 18, 2021 · 3 comments
Closed

service_account.scopes doesn't accept "trace" alias #8495

ymotongpoo opened this issue Feb 18, 2021 · 3 comments
Labels

Comments

@ymotongpoo
Copy link

ymotongpoo commented Feb 18, 2021

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request.
  • Please do not leave +1 or me too comments, they generate extra noise for issue followers and do not help prioritize the request.
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment.
  • If an issue is assigned to the modular-magician user, it is either in the process of being autogenerated, or is planned to be autogenerated soon. If an issue is assigned to a user, that user is claiming responsibility for the issue. If an issue is assigned to hashibot, a community member has claimed the issue already.

Terraform Version

$ terraform -v
Terraform v0.14.7
+ provider registry.terraform.io/hashicorp/google v3.57.0

Affected Resource(s)

  • google_compute_instance

Terraform Configuration Files

$ cat test.tf
provider "google" {
    project = "test-project"
    zone = "us-central1-b"
    region = "us-central"
}
resource "google_compute_instance" "test" {
    name = "scope-test"
    machine_type = "e2-standard-2"
    zone = "us-central1-b"
    tags = ["test"]

    boot_disk {
        initialize_params {
            image = "debian-cloud/debian-10"
        }
    }

    network_interface {
        network = "default"
        access_config {}
    }

    service_account {
        scopes = ["compute-rw", "logging-write", "monitoring", "trace"]
    }
}

Debug Output

https://gist.github.com/ymotongpoo/dcf3d55ffd69e9d75daae4e8e313f305

Panic Output

Expected Behavior

Create a google compute engine instance that has "https://www.googleapis.com/auth/trace.append" scope.

Actual Behavior

The shorthand scope "trace" was not recognized and failed to create an instance though the alias is listed here.

Steps to Reproduce

  1. terraform apply

Important Factoids

FQDN of the scope, i.e. https://www.googleapis.com/auth/trace.append worked without any issue.

References

@ghost ghost added bug labels Feb 18, 2021
@ymotongpoo ymotongpoo changed the title service_account.scope doesn't accept "trace" shorthand service_account.scopes doesn't accept "trace" alias Feb 18, 2021
@ymotongpoo
Copy link
Author

The map to resolve trace is not matching the list on the official document.

"bigquery": "https://www.googleapis.com/auth/bigquery",
"cloud-platform": "https://www.googleapis.com/auth/cloud-platform",
"cloud-source-repos": "https://www.googleapis.com/auth/source.full_control",
"cloud-source-repos-ro": "https://www.googleapis.com/auth/source.read_only",
"compute-ro": "https://www.googleapis.com/auth/compute.readonly",
"compute-rw": "https://www.googleapis.com/auth/compute",
"datastore": "https://www.googleapis.com/auth/datastore",
"logging-write": "https://www.googleapis.com/auth/logging.write",
"monitoring": "https://www.googleapis.com/auth/monitoring",
"monitoring-read": "https://www.googleapis.com/auth/monitoring.read",
"monitoring-write": "https://www.googleapis.com/auth/monitoring.write",
"pubsub": "https://www.googleapis.com/auth/pubsub",
"service-control": "https://www.googleapis.com/auth/servicecontrol",
"service-management": "https://www.googleapis.com/auth/service.management.readonly",
"sql": "https://www.googleapis.com/auth/sqlservice",
"sql-admin": "https://www.googleapis.com/auth/sqlservice.admin",
"storage-full": "https://www.googleapis.com/auth/devstorage.full_control",
"storage-ro": "https://www.googleapis.com/auth/devstorage.read_only",
"storage-rw": "https://www.googleapis.com/auth/devstorage.read_write",
"taskqueue": "https://www.googleapis.com/auth/taskqueue",
"trace-append": "https://www.googleapis.com/auth/trace.append",
"trace-ro": "https://www.googleapis.com/auth/trace.readonly",
"useraccounts-ro": "https://www.googleapis.com/auth/cloud.useraccounts.readonly",
"useraccounts-rw": "https://www.googleapis.com/auth/cloud.useraccounts",
"userinfo-email": "https://www.googleapis.com/auth/userinfo.email",

@megan07
Copy link
Contributor

megan07 commented Oct 22, 2021

Closed by GoogleCloudPlatform/magic-modules#5353

@megan07 megan07 closed this as completed Oct 22, 2021
@github-actions
Copy link

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 have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 22, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
2 participants