-
Notifications
You must be signed in to change notification settings - Fork 124
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Tung Huynh <[email protected]>
- Loading branch information
1 parent
4bba500
commit 0648256
Showing
8 changed files
with
474 additions
and
0 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
/* | ||
Copyright 2021 Upbound Inc. | ||
*/ | ||
|
||
package vpc | ||
|
||
import ( | ||
"github.com/upbound/upjet/pkg/config" | ||
) | ||
|
||
// Configure adds configurations for vpc group. | ||
func Configure(p *config.Provider) { | ||
p.AddResourceConfigurator("aws_vpc_security_group_ingress_rule", func(r *config.Resource) { | ||
r.References["security_group_id"] = config.Reference{ | ||
Type: "github.com/upbound/provider-aws/apis/ec2/v1beta1.SecurityGroup", | ||
} | ||
r.References["referenced_security_group_id"] = config.Reference{ | ||
Type: "github.com/upbound/provider-aws/apis/ec2/v1beta1.SecurityGroup", | ||
} | ||
r.References["prefix_list_id"] = config.Reference{ | ||
Type: "github.com/upbound/provider-aws/apis/ec2/v1beta1.ManagedPrefixList", | ||
} | ||
}) | ||
|
||
p.AddResourceConfigurator("aws_vpc_security_group_egress_rule", func(r *config.Resource) { | ||
r.References["security_group_id"] = config.Reference{ | ||
Type: "github.com/upbound/provider-aws/apis/ec2/v1beta1.SecurityGroup", | ||
} | ||
r.References["referenced_security_group_id"] = config.Reference{ | ||
Type: "github.com/upbound/provider-aws/apis/ec2/v1beta1.SecurityGroup", | ||
} | ||
r.References["prefix_list_id"] = config.Reference{ | ||
Type: "github.com/upbound/provider-aws/apis/ec2/v1beta1.ManagedPrefixList", | ||
} | ||
}) | ||
} |
Oops, something went wrong.