@jjrawlins/cdk-diff-pr-github-action 1.5.7 → 1.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.jsii +15 -45
- package/cdkdiffprgithubaction/CdkDiffIamTemplate.go +48 -0
- package/cdkdiffprgithubaction/CdkDiffIamTemplateGenerator.go +82 -0
- package/cdkdiffprgithubaction/CdkDiffIamTemplateGeneratorProps.go +45 -0
- package/cdkdiffprgithubaction/CdkDiffIamTemplateGenerator__checks.go +21 -0
- package/cdkdiffprgithubaction/CdkDiffIamTemplateGenerator__no_checks.go +10 -0
- package/cdkdiffprgithubaction/CdkDiffIamTemplateProps.go +51 -0
- package/cdkdiffprgithubaction/CdkDiffIamTemplateStackSet.go +50 -0
- package/cdkdiffprgithubaction/CdkDiffIamTemplateStackSetCommandsProps.go +29 -0
- package/cdkdiffprgithubaction/CdkDiffIamTemplateStackSetGenerator.go +87 -0
- package/cdkdiffprgithubaction/CdkDiffIamTemplateStackSetGeneratorProps.go +33 -0
- package/cdkdiffprgithubaction/CdkDiffIamTemplateStackSetGenerator__checks.go +29 -0
- package/cdkdiffprgithubaction/CdkDiffIamTemplateStackSetGenerator__no_checks.go +14 -0
- package/cdkdiffprgithubaction/CdkDiffIamTemplateStackSetProps.go +58 -0
- package/cdkdiffprgithubaction/CdkDiffIamTemplateStackSet__checks.go +21 -0
- package/cdkdiffprgithubaction/CdkDiffIamTemplateStackSet__no_checks.go +10 -0
- package/cdkdiffprgithubaction/CdkDiffIamTemplate__checks.go +21 -0
- package/cdkdiffprgithubaction/CdkDiffIamTemplate__no_checks.go +10 -0
- package/cdkdiffprgithubaction/CdkDiffStack.go +17 -0
- package/cdkdiffprgithubaction/CdkDiffStackWorkflow.go +45 -0
- package/cdkdiffprgithubaction/CdkDiffStackWorkflowProps.go +21 -0
- package/cdkdiffprgithubaction/CdkDiffStackWorkflow__checks.go +21 -0
- package/cdkdiffprgithubaction/CdkDiffStackWorkflow__no_checks.go +10 -0
- package/cdkdiffprgithubaction/CdkDriftDetectionWorkflow.go +45 -0
- package/cdkdiffprgithubaction/CdkDriftDetectionWorkflowProps.go +32 -0
- package/cdkdiffprgithubaction/CdkDriftDetectionWorkflow__checks.go +21 -0
- package/cdkdiffprgithubaction/CdkDriftDetectionWorkflow__no_checks.go +10 -0
- package/cdkdiffprgithubaction/CdkDriftIamTemplate.go +48 -0
- package/cdkdiffprgithubaction/CdkDriftIamTemplateGenerator.go +82 -0
- package/cdkdiffprgithubaction/CdkDriftIamTemplateGeneratorProps.go +17 -0
- package/cdkdiffprgithubaction/CdkDriftIamTemplateGenerator__checks.go +21 -0
- package/cdkdiffprgithubaction/CdkDriftIamTemplateGenerator__no_checks.go +10 -0
- package/cdkdiffprgithubaction/CdkDriftIamTemplateProps.go +23 -0
- package/cdkdiffprgithubaction/CdkDriftIamTemplate__checks.go +21 -0
- package/cdkdiffprgithubaction/CdkDriftIamTemplate__no_checks.go +10 -0
- package/cdkdiffprgithubaction/GitHubOidcConfig.go +20 -0
- package/cdkdiffprgithubaction/LICENSE +202 -0
- package/cdkdiffprgithubaction/README.md +789 -0
- package/cdkdiffprgithubaction/Stack.go +19 -0
- package/cdkdiffprgithubaction/StackSetAutoDeployment.go +14 -0
- package/cdkdiffprgithubaction/StackSetRoleSelection.go +19 -0
- package/cdkdiffprgithubaction/go.mod +13 -0
- package/cdkdiffprgithubaction/jsii/jsii.go +30 -0
- package/cdkdiffprgithubaction/main.go +136 -0
- package/cdkdiffprgithubaction/version +1 -0
- package/lib/CdkDiffIamTemplate.js +2 -2
- package/lib/CdkDiffIamTemplateStackSet.js +2 -2
- package/lib/CdkDiffStackWorkflow.js +1 -1
- package/lib/CdkDriftDetectionWorkflow.js +1 -1
- package/lib/CdkDriftIamTemplate.js +2 -2
- package/package.json +19 -4
- /package/node_modules/{js-yaml/node_modules/argparse → argparse}/LICENSE +0 -0
- /package/node_modules/{js-yaml/node_modules/argparse → argparse}/README.md +0 -0
- /package/node_modules/{js-yaml/node_modules/argparse → argparse}/argparse.js +0 -0
- /package/node_modules/{js-yaml/node_modules/argparse → argparse}/lib/sub.js +0 -0
- /package/node_modules/{js-yaml/node_modules/argparse → argparse}/lib/textwrap.js +0 -0
- /package/node_modules/{js-yaml/node_modules/argparse → argparse}/package.json +0 -0
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
//go:build no_runtime_type_checking
|
|
2
|
+
|
|
3
|
+
package cdkdiffprgithubaction
|
|
4
|
+
|
|
5
|
+
// Building without runtime type checking enabled, so all the below just return nil
|
|
6
|
+
|
|
7
|
+
func validateNewCdkDiffIamTemplateStackSetParameters(props *CdkDiffIamTemplateStackSetProps) error {
|
|
8
|
+
return nil
|
|
9
|
+
}
|
|
10
|
+
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
//go:build !no_runtime_type_checking
|
|
2
|
+
|
|
3
|
+
package cdkdiffprgithubaction
|
|
4
|
+
|
|
5
|
+
import (
|
|
6
|
+
"fmt"
|
|
7
|
+
|
|
8
|
+
_jsii_ "github.com/aws/jsii-runtime-go/runtime"
|
|
9
|
+
)
|
|
10
|
+
|
|
11
|
+
func validateNewCdkDiffIamTemplateParameters(props *CdkDiffIamTemplateProps) error {
|
|
12
|
+
if props == nil {
|
|
13
|
+
return fmt.Errorf("parameter props is required, but nil was provided")
|
|
14
|
+
}
|
|
15
|
+
if err := _jsii_.ValidateStruct(props, func() string { return "parameter props" }); err != nil {
|
|
16
|
+
return err
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
return nil
|
|
20
|
+
}
|
|
21
|
+
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
//go:build no_runtime_type_checking
|
|
2
|
+
|
|
3
|
+
package cdkdiffprgithubaction
|
|
4
|
+
|
|
5
|
+
// Building without runtime type checking enabled, so all the below just return nil
|
|
6
|
+
|
|
7
|
+
func validateNewCdkDiffIamTemplateParameters(props *CdkDiffIamTemplateProps) error {
|
|
8
|
+
return nil
|
|
9
|
+
}
|
|
10
|
+
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
package cdkdiffprgithubaction
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
// Experimental.
|
|
5
|
+
type CdkDiffStack struct {
|
|
6
|
+
// Experimental.
|
|
7
|
+
ChangesetRoleToAssumeArn *string `field:"required" json:"changesetRoleToAssumeArn" yaml:"changesetRoleToAssumeArn"`
|
|
8
|
+
// Experimental.
|
|
9
|
+
ChangesetRoleToAssumeRegion *string `field:"required" json:"changesetRoleToAssumeRegion" yaml:"changesetRoleToAssumeRegion"`
|
|
10
|
+
// Experimental.
|
|
11
|
+
StackName *string `field:"required" json:"stackName" yaml:"stackName"`
|
|
12
|
+
// Experimental.
|
|
13
|
+
OidcRegion *string `field:"optional" json:"oidcRegion" yaml:"oidcRegion"`
|
|
14
|
+
// Experimental.
|
|
15
|
+
OidcRoleArn *string `field:"optional" json:"oidcRoleArn" yaml:"oidcRoleArn"`
|
|
16
|
+
}
|
|
17
|
+
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
package cdkdiffprgithubaction
|
|
2
|
+
|
|
3
|
+
import (
|
|
4
|
+
_jsii_ "github.com/aws/jsii-runtime-go/runtime"
|
|
5
|
+
_init_ "github.com/JaysonRawlins/cdk-diff-pr-github-action/cdkdiffprgithubaction/jsii"
|
|
6
|
+
)
|
|
7
|
+
|
|
8
|
+
// Experimental.
|
|
9
|
+
type CdkDiffStackWorkflow interface {
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
// The jsii proxy struct for CdkDiffStackWorkflow
|
|
13
|
+
type jsiiProxy_CdkDiffStackWorkflow struct {
|
|
14
|
+
_ byte // padding
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
// Experimental.
|
|
18
|
+
func NewCdkDiffStackWorkflow(props *CdkDiffStackWorkflowProps) CdkDiffStackWorkflow {
|
|
19
|
+
_init_.Initialize()
|
|
20
|
+
|
|
21
|
+
if err := validateNewCdkDiffStackWorkflowParameters(props); err != nil {
|
|
22
|
+
panic(err)
|
|
23
|
+
}
|
|
24
|
+
j := jsiiProxy_CdkDiffStackWorkflow{}
|
|
25
|
+
|
|
26
|
+
_jsii_.Create(
|
|
27
|
+
"@jjrawlins/cdk-diff-pr-github-action.CdkDiffStackWorkflow",
|
|
28
|
+
[]interface{}{props},
|
|
29
|
+
&j,
|
|
30
|
+
)
|
|
31
|
+
|
|
32
|
+
return &j
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
// Experimental.
|
|
36
|
+
func NewCdkDiffStackWorkflow_Override(c CdkDiffStackWorkflow, props *CdkDiffStackWorkflowProps) {
|
|
37
|
+
_init_.Initialize()
|
|
38
|
+
|
|
39
|
+
_jsii_.Create(
|
|
40
|
+
"@jjrawlins/cdk-diff-pr-github-action.CdkDiffStackWorkflow",
|
|
41
|
+
[]interface{}{props},
|
|
42
|
+
c,
|
|
43
|
+
)
|
|
44
|
+
}
|
|
45
|
+
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
package cdkdiffprgithubaction
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
// Experimental.
|
|
5
|
+
type CdkDiffStackWorkflowProps struct {
|
|
6
|
+
// Experimental.
|
|
7
|
+
Project interface{} `field:"required" json:"project" yaml:"project"`
|
|
8
|
+
// Experimental.
|
|
9
|
+
Stacks *[]*CdkDiffStack `field:"required" json:"stacks" yaml:"stacks"`
|
|
10
|
+
// Experimental.
|
|
11
|
+
CdkYarnCommand *string `field:"optional" json:"cdkYarnCommand" yaml:"cdkYarnCommand"`
|
|
12
|
+
// Experimental.
|
|
13
|
+
NodeVersion *string `field:"optional" json:"nodeVersion" yaml:"nodeVersion"`
|
|
14
|
+
// Experimental.
|
|
15
|
+
OidcRegion *string `field:"optional" json:"oidcRegion" yaml:"oidcRegion"`
|
|
16
|
+
// Experimental.
|
|
17
|
+
OidcRoleArn *string `field:"optional" json:"oidcRoleArn" yaml:"oidcRoleArn"`
|
|
18
|
+
// Experimental.
|
|
19
|
+
ScriptOutputPath *string `field:"optional" json:"scriptOutputPath" yaml:"scriptOutputPath"`
|
|
20
|
+
}
|
|
21
|
+
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
//go:build !no_runtime_type_checking
|
|
2
|
+
|
|
3
|
+
package cdkdiffprgithubaction
|
|
4
|
+
|
|
5
|
+
import (
|
|
6
|
+
"fmt"
|
|
7
|
+
|
|
8
|
+
_jsii_ "github.com/aws/jsii-runtime-go/runtime"
|
|
9
|
+
)
|
|
10
|
+
|
|
11
|
+
func validateNewCdkDiffStackWorkflowParameters(props *CdkDiffStackWorkflowProps) error {
|
|
12
|
+
if props == nil {
|
|
13
|
+
return fmt.Errorf("parameter props is required, but nil was provided")
|
|
14
|
+
}
|
|
15
|
+
if err := _jsii_.ValidateStruct(props, func() string { return "parameter props" }); err != nil {
|
|
16
|
+
return err
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
return nil
|
|
20
|
+
}
|
|
21
|
+
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
//go:build no_runtime_type_checking
|
|
2
|
+
|
|
3
|
+
package cdkdiffprgithubaction
|
|
4
|
+
|
|
5
|
+
// Building without runtime type checking enabled, so all the below just return nil
|
|
6
|
+
|
|
7
|
+
func validateNewCdkDiffStackWorkflowParameters(props *CdkDiffStackWorkflowProps) error {
|
|
8
|
+
return nil
|
|
9
|
+
}
|
|
10
|
+
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
package cdkdiffprgithubaction
|
|
2
|
+
|
|
3
|
+
import (
|
|
4
|
+
_jsii_ "github.com/aws/jsii-runtime-go/runtime"
|
|
5
|
+
_init_ "github.com/JaysonRawlins/cdk-diff-pr-github-action/cdkdiffprgithubaction/jsii"
|
|
6
|
+
)
|
|
7
|
+
|
|
8
|
+
// Experimental.
|
|
9
|
+
type CdkDriftDetectionWorkflow interface {
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
// The jsii proxy struct for CdkDriftDetectionWorkflow
|
|
13
|
+
type jsiiProxy_CdkDriftDetectionWorkflow struct {
|
|
14
|
+
_ byte // padding
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
// Experimental.
|
|
18
|
+
func NewCdkDriftDetectionWorkflow(props *CdkDriftDetectionWorkflowProps) CdkDriftDetectionWorkflow {
|
|
19
|
+
_init_.Initialize()
|
|
20
|
+
|
|
21
|
+
if err := validateNewCdkDriftDetectionWorkflowParameters(props); err != nil {
|
|
22
|
+
panic(err)
|
|
23
|
+
}
|
|
24
|
+
j := jsiiProxy_CdkDriftDetectionWorkflow{}
|
|
25
|
+
|
|
26
|
+
_jsii_.Create(
|
|
27
|
+
"@jjrawlins/cdk-diff-pr-github-action.CdkDriftDetectionWorkflow",
|
|
28
|
+
[]interface{}{props},
|
|
29
|
+
&j,
|
|
30
|
+
)
|
|
31
|
+
|
|
32
|
+
return &j
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
// Experimental.
|
|
36
|
+
func NewCdkDriftDetectionWorkflow_Override(c CdkDriftDetectionWorkflow, props *CdkDriftDetectionWorkflowProps) {
|
|
37
|
+
_init_.Initialize()
|
|
38
|
+
|
|
39
|
+
_jsii_.Create(
|
|
40
|
+
"@jjrawlins/cdk-diff-pr-github-action.CdkDriftDetectionWorkflow",
|
|
41
|
+
[]interface{}{props},
|
|
42
|
+
c,
|
|
43
|
+
)
|
|
44
|
+
}
|
|
45
|
+
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
package cdkdiffprgithubaction
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
// Experimental.
|
|
5
|
+
type CdkDriftDetectionWorkflowProps struct {
|
|
6
|
+
// Experimental.
|
|
7
|
+
Project interface{} `field:"required" json:"project" yaml:"project"`
|
|
8
|
+
// Experimental.
|
|
9
|
+
Stacks *[]*Stack `field:"required" json:"stacks" yaml:"stacks"`
|
|
10
|
+
// Experimental.
|
|
11
|
+
CreateIssues *bool `field:"optional" json:"createIssues" yaml:"createIssues"`
|
|
12
|
+
// Experimental.
|
|
13
|
+
NodeVersion *string `field:"optional" json:"nodeVersion" yaml:"nodeVersion"`
|
|
14
|
+
// Experimental.
|
|
15
|
+
OidcRegion *string `field:"optional" json:"oidcRegion" yaml:"oidcRegion"`
|
|
16
|
+
// Experimental.
|
|
17
|
+
OidcRoleArn *string `field:"optional" json:"oidcRoleArn" yaml:"oidcRoleArn"`
|
|
18
|
+
// Optional additional GitHub Action steps to run after drift detection for each stack.
|
|
19
|
+
//
|
|
20
|
+
// These steps run after results are uploaded for each stack. You can include
|
|
21
|
+
// any notifications you like (e.g., Slack). Provide explicit inputs (e.g., payload/markdown)
|
|
22
|
+
// directly in your step without relying on a pre-generated payload.
|
|
23
|
+
// Experimental.
|
|
24
|
+
PostGitHubSteps interface{} `field:"optional" json:"postGitHubSteps" yaml:"postGitHubSteps"`
|
|
25
|
+
// Experimental.
|
|
26
|
+
Schedule *string `field:"optional" json:"schedule" yaml:"schedule"`
|
|
27
|
+
// Experimental.
|
|
28
|
+
ScriptOutputPath *string `field:"optional" json:"scriptOutputPath" yaml:"scriptOutputPath"`
|
|
29
|
+
// Experimental.
|
|
30
|
+
WorkflowName *string `field:"optional" json:"workflowName" yaml:"workflowName"`
|
|
31
|
+
}
|
|
32
|
+
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
//go:build !no_runtime_type_checking
|
|
2
|
+
|
|
3
|
+
package cdkdiffprgithubaction
|
|
4
|
+
|
|
5
|
+
import (
|
|
6
|
+
"fmt"
|
|
7
|
+
|
|
8
|
+
_jsii_ "github.com/aws/jsii-runtime-go/runtime"
|
|
9
|
+
)
|
|
10
|
+
|
|
11
|
+
func validateNewCdkDriftDetectionWorkflowParameters(props *CdkDriftDetectionWorkflowProps) error {
|
|
12
|
+
if props == nil {
|
|
13
|
+
return fmt.Errorf("parameter props is required, but nil was provided")
|
|
14
|
+
}
|
|
15
|
+
if err := _jsii_.ValidateStruct(props, func() string { return "parameter props" }); err != nil {
|
|
16
|
+
return err
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
return nil
|
|
20
|
+
}
|
|
21
|
+
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
//go:build no_runtime_type_checking
|
|
2
|
+
|
|
3
|
+
package cdkdiffprgithubaction
|
|
4
|
+
|
|
5
|
+
// Building without runtime type checking enabled, so all the below just return nil
|
|
6
|
+
|
|
7
|
+
func validateNewCdkDriftDetectionWorkflowParameters(props *CdkDriftDetectionWorkflowProps) error {
|
|
8
|
+
return nil
|
|
9
|
+
}
|
|
10
|
+
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
package cdkdiffprgithubaction
|
|
2
|
+
|
|
3
|
+
import (
|
|
4
|
+
_jsii_ "github.com/aws/jsii-runtime-go/runtime"
|
|
5
|
+
_init_ "github.com/JaysonRawlins/cdk-diff-pr-github-action/cdkdiffprgithubaction/jsii"
|
|
6
|
+
)
|
|
7
|
+
|
|
8
|
+
// Projen construct that emits a CloudFormation template with minimal IAM permissions for the CDK Drift Detection Workflow.
|
|
9
|
+
//
|
|
10
|
+
// For non-Projen projects, use `CdkDriftIamTemplateGenerator` directly.
|
|
11
|
+
// Experimental.
|
|
12
|
+
type CdkDriftIamTemplate interface {
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
// The jsii proxy struct for CdkDriftIamTemplate
|
|
16
|
+
type jsiiProxy_CdkDriftIamTemplate struct {
|
|
17
|
+
_ byte // padding
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
// Experimental.
|
|
21
|
+
func NewCdkDriftIamTemplate(props *CdkDriftIamTemplateProps) CdkDriftIamTemplate {
|
|
22
|
+
_init_.Initialize()
|
|
23
|
+
|
|
24
|
+
if err := validateNewCdkDriftIamTemplateParameters(props); err != nil {
|
|
25
|
+
panic(err)
|
|
26
|
+
}
|
|
27
|
+
j := jsiiProxy_CdkDriftIamTemplate{}
|
|
28
|
+
|
|
29
|
+
_jsii_.Create(
|
|
30
|
+
"@jjrawlins/cdk-diff-pr-github-action.CdkDriftIamTemplate",
|
|
31
|
+
[]interface{}{props},
|
|
32
|
+
&j,
|
|
33
|
+
)
|
|
34
|
+
|
|
35
|
+
return &j
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
// Experimental.
|
|
39
|
+
func NewCdkDriftIamTemplate_Override(c CdkDriftIamTemplate, props *CdkDriftIamTemplateProps) {
|
|
40
|
+
_init_.Initialize()
|
|
41
|
+
|
|
42
|
+
_jsii_.Create(
|
|
43
|
+
"@jjrawlins/cdk-diff-pr-github-action.CdkDriftIamTemplate",
|
|
44
|
+
[]interface{}{props},
|
|
45
|
+
c,
|
|
46
|
+
)
|
|
47
|
+
}
|
|
48
|
+
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
package cdkdiffprgithubaction
|
|
2
|
+
|
|
3
|
+
import (
|
|
4
|
+
_jsii_ "github.com/aws/jsii-runtime-go/runtime"
|
|
5
|
+
_init_ "github.com/JaysonRawlins/cdk-diff-pr-github-action/cdkdiffprgithubaction/jsii"
|
|
6
|
+
)
|
|
7
|
+
|
|
8
|
+
// Pure generator class for CDK Drift IAM templates.
|
|
9
|
+
//
|
|
10
|
+
// No Projen dependency - can be used in any project.
|
|
11
|
+
// Experimental.
|
|
12
|
+
type CdkDriftIamTemplateGenerator interface {
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
// The jsii proxy struct for CdkDriftIamTemplateGenerator
|
|
16
|
+
type jsiiProxy_CdkDriftIamTemplateGenerator struct {
|
|
17
|
+
_ byte // padding
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
// Experimental.
|
|
21
|
+
func NewCdkDriftIamTemplateGenerator() CdkDriftIamTemplateGenerator {
|
|
22
|
+
_init_.Initialize()
|
|
23
|
+
|
|
24
|
+
j := jsiiProxy_CdkDriftIamTemplateGenerator{}
|
|
25
|
+
|
|
26
|
+
_jsii_.Create(
|
|
27
|
+
"@jjrawlins/cdk-diff-pr-github-action.CdkDriftIamTemplateGenerator",
|
|
28
|
+
nil, // no parameters
|
|
29
|
+
&j,
|
|
30
|
+
)
|
|
31
|
+
|
|
32
|
+
return &j
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
// Experimental.
|
|
36
|
+
func NewCdkDriftIamTemplateGenerator_Override(c CdkDriftIamTemplateGenerator) {
|
|
37
|
+
_init_.Initialize()
|
|
38
|
+
|
|
39
|
+
_jsii_.Create(
|
|
40
|
+
"@jjrawlins/cdk-diff-pr-github-action.CdkDriftIamTemplateGenerator",
|
|
41
|
+
nil, // no parameters
|
|
42
|
+
c,
|
|
43
|
+
)
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
// Generate the AWS CLI deploy command for the IAM template.
|
|
47
|
+
// Experimental.
|
|
48
|
+
func CdkDriftIamTemplateGenerator_GenerateDeployCommand(templatePath *string) *string {
|
|
49
|
+
_init_.Initialize()
|
|
50
|
+
|
|
51
|
+
var returns *string
|
|
52
|
+
|
|
53
|
+
_jsii_.StaticInvoke(
|
|
54
|
+
"@jjrawlins/cdk-diff-pr-github-action.CdkDriftIamTemplateGenerator",
|
|
55
|
+
"generateDeployCommand",
|
|
56
|
+
[]interface{}{templatePath},
|
|
57
|
+
&returns,
|
|
58
|
+
)
|
|
59
|
+
|
|
60
|
+
return returns
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
// Generate the CloudFormation IAM template as a YAML string.
|
|
64
|
+
// Experimental.
|
|
65
|
+
func CdkDriftIamTemplateGenerator_GenerateTemplate(props *CdkDriftIamTemplateGeneratorProps) *string {
|
|
66
|
+
_init_.Initialize()
|
|
67
|
+
|
|
68
|
+
if err := validateCdkDriftIamTemplateGenerator_GenerateTemplateParameters(props); err != nil {
|
|
69
|
+
panic(err)
|
|
70
|
+
}
|
|
71
|
+
var returns *string
|
|
72
|
+
|
|
73
|
+
_jsii_.StaticInvoke(
|
|
74
|
+
"@jjrawlins/cdk-diff-pr-github-action.CdkDriftIamTemplateGenerator",
|
|
75
|
+
"generateTemplate",
|
|
76
|
+
[]interface{}{props},
|
|
77
|
+
&returns,
|
|
78
|
+
)
|
|
79
|
+
|
|
80
|
+
return returns
|
|
81
|
+
}
|
|
82
|
+
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
package cdkdiffprgithubaction
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
// Props for generating CDK Drift IAM templates (no Projen dependency).
|
|
5
|
+
// Experimental.
|
|
6
|
+
type CdkDriftIamTemplateGeneratorProps struct {
|
|
7
|
+
// Region for the OIDC trust condition.
|
|
8
|
+
// Experimental.
|
|
9
|
+
OidcRegion *string `field:"required" json:"oidcRegion" yaml:"oidcRegion"`
|
|
10
|
+
// ARN of the existing GitHub OIDC role that can assume this drift role.
|
|
11
|
+
// Experimental.
|
|
12
|
+
OidcRoleArn *string `field:"required" json:"oidcRoleArn" yaml:"oidcRoleArn"`
|
|
13
|
+
// Name for the IAM role.
|
|
14
|
+
// Experimental.
|
|
15
|
+
RoleName *string `field:"required" json:"roleName" yaml:"roleName"`
|
|
16
|
+
}
|
|
17
|
+
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
//go:build !no_runtime_type_checking
|
|
2
|
+
|
|
3
|
+
package cdkdiffprgithubaction
|
|
4
|
+
|
|
5
|
+
import (
|
|
6
|
+
"fmt"
|
|
7
|
+
|
|
8
|
+
_jsii_ "github.com/aws/jsii-runtime-go/runtime"
|
|
9
|
+
)
|
|
10
|
+
|
|
11
|
+
func validateCdkDriftIamTemplateGenerator_GenerateTemplateParameters(props *CdkDriftIamTemplateGeneratorProps) error {
|
|
12
|
+
if props == nil {
|
|
13
|
+
return fmt.Errorf("parameter props is required, but nil was provided")
|
|
14
|
+
}
|
|
15
|
+
if err := _jsii_.ValidateStruct(props, func() string { return "parameter props" }); err != nil {
|
|
16
|
+
return err
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
return nil
|
|
20
|
+
}
|
|
21
|
+
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
//go:build no_runtime_type_checking
|
|
2
|
+
|
|
3
|
+
package cdkdiffprgithubaction
|
|
4
|
+
|
|
5
|
+
// Building without runtime type checking enabled, so all the below just return nil
|
|
6
|
+
|
|
7
|
+
func validateCdkDriftIamTemplateGenerator_GenerateTemplateParameters(props *CdkDriftIamTemplateGeneratorProps) error {
|
|
8
|
+
return nil
|
|
9
|
+
}
|
|
10
|
+
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
package cdkdiffprgithubaction
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
// Props for the Projen-integrated CDK Drift IAM template construct.
|
|
5
|
+
// Experimental.
|
|
6
|
+
type CdkDriftIamTemplateProps struct {
|
|
7
|
+
// Region for the OIDC trust condition.
|
|
8
|
+
// Experimental.
|
|
9
|
+
OidcRegion *string `field:"required" json:"oidcRegion" yaml:"oidcRegion"`
|
|
10
|
+
// ARN of the existing GitHub OIDC role that can assume this drift role.
|
|
11
|
+
// Experimental.
|
|
12
|
+
OidcRoleArn *string `field:"required" json:"oidcRoleArn" yaml:"oidcRoleArn"`
|
|
13
|
+
// Name for the IAM role.
|
|
14
|
+
// Experimental.
|
|
15
|
+
RoleName *string `field:"required" json:"roleName" yaml:"roleName"`
|
|
16
|
+
// Projen project instance.
|
|
17
|
+
// Experimental.
|
|
18
|
+
Project interface{} `field:"required" json:"project" yaml:"project"`
|
|
19
|
+
// Output path for the template file (default: 'cdk-drift-workflow-iam-template.yaml').
|
|
20
|
+
// Experimental.
|
|
21
|
+
OutputPath *string `field:"optional" json:"outputPath" yaml:"outputPath"`
|
|
22
|
+
}
|
|
23
|
+
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
//go:build !no_runtime_type_checking
|
|
2
|
+
|
|
3
|
+
package cdkdiffprgithubaction
|
|
4
|
+
|
|
5
|
+
import (
|
|
6
|
+
"fmt"
|
|
7
|
+
|
|
8
|
+
_jsii_ "github.com/aws/jsii-runtime-go/runtime"
|
|
9
|
+
)
|
|
10
|
+
|
|
11
|
+
func validateNewCdkDriftIamTemplateParameters(props *CdkDriftIamTemplateProps) error {
|
|
12
|
+
if props == nil {
|
|
13
|
+
return fmt.Errorf("parameter props is required, but nil was provided")
|
|
14
|
+
}
|
|
15
|
+
if err := _jsii_.ValidateStruct(props, func() string { return "parameter props" }); err != nil {
|
|
16
|
+
return err
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
return nil
|
|
20
|
+
}
|
|
21
|
+
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
//go:build no_runtime_type_checking
|
|
2
|
+
|
|
3
|
+
package cdkdiffprgithubaction
|
|
4
|
+
|
|
5
|
+
// Building without runtime type checking enabled, so all the below just return nil
|
|
6
|
+
|
|
7
|
+
func validateNewCdkDriftIamTemplateParameters(props *CdkDriftIamTemplateProps) error {
|
|
8
|
+
return nil
|
|
9
|
+
}
|
|
10
|
+
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
package cdkdiffprgithubaction
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
// GitHub repository restrictions for OIDC authentication.
|
|
5
|
+
// Experimental.
|
|
6
|
+
type GitHubOidcConfig struct {
|
|
7
|
+
// GitHub organization or username (e.g., 'my-org' or 'my-username').
|
|
8
|
+
// Experimental.
|
|
9
|
+
Owner *string `field:"required" json:"owner" yaml:"owner"`
|
|
10
|
+
// Repository names allowed to assume the role (e.g., ['repo1', 'repo2']) Use ['*'] to allow all repos in the organization.
|
|
11
|
+
// Experimental.
|
|
12
|
+
Repositories *[]*string `field:"required" json:"repositories" yaml:"repositories"`
|
|
13
|
+
// Additional subject claims for fine-grained access e.g., ['pull_request', 'environment:production'].
|
|
14
|
+
// Experimental.
|
|
15
|
+
AdditionalClaims *[]*string `field:"optional" json:"additionalClaims" yaml:"additionalClaims"`
|
|
16
|
+
// Branch patterns allowed (e.g., ['main', 'release/*']) Default: ['*'] (all branches).
|
|
17
|
+
// Experimental.
|
|
18
|
+
Branches *[]*string `field:"optional" json:"branches" yaml:"branches"`
|
|
19
|
+
}
|
|
20
|
+
|