Skip to content

Commit

Permalink
Fix iam/role sync issue
Browse files Browse the repository at this point in the history
Signed-off-by: SK Ali Arman <[email protected]>
  • Loading branch information
sheikh-arman committed Nov 27, 2023
1 parent 7e59a4e commit 60bc78f
Show file tree
Hide file tree
Showing 68 changed files with 290 additions and 285 deletions.
8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -59,17 +59,17 @@ UPTEST_VERSION = v0.5.0
# ====================================================================================
# Setup Images

REGISTRY_ORGS ?= xpkg.upbound.io/upbound
REGISTRY_ORGS ?= xpkg.kubedb.com/upbound
IMAGES = $(PROJECT_NAME)
-include build/makelib/imagelight.mk

# ====================================================================================
# Setup XPKG

XPKG_REG_ORGS ?= xpkg.upbound.io/upbound
# NOTE(hasheddan): skip promoting on xpkg.upbound.io as channel tags are
XPKG_REG_ORGS ?= xpkg.kubedb.com/upbound
# NOTE(hasheddan): skip promoting on xpkg.kubedb.com as channel tags are
# inferred.
XPKG_REG_ORGS_NO_PROMOTE ?= xpkg.upbound.io/upbound
XPKG_REG_ORGS_NO_PROMOTE ?= xpkg.kubedb.com/upbound
XPKGS = $(PROJECT_NAME)
-include build/makelib/xpkg.mk

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ AWS API.
## Getting Started

Install the provider by using the following command after changing the image tag
to the [latest release](https://marketplace.upbound.io/providers/kubedb/provider-aws):
to the [latest release](https://marketplace.kubedb.com/providers/kubedb/provider-aws):
```
up ctp provider install kubedb/provider-aws:v0.1.0
```
Expand Down
12 changes: 6 additions & 6 deletions apis/rds/v1alpha1/zz_instance_types.go

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

7 changes: 6 additions & 1 deletion config/overrides.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import (
"github.com/crossplane/upjet/pkg/types/name"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
"github.com/pkg/errors"
"kubedb.dev/provider-aws/config/common"
"strings"
)

Expand Down Expand Up @@ -213,7 +214,11 @@ func KnownReferencers() config.ResourceOption { //nolint:gocyclo
continue
}
switch {

case strings.HasSuffix(k, "role_arn"):
r.References[k] = config.Reference{
Type: "kubedb.dev/provider-aws/apis/iam/v1alpha1.Role",
Extractor: common.PathARNExtractor,
}
case strings.HasSuffix(k, "security_group_ids"):
r.References[k] = config.Reference{
Type: "kubedb.dev/provider-aws/apis/ec2/v1alpha1.SecurityGroup",
Expand Down
4 changes: 2 additions & 2 deletions config/rds/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -137,8 +137,8 @@ func Configure(p *config.Provider) {
"master DB user. If you set autoGeneratePassword to true, the Secret" +
" referenced here will be created or updated with generated password" +
" if it does not already contain one."
r.MetaResource.ArgumentDocs["engine"] = "- (Required unless a `snapshotIdentifier` or `replicateSourceDb` is provided) The database engine to use. For supported values, see the Engine parameter in [API action CreateDBInstance](https://docs.aws.amazon.com/AmazonRDS/latest/APIReference/API_CreateDBInstance.html). Note that for Amazon Aurora instances the engine must match the [DB Cluster](https://marketplace.upbound.io/providers/kubedb.dev/provider-aws/latest/resources/rds.aws.upbound.io/Cluster/v1alpha1)'s engine'. For information on the difference between the available Aurora MySQL engines see Comparison in the [Amazon RDS Release Notes](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraMySQLReleaseNotes/Welcome.html)."
r.MetaResource.ArgumentDocs["engine_version"] = "- (Optional) The engine version to use. If `autoMinorVersionUpgrade` is enabled, you can provide a prefix of the version such as 5.7 (for 5.7.10). The actual engine version used is returned in the attribute `status.atProvider.engineVersionActual`. For supported values, see the EngineVersion parameter in [API action CreateDBInstance](https://docs.aws.amazon.com/AmazonRDS/latest/APIReference/API_CreateDBInstance.html). Note that for Amazon Aurora instances the engine version must match the [DB Cluster](https://marketplace.upbound.io/providers/kubedb.dev/provider-aws/latest/resources/rds.aws.upbound.io/Cluster/v1alpha1)'s engine version'."
r.MetaResource.ArgumentDocs["engine"] = "- (Required unless a `snapshotIdentifier` or `replicateSourceDb` is provided) The database engine to use. For supported values, see the Engine parameter in [API action CreateDBInstance](https://docs.aws.amazon.com/AmazonRDS/latest/APIReference/API_CreateDBInstance.html). Note that for Amazon Aurora instances the engine must match the [DB Cluster](https://marketplace.kubedb.com/providers/kubedb.dev/provider-aws/latest/resources/rds.aws.kubedb.com/Cluster/v1alpha1)'s engine'. For information on the difference between the available Aurora MySQL engines see Comparison in the [Amazon RDS Release Notes](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraMySQLReleaseNotes/Welcome.html)."
r.MetaResource.ArgumentDocs["engine_version"] = "- (Optional) The engine version to use. If `autoMinorVersionUpgrade` is enabled, you can provide a prefix of the version such as 5.7 (for 5.7.10). The actual engine version used is returned in the attribute `status.atProvider.engineVersionActual`. For supported values, see the EngineVersion parameter in [API action CreateDBInstance](https://docs.aws.amazon.com/AmazonRDS/latest/APIReference/API_CreateDBInstance.html). Note that for Amazon Aurora instances the engine version must match the [DB Cluster](https://marketplace.kubedb.com/providers/kubedb.dev/provider-aws/latest/resources/rds.aws.kubedb.com/Cluster/v1alpha1)'s engine version'."
})

p.AddResourceConfigurator("aws_db_proxy", func(r *config.Resource) {
Expand Down
4 changes: 2 additions & 2 deletions examples-generated/docdb/cluster.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ apiVersion: docdb.aws.kubedb.com/v1alpha1
kind: Cluster
metadata:
annotations:
meta.upbound.io/example-id: docdb/v1alpha1/cluster
meta.kubedb.com/example-id: docdb/v1alpha1/cluster
labels:
testing.upbound.io/example-name: docdb
testing.kubedb.com/example-name: docdb
name: docdb
spec:
forProvider:
Expand Down
10 changes: 5 additions & 5 deletions examples-generated/docdb/clusterinstance.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@ apiVersion: docdb.aws.kubedb.com/v1alpha1
kind: ClusterInstance
metadata:
annotations:
meta.upbound.io/example-id: docdb/v1alpha1/clusterinstance
meta.kubedb.com/example-id: docdb/v1alpha1/clusterinstance
labels:
testing.upbound.io/example-name: cluster_instances
testing.kubedb.com/example-name: cluster_instances
name: cluster-instances
spec:
forProvider:
clusterIdentifierSelector:
matchLabels:
testing.upbound.io/example-name: default
testing.kubedb.com/example-name: default
count: 2
instanceClass: db.r5.large
region: us-west-1
Expand All @@ -21,9 +21,9 @@ apiVersion: docdb.aws.kubedb.com/v1alpha1
kind: Cluster
metadata:
annotations:
meta.upbound.io/example-id: docdb/v1alpha1/clusterinstance
meta.kubedb.com/example-id: docdb/v1alpha1/clusterinstance
labels:
testing.upbound.io/example-name: default
testing.kubedb.com/example-name: default
name: default
spec:
forProvider:
Expand Down
4 changes: 2 additions & 2 deletions examples-generated/docdb/clusterparametergroup.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ apiVersion: docdb.aws.kubedb.com/v1alpha1
kind: ClusterParameterGroup
metadata:
annotations:
meta.upbound.io/example-id: docdb/v1alpha1/clusterparametergroup
meta.kubedb.com/example-id: docdb/v1alpha1/clusterparametergroup
labels:
testing.upbound.io/example-name: example
testing.kubedb.com/example-name: example
name: example
spec:
forProvider:
Expand Down
6 changes: 3 additions & 3 deletions examples-generated/docdb/clustersnapshot.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@ apiVersion: docdb.aws.kubedb.com/v1alpha1
kind: ClusterSnapshot
metadata:
annotations:
meta.upbound.io/example-id: docdb/v1alpha1/clustersnapshot
meta.kubedb.com/example-id: docdb/v1alpha1/clustersnapshot
labels:
testing.upbound.io/example-name: example
testing.kubedb.com/example-name: example
name: example
spec:
forProvider:
dbClusterIdentifierSelector:
matchLabels:
testing.upbound.io/example-name: example
testing.kubedb.com/example-name: example
region: us-west-1
8 changes: 4 additions & 4 deletions examples-generated/docdb/eventsubscription.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ apiVersion: docdb.aws.kubedb.com/v1alpha1
kind: EventSubscription
metadata:
annotations:
meta.upbound.io/example-id: docdb/v1alpha1/eventsubscription
meta.kubedb.com/example-id: docdb/v1alpha1/eventsubscription
labels:
testing.upbound.io/example-name: example
testing.kubedb.com/example-name: example
name: example
spec:
forProvider:
Expand All @@ -24,9 +24,9 @@ apiVersion: docdb.aws.kubedb.com/v1alpha1
kind: Cluster
metadata:
annotations:
meta.upbound.io/example-id: docdb/v1alpha1/eventsubscription
meta.kubedb.com/example-id: docdb/v1alpha1/eventsubscription
labels:
testing.upbound.io/example-name: example
testing.kubedb.com/example-name: example
name: example
spec:
forProvider:
Expand Down
24 changes: 12 additions & 12 deletions examples-generated/docdb/globalcluster.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ apiVersion: docdb.aws.kubedb.com/v1alpha1
kind: GlobalCluster
metadata:
annotations:
meta.upbound.io/example-id: docdb/v1alpha1/globalcluster
meta.kubedb.com/example-id: docdb/v1alpha1/globalcluster
labels:
testing.upbound.io/example-name: example
testing.kubedb.com/example-name: example
name: example
spec:
forProvider:
Expand All @@ -19,9 +19,9 @@ apiVersion: docdb.aws.kubedb.com/v1alpha1
kind: Cluster
metadata:
annotations:
meta.upbound.io/example-id: docdb/v1alpha1/globalcluster
meta.kubedb.com/example-id: docdb/v1alpha1/globalcluster
labels:
testing.upbound.io/example-name: primary
testing.kubedb.com/example-name: primary
name: primary
spec:
forProvider:
Expand All @@ -43,9 +43,9 @@ apiVersion: docdb.aws.kubedb.com/v1alpha1
kind: Cluster
metadata:
annotations:
meta.upbound.io/example-id: docdb/v1alpha1/globalcluster
meta.kubedb.com/example-id: docdb/v1alpha1/globalcluster
labels:
testing.upbound.io/example-name: secondary
testing.kubedb.com/example-name: secondary
name: secondary
spec:
forProvider:
Expand All @@ -62,15 +62,15 @@ apiVersion: docdb.aws.kubedb.com/v1alpha1
kind: ClusterInstance
metadata:
annotations:
meta.upbound.io/example-id: docdb/v1alpha1/globalcluster
meta.kubedb.com/example-id: docdb/v1alpha1/globalcluster
labels:
testing.upbound.io/example-name: primary
testing.kubedb.com/example-name: primary
name: primary
spec:
forProvider:
clusterIdentifierSelector:
matchLabels:
testing.upbound.io/example-name: primary
testing.kubedb.com/example-name: primary
engine: docdb
instanceClass: db.r5.large
provider: ${aws.primary}
Expand All @@ -82,15 +82,15 @@ apiVersion: docdb.aws.kubedb.com/v1alpha1
kind: ClusterInstance
metadata:
annotations:
meta.upbound.io/example-id: docdb/v1alpha1/globalcluster
meta.kubedb.com/example-id: docdb/v1alpha1/globalcluster
labels:
testing.upbound.io/example-name: secondary
testing.kubedb.com/example-name: secondary
name: secondary
spec:
forProvider:
clusterIdentifierSelector:
matchLabels:
testing.upbound.io/example-name: secondary
testing.kubedb.com/example-name: secondary
engine: docdb
instanceClass: db.r5.large
provider: ${aws.secondary}
Expand Down
4 changes: 2 additions & 2 deletions examples-generated/docdb/subnetgroup.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ apiVersion: docdb.aws.kubedb.com/v1alpha1
kind: SubnetGroup
metadata:
annotations:
meta.upbound.io/example-id: docdb/v1alpha1/subnetgroup
meta.kubedb.com/example-id: docdb/v1alpha1/subnetgroup
labels:
testing.upbound.io/example-name: default
testing.kubedb.com/example-name: default
name: default
spec:
forProvider:
Expand Down
6 changes: 3 additions & 3 deletions examples-generated/dynamodb/contributorinsights.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@ apiVersion: dynamodb.aws.kubedb.com/v1alpha1
kind: ContributorInsights
metadata:
annotations:
meta.upbound.io/example-id: dynamodb/v1alpha1/contributorinsights
meta.kubedb.com/example-id: dynamodb/v1alpha1/contributorinsights
labels:
testing.upbound.io/example-name: test
testing.kubedb.com/example-name: test
name: test
spec:
forProvider:
region: us-west-1
tableNameSelector:
matchLabels:
testing.upbound.io/example-name: example
testing.kubedb.com/example-name: example
Loading

0 comments on commit 60bc78f

Please sign in to comment.