Skip to content

Commit

Permalink
gcp.contact -> gcp.essentialContact
Browse files Browse the repository at this point in the history
Signed-off-by: Ivan Milchev <[email protected]>
  • Loading branch information
imilchev committed Jan 4, 2023
1 parent bd5745d commit f4c762c
Show file tree
Hide file tree
Showing 4 changed files with 83 additions and 83 deletions.
6 changes: 3 additions & 3 deletions resources/packs/gcp/essential_contacts.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"google.golang.org/api/option"
)

func (g *mqlGcpProject) GetContacts() (interface{}, error) {
func (g *mqlGcpProject) GetEssentialContacts() (interface{}, error) {
provider, err := gcpProvider(g.MotorRuntime.Motor.Provider)
if err != nil {
return nil, err
Expand Down Expand Up @@ -38,7 +38,7 @@ func (g *mqlGcpProject) GetContacts() (interface{}, error) {

mqlContacts := make([]interface{}, 0, len(contacts.Contacts))
for _, c := range contacts.Contacts {
mqlC, err := g.MotorRuntime.CreateResource("gcp.contact",
mqlC, err := g.MotorRuntime.CreateResource("gcp.essentialContact",
"resourcePath", c.Name,
"email", c.Email,
"languageTag", c.LanguageTag,
Expand All @@ -55,6 +55,6 @@ func (g *mqlGcpProject) GetContacts() (interface{}, error) {
return mqlContacts, nil
}

func (g *mqlGcpContact) id() (string, error) {
func (g *mqlGcpEssentialContact) id() (string, error) {
return g.ResourcePath()
}
4 changes: 2 additions & 2 deletions resources/packs/gcp/gcp.lr
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ gcp.project @defaults("name") {
// KMS-related resources
kms() gcp.project.kmsService
// GCP Contancts for the project
contacts() []gcp.contact
essentialContacts() []gcp.essentialContact
}

// GCP Service
Expand Down Expand Up @@ -1255,7 +1255,7 @@ private gcp.project.kmsService.keyring.cryptokey.version.externalProtectionLevel
}

// GCP Contact
private gcp.contact {
private gcp.essentialContact {
// Full resource path
resourcePath string
// Email address to send notifications to
Expand Down
Loading

0 comments on commit f4c762c

Please sign in to comment.