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

1.0 - G Suite Refactor #94

Merged
merged 117 commits into from
Jan 17, 2019
Merged

1.0 - G Suite Refactor #94

merged 117 commits into from
Jan 17, 2019

Conversation

morgante
Copy link
Contributor

@morgante morgante commented Jan 8, 2019

This PR is to track the final merge of the G Suite refactor and release.

Fixes/changes should be done as PRs against 1.0-rc1.

adrienthebo and others added 30 commits January 8, 2019 12:49
A refactor that removed null_data_sources in favor of local variables
didn't update all of the locations where the old value was used; this
commit fixes up the omission.
root and gsuite_enabled do not utilize var.org_id and var.domain in a
manner which requires them to both exist.
This change removes a cyclic dependency between gsuite_enabled and
core_project_factory
@morgante
Copy link
Contributor Author

morgante and others added 5 commits January 11, 2019 18:45
The interpolation of random_string was causing an issue for counts based
off of outputs from gsuite_group modules. It's not clear why this is
happening. The tests can not be run concurrently at this point so the
there is no need to avoid naming collisions any way.
@morgante
Copy link
Contributor Author

Sadly it looks like this is still breaking CI:

       Error: Error running plan: 5 error(s) occurred:
       
       * module.project-factory.module.project-factory.google_service_account_iam_member.service_account_grant_to_group: google_service_account_iam_member.service_account_grant_to_group: value of 'count' cannot be computed
       * google_service_account_iam_member.additive_service_account_grant_to_group: google_service_account_iam_member.additive_service_account_grant_to_group: value of 'count' cannot be computed
       * module.project-factory.module.project-factory.google_compute_subnetwork_iam_member.group_role_to_vpc_subnets: google_compute_subnetwork_iam_member.group_role_to_vpc_subnets: value of 'count' cannot be computed
       * module.project-factory.module.project-factory.google_storage_bucket_iam_member.group_storage_admin_on_project_bucket: google_storage_bucket_iam_member.group_storage_admin_on_project_bucket: value of 'count' cannot be computed
       * module.project-factory.module.project-factory.google_project_iam_member.gsuite_group_role: google_project_iam_member.gsuite_group_role: value of 'count' cannot be computed

@morgante
Copy link
Contributor Author

It looks like we still don't have the group logic quite right. We need parity with the current project factory.

To be specific, if I am using the non-G Suite project factory, I have two options:

  1. Pass in a group_name and it will be granted all the appropriate roles (ex.
    resource "google_service_account_iam_member" "service_account_grant_to_group" {
    )
  2. Don't pass in a group_name and no roles will be added

For the G Suite version, there are 4 options:

  1. Pass in a group_name and create_group = false => grant the roles to the group
  2. Pass in a group_name and create_group = true => create the given group name and grant it the required roles
  3. Don't pass in a group_name and create_group = true => creates a group named project_name-editors and grants it the required roles.
  4. Don't pass in a group_name and create_group = false -> no group roles granted

aaron-lane and others added 4 commits January 16, 2019 00:28
`gsuite_group` does not need to be included in `core_project_factory`
since the only relevant output is `email`.

The `manage_group` variable on `core_project_factory` removes the need
to check the value of the `group_name` variable which was causing
an issue during graph resolution.

The `count` of the `additive_service_account_grant_to_group` in the
`full` fixture is removed because the `group_email` output will always
be defined in that fixture.
@morgante morgante merged commit 150865a into master Jan 17, 2019
@adrienthebo adrienthebo deleted the 1.0-rc1 branch January 23, 2019 17:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants