Skip to content
This repository has been archived by the owner on Oct 17, 2024. It is now read-only.

Add SAM Global support #376

Merged
merged 23 commits into from
Jun 20, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
a8b0539
Initial commit--spec wired up
bryceitoc9 May 19, 2021
543a5c2
Globals?
bryceitoc9 May 21, 2021
d87213d
Codegen is working...need to figure out schemas
bryceitoc9 May 21, 2021
5398284
Valid Globals in SAM schema
bryceitoc9 May 21, 2021
6c447a4
Adding HttpApi to schema
bryceitoc9 May 24, 2021
532807f
Rebase Serverless
bryceitoc9 May 24, 2021
de02acb
Fixing existing test
bryceitoc9 May 24, 2021
067731a
Merge branch 'awslabs:master' into add-globals
bryceitoc9 May 25, 2021
6d4aafe
Globals test
bryceitoc9 May 26, 2021
24d5069
Merge branch 'add-globals' of https://github.com/bryceitoc9/goformati…
bryceitoc9 May 26, 2021
363aefa
Template parsing works
bryceitoc9 May 28, 2021
05a5750
Forgot to add template.go
bryceitoc9 Jun 1, 2021
970aedd
Error handling on global generation
bryceitoc9 Jun 3, 2021
b7590d7
Added cloudformation/global/*
PaulMaddox Jun 10, 2021
6cf6423
Updated template.Globals to be a value not pointer
PaulMaddox Jun 10, 2021
c19246a
cloudformation.NewTemplate() should instantiate globals
PaulMaddox Jun 10, 2021
bf7de1f
Added tests for Go->JSON and vice-versa to globals_test.go
PaulMaddox Jun 10, 2021
cece992
Removed test superceded by broader template based test
PaulMaddox Jun 10, 2021
0d2a333
Removed a test that would never fail
PaulMaddox Jun 10, 2021
420647e
BREAKING CHANGE: Removed previous globals impl
PaulMaddox Jun 10, 2021
a2f3094
Merging in CFN updates
PaulMaddox Jun 10, 2021
fcca193
Fixed conflicts in generated schemas
PaulMaddox Jun 10, 2021
546b099
Updated import paths to major version v5
PaulMaddox Jun 10, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
As with other Go libraries, GoFormation can be installed with `go get`.

```
$ go get github.com/awslabs/goformation/v4
$ go get github.com/awslabs/goformation/v5
```

## Usage
Expand All @@ -46,8 +46,8 @@ import (
"strconv"
"time"

"github.com/awslabs/goformation/v4/cloudformation"
"github.com/awslabs/goformation/v4/cloudformation/sns"
"github.com/awslabs/goformation/v5/cloudformation"
"github.com/awslabs/goformation/v5/cloudformation/sns"


)
Expand Down Expand Up @@ -161,7 +161,7 @@ package main
import (
"log"
"github.com/awslabs/goformation/v4"
"github.com/awslabs/goformation/v5"
)
func main() {
Expand Down
4 changes: 2 additions & 2 deletions cloudformation/accessanalyzer/aws-accessanalyzer-analyzer.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import (
"encoding/json"
"fmt"

"github.com/awslabs/goformation/v4/cloudformation/policies"
"github.com/awslabs/goformation/v4/cloudformation/tags"
"github.com/awslabs/goformation/v5/cloudformation/policies"
"github.com/awslabs/goformation/v5/cloudformation/tags"
)

// Analyzer AWS CloudFormation Resource (AWS::AccessAnalyzer::Analyzer)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package accessanalyzer

import (
"github.com/awslabs/goformation/v4/cloudformation/policies"
"github.com/awslabs/goformation/v5/cloudformation/policies"
)

// Analyzer_ArchiveRule AWS CloudFormation Resource (AWS::AccessAnalyzer::Analyzer.ArchiveRule)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package accessanalyzer

import (
"github.com/awslabs/goformation/v4/cloudformation/policies"
"github.com/awslabs/goformation/v5/cloudformation/policies"
)

// Analyzer_Filter AWS CloudFormation Resource (AWS::AccessAnalyzer::Analyzer.Filter)
Expand Down
2 changes: 1 addition & 1 deletion cloudformation/acmpca/aws-acmpca-certificate.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"encoding/json"
"fmt"

"github.com/awslabs/goformation/v4/cloudformation/policies"
"github.com/awslabs/goformation/v5/cloudformation/policies"
)

// Certificate AWS CloudFormation Resource (AWS::ACMPCA::Certificate)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package acmpca

import (
"github.com/awslabs/goformation/v4/cloudformation/policies"
"github.com/awslabs/goformation/v5/cloudformation/policies"
)

// Certificate_ApiPassthrough AWS CloudFormation Resource (AWS::ACMPCA::Certificate.ApiPassthrough)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package acmpca

import (
"github.com/awslabs/goformation/v4/cloudformation/policies"
"github.com/awslabs/goformation/v5/cloudformation/policies"
)

// Certificate_CertificatePolicyList AWS CloudFormation Resource (AWS::ACMPCA::Certificate.CertificatePolicyList)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package acmpca

import (
"github.com/awslabs/goformation/v4/cloudformation/policies"
"github.com/awslabs/goformation/v5/cloudformation/policies"
)

// Certificate_EdiPartyName AWS CloudFormation Resource (AWS::ACMPCA::Certificate.EdiPartyName)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package acmpca

import (
"github.com/awslabs/goformation/v4/cloudformation/policies"
"github.com/awslabs/goformation/v5/cloudformation/policies"
)

// Certificate_ExtendedKeyUsage AWS CloudFormation Resource (AWS::ACMPCA::Certificate.ExtendedKeyUsage)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package acmpca

import (
"github.com/awslabs/goformation/v4/cloudformation/policies"
"github.com/awslabs/goformation/v5/cloudformation/policies"
)

// Certificate_ExtendedKeyUsageList AWS CloudFormation Resource (AWS::ACMPCA::Certificate.ExtendedKeyUsageList)
Expand Down
2 changes: 1 addition & 1 deletion cloudformation/acmpca/aws-acmpca-certificate_extensions.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package acmpca

import (
"github.com/awslabs/goformation/v4/cloudformation/policies"
"github.com/awslabs/goformation/v5/cloudformation/policies"
)

// Certificate_Extensions AWS CloudFormation Resource (AWS::ACMPCA::Certificate.Extensions)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package acmpca

import (
"github.com/awslabs/goformation/v4/cloudformation/policies"
"github.com/awslabs/goformation/v5/cloudformation/policies"
)

// Certificate_GeneralName AWS CloudFormation Resource (AWS::ACMPCA::Certificate.GeneralName)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package acmpca

import (
"github.com/awslabs/goformation/v4/cloudformation/policies"
"github.com/awslabs/goformation/v5/cloudformation/policies"
)

// Certificate_GeneralNameList AWS CloudFormation Resource (AWS::ACMPCA::Certificate.GeneralNameList)
Expand Down
2 changes: 1 addition & 1 deletion cloudformation/acmpca/aws-acmpca-certificate_keyusage.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package acmpca

import (
"github.com/awslabs/goformation/v4/cloudformation/policies"
"github.com/awslabs/goformation/v5/cloudformation/policies"
)

// Certificate_KeyUsage AWS CloudFormation Resource (AWS::ACMPCA::Certificate.KeyUsage)
Expand Down
2 changes: 1 addition & 1 deletion cloudformation/acmpca/aws-acmpca-certificate_othername.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package acmpca

import (
"github.com/awslabs/goformation/v4/cloudformation/policies"
"github.com/awslabs/goformation/v5/cloudformation/policies"
)

// Certificate_OtherName AWS CloudFormation Resource (AWS::ACMPCA::Certificate.OtherName)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package acmpca

import (
"github.com/awslabs/goformation/v4/cloudformation/policies"
"github.com/awslabs/goformation/v5/cloudformation/policies"
)

// Certificate_PolicyInformation AWS CloudFormation Resource (AWS::ACMPCA::Certificate.PolicyInformation)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package acmpca

import (
"github.com/awslabs/goformation/v4/cloudformation/policies"
"github.com/awslabs/goformation/v5/cloudformation/policies"
)

// Certificate_PolicyQualifierInfo AWS CloudFormation Resource (AWS::ACMPCA::Certificate.PolicyQualifierInfo)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package acmpca

import (
"github.com/awslabs/goformation/v4/cloudformation/policies"
"github.com/awslabs/goformation/v5/cloudformation/policies"
)

// Certificate_PolicyQualifierInfoList AWS CloudFormation Resource (AWS::ACMPCA::Certificate.PolicyQualifierInfoList)
Expand Down
2 changes: 1 addition & 1 deletion cloudformation/acmpca/aws-acmpca-certificate_qualifier.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package acmpca

import (
"github.com/awslabs/goformation/v4/cloudformation/policies"
"github.com/awslabs/goformation/v5/cloudformation/policies"
)

// Certificate_Qualifier AWS CloudFormation Resource (AWS::ACMPCA::Certificate.Qualifier)
Expand Down
2 changes: 1 addition & 1 deletion cloudformation/acmpca/aws-acmpca-certificate_subject.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package acmpca

import (
"github.com/awslabs/goformation/v4/cloudformation/policies"
"github.com/awslabs/goformation/v5/cloudformation/policies"
)

// Certificate_Subject AWS CloudFormation Resource (AWS::ACMPCA::Certificate.Subject)
Expand Down
2 changes: 1 addition & 1 deletion cloudformation/acmpca/aws-acmpca-certificate_validity.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package acmpca

import (
"github.com/awslabs/goformation/v4/cloudformation/policies"
"github.com/awslabs/goformation/v5/cloudformation/policies"
)

// Certificate_Validity AWS CloudFormation Resource (AWS::ACMPCA::Certificate.Validity)
Expand Down
4 changes: 2 additions & 2 deletions cloudformation/acmpca/aws-acmpca-certificateauthority.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import (
"encoding/json"
"fmt"

"github.com/awslabs/goformation/v4/cloudformation/policies"
"github.com/awslabs/goformation/v4/cloudformation/tags"
"github.com/awslabs/goformation/v5/cloudformation/policies"
"github.com/awslabs/goformation/v5/cloudformation/tags"
)

// CertificateAuthority AWS CloudFormation Resource (AWS::ACMPCA::CertificateAuthority)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package acmpca

import (
"github.com/awslabs/goformation/v4/cloudformation/policies"
"github.com/awslabs/goformation/v5/cloudformation/policies"
)

// CertificateAuthority_AccessDescription AWS CloudFormation Resource (AWS::ACMPCA::CertificateAuthority.AccessDescription)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package acmpca

import (
"github.com/awslabs/goformation/v4/cloudformation/policies"
"github.com/awslabs/goformation/v5/cloudformation/policies"
)

// CertificateAuthority_AccessMethod AWS CloudFormation Resource (AWS::ACMPCA::CertificateAuthority.AccessMethod)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package acmpca

import (
"github.com/awslabs/goformation/v4/cloudformation/policies"
"github.com/awslabs/goformation/v5/cloudformation/policies"
)

// CertificateAuthority_CrlConfiguration AWS CloudFormation Resource (AWS::ACMPCA::CertificateAuthority.CrlConfiguration)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package acmpca

import (
"github.com/awslabs/goformation/v4/cloudformation/policies"
"github.com/awslabs/goformation/v5/cloudformation/policies"
)

// CertificateAuthority_CsrExtensions AWS CloudFormation Resource (AWS::ACMPCA::CertificateAuthority.CsrExtensions)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package acmpca

import (
"github.com/awslabs/goformation/v4/cloudformation/policies"
"github.com/awslabs/goformation/v5/cloudformation/policies"
)

// CertificateAuthority_EdiPartyName AWS CloudFormation Resource (AWS::ACMPCA::CertificateAuthority.EdiPartyName)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package acmpca

import (
"github.com/awslabs/goformation/v4/cloudformation/policies"
"github.com/awslabs/goformation/v5/cloudformation/policies"
)

// CertificateAuthority_GeneralName AWS CloudFormation Resource (AWS::ACMPCA::CertificateAuthority.GeneralName)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package acmpca

import (
"github.com/awslabs/goformation/v4/cloudformation/policies"
"github.com/awslabs/goformation/v5/cloudformation/policies"
)

// CertificateAuthority_KeyUsage AWS CloudFormation Resource (AWS::ACMPCA::CertificateAuthority.KeyUsage)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package acmpca

import (
"github.com/awslabs/goformation/v4/cloudformation/policies"
"github.com/awslabs/goformation/v5/cloudformation/policies"
)

// CertificateAuthority_OtherName AWS CloudFormation Resource (AWS::ACMPCA::CertificateAuthority.OtherName)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package acmpca

import (
"github.com/awslabs/goformation/v4/cloudformation/policies"
"github.com/awslabs/goformation/v5/cloudformation/policies"
)

// CertificateAuthority_RevocationConfiguration AWS CloudFormation Resource (AWS::ACMPCA::CertificateAuthority.RevocationConfiguration)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package acmpca

import (
"github.com/awslabs/goformation/v4/cloudformation/policies"
"github.com/awslabs/goformation/v5/cloudformation/policies"
)

// CertificateAuthority_Subject AWS CloudFormation Resource (AWS::ACMPCA::CertificateAuthority.Subject)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package acmpca

import (
"github.com/awslabs/goformation/v4/cloudformation/policies"
"github.com/awslabs/goformation/v5/cloudformation/policies"
)

// CertificateAuthority_SubjectInformationAccess AWS CloudFormation Resource (AWS::ACMPCA::CertificateAuthority.SubjectInformationAccess)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"encoding/json"
"fmt"

"github.com/awslabs/goformation/v4/cloudformation/policies"
"github.com/awslabs/goformation/v5/cloudformation/policies"
)

// CertificateAuthorityActivation AWS CloudFormation Resource (AWS::ACMPCA::CertificateAuthorityActivation)
Expand Down
Loading