-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
OS Config OS Policy Assignment: Error: Value for unconfigurable attribute #16737
Comments
@AlxCloudRl This seems by design. I see permissions is a readonly field. Why did you think you can set it up? permissions - (Output) Consists of three octal digits which represent |
@edwardmedia Indeed, it's confusing, why is it listed as a supported argument? Also in the API, it's not clear if we can set it or not (not listed as required, but still an argument): https://cloud.google.com/compute/docs/osconfig/rest/v1/projects.locations.osPolicyAssignments#fileresource |
Oh I see. Forwarding it to the service team for double check |
Hello, any news on this? |
I think the reason is that the "permissions" argument is set as Computed in terraform-provider-google source code. Its not optional like other args (see this line). But in VMM doc its not mentioned anywhere that "permissions" arg is not optional. |
Yes, I'm just trying to see how I can specify a binary copied from gcs with the proper DAC permissions. Currently, the binary is copied but then my users cannot execute it. Some workarounds exists with an exec block, but having the possibility to configure the permissions would be more clean and handy. |
I saw in the config u used the value assigned to permissions is 755. However the default value is already 755 based on the public doc. |
It's not 755, when a file is copied from Google Cloud storage into usr/local/bin/, its permission is 644. |
Community Note
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 tohashibot
, a community member has claimed the issue already.Terraform Version
Terraform v1.6.5
on linux_amd64
Affected Resource(s)
google_os_config_os_policy_assignment
Terraform Configuration Files
Debug Output
Error: Value for unconfigurable attribute
│
│ with google_os_config_os_policy_assignment.install_software,
│ on gcp_compute_engine.tf line 189, in resource "google_os_config_os_policy_assignment" "install_software":
│ 189: permissions = 755
│
│ Can't configure a value for "os_policies.0.resource_groups.0.resources.8.file.0.permissions": its value will be decided automatically based on the result of applying this configuration.
Panic Output
Expected Behavior
The plan should success and we should be able to set the permissions
Actual Behavior
The plan fail and the permissions are not even set to default. I end with a file without permissions and cannot access it.
Steps to Reproduce
terraform apply
b/315582306
The text was updated successfully, but these errors were encountered: