Skip to content

Commit

Permalink
feat: navn matcher de andre
Browse files Browse the repository at this point in the history
  • Loading branch information
Kyrremann committed May 28, 2024
1 parent a2a3d00 commit ca493db
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pkg/resourcecreator/google/sql/instance.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,8 @@ func CreateInstance(source Source, ast *resource.Ast, cfg Config) error {
googleSqlInstance := CreateGoogleSqlInstance(resource.CreateObjectMeta(source), naisSqlInstance, cfg)
ast.AppendOperation(resource.OperationCreateOrUpdate, googleSqlInstance)

iamPolicyMember := instanceIamPolicyMember(source, googleSqlInstance.Name, cfg)
ast.AppendOperation(resource.OperationCreateIfNotExists, iamPolicyMember)
googleIAMPolicyMember := CreateIAMPolicyMemberForInstance(source, googleSqlInstance.Name, cfg)
ast.AppendOperation(resource.OperationCreateIfNotExists, googleIAMPolicyMember)

googleSqlDatabase := GoogleSQLDatabase(resource.CreateObjectMeta(source), googleSqlInstance.Name, naisSqlDatabase.Name, googleTeamProjectID, naisSqlInstance.CascadingDelete)
ast.AppendOperation(resource.OperationCreateIfNotExists, googleSqlDatabase)
Expand Down Expand Up @@ -234,7 +234,7 @@ func NaisCloudSqlInstanceWithDefaults(instance *nais_io_v1.CloudSqlInstance, app
return instance, nil
}

func instanceIamPolicyMember(source resource.Source, resourceName string, cfg Config) *google_iam_crd.IAMPolicyMember {
func CreateIAMPolicyMemberForInstance(source resource.Source, resourceName string, cfg Config) *google_iam_crd.IAMPolicyMember {
objectMeta := resource.CreateObjectMeta(source)
objectMeta.Name = resourceName
policy := &google_iam_crd.IAMPolicyMember{
Expand Down

0 comments on commit ca493db

Please sign in to comment.