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

rum - Create AppMonitor returns name instead of id #333

Open
piwysocki opened this issue Jan 27, 2022 · 18 comments
Open

rum - Create AppMonitor returns name instead of id #333

piwysocki opened this issue Jan 27, 2022 · 18 comments
Labels
kind/bug Some behavior is incorrect or out of spec

Comments

@piwysocki
Copy link

piwysocki commented Jan 27, 2022

Hello!

  • Vote on this issue by adding a 👍 reaction
  • To contribute a fix for this issue, leave a comment (and link to your pull request, if you've opened one already)

Issue details

I'm creating new rum AppMonitor:

new awsnative.rum.AppMonitor("name_of_app_monitor", { domain: "*.example.com" });

and getting output where id = "name_of_app_monitor".

Based on documentation we should get all inputs and additionally unique ID for this managed resource:
https://www.pulumi.com/registry/packages/aws-native/api-docs/rum/appmonitor/#outputs

Steps to reproduce

  1. Create AppMonitor
  2. Check output

Expected: ID
Actual: Name

obraz

@piwysocki piwysocki added the kind/bug Some behavior is incorrect or out of spec label Jan 27, 2022
@piwysocki
Copy link
Author

piwysocki commented Jan 27, 2022

We have to put AppMonitor ID into RUM code snippet:

https://github.com/aws-observability/aws-rum-web/blob/main/docs/cdn_installation.md#arguments

obraz

@viveklak viveklak added the needs-repro Needs repro steps before it can be triaged or fixed label Feb 2, 2022
@viveklak
Copy link
Contributor

viveklak commented Feb 2, 2022

I believe this is an instance where CloudControl is returning the wrong identifier back? Trying this out and capturing the payload for the requests should help.

@danielrbradley
Copy link
Member

I've reproduced the issue and yes, it appear that AWS CloudControl uses the name as the identifier for this resource. They haven't yet added the monitor ID to the resource schema so that's not available indirectly either. Will report this upstream.

@danielrbradley danielrbradley added the awaiting-upstream The issue cannot be resolved without action in another repository (may be owned by Pulumi). label Feb 2, 2022
@danielrbradley
Copy link
Member

Repro:

		monitor, err := rum.NewAppMonitor(ctx, "mon", &rum.AppMonitorArgs{
			Domain: pulumi.String("*.example.com"),
		})
		if err != nil {
			return err
		}

		ctx.Export("monid", monitor.ID())
		ctx.Export("monname", monitor.Name)

Outputs:

Outputs:
  + monid  : "mon-53833c9"
  + monname: "mon-53833c9"

Relevant cloudcontrol schema sections:

{
  ...
  "properties" : {
    "Name" : {...},
    "Domain" : {...},
    "CwLogEnabled" : {...},
    "Tags" : {...},
    "AppMonitorConfiguration" : {...}
  },
  "createOnlyProperties" : [ "/properties/Name" ],
  "primaryIdentifier" : [ "/properties/Name" ],
  ...
}

@danielrbradley danielrbradley removed their assignment Feb 2, 2022
@piwysocki
Copy link
Author

piwysocki commented Feb 3, 2022

Can we get a link to the reported issue upstream?

@danielrbradley
Copy link
Member

Unfortunately this reporting is via an internal channel which isn't linkable.

Could I also ask what your usecase is for needing this property? Are you needing this value for use elsewhere?

@piwysocki
Copy link
Author

I have to modify ID in RUM code snippet:
https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch-RUM-get-started-insert-code-snippet.html

@piwysocki
Copy link
Author

Hi, how is it going? Can you remove "needs-repro" label?

@piwysocki
Copy link
Author

piwysocki commented Apr 6, 2022

Hi,
I can see in AWS docs that sample response from CreateAppMonitor is guid:

https://docs.aws.amazon.com/cloudwatchrum/latest/APIReference/API_CreateAppMonitor.html

obraz

Are we close to fix this issue?

@danielrbradley danielrbradley removed the needs-repro Needs repro steps before it can be triaged or fixed label May 16, 2022
@danielrbradley danielrbradley added resolution/fixed This issue was fixed and removed awaiting-upstream The issue cannot be resolved without action in another repository (may be owned by Pulumi). labels Jun 6, 2022
@danielrbradley
Copy link
Member

Great! It looks like the issue's been resolved upstream then. Will close this as fixed.

@piwysocki
Copy link
Author

Hi, can I ask where is the code change?

https://github.com/pulumi/pulumi-aws-native/blob/e60427c280bac55a20be6babf615fb437d17290f/aws-cloudformation-schema/aws-rum-appmonitor.json

this file is not correct:

"createOnlyProperties" : [ "/properties/Name" ],
"primaryIdentifier" : [ "/properties/Name" ],

why this item is closed?

@piwysocki
Copy link
Author

Great! It looks like the issue's been resolved upstream then. Will close this as fixed.

it's not fixed

@danielrbradley
Copy link
Member

Ah my misunderstanding. I thought you were showing a screenshot of the id being returned correctly now. Will re-open.

@danielrbradley danielrbradley reopened this Jun 8, 2022
@michalpodolak
Copy link

Hi,

is there any update on resolving this issue?

Unfortunately this issue is blocking me from using CloudWatchRUM.

@piwysocki
Copy link
Author

Hi, is there any update on this?

@danielrbradley
Copy link
Member

Hi, is there any update on this?

No, there's not yet been a fix published upstream.

@piwysocki
Copy link
Author

this is not fixed yet. Can you remove label "resolution/fixed" and add "awaiting-upstream"?

@danielrbradley danielrbradley added awaiting-upstream The issue cannot be resolved without action in another repository (may be owned by Pulumi). and removed resolution/fixed This issue was fixed labels Oct 24, 2022
@corymhall
Copy link
Contributor

Looks like this has been fixed upstream, but is still an issue. I've created #1734

@corymhall corymhall removed the awaiting-upstream The issue cannot be resolved without action in another repository (may be owned by Pulumi). label Sep 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Some behavior is incorrect or out of spec
Projects
None yet
Development

No branches or pull requests

5 participants