Documentation ¶
Overview ¶
Package apply provides utilities to apply a project config to GCP by deploying all defined resources.
Index ¶
- func Forseti(conf *config.Config, opts *Options, terraformConfigsDir string, ...) error
- func GrantForsetiPermissions(projectID, serviceAccount, stateBucket string, opts *Options, workDir string, ...) error
- func RemoveDeprecatedBigqueryAPI(dir string, rn runner.Runner) error
- func Terraform(conf *config.Config, projectIDs []string, opts *Options, rn runner.Runner) error
- type Options
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Forseti ¶
func Forseti(conf *config.Config, opts *Options, terraformConfigsDir string, rn runner.Runner) error
Forseti applies project configuration to a Forseti project.
func GrantForsetiPermissions ¶
func GrantForsetiPermissions(projectID, serviceAccount, stateBucket string, opts *Options, workDir string, rn runner.Runner) error
GrantForsetiPermissions grants all necessary permissions to the given Forseti service account in the project.
func RemoveDeprecatedBigqueryAPI ¶
RemoveDeprecatedBigqueryAPI removes the deprecated BigqueryAPI if it was deployed. https://www.terraform.io/docs/providers/google/guides/version_3_upgrade.html#resource-google_project_service.
func Terraform ¶
Terraform applies the project configs for each applicable project in the config to GCP. Empty list of projects is equivalent to all projects. Base projects (remote audit and forseti) are deployed in a round-table fashion with each phase being applied to each project. This makes sure dependencies between base projects are handled correctly (e.g. forseti project wants to store its audit logs in remote audit project while remote audit project wants to be monitored by the forseti project). Then, all data hosting projects are deployed from beginning till end so one data project doesn't leave other data projects in a half deployed state.
Types ¶
type Options ¶
type Options struct { // Toggle whether dry run mode is enabled. DryRun bool // Toggle whether existing resources will attempt to be imported. // Used when migrating an existing project. Only needs to be done once. ImportExisting bool // Normalized directory path to store generated Terraform configs. TerraformConfigsPath string // Extra flags to pass to terraform apply command. TerraformApplyFlags []string }
Options configures an apply call.