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]: SNS Topics Not Creating #1220

Closed
1 task done
bgould-careplanner opened this issue Mar 15, 2024 · 3 comments · Fixed by #1221
Closed
1 task done

[Bug]: SNS Topics Not Creating #1220

bgould-careplanner opened this issue Mar 15, 2024 · 3 comments · Fixed by #1221
Labels
bug Something isn't working impact:high is:triaged Indicates that an issue has been reviewed.

Comments

@bgould-careplanner
Copy link

bgould-careplanner commented Mar 15, 2024

Is there an existing issue for this?

  • I have searched the existing issues

Affected Resource(s)

sns.aws.upbound.io/v1beta1

Resource MRs required to reproduce the bug

apiVersion: sns.aws.upbound.io/v1beta1
kind: Topic
metadata:
  labels:
    testing.upbound.io/example-name: sns
  name: example
spec:
  forProvider:
    region: us-west-1

Steps to Reproduce

Apply the above manifest with the below versions

What happened?

Resource fails to create due to an invalid parameter

Relevant Error Output Snippet

Warning  CannotObserveExternalResource  13m                   managed/sns.aws.upbound.io/v1beta1, kind=topic  failed to observe the resource: [{0 reading SNS Topic (arn:aws:sns:<no value>:xxxxx:example): operation error SNS: GetTopicAttributes, https response error StatusCode: 400, RequestID: 6af5cf45-fe35-5c0e-8e20-912ba24ff906, InvalidParameter: Invalid parameter: TopicArn Reason: A <no value> ARN must begin with arn:null, not arn:aws:sns:<no value>:xxxxx:example  []}]


### Crossplane Version

1.15.0

### Provider Version

v1.2.0

### Kubernetes Version

1.27

### Kubernetes Distribution

EKS

### Additional Info

_No response_
@bgould-careplanner bgould-careplanner added the bug Something isn't working label Mar 15, 2024
@bgould-careplanner bgould-careplanner changed the title [Bug]: SNS Topics [Bug]: SNS Topics Not Creating Mar 15, 2024
@mbbush
Copy link
Collaborator

mbbush commented Mar 16, 2024

I can reproduce the issue on main. The SNS Topic resource works as expected in v1.1.1, so this is a regression in v1.2.0.

It looks like something changed that affected the way we parse the region out of the config in TemplatedStringAsIdentifier external name configs that are building ARNs through string interpolation. This likely affects roughly 30 resource kinds that use this type of external name config.

@turkenf We're going to need a v1.2.1 to fix this.

@mbbush mbbush added is:triaged Indicates that an issue has been reviewed. impact:high labels Mar 16, 2024
@mbbush
Copy link
Collaborator

mbbush commented Mar 16, 2024

@erhancagirici I'm not sure, but I think #1204 might have been the cause of this regression.

@erhancagirici
Copy link
Collaborator

@bgould-careplanner thanks for reporting and @mbbush thanks for checking. The problem is indeed at #1204 side. I'll send a fix very soon.

The reason is we switched to native TF SDK config and setup.Configuration became obsolete, however as you mentioned, some external name configs with TemplatedStringAsIdentifier use setup.Configuration to get the region parameter.
Since the value is not available anymore, the constructed external name is wrong.

I've checked other usages of setup.configuration and there are 25 of them. All of them retrieve region parameter only. Adding back region will suffice to fix the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working impact:high is:triaged Indicates that an issue has been reviewed.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants