Skip to content

Commit

Permalink
Add fine-grained audit config for projects. (hashicorp#265)
Browse files Browse the repository at this point in the history
  • Loading branch information
modular-magician authored and paddycarver committed Dec 21, 2018
1 parent 97025af commit 621d736
Show file tree
Hide file tree
Showing 4 changed files with 684 additions and 1 deletion.
3 changes: 2 additions & 1 deletion google-beta/iam_project.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@ func (u *ProjectIamUpdater) GetResourceIamPolicy() (*cloudresourcemanager.Policy

func (u *ProjectIamUpdater) SetResourceIamPolicy(policy *cloudresourcemanager.Policy) error {
_, err := u.Config.clientResourceManager.Projects.SetIamPolicy(u.resourceId, &cloudresourcemanager.SetIamPolicyRequest{
Policy: policy,
Policy: policy,
UpdateMask: "bindings,etag,auditConfigs",
}).Do()

if err != nil {
Expand Down
1 change: 1 addition & 0 deletions google-beta/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,7 @@ func ResourceMapWithErrors() (map[string]*schema.Resource, error) {
"google_project_iam_policy": resourceGoogleProjectIamPolicy(),
"google_project_iam_binding": ResourceIamBindingWithImport(IamProjectSchema, NewProjectIamUpdater, ProjectIdParseFunc),
"google_project_iam_member": ResourceIamMemberWithImport(IamProjectSchema, NewProjectIamUpdater, ProjectIdParseFunc),
"google_project_iam_audit_config": ResourceIamAuditConfigWithImport(IamProjectSchema, NewProjectIamUpdater, ProjectIdParseFunc),
"google_project_service": resourceGoogleProjectService(),
"google_project_iam_custom_role": resourceGoogleProjectIamCustomRole(),
"google_project_organization_policy": resourceGoogleProjectOrganizationPolicy(),
Expand Down
Loading

0 comments on commit 621d736

Please sign in to comment.