Skip to content

Commit

Permalink
Make secret name field sensitive for container app
Browse files Browse the repository at this point in the history
Signed-off-by: Fatih Türken <[email protected]>
  • Loading branch information
turkenf committed Oct 2, 2024
1 parent 13dfad9 commit 5e1ee8e
Show file tree
Hide file tree
Showing 5 changed files with 42 additions and 31 deletions.
2 changes: 1 addition & 1 deletion apis/containerapp/v1beta2/zz_containerapp_terraformed.go

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

8 changes: 2 additions & 6 deletions apis/containerapp/v1beta2/zz_containerapp_types.go

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

17 changes: 2 additions & 15 deletions apis/containerapp/v1beta2/zz_generated.deepcopy.go

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

3 changes: 3 additions & 0 deletions config/containerapp/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,15 @@ package containerapp

import (
"github.com/crossplane/upjet/pkg/config"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
)

// Configure configures kubernetes group
func Configure(p *config.Provider) {
p.AddResourceConfigurator("azurerm_container_app", func(r *config.Resource) {
r.ShortGroup = "containerapp"
r.TerraformResource.Schema["secret"].Elem.(*schema.Resource).
Schema["name"].Sensitive = true
})

p.AddResourceConfigurator("azurerm_container_app_environment", func(r *config.Resource) {
Expand Down
43 changes: 34 additions & 9 deletions package/crds/containerapp.azure.upbound.io_containerapps.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3279,11 +3279,25 @@ spec:
The ID of a Key Vault secret. This can be a versioned or version-less ID.
The Key Vault Secret ID. Could be either one of `id` or `versionless_id`.
type: string
name:
nameSecretRef:
description: |-
The secret name.
The secret name.
type: string
properties:
key:
description: The key to select.
type: string
name:
description: Name of the secret.
type: string
namespace:
description: Namespace of the secret.
type: string
required:
- key
- name
- namespace
type: object
valueSecretRef:
description: |-
The value for this secret.
Expand Down Expand Up @@ -4113,11 +4127,25 @@ spec:
The ID of a Key Vault secret. This can be a versioned or version-less ID.
The Key Vault Secret ID. Could be either one of `id` or `versionless_id`.
type: string
name:
nameSecretRef:
description: |-
The secret name.
The secret name.
type: string
properties:
key:
description: The key to select.
type: string
name:
description: Name of the secret.
type: string
namespace:
description: Namespace of the secret.
type: string
required:
- key
- name
- namespace
type: object
valueSecretRef:
description: |-
The value for this secret.
Expand All @@ -4137,6 +4165,8 @@ spec:
- name
- namespace
type: object
required:
- nameSecretRef
type: object
type: array
tags:
Expand Down Expand Up @@ -5078,11 +5108,6 @@ spec:
The ID of a Key Vault secret. This can be a versioned or version-less ID.
The Key Vault Secret ID. Could be either one of `id` or `versionless_id`.
type: string
name:
description: |-
The secret name.
The secret name.
type: string
type: object
type: array
tags:
Expand Down

0 comments on commit 5e1ee8e

Please sign in to comment.