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

CfnParameter is not inheriting CfnRefElement Java #4453

Closed
fima-taf opened this issue Oct 10, 2019 · 2 comments
Closed

CfnParameter is not inheriting CfnRefElement Java #4453

fima-taf opened this issue Oct 10, 2019 · 2 comments
Assignees
Labels
@aws-cdk/core Related to core CDK functionality guidance Question that needs advice or information. language/java Related to Java bindings

Comments

@fima-taf
Copy link

The Question

The documentation of the java class software.amazon.awscdk.core.CfnRefElement saying that 'Base class for referenceable CloudFormation constructs which are not Resources.
These constructs are things like Conditions and Parameters, can be referenced by taking the .ref attribute.'
But CfnParameter (core) class is not inheriting CfnRefElement it inherits CfnElement class which doesn't have the .ref attribute and cannot be referenced to other classes. (unlike CfnResource, CfnMapping and others).

Is it a bug? Or is there a way to get the ref attribute from Cloudformation's Parameters attribute?

Environment

  • CDK CLI Version: 1.12.0.DEVPREVIEW
  • OS: Windows 10
  • Language: Java
@fima-taf fima-taf added the needs-triage This issue or PR still needs to be triaged. label Oct 10, 2019
@NGL321 NGL321 added the language/java Related to Java bindings label Oct 10, 2019
@NGL321 NGL321 self-assigned this Oct 10, 2019
@NGL321 NGL321 added guidance Question that needs advice or information. @aws-cdk/core Related to core CDK functionality and removed needs-triage This issue or PR still needs to be triaged. labels Oct 10, 2019
@NGL321
Copy link
Contributor

NGL321 commented Oct 10, 2019

Hey @vBandiTv,

The CfnParameter construct is a generalization of Cloudformation Parameters in general, and is not itself a specific parameter. It is an element of a cfn construct, therefore inherits CfnElement.
The CfnRefElement class exists to allow for the creation of non-resource, referenceable, individual Cloudformation constructs. It is less specific than the CfnResource and extends CfnElement, just as CfnParameter does.
CfnParameter does not contain a .ref element because it is a lower-level generalization then would require one.

Please let me know if that helped answer your question!
😸

@NGL321 NGL321 added response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days. closing-soon This issue will automatically close in 4 days unless further comments are made. and removed response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days. labels Oct 10, 2019
@NGL321
Copy link
Contributor

NGL321 commented Oct 15, 2019

Closing due to inactivity. Please feel free to reopen if you still need help!

😸

@NGL321 NGL321 closed this as completed Oct 15, 2019
@NGL321 NGL321 removed the closing-soon This issue will automatically close in 4 days unless further comments are made. label Oct 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@aws-cdk/core Related to core CDK functionality guidance Question that needs advice or information. language/java Related to Java bindings
Projects
None yet
Development

No branches or pull requests

2 participants