Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reconcile terraform plugin framework resources without CLI #1086

Merged
merged 15 commits into from
Feb 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
91 changes: 63 additions & 28 deletions config/externalname.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,38 @@ import (
"github.com/upbound/provider-aws/config/common"
)

// TerraformPluginFrameworkExternalNameConfigs contains all external
// name configurations belonging to Terraform Plugin Framework
// resources to be reconciled under the no-fork architecture for this
// provider.
var TerraformPluginFrameworkExternalNameConfigs = map[string]config.ExternalName{
// ec2
//
// Imported by using the id: sgr-02108b27edd666983
"aws_vpc_security_group_egress_rule": vpcSecurityGroupRule(),
// Imported by using the id: sgr-02108b27edd666983
"aws_vpc_security_group_ingress_rule": vpcSecurityGroupRule(),

// cognito
//
// us-west-2_abc123/3ho4ek12345678909nh3fmhpko
"aws_cognito_user_pool_client": cognitoUserPoolClient(),

// simpledb
//
// SimpleDB Domains can be imported using the name
"aws_simpledb_domain": config.NameAsIdentifier,

// appconfig
//
// AppConfig Environments can be imported by using the environment ID and application ID separated by a colon (:)
// terraform-plugin-framework
"aws_appconfig_environment": appConfigEnvironment(),
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If I'm not mistaken, the external-name syntax is not changing for the resource as we move from the CLI-based implementation to the native fw reconciliation. We are allowed to break APIs with the next release, and if we are breaking APIs, it's important for us to capture this in the release notes.

}

// NoForkExternalNameConfigs contains all external name configurations
// belonging to Terraform resources to be reconciled under the no-fork
// architecture for this provider.
// belonging to Terraform Plugin SDKv2 resources to be reconciled
// under the no-fork architecture for this provider.
var NoForkExternalNameConfigs = map[string]config.ExternalName{
// ACM
// Imported using ARN that has a random substring:
Expand Down Expand Up @@ -2651,22 +2680,7 @@ var NoForkExternalNameConfigs = map[string]config.ExternalName{
"aws_fis_experiment_template": config.IdentifierFromProvider,
}

var CLIReconciledExternalNameConfigs = map[string]config.ExternalName{
// Imported by using the id: sgr-02108b27edd666983
"aws_vpc_security_group_egress_rule": vpcSecurityGroupRule(),
// Imported by using the id: sgr-02108b27edd666983
"aws_vpc_security_group_ingress_rule": vpcSecurityGroupRule(),
// Cognito User Pool clients can be imported using the user pool id and client id separated by a slash (/)
// However, the terraform id is just the client id.
"aws_cognito_user_pool_client": cognitoUserPoolClient(),
// simpledb
//
// SimpleDB Domains can be imported using the name
"aws_simpledb_domain": config.NameAsIdentifier,
// AppConfig Environments can be imported by using the environment ID and application ID separated by a colon (:)
// terraform-plugin-framework
"aws_appconfig_environment": config.IdentifierFromProvider,
}
var CLIReconciledExternalNameConfigs = map[string]config.ExternalName{}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: Let's remove this map as it's currently not needed. If we need in the future, then we can add.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lets remove this at CLI removal PR.


// cognitoUserPoolClient
// Note(mbbush) This resource has some unexpected behaviors that make it impossible to write a completely correct
Expand Down Expand Up @@ -2805,6 +2819,24 @@ func vpcSecurityGroupRule() config.ExternalName {
return e
}

func appConfigEnvironment() config.ExternalName {
// Terraform does not allow Environment ID to be empty.
// Using a stub value to pass validation.
e := config.IdentifierFromProvider
e.SetIdentifierArgumentFn = func(base map[string]interface{}, externalName string) {
if _, ok := base["environment_id"]; !ok {
if externalName == "" {
// must satisfy regular expression pattern: [a-z0-9]{4,7}
base["environment_id"] = "tbdeid0"
}
if identifiers := strings.Split(externalName, ":"); len(identifiers) == 2 {
base["environment_id"] = identifiers[0]
}
}
}
return e
}

func route() config.ExternalName {
e := config.IdentifierFromProvider
e.GetIDFn = func(_ context.Context, _ string, parameters map[string]interface{}, _ map[string]interface{}) (string, error) {
Expand Down Expand Up @@ -3011,19 +3043,22 @@ func TemplatedStringAsIdentifierWithNoName(tmpl string) config.ExternalName {
return e
}

// ResourceConfigurator applies all external name configs
// listed in the table NoForkExternalNameConfigs and
// CLIReconciledExternalNameConfigs and sets the version
// of those resources to v1beta1. For those resource in
// NoForkExternalNameConfigs, it also sets
// config.Resource.UseNoForkClient to `true`.
// ResourceConfigurator applies all external name configs listed in
// the table NoForkExternalNameConfigs,
// CLIReconciledExternalNameConfigs, and
// TerraformPluginFrameworkExternalNameConfigs and sets the version of
// those resources to v1beta1.
func ResourceConfigurator() config.ResourceOption {
return func(r *config.Resource) {
// if configured both for the no-fork and CLI based architectures,
// no-fork configuration prevails
e, configured := NoForkExternalNameConfigs[r.Name]
// If an external name is configured for multiple architectures,
// Terraform Plugin Framework takes precedence over Terraform
// Plugin SDKv2, which takes precedence over CLI architecture.
e, configured := TerraformPluginFrameworkExternalNameConfigs[r.Name]
if !configured {
e, configured = CLIReconciledExternalNameConfigs[r.Name]
e, configured = NoForkExternalNameConfigs[r.Name]
if !configured {
e, configured = CLIReconciledExternalNameConfigs[r.Name]
}
Comment on lines +3059 to +3061
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please see the comment above regarding the CLI-based reconciliation map.

}
if !configured {
return
Expand Down
21 changes: 19 additions & 2 deletions config/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import (
"github.com/crossplane/upjet/pkg/registry/reference"
conversiontfjson "github.com/crossplane/upjet/pkg/types/conversion/tfjson"
tfjson "github.com/hashicorp/terraform-json"
fwprovider "github.com/hashicorp/terraform-plugin-framework/provider"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
"github.com/hashicorp/terraform-provider-aws/xpprovider"
"github.com/pkg/errors"
Expand Down Expand Up @@ -162,11 +163,13 @@ func getProviderSchema(s string) (*schema.Provider, error) {
// the CRDs.
func GetProvider(ctx context.Context, generationProvider bool) (*config.Provider, *xpprovider.AWSClient, error) {
var p *schema.Provider
var fwProvider fwprovider.Provider
var err error
if generationProvider {
p, err = getProviderSchema(providerSchema)
fwProvider, _, _ = xpprovider.GetProvider(ctx)
} else {
p, err = xpprovider.GetProviderSchema(ctx)
fwProvider, p, err = xpprovider.GetProvider(ctx)
}
if err != nil {
return nil, nil, errors.Wrapf(err, "cannot get the Terraform provider schema with generation mode set to %t", generationProvider)
Expand All @@ -180,19 +183,21 @@ func GetProvider(ctx context.Context, generationProvider bool) (*config.Provider
// #nosec G103
awsClient = (*xpprovider.AWSClient)(unsafe.Pointer(reflect.ValueOf(p.Meta()).Pointer()))
}
p.SetMeta(nil)

modulePath := "github.com/upbound/provider-aws"
pc := config.NewProvider([]byte(providerSchema), "aws",
modulePath, providerMetadata,
config.WithShortName("aws"),
config.WithRootGroup("aws.upbound.io"),
config.WithIncludeList(CLIReconciledResourceList()),
config.WithNoForkIncludeList(NoForkResourceList()),
config.WithTerraformPluginFrameworkIncludeList(TerraformPluginFrameworkResourceList()),
config.WithReferenceInjectors([]config.ReferenceInjector{reference.NewInjector(modulePath)}),
config.WithSkipList(skipList),
config.WithFeaturesPackage("internal/features"),
config.WithMainTemplate(hack.MainTemplate),
config.WithTerraformProvider(p),
config.WithTerraformPluginFrameworkProvider(fwProvider),
config.WithDefaultResourceOptions(
GroupKindOverrides(),
KindOverrides(),
Expand All @@ -206,6 +211,7 @@ func GetProvider(ctx context.Context, generationProvider bool) (*config.Provider
DocumentationForTags(),
),
)
p.SetMeta(nil)
pc.BasePackages.ControllerMap["internal/controller/eks/clusterauth"] = "eks"

for _, configure := range []func(provider *config.Provider){
Expand Down Expand Up @@ -327,3 +333,14 @@ func NoForkResourceList() []string {
}
return l
}

func TerraformPluginFrameworkResourceList() []string {
l := make([]string, len(TerraformPluginFrameworkExternalNameConfigs))
i := 0
for name := range TerraformPluginFrameworkExternalNameConfigs {
// Expected format is regex, and we'd like to have exact matches.
l[i] = name + "$"
i++
}
return l
}
8 changes: 4 additions & 4 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ require (
github.com/go-ini/ini v1.46.0
github.com/google/go-cmp v0.6.0
github.com/hashicorp/terraform-json v0.18.0
github.com/hashicorp/terraform-plugin-framework v1.4.2
github.com/hashicorp/terraform-plugin-sdk/v2 v2.30.0
github.com/hashicorp/terraform-provider-aws v0.0.0-00010101000000-000000000000
github.com/pkg/errors v0.9.1
Expand Down Expand Up @@ -185,7 +186,6 @@ require (
github.com/hashicorp/hcl/v2 v2.19.1 // indirect
github.com/hashicorp/logutils v1.0.0 // indirect
github.com/hashicorp/terraform-exec v0.19.0 // indirect
github.com/hashicorp/terraform-plugin-framework v1.4.2 // indirect
github.com/hashicorp/terraform-plugin-framework-timeouts v0.4.1 // indirect
github.com/hashicorp/terraform-plugin-framework-validators v0.12.0 // indirect
github.com/hashicorp/terraform-plugin-go v0.19.1 // indirect
Expand Down Expand Up @@ -223,7 +223,7 @@ require (
github.com/prometheus/common v0.44.0 // indirect
github.com/prometheus/procfs v0.10.1 // indirect
github.com/shopspring/decimal v1.3.1 // indirect
github.com/smartystreets/goconvey v1.7.2 // indirect
github.com/smartystreets/goconvey v1.8.1 // indirect
github.com/spf13/afero v1.11.0 // indirect
github.com/spf13/cobra v1.8.0 // indirect
github.com/spf13/pflag v1.0.5 // indirect
Expand Down Expand Up @@ -259,7 +259,7 @@ require (
google.golang.org/grpc v1.59.0 // indirect
google.golang.org/protobuf v1.31.1-0.20231128094519-2087447a6b4a // indirect
gopkg.in/inf.v0 v0.9.1 // indirect
gopkg.in/ini.v1 v1.62.0 // indirect
gopkg.in/ini.v1 v1.67.0 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
k8s.io/apiextensions-apiserver v0.28.4 // indirect
Expand All @@ -273,6 +273,6 @@ require (

replace golang.org/x/exp => golang.org/x/exp v0.0.0-20231006140011-7918f672742d

replace github.com/hashicorp/terraform-provider-aws => github.com/upbound/terraform-provider-aws v0.0.0-20231221174129-7cc0c6603869
replace github.com/hashicorp/terraform-provider-aws => github.com/upbound/terraform-provider-aws v0.0.0-20240129145938-c69f68a59916

replace github.com/hashicorp/terraform-plugin-log => github.com/gdavison/terraform-plugin-log v0.0.0-20230928191232-6c653d8ef8fb
21 changes: 10 additions & 11 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -356,8 +356,8 @@ github.com/google/pprof v0.0.0-20231101202521-4ca4178f5c7a h1:fEBsGL/sjAuJrgah5X
github.com/google/pprof v0.0.0-20231101202521-4ca4178f5c7a/go.mod h1:czg5+yv1E0ZGTi6S6vVK1mke0fV+FaUhNGcd6VRS9Ik=
github.com/google/uuid v1.4.0 h1:MtMxsa51/r9yyhkyLsVeVt0B+BGQZzpQiTQ4eHZ8bc4=
github.com/google/uuid v1.4.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1 h1:EGx4pi6eqNxGaHF6qqu48+N2wcFQ5qg5FXgOdqsJ5d8=
github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY=
github.com/gopherjs/gopherjs v1.17.2 h1:fQnZVsXk8uxXIStYb0N4bGk7jeyTalG/wsZjQ25dO0g=
github.com/gopherjs/gopherjs v1.17.2/go.mod h1:pRRIvn/QzFLrKfvEz3qUuEhtE/zLCWfreZ6J5gM2i+k=
github.com/hashicorp/aws-cloudformation-resource-schema-sdk-go v0.21.0 h1:IUypt/TbXiJBkBbE3926CgnjD8IltAitdn7Yive61DY=
github.com/hashicorp/aws-cloudformation-resource-schema-sdk-go v0.21.0/go.mod h1:cdTE6F2pCKQobug+RqRaQp7Kz9hIEqiSvpPmb6E5G1w=
github.com/hashicorp/aws-sdk-go-base/v2 v2.0.0-beta.45 h1:esKaa1l2oJiARVIa20DPxgID9V7FyFfert7X1FWg1HU=
Expand Down Expand Up @@ -530,10 +530,10 @@ github.com/shopspring/decimal v1.3.1 h1:2Usl1nmF/WZucqkFZhnfFYxxxu8LG21F6nPQBE5g
github.com/shopspring/decimal v1.3.1/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFRcu2hWCYk4o=
github.com/skeema/knownhosts v1.2.0 h1:h9r9cf0+u7wSE+M183ZtMGgOJKiL96brpaz5ekfJCpM=
github.com/skeema/knownhosts v1.2.0/go.mod h1:g4fPeYpque7P0xefxtGzV81ihjC8sX2IqpAoNkjxbMo=
github.com/smartystreets/assertions v1.2.0 h1:42S6lae5dvLc7BrLu/0ugRtcFVjoJNMC/N3yZFZkDFs=
github.com/smartystreets/assertions v1.2.0/go.mod h1:tcbTF8ujkAEcZ8TElKY+i30BzYlVhC/LOxJk7iOWnoo=
github.com/smartystreets/goconvey v1.7.2 h1:9RBaZCeXEQ3UselpuwUQHltGVXvdwm6cv1hgR6gDIPg=
github.com/smartystreets/goconvey v1.7.2/go.mod h1:Vw0tHAZW6lzCRk3xgdin6fKYcG+G3Pg9vgXWeJpQFMM=
github.com/smarty/assertions v1.15.0 h1:cR//PqUBUiQRakZWqBiFFQ9wb8emQGDb0HeGdqGByCY=
github.com/smarty/assertions v1.15.0/go.mod h1:yABtdzeQs6l1brC900WlRNwj6ZR55d7B+E8C6HtKdec=
github.com/smartystreets/goconvey v1.8.1 h1:qGjIddxOk4grTu9JPOU31tVfq3cNdBlNa5sSznIX1xY=
github.com/smartystreets/goconvey v1.8.1/go.mod h1:+/u4qLyY6x1jReYOp7GOM2FSt8aP9CzCZL03bI28W60=
github.com/spf13/afero v1.11.0 h1:WJQKhtpdm3v2IzqG8VMqrr6Rf3UYpEF239Jy9wNepM8=
github.com/spf13/afero v1.11.0/go.mod h1:GH9Y3pIexgf1MTIWtNGyogA5MwRIDXGUr+hbWNoBjkY=
github.com/spf13/cobra v1.8.0 h1:7aJaZx1B85qltLMc546zn58BxxfZdR/W22ej9CFoEf0=
Expand All @@ -556,8 +556,8 @@ github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcU
github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
github.com/tmccombs/hcl2json v0.3.3 h1:+DLNYqpWE0CsOQiEZu+OZm5ZBImake3wtITYxQ8uLFQ=
github.com/tmccombs/hcl2json v0.3.3/go.mod h1:Y2chtz2x9bAeRTvSibVRVgbLJhLJXKlUeIvjeVdnm4w=
github.com/upbound/terraform-provider-aws v0.0.0-20231221174129-7cc0c6603869 h1:F6JOaiqx7J76/u/M8gAa99Me67/+i9wyPD7pWomES8k=
github.com/upbound/terraform-provider-aws v0.0.0-20231221174129-7cc0c6603869/go.mod h1:Kb86v3lyFUggXmDTi53PPHLENdWUdD8t3IfjS7rFd+0=
github.com/upbound/terraform-provider-aws v0.0.0-20240129145938-c69f68a59916 h1:W3WAB6utkebXviDpnym5bWaQtqASXeudJ7bu7v9CJA4=
github.com/upbound/terraform-provider-aws v0.0.0-20240129145938-c69f68a59916/go.mod h1:Kb86v3lyFUggXmDTi53PPHLENdWUdD8t3IfjS7rFd+0=
github.com/vmihailenco/msgpack v3.3.3+incompatible/go.mod h1:fy3FlTQTDXWkZ7Bh6AcGMlsjHatGryHQYUTf1ShIgkk=
github.com/vmihailenco/msgpack v4.0.4+incompatible h1:dSLoQfGFAo3F6OoNhwUmLwVgaUXK79GlxNBwueZn0xI=
github.com/vmihailenco/msgpack v4.0.4+incompatible/go.mod h1:fy3FlTQTDXWkZ7Bh6AcGMlsjHatGryHQYUTf1ShIgkk=
Expand Down Expand Up @@ -702,7 +702,6 @@ golang.org/x/time v0.5.0 h1:o7cqy6amK/52YcAKIPlM3a+Fpj35zvRj2TP+e1xFSfk=
golang.org/x/time v0.5.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM=
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
Expand Down Expand Up @@ -741,8 +740,8 @@ gopkg.in/dnaeon/go-vcr.v3 v3.1.2 h1:F1smfXBqQqwpVifDfUBQG6zzaGjzT+EnVZakrOdr5wA=
gopkg.in/dnaeon/go-vcr.v3 v3.1.2/go.mod h1:2IMOnnlx9I6u9x+YBsM3tAMx6AlOxnJ0pWxQAzZ79Ag=
gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc=
gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw=
gopkg.in/ini.v1 v1.62.0 h1:duBzk771uxoUuOlyRLkHsygud9+5lrlGjdFBb4mSKDU=
gopkg.in/ini.v1 v1.62.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k=
gopkg.in/ini.v1 v1.67.0 h1:Dgnx+6+nfE+IfzjUEISNeydPJh9AXNNsWbGP9KzCsOA=
gopkg.in/ini.v1 v1.67.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k=
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ=
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw=
gopkg.in/warnings.v0 v0.1.2 h1:wFXVbFY8DY5/xOe1ECiWdKCzZlxgshcYVNkBHstARME=
Expand Down
15 changes: 12 additions & 3 deletions internal/clients/aws.go
Original file line number Diff line number Diff line change
Expand Up @@ -225,10 +225,17 @@ func getAWSConfig(ctx context.Context, c client.Client, mg resource.Managed) (*a
return cfg, nil
}

func configureNoForkAWSClient(_ context.Context, ps *terraform.Setup, config *SetupConfig) error { //nolint:gocyclo
type metaOnlyPrimary struct {
meta any
}

func (m *metaOnlyPrimary) Meta() any {
return m.meta
}

func configureNoForkAWSClient(ctx context.Context, ps *terraform.Setup, config *SetupConfig) error { //nolint:gocyclo
p := *config.TerraformProvider
// TODO: use context.WithoutCancel(ctx) after switching to Go >=1.21
diag := p.Configure(context.TODO(), &tfsdk.ResourceConfig{ //nolint:contextcheck
diag := p.Configure(context.WithoutCancel(ctx), &tfsdk.ResourceConfig{
Config: ps.Configuration,
})
if diag != nil && diag.HasError() {
Expand All @@ -237,5 +244,7 @@ func configureNoForkAWSClient(_ context.Context, ps *terraform.Setup, config *Se
ps.Meta = p.Meta()
// #nosec G103
(*xpprovider.AWSClient)(unsafe.Pointer(reflect.ValueOf(ps.Meta).Pointer())).ServicePackages = (*xpprovider.AWSClient)(unsafe.Pointer(reflect.ValueOf(config.AWSClient).Pointer())).ServicePackages
fwProvider := xpprovider.GetFrameworkProviderWithMeta(&metaOnlyPrimary{meta: p.Meta()})
ps.FrameworkProvider = fwProvider
return nil
}
13 changes: 9 additions & 4 deletions internal/controller/appconfig/environment/zz_controller.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading