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

[Bug]: ssm.aws.upbound.io/Parameter/v1beta1 - unable to create a Parameter with Type: SecureString #1559

Closed
1 task done
emoby opened this issue Nov 7, 2024 · 3 comments
Closed
1 task done

Comments

@emoby
Copy link

emoby commented Nov 7, 2024

Is there an existing issue for this?

  • I have searched the existing issues

Affected Resource(s)

provider-aws-ssm/v1.16.0/resources/ssm.aws.upbound.io/Parameter/v1beta1

Resource MRs required to reproduce the bug

ssm-parameter-store-ss.yaml

apiVersion: ssm.aws.upbound.io/v1beta1
kind: Parameter
metadata:
  name: crossplane-system-ps-secure-string
  namespace: crossplane-system
  annotations:
    crossplane.io/parameter-name: /k8s/crossplane-system/ps-secure-string
spec:
  forProvider:
    region: us-east-1
    type: SecureString
  providerConfigReg:
    name: default

Steps to Reproduce

k create -f ssm-parameter-store-ss.yaml

What happened?

I'm trying to create a SecureString ssm parameter, and it fails with an api error Validation from AWS. Suggestions on how to provide a placeholder for the create process?

Relevant Error Output Snippet

message: 'create failed: async create failed: failed to create the resource: [{0
      creating SSM Parameter (crossplane-system-ps-secure-string): operation error SSM:
      PutParameter, https response error StatusCode: 400, RequestID: <redacted>,
      api error ValidationException: 1 validation error detected: Value at ''value''
      failed to satisfy constraint: Member must have length greater than or equal
      to 1  []}]'
    reason: ReconcileError
    status: "False"
    type: Synced


### Crossplane Version

1.18.0

### Provider Version

v1.16.0

### Kubernetes Version

Kubernetes Version:
Client Version: v1.31.0
Kustomize Version: v5.4.2
Server Version: v1.31.1-eks

### Kubernetes Distribution

EKS

### Additional Info

_No response_
@emoby emoby added bug Something isn't working needs:triage labels Nov 7, 2024
@turkenf
Copy link
Collaborator

turkenf commented Dec 1, 2024

Hi @emoby,

You can use the following YAML to create the resource:

apiVersion: ssm.aws.upbound.io/v1beta1
kind: Parameter
metadata:
  name: crossplane-system-ps-secure-string
  namespace: crossplane-system
  annotations:
    crossplane.io/parameter-name: /k8s/crossplane-system/ps-secure-string
spec:
  forProvider:
    region: us-east-1
    type: SecureString
    valueSecretRef:
      key: example-key
      name: parameter-secret
      namespace: upbound-system
  providerConfigReg:
    name: default
---
apiVersion: v1
kind: Secret
metadata:
  annotations:
    meta.upbound.io/example-id: ssm/v1beta1/parameter
  labels:
    testing.upbound.io/example-name: foo
  name: parameter-secret
  namespace: upbound-system
type: Opaque
stringData:
  example-key: "Upbound!"

@turkenf turkenf removed bug Something isn't working needs:triage labels Dec 1, 2024
@turkenf
Copy link
Collaborator

turkenf commented Dec 1, 2024

I am closing this for now; feel free to reopen it if you encounter any issues.

@turkenf turkenf closed this as completed Dec 1, 2024
@emoby
Copy link
Author

emoby commented Dec 19, 2024

Thank you! Appreciate the info!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants