https://pulumi.com logo
#contribute
Title
# contribute
w

worried-honey-61577

01/06/2021, 3:52 PM
Hey guys! Quick question - What’s the difference between a resource and a data source? I’m thinking specifically in the pulumi-tf-provider-boilerplate project, in
provider/resources.go
Copy code
Resources:            map[string]*tfbridge.ResourceInfo{
			// Map each resource in the Terraform provider to a Pulumi type. Two examples
			// are below - the single line form is the common case. The multi-line form is
			// needed only if you wish to override types or other default options.
			//
			// "aws_iam_role": {Tok: makeResource(mainMod, "IamRole")}
			//
			// "aws_acm_certificate": {
			// 	Tok: makeResource(mainMod, "Certificate"),
			// 	Fields: map[string]*tfbridge.SchemaInfo{
			// 		"tags": {Type: makeType(mainPkg, "Tags")},
			// 	},
			// },
		},
		DataSources: map[string]*tfbridge.DataSourceInfo{
			// Map each resource in the Terraform provider to a Pulumi function. An example
			// is below.
			// "aws_ami": {Tok: makeDataSource(mainMod, "getAmi")},
		},
t

tall-librarian-49374

01/06/2021, 3:55 PM
Data source is the Terraform’s term for a way to retrieve information about an existing resource from a cloud while resources create new resources
w

worried-honey-61577

01/06/2021, 4:13 PM
Awesome, thank you!