-
-
Save travisgroth/e9f173d137ced07d77f0aac4e9106aeb to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type Project struct { | |
pulumi.ResourceState | |
provider pulumi.ProviderResource | |
project *organizations.Project | |
} | |
func (p *Project) enableOSLogin(ctx *pulumi.Context, resources []pulumi.Resource) ([]pulumi.Resource, error) { | |
// here, p.project.Name is a StringOutput | |
meta, err := compute.NewProjectMetadataItem(ctx, fmt.Sprintf("oslogin-%s", p.project.Name), &compute.ProjectMetadataItemArgs{ | |
Key: pulumi.String("enable-oslogin"), | |
Value: pulumi.String("TRUE"), | |
}, | |
pulumi.Provider(p.provider), | |
pulumi.Parent(p.provider), | |
pulumi.DependsOn(resources), | |
) | |
if err != nil { | |
return resources, err | |
} | |
return append(resources, meta), err | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment