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

Add FQDN or URL Custom support for context profile #835

Merged
merged 1 commit into from
Feb 23, 2023

Conversation

ksamoray
Copy link
Collaborator

@ksamoray ksamoray commented Jan 31, 2023

To allow addition of custom URLs or FQDNs to context profile objects.

Fixes: #699, #721

Signed-off-by: Kobi Samoray [email protected]

@ksamoray ksamoray force-pushed the context_profile_custom_fqdns branch 5 times, most recently from 8c086d5 to 4821b83 Compare January 31, 2023 17:26
},

Schema: map[string]*schema.Schema{
"fqdn": {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we allow to configure CUSTOM_URL as part of same resource?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah we could rename this resource to "custom_attribute" and have both. Would it make this more usable?

@ksamoray ksamoray force-pushed the context_profile_custom_fqdns branch 2 times, most recently from d9bcff2 to 5ef1492 Compare February 9, 2023 13:25
@ksamoray ksamoray changed the title Add custom FQDN support for context profiles Add FQDN or URL Custom support for context profile Feb 9, 2023
@ksamoray ksamoray force-pushed the context_profile_custom_fqdns branch 2 times, most recently from a1a10d1 to 7a58332 Compare February 9, 2023 14:41
@ksamoray ksamoray requested a review from annakhm February 9, 2023 14:42
@ksamoray ksamoray force-pushed the context_profile_custom_fqdns branch 4 times, most recently from e9f0567 to 4709d8e Compare February 9, 2023 20:41
key := d.Get("key").(string)
attribute := d.Get("attribute").(string)
if d.Id() == "" {
d.SetId(makeCustomAttributeID(key, attribute))
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe we need to SetId at the end of Create, once we're the resource was created succesfully

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK

@ksamoray ksamoray force-pushed the context_profile_custom_fqdns branch from 4709d8e to cdaf6e9 Compare February 19, 2023 16:11
To allow addition of custom URLs or FQDNs to context profile objects.

Signed-off-by: Kobi Samoray <[email protected]>
@ksamoray ksamoray force-pushed the context_profile_custom_fqdns branch from cdaf6e9 to 9a96959 Compare February 22, 2023 07:05
@ksamoray
Copy link
Collaborator Author

/test-all

1 similar comment
@annakhm
Copy link
Collaborator

annakhm commented Feb 22, 2023

/test-all

Copy link
Collaborator

@annakhm annakhm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lets also add a test that uses custom attribute in context profile. Could be in follow up if you prefer.

@ksamoray
Copy link
Collaborator Author

Lets also add a test that uses custom attribute in context profile. Could be in follow up if you prefer.

Makes sense, I'll create an issue to track this follow up.

@ksamoray ksamoray merged commit 6eba95d into vmware:master Feb 23, 2023
@ksamoray ksamoray deleted the context_profile_custom_fqdns branch February 23, 2023 10:01
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

Successfully merging this pull request may close these issues.

Add resource for 'user' created FQDN's under Context Profiles
2 participants