crossplane-contrib / provider-jet-aws

AWS Provider for Crossplane that is built with Terrajet.
https://crossplane.io
Apache License 2.0
37 stars 30 forks source link

Marking passwords field of aws_elasticache_user as sensitive #149

Closed sergenyalcin closed 2 years ago

sergenyalcin commented 2 years ago

Description of your changes

Depends on https://github.com/crossplane/terrajet/issues/100

This PR depends on the following one -> https://github.com/crossplane/terrajet/pull/197 Until merge the dependent PR, a temporary replace command was added to go.mod:

https://github.com/sergenyalcin/provider-jet-aws/blob/ae8fb3a002c0e24f868d0d608fa365ef42d6da7e/go.mod#L26

This PR marks the passwords field of aws_elasticache_user as sensitive. Now, this field is not sensitive and the passwords are put to the spec directly. Because for []string and []*string types, there is not support as sensitive fields. The dependent PR will provide this support. After merging the dependent PR in terrajet, this PR can be merged.

I have:

How has this code been tested

apiVersion: elasticache.aws.jet.crossplane.io/v1alpha1
kind: User
metadata:
  name: sample-user
spec:
  forProvider:
    userName: "testUserName"
    accessString: "on ~app::* -@all +@read +@hash +@bitmap +@geo -setbit -bitfield -hset -hsetnx -hmset -hincrby -hincrbyfloat -hdel -bitop -geoadd -georadius -georadiusbymember"
    engine: "REDIS"
    region: us-west-1
    passwordsSecretRef:
      - name: test-slice-1
        namespace: crossplane-system
        key: pwd
      - name: test-slice-2
        namespace: crossplane-system
        key: pwd
  writeConnectionSecretToRef:
    name: test-conn
    namespace: default
muvaf commented 2 years ago

@sergenyalcin Is there anything blocking this? It seems fine to merge after resolving the conflicts.

sergenyalcin commented 2 years ago

@sergenyalcin Is there anything blocking this? It seems fine to merge after resolving the conflicts.

Conflicts were resolved!