func NewProvider(ctx *pulumi.Context,
	name string, args *ProviderArgs, opts ...pulumi.ResourceOption) (*Provider, error) {
	if args == nil {
		args = &ProviderArgs{}
	}

	if args.AllowReauth == nil {
		args.AllowReauth = pulumi.BoolPtr(getEnvOrDefault(false, parseEnvBool, "OS_ALLOW_REAUTH").(bool))
	}
	if args.Cloud == nil {
		args.Cloud = pulumi.StringPtr(getEnvOrDefault("", nil, "OS_CLOUD").(string))
	}
	if args.DelayedAuth == nil {
		args.DelayedAuth = pulumi.BoolPtr(getEnvOrDefault(false, parseEnvBool, "OS_DELAYED_AUTH").(bool))
	}
	if args.EndpointType == nil {
		args.EndpointType = pulumi.StringPtr(getEnvOrDefault("", nil, "OS_ENDPOINT_TYPE").(string))
	}
	if args.Insecure == nil {
		args.Insecure = pulumi.BoolPtr(getEnvOrDefault(false, parseEnvBool, "OS_INSECURE").(bool))
	}
	if args.Region == nil {
		args.Region = pulumi.StringPtr(getEnvOrDefault("", nil, "OS_REGION_NAME").(string))
	}
	if args.Swauth == nil {
		args.Swauth = pulumi.BoolPtr(getEnvOrDefault(false, parseEnvBool, "OS_SWAUTH").(bool))
	}
	if args.UseOctavia == nil {
		args.UseOctavia = pulumi.BoolPtr(getEnvOrDefault(false, parseEnvBool, "OS_USE_OCTAVIA").(bool))
	}
	var resource Provider
	err := ctx.RegisterResource("pulumi:providers:openstack", name, args, &resource, opts...)
	if err != nil {
		return nil, err
	}
	return &resource, nil
}
// NewProvider registers a new resource with the given unique name, arguments, and options.
NewProvider registers a new resource with the given unique name, arguments, and options.
// NewProvider registers a new resource with the given unique name arguments and options .
func NewProvider(ctx *pulumi.Context,
	name string, args *ProviderArgs, opts ...pulumi.ResourceOption) (*Provider, error) {
	if args == nil {
		args = &ProviderArgs{}
	}
	if args.AllowReauth == nil {
		args.AllowReauth = pulumi.BoolPtr(getEnvOrDefault(false, parseEnvBool, "OS_ALLOW_REAUTH").(bool))
	}
	if args.Cloud == nil {
		args.Cloud = pulumi.StringPtr(getEnvOrDefault("", nil, "OS_CLOUD").(string))
	}
	if args.DelayedAuth == nil {
		args.DelayedAuth = pulumi.BoolPtr(getEnvOrDefault(false, parseEnvBool, "OS_DELAYED_AUTH").(bool))
	}
	if args.EndpointType == nil {
		args.EndpointType = pulumi.StringPtr(getEnvOrDefault("", nil, "OS_ENDPOINT_TYPE").(string))
	}
	if args.Insecure == nil {
		args.Insecure = pulumi.BoolPtr(getEnvOrDefault(false, parseEnvBool, "OS_INSECURE").(bool))
	}
	if args.Region == nil {
		args.Region = pulumi.StringPtr(getEnvOrDefault("", nil, "OS_REGION_NAME").(string))
	}
	if args.Swauth == nil {
		args.Swauth = pulumi.BoolPtr(getEnvOrDefault(false, parseEnvBool, "OS_SWAUTH").(bool))
	}
	if args.UseOctavia == nil {
		args.UseOctavia = pulumi.BoolPtr(getEnvOrDefault(false, parseEnvBool, "OS_USE_OCTAVIA").(bool))
	}
	var resource Provider
	err := ctx.RegisterResource("pulumi:providers:openstack", name, args, &resource, opts...)
	if err != nil {
		return nil, err
	}
	return &resource, nil
}
func NewProvider ( ctx * pulumi . Context , name string , args * ProviderArgs , opts ... pulumi . ResourceOption ) ( * Provider , error ) { if args == nil { args = & ProviderArgs { } } if args . AllowReauth == nil { args . AllowReauth = pulumi . BoolPtr ( getEnvOrDefault ( false , parseEnvBool , " " ) . ( bool ) ) } if args . Cloud == nil { args . Cloud = pulumi . StringPtr ( getEnvOrDefault ( " " , nil , " " ) . ( string ) ) } if args . DelayedAuth == nil { args . DelayedAuth = pulumi . BoolPtr ( getEnvOrDefault ( false , parseEnvBool , " " ) . ( bool ) ) } if args . EndpointType == nil { args . EndpointType = pulumi . StringPtr ( getEnvOrDefault ( " " , nil , " " ) . ( string ) ) } if args . Insecure == nil { args . Insecure = pulumi . BoolPtr ( getEnvOrDefault ( false , parseEnvBool , " " ) . ( bool ) ) } if args . Region == nil { args . Region = pulumi . StringPtr ( getEnvOrDefault ( " " , nil , " " ) . ( string ) ) } if args . Swauth == nil { args . Swauth = pulumi . BoolPtr ( getEnvOrDefault ( false , parseEnvBool , " " ) . ( bool ) ) } if args . UseOctavia == nil { args . UseOctavia = pulumi . BoolPtr ( getEnvOrDefault ( false , parseEnvBool , " " ) . ( bool ) ) } var resource Provider err := ctx . RegisterResource ( " " , name , args , & resource , opts ... ) if err != nil { return nil , err } return & resource , nil }
NewProvider registers a new resource with the given unique name, arguments, and options.
NewProvider registers a new resource with the given unique name arguments and options .