Skip to content

Commit

Permalink
Add fine-grained audit config for projects.
Browse files Browse the repository at this point in the history
  • Loading branch information
paddycarver authored and modular-magician committed Dec 21, 2018
1 parent 8e515c9 commit dd8cc14
Show file tree
Hide file tree
Showing 4 changed files with 684 additions and 1 deletion.
3 changes: 2 additions & 1 deletion google/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/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,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 dd8cc14

Please sign in to comment.